@pibbl/core 0.0.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/LICENSE.txt +19 -0
- package/README.md +76 -0
- package/THIRD_PARTY_NOTICES.txt +205 -0
- package/dist/features/particles/index.d.ts +7 -0
- package/dist/features/particles/index.js +26 -0
- package/dist/features/particles/index.js.map +7 -0
- package/dist/features/particles/index.mjs +1 -0
- package/dist/features/particles/lib/canvas/birth-ledger.d.ts +69 -0
- package/dist/features/particles/lib/canvas/birth-ledger.js +752 -0
- package/dist/features/particles/lib/canvas/birth-ledger.js.map +7 -0
- package/dist/features/particles/lib/canvas/component.d.ts +14 -0
- package/dist/features/particles/lib/canvas/component.js +249 -0
- package/dist/features/particles/lib/canvas/component.js.map +7 -0
- package/dist/features/particles/lib/canvas/executor.d.ts +31 -0
- package/dist/features/particles/lib/canvas/executor.js +537 -0
- package/dist/features/particles/lib/canvas/executor.js.map +7 -0
- package/dist/features/particles/lib/canvas/primitive.d.ts +14 -0
- package/dist/features/particles/lib/canvas/primitive.js +50 -0
- package/dist/features/particles/lib/canvas/primitive.js.map +7 -0
- package/dist/features/particles/lib/canvas/raster-cache.d.ts +13 -0
- package/dist/features/particles/lib/canvas/raster-cache.js +106 -0
- package/dist/features/particles/lib/canvas/raster-cache.js.map +7 -0
- package/dist/features/particles/lib/color.d.ts +7 -0
- package/dist/features/particles/lib/color.js +159 -0
- package/dist/features/particles/lib/color.js.map +7 -0
- package/dist/features/particles/lib/compiler.d.ts +134 -0
- package/dist/features/particles/lib/compiler.js +443 -0
- package/dist/features/particles/lib/compiler.js.map +7 -0
- package/dist/features/particles/lib/curve.d.ts +19 -0
- package/dist/features/particles/lib/curve.js +129 -0
- package/dist/features/particles/lib/curve.js.map +7 -0
- package/dist/features/particles/lib/definition-records.d.ts +58 -0
- package/dist/features/particles/lib/definition-records.js +500 -0
- package/dist/features/particles/lib/definition-records.js.map +7 -0
- package/dist/features/particles/lib/definition.d.ts +18 -0
- package/dist/features/particles/lib/definition.js +602 -0
- package/dist/features/particles/lib/definition.js.map +7 -0
- package/dist/features/particles/lib/emission.d.ts +54 -0
- package/dist/features/particles/lib/emission.js +184 -0
- package/dist/features/particles/lib/emission.js.map +7 -0
- package/dist/features/particles/lib/flow/field.d.ts +81 -0
- package/dist/features/particles/lib/flow/field.js +585 -0
- package/dist/features/particles/lib/flow/field.js.map +7 -0
- package/dist/features/particles/lib/flow/hook.d.ts +158 -0
- package/dist/features/particles/lib/flow/hook.js +215 -0
- package/dist/features/particles/lib/flow/hook.js.map +7 -0
- package/dist/features/particles/lib/flow/population.d.ts +25 -0
- package/dist/features/particles/lib/flow/population.js +104 -0
- package/dist/features/particles/lib/flow/population.js.map +7 -0
- package/dist/features/particles/lib/particle.d.ts +113 -0
- package/dist/features/particles/lib/particle.js +192 -0
- package/dist/features/particles/lib/particle.js.map +7 -0
- package/dist/features/particles/lib/random.d.ts +16 -0
- package/dist/features/particles/lib/random.js +61 -0
- package/dist/features/particles/lib/random.js.map +7 -0
- package/dist/features/particles/lib/sample.d.ts +32 -0
- package/dist/features/particles/lib/sample.js +397 -0
- package/dist/features/particles/lib/sample.js.map +7 -0
- package/dist/features/particles/lib/signal-inputs.d.ts +6 -0
- package/dist/features/particles/lib/signal-inputs.js +41 -0
- package/dist/features/particles/lib/signal-inputs.js.map +7 -0
- package/dist/features/particles/lib/system/binding.d.ts +59 -0
- package/dist/features/particles/lib/system/binding.js +122 -0
- package/dist/features/particles/lib/system/binding.js.map +7 -0
- package/dist/features/particles/lib/system/controller.d.ts +58 -0
- package/dist/features/particles/lib/system/controller.js +1446 -0
- package/dist/features/particles/lib/system/controller.js.map +7 -0
- package/dist/features/particles/lib/system/hook.d.ts +13 -0
- package/dist/features/particles/lib/system/hook.js +52 -0
- package/dist/features/particles/lib/system/hook.js.map +7 -0
- package/dist/features/particles/lib/system/ownership.d.ts +26 -0
- package/dist/features/particles/lib/system/ownership.js +128 -0
- package/dist/features/particles/lib/system/ownership.js.map +7 -0
- package/dist/features/particles/lib/types.d.ts +983 -0
- package/dist/features/physics/2d-geometry.d.ts +216 -0
- package/dist/features/physics/2d-geometry.js +59 -0
- package/dist/features/physics/2d-geometry.js.map +7 -0
- package/dist/features/physics/2d-geometry.mjs +1 -0
- package/dist/features/physics/2d-testing.d.ts +80 -0
- package/dist/features/physics/2d-testing.js +141 -0
- package/dist/features/physics/2d-testing.js.map +7 -0
- package/dist/features/physics/2d-testing.mjs +1 -0
- package/dist/features/physics/2d.d.ts +165 -0
- package/dist/features/physics/2d.js +119 -0
- package/dist/features/physics/2d.js.map +7 -0
- package/dist/features/physics/2d.mjs +1 -0
- package/dist/features/physics/lib/2d/canvas/components.d.ts +46 -0
- package/dist/features/physics/lib/2d/canvas/components.js +212 -0
- package/dist/features/physics/lib/2d/canvas/components.js.map +7 -0
- package/dist/features/physics/lib/2d/canvas/custom.d.ts +24 -0
- package/dist/features/physics/lib/2d/canvas/custom.js +45 -0
- package/dist/features/physics/lib/2d/canvas/custom.js.map +7 -0
- package/dist/features/physics/lib/2d/canvas/debug.d.ts +23 -0
- package/dist/features/physics/lib/2d/canvas/debug.js +53 -0
- package/dist/features/physics/lib/2d/canvas/debug.js.map +7 -0
- package/dist/features/physics/lib/2d/canvas/inference.d.ts +9 -0
- package/dist/features/physics/lib/2d/canvas/inference.js +704 -0
- package/dist/features/physics/lib/2d/canvas/inference.js.map +7 -0
- package/dist/features/physics/lib/2d/canvas/presentation.d.ts +11 -0
- package/dist/features/physics/lib/2d/canvas/presentation.js +169 -0
- package/dist/features/physics/lib/2d/canvas/presentation.js.map +7 -0
- package/dist/features/physics/lib/2d/collision/analytic.d.ts +15 -0
- package/dist/features/physics/lib/2d/collision/analytic.js +151 -0
- package/dist/features/physics/lib/2d/collision/analytic.js.map +7 -0
- package/dist/features/physics/lib/2d/collision/casts.d.ts +37 -0
- package/dist/features/physics/lib/2d/collision/casts.js +631 -0
- package/dist/features/physics/lib/2d/collision/casts.js.map +7 -0
- package/dist/features/physics/lib/2d/collision/epa.d.ts +21 -0
- package/dist/features/physics/lib/2d/collision/epa.js +102 -0
- package/dist/features/physics/lib/2d/collision/epa.js.map +7 -0
- package/dist/features/physics/lib/2d/collision/gjk.d.ts +28 -0
- package/dist/features/physics/lib/2d/collision/gjk.js +233 -0
- package/dist/features/physics/lib/2d/collision/gjk.js.map +7 -0
- package/dist/features/physics/lib/2d/collision/manifold.d.ts +35 -0
- package/dist/features/physics/lib/2d/collision/manifold.js +238 -0
- package/dist/features/physics/lib/2d/collision/manifold.js.map +7 -0
- package/dist/features/physics/lib/2d/collision/pairs.d.ts +10 -0
- package/dist/features/physics/lib/2d/collision/pairs.js +285 -0
- package/dist/features/physics/lib/2d/collision/pairs.js.map +7 -0
- package/dist/features/physics/lib/2d/collision/support.d.ts +20 -0
- package/dist/features/physics/lib/2d/collision/support.js +155 -0
- package/dist/features/physics/lib/2d/collision/support.js.map +7 -0
- package/dist/features/physics/lib/2d/inspection-types.d.ts +159 -0
- package/dist/features/physics/lib/2d/math.d.ts +27 -0
- package/dist/features/physics/lib/2d/math.js +314 -0
- package/dist/features/physics/lib/2d/math.js.map +7 -0
- package/dist/features/physics/lib/2d/numeric-policy.d.ts +24 -0
- package/dist/features/physics/lib/2d/numeric-policy.js +51 -0
- package/dist/features/physics/lib/2d/numeric-policy.js.map +7 -0
- package/dist/features/physics/lib/2d/runtime/body-handle.d.ts +148 -0
- package/dist/features/physics/lib/2d/runtime/body-handle.js +305 -0
- package/dist/features/physics/lib/2d/runtime/body-handle.js.map +7 -0
- package/dist/features/physics/lib/2d/runtime/context.d.ts +9 -0
- package/dist/features/physics/lib/2d/runtime/context.js +57 -0
- package/dist/features/physics/lib/2d/runtime/context.js.map +7 -0
- package/dist/features/physics/lib/2d/runtime/controller.d.ts +106 -0
- package/dist/features/physics/lib/2d/runtime/controller.js +1317 -0
- package/dist/features/physics/lib/2d/runtime/controller.js.map +7 -0
- package/dist/features/physics/lib/2d/runtime/descriptors.d.ts +153 -0
- package/dist/features/physics/lib/2d/runtime/descriptors.js +526 -0
- package/dist/features/physics/lib/2d/runtime/descriptors.js.map +7 -0
- package/dist/features/physics/lib/2d/runtime/events.d.ts +56 -0
- package/dist/features/physics/lib/2d/runtime/events.js +153 -0
- package/dist/features/physics/lib/2d/runtime/events.js.map +7 -0
- package/dist/features/physics/lib/2d/runtime/obstacles.d.ts +22 -0
- package/dist/features/physics/lib/2d/runtime/obstacles.js +192 -0
- package/dist/features/physics/lib/2d/runtime/obstacles.js.map +7 -0
- package/dist/features/physics/lib/2d/runtime/ownership.d.ts +41 -0
- package/dist/features/physics/lib/2d/runtime/ownership.js +46 -0
- package/dist/features/physics/lib/2d/runtime/ownership.js.map +7 -0
- package/dist/features/physics/lib/2d/runtime/trace.d.ts +32 -0
- package/dist/features/physics/lib/2d/runtime/trace.js +22 -0
- package/dist/features/physics/lib/2d/runtime/trace.js.map +7 -0
- package/dist/features/physics/lib/2d/runtime/world-component.d.ts +18 -0
- package/dist/features/physics/lib/2d/runtime/world-component.js +41 -0
- package/dist/features/physics/lib/2d/runtime/world-component.js.map +7 -0
- package/dist/features/physics/lib/2d/runtime/world-props.d.ts +16 -0
- package/dist/features/physics/lib/2d/shape-records.d.ts +60 -0
- package/dist/features/physics/lib/2d/shape-records.js +26 -0
- package/dist/features/physics/lib/2d/shape-records.js.map +7 -0
- package/dist/features/physics/lib/2d/shapes.d.ts +191 -0
- package/dist/features/physics/lib/2d/shapes.js +543 -0
- package/dist/features/physics/lib/2d/shapes.js.map +7 -0
- package/dist/features/physics/lib/2d/types.d.ts +713 -0
- package/dist/features/physics/lib/2d/types.js +1 -0
- package/dist/features/physics/lib/2d/types.js.map +7 -0
- package/dist/features/physics/lib/2d/world/broad-phase.d.ts +77 -0
- package/dist/features/physics/lib/2d/world/broad-phase.js +762 -0
- package/dist/features/physics/lib/2d/world/broad-phase.js.map +7 -0
- package/dist/features/physics/lib/2d/world/ccd.d.ts +19 -0
- package/dist/features/physics/lib/2d/world/ccd.js +265 -0
- package/dist/features/physics/lib/2d/world/ccd.js.map +7 -0
- package/dist/features/physics/lib/2d/world/contact-cache.d.ts +81 -0
- package/dist/features/physics/lib/2d/world/contact-cache.js +497 -0
- package/dist/features/physics/lib/2d/world/contact-cache.js.map +7 -0
- package/dist/features/physics/lib/2d/world/integrator.d.ts +11 -0
- package/dist/features/physics/lib/2d/world/integrator.js +99 -0
- package/dist/features/physics/lib/2d/world/integrator.js.map +7 -0
- package/dist/features/physics/lib/2d/world/queries.d.ts +62 -0
- package/dist/features/physics/lib/2d/world/queries.js +424 -0
- package/dist/features/physics/lib/2d/world/queries.js.map +7 -0
- package/dist/features/physics/lib/2d/world/rapier-engine.js +7054 -0
- package/dist/features/physics/lib/2d/world/rapier-engine.js.map +7 -0
- package/dist/features/physics/lib/2d/world/rapier.d.ts +50 -0
- package/dist/features/physics/lib/2d/world/rapier.js +655 -0
- package/dist/features/physics/lib/2d/world/rapier.js.map +7 -0
- package/dist/features/physics/lib/2d/world/solver.d.ts +58 -0
- package/dist/features/physics/lib/2d/world/solver.js +660 -0
- package/dist/features/physics/lib/2d/world/solver.js.map +7 -0
- package/dist/features/physics/lib/2d/world/storage.d.ts +96 -0
- package/dist/features/physics/lib/2d/world/storage.js +371 -0
- package/dist/features/physics/lib/2d/world/storage.js.map +7 -0
- package/dist/features/physics/lib/2d/world/world.d.ts +265 -0
- package/dist/features/physics/lib/2d/world/world.js +1713 -0
- package/dist/features/physics/lib/2d/world/world.js.map +7 -0
- package/dist/features/physics/lib/shared/signal-inputs.d.ts +5 -0
- package/dist/features/physics/lib/shared/signal-inputs.js +20 -0
- package/dist/features/physics/lib/shared/signal-inputs.js.map +7 -0
- package/dist/features/physics/lib/shared/validation.d.ts +5 -0
- package/dist/features/physics/lib/shared/validation.js +48 -0
- package/dist/features/physics/lib/shared/validation.js.map +7 -0
- package/dist/features/sprites/formats/aseprite.js +23 -0
- package/dist/features/sprites/formats/aseprite.js.map +7 -0
- package/dist/features/sprites/formats/aseprite.mjs +1 -0
- package/dist/features/sprites/formats/texture-packer.js +14 -0
- package/dist/features/sprites/formats/texture-packer.js.map +7 -0
- package/dist/features/sprites/formats/texture-packer.mjs +1 -0
- package/dist/features/sprites/index.js +9 -0
- package/dist/features/sprites/index.js.map +7 -0
- package/dist/features/sprites/index.mjs +1 -0
- package/dist/features/sprites/loader.js +63 -0
- package/dist/features/sprites/loader.js.map +7 -0
- package/dist/features/sprites/model.js +64 -0
- package/dist/features/sprites/model.js.map +7 -0
- package/dist/features/sprites/sprite.js +31 -0
- package/dist/features/sprites/sprite.js.map +7 -0
- package/dist/features/textures/index.d.ts +22 -0
- package/dist/features/textures/index.js +31 -0
- package/dist/features/textures/index.js.map +7 -0
- package/dist/features/textures/index.mjs +1 -0
- package/dist/features/textures/lib/definitions.d.ts +117 -0
- package/dist/features/textures/lib/definitions.js +179 -0
- package/dist/features/textures/lib/definitions.js.map +7 -0
- package/dist/features/textures/lib/electric-boundary.d.ts +3 -0
- package/dist/features/textures/lib/electric-boundary.js +11 -0
- package/dist/features/textures/lib/electric-boundary.js.map +7 -0
- package/dist/features/textures/lib/electric-shared.d.ts +69 -0
- package/dist/features/textures/lib/electric-shared.js +43 -0
- package/dist/features/textures/lib/electric-shared.js.map +7 -0
- package/dist/features/textures/lib/electric-sources.d.ts +50 -0
- package/dist/features/textures/lib/electric-sources.js +43 -0
- package/dist/features/textures/lib/electric-sources.js.map +7 -0
- package/dist/features/textures/lib/lightning.d.ts +72 -0
- package/dist/features/textures/lib/lightning.js +139 -0
- package/dist/features/textures/lib/lightning.js.map +7 -0
- package/dist/features/textures/lib/material-field.d.ts +12 -0
- package/dist/features/textures/lib/material-field.js +31 -0
- package/dist/features/textures/lib/material-field.js.map +7 -0
- package/dist/features/textures/lib/palette.d.ts +45 -0
- package/dist/features/textures/lib/palette.js +52 -0
- package/dist/features/textures/lib/palette.js.map +7 -0
- package/dist/features/textures/lib/presentation.d.ts +54 -0
- package/dist/features/textures/lib/presentation.js +83 -0
- package/dist/features/textures/lib/presentation.js.map +7 -0
- package/dist/features/textures/lib/procedural-texture.d.ts +44 -0
- package/dist/features/textures/lib/procedural-texture.js +110 -0
- package/dist/features/textures/lib/procedural-texture.js.map +7 -0
- package/dist/features/textures/lib/rain-drops.d.ts +96 -0
- package/dist/features/textures/lib/rain-drops.js +322 -0
- package/dist/features/textures/lib/rain-drops.js.map +7 -0
- package/dist/features/textures/lib/reaction-diffusion.d.ts +67 -0
- package/dist/features/textures/lib/reaction-diffusion.js +210 -0
- package/dist/features/textures/lib/reaction-diffusion.js.map +7 -0
- package/dist/features/textures/lib/simulation.d.ts +16 -0
- package/dist/features/textures/lib/simulation.js +85 -0
- package/dist/features/textures/lib/simulation.js.map +7 -0
- package/dist/features/textures/lib/tendrils.d.ts +57 -0
- package/dist/features/textures/lib/tendrils.js +216 -0
- package/dist/features/textures/lib/tendrils.js.map +7 -0
- package/dist/features/textures/lib/wasm/cellular-bytes.d.ts +1 -0
- package/dist/features/textures/lib/wasm/cellular-bytes.js +5 -0
- package/dist/features/textures/lib/wasm/cellular-bytes.js.map +7 -0
- package/dist/features/textures/lib/wasm/electric.d.ts +88 -0
- package/dist/features/textures/lib/wasm/electric.js +299 -0
- package/dist/features/textures/lib/wasm/electric.js.map +7 -0
- package/dist/features/textures/lib/wasm/ink-bytes.d.ts +1 -0
- package/dist/features/textures/lib/wasm/ink-bytes.js +5 -0
- package/dist/features/textures/lib/wasm/ink-bytes.js.map +7 -0
- package/dist/features/textures/lib/wasm/lightning-bytes.d.ts +1 -0
- package/dist/features/textures/lib/wasm/lightning-bytes.js +5 -0
- package/dist/features/textures/lib/wasm/lightning-bytes.js.map +7 -0
- package/dist/features/textures/lib/wasm/marble-bytes.d.ts +1 -0
- package/dist/features/textures/lib/wasm/marble-bytes.js +5 -0
- package/dist/features/textures/lib/wasm/marble-bytes.js.map +7 -0
- package/dist/features/textures/lib/wasm/memory.d.ts +31 -0
- package/dist/features/textures/lib/wasm/memory.js +103 -0
- package/dist/features/textures/lib/wasm/memory.js.map +7 -0
- package/dist/features/textures/lib/wasm/paper-bytes.d.ts +1 -0
- package/dist/features/textures/lib/wasm/paper-bytes.js +5 -0
- package/dist/features/textures/lib/wasm/paper-bytes.js.map +7 -0
- package/dist/features/textures/lib/wasm/tendrils-bytes.d.ts +1 -0
- package/dist/features/textures/lib/wasm/tendrils-bytes.js +5 -0
- package/dist/features/textures/lib/wasm/tendrils-bytes.js.map +7 -0
- package/dist/features/textures/lib/wasm/water-surface-bytes.d.ts +1 -0
- package/dist/features/textures/lib/wasm/water-surface-bytes.js +5 -0
- package/dist/features/textures/lib/wasm/water-surface-bytes.js.map +7 -0
- package/dist/features/textures/lib/wasm/water-waves-bytes.d.ts +1 -0
- package/dist/features/textures/lib/wasm/water-waves-bytes.js +5 -0
- package/dist/features/textures/lib/wasm/water-waves-bytes.js.map +7 -0
- package/dist/features/textures/lib/water-surface.d.ts +92 -0
- package/dist/features/textures/lib/water-surface.js +378 -0
- package/dist/features/textures/lib/water-surface.js.map +7 -0
- package/dist/features/textures/lib/water-waves.d.ts +60 -0
- package/dist/features/textures/lib/water-waves.js +154 -0
- package/dist/features/textures/lib/water-waves.js.map +7 -0
- package/dist/features/viz/index.d.ts +28 -0
- package/dist/features/viz/index.js +45 -0
- package/dist/features/viz/index.js.map +7 -0
- package/dist/features/viz/index.mjs +1 -0
- package/dist/features/viz/lib/anchored-layout.d.ts +104 -0
- package/dist/features/viz/lib/anchored-layout.js +166 -0
- package/dist/features/viz/lib/anchored-layout.js.map +7 -0
- package/dist/features/viz/lib/axis.d.ts +10 -0
- package/dist/features/viz/lib/axis.js +116 -0
- package/dist/features/viz/lib/axis.js.map +7 -0
- package/dist/features/viz/lib/band-scale.d.ts +3 -0
- package/dist/features/viz/lib/band-scale.js +57 -0
- package/dist/features/viz/lib/band-scale.js.map +7 -0
- package/dist/features/viz/lib/bar-fill.d.ts +16 -0
- package/dist/features/viz/lib/bar-fill.js +53 -0
- package/dist/features/viz/lib/bar-fill.js.map +7 -0
- package/dist/features/viz/lib/bar-series.d.ts +150 -0
- package/dist/features/viz/lib/bar-series.js +152 -0
- package/dist/features/viz/lib/bar-series.js.map +7 -0
- package/dist/features/viz/lib/hover-card.d.ts +92 -0
- package/dist/features/viz/lib/hover-card.js +146 -0
- package/dist/features/viz/lib/hover-card.js.map +7 -0
- package/dist/features/viz/lib/hover-data.d.ts +12 -0
- package/dist/features/viz/lib/hover-data.js +50 -0
- package/dist/features/viz/lib/hover-data.js.map +7 -0
- package/dist/features/viz/lib/hover-placement.d.ts +46 -0
- package/dist/features/viz/lib/hover-placement.js +51 -0
- package/dist/features/viz/lib/hover-placement.js.map +7 -0
- package/dist/features/viz/lib/hover-queries.d.ts +60 -0
- package/dist/features/viz/lib/hover-queries.js +185 -0
- package/dist/features/viz/lib/hover-queries.js.map +7 -0
- package/dist/features/viz/lib/hover-types.d.ts +277 -0
- package/dist/features/viz/lib/layout-pie.d.ts +13 -0
- package/dist/features/viz/lib/layout-pie.js +159 -0
- package/dist/features/viz/lib/layout-pie.js.map +7 -0
- package/dist/features/viz/lib/line-series.d.ts +11 -0
- package/dist/features/viz/lib/line-series.js +89 -0
- package/dist/features/viz/lib/line-series.js.map +7 -0
- package/dist/features/viz/lib/linear-scale.d.ts +3 -0
- package/dist/features/viz/lib/linear-scale.js +70 -0
- package/dist/features/viz/lib/linear-scale.js.map +7 -0
- package/dist/features/viz/lib/nearest.d.ts +82 -0
- package/dist/features/viz/lib/nearest.js +51 -0
- package/dist/features/viz/lib/nearest.js.map +7 -0
- package/dist/features/viz/lib/paint.d.ts +2 -0
- package/dist/features/viz/lib/paint.js +17 -0
- package/dist/features/viz/lib/paint.js.map +7 -0
- package/dist/features/viz/lib/pie-layout.d.ts +31 -0
- package/dist/features/viz/lib/pie-layout.js +324 -0
- package/dist/features/viz/lib/pie-layout.js.map +7 -0
- package/dist/features/viz/lib/pie-slices.d.ts +51 -0
- package/dist/features/viz/lib/pie-slices.js +50 -0
- package/dist/features/viz/lib/pie-slices.js.map +7 -0
- package/dist/features/viz/lib/pie-types.d.ts +215 -0
- package/dist/features/viz/lib/plot-series.d.ts +13 -0
- package/dist/features/viz/lib/plot-series.js +53 -0
- package/dist/features/viz/lib/plot-series.js.map +7 -0
- package/dist/features/viz/lib/plot-types.d.ts +63 -0
- package/dist/features/viz/lib/point-data.d.ts +5 -0
- package/dist/features/viz/lib/point-data.js +17 -0
- package/dist/features/viz/lib/point-data.js.map +7 -0
- package/dist/features/viz/lib/point-geometry.d.ts +2 -0
- package/dist/features/viz/lib/point-geometry.js +24 -0
- package/dist/features/viz/lib/point-geometry.js.map +7 -0
- package/dist/features/viz/lib/point-series.d.ts +11 -0
- package/dist/features/viz/lib/point-series.js +118 -0
- package/dist/features/viz/lib/point-series.js.map +7 -0
- package/dist/features/viz/lib/point-types.d.ts +94 -0
- package/dist/features/viz/lib/scale-adjust.d.ts +11 -0
- package/dist/features/viz/lib/scale-adjust.js +25 -0
- package/dist/features/viz/lib/scale-adjust.js.map +7 -0
- package/dist/features/viz/lib/scale-context.d.ts +8 -0
- package/dist/features/viz/lib/scale-context.js +61 -0
- package/dist/features/viz/lib/scale-context.js.map +7 -0
- package/dist/features/viz/lib/scale.d.ts +11 -0
- package/dist/features/viz/lib/scale.js +80 -0
- package/dist/features/viz/lib/scale.js.map +7 -0
- package/dist/features/viz/lib/types.d.ts +414 -0
- package/dist/features/viz/lib/use-scale.d.ts +20 -0
- package/dist/features/viz/lib/use-scale.js +10 -0
- package/dist/features/viz/lib/use-scale.js.map +7 -0
- package/dist/filters/displacement-gpu.d.ts +38 -0
- package/dist/filters/displacement-gpu.js +243 -0
- package/dist/filters/displacement-gpu.js.map +7 -0
- package/dist/filters/displacement-math.d.ts +5 -0
- package/dist/filters/displacement-math.js +22 -0
- package/dist/filters/displacement-math.js.map +7 -0
- package/dist/filters/displacement.d.ts +13 -0
- package/dist/filters/displacement.js +65 -0
- package/dist/filters/displacement.js.map +7 -0
- package/dist/filters/filter-executor.d.ts +21 -0
- package/dist/filters/filter-executor.js +120 -0
- package/dist/filters/filter-executor.js.map +7 -0
- package/dist/filters/native-canvas-filter.d.ts +4 -0
- package/dist/filters/native-canvas-filter.js +105 -0
- package/dist/filters/native-canvas-filter.js.map +7 -0
- package/dist/filters/native-color.d.ts +2 -0
- package/dist/filters/native-color.js +200 -0
- package/dist/filters/native-color.js.map +7 -0
- package/dist/filters/native-operations.d.ts +8 -0
- package/dist/filters/native-operations.js +7 -0
- package/dist/filters/native-operations.js.map +7 -0
- package/dist/filters/native.d.ts +113 -0
- package/dist/filters/native.js +115 -0
- package/dist/filters/native.js.map +7 -0
- package/dist/filters/reflected-light.d.ts +12 -0
- package/dist/filters/reflected-light.js +93 -0
- package/dist/filters/reflected-light.js.map +7 -0
- package/dist/filters/reflection-gpu.d.ts +58 -0
- package/dist/filters/reflection-gpu.js +266 -0
- package/dist/filters/reflection-gpu.js.map +7 -0
- package/dist/filters/render-displacement-boundary.d.ts +12 -0
- package/dist/filters/render-displacement-boundary.js +116 -0
- package/dist/filters/render-displacement-boundary.js.map +7 -0
- package/dist/filters/render-reflection-boundary.d.ts +15 -0
- package/dist/filters/render-reflection-boundary.js +127 -0
- package/dist/filters/render-reflection-boundary.js.map +7 -0
- package/dist/filters.d.ts +5 -0
- package/dist/filters.js +29 -0
- package/dist/filters.js.map +7 -0
- package/dist/filters.mjs +1 -0
- package/dist/index.d.ts +111 -0
- package/dist/index.js +300 -0
- package/dist/index.js.map +7 -0
- package/dist/index.mjs +1 -0
- package/dist/internal.d.ts +160 -0
- package/dist/internal.js +320 -0
- package/dist/internal.js.map +7 -0
- package/dist/internal.mjs +1 -0
- package/dist/jsx-dev-runtime.d.ts +35 -0
- package/dist/jsx-dev-runtime.js +6 -0
- package/dist/jsx-dev-runtime.js.map +7 -0
- package/dist/jsx-dev-runtime.mjs +1 -0
- package/dist/jsx-runtime.d.ts +35 -0
- package/dist/jsx-runtime.js +7 -0
- package/dist/jsx-runtime.js.map +7 -0
- package/dist/jsx-runtime.mjs +1 -0
- package/dist/lib/animation/definition.d.ts +140 -0
- package/dist/lib/animation/definition.js +605 -0
- package/dist/lib/animation/definition.js.map +7 -0
- package/dist/lib/animation/easing.d.ts +55 -0
- package/dist/lib/animation/easing.js +112 -0
- package/dist/lib/animation/easing.js.map +7 -0
- package/dist/lib/animation/evaluate.d.ts +118 -0
- package/dist/lib/animation/evaluate.js +2398 -0
- package/dist/lib/animation/evaluate.js.map +7 -0
- package/dist/lib/animation/playback.d.ts +30 -0
- package/dist/lib/animation/playback.js +932 -0
- package/dist/lib/animation/playback.js.map +7 -0
- package/dist/lib/animation/program.d.ts +145 -0
- package/dist/lib/animation/program.js +741 -0
- package/dist/lib/animation/program.js.map +7 -0
- package/dist/lib/animation/spring.d.ts +30 -0
- package/dist/lib/animation/spring.js +324 -0
- package/dist/lib/animation/spring.js.map +7 -0
- package/dist/lib/animation/types.d.ts +418 -0
- package/dist/lib/animation/writer-leases.d.ts +47 -0
- package/dist/lib/animation/writer-leases.js +314 -0
- package/dist/lib/animation/writer-leases.js.map +7 -0
- package/dist/lib/backend/canvas-2d-backend.d.ts +4 -0
- package/dist/lib/backend/canvas-2d-backend.js +97 -0
- package/dist/lib/backend/canvas-2d-backend.js.map +7 -0
- package/dist/lib/backend/types.d.ts +309 -0
- package/dist/lib/backend/types.js +26 -0
- package/dist/lib/backend/types.js.map +7 -0
- package/dist/lib/components/arc-geometry.d.ts +4 -0
- package/dist/lib/components/arc-geometry.js +46 -0
- package/dist/lib/components/arc-geometry.js.map +7 -0
- package/dist/lib/components/arc.d.ts +55 -0
- package/dist/lib/components/arc.js +91 -0
- package/dist/lib/components/arc.js.map +7 -0
- package/dist/lib/components/circle.d.ts +49 -0
- package/dist/lib/components/circle.js +46 -0
- package/dist/lib/components/circle.js.map +7 -0
- package/dist/lib/components/clip.d.ts +43 -0
- package/dist/lib/components/clip.js +24 -0
- package/dist/lib/components/clip.js.map +7 -0
- package/dist/lib/components/ellipse.d.ts +53 -0
- package/dist/lib/components/ellipse.js +59 -0
- package/dist/lib/components/ellipse.js.map +7 -0
- package/dist/lib/components/g.d.ts +56 -0
- package/dist/lib/components/g.js +24 -0
- package/dist/lib/components/g.js.map +7 -0
- package/dist/lib/components/horizontal-line.d.ts +56 -0
- package/dist/lib/components/horizontal-line.js +71 -0
- package/dist/lib/components/horizontal-line.js.map +7 -0
- package/dist/lib/components/html-box.d.ts +16 -0
- package/dist/lib/components/html-box.js +57 -0
- package/dist/lib/components/html-box.js.map +7 -0
- package/dist/lib/components/img.d.ts +24 -0
- package/dist/lib/components/img.js +150 -0
- package/dist/lib/components/img.js.map +7 -0
- package/dist/lib/components/layer-node-equality.d.ts +65 -0
- package/dist/lib/components/layer-node-equality.js +91 -0
- package/dist/lib/components/layer-node-equality.js.map +7 -0
- package/dist/lib/components/layer.d.ts +34 -0
- package/dist/lib/components/layer.js +172 -0
- package/dist/lib/components/layer.js.map +7 -0
- package/dist/lib/components/line.d.ts +51 -0
- package/dist/lib/components/line.js +76 -0
- package/dist/lib/components/line.js.map +7 -0
- package/dist/lib/components/path.d.ts +28 -0
- package/dist/lib/components/path.js +47 -0
- package/dist/lib/components/path.js.map +7 -0
- package/dist/lib/components/polygon.d.ts +45 -0
- package/dist/lib/components/polygon.js +93 -0
- package/dist/lib/components/polygon.js.map +7 -0
- package/dist/lib/components/rect.d.ts +24 -0
- package/dist/lib/components/rect.js +83 -0
- package/dist/lib/components/rect.js.map +7 -0
- package/dist/lib/components/regular-polygon.d.ts +102 -0
- package/dist/lib/components/regular-polygon.js +112 -0
- package/dist/lib/components/regular-polygon.js.map +7 -0
- package/dist/lib/components/rounded-corner-style.d.ts +7 -0
- package/dist/lib/components/rounded-corner-style.js +40 -0
- package/dist/lib/components/rounded-corner-style.js.map +7 -0
- package/dist/lib/components/shape-style.d.ts +7 -0
- package/dist/lib/components/shape-style.js +52 -0
- package/dist/lib/components/shape-style.js.map +7 -0
- package/dist/lib/components/star.d.ts +56 -0
- package/dist/lib/components/star.js +98 -0
- package/dist/lib/components/star.js.map +7 -0
- package/dist/lib/components/structural-events.d.ts +10 -0
- package/dist/lib/components/structural-events.js +8 -0
- package/dist/lib/components/structural-events.js.map +7 -0
- package/dist/lib/components/svg-path.d.ts +23 -0
- package/dist/lib/components/svg-path.js +25 -0
- package/dist/lib/components/svg-path.js.map +7 -0
- package/dist/lib/components/text-layout.d.ts +31 -0
- package/dist/lib/components/text-layout.js +139 -0
- package/dist/lib/components/text-layout.js.map +7 -0
- package/dist/lib/components/text.d.ts +29 -0
- package/dist/lib/components/text.js +174 -0
- package/dist/lib/components/text.js.map +7 -0
- package/dist/lib/components/vertical-line.d.ts +57 -0
- package/dist/lib/components/vertical-line.js +71 -0
- package/dist/lib/components/vertical-line.js.map +7 -0
- package/dist/lib/components/wedge.d.ts +55 -0
- package/dist/lib/components/wedge.js +93 -0
- package/dist/lib/components/wedge.js.map +7 -0
- package/dist/lib/define-primitive.d.ts +82 -0
- package/dist/lib/define-primitive.js +85 -0
- package/dist/lib/define-primitive.js.map +7 -0
- package/dist/lib/development.d.ts +2 -0
- package/dist/lib/development.js +5 -0
- package/dist/lib/development.js.map +7 -0
- package/dist/lib/element/children.d.ts +16 -0
- package/dist/lib/element/children.js +333 -0
- package/dist/lib/element/children.js.map +7 -0
- package/dist/lib/element/create-element.d.ts +34 -0
- package/dist/lib/element/create-element.js +75 -0
- package/dist/lib/element/create-element.js.map +7 -0
- package/dist/lib/element/fragment.d.ts +15 -0
- package/dist/lib/element/fragment.js +11 -0
- package/dist/lib/element/fragment.js.map +7 -0
- package/dist/lib/element/jsx-runtime.d.ts +48 -0
- package/dist/lib/element/jsx-runtime.js +16 -0
- package/dist/lib/element/jsx-runtime.js.map +7 -0
- package/dist/lib/element/metadata.d.ts +96 -0
- package/dist/lib/element/metadata.js +160 -0
- package/dist/lib/element/metadata.js.map +7 -0
- package/dist/lib/element/resolve-primitive-inputs.d.ts +12 -0
- package/dist/lib/element/resolve-primitive-inputs.js +83 -0
- package/dist/lib/element/resolve-primitive-inputs.js.map +7 -0
- package/dist/lib/element/types.d.ts +123 -0
- package/dist/lib/element-enhancers.d.ts +134 -0
- package/dist/lib/element-enhancers.js +193 -0
- package/dist/lib/element-enhancers.js.map +7 -0
- package/dist/lib/events/adapters/clipboard.d.ts +9 -0
- package/dist/lib/events/adapters/clipboard.js +23 -0
- package/dist/lib/events/adapters/clipboard.js.map +7 -0
- package/dist/lib/events/adapters/drag.d.ts +12 -0
- package/dist/lib/events/adapters/drag.js +29 -0
- package/dist/lib/events/adapters/drag.js.map +7 -0
- package/dist/lib/events/adapters/editing.d.ts +15 -0
- package/dist/lib/events/adapters/editing.js +41 -0
- package/dist/lib/events/adapters/editing.js.map +7 -0
- package/dist/lib/events/adapters/keyboard-focus.d.ts +12 -0
- package/dist/lib/events/adapters/keyboard-focus.js +36 -0
- package/dist/lib/events/adapters/keyboard-focus.js.map +7 -0
- package/dist/lib/events/adapters/mouse.d.ts +17 -0
- package/dist/lib/events/adapters/mouse.js +32 -0
- package/dist/lib/events/adapters/mouse.js.map +7 -0
- package/dist/lib/events/adapters/pointer.d.ts +19 -0
- package/dist/lib/events/adapters/pointer.js +40 -0
- package/dist/lib/events/adapters/pointer.js.map +7 -0
- package/dist/lib/events/adapters/touch.d.ts +16 -0
- package/dist/lib/events/adapters/touch.js +36 -0
- package/dist/lib/events/adapters/touch.js.map +7 -0
- package/dist/lib/events/adapters/wheel.d.ts +10 -0
- package/dist/lib/events/adapters/wheel.js +16 -0
- package/dist/lib/events/adapters/wheel.js.map +7 -0
- package/dist/lib/events/boundary-transitions.d.ts +9 -0
- package/dist/lib/events/boundary-transitions.js +16 -0
- package/dist/lib/events/boundary-transitions.js.map +7 -0
- package/dist/lib/events/dispatch.d.ts +21 -0
- package/dist/lib/events/dispatch.js +1078 -0
- package/dist/lib/events/dispatch.js.map +7 -0
- package/dist/lib/events/event-definitions.d.ts +23 -0
- package/dist/lib/events/event-definitions.js +74 -0
- package/dist/lib/events/event-definitions.js.map +7 -0
- package/dist/lib/events/event-facade.d.ts +19 -0
- package/dist/lib/events/event-facade.js +188 -0
- package/dist/lib/events/event-facade.js.map +7 -0
- package/dist/lib/events/event-path.d.ts +3 -0
- package/dist/lib/events/event-path.js +43 -0
- package/dist/lib/events/event-path.js.map +7 -0
- package/dist/lib/events/hit-test.d.ts +13 -0
- package/dist/lib/events/hit-test.js +135 -0
- package/dist/lib/events/hit-test.js.map +7 -0
- package/dist/lib/events/native-listener-hub.d.ts +10 -0
- package/dist/lib/events/native-listener-hub.js +72 -0
- package/dist/lib/events/native-listener-hub.js.map +7 -0
- package/dist/lib/events/paint-entry.d.ts +66 -0
- package/dist/lib/events/paint-entry.js +30 -0
- package/dist/lib/events/paint-entry.js.map +7 -0
- package/dist/lib/events/pointer-capture.d.ts +23 -0
- package/dist/lib/events/pointer-capture.js +339 -0
- package/dist/lib/events/pointer-capture.js.map +7 -0
- package/dist/lib/events/propagation.d.ts +7 -0
- package/dist/lib/events/propagation.js +56 -0
- package/dist/lib/events/propagation.js.map +7 -0
- package/dist/lib/events/registrations.d.ts +120 -0
- package/dist/lib/events/registrations.js +397 -0
- package/dist/lib/events/registrations.js.map +7 -0
- package/dist/lib/events/resolver-input.d.ts +25 -0
- package/dist/lib/events/resolver-input.js +62 -0
- package/dist/lib/events/resolver-input.js.map +7 -0
- package/dist/lib/events/types.d.ts +596 -0
- package/dist/lib/execute-render.d.ts +9 -0
- package/dist/lib/execute-render.js +195 -0
- package/dist/lib/execute-render.js.map +7 -0
- package/dist/lib/filter/canvas-state.d.ts +2 -0
- package/dist/lib/filter/canvas-state.js +31 -0
- package/dist/lib/filter/canvas-state.js.map +7 -0
- package/dist/lib/filter/filter-region.d.ts +33 -0
- package/dist/lib/filter/filter-region.js +291 -0
- package/dist/lib/filter/filter-region.js.map +7 -0
- package/dist/lib/filter/filter-surface-pool.d.ts +38 -0
- package/dist/lib/filter/filter-surface-pool.js +252 -0
- package/dist/lib/filter/filter-surface-pool.js.map +7 -0
- package/dist/lib/filter/render-filter-boundary.d.ts +14 -0
- package/dist/lib/filter/render-filter-boundary.js +211 -0
- package/dist/lib/filter/render-filter-boundary.js.map +7 -0
- package/dist/lib/focus/directional-navigation.d.ts +12 -0
- package/dist/lib/focus/directional-navigation.js +86 -0
- package/dist/lib/focus/directional-navigation.js.map +7 -0
- package/dist/lib/focus/dom-focus-host.d.ts +13 -0
- package/dist/lib/focus/dom-focus-host.js +352 -0
- package/dist/lib/focus/dom-focus-host.js.map +7 -0
- package/dist/lib/focus/dom-tab-stops.d.ts +3 -0
- package/dist/lib/focus/dom-tab-stops.js +71 -0
- package/dist/lib/focus/dom-tab-stops.js.map +7 -0
- package/dist/lib/focus/focus-events.d.ts +4 -0
- package/dist/lib/focus/focus-events.js +78 -0
- package/dist/lib/focus/focus-events.js.map +7 -0
- package/dist/lib/focus/focus-manager.d.ts +121 -0
- package/dist/lib/focus/focus-manager.js +1131 -0
- package/dist/lib/focus/focus-manager.js.map +7 -0
- package/dist/lib/focus/geometry.d.ts +4 -0
- package/dist/lib/focus/geometry.js +64 -0
- package/dist/lib/focus/geometry.js.map +7 -0
- package/dist/lib/focus/html-focus-region.d.ts +27 -0
- package/dist/lib/focus/keyboard-defaults.d.ts +7 -0
- package/dist/lib/focus/keyboard-defaults.js +110 -0
- package/dist/lib/focus/keyboard-defaults.js.map +7 -0
- package/dist/lib/focus/policy-components.d.ts +45 -0
- package/dist/lib/focus/policy-components.js +94 -0
- package/dist/lib/focus/policy-components.js.map +7 -0
- package/dist/lib/focus/types.d.ts +37 -0
- package/dist/lib/focus/types.js +7 -0
- package/dist/lib/focus/types.js.map +7 -0
- package/dist/lib/geometry/circle.d.ts +22 -0
- package/dist/lib/geometry/circle.js +13 -0
- package/dist/lib/geometry/circle.js.map +7 -0
- package/dist/lib/geometry/circular-sweep.d.ts +54 -0
- package/dist/lib/geometry/circular-sweep.js +95 -0
- package/dist/lib/geometry/circular-sweep.js.map +7 -0
- package/dist/lib/geometry/ellipse.d.ts +26 -0
- package/dist/lib/geometry/ellipse.js +17 -0
- package/dist/lib/geometry/ellipse.js.map +7 -0
- package/dist/lib/geometry/line.d.ts +20 -0
- package/dist/lib/geometry/line.js +15 -0
- package/dist/lib/geometry/line.js.map +7 -0
- package/dist/lib/geometry/path-arc.d.ts +25 -0
- package/dist/lib/geometry/path-arc.js +57 -0
- package/dist/lib/geometry/path-arc.js.map +7 -0
- package/dist/lib/geometry/path-bend-guide.d.ts +31 -0
- package/dist/lib/geometry/path-bend-guide.js +282 -0
- package/dist/lib/geometry/path-bend-guide.js.map +7 -0
- package/dist/lib/geometry/path-bend-spans.d.ts +31 -0
- package/dist/lib/geometry/path-bend-spans.js +109 -0
- package/dist/lib/geometry/path-bend-spans.js.map +7 -0
- package/dist/lib/geometry/path-bending.d.ts +90 -0
- package/dist/lib/geometry/path-bending.js +202 -0
- package/dist/lib/geometry/path-bending.js.map +7 -0
- package/dist/lib/geometry/path-conversion.d.ts +19 -0
- package/dist/lib/geometry/path-conversion.js +114 -0
- package/dist/lib/geometry/path-conversion.js.map +7 -0
- package/dist/lib/geometry/path-geometry.d.ts +218 -0
- package/dist/lib/geometry/path-geometry.js +557 -0
- package/dist/lib/geometry/path-geometry.js.map +7 -0
- package/dist/lib/geometry/path-radial.d.ts +15 -0
- package/dist/lib/geometry/path-radial.js +107 -0
- package/dist/lib/geometry/path-radial.js.map +7 -0
- package/dist/lib/geometry/path-transforms.d.ts +233 -0
- package/dist/lib/geometry/path-transforms.js +478 -0
- package/dist/lib/geometry/path-transforms.js.map +7 -0
- package/dist/lib/geometry/path-utilities.d.ts +78 -0
- package/dist/lib/geometry/path-utilities.js +341 -0
- package/dist/lib/geometry/path-utilities.js.map +7 -0
- package/dist/lib/geometry/path-wang.d.ts +18 -0
- package/dist/lib/geometry/path-wang.js +136 -0
- package/dist/lib/geometry/path-wang.js.map +7 -0
- package/dist/lib/geometry/path-warp-bezier.d.ts +17 -0
- package/dist/lib/geometry/path-warp-bezier.js +109 -0
- package/dist/lib/geometry/path-warp-bezier.js.map +7 -0
- package/dist/lib/geometry/path-warp.d.ts +27 -0
- package/dist/lib/geometry/path-warp.js +165 -0
- package/dist/lib/geometry/path-warp.js.map +7 -0
- package/dist/lib/geometry/polygon.d.ts +21 -0
- package/dist/lib/geometry/polygon.js +12 -0
- package/dist/lib/geometry/polygon.js.map +7 -0
- package/dist/lib/geometry/rectangle.d.ts +38 -0
- package/dist/lib/geometry/rectangle.js +22 -0
- package/dist/lib/geometry/rectangle.js.map +7 -0
- package/dist/lib/geometry/regular-polygon.d.ts +88 -0
- package/dist/lib/geometry/regular-polygon.js +67 -0
- package/dist/lib/geometry/regular-polygon.js.map +7 -0
- package/dist/lib/geometry/resolve-path.d.ts +4 -0
- package/dist/lib/geometry/resolve-path.js +16 -0
- package/dist/lib/geometry/resolve-path.js.map +7 -0
- package/dist/lib/geometry/rounded-corners.d.ts +28 -0
- package/dist/lib/geometry/rounded-corners.js +118 -0
- package/dist/lib/geometry/rounded-corners.js.map +7 -0
- package/dist/lib/geometry/star.d.ts +39 -0
- package/dist/lib/geometry/star.js +90 -0
- package/dist/lib/geometry/star.js.map +7 -0
- package/dist/lib/geometry/svg-path.d.ts +21 -0
- package/dist/lib/geometry/svg-path.js +7 -0
- package/dist/lib/geometry/svg-path.js.map +7 -0
- package/dist/lib/geometry/transform-bend.d.ts +46 -0
- package/dist/lib/geometry/transform-bend.js +219 -0
- package/dist/lib/geometry/transform-bend.js.map +7 -0
- package/dist/lib/geometry/transform-guide.d.ts +57 -0
- package/dist/lib/geometry/transform-guide.js +157 -0
- package/dist/lib/geometry/transform-guide.js.map +7 -0
- package/dist/lib/geometry/transform-math.d.ts +21 -0
- package/dist/lib/geometry/transform-math.js +91 -0
- package/dist/lib/geometry/transform-math.js.map +7 -0
- package/dist/lib/geometry/transform-mesh.d.ts +39 -0
- package/dist/lib/geometry/transform-mesh.js +129 -0
- package/dist/lib/geometry/transform-mesh.js.map +7 -0
- package/dist/lib/geometry/validation.d.ts +6 -0
- package/dist/lib/geometry/validation.js +42 -0
- package/dist/lib/geometry/validation.js.map +7 -0
- package/dist/lib/global-state.d.ts +63 -0
- package/dist/lib/global-state.js +176 -0
- package/dist/lib/global-state.js.map +7 -0
- package/dist/lib/hooks/hook-slot.d.ts +30 -0
- package/dist/lib/hooks/hook-slot.js +66 -0
- package/dist/lib/hooks/hook-slot.js.map +7 -0
- package/dist/lib/hooks/use-animated-value.d.ts +24 -0
- package/dist/lib/hooks/use-animated-value.js +169 -0
- package/dist/lib/hooks/use-animated-value.js.map +7 -0
- package/dist/lib/hooks/use-canvas-context.d.ts +10 -0
- package/dist/lib/hooks/use-canvas-context.js +13 -0
- package/dist/lib/hooks/use-canvas-context.js.map +7 -0
- package/dist/lib/hooks/use-computed.d.ts +13 -0
- package/dist/lib/hooks/use-computed.js +91 -0
- package/dist/lib/hooks/use-computed.js.map +7 -0
- package/dist/lib/hooks/use-const.d.ts +10 -0
- package/dist/lib/hooks/use-const.js +15 -0
- package/dist/lib/hooks/use-const.js.map +7 -0
- package/dist/lib/hooks/use-cursor.d.ts +16 -0
- package/dist/lib/hooks/use-cursor.js +51 -0
- package/dist/lib/hooks/use-cursor.js.map +7 -0
- package/dist/lib/hooks/use-event-listener.d.ts +10 -0
- package/dist/lib/hooks/use-event-listener.js +24 -0
- package/dist/lib/hooks/use-event-listener.js.map +7 -0
- package/dist/lib/hooks/use-event-target.d.ts +14 -0
- package/dist/lib/hooks/use-event-target.js +30 -0
- package/dist/lib/hooks/use-event-target.js.map +7 -0
- package/dist/lib/hooks/use-layout-box.d.ts +9 -0
- package/dist/lib/hooks/use-layout-box.js +8 -0
- package/dist/lib/hooks/use-layout-box.js.map +7 -0
- package/dist/lib/hooks/use-line-path.d.ts +14 -0
- package/dist/lib/hooks/use-line-path.js +13 -0
- package/dist/lib/hooks/use-line-path.js.map +7 -0
- package/dist/lib/hooks/use-paint-target.d.ts +3 -0
- package/dist/lib/hooks/use-paint-target.js +34 -0
- package/dist/lib/hooks/use-paint-target.js.map +7 -0
- package/dist/lib/hooks/use-playback.d.ts +21 -0
- package/dist/lib/hooks/use-playback.js +87 -0
- package/dist/lib/hooks/use-playback.js.map +7 -0
- package/dist/lib/hooks/use-reaction.d.ts +19 -0
- package/dist/lib/hooks/use-reaction.js +245 -0
- package/dist/lib/hooks/use-reaction.js.map +7 -0
- package/dist/lib/hooks/use-rect-path.d.ts +20 -0
- package/dist/lib/hooks/use-rect-path.js +25 -0
- package/dist/lib/hooks/use-rect-path.js.map +7 -0
- package/dist/lib/hooks/use-ref.d.ts +17 -0
- package/dist/lib/hooks/use-ref.js +8 -0
- package/dist/lib/hooks/use-ref.js.map +7 -0
- package/dist/lib/hooks/use-region.d.ts +11 -0
- package/dist/lib/hooks/use-region.js +34 -0
- package/dist/lib/hooks/use-region.js.map +7 -0
- package/dist/lib/hooks/use-signal.d.ts +12 -0
- package/dist/lib/hooks/use-signal.js +12 -0
- package/dist/lib/hooks/use-signal.js.map +7 -0
- package/dist/lib/hooks/use-svg-path.d.ts +11 -0
- package/dist/lib/hooks/use-svg-path.js +13 -0
- package/dist/lib/hooks/use-svg-path.js.map +7 -0
- package/dist/lib/hooks/use-value-memo-slot.d.ts +12 -0
- package/dist/lib/hooks/use-value-memo-slot.js +45 -0
- package/dist/lib/hooks/use-value-memo-slot.js.map +7 -0
- package/dist/lib/hooks/use-visibility-transition.d.ts +103 -0
- package/dist/lib/hooks/use-visibility-transition.js +195 -0
- package/dist/lib/hooks/use-visibility-transition.js.map +7 -0
- package/dist/lib/html/html-service.d.ts +30 -0
- package/dist/lib/html/html-service.js +281 -0
- package/dist/lib/html/html-service.js.map +7 -0
- package/dist/lib/html/overlay-config.d.ts +3 -0
- package/dist/lib/html/overlay-config.js +37 -0
- package/dist/lib/html/overlay-config.js.map +7 -0
- package/dist/lib/html/portable-clips.d.ts +4 -0
- package/dist/lib/html/portable-clips.js +20 -0
- package/dist/lib/html/portable-clips.js.map +7 -0
- package/dist/lib/html/types.d.ts +110 -0
- package/dist/lib/layout/absolute.d.ts +57 -0
- package/dist/lib/layout/absolute.js +348 -0
- package/dist/lib/layout/absolute.js.map +7 -0
- package/dist/lib/layout/box.d.ts +19 -0
- package/dist/lib/layout/box.js +209 -0
- package/dist/lib/layout/box.js.map +7 -0
- package/dist/lib/layout/context.d.ts +13 -0
- package/dist/lib/layout/context.js +42 -0
- package/dist/lib/layout/context.js.map +7 -0
- package/dist/lib/layout/diagnostics.d.ts +15 -0
- package/dist/lib/layout/diagnostics.js +30 -0
- package/dist/lib/layout/diagnostics.js.map +7 -0
- package/dist/lib/layout/flex.d.ts +64 -0
- package/dist/lib/layout/flex.js +803 -0
- package/dist/lib/layout/flex.js.map +7 -0
- package/dist/lib/layout/flow.d.ts +53 -0
- package/dist/lib/layout/flow.js +400 -0
- package/dist/lib/layout/flow.js.map +7 -0
- package/dist/lib/layout/grid.d.ts +64 -0
- package/dist/lib/layout/grid.js +597 -0
- package/dist/lib/layout/grid.js.map +7 -0
- package/dist/lib/layout/measure.d.ts +19 -0
- package/dist/lib/layout/measure.js +144 -0
- package/dist/lib/layout/measure.js.map +7 -0
- package/dist/lib/layout/overlay.d.ts +42 -0
- package/dist/lib/layout/overlay.js +151 -0
- package/dist/lib/layout/overlay.js.map +7 -0
- package/dist/lib/layout/place-child.d.ts +12 -0
- package/dist/lib/layout/place-child.js +72 -0
- package/dist/lib/layout/place-child.js.map +7 -0
- package/dist/lib/layout/positioning-diagnostics.d.ts +3 -0
- package/dist/lib/layout/positioning-diagnostics.js +15 -0
- package/dist/lib/layout/positioning-diagnostics.js.map +7 -0
- package/dist/lib/layout/types.d.ts +78 -0
- package/dist/lib/manipulation/controller-types.d.ts +299 -0
- package/dist/lib/manipulation/controller.d.ts +57 -0
- package/dist/lib/manipulation/controller.js +464 -0
- package/dist/lib/manipulation/controller.js.map +7 -0
- package/dist/lib/manipulation/coordinates.d.ts +9 -0
- package/dist/lib/manipulation/coordinates.js +55 -0
- package/dist/lib/manipulation/coordinates.js.map +7 -0
- package/dist/lib/manipulation/degrees.d.ts +10 -0
- package/dist/lib/manipulation/degrees.js +9 -0
- package/dist/lib/manipulation/degrees.js.map +7 -0
- package/dist/lib/manipulation/frame.d.ts +24 -0
- package/dist/lib/manipulation/frame.js +101 -0
- package/dist/lib/manipulation/frame.js.map +7 -0
- package/dist/lib/manipulation/geometry.d.ts +4 -0
- package/dist/lib/manipulation/geometry.js +26 -0
- package/dist/lib/manipulation/geometry.js.map +7 -0
- package/dist/lib/manipulation/handles.d.ts +298 -0
- package/dist/lib/manipulation/handles.js +598 -0
- package/dist/lib/manipulation/handles.js.map +7 -0
- package/dist/lib/manipulation/manipulable.d.ts +65 -0
- package/dist/lib/manipulation/manipulable.js +47 -0
- package/dist/lib/manipulation/manipulable.js.map +7 -0
- package/dist/lib/manipulation/ownership.d.ts +15 -0
- package/dist/lib/manipulation/ownership.js +80 -0
- package/dist/lib/manipulation/ownership.js.map +7 -0
- package/dist/lib/manipulation/snap.d.ts +6 -0
- package/dist/lib/manipulation/snap.js +40 -0
- package/dist/lib/manipulation/snap.js.map +7 -0
- package/dist/lib/manipulation/solve.d.ts +2 -0
- package/dist/lib/manipulation/solve.js +563 -0
- package/dist/lib/manipulation/solve.js.map +7 -0
- package/dist/lib/manipulation/types.d.ts +178 -0
- package/dist/lib/mount-pibbl.d.ts +25 -0
- package/dist/lib/mount-pibbl.js +278 -0
- package/dist/lib/mount-pibbl.js.map +7 -0
- package/dist/lib/optional-services.d.ts +8 -0
- package/dist/lib/optional-services.js +11 -0
- package/dist/lib/optional-services.js.map +7 -0
- package/dist/lib/pibbl.d.ts +17 -0
- package/dist/lib/pibbl.js +21 -0
- package/dist/lib/pibbl.js.map +7 -0
- package/dist/lib/primitive-presentation.d.ts +24 -0
- package/dist/lib/primitive-presentation.js +102 -0
- package/dist/lib/primitive-presentation.js.map +7 -0
- package/dist/lib/render-layer/controller.d.ts +67 -0
- package/dist/lib/render-layer/controller.js +603 -0
- package/dist/lib/render-layer/controller.js.map +7 -0
- package/dist/lib/render-layer/define-render-layer.d.ts +17 -0
- package/dist/lib/render-layer/define-render-layer.js +90 -0
- package/dist/lib/render-layer/define-render-layer.js.map +7 -0
- package/dist/lib/render-layer/types.d.ts +315 -0
- package/dist/lib/render-target.d.ts +27 -0
- package/dist/lib/render-target.js +118 -0
- package/dist/lib/render-target.js.map +7 -0
- package/dist/lib/render-transaction.d.ts +10 -0
- package/dist/lib/render-transaction.js +46 -0
- package/dist/lib/render-transaction.js.map +7 -0
- package/dist/lib/render.d.ts +3 -0
- package/dist/lib/render.js +385 -0
- package/dist/lib/render.js.map +7 -0
- package/dist/lib/scheduler/realm-scheduler.d.ts +52 -0
- package/dist/lib/scheduler/realm-scheduler.js +964 -0
- package/dist/lib/scheduler/realm-scheduler.js.map +7 -0
- package/dist/lib/scheduler/renderer-participant.d.ts +257 -0
- package/dist/lib/scheduler/renderer-participant.js +216 -0
- package/dist/lib/scheduler/renderer-participant.js.map +7 -0
- package/dist/lib/scheduler/simulation-participant.d.ts +103 -0
- package/dist/lib/scheduler/simulation-participant.js +229 -0
- package/dist/lib/scheduler/simulation-participant.js.map +7 -0
- package/dist/lib/scheduler/testing.d.ts +56 -0
- package/dist/lib/scheduler/testing.js +71 -0
- package/dist/lib/scheduler/testing.js.map +7 -0
- package/dist/lib/scheduler/types.d.ts +103 -0
- package/dist/lib/signals/edge.d.ts +44 -0
- package/dist/lib/signals/edge.js +245 -0
- package/dist/lib/signals/edge.js.map +7 -0
- package/dist/lib/signals/graph.d.ts +220 -0
- package/dist/lib/signals/graph.js +1035 -0
- package/dist/lib/signals/graph.js.map +7 -0
- package/dist/lib/signals/input-provision.d.ts +3 -0
- package/dist/lib/signals/input-provision.js +67 -0
- package/dist/lib/signals/input-provision.js.map +7 -0
- package/dist/lib/signals/render-consumer.d.ts +21 -0
- package/dist/lib/signals/render-consumer.js +218 -0
- package/dist/lib/signals/render-consumer.js.map +7 -0
- package/dist/lib/signals/resolve-signal-value.d.ts +10 -0
- package/dist/lib/signals/resolve-signal-value.js +17 -0
- package/dist/lib/signals/resolve-signal-value.js.map +7 -0
- package/dist/lib/signals/types.d.ts +80 -0
- package/dist/lib/style/diagnostics.d.ts +83 -0
- package/dist/lib/style/diagnostics.js +63 -0
- package/dist/lib/style/diagnostics.js.map +7 -0
- package/dist/lib/style/empty-style.d.ts +3 -0
- package/dist/lib/style/empty-style.js +5 -0
- package/dist/lib/style/empty-style.js.map +7 -0
- package/dist/lib/style/filter-types.d.ts +243 -0
- package/dist/lib/style/filter-types.js +5 -0
- package/dist/lib/style/filter-types.js.map +7 -0
- package/dist/lib/style/filter.d.ts +7 -0
- package/dist/lib/style/filter.js +50 -0
- package/dist/lib/style/filter.js.map +7 -0
- package/dist/lib/style/normalize.d.ts +18 -0
- package/dist/lib/style/normalize.js +50 -0
- package/dist/lib/style/normalize.js.map +7 -0
- package/dist/lib/style/positioning.d.ts +32 -0
- package/dist/lib/style/positioning.js +81 -0
- package/dist/lib/style/positioning.js.map +7 -0
- package/dist/lib/style/resolve-built-in.d.ts +6 -0
- package/dist/lib/style/resolve-built-in.js +58 -0
- package/dist/lib/style/resolve-built-in.js.map +7 -0
- package/dist/lib/style/resolve-dispatch.d.ts +20 -0
- package/dist/lib/style/resolve-dispatch.js +167 -0
- package/dist/lib/style/resolve-dispatch.js.map +7 -0
- package/dist/lib/style/resolve-length.d.ts +16 -0
- package/dist/lib/style/resolve-length.js +54 -0
- package/dist/lib/style/resolve-length.js.map +7 -0
- package/dist/lib/style/responsive.d.ts +31 -0
- package/dist/lib/style/responsive.js +172 -0
- package/dist/lib/style/responsive.js.map +7 -0
- package/dist/lib/style/types.d.ts +338 -0
- package/dist/lib/surface/resolve-surface.d.ts +4 -0
- package/dist/lib/surface/resolve-surface.js +184 -0
- package/dist/lib/surface/resolve-surface.js.map +7 -0
- package/dist/lib/surface/root-surface.d.ts +7 -0
- package/dist/lib/surface/root-surface.js +171 -0
- package/dist/lib/surface/root-surface.js.map +7 -0
- package/dist/lib/surface/transform.d.ts +4 -0
- package/dist/lib/surface/transform.js +16 -0
- package/dist/lib/surface/transform.js.map +7 -0
- package/dist/lib/surface/types.d.ts +132 -0
- package/dist/lib/teardowns.d.ts +14 -0
- package/dist/lib/teardowns.js +50 -0
- package/dist/lib/teardowns.js.map +7 -0
- package/dist/lib/textures/texture-protocol.d.ts +124 -0
- package/dist/lib/textures/texture-protocol.js +40 -0
- package/dist/lib/textures/texture-protocol.js.map +7 -0
- package/dist/lib/textures/texture.d.ts +170 -0
- package/dist/lib/textures/texture.js +385 -0
- package/dist/lib/textures/texture.js.map +7 -0
- package/dist/lib/transitions/bifrost.d.ts +47 -0
- package/dist/lib/transitions/bifrost.js +91 -0
- package/dist/lib/transitions/bifrost.js.map +7 -0
- package/dist/lib/transitions/binding.d.ts +14 -0
- package/dist/lib/transitions/binding.js +35 -0
- package/dist/lib/transitions/binding.js.map +7 -0
- package/dist/lib/transitions/capture.d.ts +21 -0
- package/dist/lib/transitions/capture.js +91 -0
- package/dist/lib/transitions/capture.js.map +7 -0
- package/dist/lib/transitions/common.d.ts +130 -0
- package/dist/lib/transitions/common.js +57 -0
- package/dist/lib/transitions/common.js.map +7 -0
- package/dist/lib/transitions/define-transition.d.ts +64 -0
- package/dist/lib/transitions/define-transition.js +31 -0
- package/dist/lib/transitions/define-transition.js.map +7 -0
- package/dist/lib/transitions/embers-physics.d.ts +114 -0
- package/dist/lib/transitions/embers-physics.js +161 -0
- package/dist/lib/transitions/embers-physics.js.map +7 -0
- package/dist/lib/transitions/embers.d.ts +67 -0
- package/dist/lib/transitions/embers.js +196 -0
- package/dist/lib/transitions/embers.js.map +7 -0
- package/dist/lib/transitions/fade.d.ts +41 -0
- package/dist/lib/transitions/fade.js +31 -0
- package/dist/lib/transitions/fade.js.map +7 -0
- package/dist/lib/transitions/hologram.d.ts +47 -0
- package/dist/lib/transitions/hologram.js +94 -0
- package/dist/lib/transitions/hologram.js.map +7 -0
- package/dist/lib/transitions/wasm/bifrost-bytes.d.ts +1 -0
- package/dist/lib/transitions/wasm/bifrost-bytes.js +5 -0
- package/dist/lib/transitions/wasm/bifrost-bytes.js.map +7 -0
- package/dist/lib/transitions/wasm/bifrost-kernel.d.ts +1 -0
- package/dist/lib/transitions/wasm/bifrost-kernel.js +27 -0
- package/dist/lib/transitions/wasm/bifrost-kernel.js.map +7 -0
- package/dist/lib/transitions/wasm/embers-bytes.d.ts +1 -0
- package/dist/lib/transitions/wasm/embers-bytes.js +5 -0
- package/dist/lib/transitions/wasm/embers-bytes.js.map +7 -0
- package/dist/lib/transitions/wasm/hologram-bytes.d.ts +1 -0
- package/dist/lib/transitions/wasm/hologram-bytes.js +5 -0
- package/dist/lib/transitions/wasm/hologram-bytes.js.map +7 -0
- package/dist/lib/transitions/wasm/kernel.d.ts +7 -0
- package/dist/lib/transitions/wasm/kernel.js +26 -0
- package/dist/lib/transitions/wasm/kernel.js.map +7 -0
- package/dist/lib/types.d.ts +570 -0
- package/dist/lib/update.d.ts +8 -0
- package/dist/lib/update.js +20 -0
- package/dist/lib/update.js.map +7 -0
- package/dist/lib/util/get-2d-context.d.ts +2 -0
- package/dist/lib/util/get-2d-context.js +11 -0
- package/dist/lib/util/get-2d-context.js.map +7 -0
- package/dist/lib/util/get-mouse-coordinates.d.ts +2 -0
- package/dist/lib/util/get-mouse-coordinates.js +32 -0
- package/dist/lib/util/get-mouse-coordinates.js.map +7 -0
- package/dist/lib/util/is-hit.d.ts +11 -0
- package/dist/lib/util/is-hit.js +52 -0
- package/dist/lib/util/is-hit.js.map +7 -0
- package/dist/lib/util/is-transparent.d.ts +1 -0
- package/dist/lib/util/is-transparent.js +8 -0
- package/dist/lib/util/is-transparent.js.map +7 -0
- package/dist/lib/util/pixel-grid-adjustments.d.ts +8 -0
- package/dist/lib/util/pixel-grid-adjustments.js +28 -0
- package/dist/lib/util/pixel-grid-adjustments.js.map +7 -0
- package/dist/lib/util/push-clipping-path.d.ts +6 -0
- package/dist/lib/util/push-clipping-path.js +28 -0
- package/dist/lib/util/push-clipping-path.js.map +7 -0
- package/dist/lib/util/wire-common-events.d.ts +2 -0
- package/dist/lib/util/wire-common-events.js +15 -0
- package/dist/lib/util/wire-common-events.js.map +7 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.js +1 -0
- package/dist/types.js.map +7 -0
- package/dist/types.mjs +1 -0
- package/package.json +149 -0
|
@@ -0,0 +1,803 @@
|
|
|
1
|
+
import { preparedStyleValue, preparedStyleQuery } from "../style/responsive.js";
|
|
2
|
+
import { definePrimitive } from "../define-primitive.js";
|
|
3
|
+
import { clonePibblElement } from "../element/create-element.js";
|
|
4
|
+
import { getChildPrimitiveReceiverToken } from "../element/metadata.js";
|
|
5
|
+
import { GLOBAL_STATE } from "../global-state.js";
|
|
6
|
+
import { layoutDiagnostic } from "../style/diagnostics.js";
|
|
7
|
+
import {
|
|
8
|
+
wireStructuralEvents
|
|
9
|
+
} from "../components/structural-events.js";
|
|
10
|
+
import { normalizeEdges } from "../style/normalize.js";
|
|
11
|
+
import { resolveLength } from "../style/resolve-length.js";
|
|
12
|
+
import { setPreNormalizedStyle } from "../style/resolve-dispatch.js";
|
|
13
|
+
import {
|
|
14
|
+
childWithUsedSize,
|
|
15
|
+
prepareDirectChildStyle,
|
|
16
|
+
materializeLayoutChildren,
|
|
17
|
+
placeDirectChildren,
|
|
18
|
+
prepareLayoutChildren,
|
|
19
|
+
resolveContainerBox
|
|
20
|
+
} from "./absolute.js";
|
|
21
|
+
import { pushLayoutBox } from "./context.js";
|
|
22
|
+
import { recordLayoutEvaluation } from "./diagnostics.js";
|
|
23
|
+
import { assertSupportedChildPosition } from "./positioning-diagnostics.js";
|
|
24
|
+
import { measureElement } from "./measure.js";
|
|
25
|
+
function renderFlex(props, style, ctx) {
|
|
26
|
+
wireStructuralEvents(props);
|
|
27
|
+
const children = prepareLayoutChildren(props.children, "Flex");
|
|
28
|
+
recordLayoutEvaluation();
|
|
29
|
+
const content = style.box.contentBox;
|
|
30
|
+
ctx.translate(content.x, content.y);
|
|
31
|
+
const localContent = Object.freeze({
|
|
32
|
+
x: 0,
|
|
33
|
+
y: 0,
|
|
34
|
+
width: content.width,
|
|
35
|
+
height: content.height
|
|
36
|
+
});
|
|
37
|
+
const releaseLayout = pushLayoutBox(localContent);
|
|
38
|
+
GLOBAL_STATE.componentRefs.onAfterRender = releaseLayout;
|
|
39
|
+
const service = {
|
|
40
|
+
measureText(value, font) {
|
|
41
|
+
ctx.save();
|
|
42
|
+
try {
|
|
43
|
+
ctx.font = font;
|
|
44
|
+
return ctx.measureText(value);
|
|
45
|
+
} finally {
|
|
46
|
+
ctx.restore();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
const placements = resolveFlexPlacements(
|
|
51
|
+
localContent,
|
|
52
|
+
children,
|
|
53
|
+
style,
|
|
54
|
+
{
|
|
55
|
+
service,
|
|
56
|
+
measureElement: (element, constraints) => measureElement(element, constraints, service)
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
let index = 0;
|
|
60
|
+
return placeDirectChildren(
|
|
61
|
+
children,
|
|
62
|
+
localContent,
|
|
63
|
+
() => placements[index++],
|
|
64
|
+
style.overflow
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
const Flex = definePrimitive(renderFlex, {
|
|
68
|
+
childInput: "structural",
|
|
69
|
+
resolveStyle: (style, context) => ({
|
|
70
|
+
box: resolveContainerBox(style, context, "Flex", "flex"),
|
|
71
|
+
overflow: style.overflow ?? "visible",
|
|
72
|
+
...normalizeFlexOptions(style, context.allocation)
|
|
73
|
+
}),
|
|
74
|
+
measure: (input) => measureFlex(input)
|
|
75
|
+
});
|
|
76
|
+
function measureFlex(input) {
|
|
77
|
+
const children = prepareLayoutChildren(input.props.children, "Flex");
|
|
78
|
+
const widthDefinite = input.style.width !== void 0 && input.style.width !== "auto";
|
|
79
|
+
const heightDefinite = input.style.height !== void 0 && input.style.height !== "auto";
|
|
80
|
+
if (widthDefinite && heightDefinite) {
|
|
81
|
+
return { status: "measured", size: {
|
|
82
|
+
width: resolveMeasuredContainerLength(
|
|
83
|
+
input.style.width,
|
|
84
|
+
input.constraints.maxWidth,
|
|
85
|
+
"width",
|
|
86
|
+
input.constraints
|
|
87
|
+
),
|
|
88
|
+
height: resolveMeasuredContainerLength(
|
|
89
|
+
input.style.height,
|
|
90
|
+
input.constraints.maxHeight,
|
|
91
|
+
"height",
|
|
92
|
+
input.constraints
|
|
93
|
+
)
|
|
94
|
+
} };
|
|
95
|
+
}
|
|
96
|
+
if ((input.style.flexWrap ?? "nowrap") !== "nowrap") {
|
|
97
|
+
return unsupportedIntrinsic("requires nowrap because wrapped intrinsic sizing is deferred");
|
|
98
|
+
}
|
|
99
|
+
const row = (input.style.flexDirection ?? "row") === "row";
|
|
100
|
+
const diagnosticBox = {
|
|
101
|
+
x: 0,
|
|
102
|
+
y: 0,
|
|
103
|
+
width: Number.isFinite(input.constraints.maxWidth) ? input.constraints.maxWidth : 0,
|
|
104
|
+
height: Number.isFinite(input.constraints.maxHeight) ? input.constraints.maxHeight : 0
|
|
105
|
+
};
|
|
106
|
+
const options = normalizeFlexOptions(input.style, diagnosticBox);
|
|
107
|
+
const mainGap = row ? options.columnGap : options.rowGap;
|
|
108
|
+
let intrinsicMain = 0;
|
|
109
|
+
let intrinsicCross = 0;
|
|
110
|
+
let count = 0;
|
|
111
|
+
for (const child of children) {
|
|
112
|
+
const receiverToken = getChildPrimitiveReceiverToken(
|
|
113
|
+
GLOBAL_STATE.renderTransaction,
|
|
114
|
+
GLOBAL_STATE.primitiveReceiverToken,
|
|
115
|
+
count
|
|
116
|
+
);
|
|
117
|
+
const prepared = prepareDirectChildStyle(child, receiverToken, diagnosticBox);
|
|
118
|
+
const style = preparedStyleValue(prepared);
|
|
119
|
+
rejectUnsupportedItemFields(child, style, diagnosticBox);
|
|
120
|
+
const grow = nonnegativeFactor(
|
|
121
|
+
style.flexGrow ?? 0,
|
|
122
|
+
"flexGrow",
|
|
123
|
+
child,
|
|
124
|
+
diagnosticBox
|
|
125
|
+
);
|
|
126
|
+
if (grow !== 0) {
|
|
127
|
+
return unsupportedIntrinsic("does not support flexGrow during intrinsic measurement");
|
|
128
|
+
}
|
|
129
|
+
const shrink = nonnegativeFactor(
|
|
130
|
+
style.flexShrink ?? 1,
|
|
131
|
+
"flexShrink",
|
|
132
|
+
child,
|
|
133
|
+
diagnosticBox
|
|
134
|
+
);
|
|
135
|
+
const basis = style.flexBasis ?? "auto";
|
|
136
|
+
const mainProperty = row ? "width" : "height";
|
|
137
|
+
const crossProperty = row ? "height" : "width";
|
|
138
|
+
const minimumProperty = row ? "minWidth" : "minHeight";
|
|
139
|
+
if ((shrink > 0 || basis === "auto") && style[minimumProperty] === void 0) {
|
|
140
|
+
throw childDiagnostic(
|
|
141
|
+
child,
|
|
142
|
+
minimumProperty,
|
|
143
|
+
style[minimumProperty],
|
|
144
|
+
diagnosticBox,
|
|
145
|
+
"an explicit main-axis minimum is required for shrink or auto basis"
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
const mainValue = basis === "auto" ? style[mainProperty] : basis;
|
|
149
|
+
const crossValue = style[crossProperty];
|
|
150
|
+
if (isPercentage(mainValue) || isPercentage(crossValue) || hasPercentageBounds(style)) {
|
|
151
|
+
return unsupportedIntrinsic("does not support percentage child sizes or bounds");
|
|
152
|
+
}
|
|
153
|
+
if (mainValue === void 0 || mainValue === "auto") {
|
|
154
|
+
return unsupportedIntrinsic("requires a definite child basis; measured auto basis is deferred");
|
|
155
|
+
}
|
|
156
|
+
if (crossValue === void 0 || crossValue === "auto") {
|
|
157
|
+
return unsupportedIntrinsic("requires a definite child cross size");
|
|
158
|
+
}
|
|
159
|
+
const baseMain = intrinsicNumber(mainValue, "flexBasis");
|
|
160
|
+
const baseCross = intrinsicNumber(crossValue, crossProperty);
|
|
161
|
+
const minMain = intrinsicOptionalNumber(style[minimumProperty], 0, minimumProperty);
|
|
162
|
+
const maxMainProperty = row ? "maxWidth" : "maxHeight";
|
|
163
|
+
const maxMain = intrinsicOptionalNumber(
|
|
164
|
+
style[maxMainProperty],
|
|
165
|
+
Number.POSITIVE_INFINITY,
|
|
166
|
+
maxMainProperty
|
|
167
|
+
);
|
|
168
|
+
const minCrossProperty = row ? "minHeight" : "minWidth";
|
|
169
|
+
const maxCrossProperty = row ? "maxHeight" : "maxWidth";
|
|
170
|
+
const minCross = intrinsicOptionalNumber(style[minCrossProperty], 0, minCrossProperty);
|
|
171
|
+
const maxCross = intrinsicOptionalNumber(
|
|
172
|
+
style[maxCrossProperty],
|
|
173
|
+
Number.POSITIVE_INFINITY,
|
|
174
|
+
maxCrossProperty
|
|
175
|
+
);
|
|
176
|
+
const padding = normalizeEdges(
|
|
177
|
+
style.padding,
|
|
178
|
+
"padding",
|
|
179
|
+
childContext(child, diagnosticBox)
|
|
180
|
+
);
|
|
181
|
+
const paddingMain = row ? padding.left + padding.right : padding.top + padding.bottom;
|
|
182
|
+
const paddingCross = row ? padding.top + padding.bottom : padding.left + padding.right;
|
|
183
|
+
intrinsicMain += clamp(baseMain, minMain, maxMain) + paddingMain;
|
|
184
|
+
intrinsicCross = Math.max(
|
|
185
|
+
intrinsicCross,
|
|
186
|
+
clamp(baseCross, minCross, maxCross) + paddingCross
|
|
187
|
+
);
|
|
188
|
+
count++;
|
|
189
|
+
}
|
|
190
|
+
intrinsicMain += Math.max(0, count - 1) * mainGap;
|
|
191
|
+
return { status: "measured", size: {
|
|
192
|
+
width: widthDefinite ? resolveMeasuredContainerLength(
|
|
193
|
+
input.style.width,
|
|
194
|
+
input.constraints.maxWidth,
|
|
195
|
+
"width",
|
|
196
|
+
input.constraints
|
|
197
|
+
) : row ? intrinsicMain : intrinsicCross,
|
|
198
|
+
height: heightDefinite ? resolveMeasuredContainerLength(
|
|
199
|
+
input.style.height,
|
|
200
|
+
input.constraints.maxHeight,
|
|
201
|
+
"height",
|
|
202
|
+
input.constraints
|
|
203
|
+
) : row ? intrinsicCross : intrinsicMain
|
|
204
|
+
} };
|
|
205
|
+
}
|
|
206
|
+
function resolveMeasuredContainerLength(value, reference, property, constraints) {
|
|
207
|
+
const resolved = resolveLength(value, reference, property, {
|
|
208
|
+
component: "Flex",
|
|
209
|
+
algorithm: "measurement",
|
|
210
|
+
constraints
|
|
211
|
+
});
|
|
212
|
+
if (resolved === void 0 || resolved < 0) {
|
|
213
|
+
throw layoutDiagnostic({
|
|
214
|
+
component: "Flex",
|
|
215
|
+
property,
|
|
216
|
+
value,
|
|
217
|
+
algorithm: "measurement",
|
|
218
|
+
constraints,
|
|
219
|
+
reason: "requires a definite nonnegative container size"
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
return resolved;
|
|
223
|
+
}
|
|
224
|
+
function intrinsicNumber(value, property) {
|
|
225
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) {
|
|
226
|
+
throw layoutDiagnostic({
|
|
227
|
+
component: "Flex",
|
|
228
|
+
property,
|
|
229
|
+
value,
|
|
230
|
+
algorithm: "measurement",
|
|
231
|
+
reason: "intrinsic measurement requires finite nonnegative numeric sizes"
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
return value;
|
|
235
|
+
}
|
|
236
|
+
function intrinsicOptionalNumber(value, fallback, property) {
|
|
237
|
+
return value === void 0 ? fallback : intrinsicNumber(value, property);
|
|
238
|
+
}
|
|
239
|
+
function isPercentage(value) {
|
|
240
|
+
return typeof value === "string" && value.endsWith("%");
|
|
241
|
+
}
|
|
242
|
+
function hasPercentageBounds(style) {
|
|
243
|
+
return [
|
|
244
|
+
style.minWidth,
|
|
245
|
+
style.maxWidth,
|
|
246
|
+
style.minHeight,
|
|
247
|
+
style.maxHeight
|
|
248
|
+
].some(isPercentage);
|
|
249
|
+
}
|
|
250
|
+
function unsupportedIntrinsic(reason) {
|
|
251
|
+
return {
|
|
252
|
+
status: "unsupported",
|
|
253
|
+
reason: `Flex intrinsic measurement ${reason}`
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
function layoutFlex(container, children, style, measurement) {
|
|
257
|
+
const prepared = materializeLayoutChildren(children, "Flex");
|
|
258
|
+
return resolveFlexPlacements(container, prepared, style, measurement).map((placement) => placement.box);
|
|
259
|
+
}
|
|
260
|
+
function resolveFlexPlacements(container, children, style, measurement) {
|
|
261
|
+
assertFiniteBox(container);
|
|
262
|
+
const options = normalizeFlexOptions(style, container);
|
|
263
|
+
const row = options.flexDirection === "row";
|
|
264
|
+
const mainSize = row ? container.width : container.height;
|
|
265
|
+
const crossSize = row ? container.height : container.width;
|
|
266
|
+
const mainGap = row ? options.columnGap : options.rowGap;
|
|
267
|
+
const crossGap = row ? options.rowGap : options.columnGap;
|
|
268
|
+
const items = [];
|
|
269
|
+
for (const child of children) {
|
|
270
|
+
const receiverToken = getChildPrimitiveReceiverToken(
|
|
271
|
+
GLOBAL_STATE.renderTransaction,
|
|
272
|
+
GLOBAL_STATE.primitiveReceiverToken,
|
|
273
|
+
items.length
|
|
274
|
+
);
|
|
275
|
+
const prepared = prepareDirectChildStyle(child, receiverToken, container);
|
|
276
|
+
const normalized = preparedStyleValue(prepared);
|
|
277
|
+
assertSupportedChildPosition("Flex", child, normalized);
|
|
278
|
+
rejectUnsupportedItemFields(child, normalized, container);
|
|
279
|
+
const grow = nonnegativeFactor(normalized.flexGrow ?? 0, "flexGrow", child, container);
|
|
280
|
+
const shrink = nonnegativeFactor(
|
|
281
|
+
normalized.flexShrink ?? 1,
|
|
282
|
+
"flexShrink",
|
|
283
|
+
child,
|
|
284
|
+
container
|
|
285
|
+
);
|
|
286
|
+
const basisValue = normalized.flexBasis ?? "auto";
|
|
287
|
+
const minimumProperty = row ? "minWidth" : "minHeight";
|
|
288
|
+
if ((shrink > 0 || basisValue === "auto") && normalized[minimumProperty] === void 0) {
|
|
289
|
+
throw childDiagnostic(
|
|
290
|
+
child,
|
|
291
|
+
minimumProperty,
|
|
292
|
+
normalized[minimumProperty],
|
|
293
|
+
container,
|
|
294
|
+
"an explicit main-axis minimum is required for shrink or auto basis"
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
const mainProperty = row ? "width" : "height";
|
|
298
|
+
const crossProperty = row ? "height" : "width";
|
|
299
|
+
const mainReference = mainSize;
|
|
300
|
+
const crossReference = crossSize;
|
|
301
|
+
let measured;
|
|
302
|
+
const specifiedMain = normalized[mainProperty];
|
|
303
|
+
const specifiedCross = normalized[crossProperty];
|
|
304
|
+
const needsMeasuredMain = basisValue === "auto" && (specifiedMain === void 0 || specifiedMain === "auto");
|
|
305
|
+
const crossAuto = specifiedCross === void 0 || specifiedCross === "auto";
|
|
306
|
+
const alignment = normalizeItemAlignment(normalized.alignSelf, child, container);
|
|
307
|
+
const needsMeasuredCross = crossAuto && alignment !== "stretch" && options.alignItems !== "stretch";
|
|
308
|
+
if (needsMeasuredMain || needsMeasuredCross || crossAuto) {
|
|
309
|
+
const constraints = {
|
|
310
|
+
minWidth: 0,
|
|
311
|
+
maxWidth: container.width,
|
|
312
|
+
minHeight: 0,
|
|
313
|
+
maxHeight: container.height
|
|
314
|
+
};
|
|
315
|
+
const measurementChild = clonePibblElement(child);
|
|
316
|
+
setPreNormalizedStyle(
|
|
317
|
+
measurementChild,
|
|
318
|
+
normalized,
|
|
319
|
+
child,
|
|
320
|
+
receiverToken,
|
|
321
|
+
preparedStyleQuery(prepared)
|
|
322
|
+
);
|
|
323
|
+
const result = measurement.measureElement(measurementChild, constraints);
|
|
324
|
+
if (result.status === "measured") {
|
|
325
|
+
measured = result.size;
|
|
326
|
+
} else if (needsMeasuredMain || crossAuto && effectiveAlignment(
|
|
327
|
+
alignment,
|
|
328
|
+
options.alignItems
|
|
329
|
+
) !== "stretch") {
|
|
330
|
+
throw childDiagnostic(
|
|
331
|
+
child,
|
|
332
|
+
needsMeasuredMain ? mainProperty : crossProperty,
|
|
333
|
+
"auto",
|
|
334
|
+
container,
|
|
335
|
+
`measurement is required but unsupported: ${result.reason}`
|
|
336
|
+
);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
const baseMain = resolveBasis(
|
|
340
|
+
basisValue,
|
|
341
|
+
specifiedMain,
|
|
342
|
+
measured?.[mainProperty],
|
|
343
|
+
mainReference,
|
|
344
|
+
mainProperty,
|
|
345
|
+
child,
|
|
346
|
+
container
|
|
347
|
+
);
|
|
348
|
+
const preferredCross = crossAuto ? measured?.[crossProperty] ?? 0 : resolveItemLength(
|
|
349
|
+
specifiedCross,
|
|
350
|
+
crossReference,
|
|
351
|
+
crossProperty,
|
|
352
|
+
child,
|
|
353
|
+
container
|
|
354
|
+
);
|
|
355
|
+
const padding = normalizeEdges(normalized.padding, "padding", childContext(child, container));
|
|
356
|
+
const paddingMain = row ? padding.left + padding.right : padding.top + padding.bottom;
|
|
357
|
+
const paddingCross = row ? padding.top + padding.bottom : padding.left + padding.right;
|
|
358
|
+
const minMain = resolveOptionalBound(
|
|
359
|
+
normalized[minimumProperty],
|
|
360
|
+
mainReference,
|
|
361
|
+
minimumProperty,
|
|
362
|
+
0,
|
|
363
|
+
child,
|
|
364
|
+
container
|
|
365
|
+
);
|
|
366
|
+
const maximumProperty = row ? "maxWidth" : "maxHeight";
|
|
367
|
+
const maxMain = resolveOptionalBound(
|
|
368
|
+
normalized[maximumProperty],
|
|
369
|
+
mainReference,
|
|
370
|
+
maximumProperty,
|
|
371
|
+
Number.POSITIVE_INFINITY,
|
|
372
|
+
child,
|
|
373
|
+
container
|
|
374
|
+
);
|
|
375
|
+
const minCrossProperty = row ? "minHeight" : "minWidth";
|
|
376
|
+
const maxCrossProperty = row ? "maxHeight" : "maxWidth";
|
|
377
|
+
const minCross = resolveOptionalBound(
|
|
378
|
+
normalized[minCrossProperty],
|
|
379
|
+
crossReference,
|
|
380
|
+
minCrossProperty,
|
|
381
|
+
0,
|
|
382
|
+
child,
|
|
383
|
+
container
|
|
384
|
+
);
|
|
385
|
+
const maxCross = resolveOptionalBound(
|
|
386
|
+
normalized[maxCrossProperty],
|
|
387
|
+
crossReference,
|
|
388
|
+
maxCrossProperty,
|
|
389
|
+
Number.POSITIVE_INFINITY,
|
|
390
|
+
child,
|
|
391
|
+
container
|
|
392
|
+
);
|
|
393
|
+
if (minMain > maxMain) {
|
|
394
|
+
throw childDiagnostic(
|
|
395
|
+
child,
|
|
396
|
+
minimumProperty,
|
|
397
|
+
minMain,
|
|
398
|
+
container,
|
|
399
|
+
"minimum must not exceed maximum"
|
|
400
|
+
);
|
|
401
|
+
}
|
|
402
|
+
if (minCross > maxCross) {
|
|
403
|
+
throw childDiagnostic(
|
|
404
|
+
child,
|
|
405
|
+
minCrossProperty,
|
|
406
|
+
minCross,
|
|
407
|
+
container,
|
|
408
|
+
"minimum must not exceed maximum"
|
|
409
|
+
);
|
|
410
|
+
}
|
|
411
|
+
items.push({
|
|
412
|
+
child,
|
|
413
|
+
normalized,
|
|
414
|
+
baseMain,
|
|
415
|
+
targetMain: baseMain,
|
|
416
|
+
paddingMain,
|
|
417
|
+
preferredCross: clamp(preferredCross, minCross, maxCross) + paddingCross,
|
|
418
|
+
paddingCross,
|
|
419
|
+
minMain,
|
|
420
|
+
maxMain,
|
|
421
|
+
minCross,
|
|
422
|
+
maxCross,
|
|
423
|
+
grow,
|
|
424
|
+
shrink,
|
|
425
|
+
crossAuto,
|
|
426
|
+
alignSelf: alignment,
|
|
427
|
+
receiverToken,
|
|
428
|
+
query: preparedStyleQuery(prepared)
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
const lines = collectLines(items, mainSize, mainGap, options.flexWrap);
|
|
432
|
+
for (const line of lines) resolveFlexibleLengths(line, mainSize, mainGap);
|
|
433
|
+
resolveLineCrossSizes(
|
|
434
|
+
lines,
|
|
435
|
+
crossSize,
|
|
436
|
+
crossGap,
|
|
437
|
+
options.alignContent,
|
|
438
|
+
options.flexWrap === "wrap"
|
|
439
|
+
);
|
|
440
|
+
const placements = [];
|
|
441
|
+
for (const line of lines) {
|
|
442
|
+
const occupied = line.items.reduce(
|
|
443
|
+
(total, item) => total + item.targetMain + item.paddingMain,
|
|
444
|
+
Math.max(0, line.items.length - 1) * mainGap
|
|
445
|
+
);
|
|
446
|
+
const distribution = distributeAlignment(
|
|
447
|
+
options.justifyContent,
|
|
448
|
+
mainSize - occupied,
|
|
449
|
+
line.items.length
|
|
450
|
+
);
|
|
451
|
+
let mainCursor = distribution.start;
|
|
452
|
+
for (const item of line.items) {
|
|
453
|
+
const alignment = effectiveAlignment(item.alignSelf, options.alignItems);
|
|
454
|
+
let outerCross = item.preferredCross;
|
|
455
|
+
if (alignment === "stretch" && item.crossAuto) {
|
|
456
|
+
outerCross = clamp(
|
|
457
|
+
Math.max(0, line.crossSize - item.paddingCross),
|
|
458
|
+
item.minCross,
|
|
459
|
+
item.maxCross
|
|
460
|
+
) + item.paddingCross;
|
|
461
|
+
}
|
|
462
|
+
const crossOffset = alignmentOffset(
|
|
463
|
+
alignment,
|
|
464
|
+
line.crossSize,
|
|
465
|
+
outerCross
|
|
466
|
+
);
|
|
467
|
+
const outerMain = item.targetMain + item.paddingMain;
|
|
468
|
+
const box = row ? {
|
|
469
|
+
x: container.x + mainCursor,
|
|
470
|
+
y: container.y + line.crossOffset + crossOffset,
|
|
471
|
+
width: outerMain,
|
|
472
|
+
height: outerCross
|
|
473
|
+
} : {
|
|
474
|
+
x: container.x + line.crossOffset + crossOffset,
|
|
475
|
+
y: container.y + mainCursor,
|
|
476
|
+
width: outerCross,
|
|
477
|
+
height: outerMain
|
|
478
|
+
};
|
|
479
|
+
const usedStyle = {
|
|
480
|
+
...item.normalized,
|
|
481
|
+
width: row ? item.targetMain : Math.max(0, outerCross - item.paddingCross),
|
|
482
|
+
height: row ? Math.max(0, outerCross - item.paddingCross) : item.targetMain
|
|
483
|
+
};
|
|
484
|
+
placements.push({
|
|
485
|
+
box,
|
|
486
|
+
element: childWithUsedSize(
|
|
487
|
+
item.child,
|
|
488
|
+
usedStyle,
|
|
489
|
+
usedStyle.width,
|
|
490
|
+
usedStyle.height,
|
|
491
|
+
item.receiverToken,
|
|
492
|
+
item.query
|
|
493
|
+
)
|
|
494
|
+
});
|
|
495
|
+
mainCursor += outerMain + mainGap + distribution.between;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
return placements;
|
|
499
|
+
}
|
|
500
|
+
function collectLines(items, mainSize, gap, wrap) {
|
|
501
|
+
const lines = [];
|
|
502
|
+
let current = [];
|
|
503
|
+
let occupied = 0;
|
|
504
|
+
for (const item of items) {
|
|
505
|
+
const hypothetical = clamp(item.baseMain, item.minMain, item.maxMain) + item.paddingMain;
|
|
506
|
+
const next = current.length === 0 ? hypothetical : occupied + gap + hypothetical;
|
|
507
|
+
if (wrap === "wrap" && current.length > 0 && next > mainSize) {
|
|
508
|
+
lines.push({ items: current, crossSize: 0, crossOffset: 0 });
|
|
509
|
+
current = [];
|
|
510
|
+
occupied = 0;
|
|
511
|
+
}
|
|
512
|
+
occupied = current.length === 0 ? hypothetical : occupied + gap + hypothetical;
|
|
513
|
+
current.push(item);
|
|
514
|
+
}
|
|
515
|
+
if (current.length > 0) {
|
|
516
|
+
lines.push({ items: current, crossSize: 0, crossOffset: 0 });
|
|
517
|
+
}
|
|
518
|
+
return lines;
|
|
519
|
+
}
|
|
520
|
+
function resolveFlexibleLengths(line, mainSize, gap) {
|
|
521
|
+
const gapSpace = Math.max(0, line.items.length - 1) * gap;
|
|
522
|
+
const baseOuter = line.items.reduce(
|
|
523
|
+
(total, item) => total + item.baseMain + item.paddingMain,
|
|
524
|
+
0
|
|
525
|
+
);
|
|
526
|
+
const hypotheticalOuter = line.items.reduce(
|
|
527
|
+
(total, item) => total + clamp(item.baseMain, item.minMain, item.maxMain) + item.paddingMain,
|
|
528
|
+
0
|
|
529
|
+
);
|
|
530
|
+
const growing = hypotheticalOuter + gapSpace < mainSize;
|
|
531
|
+
const initialFree = mainSize - gapSpace - baseOuter;
|
|
532
|
+
const frozen = /* @__PURE__ */ new Set();
|
|
533
|
+
for (const item of line.items) {
|
|
534
|
+
item.targetMain = item.baseMain;
|
|
535
|
+
const hypothetical = clamp(item.baseMain, item.minMain, item.maxMain);
|
|
536
|
+
if ((growing ? item.grow : item.shrink) === 0 || growing && item.baseMain > hypothetical || !growing && item.baseMain < hypothetical) {
|
|
537
|
+
item.targetMain = hypothetical;
|
|
538
|
+
frozen.add(item);
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
while (frozen.size < line.items.length) {
|
|
542
|
+
const fixed = line.items.reduce(
|
|
543
|
+
(total, item) => total + (frozen.has(item) ? item.targetMain : item.baseMain) + item.paddingMain,
|
|
544
|
+
gapSpace
|
|
545
|
+
);
|
|
546
|
+
let free = mainSize - fixed;
|
|
547
|
+
const unfrozen = line.items.filter((item) => !frozen.has(item));
|
|
548
|
+
const rawFactor = growing ? unfrozen.reduce((total, item) => total + item.grow, 0) : unfrozen.reduce((total, item) => total + item.shrink, 0);
|
|
549
|
+
const scaledFactor = growing ? rawFactor : unfrozen.reduce((total, item) => total + item.shrink * item.baseMain, 0);
|
|
550
|
+
if (scaledFactor === 0) {
|
|
551
|
+
for (const item of unfrozen) {
|
|
552
|
+
item.targetMain = clamp(item.baseMain, item.minMain, item.maxMain);
|
|
553
|
+
frozen.add(item);
|
|
554
|
+
}
|
|
555
|
+
break;
|
|
556
|
+
}
|
|
557
|
+
if (rawFactor < 1) {
|
|
558
|
+
const partialFree = initialFree * rawFactor;
|
|
559
|
+
if (Math.abs(partialFree) < Math.abs(free)) free = partialFree;
|
|
560
|
+
}
|
|
561
|
+
const violations = [];
|
|
562
|
+
for (const item of unfrozen) {
|
|
563
|
+
const share = growing ? item.grow / scaledFactor : item.shrink * item.baseMain / scaledFactor;
|
|
564
|
+
const candidate = item.baseMain + free * share;
|
|
565
|
+
const clamped = clamp(candidate, item.minMain, item.maxMain);
|
|
566
|
+
item.targetMain = clamped;
|
|
567
|
+
if (clamped !== candidate) {
|
|
568
|
+
violations.push({ item, amount: clamped - candidate });
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
if (violations.length === 0) break;
|
|
572
|
+
const totalViolation = violations.reduce(
|
|
573
|
+
(total, violation) => total + violation.amount,
|
|
574
|
+
0
|
|
575
|
+
);
|
|
576
|
+
for (const violation of violations) {
|
|
577
|
+
if (totalViolation === 0 || totalViolation > 0 && violation.amount > 0 || totalViolation < 0 && violation.amount < 0) {
|
|
578
|
+
frozen.add(violation.item);
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
function resolveLineCrossSizes(lines, crossSize, gap, alignment, multiLine) {
|
|
584
|
+
if (lines.length === 0) return;
|
|
585
|
+
for (const line of lines) {
|
|
586
|
+
line.crossSize = Math.max(0, ...line.items.map((item) => item.preferredCross));
|
|
587
|
+
}
|
|
588
|
+
if (lines.length === 1 && !multiLine) {
|
|
589
|
+
lines[0].crossSize = crossSize;
|
|
590
|
+
lines[0].crossOffset = 0;
|
|
591
|
+
return;
|
|
592
|
+
}
|
|
593
|
+
const occupied = lines.reduce(
|
|
594
|
+
(total, line) => total + line.crossSize,
|
|
595
|
+
Math.max(0, lines.length - 1) * gap
|
|
596
|
+
);
|
|
597
|
+
const free = crossSize - occupied;
|
|
598
|
+
if (alignment === "stretch" && free > 0) {
|
|
599
|
+
const addition = free / lines.length;
|
|
600
|
+
for (const line of lines) line.crossSize += addition;
|
|
601
|
+
}
|
|
602
|
+
const distribution = alignment === "stretch" ? { start: 0, between: 0 } : distributeAlignment(alignment, free, lines.length);
|
|
603
|
+
let cursor = distribution.start;
|
|
604
|
+
for (const line of lines) {
|
|
605
|
+
line.crossOffset = cursor;
|
|
606
|
+
cursor += line.crossSize + gap + distribution.between;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
function distributeAlignment(alignment, free, count) {
|
|
610
|
+
if (count === 0 || alignment === "flex-start" || alignment === "stretch") {
|
|
611
|
+
return { start: 0, between: 0 };
|
|
612
|
+
}
|
|
613
|
+
if (free < 0) {
|
|
614
|
+
if (alignment === "flex-end") return { start: free, between: 0 };
|
|
615
|
+
if (alignment === "center" || alignment === "space-around" || alignment === "space-evenly") {
|
|
616
|
+
return { start: free / 2, between: 0 };
|
|
617
|
+
}
|
|
618
|
+
return { start: 0, between: 0 };
|
|
619
|
+
}
|
|
620
|
+
if (alignment === "flex-end") return { start: free, between: 0 };
|
|
621
|
+
if (alignment === "center") return { start: free / 2, between: 0 };
|
|
622
|
+
if (alignment === "space-between") {
|
|
623
|
+
return count === 1 ? { start: 0, between: 0 } : { start: 0, between: free / (count - 1) };
|
|
624
|
+
}
|
|
625
|
+
if (alignment === "space-around") {
|
|
626
|
+
const between = free / count;
|
|
627
|
+
return { start: between / 2, between };
|
|
628
|
+
}
|
|
629
|
+
if (alignment === "space-evenly") {
|
|
630
|
+
const between = free / (count + 1);
|
|
631
|
+
return { start: between, between };
|
|
632
|
+
}
|
|
633
|
+
return { start: 0, between: 0 };
|
|
634
|
+
}
|
|
635
|
+
function normalizeFlexOptions(style, container) {
|
|
636
|
+
const flexDirection = supported(style.flexDirection ?? "row", ["row", "column"], "flexDirection", container);
|
|
637
|
+
const flexWrap = supported(style.flexWrap ?? "nowrap", ["nowrap", "wrap"], "flexWrap", container);
|
|
638
|
+
const justifyContent = supported(
|
|
639
|
+
style.justifyContent ?? "flex-start",
|
|
640
|
+
["flex-start", "flex-end", "center", "space-between", "space-around", "space-evenly"],
|
|
641
|
+
"justifyContent",
|
|
642
|
+
container
|
|
643
|
+
);
|
|
644
|
+
const alignItems = supported(
|
|
645
|
+
style.alignItems ?? "stretch",
|
|
646
|
+
["stretch", "flex-start", "flex-end", "center"],
|
|
647
|
+
"alignItems",
|
|
648
|
+
container
|
|
649
|
+
);
|
|
650
|
+
const alignContent = supported(
|
|
651
|
+
style.alignContent ?? "stretch",
|
|
652
|
+
["stretch", "flex-start", "flex-end", "center", "space-between", "space-around", "space-evenly"],
|
|
653
|
+
"alignContent",
|
|
654
|
+
container
|
|
655
|
+
);
|
|
656
|
+
const gap = nonnegativeGap(style.gap ?? 0, "gap", container);
|
|
657
|
+
return {
|
|
658
|
+
flexDirection,
|
|
659
|
+
flexWrap,
|
|
660
|
+
justifyContent,
|
|
661
|
+
alignItems,
|
|
662
|
+
alignContent,
|
|
663
|
+
rowGap: nonnegativeGap(style.rowGap ?? gap, "rowGap", container),
|
|
664
|
+
columnGap: nonnegativeGap(style.columnGap ?? gap, "columnGap", container)
|
|
665
|
+
};
|
|
666
|
+
}
|
|
667
|
+
function supported(value, accepted, property, container) {
|
|
668
|
+
if (!accepted.includes(value)) throw optionDiagnostic(property, value, container);
|
|
669
|
+
return value;
|
|
670
|
+
}
|
|
671
|
+
function nonnegativeGap(value, property, container) {
|
|
672
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) {
|
|
673
|
+
throw optionDiagnostic(property, value, container);
|
|
674
|
+
}
|
|
675
|
+
return value;
|
|
676
|
+
}
|
|
677
|
+
function nonnegativeFactor(value, property, child, container) {
|
|
678
|
+
if (!Number.isFinite(value) || value < 0) {
|
|
679
|
+
throw childDiagnostic(
|
|
680
|
+
child,
|
|
681
|
+
property,
|
|
682
|
+
value,
|
|
683
|
+
container,
|
|
684
|
+
"must be finite and nonnegative"
|
|
685
|
+
);
|
|
686
|
+
}
|
|
687
|
+
return value;
|
|
688
|
+
}
|
|
689
|
+
function resolveBasis(basis, specifiedMain, measuredMain, reference, property, child, container) {
|
|
690
|
+
const value = basis === "auto" || basis === void 0 ? specifiedMain : basis;
|
|
691
|
+
if (value === void 0 || value === "auto") {
|
|
692
|
+
if (measuredMain === void 0) {
|
|
693
|
+
throw childDiagnostic(
|
|
694
|
+
child,
|
|
695
|
+
property,
|
|
696
|
+
value ?? "auto",
|
|
697
|
+
container,
|
|
698
|
+
"auto flex basis requires supported pure measurement"
|
|
699
|
+
);
|
|
700
|
+
}
|
|
701
|
+
return measuredMain;
|
|
702
|
+
}
|
|
703
|
+
return resolveItemLength(value, reference, "flexBasis", child, container);
|
|
704
|
+
}
|
|
705
|
+
function resolveItemLength(value, reference, property, child, container) {
|
|
706
|
+
const resolved = resolveLength(value, reference, property, childContext(child, container));
|
|
707
|
+
if (resolved === void 0 || resolved < 0) {
|
|
708
|
+
throw childDiagnostic(
|
|
709
|
+
child,
|
|
710
|
+
property,
|
|
711
|
+
value,
|
|
712
|
+
container,
|
|
713
|
+
"must resolve to a finite nonnegative length"
|
|
714
|
+
);
|
|
715
|
+
}
|
|
716
|
+
return resolved;
|
|
717
|
+
}
|
|
718
|
+
function resolveOptionalBound(value, reference, property, fallback, child, container) {
|
|
719
|
+
if (value === void 0) return fallback;
|
|
720
|
+
return resolveItemLength(value, reference, property, child, container);
|
|
721
|
+
}
|
|
722
|
+
function normalizeItemAlignment(value, child, container) {
|
|
723
|
+
if (value === void 0 || value === "auto") return "auto";
|
|
724
|
+
if (value === "stretch" || value === "flex-start" || value === "flex-end" || value === "center") return value;
|
|
725
|
+
throw childDiagnostic(
|
|
726
|
+
child,
|
|
727
|
+
"alignSelf",
|
|
728
|
+
value,
|
|
729
|
+
container,
|
|
730
|
+
"uses an unsupported flex item alignment"
|
|
731
|
+
);
|
|
732
|
+
}
|
|
733
|
+
function effectiveAlignment(value, fallback) {
|
|
734
|
+
return value === "auto" ? fallback : value;
|
|
735
|
+
}
|
|
736
|
+
function alignmentOffset(alignment, lineSize, itemSize) {
|
|
737
|
+
if (alignment === "center") return (lineSize - itemSize) / 2;
|
|
738
|
+
if (alignment === "flex-end") return lineSize - itemSize;
|
|
739
|
+
return 0;
|
|
740
|
+
}
|
|
741
|
+
function rejectUnsupportedItemFields(child, style, container) {
|
|
742
|
+
for (const property of ["order", "margin", "marginLeft", "marginRight", "marginTop", "marginBottom"]) {
|
|
743
|
+
if (style[property] !== void 0) {
|
|
744
|
+
throw childDiagnostic(
|
|
745
|
+
child,
|
|
746
|
+
property,
|
|
747
|
+
style[property],
|
|
748
|
+
container,
|
|
749
|
+
"uses an unsupported flex item feature"
|
|
750
|
+
);
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
function clamp(value, minimum, maximum) {
|
|
755
|
+
return Math.min(maximum, Math.max(minimum, value));
|
|
756
|
+
}
|
|
757
|
+
function assertFiniteBox(container) {
|
|
758
|
+
for (const [property, value] of Object.entries(container)) {
|
|
759
|
+
if (!Number.isFinite(value) || (property === "width" || property === "height") && value < 0) {
|
|
760
|
+
throw optionDiagnostic(property, value, container);
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
function optionDiagnostic(property, value, container) {
|
|
765
|
+
return layoutDiagnostic({
|
|
766
|
+
component: "Flex",
|
|
767
|
+
property,
|
|
768
|
+
value,
|
|
769
|
+
algorithm: "flex",
|
|
770
|
+
constraints: constraintsFor(container),
|
|
771
|
+
reason: "uses an unsupported flex value"
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
function childDiagnostic(child, property, value, container, reason) {
|
|
775
|
+
return layoutDiagnostic({
|
|
776
|
+
component: child.type.name || "Anonymous",
|
|
777
|
+
property,
|
|
778
|
+
value,
|
|
779
|
+
algorithm: "flex",
|
|
780
|
+
constraints: constraintsFor(container),
|
|
781
|
+
reason
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
function childContext(child, container) {
|
|
785
|
+
return {
|
|
786
|
+
component: child.type.name || "Anonymous",
|
|
787
|
+
algorithm: "flex",
|
|
788
|
+
constraints: constraintsFor(container)
|
|
789
|
+
};
|
|
790
|
+
}
|
|
791
|
+
function constraintsFor(container) {
|
|
792
|
+
return {
|
|
793
|
+
minWidth: 0,
|
|
794
|
+
maxWidth: container.width,
|
|
795
|
+
minHeight: 0,
|
|
796
|
+
maxHeight: container.height
|
|
797
|
+
};
|
|
798
|
+
}
|
|
799
|
+
export {
|
|
800
|
+
Flex,
|
|
801
|
+
layoutFlex
|
|
802
|
+
};
|
|
803
|
+
//# sourceMappingURL=flex.js.map
|