@pibbl/core 0.0.1 → 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/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-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/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/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/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 +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/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/physics/lib/2d/world/rapier.js +22 -26
- package/dist/features/physics/lib/2d/world/rapier.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/loader.js +6 -3
- package/dist/features/sprites/loader.js.map +2 -2
- 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 +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 +92 -5
- package/dist/features/viz/index.js +202 -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 +24 -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 +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 +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 +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-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/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-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 +30 -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 +124 -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/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 +10 -6
- 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/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/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/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/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 +43 -6
- 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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ResponsiveStylePreparation, type PreparedQuery } from '../style/responsive.js';
|
|
2
2
|
import type { PibblElement } from '../element/types.js';
|
|
3
3
|
import type { BoxStyle, LayoutItemStyle, ResolvedBoxStyle } from '../style/types.js';
|
|
4
|
-
import type { PibblNodeInput, StyleResolutionContext, SystemStyle } from '../types.js';
|
|
4
|
+
import type { IntrinsicMeasureInput, IntrinsicSizesResult, CanvasMeasurementService, PibblNodeInput, StyleResolutionContext, SystemStyle } from '../types.js';
|
|
5
5
|
import { type PibblStructuralEventProps } from '../components/structural-events.js';
|
|
6
6
|
import type { LayoutBox } from './types.js';
|
|
7
7
|
/**
|
|
@@ -22,7 +22,7 @@ export interface AbsoluteProps extends PibblStructuralEventProps {
|
|
|
22
22
|
/** Descendant content or the callback that supplies it. See {@link PibblNodeInput}. */
|
|
23
23
|
children: PibblNodeInput;
|
|
24
24
|
}
|
|
25
|
-
type LayoutReceiver = 'Absolute' | 'Overlay' | 'Flow' | 'Flex' | 'Grid';
|
|
25
|
+
type LayoutReceiver = 'Absolute' | 'Overlay' | 'Flow' | 'Flex' | 'Grid' | 'Layer';
|
|
26
26
|
/**
|
|
27
27
|
* Describes absolute layout for JSX or createElement authoring.
|
|
28
28
|
*
|
|
@@ -34,19 +34,25 @@ type LayoutReceiver = 'Absolute' | 'Overlay' | 'Flow' | 'Flex' | 'Grid';
|
|
|
34
34
|
* @see {@link AbsoluteStyle}
|
|
35
35
|
*/
|
|
36
36
|
export declare const Absolute: import("@pibbl/core").PibblPrimitiveComponent<AbsoluteProps, import("@pibbl/core").PrimitiveInput<AbsoluteProps, AbsoluteStyle>>;
|
|
37
|
+
/** Pure paired intrinsic contributions for stacking known layout owners. */
|
|
38
|
+
export declare function measureUnionIntrinsic<S extends SystemStyle>(input: IntrinsicMeasureInput<{
|
|
39
|
+
readonly children: PibblNodeInput;
|
|
40
|
+
}, S>, receiver: LayoutReceiver): IntrinsicSizesResult;
|
|
37
41
|
/** @internal Resolves a layout container without inspecting its children. */
|
|
38
42
|
export declare function resolveContainerBox(style: Readonly<BoxStyle>, context: Readonly<StyleResolutionContext>, component: string, algorithm: string): ResolvedBoxStyle;
|
|
39
43
|
export declare function placeAbsoluteChild(container: Readonly<LayoutBox>, child: PibblElement<any>): LayoutBox;
|
|
40
44
|
/** @internal Carries normalized finite content size into the eventual render. */
|
|
41
45
|
export declare function childWithUsedSize(child: PibblElement<any>, style: Readonly<SystemStyle>, width: number, height: number, receiverToken?: object, query?: PreparedQuery): PibblElement<any>;
|
|
46
|
+
/** Rebinds current raw inputs while carrying only a settled content allocation. */
|
|
47
|
+
export declare function childWithCachedUsedSize(child: PibblElement<any>, width: number, height: number): PibblElement<any>;
|
|
42
48
|
/** @internal Shared by the initial direct-child layout algorithms. */
|
|
43
|
-
export declare function resolveDirectChildBox(container: Readonly<LayoutBox>, child: PibblElement<any>, algorithm: string, style?: Readonly<SystemStyle
|
|
49
|
+
export declare function resolveDirectChildBox(container: Readonly<LayoutBox>, child: PibblElement<any>, algorithm: string, style?: Readonly<SystemStyle>, service?: CanvasMeasurementService, receiverToken?: object): ResolvedBoxStyle;
|
|
44
50
|
/** @internal Normalizes a descriptor without resolving or invoking its callback. */
|
|
45
51
|
export declare function normalizeDirectChildStyle(child: PibblElement<any>, receiverToken?: object, queryBasis?: Readonly<LayoutBox>): Readonly<SystemStyle>;
|
|
46
52
|
/** Carries responsive eligibility with this normalization, never with a token. */
|
|
47
|
-
export declare function prepareDirectChildStyle(child: PibblElement<any>, receiverToken?: object, queryBasis?: Readonly<LayoutBox
|
|
53
|
+
export declare function prepareDirectChildStyle(child: PibblElement<any>, receiverToken?: object, queryBasis?: Readonly<LayoutBox>, flexMargins?: boolean): Readonly<SystemStyle> | ResponsiveStylePreparation<Readonly<SystemStyle>>;
|
|
48
54
|
/** @internal Converts source-order descriptors to stable placed children. */
|
|
49
|
-
export declare function placeDirectChildren(children: readonly PibblElement<any>[], contentBox: Readonly<LayoutBox>, place: (child: PibblElement<any
|
|
55
|
+
export declare function placeDirectChildren(children: readonly PibblElement<any>[], contentBox: Readonly<LayoutBox>, place: (child: PibblElement<any>, occurrence: number) => LayoutBox | {
|
|
50
56
|
box: LayoutBox;
|
|
51
57
|
element: PibblElement<any>;
|
|
52
58
|
}, overflow: 'visible' | 'clip'): PibblElement<any>[];
|
|
@@ -1,38 +1,51 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { recordAllocationStyle, configureAllocationCheckpointAdapter, withAllocationCheckpoint, mountedAllocationCheckpointOwner } from "./allocation-checkpoint.js";
|
|
2
|
+
import { participatingLayoutChildren, layoutParticipationPlan } from "./participation.js";
|
|
3
|
+
import { allocatedContentBoxStyle, contentBoxStyle } from "./box-sizing.js";
|
|
4
|
+
import { recordWasmAllocationPass, recordWasmAllocationItem, recordWasmAllocationCacheHit, nativeLayout } from "./wasm/region.js";
|
|
5
|
+
import { registerKnownLayoutPreflight, isKnownLayoutType, claimPreparedLayoutPlan, stagePreparedLayoutPlan, prepareKnownLayoutDescendants, preparePlacedKnownLayout, takePreparedChildStyle, stagePreparedChildStyle } from "./prepared-root.js";
|
|
6
|
+
import { isLayoutComponent, prepareLayoutComponent } from "./define-layout-component.js";
|
|
7
|
+
import { ResponsiveStylePreparation, getStyleMeasurementMode, preparedStyleValue, preparedStyleQuery } from "../style/responsive.js";
|
|
2
8
|
import { definePrimitive } from "../define-primitive.js";
|
|
3
9
|
import { EMPTY_STYLE } from "../style/empty-style.js";
|
|
4
10
|
import { materializeContainerChildren } from "../element/children.js";
|
|
5
11
|
import { clonePibblElement } from "../element/create-element.js";
|
|
6
12
|
import {
|
|
13
|
+
getElementMetadata,
|
|
14
|
+
setElementMetadata,
|
|
7
15
|
getPrimitiveDefinition,
|
|
8
16
|
getChildPrimitiveReceiverToken,
|
|
9
17
|
setPlacementConsumed
|
|
10
18
|
} from "../element/metadata.js";
|
|
11
19
|
import { resolvePrimitiveStyleInput } from "../element/resolve-primitive-inputs.js";
|
|
12
20
|
import { GLOBAL_STATE } from "../global-state.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
21
|
+
import { normalizeBoxInsets, hasPercentageBoxPadding, resolveAllocatedInsets } from "./box-insets.js";
|
|
22
|
+
import { isFitContent, isIntrinsicSizingValue, resolveScalarSizingLength } from "../style/sizing-length.js";
|
|
15
23
|
import {
|
|
16
24
|
extractSystemFilter,
|
|
17
25
|
setPreNormalizedStyle,
|
|
26
|
+
setAllocatedContentSize,
|
|
18
27
|
withoutSystemFilter
|
|
19
28
|
} from "../style/resolve-dispatch.js";
|
|
29
|
+
import { measureElement, measureIntrinsicElement } from "./measure.js";
|
|
30
|
+
import { canvasMeasurementService } from "./canvas-measurement.js";
|
|
20
31
|
import { layoutDiagnostic } from "../style/diagnostics.js";
|
|
21
32
|
import {
|
|
22
33
|
wireStructuralEvents
|
|
23
34
|
} from "../components/structural-events.js";
|
|
24
|
-
import { pushLayoutBox } from "./context.js";
|
|
35
|
+
import { pushLayoutBox, resolvePositionedContainingBox } from "./context.js";
|
|
25
36
|
import { recordLayoutEvaluation } from "./diagnostics.js";
|
|
26
37
|
import { resolveBox } from "./box.js";
|
|
27
38
|
import {
|
|
28
39
|
createPlacementIdentityHint,
|
|
29
40
|
placeChild
|
|
30
41
|
} from "./place-child.js";
|
|
31
|
-
import { withReceiverInputProvision } from "../signals/input-provision.js";
|
|
42
|
+
import { withReceiverInputProvision, captureReceiverInputProvision } from "../signals/input-provision.js";
|
|
43
|
+
import { assertSupportedChildPosition } from "./positioning-diagnostics.js";
|
|
44
|
+
const ABSOLUTE_CONTAINING_BOX_STYLE = /* @__PURE__ */ Symbol("pibbl.absolute-containing-box-style");
|
|
32
45
|
const preparedLayoutTransactions = /* @__PURE__ */ new WeakMap();
|
|
33
46
|
function renderAbsolute(props, style, ctx) {
|
|
34
47
|
wireStructuralEvents(props);
|
|
35
|
-
const
|
|
48
|
+
const ordinaryChildren = nativeLayout ? void 0 : prepareLayoutChildren(props.children, "Absolute");
|
|
36
49
|
recordLayoutEvaluation();
|
|
37
50
|
const content = style.box.contentBox;
|
|
38
51
|
ctx.translate(content.x, content.y);
|
|
@@ -42,30 +55,169 @@ function renderAbsolute(props, style, ctx) {
|
|
|
42
55
|
width: content.width,
|
|
43
56
|
height: content.height
|
|
44
57
|
});
|
|
45
|
-
const releaseLayout = pushLayoutBox(localContent
|
|
58
|
+
const releaseLayout = pushLayoutBox(localContent, {
|
|
59
|
+
logicalOffset: content,
|
|
60
|
+
containingBlock: resolvePositionedContainingBox(
|
|
61
|
+
style[ABSOLUTE_CONTAINING_BOX_STYLE],
|
|
62
|
+
localContent,
|
|
63
|
+
"Absolute"
|
|
64
|
+
)
|
|
65
|
+
});
|
|
46
66
|
GLOBAL_STATE.componentRefs.onAfterRender = releaseLayout;
|
|
67
|
+
const prepared = nativeLayout ? claimPreparedLayoutPlan(GLOBAL_STATE.componentRefs.element, localContent) : void 0;
|
|
68
|
+
const children = prepared?.children ?? ordinaryChildren ?? prepareLayoutChildren(props.children, "Absolute");
|
|
69
|
+
const placements = prepared?.placements ?? (nativeLayout ? withAllocationCheckpoint(mountedAllocationCheckpointOwner(), { children, content: localContent, settings: style, onHit: recordWasmAllocationCacheHit, calculate: () => prepareAbsolutePlacements(children, localContent) }) : void 0);
|
|
70
|
+
let placementIndex = 0;
|
|
47
71
|
let occurrence = 0;
|
|
48
72
|
return placeDirectChildren(
|
|
49
73
|
children,
|
|
50
74
|
localContent,
|
|
51
|
-
(child) =>
|
|
52
|
-
localContent,
|
|
53
|
-
child,
|
|
54
|
-
getChildPrimitiveReceiverToken(
|
|
75
|
+
(child, childOccurrence) => {
|
|
76
|
+
const placement = placements ? placements[placementIndex++] : resolveAbsoluteChildPlacement(localContent, child, getChildPrimitiveReceiverToken(
|
|
55
77
|
GLOBAL_STATE.renderTransaction,
|
|
56
78
|
GLOBAL_STATE.primitiveReceiverToken,
|
|
57
79
|
occurrence++
|
|
58
|
-
)
|
|
59
|
-
|
|
80
|
+
));
|
|
81
|
+
if (nativeLayout && !prepared) preparePlacedKnownLayout(placement.element, childOccurrence);
|
|
82
|
+
return placement;
|
|
83
|
+
},
|
|
60
84
|
style.overflow
|
|
61
85
|
);
|
|
62
86
|
}
|
|
63
87
|
const Absolute = definePrimitive(renderAbsolute, {
|
|
64
88
|
childInput: "structural",
|
|
65
|
-
resolveStyle: (style, context) =>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
89
|
+
resolveStyle: (style, context) => {
|
|
90
|
+
if (nativeLayout && hasPercentageBoxPadding(style)) {
|
|
91
|
+
style = resolveAllocatedInsets(style, {
|
|
92
|
+
width: context.percentageBasis.width,
|
|
93
|
+
context: { ...context, component: "Absolute", algorithm: "absolute" }
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
box: resolveContainerBox(style, context, "Absolute", "absolute"),
|
|
98
|
+
[ABSOLUTE_CONTAINING_BOX_STYLE]: style,
|
|
99
|
+
overflow: style.overflow ?? "visible"
|
|
100
|
+
};
|
|
101
|
+
},
|
|
102
|
+
measureIntrinsic: (input) => measureUnionIntrinsic(input, "Absolute")
|
|
103
|
+
});
|
|
104
|
+
function measureUnionIntrinsic(input, receiver) {
|
|
105
|
+
const owner = {
|
|
106
|
+
x: 0,
|
|
107
|
+
y: 0,
|
|
108
|
+
width: intrinsicMaximum(input.constraints.width),
|
|
109
|
+
height: intrinsicMaximum(input.constraints.height)
|
|
110
|
+
};
|
|
111
|
+
const children = materializeLayoutChildren(input.props.children, receiver);
|
|
112
|
+
let minWidth = 0, minHeight = 0, maxWidth = 0, maxHeight = 0;
|
|
113
|
+
for (let index = 0; index < children.length; index++) {
|
|
114
|
+
const child = children[index];
|
|
115
|
+
const receiverToken = getChildPrimitiveReceiverToken(
|
|
116
|
+
GLOBAL_STATE.renderTransaction,
|
|
117
|
+
GLOBAL_STATE.primitiveReceiverToken,
|
|
118
|
+
index
|
|
119
|
+
);
|
|
120
|
+
const prepared = prepareDirectChildStyle(child, receiverToken, owner);
|
|
121
|
+
let style = preparedStyleValue(prepared);
|
|
122
|
+
if (hasIntrinsicUnionPercentage(style)) {
|
|
123
|
+
return { status: "unsupported", reason: `${receiver} intrinsic percentage child sizes require a definite owner allocation` };
|
|
124
|
+
}
|
|
125
|
+
if (style.boxSizing !== void 0) {
|
|
126
|
+
style = contentBoxStyle(style, {
|
|
127
|
+
width: owner.width,
|
|
128
|
+
height: owner.height,
|
|
129
|
+
context: { component: child.type.name || "Anonymous", algorithm: `${receiver} intrinsic measurement`, constraints: {
|
|
130
|
+
minWidth: 0,
|
|
131
|
+
maxWidth: owner.width,
|
|
132
|
+
minHeight: 0,
|
|
133
|
+
maxHeight: owner.height
|
|
134
|
+
} }
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
assertSupportedChildPosition(receiver, child, style, false, false);
|
|
138
|
+
const insets = normalizeBoxInsets(style, {
|
|
139
|
+
component: child.type.name || "Anonymous",
|
|
140
|
+
algorithm: `${receiver} intrinsic measurement`,
|
|
141
|
+
constraints: { minWidth: 0, maxWidth: owner.width, minHeight: 0, maxHeight: owner.height }
|
|
142
|
+
});
|
|
143
|
+
let measured;
|
|
144
|
+
if (typeof style.width === "number" && typeof style.height === "number") {
|
|
145
|
+
measured = {
|
|
146
|
+
status: "measured",
|
|
147
|
+
minContent: { width: style.width, height: style.height },
|
|
148
|
+
maxContent: { width: style.width, height: style.height }
|
|
149
|
+
};
|
|
150
|
+
} else {
|
|
151
|
+
const measuredChild = clonePibblElement(child);
|
|
152
|
+
setPreNormalizedStyle(measuredChild, style, child, receiverToken, preparedStyleQuery(prepared));
|
|
153
|
+
measured = measureIntrinsicElement(measuredChild, {
|
|
154
|
+
minWidth: 0,
|
|
155
|
+
maxWidth: owner.width,
|
|
156
|
+
minHeight: 0,
|
|
157
|
+
maxHeight: owner.height
|
|
158
|
+
}, input.service);
|
|
159
|
+
if (measured.status !== "measured") return measured;
|
|
160
|
+
}
|
|
161
|
+
const minimumWidth = (typeof style.width === "number" ? style.width : measured.minContent.width) + insets.left + insets.right;
|
|
162
|
+
const maximumWidth = (typeof style.width === "number" ? style.width : measured.maxContent.width) + insets.left + insets.right;
|
|
163
|
+
const minimumHeight = (typeof style.height === "number" ? style.height : measured.minContent.height) + insets.top + insets.bottom;
|
|
164
|
+
const maximumHeight = (typeof style.height === "number" ? style.height : measured.maxContent.height) + insets.top + insets.bottom;
|
|
165
|
+
const left = intrinsicOffset(receiver === "Absolute" ? style.left : void 0, "left", receiver);
|
|
166
|
+
const top = intrinsicOffset(receiver === "Absolute" ? style.top : void 0, "top", receiver);
|
|
167
|
+
if (left.status === "unsupported") return { status: "unsupported", reason: left.reason };
|
|
168
|
+
if (top.status === "unsupported") return { status: "unsupported", reason: top.reason };
|
|
169
|
+
minWidth = Math.max(minWidth, left.value + minimumWidth);
|
|
170
|
+
minHeight = Math.max(minHeight, top.value + minimumHeight);
|
|
171
|
+
maxWidth = Math.max(maxWidth, left.value + maximumWidth);
|
|
172
|
+
maxHeight = Math.max(maxHeight, top.value + maximumHeight);
|
|
173
|
+
}
|
|
174
|
+
return { status: "measured", minContent: { width: minWidth, height: minHeight }, maxContent: { width: maxWidth, height: maxHeight } };
|
|
175
|
+
}
|
|
176
|
+
function intrinsicMaximum(constraint) {
|
|
177
|
+
return constraint.kind === "bounded" ? constraint.max : Number.MAX_SAFE_INTEGER;
|
|
178
|
+
}
|
|
179
|
+
function hasIntrinsicUnionPercentage(style) {
|
|
180
|
+
return hasPercentageBoxPadding(style) || intrinsicPercentage(style.width) || intrinsicPercentage(style.height) || intrinsicPercentage(style.minWidth) || intrinsicPercentage(style.maxWidth) || intrinsicPercentage(style.minHeight) || intrinsicPercentage(style.maxHeight) || intrinsicPercentage(style.left) || intrinsicPercentage(style.top);
|
|
181
|
+
}
|
|
182
|
+
function intrinsicPercentage(value) {
|
|
183
|
+
return typeof value === "string" && value.endsWith("%");
|
|
184
|
+
}
|
|
185
|
+
function intrinsicOffset(value, property, receiver) {
|
|
186
|
+
if (value === void 0) return { status: "measured", value: 0 };
|
|
187
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
188
|
+
return { status: "unsupported", reason: `${receiver} intrinsic ${property} offset must be finite and numeric` };
|
|
189
|
+
}
|
|
190
|
+
return { status: "measured", value: Math.max(0, value) };
|
|
191
|
+
}
|
|
192
|
+
function prepareAbsolutePlacements(children, content) {
|
|
193
|
+
recordWasmAllocationPass();
|
|
194
|
+
const placements = [];
|
|
195
|
+
for (let index = 0; index < children.length; index++) {
|
|
196
|
+
recordWasmAllocationItem();
|
|
197
|
+
placements.push(resolveAbsoluteChildPlacement(content, children[index], getChildPrimitiveReceiverToken(GLOBAL_STATE.renderTransaction, GLOBAL_STATE.primitiveReceiverToken, index)));
|
|
198
|
+
}
|
|
199
|
+
return placements;
|
|
200
|
+
}
|
|
201
|
+
if (nativeLayout) registerKnownLayoutPreflight(Absolute, (element, style, content, receiver, slot) => {
|
|
202
|
+
const previous = GLOBAL_STATE.primitiveReceiverToken;
|
|
203
|
+
GLOBAL_STATE.primitiveReceiverToken = receiver;
|
|
204
|
+
const releaseLayout = pushLayoutBox(content, {
|
|
205
|
+
containingBlock: resolvePositionedContainingBox(
|
|
206
|
+
style,
|
|
207
|
+
content,
|
|
208
|
+
"Absolute"
|
|
209
|
+
)
|
|
210
|
+
});
|
|
211
|
+
try {
|
|
212
|
+
const children = prepareLayoutChildren(element.props.children, "Absolute");
|
|
213
|
+
const placements = withAllocationCheckpoint(slot, { children, content, settings: style, onHit: recordWasmAllocationCacheHit, calculate: () => prepareAbsolutePlacements(children, content) });
|
|
214
|
+
const plan = { content, children, placements };
|
|
215
|
+
prepareKnownLayoutDescendants(plan, slot);
|
|
216
|
+
stagePreparedLayoutPlan(slot, plan);
|
|
217
|
+
} finally {
|
|
218
|
+
releaseLayout();
|
|
219
|
+
GLOBAL_STATE.primitiveReceiverToken = previous;
|
|
220
|
+
}
|
|
69
221
|
});
|
|
70
222
|
function resolveContainerBox(style, context, component, algorithm) {
|
|
71
223
|
return resolveLayoutBox(style, context, component, algorithm, false);
|
|
@@ -75,42 +227,48 @@ function placeAbsoluteChild(container, child) {
|
|
|
75
227
|
}
|
|
76
228
|
function resolveAbsoluteChildPlacement(container, child, receiverToken) {
|
|
77
229
|
const prepared = prepareDirectChildStyle(child, receiverToken, container);
|
|
78
|
-
|
|
79
|
-
|
|
230
|
+
let style = preparedStyleValue(prepared);
|
|
231
|
+
if (nativeLayout && GLOBAL_STATE.currentPibblInstance && getStyleMeasurementMode() === void 0 && hasPercentageBoxPadding(style)) {
|
|
232
|
+
style = resolveAllocatedInsets(style, { width: container.width, context: childDiagnosticContext(child, container, "absolute") });
|
|
233
|
+
}
|
|
234
|
+
assertSupportedChildPosition("Absolute", child, style, false, false);
|
|
235
|
+
const resolved = resolveDirectChildBox(container, child, "absolute", style, void 0, receiverToken);
|
|
80
236
|
const context = childDiagnosticContext(child, container, "absolute");
|
|
81
|
-
const left =
|
|
82
|
-
const top =
|
|
237
|
+
const left = resolveScalarSizingLength(style.left ?? 0, container.width, "left", context);
|
|
238
|
+
const top = resolveScalarSizingLength(style.top ?? 0, container.height, "top", context);
|
|
83
239
|
const box = {
|
|
84
240
|
x: finitePlacement(container.x + left, "left", left, context),
|
|
85
241
|
y: finitePlacement(container.y + top, "top", top, context),
|
|
86
242
|
width: resolved.borderBox.width,
|
|
87
243
|
height: resolved.borderBox.height
|
|
88
244
|
};
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
)
|
|
99
|
-
};
|
|
245
|
+
const element = childWithUsedSize(
|
|
246
|
+
child,
|
|
247
|
+
style,
|
|
248
|
+
resolved.contentBox.width,
|
|
249
|
+
resolved.contentBox.height,
|
|
250
|
+
receiverToken,
|
|
251
|
+
preparedStyleQuery(prepared)
|
|
252
|
+
);
|
|
253
|
+
return { box, element };
|
|
100
254
|
}
|
|
101
255
|
function childWithUsedSize(child, style, width, height, receiverToken, query) {
|
|
102
256
|
const renderedChild = clonePibblElement(child);
|
|
103
257
|
setPlacementConsumed(renderedChild);
|
|
104
|
-
setPreNormalizedStyle(renderedChild, Object.freeze(
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
258
|
+
setPreNormalizedStyle(renderedChild, Object.freeze(allocatedContentBoxStyle(style, width, height)), child, receiverToken, query);
|
|
259
|
+
return renderedChild;
|
|
260
|
+
}
|
|
261
|
+
function childWithCachedUsedSize(child, width, height) {
|
|
262
|
+
const renderedChild = clonePibblElement(child);
|
|
263
|
+
setPlacementConsumed(renderedChild);
|
|
264
|
+
setAllocatedContentSize(renderedChild, width, height);
|
|
109
265
|
return renderedChild;
|
|
110
266
|
}
|
|
111
|
-
function resolveDirectChildBox(container, child, algorithm, style = normalizeDirectChildStyle(child, void 0, container)) {
|
|
267
|
+
function resolveDirectChildBox(container, child, algorithm, style = normalizeDirectChildStyle(child, void 0, container), service, receiverToken) {
|
|
268
|
+
const boxStyle = style;
|
|
269
|
+
if (hasIntrinsicDirectLength(boxStyle)) return resolveIntrinsicDirectChildBox(container, child, algorithm, boxStyle, service, receiverToken);
|
|
112
270
|
return resolveLayoutBox(
|
|
113
|
-
|
|
271
|
+
boxStyle,
|
|
114
272
|
{
|
|
115
273
|
allocation: container,
|
|
116
274
|
percentageBasis: container,
|
|
@@ -128,39 +286,153 @@ function resolveDirectChildBox(container, child, algorithm, style = normalizeDir
|
|
|
128
286
|
true
|
|
129
287
|
);
|
|
130
288
|
}
|
|
289
|
+
function hasIntrinsicDirectLength(style) {
|
|
290
|
+
return isIntrinsicSizingValue(style.width) || isIntrinsicSizingValue(style.height) || isIntrinsicSizingValue(style.minWidth) || isIntrinsicSizingValue(style.maxWidth) || isIntrinsicSizingValue(style.minHeight) || isIntrinsicSizingValue(style.maxHeight);
|
|
291
|
+
}
|
|
292
|
+
function resolveIntrinsicDirectChildBox(container, child, algorithm, style, service, receiverToken) {
|
|
293
|
+
const context = childDiagnosticContext(child, container, algorithm);
|
|
294
|
+
const measurement = service ?? (GLOBAL_STATE.renderContext ? canvasMeasurementService(GLOBAL_STATE.renderContext) : void 0);
|
|
295
|
+
if (!measurement) throw layoutDiagnostic({ ...context, property: "width", value: style.width, reason: "intrinsic sizing requires a Canvas measurement service" });
|
|
296
|
+
const pairedChild = clonePibblElement(child);
|
|
297
|
+
setPreNormalizedStyle(pairedChild, style, child, receiverToken);
|
|
298
|
+
const paired = measureIntrinsicElement(pairedChild, { minWidth: 0, maxWidth: container.width, minHeight: 0, maxHeight: container.height }, measurement);
|
|
299
|
+
if (paired.status !== "measured") throw layoutDiagnostic({ ...context, property: "width", value: style.width, reason: `intrinsic measurement is required but unsupported: ${paired.reason}` });
|
|
300
|
+
let width = intrinsicDirectLength(style.width, paired.minContent.width, paired.maxContent.width, container.width, "width", context);
|
|
301
|
+
const minWidth = intrinsicDirectLength(style.minWidth, paired.minContent.width, paired.maxContent.width, container.width, "minWidth", context);
|
|
302
|
+
const maxWidth = intrinsicDirectLength(style.maxWidth, paired.minContent.width, paired.maxContent.width, container.width, "maxWidth", context);
|
|
303
|
+
let height = intrinsicDirectLength(style.height, paired.minContent.height, paired.maxContent.height, container.height, "height", context);
|
|
304
|
+
const minHeight = intrinsicDirectLength(style.minHeight, paired.minContent.height, paired.maxContent.height, container.height, "minHeight", context);
|
|
305
|
+
const maxHeight = intrinsicDirectLength(style.maxHeight, paired.minContent.height, paired.maxContent.height, container.height, "maxHeight", context);
|
|
306
|
+
if (width !== void 0) {
|
|
307
|
+
const minimum = minWidth ?? scalarDirectBound(style.minWidth, container.width, "minWidth", context) ?? 0;
|
|
308
|
+
const maximum = maxWidth ?? scalarDirectBound(style.maxWidth, container.width, "maxWidth", context) ?? Number.POSITIVE_INFINITY;
|
|
309
|
+
width = Math.min(maximum, Math.max(minimum, width));
|
|
310
|
+
}
|
|
311
|
+
if (height === void 0 && width !== void 0) {
|
|
312
|
+
const measuredChild = clonePibblElement(child);
|
|
313
|
+
setPreNormalizedStyle(measuredChild, { ...style, boxSizing: "content-box", width, minWidth: void 0, maxWidth: void 0 }, child, receiverToken);
|
|
314
|
+
const measured = measureElement(measuredChild, { minWidth: width, maxWidth: width, minHeight: 0, maxHeight: container.height }, measurement);
|
|
315
|
+
if (measured.status !== "measured") throw layoutDiagnostic({ ...context, property: "height", value: style.height ?? "auto", reason: `constrained measurement is required but unsupported: ${measured.reason}` });
|
|
316
|
+
height = measured.size.height;
|
|
317
|
+
}
|
|
318
|
+
const insets = normalizeBoxInsets(style, context);
|
|
319
|
+
const horizontal = style.boxSizing === "border-box" ? insets.left + insets.right : 0;
|
|
320
|
+
const vertical = style.boxSizing === "border-box" ? insets.top + insets.bottom : 0;
|
|
321
|
+
return resolveLayoutBox({
|
|
322
|
+
...style,
|
|
323
|
+
width: width === void 0 ? style.width : width + horizontal,
|
|
324
|
+
height: height === void 0 ? style.height : height + vertical,
|
|
325
|
+
minWidth: minWidth === void 0 ? style.minWidth : minWidth + horizontal,
|
|
326
|
+
maxWidth: maxWidth === void 0 ? style.maxWidth : maxWidth + horizontal,
|
|
327
|
+
minHeight: minHeight === void 0 ? style.minHeight : minHeight + vertical,
|
|
328
|
+
maxHeight: maxHeight === void 0 ? style.maxHeight : maxHeight + vertical
|
|
329
|
+
}, { allocation: container, percentageBasis: container, constraints: { minWidth: 0, maxWidth: container.width, minHeight: 0, maxHeight: container.height }, component: child.type.name || "Anonymous", algorithm: "render-dispatch" }, child.type.name || "Anonymous", algorithm, true);
|
|
330
|
+
}
|
|
331
|
+
function intrinsicDirectLength(value, minimum, maximum, reference, property, context) {
|
|
332
|
+
if (value === "min-content") return minimum;
|
|
333
|
+
if (value === "max-content") return maximum;
|
|
334
|
+
if (isFitContent(value)) {
|
|
335
|
+
const limit = resolveScalarSizingLength(value.limit, reference, property, context);
|
|
336
|
+
return Math.min(maximum, Math.max(minimum, limit));
|
|
337
|
+
}
|
|
338
|
+
return void 0;
|
|
339
|
+
}
|
|
340
|
+
function scalarDirectBound(value, reference, property, context) {
|
|
341
|
+
return value === void 0 || isIntrinsicSizingValue(value) ? void 0 : resolveScalarSizingLength(value, reference, property, context);
|
|
342
|
+
}
|
|
131
343
|
function normalizeDirectChildStyle(child, receiverToken, queryBasis) {
|
|
132
344
|
return preparedStyleValue(prepareDirectChildStyle(child, receiverToken, queryBasis));
|
|
133
345
|
}
|
|
134
|
-
function prepareDirectChildStyle(child, receiverToken, queryBasis) {
|
|
135
|
-
|
|
136
|
-
const
|
|
346
|
+
function prepareDirectChildStyle(child, receiverToken, queryBasis, flexMargins = false) {
|
|
347
|
+
configureAllocationCheckpointAdapter(prepareDirectChildStyle, childWithUsedSize, takePreparedChildStyle, stagePreparedChildStyle, isLayoutComponent, isKnownLayoutType, prepareLayoutComponent);
|
|
348
|
+
const staged = takePreparedChildStyle(child, receiverToken, queryBasis);
|
|
349
|
+
if (staged) {
|
|
350
|
+
recordAllocationStyle(receiverToken, staged);
|
|
351
|
+
return staged;
|
|
352
|
+
}
|
|
353
|
+
let source = child;
|
|
354
|
+
const captured = captureReceiverInputProvision(
|
|
137
355
|
GLOBAL_STATE.renderTransaction,
|
|
138
356
|
receiverToken,
|
|
139
|
-
() =>
|
|
140
|
-
child.
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
357
|
+
() => {
|
|
358
|
+
if (isLayoutComponent(child.type)) source = prepareLayoutComponent(child, { receiverToken });
|
|
359
|
+
return resolvePrimitiveStyleInput(
|
|
360
|
+
source.props.style,
|
|
361
|
+
source,
|
|
362
|
+
queryBasis
|
|
363
|
+
) ?? EMPTY_STYLE;
|
|
364
|
+
}
|
|
144
365
|
);
|
|
366
|
+
const prepared = captured.value;
|
|
367
|
+
const definition = getPrimitiveDefinition(source.type);
|
|
145
368
|
const style = preparedStyleValue(prepared);
|
|
369
|
+
if (!flexMargins) {
|
|
370
|
+
const values = style;
|
|
371
|
+
const property = values.margin !== void 0 ? "margin" : values.marginTop !== void 0 ? "marginTop" : values.marginRight !== void 0 ? "marginRight" : values.marginBottom !== void 0 ? "marginBottom" : values.marginLeft !== void 0 ? "marginLeft" : values.marginStart !== void 0 ? "marginStart" : values.marginEnd !== void 0 ? "marginEnd" : void 0;
|
|
372
|
+
if (property) throw layoutDiagnostic({
|
|
373
|
+
component: child.type.name,
|
|
374
|
+
algorithm: "layout",
|
|
375
|
+
property,
|
|
376
|
+
value: values[property],
|
|
377
|
+
reason: "margins currently require experimental Flex"
|
|
378
|
+
});
|
|
379
|
+
}
|
|
146
380
|
const filter = extractSystemFilter(style);
|
|
147
381
|
const normalized = definition?.normalizeStyle ? definition.normalizeStyle(withoutSystemFilter(style)) : withoutSystemFilter(style);
|
|
148
382
|
const final = { ...normalized, ...filter === void 0 ? {} : { filter }, ...style.transition === void 0 ? {} : { transition: style.transition } };
|
|
149
383
|
if (prepared instanceof ResponsiveStylePreparation) {
|
|
150
384
|
prepared.style = final;
|
|
385
|
+
recordAllocationStyle(receiverToken, prepared, captured.receipt);
|
|
151
386
|
return prepared;
|
|
152
387
|
}
|
|
388
|
+
recordAllocationStyle(receiverToken, final, captured.receipt);
|
|
153
389
|
return final;
|
|
154
390
|
}
|
|
155
391
|
function placeDirectChildren(children, contentBox, place, overflow) {
|
|
392
|
+
const participation = layoutParticipationPlan(children);
|
|
393
|
+
if (participation) {
|
|
394
|
+
const renderSequence = (sequence, insideContents) => {
|
|
395
|
+
const occurrences2 = /* @__PURE__ */ new Map();
|
|
396
|
+
const result = [];
|
|
397
|
+
for (const node of sequence) {
|
|
398
|
+
const child = node.element;
|
|
399
|
+
const occurrence = child.key === void 0 ? occurrences2.get(child.type) ?? 0 : 0;
|
|
400
|
+
if (child.key === void 0) occurrences2.set(child.type, occurrence + 1);
|
|
401
|
+
let element, box;
|
|
402
|
+
if (node.children) {
|
|
403
|
+
element = clonePibblElement(child);
|
|
404
|
+
setElementMetadata(element, { ...getElementMetadata(element), layoutContentsChildren: renderSequence(node.children, true) });
|
|
405
|
+
box = { x: 0, y: 0, width: contentBox.width, height: contentBox.height };
|
|
406
|
+
} else if (node.hidden) {
|
|
407
|
+
element = child;
|
|
408
|
+
box = { x: 0, y: 0, width: 0, height: 0 };
|
|
409
|
+
} else {
|
|
410
|
+
const placement = place(child, occurrence);
|
|
411
|
+
box = "box" in placement ? placement.box : placement;
|
|
412
|
+
element = "box" in placement ? placement.element : child;
|
|
413
|
+
}
|
|
414
|
+
result.push(placeChild({
|
|
415
|
+
element,
|
|
416
|
+
box,
|
|
417
|
+
clipInChildSpace: overflow === "clip" && !insideContents ? {
|
|
418
|
+
x: contentBox.x - box.x,
|
|
419
|
+
y: contentBox.y - box.y,
|
|
420
|
+
width: contentBox.width,
|
|
421
|
+
height: contentBox.height
|
|
422
|
+
} : void 0,
|
|
423
|
+
identityHint: createPlacementIdentityHint(child, occurrence)
|
|
424
|
+
}));
|
|
425
|
+
}
|
|
426
|
+
return result;
|
|
427
|
+
};
|
|
428
|
+
return renderSequence(participation, false);
|
|
429
|
+
}
|
|
156
430
|
const occurrences = /* @__PURE__ */ new Map();
|
|
157
431
|
const placed = [];
|
|
158
432
|
for (const child of children) {
|
|
159
433
|
const occurrence = child.key === void 0 ? occurrences.get(child.type) ?? 0 : 0;
|
|
160
|
-
if (child.key === void 0)
|
|
161
|
-
|
|
162
|
-
}
|
|
163
|
-
const placement = place(child);
|
|
434
|
+
if (child.key === void 0) occurrences.set(child.type, occurrence + 1);
|
|
435
|
+
const placement = place(child, occurrence);
|
|
164
436
|
const box = "box" in placement ? placement.box : placement;
|
|
165
437
|
const element = "box" in placement ? placement.element : child;
|
|
166
438
|
placed.push(placeChild({
|
|
@@ -178,9 +450,9 @@ function placeDirectChildren(children, contentBox, place, overflow) {
|
|
|
178
450
|
return placed;
|
|
179
451
|
}
|
|
180
452
|
function materializeLayoutChildren(children, receiver) {
|
|
181
|
-
return materializeContainerChildren(children, receiver, {
|
|
453
|
+
return participatingLayoutChildren(materializeContainerChildren(children, receiver, {
|
|
182
454
|
validateKeys: false
|
|
183
|
-
});
|
|
455
|
+
}));
|
|
184
456
|
}
|
|
185
457
|
function prepareLayoutChildren(children, receiver) {
|
|
186
458
|
const transaction = GLOBAL_STATE.renderTransaction;
|
|
@@ -251,7 +523,7 @@ function resolveLayoutBox(style, context, component, algorithm, requireDefinite)
|
|
|
251
523
|
"maxHeight",
|
|
252
524
|
diagnosticContext
|
|
253
525
|
);
|
|
254
|
-
const padding =
|
|
526
|
+
const padding = normalizeBoxInsets(style, diagnosticContext);
|
|
255
527
|
const allowOverflow = requireDefinite;
|
|
256
528
|
const maxConstraintWidth = allowOverflow ? allocationCeiling(
|
|
257
529
|
context.allocation.width,
|
|
@@ -284,7 +556,7 @@ function resolveLayoutBox(style, context, component, algorithm, requireDefinite)
|
|
|
284
556
|
}
|
|
285
557
|
function resolveOptionalAllocationLength(value, reference, property, context) {
|
|
286
558
|
if (value === void 0) return void 0;
|
|
287
|
-
return
|
|
559
|
+
return resolveScalarSizingLength(value, reference, property, context);
|
|
288
560
|
}
|
|
289
561
|
function allocationCeiling(allocation, values, padding, property, context) {
|
|
290
562
|
const ceiling = Math.max(allocation, ...values.filter(
|
|
@@ -335,8 +607,10 @@ function finitePlacement(resolved, property, value, context) {
|
|
|
335
607
|
}
|
|
336
608
|
export {
|
|
337
609
|
Absolute,
|
|
610
|
+
childWithCachedUsedSize,
|
|
338
611
|
childWithUsedSize,
|
|
339
612
|
materializeLayoutChildren,
|
|
613
|
+
measureUnionIntrinsic,
|
|
340
614
|
normalizeDirectChildStyle,
|
|
341
615
|
placeAbsoluteChild,
|
|
342
616
|
placeDirectChildren,
|