@pibbl/core 0.0.2 → 0.0.3-alpha.109.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/THIRD_PARTY_NOTICES.txt +81 -0
- package/dist/features/physics/2d-testing.d.ts +1 -1
- package/dist/features/physics/2d-testing.js +2 -2
- package/dist/features/physics/2d-testing.js.map +2 -2
- package/dist/features/physics/lib/2d/canvas/components.js +25 -21
- package/dist/features/physics/lib/2d/canvas/components.js.map +2 -2
- package/dist/features/physics/lib/2d/canvas/presentation.js +1 -2
- package/dist/features/physics/lib/2d/canvas/presentation.js.map +2 -2
- package/dist/features/physics/lib/2d/collision/casts.js +4 -2
- package/dist/features/physics/lib/2d/collision/casts.js.map +2 -2
- package/dist/features/physics/lib/2d/runtime/controller.js +1 -1
- package/dist/features/physics/lib/2d/runtime/controller.js.map +2 -2
- package/dist/features/physics/lib/2d/runtime/obstacles.js +9 -11
- package/dist/features/physics/lib/2d/runtime/obstacles.js.map +2 -2
- package/dist/features/physics/lib/2d/shapes.js +8 -9
- package/dist/features/physics/lib/2d/shapes.js.map +2 -2
- package/dist/features/physics/lib/2d/world/rapier.js +22 -26
- package/dist/features/physics/lib/2d/world/rapier.js.map +2 -2
- package/dist/features/sprites/loader.js +6 -3
- package/dist/features/sprites/loader.js.map +2 -2
- 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 +17 -24
- 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 +37 -0
- package/dist/features/textures/lib/gray-scott.js.map +7 -0
- package/dist/features/textures/lib/palette.js +1 -3
- package/dist/features/textures/lib/palette.js.map +2 -2
- 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/rain-drops.js +2 -1
- package/dist/features/textures/lib/rain-drops.js.map +2 -2
- 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/textures/lib/wasm/electric.js +8 -1
- package/dist/features/textures/lib/wasm/electric.js.map +2 -2
- package/dist/features/textures/lib/water-surface.js +1 -3
- package/dist/features/textures/lib/water-surface.js.map +2 -2
- package/dist/features/viz/index.d.ts +68 -6
- package/dist/features/viz/index.js +164 -2
- 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-title.js +2 -1
- package/dist/features/viz/lib/axis-title.js.map +2 -2
- package/dist/features/viz/lib/axis.js +1 -1
- package/dist/features/viz/lib/axis.js.map +2 -2
- package/dist/features/viz/lib/bar-series.d.ts +3 -1
- package/dist/features/viz/lib/bar-series.js +16 -1
- 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/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 +142 -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/graph/bipartite.d.ts +14 -0
- package/dist/features/viz/lib/graph/bipartite.js +250 -0
- package/dist/features/viz/lib/graph/bipartite.js.map +7 -0
- package/dist/features/viz/lib/graph/chord.d.ts +44 -0
- package/dist/features/viz/lib/graph/chord.js +348 -0
- package/dist/features/viz/lib/graph/chord.js.map +7 -0
- package/dist/features/viz/lib/graph/dependency.d.ts +26 -0
- package/dist/features/viz/lib/graph/dependency.js +140 -0
- package/dist/features/viz/lib/graph/dependency.js.map +7 -0
- package/dist/features/viz/lib/graph/force.d.ts +28 -0
- package/dist/features/viz/lib/graph/force.js +580 -0
- package/dist/features/viz/lib/graph/force.js.map +7 -0
- package/dist/features/viz/lib/graph/hierarchy.d.ts +21 -0
- package/dist/features/viz/lib/graph/hierarchy.js +112 -0
- package/dist/features/viz/lib/graph/hierarchy.js.map +7 -0
- package/dist/features/viz/lib/graph/icicle.d.ts +16 -0
- package/dist/features/viz/lib/graph/icicle.js +153 -0
- package/dist/features/viz/lib/graph/icicle.js.map +7 -0
- package/dist/features/viz/lib/graph/matrix.d.ts +30 -0
- package/dist/features/viz/lib/graph/matrix.js +243 -0
- package/dist/features/viz/lib/graph/matrix.js.map +7 -0
- package/dist/features/viz/lib/graph/neighborhood.d.ts +11 -0
- package/dist/features/viz/lib/graph/neighborhood.js +281 -0
- package/dist/features/viz/lib/graph/neighborhood.js.map +7 -0
- package/dist/features/viz/lib/graph/routes.d.ts +35 -0
- package/dist/features/viz/lib/graph/routes.js +101 -0
- package/dist/features/viz/lib/graph/routes.js.map +7 -0
- package/dist/features/viz/lib/graph/sankey.d.ts +44 -0
- package/dist/features/viz/lib/graph/sankey.js +341 -0
- package/dist/features/viz/lib/graph/sankey.js.map +7 -0
- package/dist/features/viz/lib/graph/shared.d.ts +59 -0
- package/dist/features/viz/lib/graph/shared.js +301 -0
- package/dist/features/viz/lib/graph/shared.js.map +7 -0
- package/dist/features/viz/lib/graph/tree.d.ts +11 -0
- package/dist/features/viz/lib/graph/tree.js +232 -0
- package/dist/features/viz/lib/graph/tree.js.map +7 -0
- package/dist/features/viz/lib/graph/treemap.d.ts +20 -0
- package/dist/features/viz/lib/graph/treemap.js +227 -0
- package/dist/features/viz/lib/graph/treemap.js.map +7 -0
- package/dist/features/viz/lib/graph/types.d.ts +1097 -0
- package/dist/features/viz/lib/hover-card.js +8 -9
- package/dist/features/viz/lib/hover-card.js.map +2 -2
- package/dist/features/viz/lib/hover-data.d.ts +1 -1
- package/dist/features/viz/lib/hover-data.js +5 -2
- package/dist/features/viz/lib/hover-data.js.map +2 -2
- 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 +122 -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/layout-pie.js +9 -13
- package/dist/features/viz/lib/layout-pie.js.map +2 -2
- 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.js +1 -1
- package/dist/features/viz/lib/linear-scale.js.map +2 -2
- 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/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/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/pie-layout.js +2 -1
- package/dist/features/viz/lib/pie-layout.js.map +2 -2
- 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-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.js +4 -1
- package/dist/features/viz/lib/reference-band.js.map +2 -2
- package/dist/features/viz/lib/scale-context.d.ts +1 -1
- package/dist/features/viz/lib/scale-ticks.js +21 -6
- package/dist/features/viz/lib/scale-ticks.js.map +2 -2
- 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/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 +20 -4
- package/dist/features/viz/lib/use-continuous-scale.js +6 -1
- package/dist/features/viz/lib/use-continuous-scale.js.map +2 -2
- package/dist/features/viz/lib/utc-scale.js +11 -10
- package/dist/features/viz/lib/utc-scale.js.map +2 -2
- 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/backdrop-contrast-gpu.d.ts +5 -0
- package/dist/filters/backdrop-contrast-gpu.js +33 -0
- package/dist/filters/backdrop-contrast-gpu.js.map +7 -0
- package/dist/filters/backdrop-contrast.d.ts +21 -0
- package/dist/filters/backdrop-contrast.js +61 -0
- package/dist/filters/backdrop-contrast.js.map +7 -0
- package/dist/filters/displacement.js +1 -1
- package/dist/filters/displacement.js.map +2 -2
- 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 +104 -0
- package/dist/filters/emboss.js.map +7 -0
- package/dist/filters/filter-executor.d.ts +11 -4
- package/dist/filters/filter-executor.js +104 -49
- package/dist/filters/filter-executor.js.map +2 -2
- package/dist/filters/reflected-light.js +1 -1
- package/dist/filters/reflected-light.js.map +2 -2
- 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-backdrop-contrast-boundary.d.ts +31 -0
- package/dist/filters/render-backdrop-contrast-boundary.js +116 -0
- package/dist/filters/render-backdrop-contrast-boundary.js.map +7 -0
- 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 +9 -5
- package/dist/filters.js +4 -0
- package/dist/filters.js.map +2 -2
- package/dist/index.d.ts +9 -5
- package/dist/index.js +18 -2
- package/dist/index.js.map +2 -2
- package/dist/internal.d.ts +4 -0
- package/dist/internal.js +6 -0
- package/dist/internal.js.map +2 -2
- package/dist/layout-kernel.d.ts +12 -0
- package/dist/layout-kernel.js +11 -0
- package/dist/layout-kernel.js.map +7 -0
- package/dist/layout-kernel.mjs +1 -0
- package/dist/lib/backend/types.d.ts +13 -1
- package/dist/lib/backend/types.js.map +2 -2
- package/dist/lib/components/arc-geometry.js +2 -1
- package/dist/lib/components/arc-geometry.js.map +2 -2
- package/dist/lib/components/g.js +2 -0
- package/dist/lib/components/g.js.map +2 -2
- package/dist/lib/components/html-box.js +2 -1
- package/dist/lib/components/html-box.js.map +2 -2
- package/dist/lib/components/img.js +3 -3
- package/dist/lib/components/img.js.map +2 -2
- package/dist/lib/components/layer.js +98 -16
- package/dist/lib/components/layer.js.map +3 -3
- package/dist/lib/components/text.d.ts +16 -0
- package/dist/lib/components/text.js +131 -24
- package/dist/lib/components/text.js.map +2 -2
- package/dist/lib/define-primitive.d.ts +4 -2
- package/dist/lib/define-primitive.js +3 -1
- package/dist/lib/define-primitive.js.map +2 -2
- package/dist/lib/element/metadata.d.ts +9 -0
- package/dist/lib/element/metadata.js +19 -0
- package/dist/lib/element/metadata.js.map +2 -2
- package/dist/lib/element/resolve-primitive-inputs.d.ts +2 -0
- package/dist/lib/element/resolve-primitive-inputs.js +17 -4
- package/dist/lib/element/resolve-primitive-inputs.js.map +2 -2
- package/dist/lib/events/event-facade.d.ts +18 -0
- package/dist/lib/events/event-facade.js +28 -2
- package/dist/lib/events/event-facade.js.map +2 -2
- package/dist/lib/events/hit-test.js +2 -1
- package/dist/lib/events/hit-test.js.map +2 -2
- package/dist/lib/events/propagation.d.ts +2 -1
- package/dist/lib/events/propagation.js +22 -16
- package/dist/lib/events/propagation.js.map +2 -2
- package/dist/lib/events/registrations.d.ts +10 -0
- package/dist/lib/events/registrations.js +160 -5
- package/dist/lib/events/registrations.js.map +2 -2
- package/dist/lib/execute-render.js +25 -1
- package/dist/lib/execute-render.js.map +2 -2
- package/dist/lib/filter/filter-region.js +3 -10
- package/dist/lib/filter/filter-region.js.map +2 -2
- package/dist/lib/focus/focus-manager.d.ts +8 -1
- package/dist/lib/focus/focus-manager.js +87 -43
- package/dist/lib/focus/focus-manager.js.map +2 -2
- package/dist/lib/focus/geometry.d.ts +2 -0
- package/dist/lib/focus/geometry.js +6 -0
- package/dist/lib/focus/geometry.js.map +2 -2
- package/dist/lib/geometry/path-bend-guide.js +1 -1
- package/dist/lib/geometry/path-bend-guide.js.map +2 -2
- package/dist/lib/geometry/path-geometry.js +12 -11
- package/dist/lib/geometry/path-geometry.js.map +2 -2
- package/dist/lib/geometry/path-transforms.js +17 -21
- package/dist/lib/geometry/path-transforms.js.map +2 -2
- package/dist/lib/geometry/path-warp-bezier.js +3 -1
- package/dist/lib/geometry/path-warp-bezier.js.map +2 -2
- package/dist/lib/geometry/path-warp.js +1 -1
- package/dist/lib/geometry/path-warp.js.map +2 -2
- package/dist/lib/global-state.js +2 -0
- package/dist/lib/global-state.js.map +2 -2
- package/dist/lib/html/html-events.d.ts +32 -0
- package/dist/lib/html/html-events.js +179 -0
- package/dist/lib/html/html-events.js.map +7 -0
- package/dist/lib/html/html-service.d.ts +8 -2
- package/dist/lib/html/html-service.js +198 -65
- package/dist/lib/html/html-service.js.map +2 -2
- package/dist/lib/html/overlay-config.js +7 -6
- package/dist/lib/html/overlay-config.js.map +2 -2
- package/dist/lib/html/types.d.ts +29 -2
- package/dist/lib/layout/absolute.d.ts +11 -5
- package/dist/lib/layout/absolute.js +329 -55
- package/dist/lib/layout/absolute.js.map +3 -3
- package/dist/lib/layout/allocation-checkpoint-owner.d.ts +11 -0
- package/dist/lib/layout/allocation-checkpoint-owner.js +86 -0
- package/dist/lib/layout/allocation-checkpoint-owner.js.map +7 -0
- package/dist/lib/layout/allocation-checkpoint.d.ts +53 -0
- package/dist/lib/layout/allocation-checkpoint.js +463 -0
- package/dist/lib/layout/allocation-checkpoint.js.map +7 -0
- package/dist/lib/layout/allocation-dependencies.d.ts +30 -0
- package/dist/lib/layout/allocation-dependencies.js +90 -0
- package/dist/lib/layout/allocation-dependencies.js.map +7 -0
- package/dist/lib/layout/allocation-revision.d.ts +13 -0
- package/dist/lib/layout/allocation-revision.js +67 -0
- package/dist/lib/layout/allocation-revision.js.map +7 -0
- package/dist/lib/layout/box-insets.d.ts +17 -0
- package/dist/lib/layout/box-insets.js +138 -0
- package/dist/lib/layout/box-insets.js.map +7 -0
- package/dist/lib/layout/box-sizing.d.ts +16 -0
- package/dist/lib/layout/box-sizing.js +77 -0
- package/dist/lib/layout/box-sizing.js.map +7 -0
- package/dist/lib/layout/box.js +42 -12
- package/dist/lib/layout/box.js.map +2 -2
- package/dist/lib/layout/canvas-measurement.d.ts +13 -0
- package/dist/lib/layout/canvas-measurement.js +57 -0
- package/dist/lib/layout/canvas-measurement.js.map +7 -0
- package/dist/lib/layout/context.d.ts +35 -6
- package/dist/lib/layout/context.js +72 -3
- package/dist/lib/layout/context.js.map +2 -2
- package/dist/lib/layout/define-layout-component.d.ts +23 -0
- package/dist/lib/layout/define-layout-component.js +84 -0
- package/dist/lib/layout/define-layout-component.js.map +7 -0
- package/dist/lib/layout/flex-allocation-cache.d.ts +42 -0
- package/dist/lib/layout/flex-baseline-mode.d.ts +2 -0
- package/dist/lib/layout/flex-baseline-mode.js +7 -0
- package/dist/lib/layout/flex-baseline-mode.js.map +7 -0
- package/dist/lib/layout/flex.d.ts +50 -15
- package/dist/lib/layout/flex.js +2124 -195
- package/dist/lib/layout/flex.js.map +3 -3
- package/dist/lib/layout/flow.js +225 -49
- package/dist/lib/layout/flow.js.map +2 -2
- package/dist/lib/layout/geometry-publication.d.ts +53 -0
- package/dist/lib/layout/geometry-publication.js +244 -0
- package/dist/lib/layout/geometry-publication.js.map +7 -0
- package/dist/lib/layout/grid-kernel.d.ts +63 -0
- package/dist/lib/layout/grid-kernel.js +168 -0
- package/dist/lib/layout/grid-kernel.js.map +7 -0
- package/dist/lib/layout/grid.d.ts +63 -4
- package/dist/lib/layout/grid.js +767 -171
- package/dist/lib/layout/grid.js.map +3 -3
- package/dist/lib/layout/measure.d.ts +55 -3
- package/dist/lib/layout/measure.js +448 -15
- package/dist/lib/layout/measure.js.map +2 -2
- package/dist/lib/layout/overlay.js +81 -23
- package/dist/lib/layout/overlay.js.map +2 -2
- package/dist/lib/layout/participation.d.ts +27 -0
- package/dist/lib/layout/participation.js +188 -0
- package/dist/lib/layout/participation.js.map +7 -0
- package/dist/lib/layout/place-child.js +1 -1
- package/dist/lib/layout/place-child.js.map +2 -2
- package/dist/lib/layout/positioning-diagnostics.d.ts +1 -1
- package/dist/lib/layout/positioning-diagnostics.js +13 -2
- package/dist/lib/layout/positioning-diagnostics.js.map +2 -2
- package/dist/lib/layout/prepared-root.d.ts +121 -0
- package/dist/lib/layout/prepared-root.js +360 -0
- package/dist/lib/layout/prepared-root.js.map +7 -0
- package/dist/lib/layout/standalone-kernel.d.ts +60 -0
- package/dist/lib/layout/standalone-kernel.js +722 -0
- package/dist/lib/layout/standalone-kernel.js.map +7 -0
- package/dist/lib/layout/topology.d.ts +21 -0
- package/dist/lib/layout/topology.js +113 -0
- package/dist/lib/layout/topology.js.map +7 -0
- package/dist/lib/layout/types.d.ts +5 -0
- package/dist/lib/layout/wasm/artifact.d.ts +1 -0
- package/dist/lib/layout/wasm/artifact.js +5 -0
- package/dist/lib/layout/wasm/artifact.js.map +7 -0
- package/dist/lib/layout/wasm/bytes.d.ts +1 -0
- package/dist/lib/layout/wasm/bytes.js +5 -0
- package/dist/lib/layout/wasm/bytes.js.map +7 -0
- package/dist/lib/layout/wasm/embedded.d.ts +2 -0
- package/dist/lib/layout/wasm/embedded.js +12 -0
- package/dist/lib/layout/wasm/embedded.js.map +7 -0
- package/dist/lib/layout/wasm/layout.wasm +0 -0
- package/dist/lib/layout/wasm/module.d.ts +8 -0
- package/dist/lib/layout/wasm/module.js +70 -0
- package/dist/lib/layout/wasm/module.js.map +7 -0
- package/dist/lib/layout/wasm/region.d.ts +267 -0
- package/dist/lib/layout/wasm/region.js +1018 -0
- package/dist/lib/layout/wasm/region.js.map +7 -0
- package/dist/lib/manipulation/controller.js +4 -7
- package/dist/lib/manipulation/controller.js.map +2 -2
- package/dist/lib/manipulation/frame.js +1 -1
- package/dist/lib/manipulation/frame.js.map +2 -2
- package/dist/lib/manipulation/handles.js +32 -33
- package/dist/lib/manipulation/handles.js.map +2 -2
- package/dist/lib/manipulation/solve.js +12 -10
- package/dist/lib/manipulation/solve.js.map +2 -2
- package/dist/lib/mount-pibbl.js +1 -0
- package/dist/lib/mount-pibbl.js.map +2 -2
- package/dist/lib/mount-prepared-pibbl.d.ts +5 -0
- package/dist/lib/mount-prepared-pibbl.js +29 -0
- package/dist/lib/mount-prepared-pibbl.js.map +7 -0
- package/dist/lib/mount-request.d.ts +8 -0
- package/dist/lib/mount-request.js +41 -0
- package/dist/lib/mount-request.js.map +7 -0
- package/dist/lib/pibbl.d.ts +21 -13
- package/dist/lib/pibbl.js +18 -16
- package/dist/lib/pibbl.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-layer/controller.d.ts +9 -3
- package/dist/lib/render-layer/controller.js +259 -110
- package/dist/lib/render-layer/controller.js.map +2 -2
- package/dist/lib/render-transaction.d.ts +12 -2
- package/dist/lib/render-transaction.js +69 -1
- package/dist/lib/render-transaction.js.map +2 -2
- package/dist/lib/render.js +32 -8
- package/dist/lib/render.js.map +2 -2
- package/dist/lib/scheduler/realm-scheduler.d.ts +2 -0
- package/dist/lib/scheduler/realm-scheduler.js +55 -26
- package/dist/lib/scheduler/realm-scheduler.js.map +2 -2
- package/dist/lib/scheduler/renderer-participant.js +1 -0
- package/dist/lib/scheduler/renderer-participant.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/signals/edge.d.ts +7 -4
- package/dist/lib/signals/edge.js +25 -3
- package/dist/lib/signals/edge.js.map +2 -2
- package/dist/lib/signals/graph.d.ts +16 -2
- package/dist/lib/signals/graph.js +54 -12
- package/dist/lib/signals/graph.js.map +2 -2
- package/dist/lib/signals/input-provision.d.ts +15 -0
- package/dist/lib/signals/input-provision.js +53 -3
- package/dist/lib/signals/input-provision.js.map +2 -2
- package/dist/lib/signals/render-consumer.d.ts +3 -0
- package/dist/lib/signals/render-consumer.js +22 -14
- package/dist/lib/signals/render-consumer.js.map +2 -2
- package/dist/lib/style/positioning.d.ts +50 -2
- package/dist/lib/style/positioning.js +28 -4
- package/dist/lib/style/positioning.js.map +2 -2
- package/dist/lib/style/resolve-built-in.d.ts +4 -3
- package/dist/lib/style/resolve-built-in.js +17 -3
- package/dist/lib/style/resolve-built-in.js.map +2 -2
- package/dist/lib/style/resolve-dispatch.d.ts +3 -0
- package/dist/lib/style/resolve-dispatch.js +77 -4
- package/dist/lib/style/resolve-dispatch.js.map +2 -2
- package/dist/lib/style/resolve-length.d.ts +2 -0
- package/dist/lib/style/resolve-length.js +13 -9
- package/dist/lib/style/resolve-length.js.map +2 -2
- package/dist/lib/style/sizing-length.d.ts +51 -0
- package/dist/lib/style/sizing-length.js +77 -0
- package/dist/lib/style/sizing-length.js.map +7 -0
- package/dist/lib/style/types.d.ts +63 -25
- package/dist/lib/surface/root-surface.js +10 -6
- package/dist/lib/surface/root-surface.js.map +2 -2
- package/dist/lib/textures/texture.js +10 -8
- package/dist/lib/textures/texture.js.map +2 -2
- package/dist/lib/transitions/capture.js +4 -1
- package/dist/lib/transitions/capture.js.map +2 -2
- package/dist/lib/transitions/embers-physics.js +17 -10
- package/dist/lib/transitions/embers-physics.js.map +2 -2
- package/dist/lib/types.d.ts +110 -1
- package/dist/sync.d.ts +16 -0
- package/dist/sync.js +13 -0
- package/dist/sync.js.map +7 -0
- package/dist/sync.mjs +1 -0
- package/package.json +26 -3
|
@@ -26,20 +26,22 @@ export declare class RenderLayerController<Props, Resources, Target extends obje
|
|
|
26
26
|
private props;
|
|
27
27
|
private needsRender;
|
|
28
28
|
private needsResize;
|
|
29
|
+
private inputDeliveryGated;
|
|
29
30
|
private inputGated;
|
|
30
31
|
private candidate;
|
|
31
32
|
private committed;
|
|
32
33
|
private committedInteraction;
|
|
33
34
|
private committedTargetDescriptors;
|
|
34
|
-
private
|
|
35
|
+
private committedTargets;
|
|
35
36
|
private readonly layerTarget;
|
|
36
37
|
private committedPolicy;
|
|
37
38
|
private resolverTransform;
|
|
38
39
|
private resolverInverseTransform;
|
|
39
40
|
private resolverBounds;
|
|
40
41
|
private resolverSize;
|
|
42
|
+
private interactionGeneration;
|
|
41
43
|
private resolutionErrorQueued;
|
|
42
|
-
private
|
|
44
|
+
private inputNativeReleases;
|
|
43
45
|
private readonly resolverEntry;
|
|
44
46
|
private readonly inputWinner;
|
|
45
47
|
private lastTime;
|
|
@@ -51,7 +53,11 @@ export declare class RenderLayerController<Props, Resources, Target extends obje
|
|
|
51
53
|
private invalidate;
|
|
52
54
|
private settleInteraction;
|
|
53
55
|
private finishCandidate;
|
|
54
|
-
/**
|
|
56
|
+
/** Prepares descriptors without mutating the current target identities or handlers. */
|
|
57
|
+
private prepareInteraction;
|
|
58
|
+
private adoptInteraction;
|
|
59
|
+
private finishPrepared;
|
|
60
|
+
/** Immediate fallback for callers without a root transaction. */
|
|
55
61
|
private commitInteraction;
|
|
56
62
|
private applyResolverGeometry;
|
|
57
63
|
private refreshCommittedTargetGeometry;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { committedInstanceRootTransform, snapshotLayoutGeometry, stageLayoutTargetGeometry, stageLayoutTargetRetirement } from "../layout/geometry-publication.js";
|
|
1
2
|
import { GLOBAL_STATE, getCurrentPibblInstance } from "../global-state.js";
|
|
3
|
+
import { registerLayoutSuspensionResource, unregisterLayoutSuspensionResource } from "../layout/participation.js";
|
|
2
4
|
import { getCurrentWorldTransform } from "../render-target.js";
|
|
3
5
|
import {
|
|
4
6
|
queueFrameCompletion,
|
|
@@ -11,7 +13,9 @@ import {
|
|
|
11
13
|
import {
|
|
12
14
|
createTarget,
|
|
13
15
|
releaseTarget,
|
|
14
|
-
updateTarget
|
|
16
|
+
updateTarget,
|
|
17
|
+
normalizeHandlers,
|
|
18
|
+
prepareTargetUpdate
|
|
15
19
|
} from "../events/registrations.js";
|
|
16
20
|
import {
|
|
17
21
|
hasResolverPointerCapture,
|
|
@@ -68,6 +72,10 @@ class RenderLayerController {
|
|
|
68
72
|
clippingStack: [],
|
|
69
73
|
resolveLocal: (x, y, output) => this.resolveLocal(x, y, output)
|
|
70
74
|
};
|
|
75
|
+
const suspensionResource = {
|
|
76
|
+
suspendLayout: () => this.instance.paintEntries.delete(this.resolverEntry)
|
|
77
|
+
};
|
|
78
|
+
registerLayoutSuspensionResource(refs, suspensionResource);
|
|
71
79
|
assertCapability();
|
|
72
80
|
this.canvas = new OffscreenCanvas(1, 1);
|
|
73
81
|
const controller = this;
|
|
@@ -83,7 +91,10 @@ class RenderLayerController {
|
|
|
83
91
|
controller.invalidate(true);
|
|
84
92
|
}
|
|
85
93
|
});
|
|
86
|
-
refs.teardowns.add(() =>
|
|
94
|
+
refs.teardowns.add(() => {
|
|
95
|
+
unregisterLayoutSuspensionResource(refs, suspensionResource);
|
|
96
|
+
this.dispose();
|
|
97
|
+
});
|
|
87
98
|
}
|
|
88
99
|
definition;
|
|
89
100
|
instance = getCurrentPibblInstance();
|
|
@@ -97,6 +108,7 @@ class RenderLayerController {
|
|
|
97
108
|
props;
|
|
98
109
|
needsRender = true;
|
|
99
110
|
needsResize = true;
|
|
111
|
+
inputDeliveryGated = false;
|
|
100
112
|
inputGated = true;
|
|
101
113
|
candidate;
|
|
102
114
|
committed;
|
|
@@ -114,6 +126,7 @@ class RenderLayerController {
|
|
|
114
126
|
resolverInverseTransform = new DOMMatrix();
|
|
115
127
|
resolverBounds = new Path2D();
|
|
116
128
|
resolverSize;
|
|
129
|
+
interactionGeneration = 0;
|
|
117
130
|
resolutionErrorQueued = false;
|
|
118
131
|
inputNativeReleases = /* @__PURE__ */ new Map();
|
|
119
132
|
resolverEntry;
|
|
@@ -125,6 +138,10 @@ class RenderLayerController {
|
|
|
125
138
|
const propsChanged = !initial && !sameProps(this.props, props);
|
|
126
139
|
const sizeChanged = !sameSize(this.size, size);
|
|
127
140
|
const policyChanged = !samePolicy(this.committedPolicy, policy);
|
|
141
|
+
if (initial || propsChanged || sizeChanged || this.needsRender) {
|
|
142
|
+
this.inputGated = true;
|
|
143
|
+
this.inputDeliveryGated = true;
|
|
144
|
+
}
|
|
128
145
|
this.size = size;
|
|
129
146
|
this.publishResolver(size);
|
|
130
147
|
if (sizeChanged) {
|
|
@@ -198,6 +215,7 @@ class RenderLayerController {
|
|
|
198
215
|
const stagedPolicy = snapshotPolicy(policy);
|
|
199
216
|
const candidate = this.canvas.transferToImageBitmap();
|
|
200
217
|
this.candidate?.bitmap.close();
|
|
218
|
+
if (this.candidate?.prepared) this.finishPrepared(this.candidate.prepared, false);
|
|
201
219
|
const stagedCandidate = {
|
|
202
220
|
bitmap: candidate,
|
|
203
221
|
interaction,
|
|
@@ -205,10 +223,23 @@ class RenderLayerController {
|
|
|
205
223
|
};
|
|
206
224
|
this.candidate = stagedCandidate;
|
|
207
225
|
const transaction2 = GLOBAL_STATE.renderTransaction;
|
|
208
|
-
transaction2?.
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
226
|
+
if (transaction2?.onAdopt) {
|
|
227
|
+
try {
|
|
228
|
+
stagedCandidate.prepared = this.prepareInteraction(interaction, stagedPolicy);
|
|
229
|
+
} catch (error) {
|
|
230
|
+
this.finishCandidate(stagedCandidate, false);
|
|
231
|
+
throw error;
|
|
232
|
+
}
|
|
233
|
+
transaction2.onAdopt(() => this.finishCandidate(stagedCandidate, true));
|
|
234
|
+
transaction2.onFinish((success) => {
|
|
235
|
+
if (!success) {
|
|
236
|
+
this.finishCandidate(stagedCandidate, false);
|
|
237
|
+
} else if (stagedCandidate.prepared) this.finishPrepared(stagedCandidate.prepared, true);
|
|
238
|
+
});
|
|
239
|
+
} else {
|
|
240
|
+
transaction2?.onFinish((success) => this.finishCandidate(stagedCandidate, success));
|
|
241
|
+
if (!transaction2) this.finishCandidate(stagedCandidate, true);
|
|
242
|
+
}
|
|
212
243
|
ctx.drawImage(
|
|
213
244
|
candidate,
|
|
214
245
|
0,
|
|
@@ -223,32 +254,37 @@ class RenderLayerController {
|
|
|
223
254
|
return;
|
|
224
255
|
}
|
|
225
256
|
const transaction = GLOBAL_STATE.renderTransaction;
|
|
226
|
-
transaction?.
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
257
|
+
if (transaction?.onAdopt && this.committedInteraction) {
|
|
258
|
+
const prepared = this.prepareInteraction({
|
|
259
|
+
snapshot: this.committedInteraction,
|
|
260
|
+
targets: this.committedTargetDescriptors,
|
|
261
|
+
transform: this.resolverTransform,
|
|
262
|
+
clippingStack: this.resolverEntry.clippingStack
|
|
263
|
+
}, snapshotPolicy(policy));
|
|
264
|
+
transaction.onAdopt(() => {
|
|
265
|
+
if (!this.disposed) this.adoptInteraction(prepared);
|
|
266
|
+
});
|
|
267
|
+
transaction.onFinish((success) => {
|
|
268
|
+
this.finishPrepared(prepared, success);
|
|
269
|
+
});
|
|
270
|
+
} else {
|
|
271
|
+
transaction?.onFinish((success) => {
|
|
272
|
+
if (success && !this.disposed) {
|
|
273
|
+
if (policyChanged && this.committedInteraction) this.commitInteraction({
|
|
274
|
+
snapshot: this.committedInteraction,
|
|
275
|
+
targets: this.committedTargetDescriptors,
|
|
276
|
+
transform: this.resolverTransform,
|
|
277
|
+
clippingStack: this.resolverEntry.clippingStack
|
|
278
|
+
}, snapshotPolicy(policy));
|
|
279
|
+
this.refreshCommittedTargetGeometry();
|
|
238
280
|
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
targets: this.committedTargetDescriptors,
|
|
247
|
-
transform: this.resolverTransform,
|
|
248
|
-
clippingStack: this.resolverEntry.clippingStack
|
|
249
|
-
},
|
|
250
|
-
snapshotPolicy(policy)
|
|
251
|
-
);
|
|
281
|
+
});
|
|
282
|
+
if (!transaction && policyChanged && this.committedInteraction) this.commitInteraction({
|
|
283
|
+
snapshot: this.committedInteraction,
|
|
284
|
+
targets: this.committedTargetDescriptors,
|
|
285
|
+
transform: this.resolverTransform,
|
|
286
|
+
clippingStack: this.resolverEntry.clippingStack
|
|
287
|
+
}, snapshotPolicy(policy));
|
|
252
288
|
}
|
|
253
289
|
this.drawCommitted(ctx, size);
|
|
254
290
|
}
|
|
@@ -261,7 +297,6 @@ class RenderLayerController {
|
|
|
261
297
|
this.resolverSize = size;
|
|
262
298
|
}
|
|
263
299
|
this.resolverTransform = getCurrentWorldTransform();
|
|
264
|
-
this.resolverInverseTransform = this.resolverTransform.inverse();
|
|
265
300
|
this.resolverEntry.transform = this.resolverTransform;
|
|
266
301
|
this.resolverEntry.clippingStack = Array.from(GLOBAL_STATE.clippingStack);
|
|
267
302
|
this.instance.paintEntries.delete(this.resolverEntry);
|
|
@@ -331,71 +366,130 @@ class RenderLayerController {
|
|
|
331
366
|
}
|
|
332
367
|
finishCandidate(candidate, success) {
|
|
333
368
|
if (this.candidate !== candidate) return;
|
|
334
|
-
this.candidate = void 0;
|
|
335
369
|
if (!success || this.disposed) {
|
|
370
|
+
this.candidate = void 0;
|
|
371
|
+
this.needsRender = true;
|
|
372
|
+
this.inputGated = true;
|
|
336
373
|
candidate.bitmap.close();
|
|
374
|
+
if (candidate.prepared) this.finishPrepared(candidate.prepared, false);
|
|
337
375
|
return;
|
|
338
376
|
}
|
|
339
|
-
|
|
377
|
+
if (candidate.prepared) this.adoptInteraction(candidate.prepared);
|
|
378
|
+
else this.commitInteraction(candidate.interaction, candidate.policy);
|
|
340
379
|
this.committed?.close();
|
|
341
380
|
this.committed = candidate.bitmap;
|
|
381
|
+
this.candidate = void 0;
|
|
342
382
|
this.resolutionErrorQueued = false;
|
|
343
383
|
this.inputGated = false;
|
|
384
|
+
this.inputDeliveryGated = false;
|
|
344
385
|
}
|
|
345
|
-
/**
|
|
346
|
-
|
|
347
|
-
const
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
386
|
+
/** Prepares descriptors without mutating the current target identities or handlers. */
|
|
387
|
+
prepareInteraction(interaction, policy) {
|
|
388
|
+
const targets = /* @__PURE__ */ new Map();
|
|
389
|
+
const created = [];
|
|
390
|
+
const registrations = [];
|
|
391
|
+
const inputLeases = /* @__PURE__ */ new Map();
|
|
392
|
+
const addedInputLeases = [];
|
|
393
|
+
const transaction = GLOBAL_STATE.renderTransaction ?? this.instance.eventRoot.renderTransaction;
|
|
394
|
+
const stage = (target, bounds, focusable) => {
|
|
395
|
+
if (transaction) stageLayoutTargetGeometry(transaction, target, { bounds, transform: interaction.transform });
|
|
396
|
+
this.instance.eventRoot.focusPolicy?.observeTransactionalTarget?.(target, focusable);
|
|
397
|
+
};
|
|
398
|
+
try {
|
|
399
|
+
if (policy.pointerEvents !== "none") for (const descriptor of interaction.targets) {
|
|
400
|
+
if (descriptor.pointerEvents === "none") continue;
|
|
401
|
+
let target = this.committedTargets.get(descriptor.target);
|
|
402
|
+
if (!target) {
|
|
403
|
+
target = createTarget(this.instance, this.refs, this.committedTargets.size + created.length + 1);
|
|
404
|
+
created.push(target);
|
|
405
|
+
}
|
|
406
|
+
targets.set(descriptor.target, target);
|
|
407
|
+
registrations.push(prepareTargetUpdate(target, descriptor.handlers ?? {}, {
|
|
364
408
|
path: new Path2D(),
|
|
365
409
|
cursor: descriptor.cursor,
|
|
366
410
|
keyboardFocusable: descriptor.keyboardFocusable,
|
|
367
411
|
keyboardNavigationBounds: descriptor.keyboardNavigationBounds
|
|
368
|
-
},
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
{
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
this.
|
|
391
|
-
this.
|
|
392
|
-
|
|
393
|
-
|
|
412
|
+
}, interaction.transform, interaction.clippingStack));
|
|
413
|
+
const handlers = normalizeHandlers(descriptor.handlers ?? {});
|
|
414
|
+
stage(target, descriptor.keyboardNavigationBounds, descriptor.keyboardFocusable ?? Boolean(handlers.click || handlers.keydown || handlers.keyup));
|
|
415
|
+
}
|
|
416
|
+
const layerEnabled = policy.pointerEvents !== "none" && policy.missBehavior === "target-layer";
|
|
417
|
+
stage(this.layerTarget, policy.keyboardNavigationBounds, layerEnabled && (policy.keyboardFocusable ?? true));
|
|
418
|
+
if (layerEnabled) registrations.push(prepareTargetUpdate(this.layerTarget, { onClick: STRUCTURAL_CLICK_ELIGIBILITY }, {
|
|
419
|
+
path: new Path2D(),
|
|
420
|
+
keyboardFocusable: policy.keyboardFocusable,
|
|
421
|
+
keyboardNavigationBounds: policy.keyboardNavigationBounds
|
|
422
|
+
}, interaction.transform, interaction.clippingStack));
|
|
423
|
+
const hub = this.instance.eventRoot.nativeListeners;
|
|
424
|
+
const types = interaction.snapshot.onInput ? RESOLVER_INPUT_TYPES : hasResolverPointerCapture(this.inputWinner) ? RESOLVER_CAPTURE_INPUT_TYPES : [];
|
|
425
|
+
if (hub) for (const type of types) {
|
|
426
|
+
let lease = this.inputNativeReleases.get(type);
|
|
427
|
+
if (!lease) {
|
|
428
|
+
lease = hub.acquire(type);
|
|
429
|
+
addedInputLeases.push(lease);
|
|
430
|
+
}
|
|
431
|
+
inputLeases.set(type, lease);
|
|
432
|
+
}
|
|
433
|
+
const retired = [];
|
|
434
|
+
for (const [identity, target] of this.committedTargets) if (!targets.has(identity)) retired.push(target);
|
|
435
|
+
if (!layerEnabled && this.layerTarget.live) retired.push(this.layerTarget);
|
|
436
|
+
if (transaction) for (const target of retired) stageLayoutTargetRetirement(transaction, target);
|
|
437
|
+
return { interaction, policy, targets, created, retired, registrations, inputLeases, addedInputLeases, layerEnabled, inverse: interaction.transform.inverse() };
|
|
438
|
+
} catch (error) {
|
|
439
|
+
const errors = [error];
|
|
440
|
+
const release = (callback) => {
|
|
441
|
+
try {
|
|
442
|
+
callback();
|
|
443
|
+
} catch (releaseError) {
|
|
444
|
+
errors.push(releaseError);
|
|
445
|
+
}
|
|
446
|
+
};
|
|
447
|
+
for (const registration of registrations) release(() => registration.finish());
|
|
448
|
+
for (const lease of addedInputLeases) release(lease);
|
|
449
|
+
for (const target of created) release(() => releaseTarget(target));
|
|
450
|
+
if (errors.length > 1) throw new AggregateError(errors, "Render layer interaction preparation failed.", { cause: error });
|
|
451
|
+
throw error;
|
|
394
452
|
}
|
|
453
|
+
}
|
|
454
|
+
adoptInteraction(prepared) {
|
|
455
|
+
const { interaction, policy } = prepared;
|
|
456
|
+
for (const registration of prepared.registrations) registration.adopt();
|
|
457
|
+
prepared.previousInputLeases = this.inputNativeReleases;
|
|
458
|
+
this.inputNativeReleases = prepared.inputLeases;
|
|
459
|
+
this.committedTargets = prepared.targets;
|
|
395
460
|
this.committedInteraction = interaction.snapshot;
|
|
396
461
|
this.committedTargetDescriptors = interaction.targets;
|
|
397
462
|
this.committedPolicy = policy;
|
|
398
|
-
this.
|
|
463
|
+
this.resolverInverseTransform = prepared.inverse;
|
|
464
|
+
this.interactionGeneration++;
|
|
465
|
+
prepared.adopted = true;
|
|
466
|
+
}
|
|
467
|
+
finishPrepared(prepared, success) {
|
|
468
|
+
if (prepared.settled) return;
|
|
469
|
+
prepared.settled = true;
|
|
470
|
+
success = success && prepared.adopted === true;
|
|
471
|
+
const errors = [];
|
|
472
|
+
const finish = (callback) => {
|
|
473
|
+
try {
|
|
474
|
+
callback();
|
|
475
|
+
} catch (error) {
|
|
476
|
+
errors.push(error);
|
|
477
|
+
}
|
|
478
|
+
};
|
|
479
|
+
for (const registration of prepared.registrations) finish(() => registration.finish());
|
|
480
|
+
if (prepared.previousInputLeases) {
|
|
481
|
+
for (const [type, release] of prepared.previousInputLeases) if (!prepared.inputLeases.has(type)) finish(release);
|
|
482
|
+
} else if (!success) for (const release of prepared.addedInputLeases) finish(release);
|
|
483
|
+
for (const target of success ? prepared.retired : prepared.created) finish(() => releaseTarget(target));
|
|
484
|
+
if (success) for (const registration of prepared.registrations) finish(() => registration.notify());
|
|
485
|
+
if (errors.length === 1) throw errors[0];
|
|
486
|
+
if (errors.length) throw new AggregateError(errors, "Render layer registration completion failed.");
|
|
487
|
+
}
|
|
488
|
+
/** Immediate fallback for callers without a root transaction. */
|
|
489
|
+
commitInteraction(interaction, policy) {
|
|
490
|
+
const prepared = this.prepareInteraction(interaction, policy);
|
|
491
|
+
this.adoptInteraction(prepared);
|
|
492
|
+
this.finishPrepared(prepared, true);
|
|
399
493
|
}
|
|
400
494
|
applyResolverGeometry(target, interaction) {
|
|
401
495
|
if (!target.paintEntry) return;
|
|
@@ -408,10 +502,40 @@ class RenderLayerController {
|
|
|
408
502
|
transform: this.resolverTransform,
|
|
409
503
|
clippingStack: this.resolverEntry.clippingStack
|
|
410
504
|
};
|
|
411
|
-
|
|
412
|
-
this.
|
|
413
|
-
|
|
414
|
-
|
|
505
|
+
if (this.committedPolicy.pointerEvents !== "none") {
|
|
506
|
+
for (const descriptor of this.committedTargetDescriptors) {
|
|
507
|
+
if (descriptor.pointerEvents === "none") continue;
|
|
508
|
+
const target = this.committedTargets.get(descriptor.target);
|
|
509
|
+
if (!target) continue;
|
|
510
|
+
if (!target.live) {
|
|
511
|
+
updateTarget(
|
|
512
|
+
target,
|
|
513
|
+
descriptor.handlers ?? {},
|
|
514
|
+
{
|
|
515
|
+
path: new Path2D(),
|
|
516
|
+
cursor: descriptor.cursor,
|
|
517
|
+
keyboardFocusable: descriptor.keyboardFocusable,
|
|
518
|
+
keyboardNavigationBounds: descriptor.keyboardNavigationBounds
|
|
519
|
+
},
|
|
520
|
+
true
|
|
521
|
+
);
|
|
522
|
+
}
|
|
523
|
+
this.applyResolverGeometry(target, interaction);
|
|
524
|
+
this.instance.eventRoot.focusPolicy?.observeTarget(target);
|
|
525
|
+
this.observeTransactionalFocusTarget(target);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
if (this.committedPolicy.pointerEvents !== "none" && this.committedPolicy.missBehavior === "target-layer" && !this.layerTarget.live) {
|
|
529
|
+
updateTarget(
|
|
530
|
+
this.layerTarget,
|
|
531
|
+
{ onClick: STRUCTURAL_CLICK_ELIGIBILITY },
|
|
532
|
+
{
|
|
533
|
+
path: new Path2D(),
|
|
534
|
+
keyboardFocusable: this.committedPolicy.keyboardFocusable,
|
|
535
|
+
keyboardNavigationBounds: this.committedPolicy.keyboardNavigationBounds
|
|
536
|
+
},
|
|
537
|
+
true
|
|
538
|
+
);
|
|
415
539
|
}
|
|
416
540
|
if (this.layerTarget.live) {
|
|
417
541
|
this.applyResolverGeometry(this.layerTarget, interaction);
|
|
@@ -429,6 +553,13 @@ class RenderLayerController {
|
|
|
429
553
|
return;
|
|
430
554
|
}
|
|
431
555
|
const state = this.resolveWinnerState(localX, localY);
|
|
556
|
+
if (state.generation !== this.interactionGeneration || state.geometryGeneration !== snapshotLayoutGeometry(this.instance).generation || this.disposed || this.inputDeliveryGated) {
|
|
557
|
+
output.disposition = PibblHitDisposition.Block;
|
|
558
|
+
output.target = null;
|
|
559
|
+
delete output.winner;
|
|
560
|
+
delete output.winnerState;
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
432
563
|
output.winner = this.inputWinner;
|
|
433
564
|
output.winnerState = state;
|
|
434
565
|
switch (state.hit.kind) {
|
|
@@ -457,6 +588,8 @@ class RenderLayerController {
|
|
|
457
588
|
output.target = null;
|
|
458
589
|
output.winnerState = {
|
|
459
590
|
point: state.point,
|
|
591
|
+
generation: state.generation,
|
|
592
|
+
geometryGeneration: state.geometryGeneration,
|
|
460
593
|
hit: Object.freeze({ kind: "block" })
|
|
461
594
|
};
|
|
462
595
|
this.reportUnknownTarget();
|
|
@@ -469,15 +602,20 @@ class RenderLayerController {
|
|
|
469
602
|
}
|
|
470
603
|
resolveWinnerState(localX, localY) {
|
|
471
604
|
const point = Object.freeze({ x: localX, y: localY });
|
|
605
|
+
const generation = this.interactionGeneration;
|
|
606
|
+
const geometryGeneration = snapshotLayoutGeometry(this.instance).generation;
|
|
472
607
|
if (this.inputGated || !this.committedInteraction) {
|
|
473
|
-
return { point, hit: Object.freeze({ kind: "block" }) };
|
|
608
|
+
return { point, generation, geometryGeneration, hit: Object.freeze({ kind: "block" }) };
|
|
474
609
|
}
|
|
475
610
|
const hit = this.committedInteraction.hitTest(point);
|
|
611
|
+
if (generation !== this.interactionGeneration || geometryGeneration !== snapshotLayoutGeometry(this.instance).generation || this.disposed || this.inputGated) {
|
|
612
|
+
return { point, generation, geometryGeneration, hit: Object.freeze({ kind: "block" }) };
|
|
613
|
+
}
|
|
476
614
|
if (hit.kind === "target" && !this.committedTargets.has(hit.target)) {
|
|
477
615
|
this.reportUnknownTarget();
|
|
478
|
-
return { point, hit: Object.freeze({ kind: "block" }) };
|
|
616
|
+
return { point, generation, geometryGeneration, hit: Object.freeze({ kind: "block" }) };
|
|
479
617
|
}
|
|
480
|
-
return { point, hit };
|
|
618
|
+
return { point, hit, generation, geometryGeneration };
|
|
481
619
|
}
|
|
482
620
|
reportUnknownTarget() {
|
|
483
621
|
if (this.resolutionErrorQueued) return;
|
|
@@ -490,14 +628,17 @@ class RenderLayerController {
|
|
|
490
628
|
}
|
|
491
629
|
deliverInput(type, rootPoint, originalEvent, resolvedState) {
|
|
492
630
|
const snapshot = this.committedInteraction;
|
|
493
|
-
if (!snapshot?.onInput || this.disposed) return;
|
|
631
|
+
if (!snapshot?.onInput || this.disposed || this.inputDeliveryGated) return;
|
|
494
632
|
let state = resolvedState;
|
|
633
|
+
if (state && (state.generation !== this.interactionGeneration || state.geometryGeneration !== snapshotLayoutGeometry(this.instance).generation)) return;
|
|
495
634
|
if (!state) {
|
|
496
|
-
const
|
|
497
|
-
|
|
498
|
-
);
|
|
635
|
+
const bridge = committedInstanceRootTransform(this.instance);
|
|
636
|
+
if (!bridge) return;
|
|
637
|
+
const ownerPoint = bridge.inverse().transformPoint(new DOMPoint(rootPoint.x, rootPoint.y));
|
|
638
|
+
const local = this.resolverInverseTransform.transformPoint(ownerPoint);
|
|
499
639
|
state = this.resolveWinnerState(local.x, local.y);
|
|
500
640
|
}
|
|
641
|
+
if (this.inputDeliveryGated || (state.generation !== this.interactionGeneration || state.geometryGeneration !== snapshotLayoutGeometry(this.instance).generation)) return;
|
|
501
642
|
snapshot.onInput(
|
|
502
643
|
Object.freeze({
|
|
503
644
|
type,
|
|
@@ -536,27 +677,35 @@ class RenderLayerController {
|
|
|
536
677
|
dispose() {
|
|
537
678
|
if (this.disposed) return;
|
|
538
679
|
this.disposed = true;
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
);
|
|
680
|
+
const errors = [];
|
|
681
|
+
const release = (callback) => {
|
|
682
|
+
try {
|
|
683
|
+
callback();
|
|
684
|
+
} catch (error) {
|
|
685
|
+
errors.push(error);
|
|
545
686
|
}
|
|
546
|
-
}
|
|
687
|
+
};
|
|
688
|
+
if (this.created && this.definition.dispose) release(() => assertSynchronous(
|
|
689
|
+
this.definition.dispose(this.resources, this.context),
|
|
690
|
+
"dispose"
|
|
691
|
+
));
|
|
692
|
+
release(() => {
|
|
547
693
|
this.canvas.width = this.canvas.height = 0;
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
694
|
+
});
|
|
695
|
+
release(() => this.candidate?.bitmap.close());
|
|
696
|
+
if (this.candidate?.prepared) release(() => this.finishPrepared(this.candidate.prepared, false));
|
|
697
|
+
release(() => this.committed?.close());
|
|
698
|
+
for (const target of this.committedTargets.values()) release(() => releaseTarget(target));
|
|
699
|
+
this.committedTargets.clear();
|
|
700
|
+
release(() => releaseTarget(this.layerTarget));
|
|
701
|
+
release(() => releaseResolverInputWinner(this.inputWinner));
|
|
702
|
+
for (const lease of this.inputNativeReleases.values()) release(lease);
|
|
703
|
+
this.inputNativeReleases.clear();
|
|
704
|
+
this.candidate = void 0;
|
|
705
|
+
this.committed = void 0;
|
|
706
|
+
this.committedInteraction = void 0;
|
|
707
|
+
if (errors.length === 1) throw errors[0];
|
|
708
|
+
if (errors.length) throw new AggregateError(errors, "Render layer disposal failed.");
|
|
560
709
|
}
|
|
561
710
|
}
|
|
562
711
|
function assertCapability() {
|