@pibbl/core 0.0.1 → 0.0.3-alpha.85.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/THIRD_PARTY_NOTICES.txt +81 -0
- package/dist/features/machines/animation.d.ts +64 -0
- package/dist/features/machines/animation.js +55 -0
- package/dist/features/machines/animation.js.map +7 -0
- package/dist/features/machines/animation.mjs +1 -0
- package/dist/features/machines/assign.d.ts +16 -0
- package/dist/features/machines/assign.js +15 -0
- package/dist/features/machines/assign.js.map +7 -0
- package/dist/features/machines/callback.d.ts +9 -0
- package/dist/features/machines/callback.js +7 -0
- package/dist/features/machines/callback.js.map +7 -0
- package/dist/features/machines/hook.d.ts +30 -0
- package/dist/features/machines/hook.js +37 -0
- package/dist/features/machines/hook.js.map +7 -0
- package/dist/features/machines/index.d.ts +6 -0
- package/dist/features/machines/index.js +12 -0
- package/dist/features/machines/index.js.map +7 -0
- package/dist/features/machines/index.mjs +1 -0
- package/dist/features/machines/runtime.d.ts +18 -0
- package/dist/features/machines/runtime.js +363 -0
- package/dist/features/machines/runtime.js.map +7 -0
- package/dist/features/machines/types.d.ts +164 -0
- package/dist/features/physics/2d-geometry.d.ts +3 -3
- package/dist/features/physics/2d-geometry.js.map +1 -1
- package/dist/features/physics/2d.d.ts +115 -62
- package/dist/features/physics/2d.js +59 -28
- package/dist/features/physics/2d.js.map +2 -2
- package/dist/features/physics/lib/2d/query-types.d.ts +6 -0
- package/dist/features/physics/lib/2d/runtime/controller.d.ts +7 -6
- package/dist/features/physics/lib/2d/runtime/controller.js.map +2 -2
- package/dist/features/physics/lib/2d/types.d.ts +8 -30
- package/dist/features/physics/lib/2d/world/queries.d.ts +7 -6
- package/dist/features/physics/lib/2d/world/queries.js.map +2 -2
- package/dist/features/sprites/formats/aseprite.d.ts +5 -0
- package/dist/features/sprites/formats/texture-packer.d.ts +5 -0
- package/dist/features/sprites/index.d.ts +6 -0
- package/dist/features/sprites/loader.d.ts +25 -0
- package/dist/features/sprites/model.d.ts +75 -0
- package/dist/features/sprites/sprite.d.ts +22 -0
- package/dist/features/textures/index.d.ts +12 -2
- package/dist/features/textures/index.js +33 -1
- package/dist/features/textures/index.js.map +2 -2
- package/dist/features/textures/lib/chemical-field.d.ts +56 -0
- package/dist/features/textures/lib/chemical-field.js +154 -0
- package/dist/features/textures/lib/chemical-field.js.map +7 -0
- package/dist/features/textures/lib/chemical-recipes.d.ts +119 -0
- package/dist/features/textures/lib/chemical-recipes.js +275 -0
- package/dist/features/textures/lib/chemical-recipes.js.map +7 -0
- package/dist/features/textures/lib/definitions.d.ts +3 -18
- package/dist/features/textures/lib/definitions.js +15 -20
- package/dist/features/textures/lib/definitions.js.map +2 -2
- package/dist/features/textures/lib/geometric-patterns.d.ts +149 -0
- package/dist/features/textures/lib/geometric-patterns.js +305 -0
- package/dist/features/textures/lib/geometric-patterns.js.map +7 -0
- package/dist/features/textures/lib/gray-scott.d.ts +55 -0
- package/dist/features/textures/lib/gray-scott.js +39 -0
- package/dist/features/textures/lib/gray-scott.js.map +7 -0
- package/dist/features/textures/lib/patterns.d.ts +123 -0
- package/dist/features/textures/lib/patterns.js +344 -0
- package/dist/features/textures/lib/patterns.js.map +7 -0
- package/dist/features/textures/lib/reaction-diffusion.d.ts +3 -2
- package/dist/features/textures/lib/reaction-diffusion.js +9 -20
- package/dist/features/textures/lib/reaction-diffusion.js.map +2 -2
- package/dist/features/textures/lib/simulation.d.ts +10 -4
- package/dist/features/textures/lib/simulation.js +23 -13
- package/dist/features/textures/lib/simulation.js.map +2 -2
- package/dist/features/viz/index.d.ts +79 -5
- package/dist/features/viz/index.js +145 -4
- package/dist/features/viz/index.js.map +2 -2
- package/dist/features/viz/inspection/bar.d.ts +79 -0
- package/dist/features/viz/inspection/bar.js +49 -0
- package/dist/features/viz/inspection/bar.js.map +7 -0
- package/dist/features/viz/inspection/candle.d.ts +156 -0
- package/dist/features/viz/inspection/candle.js +120 -0
- package/dist/features/viz/inspection/candle.js.map +7 -0
- package/dist/features/viz/inspection/capture-types.d.ts +65 -0
- package/dist/features/viz/inspection/capture.d.ts +16 -0
- package/dist/features/viz/inspection/capture.js +49 -0
- package/dist/features/viz/inspection/capture.js.map +7 -0
- package/dist/features/viz/inspection/handler.d.ts +36 -0
- package/dist/features/viz/inspection/handler.js +91 -0
- package/dist/features/viz/inspection/handler.js.map +7 -0
- package/dist/features/viz/inspection/ohlc-bar.d.ts +132 -0
- package/dist/features/viz/inspection/ohlc-bar.js +118 -0
- package/dist/features/viz/inspection/ohlc-bar.js.map +7 -0
- package/dist/features/viz/inspection/owned-ref.d.ts +16 -0
- package/dist/features/viz/inspection/owned-ref.js +99 -0
- package/dist/features/viz/inspection/owned-ref.js.map +7 -0
- package/dist/features/viz/inspection/painted-point.d.ts +22 -0
- package/dist/features/viz/inspection/painted-point.js +29 -0
- package/dist/features/viz/inspection/painted-point.js.map +7 -0
- package/dist/features/viz/inspection/queries.d.ts +100 -0
- package/dist/features/viz/inspection/queries.js +192 -0
- package/dist/features/viz/inspection/queries.js.map +7 -0
- package/dist/features/viz/inspection/query-types.d.ts +177 -0
- package/dist/features/viz/inspection/volume.d.ts +104 -0
- package/dist/features/viz/inspection/volume.js +95 -0
- package/dist/features/viz/inspection/volume.js.map +7 -0
- package/dist/features/viz/inspection.d.ts +19 -0
- package/dist/features/viz/inspection.js +54 -0
- package/dist/features/viz/inspection.js.map +7 -0
- package/dist/features/viz/inspection.mjs +1 -0
- package/dist/features/viz/lib/area-series.d.ts +62 -0
- package/dist/features/viz/lib/area-series.js +120 -0
- package/dist/features/viz/lib/area-series.js.map +7 -0
- package/dist/features/viz/lib/axis-labels.d.ts +2 -0
- package/dist/features/viz/lib/axis-labels.js +41 -0
- package/dist/features/viz/lib/axis-labels.js.map +7 -0
- package/dist/features/viz/lib/axis-title.d.ts +23 -0
- package/dist/features/viz/lib/axis-title.js +23 -0
- package/dist/features/viz/lib/axis-title.js.map +7 -0
- package/dist/features/viz/lib/axis.d.ts +1 -1
- package/dist/features/viz/lib/axis.js +50 -50
- package/dist/features/viz/lib/axis.js.map +2 -2
- package/dist/features/viz/lib/bar-scale.d.ts +7 -0
- package/dist/features/viz/lib/bar-scale.js +34 -0
- package/dist/features/viz/lib/bar-scale.js.map +7 -0
- package/dist/features/viz/lib/bar-series.d.ts +3 -1
- package/dist/features/viz/lib/bar-series.js +21 -5
- package/dist/features/viz/lib/bar-series.js.map +2 -2
- package/dist/features/viz/lib/baseline-series.d.ts +55 -0
- package/dist/features/viz/lib/baseline-series.js +136 -0
- package/dist/features/viz/lib/baseline-series.js.map +7 -0
- package/dist/features/viz/lib/candlestick-series.d.ts +62 -0
- package/dist/features/viz/lib/candlestick-series.js +150 -0
- package/dist/features/viz/lib/candlestick-series.js.map +7 -0
- package/dist/features/viz/lib/censored-point-series.d.ts +71 -0
- package/dist/features/viz/lib/censored-point-series.js +129 -0
- package/dist/features/viz/lib/censored-point-series.js.map +7 -0
- package/dist/features/viz/lib/chart-lines.d.ts +41 -0
- package/dist/features/viz/lib/chart-lines.js +32 -0
- package/dist/features/viz/lib/chart-lines.js.map +7 -0
- package/dist/features/viz/lib/color-context.d.ts +4 -0
- package/dist/features/viz/lib/color-context.js +41 -0
- package/dist/features/viz/lib/color-context.js.map +7 -0
- package/dist/features/viz/lib/color-math.d.ts +4 -0
- package/dist/features/viz/lib/color-math.js +31 -0
- package/dist/features/viz/lib/color-math.js.map +7 -0
- package/dist/features/viz/lib/color-types.d.ts +53 -0
- package/dist/features/viz/lib/curve-definition.d.ts +49 -0
- package/dist/features/viz/lib/curve-definition.js +148 -0
- package/dist/features/viz/lib/curve-definition.js.map +7 -0
- package/dist/features/viz/lib/diverging-color-scale.d.ts +11 -0
- package/dist/features/viz/lib/diverging-color-scale.js +51 -0
- package/dist/features/viz/lib/diverging-color-scale.js.map +7 -0
- package/dist/features/viz/lib/domain-navigation.d.ts +40 -0
- package/dist/features/viz/lib/domain-navigation.js +77 -0
- package/dist/features/viz/lib/domain-navigation.js.map +7 -0
- package/dist/features/viz/lib/editable-chart-elements.d.ts +178 -0
- package/dist/features/viz/lib/editable-chart-elements.js +733 -0
- package/dist/features/viz/lib/editable-chart-elements.js.map +7 -0
- package/dist/features/viz/lib/financial-aggregation.d.ts +127 -0
- package/dist/features/viz/lib/financial-aggregation.js +116 -0
- package/dist/features/viz/lib/financial-aggregation.js.map +7 -0
- package/dist/features/viz/lib/financial-autoscale.d.ts +64 -0
- package/dist/features/viz/lib/financial-autoscale.js +61 -0
- package/dist/features/viz/lib/financial-autoscale.js.map +7 -0
- package/dist/features/viz/lib/financial-comparison.d.ts +62 -0
- package/dist/features/viz/lib/financial-comparison.js +98 -0
- package/dist/features/viz/lib/financial-comparison.js.map +7 -0
- package/dist/features/viz/lib/financial-geometry.d.ts +77 -0
- package/dist/features/viz/lib/financial-geometry.js +67 -0
- package/dist/features/viz/lib/financial-geometry.js.map +7 -0
- package/dist/features/viz/lib/financial-indicators.d.ts +114 -0
- package/dist/features/viz/lib/financial-indicators.js +135 -0
- package/dist/features/viz/lib/financial-indicators.js.map +7 -0
- package/dist/features/viz/lib/financial-oscillators.d.ts +171 -0
- package/dist/features/viz/lib/financial-oscillators.js +265 -0
- package/dist/features/viz/lib/financial-oscillators.js.map +7 -0
- package/dist/features/viz/lib/hover-data.d.ts +1 -1
- package/dist/features/viz/lib/hover-data.js +6 -3
- package/dist/features/viz/lib/hover-data.js.map +2 -2
- package/dist/features/viz/lib/hover-types.d.ts +5 -5
- package/dist/features/viz/lib/interval-band-series.d.ts +49 -0
- package/dist/features/viz/lib/interval-band-series.js +136 -0
- package/dist/features/viz/lib/interval-band-series.js.map +7 -0
- package/dist/features/viz/lib/interval-diamond-series.d.ts +43 -0
- package/dist/features/viz/lib/interval-diamond-series.js +124 -0
- package/dist/features/viz/lib/interval-diamond-series.js.map +7 -0
- package/dist/features/viz/lib/interval-series.d.ts +79 -0
- package/dist/features/viz/lib/interval-series.js +158 -0
- package/dist/features/viz/lib/interval-series.js.map +7 -0
- package/dist/features/viz/lib/line-series.d.ts +1 -1
- package/dist/features/viz/lib/line-series.js +47 -28
- package/dist/features/viz/lib/line-series.js.map +2 -2
- package/dist/features/viz/lib/linear-scale-component.d.ts +7 -0
- package/dist/features/viz/lib/linear-scale-component.js +18 -0
- package/dist/features/viz/lib/linear-scale-component.js.map +7 -0
- package/dist/features/viz/lib/linear-scale.js +1 -1
- package/dist/features/viz/lib/linear-scale.js.map +2 -2
- package/dist/features/viz/lib/log-scale-component.d.ts +7 -0
- package/dist/features/viz/lib/log-scale-component.js +19 -0
- package/dist/features/viz/lib/log-scale-component.js.map +7 -0
- package/dist/features/viz/lib/log-scale.d.ts +2 -0
- package/dist/features/viz/lib/log-scale.js +53 -0
- package/dist/features/viz/lib/log-scale.js.map +7 -0
- package/dist/features/viz/lib/monotone-curve.d.ts +11 -0
- package/dist/features/viz/lib/monotone-curve.js +63 -0
- package/dist/features/viz/lib/monotone-curve.js.map +7 -0
- package/dist/features/viz/lib/nearest.d.ts +9 -9
- package/dist/features/viz/lib/nearest.js.map +1 -1
- package/dist/features/viz/lib/numeric-range-interpolation.d.ts +15 -0
- package/dist/features/viz/lib/numeric-range-interpolation.js +36 -0
- package/dist/features/viz/lib/numeric-range-interpolation.js.map +7 -0
- package/dist/features/viz/lib/numeric-ticks.d.ts +38 -0
- package/dist/features/viz/lib/numeric-ticks.js +54 -0
- package/dist/features/viz/lib/numeric-ticks.js.map +7 -0
- package/dist/features/viz/lib/ohlc-bar-series.d.ts +55 -0
- package/dist/features/viz/lib/ohlc-bar-series.js +168 -0
- package/dist/features/viz/lib/ohlc-bar-series.js.map +7 -0
- package/dist/features/viz/lib/paired-series.d.ts +44 -0
- package/dist/features/viz/lib/paired-series.js +93 -0
- package/dist/features/viz/lib/paired-series.js.map +7 -0
- package/dist/features/viz/lib/plot-series.js +11 -6
- package/dist/features/viz/lib/plot-series.js.map +2 -2
- package/dist/features/viz/lib/plot-types.d.ts +4 -3
- package/dist/features/viz/lib/point-scale-component.d.ts +7 -0
- package/dist/features/viz/lib/point-scale-component.js +19 -0
- package/dist/features/viz/lib/point-scale-component.js.map +7 -0
- package/dist/features/viz/lib/point-scale.d.ts +2 -0
- package/dist/features/viz/lib/point-scale.js +45 -0
- package/dist/features/viz/lib/point-scale.js.map +7 -0
- package/dist/features/viz/lib/point-series.d.ts +1 -1
- package/dist/features/viz/lib/point-series.js +36 -9
- package/dist/features/viz/lib/point-series.js.map +2 -2
- package/dist/features/viz/lib/point-types.d.ts +5 -2
- package/dist/features/viz/lib/reference-band.d.ts +16 -0
- package/dist/features/viz/lib/reference-band.js +27 -0
- package/dist/features/viz/lib/reference-band.js.map +7 -0
- package/dist/features/viz/lib/scale-adjust.js +9 -4
- package/dist/features/viz/lib/scale-adjust.js.map +2 -2
- package/dist/features/viz/lib/scale-context.d.ts +5 -4
- package/dist/features/viz/lib/scale-context.js +15 -11
- package/dist/features/viz/lib/scale-context.js.map +2 -2
- package/dist/features/viz/lib/scale-provider.d.ts +2 -0
- package/dist/features/viz/lib/scale-provider.js +13 -0
- package/dist/features/viz/lib/scale-provider.js.map +7 -0
- package/dist/features/viz/lib/scale-ticks.d.ts +5 -0
- package/dist/features/viz/lib/scale-ticks.js +64 -0
- package/dist/features/viz/lib/scale-ticks.js.map +7 -0
- package/dist/features/viz/lib/scale-view.d.ts +4 -0
- package/dist/features/viz/lib/scale-view.js +21 -0
- package/dist/features/viz/lib/scale-view.js.map +7 -0
- package/dist/features/viz/lib/sequential-color-scale.d.ts +11 -0
- package/dist/features/viz/lib/sequential-color-scale.js +49 -0
- package/dist/features/viz/lib/sequential-color-scale.js.map +7 -0
- package/dist/features/viz/lib/series-position.d.ts +12 -0
- package/dist/features/viz/lib/series-position.js +44 -0
- package/dist/features/viz/lib/series-position.js.map +7 -0
- package/dist/features/viz/lib/step-curves.d.ts +19 -0
- package/dist/features/viz/lib/step-curves.js +53 -0
- package/dist/features/viz/lib/step-curves.js.map +7 -0
- package/dist/features/viz/lib/symlog-scale-component.d.ts +7 -0
- package/dist/features/viz/lib/symlog-scale-component.js +19 -0
- package/dist/features/viz/lib/symlog-scale-component.js.map +7 -0
- package/dist/features/viz/lib/symlog-scale.d.ts +2 -0
- package/dist/features/viz/lib/symlog-scale.js +38 -0
- package/dist/features/viz/lib/symlog-scale.js.map +7 -0
- package/dist/features/viz/lib/threshold-color-scale.d.ts +43 -0
- package/dist/features/viz/lib/threshold-color-scale.js +59 -0
- package/dist/features/viz/lib/threshold-color-scale.js.map +7 -0
- package/dist/features/viz/lib/trading-time-mapping.d.ts +32 -0
- package/dist/features/viz/lib/trading-time-mapping.js +89 -0
- package/dist/features/viz/lib/trading-time-mapping.js.map +7 -0
- package/dist/features/viz/lib/trading-time-scale.d.ts +83 -0
- package/dist/features/viz/lib/trading-time-scale.js +96 -0
- package/dist/features/viz/lib/trading-time-scale.js.map +7 -0
- package/dist/features/viz/lib/trajectory-series.d.ts +71 -0
- package/dist/features/viz/lib/trajectory-series.js +111 -0
- package/dist/features/viz/lib/trajectory-series.js.map +7 -0
- package/dist/features/viz/lib/types.d.ts +114 -21
- package/dist/features/viz/lib/use-bar-scale.d.ts +8 -0
- package/dist/features/viz/lib/use-bar-scale.js +9 -0
- package/dist/features/viz/lib/use-bar-scale.js.map +7 -0
- package/dist/features/viz/lib/use-continuous-scale.d.ts +8 -0
- package/dist/features/viz/lib/use-continuous-scale.js +14 -0
- package/dist/features/viz/lib/use-continuous-scale.js.map +7 -0
- package/dist/features/viz/lib/use-linear-scale.d.ts +8 -0
- package/dist/features/viz/lib/use-linear-scale.js +9 -0
- package/dist/features/viz/lib/use-linear-scale.js.map +7 -0
- package/dist/features/viz/lib/use-log-scale.d.ts +8 -0
- package/dist/features/viz/lib/use-log-scale.js +9 -0
- package/dist/features/viz/lib/use-log-scale.js.map +7 -0
- package/dist/features/viz/lib/use-point-scale.d.ts +8 -0
- package/dist/features/viz/lib/use-point-scale.js +9 -0
- package/dist/features/viz/lib/use-point-scale.js.map +7 -0
- package/dist/features/viz/lib/use-symlog-scale.d.ts +8 -0
- package/dist/features/viz/lib/use-symlog-scale.js +9 -0
- package/dist/features/viz/lib/use-symlog-scale.js.map +7 -0
- package/dist/features/viz/lib/use-utc-scale.d.ts +8 -0
- package/dist/features/viz/lib/use-utc-scale.js +9 -0
- package/dist/features/viz/lib/use-utc-scale.js.map +7 -0
- package/dist/features/viz/lib/utc-labels.d.ts +12 -0
- package/dist/features/viz/lib/utc-labels.js +27 -0
- package/dist/features/viz/lib/utc-labels.js.map +7 -0
- package/dist/features/viz/lib/utc-scale-component.d.ts +7 -0
- package/dist/features/viz/lib/utc-scale-component.js +18 -0
- package/dist/features/viz/lib/utc-scale-component.js.map +7 -0
- package/dist/features/viz/lib/utc-scale.d.ts +21 -0
- package/dist/features/viz/lib/utc-scale.js +123 -0
- package/dist/features/viz/lib/utc-scale.js.map +7 -0
- package/dist/features/viz/lib/volume-series.d.ts +59 -0
- package/dist/features/viz/lib/volume-series.js +117 -0
- package/dist/features/viz/lib/volume-series.js.map +7 -0
- package/dist/features/viz/lib/weighted-point-series.d.ts +71 -0
- package/dist/features/viz/lib/weighted-point-series.js +169 -0
- package/dist/features/viz/lib/weighted-point-series.js.map +7 -0
- package/dist/filters/emboss-gpu.d.ts +4 -0
- package/dist/filters/emboss-gpu.js +39 -0
- package/dist/filters/emboss-gpu.js.map +7 -0
- package/dist/filters/emboss.d.ts +32 -0
- package/dist/filters/emboss.js +106 -0
- package/dist/filters/emboss.js.map +7 -0
- package/dist/filters/reflection-gpu.d.ts +3 -1
- package/dist/filters/reflection-gpu.js +5 -2
- package/dist/filters/reflection-gpu.js.map +2 -2
- package/dist/filters/render-emboss-boundary.d.ts +13 -0
- package/dist/filters/render-emboss-boundary.js +131 -0
- package/dist/filters/render-emboss-boundary.js.map +7 -0
- package/dist/filters.d.ts +2 -0
- package/dist/filters.js +2 -0
- package/dist/filters.js.map +2 -2
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +2 -2
- package/dist/internal.d.ts +2 -0
- package/dist/internal.js +4 -0
- package/dist/internal.js.map +2 -2
- package/dist/lib/animation/definition.d.ts +5 -3
- package/dist/lib/animation/definition.js +29 -4
- package/dist/lib/animation/definition.js.map +2 -2
- package/dist/lib/animation/playback.d.ts +8 -0
- package/dist/lib/animation/playback.js +33 -11
- package/dist/lib/animation/playback.js.map +2 -2
- package/dist/lib/animation/spring.d.ts +3 -1
- package/dist/lib/animation/spring.js.map +2 -2
- package/dist/lib/animation/types.d.ts +29 -73
- package/dist/lib/events/event-facade.d.ts +13 -0
- package/dist/lib/events/event-facade.js +23 -0
- package/dist/lib/events/event-facade.js.map +2 -2
- package/dist/lib/events/propagation.js +19 -14
- package/dist/lib/events/propagation.js.map +2 -2
- package/dist/lib/execute-render.js +13 -0
- package/dist/lib/execute-render.js.map +2 -2
- package/dist/lib/hooks/use-animated-value.d.ts +11 -21
- package/dist/lib/hooks/use-animated-value.js +23 -70
- package/dist/lib/hooks/use-animated-value.js.map +3 -3
- package/dist/lib/hooks/use-playback.js +1 -0
- package/dist/lib/hooks/use-playback.js.map +2 -2
- package/dist/lib/recording/recording.d.ts +43 -0
- package/dist/lib/recording/recording.js +555 -0
- package/dist/lib/recording/recording.js.map +7 -0
- package/dist/lib/recording/types.d.ts +118 -0
- package/dist/lib/recording/wasm-bytes.d.ts +1 -0
- package/dist/lib/recording/wasm-bytes.js +5 -0
- package/dist/lib/recording/wasm-bytes.js.map +7 -0
- package/dist/lib/recording/worker-source.d.ts +1 -0
- package/dist/lib/recording/worker-source.js +5 -0
- package/dist/lib/recording/worker-source.js.map +7 -0
- package/dist/lib/render-transaction.d.ts +5 -2
- package/dist/lib/render-transaction.js +23 -1
- package/dist/lib/render-transaction.js.map +2 -2
- package/dist/lib/series-inspection-frame.d.ts +18 -0
- package/dist/lib/series-inspection-frame.js +70 -0
- package/dist/lib/series-inspection-frame.js.map +7 -0
- package/dist/lib/types.d.ts +6 -0
- package/package.json +27 -5
- package/dist/features/viz/lib/scale.d.ts +0 -11
- package/dist/features/viz/lib/scale.js +0 -80
- package/dist/features/viz/lib/scale.js.map +0 -7
- package/dist/features/viz/lib/use-scale.d.ts +0 -20
- package/dist/features/viz/lib/use-scale.js +0 -10
- package/dist/features/viz/lib/use-scale.js.map +0 -7
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import {
|
|
2
|
+
invertNumericPosition
|
|
3
|
+
} from "../lib/series-position.js";
|
|
4
|
+
import { useRenderedRef } from "./owned-ref.js";
|
|
5
|
+
import { nearestRecordedX } from "./queries.js";
|
|
6
|
+
function useVolumeInspection(_inputs) {
|
|
7
|
+
return useRenderedRef("volumeInspection", (candidate, geometry) => {
|
|
8
|
+
const observations = Object.freeze(
|
|
9
|
+
candidate.marks.map(
|
|
10
|
+
(mark) => Object.freeze({
|
|
11
|
+
datum: mark.datum,
|
|
12
|
+
sourceIndex: mark.sourceIndex,
|
|
13
|
+
time: mark.time,
|
|
14
|
+
volume: mark.volume,
|
|
15
|
+
baseline: mark.baseline,
|
|
16
|
+
anchorLocal: mark.anchorLocal,
|
|
17
|
+
anchorRoot: geometry.rootAtLocal(mark.anchorLocal),
|
|
18
|
+
boundsLocal: mark.boundsLocal
|
|
19
|
+
})
|
|
20
|
+
)
|
|
21
|
+
);
|
|
22
|
+
const numeric = Object.freeze({
|
|
23
|
+
observations: Object.freeze(
|
|
24
|
+
observations.map(
|
|
25
|
+
(row) => Object.freeze({
|
|
26
|
+
...row,
|
|
27
|
+
domainX: row.time,
|
|
28
|
+
domainY: row.volume,
|
|
29
|
+
run: 0
|
|
30
|
+
})
|
|
31
|
+
)
|
|
32
|
+
),
|
|
33
|
+
assertLive: geometry.assertLive,
|
|
34
|
+
domainXAtRoot(point) {
|
|
35
|
+
const local = geometry.localAtRoot(point);
|
|
36
|
+
return local ? invertNumericPosition(candidate.xScale, local.x) : void 0;
|
|
37
|
+
},
|
|
38
|
+
anchorInsideClips: geometry.anchorInsideClips,
|
|
39
|
+
anchorAtDomain(point) {
|
|
40
|
+
geometry.assertLive();
|
|
41
|
+
const anchorLocal = Object.freeze({
|
|
42
|
+
x: candidate.xScale.map(point.domainX),
|
|
43
|
+
y: candidate.yScale.map(point.domainY)
|
|
44
|
+
});
|
|
45
|
+
return Object.freeze({
|
|
46
|
+
anchorLocal,
|
|
47
|
+
anchorRoot: geometry.rootAtLocal(anchorLocal)
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
return Object.freeze({
|
|
52
|
+
observations,
|
|
53
|
+
marks: Object.freeze(candidate.marks.slice()),
|
|
54
|
+
numeric,
|
|
55
|
+
assertLive: geometry.assertLive,
|
|
56
|
+
localAtRoot: geometry.localAtRoot,
|
|
57
|
+
anchorInsideClips: geometry.anchorInsideClips,
|
|
58
|
+
timeAtRoot: numeric.domainXAtRoot
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function nearestRecordedVolumeX(rendered, options) {
|
|
63
|
+
const hit = nearestRecordedX(rendered.numeric, {
|
|
64
|
+
domainX: options.time,
|
|
65
|
+
filter: options.filter ? (candidate) => options.filter(
|
|
66
|
+
candidate
|
|
67
|
+
) : void 0
|
|
68
|
+
});
|
|
69
|
+
if (!hit) return void 0;
|
|
70
|
+
const row = rendered.observations.find(
|
|
71
|
+
(row2) => row2.sourceIndex === hit.sourceIndex
|
|
72
|
+
);
|
|
73
|
+
return Object.freeze({ ...row, timeDelta: hit.domainDelta });
|
|
74
|
+
}
|
|
75
|
+
function paintedVolumeAt(rendered, options) {
|
|
76
|
+
rendered.assertLive();
|
|
77
|
+
if (!Number.isFinite(options.rootPoint.x) || !Number.isFinite(options.rootPoint.y))
|
|
78
|
+
throw new RangeError("paintedVolumeAt rootPoint must be finite.");
|
|
79
|
+
const p = rendered.localAtRoot(options.rootPoint);
|
|
80
|
+
if (!p || !rendered.anchorInsideClips(p)) return void 0;
|
|
81
|
+
for (let i = rendered.marks.length - 1; i >= 0; i--) {
|
|
82
|
+
const mark = rendered.marks[i], b = mark.boundsLocal, h = mark.strokeWidthLocal / 2;
|
|
83
|
+
if (b.height === 0) continue;
|
|
84
|
+
const inside = p.x >= b.x && p.x <= b.x + b.width && p.y >= b.y && p.y <= b.y + b.height;
|
|
85
|
+
const outline = h > 0 && p.x >= b.x - h && p.x <= b.x + b.width + h && p.y >= b.y - h && p.y <= b.y + b.height + h && !(p.x > b.x + h && p.x < b.x + b.width - h && p.y > b.y + h && p.y < b.y + b.height - h);
|
|
86
|
+
if (mark.fill && inside || outline) return rendered.observations[i];
|
|
87
|
+
}
|
|
88
|
+
return void 0;
|
|
89
|
+
}
|
|
90
|
+
export {
|
|
91
|
+
nearestRecordedVolumeX,
|
|
92
|
+
paintedVolumeAt,
|
|
93
|
+
useVolumeInspection
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=volume.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/features/viz/inspection/volume.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n invertNumericPosition,\n type NumericPositionScale,\n} from \"../lib/series-position.js\";\nimport type { LayoutBox } from \"@pibbl/core\";\nimport type { VolumeSeriesProps } from \"../lib/volume-series.js\";\nimport type { ResolvedContinuousScale } from \"../lib/types.js\";\nimport type {\n RenderedSeriesPoint,\n NumericRenderedSeries,\n} from \"./query-types.js\";\nimport { useRenderedRef } from \"./owned-ref.js\";\nimport { nearestRecordedX } from \"./queries.js\";\n\n/** One original volume record and the values/geometry evaluated during paint.\n * @see {@link useVolumeInspection}\n */\nexport interface VolumeObservation<D> {\n /** Caller-owned original record. */ readonly datum: D;\n /** Original index including skipped rows. */ readonly sourceIndex: number;\n /** Evaluated UTC milliseconds. */ readonly time: number;\n /** Evaluated nonnegative volume. */ readonly volume: number;\n /** Zero-volume baseline. */ readonly baseline: 0;\n /** Volume endpoint in series-local logical coordinates. */ readonly anchorLocal: Readonly<RenderedSeriesPoint>;\n /** Volume endpoint in root-logical coordinates. */ readonly anchorRoot: Readonly<RenderedSeriesPoint>;\n /** Column bounds in series-local logical coordinates. */ readonly boundsLocal: Readonly<LayoutBox>;\n}\n/** A nearest-time candidate with an explicit optional clip predicate.\n * @see {@link useVolumeInspection}\n */\nexport interface VolumeInspectionCandidate<D> extends VolumeObservation<D> {\n /** @returns Whether the endpoint lies inside every committed clip. */ anchorInsideClips(): boolean;\n}\n/** A recorded volume selected by timestamp proximity.\n * @see {@link useVolumeInspection}\n */\nexport interface NearestVolumeHit<D> extends VolumeObservation<D> {\n /** Absolute UTC-millisecond distance from the requested time. */ readonly timeDelta: number;\n}\n/** A recorded volume whose painted column covers the query point.\n * @see {@link useVolumeInspection}\n */\nexport interface PaintedVolumeHit<D> extends VolumeObservation<D> {}\n/** @internal Immutable local renderer capture, without queries or transformed allocation.\n * @see {@link useVolumeInspection}\n */\nexport interface CapturedVolumeMark<D> extends Omit<\n VolumeObservation<D>,\n \"anchorRoot\"\n> {\n /** Whether the rectangle paints its interior. */ readonly fill: boolean;\n /** Outline width when painted, zero otherwise. */ readonly strokeWidthLocal: number;\n}\n/** Borrowed committed volume values; expires after a new root generation or disposal.\n * @see {@link useVolumeInspection}\n */\nexport interface VolumeRenderedSeries<D> {\n /** Original observations and evaluated values in source order. */ readonly observations: readonly VolumeObservation<D>[];\n /** Throws when borrowed values are stale or disposed. */ assertLive(): void;\n /** Inverts a root-logical point to UTC milliseconds.\n * @param pointRoot - Root-logical Canvas position.\n * @returns Timestamp or undefined for unavailable inversion.\n */ timeAtRoot(pointRoot: Readonly<RenderedSeriesPoint>): number | undefined;\n /** Tests a local point against the committed clip stack.\n * @param pointLocal - Series-local position.\n * @returns Whether every clip includes it.\n */ anchorInsideClips(pointLocal: Readonly<RenderedSeriesPoint>): boolean;\n /** @internal Committed paint flags. */ readonly marks: readonly CapturedVolumeMark<D>[];\n /** @internal Shared numeric query view. */ readonly numeric: NumericRenderedSeries<D>;\n /** @internal Converts root coordinates to local coordinates.\n * @param point - Root-logical position.\n * @returns Local position or undefined for a singular transform.\n */ localAtRoot(\n point: Readonly<RenderedSeriesPoint>,\n ): Readonly<RenderedSeriesPoint> | undefined;\n}\n/** Mount-owned optional volume capture.\n * @see {@link useVolumeInspection}\n */\nexport interface VolumeInspectionRef<D> {\n /** @returns Borrowed committed values, or undefined before paint/after disposal. */ rendered():\n VolumeRenderedSeries<D> | undefined;\n /** @internal Records local values without executing a query.\n * @param input - Immutable local marks and committed time mapping.\n */ capture(input: {\n /** Captured local paint marks. */ marks: readonly CapturedVolumeMark<D>[];\n /** Committed horizontal mapping. */ xScale: NumericPositionScale;\n /** Committed volume mapping. */ yScale: ResolvedContinuousScale;\n }): void;\n}\n/**\n * Creates a stable optional volume receiver without reading data or subscribing.\n * @param _inputs - Data/accessors used only for original datum inference.\n * @returns Ref to pass to exactly one VolumeSeries inspection prop.\n * @see {@link VolumeInspectionRef}\n */\nexport function useVolumeInspection<D>(\n _inputs: Pick<VolumeSeriesProps<D>, \"data\" | \"time\" | \"volume\">,\n): VolumeInspectionRef<D> {\n return useRenderedRef<\n {\n marks: readonly CapturedVolumeMark<D>[];\n xScale: NumericPositionScale;\n yScale: ResolvedContinuousScale;\n },\n VolumeRenderedSeries<D>\n >(\"volumeInspection\", (candidate, geometry) => {\n const observations = Object.freeze(\n candidate.marks.map((mark) =>\n Object.freeze({\n datum: mark.datum,\n sourceIndex: mark.sourceIndex,\n time: mark.time,\n volume: mark.volume,\n baseline: mark.baseline,\n anchorLocal: mark.anchorLocal,\n anchorRoot: geometry.rootAtLocal(mark.anchorLocal),\n boundsLocal: mark.boundsLocal,\n }),\n ),\n );\n const numeric: NumericRenderedSeries<D> = Object.freeze({\n observations: Object.freeze(\n observations.map((row) =>\n Object.freeze({\n ...row,\n domainX: row.time,\n domainY: row.volume,\n run: 0,\n }),\n ),\n ),\n assertLive: geometry.assertLive,\n domainXAtRoot(point: Readonly<RenderedSeriesPoint>) {\n const local = geometry.localAtRoot(point);\n return local\n ? invertNumericPosition(candidate.xScale, local.x)\n : undefined;\n },\n anchorInsideClips: geometry.anchorInsideClips,\n anchorAtDomain(point: Readonly<{ domainX: number; domainY: number }>) {\n geometry.assertLive();\n const anchorLocal = Object.freeze({\n x: candidate.xScale.map(point.domainX),\n y: candidate.yScale.map(point.domainY),\n });\n return Object.freeze({\n anchorLocal,\n anchorRoot: geometry.rootAtLocal(anchorLocal),\n });\n },\n });\n return Object.freeze({\n observations,\n marks: Object.freeze(candidate.marks.slice()),\n numeric,\n assertLive: geometry.assertLive,\n localAtRoot: geometry.localAtRoot,\n anchorInsideClips: geometry.anchorInsideClips,\n timeAtRoot: numeric.domainXAtRoot,\n });\n });\n}\n/**\n * Selects a recorded volume by timestamp; equal distances choose first source index.\n * @param rendered - Borrowed committed volume values.\n * @param options - UTC-millisecond request and optional pure candidate filter.\n * @returns Captured original volume and time delta, or undefined when no candidate survives.\n * @see {@link NearestVolumeHit}\n */\nexport function nearestRecordedVolumeX<D>(\n rendered: VolumeRenderedSeries<D>,\n options: {\n time: number;\n filter?: (observation: VolumeInspectionCandidate<D>) => boolean;\n },\n): NearestVolumeHit<D> | undefined {\n const hit = nearestRecordedX(rendered.numeric, {\n domainX: options.time,\n filter: options.filter\n ? (candidate) =>\n options.filter!(\n candidate as typeof candidate & VolumeInspectionCandidate<D>,\n )\n : undefined,\n });\n if (!hit) return undefined;\n const row = rendered.observations.find(\n (row) => row.sourceIndex === hit.sourceIndex,\n )!;\n return Object.freeze({ ...row, timeDelta: hit.domainDelta });\n}\n/**\n * Finds the last-painted volume column covering a root-logical point.\n * @param rendered - Borrowed committed volume values and paint geometry.\n * @param options - Root-logical point; respects clips, zero height and source paint order.\n * @returns Captured original volume, or undefined for gaps/singular transforms.\n * @see {@link PaintedVolumeHit}\n */\nexport function paintedVolumeAt<D>(\n rendered: VolumeRenderedSeries<D>,\n options: { rootPoint: Readonly<RenderedSeriesPoint> },\n): PaintedVolumeHit<D> | undefined {\n rendered.assertLive();\n if (\n !Number.isFinite(options.rootPoint.x) ||\n !Number.isFinite(options.rootPoint.y)\n )\n throw new RangeError(\"paintedVolumeAt rootPoint must be finite.\");\n const p = rendered.localAtRoot(options.rootPoint);\n if (!p || !rendered.anchorInsideClips(p)) return undefined;\n for (let i = rendered.marks.length - 1; i >= 0; i--) {\n const mark = rendered.marks[i],\n b = mark.boundsLocal,\n h = mark.strokeWidthLocal / 2;\n if (b.height === 0) continue;\n const inside =\n p.x >= b.x && p.x <= b.x + b.width && p.y >= b.y && p.y <= b.y + b.height;\n const outline =\n h > 0 &&\n p.x >= b.x - h &&\n p.x <= b.x + b.width + h &&\n p.y >= b.y - h &&\n p.y <= b.y + b.height + h &&\n !(\n p.x > b.x + h &&\n p.x < b.x + b.width - h &&\n p.y > b.y + h &&\n p.y < b.y + b.height - h\n );\n if ((mark.fill && inside) || outline) return rendered.observations[i];\n }\n return undefined;\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["row"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Optional committed-render inspection. Rendering entries do not import these algorithms. */
|
|
2
|
+
export { useNumericInspection, usePointInspection, } from "./inspection/capture.js";
|
|
3
|
+
export { withInspection } from "./inspection/handler.js";
|
|
4
|
+
export { paintedPointAt } from "./inspection/painted-point.js";
|
|
5
|
+
export { useBarInspection, paintedBarAt } from "./inspection/bar.js";
|
|
6
|
+
export type { BarInspectionRef, BarRenderedSeries, PaintedBarHit, } from "./inspection/bar.js";
|
|
7
|
+
export type { PaintedPointHit } from "./inspection/painted-point.js";
|
|
8
|
+
export type { InspectionContext, InspectionRef } from "./inspection/handler.js";
|
|
9
|
+
export type { NumericInspectionRef, PointInspectionRef, PointRenderedSeries, } from "./inspection/capture-types.js";
|
|
10
|
+
export { nearestRecordedX, nearestRecordedPoint, sampleRecordedX, firstSourceObservation, lastSourceObservation, anchorInsideClips, } from "./inspection/queries.js";
|
|
11
|
+
export type { NumericRenderedSeries, NumericRenderedObservation, RecordedNumericHit, NearestRecordedXHit, NearestRecordedPointHit, RecordedXSample, NumericRenderedFilter, NumericDuplicateResolver, NumericDomainInterpolation, RenderedSeriesPoint, } from "./inspection/query-types.js";
|
|
12
|
+
export type { NumericRenderedSeries as RenderedSeries, InspectionCandidate, NumericRenderedAnchors, } from "./inspection/query-types.js";
|
|
13
|
+
export type { NearestRecordedXOptions, NearestRecordedPointOptions, SampleRecordedXOptions, } from "./inspection/queries.js";
|
|
14
|
+
export { useVolumeInspection, nearestRecordedVolumeX, paintedVolumeAt, } from "./inspection/volume.js";
|
|
15
|
+
export type { VolumeObservation, VolumeInspectionCandidate, NearestVolumeHit, PaintedVolumeHit, VolumeInspectionRef, VolumeRenderedSeries, } from "./inspection/volume.js";
|
|
16
|
+
export { useCandleInspection, nearestRecordedCandleX, paintedCandleAt, } from "./inspection/candle.js";
|
|
17
|
+
export type { CandleObservation, CandleInspectionCandidate, NearestCandleHit, PaintedCandleHit, CandleInspectionRef, CandleRenderedSeries, } from "./inspection/candle.js";
|
|
18
|
+
export { useOhlcBarInspection, nearestRecordedOhlcBarX, paintedOhlcBarAt, } from "./inspection/ohlc-bar.js";
|
|
19
|
+
export type { OhlcBarObservation, OhlcBarInspectionCandidate, NearestOhlcBarHit, PaintedOhlcBarHit, OhlcBarInspectionRef, OhlcBarRenderedSeries, } from "./inspection/ohlc-bar.js";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useNumericInspection,
|
|
3
|
+
usePointInspection
|
|
4
|
+
} from "./inspection/capture.js";
|
|
5
|
+
import { withInspection } from "./inspection/handler.js";
|
|
6
|
+
import { paintedPointAt } from "./inspection/painted-point.js";
|
|
7
|
+
import { useBarInspection, paintedBarAt } from "./inspection/bar.js";
|
|
8
|
+
import {
|
|
9
|
+
nearestRecordedX,
|
|
10
|
+
nearestRecordedPoint,
|
|
11
|
+
sampleRecordedX,
|
|
12
|
+
firstSourceObservation,
|
|
13
|
+
lastSourceObservation,
|
|
14
|
+
anchorInsideClips
|
|
15
|
+
} from "./inspection/queries.js";
|
|
16
|
+
import {
|
|
17
|
+
useVolumeInspection,
|
|
18
|
+
nearestRecordedVolumeX,
|
|
19
|
+
paintedVolumeAt
|
|
20
|
+
} from "./inspection/volume.js";
|
|
21
|
+
import {
|
|
22
|
+
useCandleInspection,
|
|
23
|
+
nearestRecordedCandleX,
|
|
24
|
+
paintedCandleAt
|
|
25
|
+
} from "./inspection/candle.js";
|
|
26
|
+
import {
|
|
27
|
+
useOhlcBarInspection,
|
|
28
|
+
nearestRecordedOhlcBarX,
|
|
29
|
+
paintedOhlcBarAt
|
|
30
|
+
} from "./inspection/ohlc-bar.js";
|
|
31
|
+
export {
|
|
32
|
+
anchorInsideClips,
|
|
33
|
+
firstSourceObservation,
|
|
34
|
+
lastSourceObservation,
|
|
35
|
+
nearestRecordedCandleX,
|
|
36
|
+
nearestRecordedOhlcBarX,
|
|
37
|
+
nearestRecordedPoint,
|
|
38
|
+
nearestRecordedVolumeX,
|
|
39
|
+
nearestRecordedX,
|
|
40
|
+
paintedBarAt,
|
|
41
|
+
paintedCandleAt,
|
|
42
|
+
paintedOhlcBarAt,
|
|
43
|
+
paintedPointAt,
|
|
44
|
+
paintedVolumeAt,
|
|
45
|
+
sampleRecordedX,
|
|
46
|
+
useBarInspection,
|
|
47
|
+
useCandleInspection,
|
|
48
|
+
useNumericInspection,
|
|
49
|
+
useOhlcBarInspection,
|
|
50
|
+
usePointInspection,
|
|
51
|
+
useVolumeInspection,
|
|
52
|
+
withInspection
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=inspection.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/features/viz/inspection.ts"],
|
|
4
|
+
"sourcesContent": ["/** Optional committed-render inspection. Rendering entries do not import these algorithms. */\nexport {\n useNumericInspection,\n usePointInspection,\n} from \"./inspection/capture.js\";\nexport { withInspection } from \"./inspection/handler.js\";\nexport { paintedPointAt } from \"./inspection/painted-point.js\";\nexport { useBarInspection, paintedBarAt } from \"./inspection/bar.js\";\nexport type {\n BarInspectionRef,\n BarRenderedSeries,\n PaintedBarHit,\n} from \"./inspection/bar.js\";\nexport type { PaintedPointHit } from \"./inspection/painted-point.js\";\nexport type { InspectionContext, InspectionRef } from \"./inspection/handler.js\";\nexport type {\n NumericInspectionRef,\n PointInspectionRef,\n PointRenderedSeries,\n} from \"./inspection/capture-types.js\";\nexport {\n nearestRecordedX,\n nearestRecordedPoint,\n sampleRecordedX,\n firstSourceObservation,\n lastSourceObservation,\n anchorInsideClips,\n} from \"./inspection/queries.js\";\nexport type {\n NumericRenderedSeries,\n NumericRenderedObservation,\n RecordedNumericHit,\n NearestRecordedXHit,\n NearestRecordedPointHit,\n RecordedXSample,\n NumericRenderedFilter,\n NumericDuplicateResolver,\n NumericDomainInterpolation,\n RenderedSeriesPoint,\n} from \"./inspection/query-types.js\";\n\nexport type {\n NumericRenderedSeries as RenderedSeries,\n InspectionCandidate,\n NumericRenderedAnchors,\n} from \"./inspection/query-types.js\";\nexport type {\n NearestRecordedXOptions,\n NearestRecordedPointOptions,\n SampleRecordedXOptions,\n} from \"./inspection/queries.js\";\nexport {\n useVolumeInspection,\n nearestRecordedVolumeX,\n paintedVolumeAt,\n} from \"./inspection/volume.js\";\nexport type {\n VolumeObservation,\n VolumeInspectionCandidate,\n NearestVolumeHit,\n PaintedVolumeHit,\n VolumeInspectionRef,\n VolumeRenderedSeries,\n} from \"./inspection/volume.js\";\nexport {\n useCandleInspection,\n nearestRecordedCandleX,\n paintedCandleAt,\n} from \"./inspection/candle.js\";\nexport type {\n CandleObservation,\n CandleInspectionCandidate,\n NearestCandleHit,\n PaintedCandleHit,\n CandleInspectionRef,\n CandleRenderedSeries,\n} from \"./inspection/candle.js\";\nexport {\n useOhlcBarInspection,\n nearestRecordedOhlcBarX,\n paintedOhlcBarAt,\n} from \"./inspection/ohlc-bar.js\";\nexport type {\n OhlcBarObservation,\n OhlcBarInspectionCandidate,\n NearestOhlcBarHit,\n PaintedOhlcBarHit,\n OhlcBarInspectionRef,\n OhlcBarRenderedSeries,\n} from \"./inspection/ohlc-bar.js\";\n"],
|
|
5
|
+
"mappings": "AACA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB,oBAAoB;AAa/C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAwBP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AASP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AASP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './inspection.js';
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { Path } from "@pibbl/core";
|
|
2
|
+
import type { FillStyle, PibblEventHandlers, PibblEventParticipationOptions, SignalValue } from "@pibbl/core";
|
|
3
|
+
import type { SignalStyle } from "@pibbl/core/internal";
|
|
4
|
+
import type { LineAccessor, LineSeriesProps } from "./types.js";
|
|
5
|
+
/**
|
|
6
|
+
* Presentation properties for an {@link AreaSeries}.
|
|
7
|
+
*
|
|
8
|
+
* @see {@link FillStyle}
|
|
9
|
+
* @see {@link AreaSeriesProps}
|
|
10
|
+
*/
|
|
11
|
+
export interface AreaSeriesStyle {
|
|
12
|
+
/** Paint used for the area interior. */
|
|
13
|
+
readonly fill?: FillStyle;
|
|
14
|
+
/** Opacity of the painted area, from zero through one. */
|
|
15
|
+
readonly opacity?: number;
|
|
16
|
+
/** Cursor shown while the area target owns pointer presentation. */
|
|
17
|
+
readonly cursor?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Authored inputs for {@link AreaSeries}.
|
|
21
|
+
*
|
|
22
|
+
* The data, coordinate accessors, scales, and defined predicate use the same
|
|
23
|
+
* contract as {@link LineSeriesProps}. Each contiguous run of at least two
|
|
24
|
+
* valid observations is closed to `baseline` in data space.
|
|
25
|
+
*
|
|
26
|
+
* @see {@link LineSeriesProps}
|
|
27
|
+
* @see {@link AreaSeriesStyle}
|
|
28
|
+
*/
|
|
29
|
+
export interface AreaSeriesProps<D> extends PibblEventHandlers, PibblEventParticipationOptions {
|
|
30
|
+
/** Application data supplied directly or through a signal. */
|
|
31
|
+
readonly data: LineSeriesProps<D>["data"];
|
|
32
|
+
/** Property key or callback extracting the horizontal coordinate. */
|
|
33
|
+
readonly x: LineAccessor<D>;
|
|
34
|
+
/** Property key or callback extracting the vertical coordinate. */
|
|
35
|
+
readonly y: LineAccessor<D>;
|
|
36
|
+
/** Continuous scale used to map horizontal data coordinates. */
|
|
37
|
+
readonly xScale: LineSeriesProps<D>["xScale"];
|
|
38
|
+
/** Continuous scale used to map vertical data coordinates and baseline. */
|
|
39
|
+
readonly yScale: LineSeriesProps<D>["yScale"];
|
|
40
|
+
/** Selects records that participate in an observed run. */
|
|
41
|
+
readonly defined?: LineSeriesProps<D>["defined"];
|
|
42
|
+
/** Curve used to connect successive observed samples. */
|
|
43
|
+
readonly curve?: LineSeriesProps<D>["curve"];
|
|
44
|
+
/** Finite data-space value to which each observed run closes. */
|
|
45
|
+
readonly baseline: SignalValue<number>;
|
|
46
|
+
/** Shared area presentation. Individual datum styling is not supported. */
|
|
47
|
+
readonly style?: SignalValue<SignalStyle<AreaSeriesStyle>>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Draws each contiguous observed run as a filled polygon closed to an explicit baseline.
|
|
51
|
+
*
|
|
52
|
+
* Missing, non-finite, and excluded coordinates split runs. A lone observation has no area.
|
|
53
|
+
* The component owns one ordinary {@link Path} target, so event participation follows the
|
|
54
|
+
* standard Path defaults; callers may wrap it in `Clip` when clipping is needed.
|
|
55
|
+
*
|
|
56
|
+
* @param props - Data, coordinate accessors, continuous scales, baseline, and presentation.
|
|
57
|
+
* @returns A Pibbl path node containing all drawable area runs.
|
|
58
|
+
* @throws When `data` is not an array, the baseline is not finite, or presentation is invalid.
|
|
59
|
+
*
|
|
60
|
+
* @see {@link AreaSeriesProps}
|
|
61
|
+
*/
|
|
62
|
+
export declare function AreaSeries<D>({ data: dataInput, x: xInput, y: yInput, xScale: xId, yScale: yId, baseline: baselineInput, defined, curve, style: styleInput, ...eventProps }: AreaSeriesProps<D>): import("../../../jsx-runtime.js").JSX.Element;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { jsx } from "@pibbl/core/jsx-runtime";
|
|
2
|
+
import { useNumericPosition } from "./series-position.js";
|
|
3
|
+
import { Path, resolveSignalValue } from "@pibbl/core";
|
|
4
|
+
import {
|
|
5
|
+
useInternalValueMemoSlot,
|
|
6
|
+
validateTexturePaint
|
|
7
|
+
} from "@pibbl/core/internal";
|
|
8
|
+
import {
|
|
9
|
+
appendCurveForward,
|
|
10
|
+
curveGeometry,
|
|
11
|
+
resolveSeriesCurve
|
|
12
|
+
} from "./curve-definition.js";
|
|
13
|
+
import { opacity } from "./paint.js";
|
|
14
|
+
import { useContinuousScale } from "./use-continuous-scale.js";
|
|
15
|
+
function accessor(input) {
|
|
16
|
+
return typeof input === "function" ? input : (datum) => datum[input];
|
|
17
|
+
}
|
|
18
|
+
function fill(value) {
|
|
19
|
+
if (typeof value === "string" || value instanceof CanvasGradient || value instanceof CanvasPattern)
|
|
20
|
+
return value;
|
|
21
|
+
try {
|
|
22
|
+
validateTexturePaint(value);
|
|
23
|
+
return value;
|
|
24
|
+
} catch {
|
|
25
|
+
throw new TypeError("AreaSeries: invalid fill.");
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function AreaSeries({
|
|
29
|
+
data: dataInput,
|
|
30
|
+
x: xInput,
|
|
31
|
+
y: yInput,
|
|
32
|
+
xScale: xId,
|
|
33
|
+
yScale: yId,
|
|
34
|
+
baseline: baselineInput,
|
|
35
|
+
defined,
|
|
36
|
+
curve,
|
|
37
|
+
style: styleInput,
|
|
38
|
+
...eventProps
|
|
39
|
+
}) {
|
|
40
|
+
const xScale = useNumericPosition(xId);
|
|
41
|
+
const yScale = useContinuousScale(yId).get();
|
|
42
|
+
const curveDefinition = resolveSeriesCurve(curve);
|
|
43
|
+
const x = useInternalValueMemoSlot(
|
|
44
|
+
"vizAreaXAccessor",
|
|
45
|
+
() => accessor(xInput),
|
|
46
|
+
[xInput]
|
|
47
|
+
);
|
|
48
|
+
const y = useInternalValueMemoSlot(
|
|
49
|
+
"vizAreaYAccessor",
|
|
50
|
+
() => accessor(yInput),
|
|
51
|
+
[yInput]
|
|
52
|
+
);
|
|
53
|
+
const data = resolveSignalValue(dataInput);
|
|
54
|
+
if (!Array.isArray(data))
|
|
55
|
+
throw new TypeError(
|
|
56
|
+
"AreaSeries data must be an array or a signal containing an array."
|
|
57
|
+
);
|
|
58
|
+
const baseline = resolveSignalValue(baselineInput);
|
|
59
|
+
if (typeof baseline !== "number" || !Number.isFinite(baseline))
|
|
60
|
+
throw new RangeError("AreaSeries baseline must be finite.");
|
|
61
|
+
const baselineY = yScale.map(baseline);
|
|
62
|
+
if (!Number.isFinite(baselineY))
|
|
63
|
+
throw new RangeError(
|
|
64
|
+
"AreaSeries baseline must map to a finite coordinate."
|
|
65
|
+
);
|
|
66
|
+
const style = resolveSignalValue(styleInput) ?? {};
|
|
67
|
+
if (style === null || typeof style !== "object" || Array.isArray(style))
|
|
68
|
+
throw new TypeError("AreaSeries: style must be an object.");
|
|
69
|
+
const areaFill = fill(resolveSignalValue(style.fill) ?? "#2563eb");
|
|
70
|
+
const alpha = opacity(resolveSignalValue(style.opacity) ?? 0.2, "AreaSeries");
|
|
71
|
+
const cursor = resolveSignalValue(style.cursor);
|
|
72
|
+
if (cursor !== void 0 && typeof cursor !== "string")
|
|
73
|
+
throw new TypeError("AreaSeries: cursor must be a string.");
|
|
74
|
+
const path = new Path2D();
|
|
75
|
+
let run = [];
|
|
76
|
+
const closeRun = () => {
|
|
77
|
+
if (run.length >= 2) {
|
|
78
|
+
const first = run[0];
|
|
79
|
+
const last = run[run.length - 1];
|
|
80
|
+
const geometry = curveGeometry(curveDefinition, run);
|
|
81
|
+
path.moveTo(geometry.start[0], geometry.start[1]);
|
|
82
|
+
appendCurveForward(path, geometry);
|
|
83
|
+
path.lineTo(last[0], baselineY);
|
|
84
|
+
path.lineTo(first[0], baselineY);
|
|
85
|
+
path.closePath();
|
|
86
|
+
}
|
|
87
|
+
run = [];
|
|
88
|
+
};
|
|
89
|
+
for (let i = 0; i < data.length; i++) {
|
|
90
|
+
const datum = data[i];
|
|
91
|
+
if (defined && !defined(datum, i, data)) {
|
|
92
|
+
closeRun();
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
const xv = x(datum, i, data);
|
|
96
|
+
const yv = y(datum, i, data);
|
|
97
|
+
if (typeof xv !== "number" || typeof yv !== "number" || !Number.isFinite(xv) || !Number.isFinite(yv)) {
|
|
98
|
+
closeRun();
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
const point = [xScale.map(xv), yScale.map(yv)];
|
|
102
|
+
if (!Number.isFinite(point[0]) || !Number.isFinite(point[1])) {
|
|
103
|
+
closeRun();
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
run.push(point);
|
|
107
|
+
}
|
|
108
|
+
closeRun();
|
|
109
|
+
return /* @__PURE__ */ jsx(
|
|
110
|
+
Path,
|
|
111
|
+
{
|
|
112
|
+
...eventProps,
|
|
113
|
+
style: { d: path, fill: areaFill, opacity: alpha, cursor }
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
export {
|
|
118
|
+
AreaSeries
|
|
119
|
+
};
|
|
120
|
+
//# sourceMappingURL=area-series.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/features/viz/lib/area-series.tsx"],
|
|
4
|
+
"sourcesContent": ["import { useNumericPosition } from \"./series-position.js\";\nimport { Path, resolveSignalValue } from \"@pibbl/core\";\nimport type {\n FillStyle,\n PibblEventHandlers,\n PibblEventParticipationOptions,\n SignalValue,\n} from \"@pibbl/core\";\nimport {\n useInternalValueMemoSlot,\n validateTexturePaint,\n} from \"@pibbl/core/internal\";\nimport type { SignalStyle } from \"@pibbl/core/internal\";\nimport type { LineAccessor, LineCoordinate, LineSeriesProps } from \"./types.js\";\nimport {\n appendCurveForward,\n curveGeometry,\n resolveSeriesCurve,\n} from \"./curve-definition.js\";\nimport { opacity } from \"./paint.js\";\nimport { useContinuousScale } from \"./use-continuous-scale.js\";\n\n/**\n * Presentation properties for an {@link AreaSeries}.\n *\n * @see {@link FillStyle}\n * @see {@link AreaSeriesProps}\n */\nexport interface AreaSeriesStyle {\n /** Paint used for the area interior. */\n readonly fill?: FillStyle;\n /** Opacity of the painted area, from zero through one. */\n readonly opacity?: number;\n /** Cursor shown while the area target owns pointer presentation. */\n readonly cursor?: string;\n}\n\n/**\n * Authored inputs for {@link AreaSeries}.\n *\n * The data, coordinate accessors, scales, and defined predicate use the same\n * contract as {@link LineSeriesProps}. Each contiguous run of at least two\n * valid observations is closed to `baseline` in data space.\n *\n * @see {@link LineSeriesProps}\n * @see {@link AreaSeriesStyle}\n */\nexport interface AreaSeriesProps<D>\n extends PibblEventHandlers, PibblEventParticipationOptions {\n /** Application data supplied directly or through a signal. */\n readonly data: LineSeriesProps<D>[\"data\"];\n /** Property key or callback extracting the horizontal coordinate. */\n readonly x: LineAccessor<D>;\n /** Property key or callback extracting the vertical coordinate. */\n readonly y: LineAccessor<D>;\n /** Continuous scale used to map horizontal data coordinates. */\n readonly xScale: LineSeriesProps<D>[\"xScale\"];\n /** Continuous scale used to map vertical data coordinates and baseline. */\n readonly yScale: LineSeriesProps<D>[\"yScale\"];\n /** Selects records that participate in an observed run. */\n readonly defined?: LineSeriesProps<D>[\"defined\"];\n /** Curve used to connect successive observed samples. */\n readonly curve?: LineSeriesProps<D>[\"curve\"];\n /** Finite data-space value to which each observed run closes. */\n readonly baseline: SignalValue<number>;\n /** Shared area presentation. Individual datum styling is not supported. */\n readonly style?: SignalValue<SignalStyle<AreaSeriesStyle>>;\n}\n\nfunction accessor<D>(\n input: LineAccessor<D>,\n): (datum: D, index: number, data: readonly D[]) => LineCoordinate {\n return typeof input === \"function\"\n ? input\n : (datum) => datum[input] as LineCoordinate;\n}\n\nfunction fill(value: unknown): FillStyle {\n if (\n typeof value === \"string\" ||\n value instanceof CanvasGradient ||\n value instanceof CanvasPattern\n )\n return value;\n try {\n validateTexturePaint(value as never);\n return value as FillStyle;\n } catch {\n throw new TypeError(\"AreaSeries: invalid fill.\");\n }\n}\n\n/**\n * Draws each contiguous observed run as a filled polygon closed to an explicit baseline.\n *\n * Missing, non-finite, and excluded coordinates split runs. A lone observation has no area.\n * The component owns one ordinary {@link Path} target, so event participation follows the\n * standard Path defaults; callers may wrap it in `Clip` when clipping is needed.\n *\n * @param props - Data, coordinate accessors, continuous scales, baseline, and presentation.\n * @returns A Pibbl path node containing all drawable area runs.\n * @throws When `data` is not an array, the baseline is not finite, or presentation is invalid.\n *\n * @see {@link AreaSeriesProps}\n */\nexport function AreaSeries<D>({\n data: dataInput,\n x: xInput,\n y: yInput,\n xScale: xId,\n yScale: yId,\n baseline: baselineInput,\n defined,\n curve,\n style: styleInput,\n ...eventProps\n}: AreaSeriesProps<D>) {\n const xScale = useNumericPosition(xId);\n const yScale = useContinuousScale(yId).get();\n const curveDefinition = resolveSeriesCurve(curve);\n const x = useInternalValueMemoSlot(\n \"vizAreaXAccessor\",\n () => accessor(xInput),\n [xInput],\n );\n const y = useInternalValueMemoSlot(\n \"vizAreaYAccessor\",\n () => accessor(yInput),\n [yInput],\n );\n const data = resolveSignalValue(dataInput);\n if (!Array.isArray(data))\n throw new TypeError(\n \"AreaSeries data must be an array or a signal containing an array.\",\n );\n const baseline = resolveSignalValue(baselineInput);\n if (typeof baseline !== \"number\" || !Number.isFinite(baseline))\n throw new RangeError(\"AreaSeries baseline must be finite.\");\n const baselineY = yScale.map(baseline);\n if (!Number.isFinite(baselineY))\n throw new RangeError(\n \"AreaSeries baseline must map to a finite coordinate.\",\n );\n const style = resolveSignalValue(styleInput) ?? {};\n if (style === null || typeof style !== \"object\" || Array.isArray(style))\n throw new TypeError(\"AreaSeries: style must be an object.\");\n const areaFill = fill(resolveSignalValue(style.fill) ?? \"#2563eb\");\n const alpha = opacity(resolveSignalValue(style.opacity) ?? 0.2, \"AreaSeries\");\n const cursor = resolveSignalValue(style.cursor);\n if (cursor !== undefined && typeof cursor !== \"string\")\n throw new TypeError(\"AreaSeries: cursor must be a string.\");\n\n const path = new Path2D();\n let run: (readonly [number, number])[] = [];\n const closeRun = () => {\n if (run.length >= 2) {\n const first = run[0];\n const last = run[run.length - 1];\n const geometry = curveGeometry(curveDefinition, run);\n path.moveTo(geometry.start[0], geometry.start[1]);\n appendCurveForward(path, geometry);\n path.lineTo(last[0], baselineY);\n path.lineTo(first[0], baselineY);\n path.closePath();\n }\n run = [];\n };\n for (let i = 0; i < data.length; i++) {\n const datum = data[i];\n if (defined && !defined(datum, i, data)) {\n closeRun();\n continue;\n }\n const xv = x(datum, i, data);\n const yv = y(datum, i, data);\n if (\n typeof xv !== \"number\" ||\n typeof yv !== \"number\" ||\n !Number.isFinite(xv) ||\n !Number.isFinite(yv)\n ) {\n closeRun();\n continue;\n }\n const point = [xScale.map(xv), yScale.map(yv)] as const;\n if (!Number.isFinite(point[0]) || !Number.isFinite(point[1])) {\n closeRun();\n continue;\n }\n run.push(point);\n }\n closeRun();\n return (\n <Path\n {...eventProps}\n style={{ d: path, fill: areaFill, opacity: alpha, cursor }}\n />\n );\n}\n"],
|
|
5
|
+
"mappings": "AAiMI;AAjMJ,SAAS,0BAA0B;AACnC,SAAS,MAAM,0BAA0B;AAOzC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAGP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,eAAe;AACxB,SAAS,0BAA0B;AAiDnC,SAAS,SACP,OACiE;AACjE,SAAO,OAAO,UAAU,aACpB,QACA,CAAC,UAAU,MAAM,KAAK;AAC5B;AAEA,SAAS,KAAK,OAA2B;AACvC,MACE,OAAO,UAAU,YACjB,iBAAiB,kBACjB,iBAAiB;AAEjB,WAAO;AACT,MAAI;AACF,yBAAqB,KAAc;AACnC,WAAO;AAAA,EACT,QAAQ;AACN,UAAM,IAAI,UAAU,2BAA2B;AAAA,EACjD;AACF;AAeO,SAAS,WAAc;AAAA,EAC5B,MAAM;AAAA,EACN,GAAG;AAAA,EACH,GAAG;AAAA,EACH,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,GAAG;AACL,GAAuB;AACrB,QAAM,SAAS,mBAAmB,GAAG;AACrC,QAAM,SAAS,mBAAmB,GAAG,EAAE,IAAI;AAC3C,QAAM,kBAAkB,mBAAmB,KAAK;AAChD,QAAM,IAAI;AAAA,IACR;AAAA,IACA,MAAM,SAAS,MAAM;AAAA,IACrB,CAAC,MAAM;AAAA,EACT;AACA,QAAM,IAAI;AAAA,IACR;AAAA,IACA,MAAM,SAAS,MAAM;AAAA,IACrB,CAAC,MAAM;AAAA,EACT;AACA,QAAM,OAAO,mBAAmB,SAAS;AACzC,MAAI,CAAC,MAAM,QAAQ,IAAI;AACrB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AACF,QAAM,WAAW,mBAAmB,aAAa;AACjD,MAAI,OAAO,aAAa,YAAY,CAAC,OAAO,SAAS,QAAQ;AAC3D,UAAM,IAAI,WAAW,qCAAqC;AAC5D,QAAM,YAAY,OAAO,IAAI,QAAQ;AACrC,MAAI,CAAC,OAAO,SAAS,SAAS;AAC5B,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AACF,QAAM,QAAQ,mBAAmB,UAAU,KAAK,CAAC;AACjD,MAAI,UAAU,QAAQ,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAK;AACpE,UAAM,IAAI,UAAU,sCAAsC;AAC5D,QAAM,WAAW,KAAK,mBAAmB,MAAM,IAAI,KAAK,SAAS;AACjE,QAAM,QAAQ,QAAQ,mBAAmB,MAAM,OAAO,KAAK,KAAK,YAAY;AAC5E,QAAM,SAAS,mBAAmB,MAAM,MAAM;AAC9C,MAAI,WAAW,UAAa,OAAO,WAAW;AAC5C,UAAM,IAAI,UAAU,sCAAsC;AAE5D,QAAM,OAAO,IAAI,OAAO;AACxB,MAAI,MAAqC,CAAC;AAC1C,QAAM,WAAW,MAAM;AACrB,QAAI,IAAI,UAAU,GAAG;AACnB,YAAM,QAAQ,IAAI,CAAC;AACnB,YAAM,OAAO,IAAI,IAAI,SAAS,CAAC;AAC/B,YAAM,WAAW,cAAc,iBAAiB,GAAG;AACnD,WAAK,OAAO,SAAS,MAAM,CAAC,GAAG,SAAS,MAAM,CAAC,CAAC;AAChD,yBAAmB,MAAM,QAAQ;AACjC,WAAK,OAAO,KAAK,CAAC,GAAG,SAAS;AAC9B,WAAK,OAAO,MAAM,CAAC,GAAG,SAAS;AAC/B,WAAK,UAAU;AAAA,IACjB;AACA,UAAM,CAAC;AAAA,EACT;AACA,WAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,UAAM,QAAQ,KAAK,CAAC;AACpB,QAAI,WAAW,CAAC,QAAQ,OAAO,GAAG,IAAI,GAAG;AACvC,eAAS;AACT;AAAA,IACF;AACA,UAAM,KAAK,EAAE,OAAO,GAAG,IAAI;AAC3B,UAAM,KAAK,EAAE,OAAO,GAAG,IAAI;AAC3B,QACE,OAAO,OAAO,YACd,OAAO,OAAO,YACd,CAAC,OAAO,SAAS,EAAE,KACnB,CAAC,OAAO,SAAS,EAAE,GACnB;AACA,eAAS;AACT;AAAA,IACF;AACA,UAAM,QAAQ,CAAC,OAAO,IAAI,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;AAC7C,QAAI,CAAC,OAAO,SAAS,MAAM,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,MAAM,CAAC,CAAC,GAAG;AAC5D,eAAS;AACT;AAAA,IACF;AACA,QAAI,KAAK,KAAK;AAAA,EAChB;AACA,WAAS;AACT,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,OAAO,EAAE,GAAG,MAAM,MAAM,UAAU,SAAS,OAAO,OAAO;AAAA;AAAA,EAC3D;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
function fitAxisLabel(context, text, maxWidth, overflow, maxLines) {
|
|
2
|
+
if (overflow === "allow") return [text];
|
|
3
|
+
const graphemes = (value) => Array.from(new Intl.Segmenter(void 0, { granularity: "grapheme" }).segment(value), (part) => part.segment);
|
|
4
|
+
const truncate = (value, force = false) => {
|
|
5
|
+
if (!force && context.measureText(value).width <= maxWidth) return value;
|
|
6
|
+
if (context.measureText("\u2026").width > maxWidth) return "";
|
|
7
|
+
const parts = graphemes(value);
|
|
8
|
+
while (parts.length && context.measureText(parts.join("").trimEnd() + "\u2026").width > maxWidth) parts.pop();
|
|
9
|
+
return parts.join("").trimEnd() + "\u2026";
|
|
10
|
+
};
|
|
11
|
+
if (overflow === "truncate") return [truncate(text)];
|
|
12
|
+
const words = text.trim().split(/\s+/u);
|
|
13
|
+
const lines = [];
|
|
14
|
+
let line = "";
|
|
15
|
+
for (const word of words) {
|
|
16
|
+
const joined = line ? `${line} ${word}` : word;
|
|
17
|
+
if (context.measureText(joined).width <= maxWidth) {
|
|
18
|
+
line = joined;
|
|
19
|
+
continue;
|
|
20
|
+
}
|
|
21
|
+
if (line) {
|
|
22
|
+
lines.push(line);
|
|
23
|
+
line = "";
|
|
24
|
+
}
|
|
25
|
+
for (const part of graphemes(word)) {
|
|
26
|
+
if (line && context.measureText(line + part).width > maxWidth) {
|
|
27
|
+
lines.push(line);
|
|
28
|
+
line = "";
|
|
29
|
+
}
|
|
30
|
+
line += part;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (line || !lines.length) lines.push(line);
|
|
34
|
+
const fitted = lines.slice(0, maxLines).map((value) => truncate(value));
|
|
35
|
+
if (lines.length > maxLines) fitted[maxLines - 1] = truncate(fitted[maxLines - 1], true);
|
|
36
|
+
return fitted;
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
fitAxisLabel
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=axis-labels.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/features/viz/lib/axis-labels.ts"],
|
|
4
|
+
"sourcesContent": ["/** Fit text without changing its coordinate or the owning scale. */\nexport function fitAxisLabel(context: Pick<CanvasRenderingContext2D, \"measureText\">, text: string, maxWidth: number, overflow: \"allow\" | \"wrap\" | \"truncate\", maxLines: number): readonly string[] {\n if (overflow === \"allow\") return [text];\n const graphemes = (value: string) => Array.from(new Intl.Segmenter(undefined, { granularity: \"grapheme\" }).segment(value), part => part.segment);\n const truncate = (value: string, force = false) => {\n if (!force && context.measureText(value).width <= maxWidth) return value;\n if (context.measureText(\"\u2026\").width > maxWidth) return \"\";\n const parts = graphemes(value);\n while (parts.length && context.measureText(parts.join(\"\").trimEnd() + \"\u2026\").width > maxWidth) parts.pop();\n return parts.join(\"\").trimEnd() + \"\u2026\";\n };\n if (overflow === \"truncate\") return [truncate(text)];\n const words = text.trim().split(/\\s+/u);\n const lines: string[] = [];\n let line = \"\";\n for (const word of words) {\n const joined = line ? `${line} ${word}` : word;\n if (context.measureText(joined).width <= maxWidth) { line = joined; continue; }\n if (line) { lines.push(line); line = \"\"; }\n for (const part of graphemes(word)) {\n if (line && context.measureText(line + part).width > maxWidth) { lines.push(line); line = \"\"; }\n line += part;\n }\n }\n if (line || !lines.length) lines.push(line);\n const fitted = lines.slice(0, maxLines).map(value => truncate(value));\n if (lines.length > maxLines) fitted[maxLines - 1] = truncate(fitted[maxLines - 1], true);\n return fitted;\n}\n"],
|
|
5
|
+
"mappings": "AACO,SAAS,aAAa,SAAwD,MAAc,UAAkB,UAAyC,UAAqC;AACjM,MAAI,aAAa,QAAS,QAAO,CAAC,IAAI;AACtC,QAAM,YAAY,CAAC,UAAkB,MAAM,KAAK,IAAI,KAAK,UAAU,QAAW,EAAE,aAAa,WAAW,CAAC,EAAE,QAAQ,KAAK,GAAG,UAAQ,KAAK,OAAO;AAC/I,QAAM,WAAW,CAAC,OAAe,QAAQ,UAAU;AACjD,QAAI,CAAC,SAAS,QAAQ,YAAY,KAAK,EAAE,SAAS,SAAU,QAAO;AACnE,QAAI,QAAQ,YAAY,QAAG,EAAE,QAAQ,SAAU,QAAO;AACtD,UAAM,QAAQ,UAAU,KAAK;AAC7B,WAAO,MAAM,UAAU,QAAQ,YAAY,MAAM,KAAK,EAAE,EAAE,QAAQ,IAAI,QAAG,EAAE,QAAQ,SAAU,OAAM,IAAI;AACvG,WAAO,MAAM,KAAK,EAAE,EAAE,QAAQ,IAAI;AAAA,EACpC;AACA,MAAI,aAAa,WAAY,QAAO,CAAC,SAAS,IAAI,CAAC;AACnD,QAAM,QAAQ,KAAK,KAAK,EAAE,MAAM,MAAM;AACtC,QAAM,QAAkB,CAAC;AACzB,MAAI,OAAO;AACX,aAAW,QAAQ,OAAO;AACxB,UAAM,SAAS,OAAO,GAAG,IAAI,IAAI,IAAI,KAAK;AAC1C,QAAI,QAAQ,YAAY,MAAM,EAAE,SAAS,UAAU;AAAE,aAAO;AAAQ;AAAA,IAAU;AAC9E,QAAI,MAAM;AAAE,YAAM,KAAK,IAAI;AAAG,aAAO;AAAA,IAAI;AACzC,eAAW,QAAQ,UAAU,IAAI,GAAG;AAClC,UAAI,QAAQ,QAAQ,YAAY,OAAO,IAAI,EAAE,QAAQ,UAAU;AAAE,cAAM,KAAK,IAAI;AAAG,eAAO;AAAA,MAAI;AAC9F,cAAQ;AAAA,IACV;AAAA,EACF;AACA,MAAI,QAAQ,CAAC,MAAM,OAAQ,OAAM,KAAK,IAAI;AAC1C,QAAM,SAAS,MAAM,MAAM,GAAG,QAAQ,EAAE,IAAI,WAAS,SAAS,KAAK,CAAC;AACpE,MAAI,MAAM,SAAS,SAAU,QAAO,WAAW,CAAC,IAAI,SAAS,OAAO,WAAW,CAAC,GAAG,IAAI;AACvF,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type SignalValue } from "@pibbl/core";
|
|
2
|
+
import type { SignalStyle } from "@pibbl/core/internal";
|
|
3
|
+
import type { AxisProps, AxisStyle, ScaleId } from "./types.js";
|
|
4
|
+
/** Scale-aligned axis text; callers reserve the margin outside the plot. See {@link AxisTitle}. */
|
|
5
|
+
export interface AxisTitleProps {
|
|
6
|
+
/** Ancestor scale whose range supplies the title midpoint. */
|
|
7
|
+
readonly scale: ScaleId;
|
|
8
|
+
/** Plot edge; left/right titles rotate along the axis. */
|
|
9
|
+
readonly position: AxisProps["position"];
|
|
10
|
+
/** Single-line title. */
|
|
11
|
+
readonly label: SignalValue<string>;
|
|
12
|
+
/** Optional unit appended in parentheses; empty string omits it. */
|
|
13
|
+
readonly unit?: SignalValue<string>;
|
|
14
|
+
/** Nonnegative finite distance outside the plot edge, default 40 pixels. */
|
|
15
|
+
readonly offset?: SignalValue<number>;
|
|
16
|
+
/** Font defaults to 12px sans-serif, fill to #617783, opacity to 1. */
|
|
17
|
+
readonly style?: SignalValue<SignalStyle<Pick<AxisStyle, "font" | "fill" | "opacity">>>;
|
|
18
|
+
}
|
|
19
|
+
/** Paint an axis title with optional units, without allocating margins or changing ticks.
|
|
20
|
+
* @param props - Scale geometry and presentation. See {@link AxisTitleProps}.
|
|
21
|
+
* @returns Decorative chart content in the caller's coordinate space.
|
|
22
|
+
*/
|
|
23
|
+
export declare function AxisTitle(props: AxisTitleProps): import("../../../jsx-runtime.js").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx } from "@pibbl/core/jsx-runtime";
|
|
2
|
+
import { Group, Text, resolveSignalValue } from "@pibbl/core";
|
|
3
|
+
import { lookupScale } from "./scale-context.js";
|
|
4
|
+
import { opacity } from "./paint.js";
|
|
5
|
+
function AxisTitle(props) {
|
|
6
|
+
if (!["top", "bottom", "left", "right"].includes(props.position)) throw new TypeError("AxisTitle position must be top, bottom, left, or right.");
|
|
7
|
+
const source = lookupScale(props.scale, "AxisTitle");
|
|
8
|
+
if (!source) throw new TypeError("AxisTitle requires a scale ID.");
|
|
9
|
+
const scale = source.get(), label = resolveSignalValue(props.label), unit = resolveSignalValue(props.unit) ?? "";
|
|
10
|
+
if ([label, unit].some((value) => typeof value !== "string" || /[\r\n]/.test(value))) throw new TypeError("AxisTitle label and unit must be single-line strings.");
|
|
11
|
+
const offset = resolveSignalValue(props.offset) ?? 40;
|
|
12
|
+
if (typeof offset !== "number" || !Number.isFinite(offset) || offset < 0) throw new RangeError("AxisTitle offset must be finite and nonnegative.");
|
|
13
|
+
const horizontal = props.position === "top" || props.position === "bottom";
|
|
14
|
+
const midpoint = scale.range[0] / 2 + scale.range[1] / 2;
|
|
15
|
+
const x = horizontal ? midpoint : props.position === "left" ? -offset : scale.frame.width + offset;
|
|
16
|
+
const y = horizontal ? props.position === "top" ? -offset : scale.frame.height + offset : midpoint;
|
|
17
|
+
const style = resolveSignalValue(props.style) ?? {};
|
|
18
|
+
return /* @__PURE__ */ jsx(Group, { style: { translateX: x, translateY: y }, children: /* @__PURE__ */ jsx(Group, { style: { rotationDegrees: horizontal ? 0 : props.position === "left" ? -90 : 90 }, children: /* @__PURE__ */ jsx(Text, { pointerEvents: "none", style: { textAlign: "center", textBaseline: "middle", font: resolveSignalValue(style.font) ?? "12px sans-serif", fill: resolveSignalValue(style.fill) ?? "#617783", opacity: opacity(resolveSignalValue(style.opacity) ?? 1, "AxisTitle") }, children: unit ? `${label} (${unit})` : label }) }) });
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
AxisTitle
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=axis-title.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/features/viz/lib/axis-title.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Group, Text, resolveSignalValue, type SignalValue } from \"@pibbl/core\";\nimport type { SignalStyle } from \"@pibbl/core/internal\";\nimport type { AxisProps, AxisStyle, ScaleId } from \"./types.js\";\nimport { lookupScale } from \"./scale-context.js\";\nimport { opacity } from \"./paint.js\";\n/** Scale-aligned axis text; callers reserve the margin outside the plot. See {@link AxisTitle}. */\nexport interface AxisTitleProps {\n /** Ancestor scale whose range supplies the title midpoint. */\n readonly scale: ScaleId;\n /** Plot edge; left/right titles rotate along the axis. */\n readonly position: AxisProps[\"position\"];\n /** Single-line title. */\n readonly label: SignalValue<string>;\n /** Optional unit appended in parentheses; empty string omits it. */\n readonly unit?: SignalValue<string>;\n /** Nonnegative finite distance outside the plot edge, default 40 pixels. */\n readonly offset?: SignalValue<number>;\n /** Font defaults to 12px sans-serif, fill to #617783, opacity to 1. */\n readonly style?: SignalValue<SignalStyle<Pick<AxisStyle, \"font\" | \"fill\" | \"opacity\">>>;\n}\n/** Paint an axis title with optional units, without allocating margins or changing ticks.\n * @param props - Scale geometry and presentation. See {@link AxisTitleProps}.\n * @returns Decorative chart content in the caller's coordinate space.\n */\nexport function AxisTitle(props: AxisTitleProps) {\n if (![\"top\", \"bottom\", \"left\", \"right\"].includes(props.position)) throw new TypeError(\"AxisTitle position must be top, bottom, left, or right.\");\n const source = lookupScale(props.scale, \"AxisTitle\");\n if (!source) throw new TypeError(\"AxisTitle requires a scale ID.\");\n const scale = source.get(), label = resolveSignalValue(props.label), unit = resolveSignalValue(props.unit) ?? \"\";\n if ([label, unit].some(value => typeof value !== \"string\" || /[\\r\\n]/.test(value))) throw new TypeError(\"AxisTitle label and unit must be single-line strings.\");\n const offset = resolveSignalValue(props.offset) ?? 40;\n if (typeof offset !== \"number\" || !Number.isFinite(offset) || offset < 0) throw new RangeError(\"AxisTitle offset must be finite and nonnegative.\");\n const horizontal = props.position === \"top\" || props.position === \"bottom\";\n const midpoint = scale.range[0] / 2 + scale.range[1] / 2;\n const x = horizontal ? midpoint : props.position === \"left\" ? -offset : scale.frame.width + offset;\n const y = horizontal ? props.position === \"top\" ? -offset : scale.frame.height + offset : midpoint;\n const style = resolveSignalValue(props.style) ?? {};\n return <Group style={{ translateX: x, translateY: y }}><Group style={{ rotationDegrees: horizontal ? 0 : props.position === \"left\" ? -90 : 90 }}>\n <Text pointerEvents=\"none\" style={{ textAlign: \"center\", textBaseline: \"middle\", font: resolveSignalValue(style.font) ?? \"12px sans-serif\", fill: resolveSignalValue(style.fill) ?? \"#617783\", opacity: opacity(resolveSignalValue(style.opacity) ?? 1, \"AxisTitle\") }}>{unit ? `${label} (${unit})` : label}</Text>\n </Group></Group>;\n}\n"],
|
|
5
|
+
"mappings": "AAsCI;AAtCJ,SAAS,OAAO,MAAM,0BAA4C;AAGlE,SAAS,mBAAmB;AAC5B,SAAS,eAAe;AAoBjB,SAAS,UAAU,OAAuB;AAC/C,MAAI,CAAC,CAAC,OAAO,UAAU,QAAQ,OAAO,EAAE,SAAS,MAAM,QAAQ,EAAG,OAAM,IAAI,UAAU,yDAAyD;AAC/I,QAAM,SAAS,YAAY,MAAM,OAAO,WAAW;AACnD,MAAI,CAAC,OAAQ,OAAM,IAAI,UAAU,gCAAgC;AACjE,QAAM,QAAQ,OAAO,IAAI,GAAG,QAAQ,mBAAmB,MAAM,KAAK,GAAG,OAAO,mBAAmB,MAAM,IAAI,KAAK;AAC9G,MAAI,CAAC,OAAO,IAAI,EAAE,KAAK,WAAS,OAAO,UAAU,YAAY,SAAS,KAAK,KAAK,CAAC,EAAG,OAAM,IAAI,UAAU,uDAAuD;AAC/J,QAAM,SAAS,mBAAmB,MAAM,MAAM,KAAK;AACnD,MAAI,OAAO,WAAW,YAAY,CAAC,OAAO,SAAS,MAAM,KAAK,SAAS,EAAG,OAAM,IAAI,WAAW,kDAAkD;AACjJ,QAAM,aAAa,MAAM,aAAa,SAAS,MAAM,aAAa;AAClE,QAAM,WAAW,MAAM,MAAM,CAAC,IAAI,IAAI,MAAM,MAAM,CAAC,IAAI;AACvD,QAAM,IAAI,aAAa,WAAW,MAAM,aAAa,SAAS,CAAC,SAAS,MAAM,MAAM,QAAQ;AAC5F,QAAM,IAAI,aAAa,MAAM,aAAa,QAAQ,CAAC,SAAS,MAAM,MAAM,SAAS,SAAS;AAC1F,QAAM,QAAQ,mBAAmB,MAAM,KAAK,KAAK,CAAC;AAClD,SAAO,oBAAC,SAAM,OAAO,EAAE,YAAY,GAAG,YAAY,EAAE,GAAG,8BAAC,SAAM,OAAO,EAAE,iBAAiB,aAAa,IAAI,MAAM,aAAa,SAAS,MAAM,GAAG,GAC5I,8BAAC,QAAK,eAAc,QAAO,OAAO,EAAE,WAAW,UAAU,cAAc,UAAU,MAAM,mBAAmB,MAAM,IAAI,KAAK,mBAAmB,MAAM,mBAAmB,MAAM,IAAI,KAAK,WAAW,SAAS,QAAQ,mBAAmB,MAAM,OAAO,KAAK,GAAG,WAAW,EAAE,GAAI,iBAAO,GAAG,KAAK,KAAK,IAAI,MAAM,OAAM,GAC/S,GAAQ;AACV;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -7,4 +7,4 @@ import type { AxisProps } from "./types.js";
|
|
|
7
7
|
*
|
|
8
8
|
* @see {@link AxisProps}
|
|
9
9
|
*/
|
|
10
|
-
export declare function Axis(props: AxisProps): (import("../../../jsx-runtime.js").JSX.Element[] | import("../../../jsx-runtime.js").JSX.Element)[];
|
|
10
|
+
export declare function Axis(props: AxisProps): ((import("../../../jsx-runtime.js").JSX.Element[] | null)[] | import("../../../jsx-runtime.js").JSX.Element)[];
|