@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,35 @@
|
|
|
1
|
+
import { GLOBAL_STATE } from "../global-state.js";
|
|
2
|
+
import { requireHookContext } from "../hooks/hook-slot.js";
|
|
3
|
+
const bindings = /* @__PURE__ */ new WeakMap();
|
|
4
|
+
function createTransitionBinding(resolve) {
|
|
5
|
+
const binding = Object.freeze({});
|
|
6
|
+
const { componentRefs, pibblInstance } = requireHookContext();
|
|
7
|
+
bindings.set(binding, { resolve, owner: componentRefs, root: pibblInstance.eventRoot });
|
|
8
|
+
return binding;
|
|
9
|
+
}
|
|
10
|
+
function resolveTransitionBinding(binding) {
|
|
11
|
+
const record = bindings.get(binding);
|
|
12
|
+
if (!record) throw new TypeError("style.transition requires a binding from useVisibilityTransition in the same Pibbl runtime.");
|
|
13
|
+
const receiver = GLOBAL_STATE.componentRefs;
|
|
14
|
+
if (GLOBAL_STATE.currentPibblInstance?.eventRoot !== record.root) throw new Error("A transition binding must stay within its owning Pibbl root.");
|
|
15
|
+
if (record.owner.teardowns.closed) throw new Error("Cannot use a disposed transition binding.");
|
|
16
|
+
if (!receiver) throw new Error("Transition bindings require a mounted receiver.");
|
|
17
|
+
const instance = GLOBAL_STATE.currentPibblInstance;
|
|
18
|
+
if (record.receiver && record.receiver !== receiver && record.receiverInstance === instance && record.receiver.renderGeneration !== instance.renderGeneration) {
|
|
19
|
+
record.receiver = void 0;
|
|
20
|
+
}
|
|
21
|
+
if (record.receiver && record.receiver !== receiver) throw new Error("A transition binding supports one mounted receiver. Wrap shared content in a Group.");
|
|
22
|
+
if (!record.receiver) {
|
|
23
|
+
record.receiver = receiver;
|
|
24
|
+
record.receiverInstance = instance;
|
|
25
|
+
receiver.teardowns.add(() => {
|
|
26
|
+
if (record.receiver === receiver) record.receiver = void 0;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
return record.resolve();
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
createTransitionBinding,
|
|
33
|
+
resolveTransitionBinding
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=binding.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/transitions/binding.ts"],
|
|
4
|
+
"sourcesContent": ["import type { PibblVisibilityTransition } from '../hooks/use-visibility-transition.js';\nimport { GLOBAL_STATE } from '../global-state.js';\nimport { requireHookContext } from '../hooks/hook-slot.js';\nimport type { PibblComponentRefs, PibblEventRoot, PibblInstance } from '../types.js';\nimport type { PibblFilter } from '../style/filter-types.js';\n\ndeclare const bindingBrand: unique symbol;\n/**\n * An opaque connection between one transition controller and its painted subject.\n *\n * @see {@link PibblVisibilityTransition}\n */\nexport interface PibblTransitionBinding { readonly [bindingBrand]: true }\ninterface BindingRecord {\n readonly resolve: () => readonly PibblFilter[];\n readonly root: PibblEventRoot;\n readonly owner: PibblComponentRefs<any>;\n receiver?: PibblComponentRefs<any>;\n receiverInstance?: PibblInstance;\n}\nconst bindings = new WeakMap<PibblTransitionBinding, BindingRecord>();\nexport function createTransitionBinding(resolve: () => readonly PibblFilter[]): PibblTransitionBinding {\n const binding = Object.freeze({}) as PibblTransitionBinding;\n const { componentRefs, pibblInstance } = requireHookContext();\n bindings.set(binding, { resolve, owner: componentRefs, root: pibblInstance.eventRoot });\n return binding;\n}\nexport function resolveTransitionBinding(binding: PibblTransitionBinding): readonly PibblFilter[] {\n const record = bindings.get(binding);\n if (!record) throw new TypeError('style.transition requires a binding from useVisibilityTransition in the same Pibbl runtime.');\n const receiver = GLOBAL_STATE.componentRefs;\n if (GLOBAL_STATE.currentPibblInstance?.eventRoot !== record.root) throw new Error('A transition binding must stay within its owning Pibbl root.');\n if (record.owner.teardowns.closed) throw new Error('Cannot use a disposed transition binding.');\n if (!receiver) throw new Error('Transition bindings require a mounted receiver.');\n const instance = GLOBAL_STATE.currentPibblInstance!;\n // Keyed replacements are visited before the old receiver is torn down. Only\n // retire an unseen receiver in this same render instance; cached Layers own\n // independent generations and must not silently lose their binding.\n if (record.receiver && record.receiver !== receiver && record.receiverInstance === instance && record.receiver.renderGeneration !== instance.renderGeneration) {\n record.receiver = undefined;\n }\n if (record.receiver && record.receiver !== receiver) throw new Error('A transition binding supports one mounted receiver. Wrap shared content in a Group.');\n if (!record.receiver) {\n record.receiver = receiver;\n record.receiverInstance = instance;\n receiver.teardowns.add(() => { if (record.receiver === receiver) record.receiver = undefined; });\n }\n return record.resolve();\n}\n"],
|
|
5
|
+
"mappings": "AACA,SAAS,oBAAoB;AAC7B,SAAS,0BAA0B;AAkBnC,MAAM,WAAW,oBAAI,QAA+C;AAC7D,SAAS,wBAAwB,SAA+D;AACrG,QAAM,UAAU,OAAO,OAAO,CAAC,CAAC;AAChC,QAAM,EAAE,eAAe,cAAc,IAAI,mBAAmB;AAC5D,WAAS,IAAI,SAAS,EAAE,SAAS,OAAO,eAAe,MAAM,cAAc,UAAU,CAAC;AACtF,SAAO;AACT;AACO,SAAS,yBAAyB,SAAyD;AAChG,QAAM,SAAS,SAAS,IAAI,OAAO;AACnC,MAAI,CAAC,OAAQ,OAAM,IAAI,UAAU,6FAA6F;AAC9H,QAAM,WAAW,aAAa;AAC9B,MAAI,aAAa,sBAAsB,cAAc,OAAO,KAAM,OAAM,IAAI,MAAM,8DAA8D;AAChJ,MAAI,OAAO,MAAM,UAAU,OAAQ,OAAM,IAAI,MAAM,2CAA2C;AAC9F,MAAI,CAAC,SAAU,OAAM,IAAI,MAAM,iDAAiD;AAChF,QAAM,WAAW,aAAa;AAI9B,MAAI,OAAO,YAAY,OAAO,aAAa,YAAY,OAAO,qBAAqB,YAAY,OAAO,SAAS,qBAAqB,SAAS,kBAAkB;AAC7J,WAAO,WAAW;AAAA,EACpB;AACA,MAAI,OAAO,YAAY,OAAO,aAAa,SAAU,OAAM,IAAI,MAAM,qFAAqF;AAC1J,MAAI,CAAC,OAAO,UAAU;AACpB,WAAO,WAAW;AAClB,WAAO,mBAAmB;AAC1B,aAAS,UAAU,IAAI,MAAM;AAAE,UAAI,OAAO,aAAa,SAAU,QAAO,WAAW;AAAA,IAAW,CAAC;AAAA,EACjG;AACA,SAAO,OAAO,QAAQ;AACxB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type PibblFilter } from '../style/filter-types.js';
|
|
2
|
+
import type { FilterWindows } from '../filter/filter-region.js';
|
|
3
|
+
export interface CaptureFrame {
|
|
4
|
+
readonly context: OffscreenCanvasRenderingContext2D;
|
|
5
|
+
readonly windows: FilterWindows;
|
|
6
|
+
readonly source: OffscreenCanvas;
|
|
7
|
+
/** Draw in local coordinates, including any caller-applied transform. */
|
|
8
|
+
drawSource(): void;
|
|
9
|
+
drawTint(color: string): void;
|
|
10
|
+
}
|
|
11
|
+
export declare function captureTransition(draw: (frame: CaptureFrame) => void): PibblFilter;
|
|
12
|
+
export interface TransitionRegion {
|
|
13
|
+
readonly x: number;
|
|
14
|
+
readonly y: number;
|
|
15
|
+
readonly width: number;
|
|
16
|
+
readonly height: number;
|
|
17
|
+
}
|
|
18
|
+
export declare function regionSnapshot(value: TransitionRegion): Readonly<TransitionRegion>;
|
|
19
|
+
export declare function finite(value: number, name: string, minimum?: number): number;
|
|
20
|
+
export declare const clamp: (value: number) => number;
|
|
21
|
+
export declare const seededNoise: (seed: number) => (n: number) => number;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { filterBoundaryExecutor } from "../../filters/filter-executor.js";
|
|
2
|
+
import { GLOBAL_STATE } from "../global-state.js";
|
|
3
|
+
import { getOptionalService } from "../optional-services.js";
|
|
4
|
+
import { PIBBL_FILTER_EXECUTOR } from "../style/filter-types.js";
|
|
5
|
+
const SCRATCH = /* @__PURE__ */ Symbol("pibbl.transition.capture");
|
|
6
|
+
class TransitionSurfaces {
|
|
7
|
+
constructor(instance) {
|
|
8
|
+
this.instance = instance;
|
|
9
|
+
}
|
|
10
|
+
instance;
|
|
11
|
+
surfaces = [];
|
|
12
|
+
used = false;
|
|
13
|
+
committed = false;
|
|
14
|
+
beginRender() {
|
|
15
|
+
this.used = false;
|
|
16
|
+
}
|
|
17
|
+
endRender(success) {
|
|
18
|
+
if (success && this.used) {
|
|
19
|
+
this.committed = true;
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (success || !this.committed) this.dispose();
|
|
23
|
+
}
|
|
24
|
+
context(index, width, height) {
|
|
25
|
+
const canvas = this.surfaces[index] ??= new OffscreenCanvas(width, height);
|
|
26
|
+
if (canvas.width !== width) canvas.width = width;
|
|
27
|
+
if (canvas.height !== height) canvas.height = height;
|
|
28
|
+
const context = canvas.getContext("2d");
|
|
29
|
+
if (!context) throw new Error("Transitions require Canvas 2D.");
|
|
30
|
+
context.reset();
|
|
31
|
+
return context;
|
|
32
|
+
}
|
|
33
|
+
dispose() {
|
|
34
|
+
for (const surface of this.surfaces) {
|
|
35
|
+
surface.width = 0;
|
|
36
|
+
surface.height = 0;
|
|
37
|
+
}
|
|
38
|
+
this.surfaces = [];
|
|
39
|
+
this.instance.optionalServices.delete(SCRATCH);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function captureTransition(draw) {
|
|
43
|
+
const executor = {
|
|
44
|
+
render: filterBoundaryExecutor.render,
|
|
45
|
+
prepare() {
|
|
46
|
+
return { executor: filterBoundaryExecutor, reverseInfluence: (output) => ({ ...output }), process(source, windows) {
|
|
47
|
+
const instance = GLOBAL_STATE.currentPibblInstance;
|
|
48
|
+
if (!instance) throw new Error("Transition rendering requires an active Pibbl instance.");
|
|
49
|
+
const scratch = getOptionalService(instance, SCRATCH, () => new TransitionSurfaces(instance));
|
|
50
|
+
scratch.used = true;
|
|
51
|
+
const context = scratch.context(0, source.width, source.height);
|
|
52
|
+
context.setTransform(windows.source.renderTransform);
|
|
53
|
+
const bounds = windows.source.logicalBounds;
|
|
54
|
+
const drawImage = (image) => context.drawImage(image, bounds.x, bounds.y, bounds.width, bounds.height);
|
|
55
|
+
draw({ context, windows, source, drawSource: () => drawImage(source), drawTint(color) {
|
|
56
|
+
const tint = scratch.context(1, source.width, source.height);
|
|
57
|
+
tint.drawImage(source, 0, 0);
|
|
58
|
+
tint.globalCompositeOperation = "source-in";
|
|
59
|
+
tint.fillStyle = color;
|
|
60
|
+
tint.fillRect(0, 0, source.width, source.height);
|
|
61
|
+
drawImage(tint.canvas);
|
|
62
|
+
} });
|
|
63
|
+
return context.canvas.transferToImageBitmap();
|
|
64
|
+
} };
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
return Object.freeze({ [PIBBL_FILTER_EXECUTOR]: executor });
|
|
68
|
+
}
|
|
69
|
+
function regionSnapshot(value) {
|
|
70
|
+
const region = Object.freeze({ ...value });
|
|
71
|
+
for (const key of ["x", "y", "width", "height"]) finite(region[key], `region.${key}`);
|
|
72
|
+
if (region.width <= 0 || region.height <= 0) throw new RangeError("Transition region must have positive width and height.");
|
|
73
|
+
return region;
|
|
74
|
+
}
|
|
75
|
+
function finite(value, name, minimum = -Infinity) {
|
|
76
|
+
if (!Number.isFinite(value) || value < minimum) throw new RangeError(`${name} must be finite and at least ${minimum}.`);
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
const clamp = (value) => Math.max(0, Math.min(1, value));
|
|
80
|
+
const seededNoise = (seed) => (n) => {
|
|
81
|
+
const v = Math.sin(n * 127.1 + seed * 31.7) * 43758.5453;
|
|
82
|
+
return v - Math.floor(v);
|
|
83
|
+
};
|
|
84
|
+
export {
|
|
85
|
+
captureTransition,
|
|
86
|
+
clamp,
|
|
87
|
+
finite,
|
|
88
|
+
regionSnapshot,
|
|
89
|
+
seededNoise
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=capture.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/transitions/capture.ts"],
|
|
4
|
+
"sourcesContent": ["import { filterBoundaryExecutor, type CustomPreparedFilter } from '../../filters/filter-executor.js';\nimport { GLOBAL_STATE } from '../global-state.js';\nimport { getOptionalService } from '../optional-services.js';\nimport { PIBBL_FILTER_EXECUTOR, type PibblFilter, type PibblFilterExecutor } from '../style/filter-types.js';\nimport type { PibblInstance } from '../types.js';\nimport type { FilterWindows } from '../filter/filter-region.js';\n\nconst SCRATCH = Symbol('pibbl.transition.capture');\nclass TransitionSurfaces {\n private surfaces: OffscreenCanvas[] = [];\n used = false;\n private committed = false;\n constructor(private readonly instance: PibblInstance) {}\n beginRender(): void { this.used = false; }\n endRender(success: boolean): void {\n if (success && this.used) { this.committed = true; return; }\n if (success || !this.committed) this.dispose();\n }\n context(index: number, width: number, height: number): OffscreenCanvasRenderingContext2D {\n const canvas = this.surfaces[index] ??= new OffscreenCanvas(width, height);\n if (canvas.width !== width) canvas.width = width;\n if (canvas.height !== height) canvas.height = height;\n const context = canvas.getContext('2d');\n if (!context) throw new Error('Transitions require Canvas 2D.');\n context.reset(); return context;\n }\n dispose(): void {\n for (const surface of this.surfaces) { surface.width = 0; surface.height = 0; }\n this.surfaces = []; this.instance.optionalServices.delete(SCRATCH);\n }\n}\nexport interface CaptureFrame {\n readonly context: OffscreenCanvasRenderingContext2D;\n readonly windows: FilterWindows;\n readonly source: OffscreenCanvas;\n /** Draw in local coordinates, including any caller-applied transform. */\n drawSource(): void;\n drawTint(color: string): void;\n}\nexport function captureTransition(draw: (frame: CaptureFrame) => void): PibblFilter {\n const executor: PibblFilterExecutor = {\n render: filterBoundaryExecutor.render,\n prepare(): CustomPreparedFilter {\n return { executor: filterBoundaryExecutor, reverseInfluence: output => ({ ...output }), process(source, windows) {\n const instance = GLOBAL_STATE.currentPibblInstance;\n if (!instance) throw new Error('Transition rendering requires an active Pibbl instance.');\n const scratch = getOptionalService(instance, SCRATCH, () => new TransitionSurfaces(instance)); scratch.used = true;\n const context = scratch.context(0, source.width, source.height);\n context.setTransform(windows.source.renderTransform);\n const bounds = windows.source.logicalBounds;\n const drawImage = (image: OffscreenCanvas) => context.drawImage(image, bounds.x, bounds.y, bounds.width, bounds.height);\n draw({ context, windows, source, drawSource: () => drawImage(source), drawTint(color) {\n const tint = scratch.context(1, source.width, source.height);\n tint.drawImage(source, 0, 0); tint.globalCompositeOperation = 'source-in';\n tint.fillStyle = color; tint.fillRect(0, 0, source.width, source.height); drawImage(tint.canvas);\n } });\n return context.canvas.transferToImageBitmap();\n } };\n },\n };\n return Object.freeze({ [PIBBL_FILTER_EXECUTOR]: executor });\n}\nexport interface TransitionRegion { readonly x: number; readonly y: number; readonly width: number; readonly height: number }\nexport function regionSnapshot(value: TransitionRegion): Readonly<TransitionRegion> {\n const region = Object.freeze({ ...value });\n for (const key of ['x', 'y', 'width', 'height'] as const) finite(region[key], `region.${key}`);\n if (region.width <= 0 || region.height <= 0) throw new RangeError('Transition region must have positive width and height.');\n return region;\n}\nexport function finite(value: number, name: string, minimum = -Infinity): number {\n if (!Number.isFinite(value) || value < minimum) throw new RangeError(`${name} must be finite and at least ${minimum}.`);\n return value;\n}\nexport const clamp = (value: number) => Math.max(0, Math.min(1, value));\nexport const seededNoise = (seed: number) => (n: number) => { const v = Math.sin(n * 127.1 + seed * 31.7) * 43758.5453; return v - Math.floor(v); };\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,8BAAyD;AAClE,SAAS,oBAAoB;AAC7B,SAAS,0BAA0B;AACnC,SAAS,6BAAyE;AAIlF,MAAM,UAAU,uBAAO,0BAA0B;AACjD,MAAM,mBAAmB;AAAA,EAIvB,YAA6B,UAAyB;AAAzB;AAAA,EAA0B;AAAA,EAA1B;AAAA,EAHrB,WAA8B,CAAC;AAAA,EACvC,OAAO;AAAA,EACC,YAAY;AAAA,EAEpB,cAAoB;AAAE,SAAK,OAAO;AAAA,EAAO;AAAA,EACzC,UAAU,SAAwB;AAChC,QAAI,WAAW,KAAK,MAAM;AAAE,WAAK,YAAY;AAAM;AAAA,IAAQ;AAC3D,QAAI,WAAW,CAAC,KAAK,UAAW,MAAK,QAAQ;AAAA,EAC/C;AAAA,EACA,QAAQ,OAAe,OAAe,QAAmD;AACvF,UAAM,SAAS,KAAK,SAAS,KAAK,MAAM,IAAI,gBAAgB,OAAO,MAAM;AACzE,QAAI,OAAO,UAAU,MAAO,QAAO,QAAQ;AAC3C,QAAI,OAAO,WAAW,OAAQ,QAAO,SAAS;AAC9C,UAAM,UAAU,OAAO,WAAW,IAAI;AACtC,QAAI,CAAC,QAAS,OAAM,IAAI,MAAM,gCAAgC;AAC9D,YAAQ,MAAM;AAAG,WAAO;AAAA,EAC1B;AAAA,EACA,UAAgB;AACd,eAAW,WAAW,KAAK,UAAU;AAAE,cAAQ,QAAQ;AAAG,cAAQ,SAAS;AAAA,IAAG;AAC9E,SAAK,WAAW,CAAC;AAAG,SAAK,SAAS,iBAAiB,OAAO,OAAO;AAAA,EACnE;AACF;AASO,SAAS,kBAAkB,MAAkD;AAClF,QAAM,WAAgC;AAAA,IACpC,QAAQ,uBAAuB;AAAA,IAC/B,UAAgC;AAC9B,aAAO,EAAE,UAAU,wBAAwB,kBAAkB,aAAW,EAAE,GAAG,OAAO,IAAI,QAAQ,QAAQ,SAAS;AAC/G,cAAM,WAAW,aAAa;AAC9B,YAAI,CAAC,SAAU,OAAM,IAAI,MAAM,yDAAyD;AACxF,cAAM,UAAU,mBAAmB,UAAU,SAAS,MAAM,IAAI,mBAAmB,QAAQ,CAAC;AAAG,gBAAQ,OAAO;AAC9G,cAAM,UAAU,QAAQ,QAAQ,GAAG,OAAO,OAAO,OAAO,MAAM;AAC9D,gBAAQ,aAAa,QAAQ,OAAO,eAAe;AACnD,cAAM,SAAS,QAAQ,OAAO;AAC9B,cAAM,YAAY,CAAC,UAA2B,QAAQ,UAAU,OAAO,OAAO,GAAG,OAAO,GAAG,OAAO,OAAO,OAAO,MAAM;AACtH,aAAK,EAAE,SAAS,SAAS,QAAQ,YAAY,MAAM,UAAU,MAAM,GAAG,SAAS,OAAO;AACpF,gBAAM,OAAO,QAAQ,QAAQ,GAAG,OAAO,OAAO,OAAO,MAAM;AAC3D,eAAK,UAAU,QAAQ,GAAG,CAAC;AAAG,eAAK,2BAA2B;AAC9D,eAAK,YAAY;AAAO,eAAK,SAAS,GAAG,GAAG,OAAO,OAAO,OAAO,MAAM;AAAG,oBAAU,KAAK,MAAM;AAAA,QACjG,EAAE,CAAC;AACH,eAAO,QAAQ,OAAO,sBAAsB;AAAA,MAC9C,EAAE;AAAA,IACJ;AAAA,EACF;AACA,SAAO,OAAO,OAAO,EAAE,CAAC,qBAAqB,GAAG,SAAS,CAAC;AAC5D;AAEO,SAAS,eAAe,OAAqD;AAClF,QAAM,SAAS,OAAO,OAAO,EAAE,GAAG,MAAM,CAAC;AACzC,aAAW,OAAO,CAAC,KAAK,KAAK,SAAS,QAAQ,EAAY,QAAO,OAAO,GAAG,GAAG,UAAU,GAAG,EAAE;AAC7F,MAAI,OAAO,SAAS,KAAK,OAAO,UAAU,EAAG,OAAM,IAAI,WAAW,wDAAwD;AAC1H,SAAO;AACT;AACO,SAAS,OAAO,OAAe,MAAc,UAAU,WAAmB;AAC/E,MAAI,CAAC,OAAO,SAAS,KAAK,KAAK,QAAQ,QAAS,OAAM,IAAI,WAAW,GAAG,IAAI,gCAAgC,OAAO,GAAG;AACtH,SAAO;AACT;AACO,MAAM,QAAQ,CAAC,UAAkB,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,KAAK,CAAC;AAC/D,MAAM,cAAc,CAAC,SAAiB,CAAC,MAAc;AAAE,QAAM,IAAI,KAAK,IAAI,IAAI,QAAQ,OAAO,IAAI,IAAI;AAAY,SAAO,IAAI,KAAK,MAAM,CAAC;AAAG;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { type PibblTransitionEffect } from './fade.js';
|
|
2
|
+
import { type TransitionRegion } from './capture.js';
|
|
3
|
+
/**
|
|
4
|
+
* Direction and displacement controls for a sliding visibility transition.
|
|
5
|
+
*
|
|
6
|
+
* @see {@link slide}
|
|
7
|
+
*/
|
|
8
|
+
export interface PibblSlideOptions {
|
|
9
|
+
/**
|
|
10
|
+
* Horizontal coordinate or displacement in the containing coordinate system. See
|
|
11
|
+
* {@link PibblSlideOptions}.
|
|
12
|
+
*/
|
|
13
|
+
readonly x?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Vertical coordinate or displacement in the containing coordinate system. See
|
|
16
|
+
* {@link PibblSlideOptions}.
|
|
17
|
+
*/
|
|
18
|
+
readonly y?: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Scale controls for a zooming visibility transition.
|
|
22
|
+
*
|
|
23
|
+
* @see {@link zoom}
|
|
24
|
+
*/
|
|
25
|
+
export interface PibblZoomOptions {
|
|
26
|
+
/** Origin of the transform or geometric query. See {@link PibblZoomOptions}. */
|
|
27
|
+
readonly origin: Readonly<{
|
|
28
|
+
/**
|
|
29
|
+
* Horizontal coordinate or displacement in the containing coordinate system. See
|
|
30
|
+
* {@link PibblZoomOptions}.
|
|
31
|
+
*/
|
|
32
|
+
x: number;
|
|
33
|
+
/**
|
|
34
|
+
* Vertical coordinate or displacement in the containing coordinate system. See
|
|
35
|
+
* {@link PibblZoomOptions}.
|
|
36
|
+
*/
|
|
37
|
+
y: number;
|
|
38
|
+
}>;
|
|
39
|
+
/** Starting endpoint or value. See {@link PibblZoomOptions}. */
|
|
40
|
+
readonly from?: number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Direction and clipping controls for a wiping visibility transition.
|
|
44
|
+
*
|
|
45
|
+
* @see {@link wipe}
|
|
46
|
+
*/
|
|
47
|
+
export interface PibblWipeOptions {
|
|
48
|
+
/** Logical region over which the effect is evaluated. See {@link TransitionRegion}. */
|
|
49
|
+
readonly region: TransitionRegion;
|
|
50
|
+
/** Direction in which this operation proceeds. See {@link PibblWipeOptions}. */
|
|
51
|
+
readonly direction?: 'left' | 'right' | 'top' | 'bottom';
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Blur controls for a visibility reveal transition.
|
|
55
|
+
*
|
|
56
|
+
* @see {@link blurReveal}
|
|
57
|
+
*/
|
|
58
|
+
export interface PibblBlurRevealOptions {
|
|
59
|
+
/**
|
|
60
|
+
* Radius in the coordinate system of this geometry or effect. See {@link PibblBlurRevealOptions}.
|
|
61
|
+
*/
|
|
62
|
+
readonly radius?: number;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Noise and threshold controls for a dissolving visibility transition.
|
|
66
|
+
*
|
|
67
|
+
* @see {@link dissolve}
|
|
68
|
+
*/
|
|
69
|
+
export interface PibblDissolveOptions {
|
|
70
|
+
/** Logical region over which the effect is evaluated. See {@link TransitionRegion}. */
|
|
71
|
+
readonly region: TransitionRegion;
|
|
72
|
+
/** Size of the dissolve noise cells. See {@link PibblDissolveOptions}. */
|
|
73
|
+
readonly cellSize?: number;
|
|
74
|
+
/**
|
|
75
|
+
* Seed used for deterministic sampling or simulation initialization. See
|
|
76
|
+
* {@link PibblDissolveOptions}.
|
|
77
|
+
*/
|
|
78
|
+
readonly seed?: number;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Translate from an offset while fading; exit follows the same path backward.
|
|
82
|
+
*
|
|
83
|
+
* @param options - Slide direction and displacement settings; defaults apply when omitted. See
|
|
84
|
+
* {@link PibblSlideOptions} .
|
|
85
|
+
* @returns A slide transition effect. See {@link PibblTransitionEffect}.
|
|
86
|
+
*
|
|
87
|
+
* @see {@link PibblSlideOptions}
|
|
88
|
+
* @see {@link PibblTransitionEffect}
|
|
89
|
+
*/
|
|
90
|
+
export declare function slide(options?: PibblSlideOptions): PibblTransitionEffect;
|
|
91
|
+
/**
|
|
92
|
+
* Scale around an explicit local origin while fading.
|
|
93
|
+
*
|
|
94
|
+
* @param options - Zoom scale and origin settings. See {@link PibblZoomOptions}.
|
|
95
|
+
* @returns A zoom transition effect. See {@link PibblTransitionEffect}.
|
|
96
|
+
*
|
|
97
|
+
* @see {@link PibblZoomOptions}
|
|
98
|
+
* @see {@link PibblTransitionEffect}
|
|
99
|
+
*/
|
|
100
|
+
export declare function zoom(options: PibblZoomOptions): PibblTransitionEffect;
|
|
101
|
+
/**
|
|
102
|
+
* Reveal from one side of an explicit local region.
|
|
103
|
+
*
|
|
104
|
+
* @param options - Wipe direction and shape settings. See {@link PibblWipeOptions}.
|
|
105
|
+
* @returns A wipe transition effect. See {@link PibblTransitionEffect}.
|
|
106
|
+
*
|
|
107
|
+
* @see {@link PibblWipeOptions}
|
|
108
|
+
* @see {@link PibblTransitionEffect}
|
|
109
|
+
*/
|
|
110
|
+
export declare function wipe(options: PibblWipeOptions): PibblTransitionEffect;
|
|
111
|
+
/**
|
|
112
|
+
* Resolve from a soft transparent image into crisp content using native filters.
|
|
113
|
+
*
|
|
114
|
+
* @param options - Blur settings; defaults apply when omitted. See {@link PibblBlurRevealOptions}.
|
|
115
|
+
* @returns A blur-reveal transition effect. See {@link PibblTransitionEffect}.
|
|
116
|
+
*
|
|
117
|
+
* @see {@link PibblBlurRevealOptions}
|
|
118
|
+
* @see {@link PibblTransitionEffect}
|
|
119
|
+
*/
|
|
120
|
+
export declare function blurReveal(options?: PibblBlurRevealOptions): PibblTransitionEffect;
|
|
121
|
+
/**
|
|
122
|
+
* A deterministic scattered reveal. Cell size is a minimum; the grid is capped at 128×128.
|
|
123
|
+
*
|
|
124
|
+
* @param options - Dissolve sampling and appearance settings. See {@link PibblDissolveOptions}.
|
|
125
|
+
* @returns A dissolve transition effect. See {@link PibblTransitionEffect}.
|
|
126
|
+
*
|
|
127
|
+
* @see {@link PibblDissolveOptions}
|
|
128
|
+
* @see {@link PibblTransitionEffect}
|
|
129
|
+
*/
|
|
130
|
+
export declare function dissolve(options: PibblDissolveOptions): PibblTransitionEffect;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { blur, opacity } from "../../filters/native.js";
|
|
2
|
+
import { defineTransitionEffect } from "./fade.js";
|
|
3
|
+
import { captureTransition, finite, regionSnapshot, seededNoise } from "./capture.js";
|
|
4
|
+
const captured = (draw) => defineTransitionEffect((q) => q === 1 ? [] : q === 0 ? [opacity({ amount: 0 })] : [captureTransition((frame) => draw(frame, q))]);
|
|
5
|
+
function slide(options = {}) {
|
|
6
|
+
const x = finite(options.x ?? 0, "x"), y = finite(options.y ?? 24, "y");
|
|
7
|
+
return captured(({ context, drawSource }, q) => {
|
|
8
|
+
context.translate(x * (1 - q), y * (1 - q));
|
|
9
|
+
context.globalAlpha = q;
|
|
10
|
+
drawSource();
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function zoom(options) {
|
|
14
|
+
const x = finite(options.origin.x, "origin.x"), y = finite(options.origin.y, "origin.y"), from = finite(options.from ?? 0.8, "from", 0);
|
|
15
|
+
return captured(({ context: c, drawSource }, q) => {
|
|
16
|
+
const scale = from + (1 - from) * q;
|
|
17
|
+
c.translate(x, y);
|
|
18
|
+
c.scale(scale, scale);
|
|
19
|
+
c.translate(-x, -y);
|
|
20
|
+
c.globalAlpha = q;
|
|
21
|
+
drawSource();
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function wipe(options) {
|
|
25
|
+
const r = regionSnapshot(options.region), direction = options.direction ?? "left";
|
|
26
|
+
if (!["left", "right", "top", "bottom"].includes(direction)) throw new TypeError("Unknown wipe direction.");
|
|
27
|
+
return captured(({ context: c, drawSource }, q) => {
|
|
28
|
+
const vertical = direction === "top" || direction === "bottom";
|
|
29
|
+
const width = vertical ? r.width : r.width * q, height = vertical ? r.height * q : r.height;
|
|
30
|
+
c.beginPath();
|
|
31
|
+
c.rect(r.x + (direction === "right" ? r.width - width : 0), r.y + (direction === "bottom" ? r.height - height : 0), width, height);
|
|
32
|
+
c.clip();
|
|
33
|
+
drawSource();
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function blurReveal(options = {}) {
|
|
37
|
+
const radius = finite(options.radius ?? 16, "radius", 0);
|
|
38
|
+
return defineTransitionEffect((q) => q === 1 ? [] : [blur({ radius: radius * (1 - q) }), opacity({ amount: q })]);
|
|
39
|
+
}
|
|
40
|
+
function dissolve(options) {
|
|
41
|
+
const r = regionSnapshot(options.region), size = finite(options.cellSize ?? 5, "cellSize", 1), noise = seededNoise(finite(options.seed ?? 0, "seed"));
|
|
42
|
+
const columns = Math.min(128, Math.ceil(r.width / size)), rows = Math.min(128, Math.ceil(r.height / size));
|
|
43
|
+
return captured(({ context: c, drawSource }, q) => {
|
|
44
|
+
c.beginPath();
|
|
45
|
+
for (let row = 0; row < rows; row++) for (let col = 0; col < columns; col++) if (noise(row * columns + col) < q) c.rect(r.x + col * r.width / columns, r.y + row * r.height / rows, r.width / columns, r.height / rows);
|
|
46
|
+
c.clip();
|
|
47
|
+
drawSource();
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
blurReveal,
|
|
52
|
+
dissolve,
|
|
53
|
+
slide,
|
|
54
|
+
wipe,
|
|
55
|
+
zoom
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/transitions/common.ts"],
|
|
4
|
+
"sourcesContent": ["import { blur, opacity } from '../../filters/native.js';\nimport { defineTransitionEffect, type PibblTransitionEffect } from './fade.js';\nimport { captureTransition, finite, regionSnapshot, seededNoise, type CaptureFrame, type TransitionRegion } from './capture.js';\n\n/**\n * Direction and displacement controls for a sliding visibility transition.\n *\n * @see {@link slide}\n */\nexport interface PibblSlideOptions {\n /**\n * Horizontal coordinate or displacement in the containing coordinate system. See\n * {@link PibblSlideOptions}.\n */\n readonly x?: number;\n /**\n * Vertical coordinate or displacement in the containing coordinate system. See\n * {@link PibblSlideOptions}.\n */\n readonly y?: number;\n}\n/**\n * Scale controls for a zooming visibility transition.\n *\n * @see {@link zoom}\n */\nexport interface PibblZoomOptions {\n /** Origin of the transform or geometric query. See {@link PibblZoomOptions}. */\n readonly origin: Readonly<{\n /**\n * Horizontal coordinate or displacement in the containing coordinate system. See\n * {@link PibblZoomOptions}.\n */\n x: number;\n /**\n * Vertical coordinate or displacement in the containing coordinate system. See\n * {@link PibblZoomOptions}.\n */\n y: number;\n }>;\n /** Starting endpoint or value. See {@link PibblZoomOptions}. */\n readonly from?: number;\n}\n/**\n * Direction and clipping controls for a wiping visibility transition.\n *\n * @see {@link wipe}\n */\nexport interface PibblWipeOptions {\n /** Logical region over which the effect is evaluated. See {@link TransitionRegion}. */\n readonly region: TransitionRegion;\n /** Direction in which this operation proceeds. See {@link PibblWipeOptions}. */\n readonly direction?: 'left' | 'right' | 'top' | 'bottom';\n}\n/**\n * Blur controls for a visibility reveal transition.\n *\n * @see {@link blurReveal}\n */\nexport interface PibblBlurRevealOptions {\n /**\n * Radius in the coordinate system of this geometry or effect. See {@link PibblBlurRevealOptions}.\n */\n readonly radius?: number;\n}\n/**\n * Noise and threshold controls for a dissolving visibility transition.\n *\n * @see {@link dissolve}\n */\nexport interface PibblDissolveOptions {\n /** Logical region over which the effect is evaluated. See {@link TransitionRegion}. */\n readonly region: TransitionRegion;\n /** Size of the dissolve noise cells. See {@link PibblDissolveOptions}. */\n readonly cellSize?: number;\n /**\n * Seed used for deterministic sampling or simulation initialization. See\n * {@link PibblDissolveOptions}.\n */\n readonly seed?: number;\n}\nconst captured = (draw: (frame: CaptureFrame, progress: number) => void) => defineTransitionEffect(q => q === 1 ? [] : q === 0 ? [opacity({ amount: 0 })] : [captureTransition(frame => draw(frame, q))]);\n/**\n * Translate from an offset while fading; exit follows the same path backward.\n *\n * @param options - Slide direction and displacement settings; defaults apply when omitted. See\n * {@link PibblSlideOptions} .\n * @returns A slide transition effect. See {@link PibblTransitionEffect}.\n *\n * @see {@link PibblSlideOptions}\n * @see {@link PibblTransitionEffect}\n */\nexport function slide(options: PibblSlideOptions = {}): PibblTransitionEffect {\n const x = finite(options.x ?? 0, 'x'), y = finite(options.y ?? 24, 'y');\n return captured(({ context, drawSource }, q) => { context.translate(x * (1 - q), y * (1 - q)); context.globalAlpha = q; drawSource(); });\n}\n/**\n * Scale around an explicit local origin while fading.\n *\n * @param options - Zoom scale and origin settings. See {@link PibblZoomOptions}.\n * @returns A zoom transition effect. See {@link PibblTransitionEffect}.\n *\n * @see {@link PibblZoomOptions}\n * @see {@link PibblTransitionEffect}\n */\nexport function zoom(options: PibblZoomOptions): PibblTransitionEffect {\n const x = finite(options.origin.x, 'origin.x'), y = finite(options.origin.y, 'origin.y'), from = finite(options.from ?? .8, 'from', 0);\n return captured(({ context: c, drawSource }, q) => { const scale = from + (1 - from) * q; c.translate(x, y); c.scale(scale, scale); c.translate(-x, -y); c.globalAlpha = q; drawSource(); });\n}\n/**\n * Reveal from one side of an explicit local region.\n *\n * @param options - Wipe direction and shape settings. See {@link PibblWipeOptions}.\n * @returns A wipe transition effect. See {@link PibblTransitionEffect}.\n *\n * @see {@link PibblWipeOptions}\n * @see {@link PibblTransitionEffect}\n */\nexport function wipe(options: PibblWipeOptions): PibblTransitionEffect {\n const r = regionSnapshot(options.region), direction = options.direction ?? 'left';\n if (!['left', 'right', 'top', 'bottom'].includes(direction)) throw new TypeError('Unknown wipe direction.');\n return captured(({ context: c, drawSource }, q) => {\n const vertical = direction === 'top' || direction === 'bottom';\n const width = vertical ? r.width : r.width * q, height = vertical ? r.height * q : r.height;\n c.beginPath(); c.rect(r.x + (direction === 'right' ? r.width - width : 0), r.y + (direction === 'bottom' ? r.height - height : 0), width, height); c.clip(); drawSource();\n });\n}\n/**\n * Resolve from a soft transparent image into crisp content using native filters.\n *\n * @param options - Blur settings; defaults apply when omitted. See {@link PibblBlurRevealOptions}.\n * @returns A blur-reveal transition effect. See {@link PibblTransitionEffect}.\n *\n * @see {@link PibblBlurRevealOptions}\n * @see {@link PibblTransitionEffect}\n */\nexport function blurReveal(options: PibblBlurRevealOptions = {}): PibblTransitionEffect {\n const radius = finite(options.radius ?? 16, 'radius', 0);\n return defineTransitionEffect(q => q === 1 ? [] : [blur({ radius: radius * (1 - q) }), opacity({ amount: q })]);\n}\n/**\n * A deterministic scattered reveal. Cell size is a minimum; the grid is capped at 128\u00D7128.\n *\n * @param options - Dissolve sampling and appearance settings. See {@link PibblDissolveOptions}.\n * @returns A dissolve transition effect. See {@link PibblTransitionEffect}.\n *\n * @see {@link PibblDissolveOptions}\n * @see {@link PibblTransitionEffect}\n */\nexport function dissolve(options: PibblDissolveOptions): PibblTransitionEffect {\n const r = regionSnapshot(options.region), size = finite(options.cellSize ?? 5, 'cellSize', 1), noise = seededNoise(finite(options.seed ?? 0, 'seed'));\n const columns = Math.min(128, Math.ceil(r.width / size)), rows = Math.min(128, Math.ceil(r.height / size));\n return captured(({ context: c, drawSource }, q) => {\n c.beginPath();\n for (let row = 0; row < rows; row++) for (let col = 0; col < columns; col++) if (noise(row * columns + col) < q) c.rect(r.x + col * r.width / columns, r.y + row * r.height / rows, r.width / columns, r.height / rows);\n c.clip(); drawSource();\n });\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,MAAM,eAAe;AAC9B,SAAS,8BAA0D;AACnE,SAAS,mBAAmB,QAAQ,gBAAgB,mBAA6D;AA+EjH,MAAM,WAAW,CAAC,SAA0D,uBAAuB,OAAK,MAAM,IAAI,CAAC,IAAI,MAAM,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,WAAS,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;AAWjM,SAAS,MAAM,UAA6B,CAAC,GAA0B;AAC5E,QAAM,IAAI,OAAO,QAAQ,KAAK,GAAG,GAAG,GAAG,IAAI,OAAO,QAAQ,KAAK,IAAI,GAAG;AACtE,SAAO,SAAS,CAAC,EAAE,SAAS,WAAW,GAAG,MAAM;AAAE,YAAQ,UAAU,KAAK,IAAI,IAAI,KAAK,IAAI,EAAE;AAAG,YAAQ,cAAc;AAAG,eAAW;AAAA,EAAG,CAAC;AACzI;AAUO,SAAS,KAAK,SAAkD;AACrE,QAAM,IAAI,OAAO,QAAQ,OAAO,GAAG,UAAU,GAAG,IAAI,OAAO,QAAQ,OAAO,GAAG,UAAU,GAAG,OAAO,OAAO,QAAQ,QAAQ,KAAI,QAAQ,CAAC;AACrI,SAAO,SAAS,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,MAAM;AAAE,UAAM,QAAQ,QAAQ,IAAI,QAAQ;AAAG,MAAE,UAAU,GAAG,CAAC;AAAG,MAAE,MAAM,OAAO,KAAK;AAAG,MAAE,UAAU,CAAC,GAAG,CAAC,CAAC;AAAG,MAAE,cAAc;AAAG,eAAW;AAAA,EAAG,CAAC;AAC7L;AAUO,SAAS,KAAK,SAAkD;AACrE,QAAM,IAAI,eAAe,QAAQ,MAAM,GAAG,YAAY,QAAQ,aAAa;AAC3E,MAAI,CAAC,CAAC,QAAQ,SAAS,OAAO,QAAQ,EAAE,SAAS,SAAS,EAAG,OAAM,IAAI,UAAU,yBAAyB;AAC1G,SAAO,SAAS,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,MAAM;AACjD,UAAM,WAAW,cAAc,SAAS,cAAc;AACtD,UAAM,QAAQ,WAAW,EAAE,QAAQ,EAAE,QAAQ,GAAG,SAAS,WAAW,EAAE,SAAS,IAAI,EAAE;AACrF,MAAE,UAAU;AAAG,MAAE,KAAK,EAAE,KAAK,cAAc,UAAU,EAAE,QAAQ,QAAQ,IAAI,EAAE,KAAK,cAAc,WAAW,EAAE,SAAS,SAAS,IAAI,OAAO,MAAM;AAAG,MAAE,KAAK;AAAG,eAAW;AAAA,EAC1K,CAAC;AACH;AAUO,SAAS,WAAW,UAAkC,CAAC,GAA0B;AACtF,QAAM,SAAS,OAAO,QAAQ,UAAU,IAAI,UAAU,CAAC;AACvD,SAAO,uBAAuB,OAAK,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,UAAU,IAAI,GAAG,CAAC,GAAG,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;AAChH;AAUO,SAAS,SAAS,SAAsD;AAC7E,QAAM,IAAI,eAAe,QAAQ,MAAM,GAAG,OAAO,OAAO,QAAQ,YAAY,GAAG,YAAY,CAAC,GAAG,QAAQ,YAAY,OAAO,QAAQ,QAAQ,GAAG,MAAM,CAAC;AACpJ,QAAM,UAAU,KAAK,IAAI,KAAK,KAAK,KAAK,EAAE,QAAQ,IAAI,CAAC,GAAG,OAAO,KAAK,IAAI,KAAK,KAAK,KAAK,EAAE,SAAS,IAAI,CAAC;AACzG,SAAO,SAAS,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,MAAM;AACjD,MAAE,UAAU;AACZ,aAAS,MAAM,GAAG,MAAM,MAAM,MAAO,UAAS,MAAM,GAAG,MAAM,SAAS,MAAO,KAAI,MAAM,MAAM,UAAU,GAAG,IAAI,EAAG,GAAE,KAAK,EAAE,IAAI,MAAM,EAAE,QAAQ,SAAS,EAAE,IAAI,MAAM,EAAE,SAAS,MAAM,EAAE,QAAQ,SAAS,EAAE,SAAS,IAAI;AACtN,MAAE,KAAK;AAAG,eAAW;AAAA,EACvB,CAAC;AACH;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { type TransitionRegion } from './capture.js';
|
|
2
|
+
import { type PibblTransitionEffect } from './fade.js';
|
|
3
|
+
/**
|
|
4
|
+
* Progress, geometry, and drawing context supplied to a custom transition renderer.
|
|
5
|
+
*
|
|
6
|
+
* @see {@link PibblTransitionDefinition}
|
|
7
|
+
*/
|
|
8
|
+
export interface PibblTransitionRenderFrame {
|
|
9
|
+
/** Borrowed for this synchronous callback only. Coordinates are receiver-local. */
|
|
10
|
+
readonly context: OffscreenCanvasRenderingContext2D;
|
|
11
|
+
/** Captured source pixels available during this synchronous rendering callback. See {@link PibblTransitionRenderFrame}. */
|
|
12
|
+
readonly source: OffscreenCanvas;
|
|
13
|
+
/** Bounds of the source pixels supplied to the transition. See {@link TransitionRegion}. */
|
|
14
|
+
readonly sourceBounds: Readonly<TransitionRegion>;
|
|
15
|
+
/**
|
|
16
|
+
* Normalized progress through the current animation or transition. See
|
|
17
|
+
* {@link PibblTransitionRenderFrame}.
|
|
18
|
+
*/
|
|
19
|
+
readonly progress: number;
|
|
20
|
+
/** Selects `"enter"`, `"exit"` for phase. See {@link PibblTransitionRenderFrame}. */
|
|
21
|
+
readonly phase: 'enter' | 'exit';
|
|
22
|
+
/** Forward milliseconds since this run began, unaffected by reversals. */
|
|
23
|
+
readonly elapsed: number;
|
|
24
|
+
/**
|
|
25
|
+
* Material progress at an earlier time in this run (useful for particle births).
|
|
26
|
+
* @param elapsed - Elapsed transition time in milliseconds.
|
|
27
|
+
* @returns Transition progress at the requested time.
|
|
28
|
+
*/
|
|
29
|
+
readonly progressAt: (elapsed: number) => number;
|
|
30
|
+
/**
|
|
31
|
+
* Draws the captured source into the transition's current rendering context. See
|
|
32
|
+
* {@link PibblTransitionRenderFrame}.
|
|
33
|
+
*/
|
|
34
|
+
readonly drawSource: () => void;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Synchronous transition rendering callback and optional post-transition linger duration.
|
|
38
|
+
*
|
|
39
|
+
* @see {@link PibblTransitionRenderFrame}
|
|
40
|
+
* @see {@link defineTransition}
|
|
41
|
+
*/
|
|
42
|
+
export interface PibblTransitionDefinition {
|
|
43
|
+
/**
|
|
44
|
+
* Renders the current data or resources using the supplied context. See
|
|
45
|
+
* {@link PibblTransitionRenderFrame}.
|
|
46
|
+
* @param frame - Captured source, presentation context, progress, and timing services. See
|
|
47
|
+
* {@link PibblTransitionRenderFrame} .
|
|
48
|
+
*/
|
|
49
|
+
readonly render: (frame: Readonly<PibblTransitionRenderFrame>) => void;
|
|
50
|
+
/** Additional milliseconds after material reaches its target. Default zero. */
|
|
51
|
+
readonly linger?: number;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Inert custom definition. The callback may call synchronous JS or WASM kernels.
|
|
55
|
+
*
|
|
56
|
+
* @param definition - Renderer and metadata defining the effect. See
|
|
57
|
+
* {@link PibblTransitionDefinition} .
|
|
58
|
+
* @returns A transition effect usable by the visibility transition hook. See
|
|
59
|
+
* {@link PibblTransitionEffect} .
|
|
60
|
+
*
|
|
61
|
+
* @see {@link PibblTransitionDefinition}
|
|
62
|
+
* @see {@link PibblTransitionEffect}
|
|
63
|
+
*/
|
|
64
|
+
export declare function defineTransition(definition: PibblTransitionDefinition): PibblTransitionEffect;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { opacity } from "../../filters/native.js";
|
|
2
|
+
import { withSignalWriteForbidden } from "../signals/graph.js";
|
|
3
|
+
import { captureTransition, finite } from "./capture.js";
|
|
4
|
+
import { defineTransitionEffect } from "./fade.js";
|
|
5
|
+
function defineTransition(definition) {
|
|
6
|
+
const render = definition.render, linger = finite(definition.linger ?? 0, "linger", 0);
|
|
7
|
+
if (typeof render !== "function") throw new TypeError("defineTransition requires a synchronous render callback.");
|
|
8
|
+
return defineTransitionEffect((progress, phase, frame) => {
|
|
9
|
+
if (!frame.active || !linger) {
|
|
10
|
+
if (progress === 1) return [];
|
|
11
|
+
if (progress === 0) return [opacity({ amount: 0 })];
|
|
12
|
+
}
|
|
13
|
+
return [captureTransition(({ context, source, windows, drawSource }) => {
|
|
14
|
+
const result = withSignalWriteForbidden("Transition render callbacks cannot write to signals.", () => render(Object.freeze({
|
|
15
|
+
context,
|
|
16
|
+
source,
|
|
17
|
+
sourceBounds: Object.freeze({ ...windows.source.logicalBounds }),
|
|
18
|
+
progress,
|
|
19
|
+
phase,
|
|
20
|
+
elapsed: frame.elapsed,
|
|
21
|
+
progressAt: frame.progressAt,
|
|
22
|
+
drawSource
|
|
23
|
+
})));
|
|
24
|
+
if (result && typeof result.then === "function") throw new TypeError("Transition render callbacks must be synchronous.");
|
|
25
|
+
})];
|
|
26
|
+
}, linger);
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
defineTransition
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=define-transition.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/transitions/define-transition.ts"],
|
|
4
|
+
"sourcesContent": ["import { opacity } from '../../filters/native.js';\nimport { withSignalWriteForbidden } from '../signals/graph.js';\nimport { captureTransition, finite, type TransitionRegion } from './capture.js';\nimport { defineTransitionEffect, type PibblTransitionEffect } from './fade.js';\n\n/**\n * Progress, geometry, and drawing context supplied to a custom transition renderer.\n *\n * @see {@link PibblTransitionDefinition}\n */\nexport interface PibblTransitionRenderFrame {\n /** Borrowed for this synchronous callback only. Coordinates are receiver-local. */\n readonly context: OffscreenCanvasRenderingContext2D;\n /** Captured source pixels available during this synchronous rendering callback. See {@link PibblTransitionRenderFrame}. */\n readonly source: OffscreenCanvas;\n /** Bounds of the source pixels supplied to the transition. See {@link TransitionRegion}. */\n readonly sourceBounds: Readonly<TransitionRegion>;\n /**\n * Normalized progress through the current animation or transition. See\n * {@link PibblTransitionRenderFrame}.\n */\n readonly progress: number;\n /** Selects `\"enter\"`, `\"exit\"` for phase. See {@link PibblTransitionRenderFrame}. */\n readonly phase: 'enter' | 'exit';\n /** Forward milliseconds since this run began, unaffected by reversals. */\n readonly elapsed: number;\n /**\n * Material progress at an earlier time in this run (useful for particle births).\n * @param elapsed - Elapsed transition time in milliseconds.\n * @returns Transition progress at the requested time.\n */\n readonly progressAt: (elapsed: number) => number;\n /**\n * Draws the captured source into the transition's current rendering context. See\n * {@link PibblTransitionRenderFrame}.\n */\n readonly drawSource: () => void;\n}\n/**\n * Synchronous transition rendering callback and optional post-transition linger duration.\n *\n * @see {@link PibblTransitionRenderFrame}\n * @see {@link defineTransition}\n */\nexport interface PibblTransitionDefinition {\n /**\n * Renders the current data or resources using the supplied context. See\n * {@link PibblTransitionRenderFrame}.\n * @param frame - Captured source, presentation context, progress, and timing services. See\n * {@link PibblTransitionRenderFrame} .\n */\n readonly render: (frame: Readonly<PibblTransitionRenderFrame>) => void;\n /** Additional milliseconds after material reaches its target. Default zero. */\n readonly linger?: number;\n}\n/**\n * Inert custom definition. The callback may call synchronous JS or WASM kernels.\n *\n * @param definition - Renderer and metadata defining the effect. See\n * {@link PibblTransitionDefinition} .\n * @returns A transition effect usable by the visibility transition hook. See\n * {@link PibblTransitionEffect} .\n *\n * @see {@link PibblTransitionDefinition}\n * @see {@link PibblTransitionEffect}\n */\nexport function defineTransition(definition: PibblTransitionDefinition): PibblTransitionEffect {\n const render = definition.render, linger = finite(definition.linger ?? 0, 'linger', 0);\n if (typeof render !== 'function') throw new TypeError('defineTransition requires a synchronous render callback.');\n return defineTransitionEffect((progress, phase, frame) => {\n if (!frame.active || !linger) {\n if (progress === 1) return [];\n if (progress === 0) return [opacity({ amount: 0 })];\n }\n return [captureTransition(({ context, source, windows, drawSource }) => {\n const result: unknown = withSignalWriteForbidden('Transition render callbacks cannot write to signals.', () => render(Object.freeze({ context, source,\n sourceBounds: Object.freeze({ ...windows.source.logicalBounds }), progress, phase,\n elapsed: frame.elapsed, progressAt: frame.progressAt, drawSource,\n })));\n if (result && typeof (result as { then?: unknown }).then === 'function') throw new TypeError('Transition render callbacks must be synchronous.');\n })];\n }, linger);\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,eAAe;AACxB,SAAS,gCAAgC;AACzC,SAAS,mBAAmB,cAAqC;AACjE,SAAS,8BAA0D;AA+D5D,SAAS,iBAAiB,YAA8D;AAC7F,QAAM,SAAS,WAAW,QAAQ,SAAS,OAAO,WAAW,UAAU,GAAG,UAAU,CAAC;AACrF,MAAI,OAAO,WAAW,WAAY,OAAM,IAAI,UAAU,0DAA0D;AAChH,SAAO,uBAAuB,CAAC,UAAU,OAAO,UAAU;AACxD,QAAI,CAAC,MAAM,UAAU,CAAC,QAAQ;AAC5B,UAAI,aAAa,EAAG,QAAO,CAAC;AAC5B,UAAI,aAAa,EAAG,QAAO,CAAC,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;AAAA,IACpD;AACA,WAAO,CAAC,kBAAkB,CAAC,EAAE,SAAS,QAAQ,SAAS,WAAW,MAAM;AACtE,YAAM,SAAkB,yBAAyB,wDAAwD,MAAM,OAAO,OAAO,OAAO;AAAA,QAAE;AAAA,QAAS;AAAA,QAC7I,cAAc,OAAO,OAAO,EAAE,GAAG,QAAQ,OAAO,cAAc,CAAC;AAAA,QAAG;AAAA,QAAU;AAAA,QAC5E,SAAS,MAAM;AAAA,QAAS,YAAY,MAAM;AAAA,QAAY;AAAA,MACxD,CAAC,CAAC,CAAC;AACH,UAAI,UAAU,OAAQ,OAA8B,SAAS,WAAY,OAAM,IAAI,UAAU,kDAAkD;AAAA,IACjJ,CAAC,CAAC;AAAA,EACJ,GAAG,MAAM;AACX;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { PibblEmbersOptions } from "./embers.js";
|
|
2
|
+
import type { lazyTransitionKernel } from "./wasm/kernel.js";
|
|
3
|
+
/**
|
|
4
|
+
* Collision information produced by an ember's physical interaction.
|
|
5
|
+
*
|
|
6
|
+
* @see {@link PibblEmbersPhysicsOptions}
|
|
7
|
+
*/
|
|
8
|
+
export interface PibblEmberCollision {
|
|
9
|
+
/** Fraction of the swept segment at impact, from zero to one. */
|
|
10
|
+
readonly fraction: number;
|
|
11
|
+
/** Outward surface normal in the receiving primitive's local coordinates. */
|
|
12
|
+
readonly normal: readonly [number, number];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Collision and physical motion options for transition embers.
|
|
16
|
+
*
|
|
17
|
+
* @see {@link PibblEmberCollision}
|
|
18
|
+
* @see {@link PibblEmbersOptions}
|
|
19
|
+
*/
|
|
20
|
+
export interface PibblEmbersPhysicsOptions {
|
|
21
|
+
/** Local units/second². Default [0, -60]. */
|
|
22
|
+
readonly gravity?: readonly [number, number];
|
|
23
|
+
/** Target air velocity in local units/second. Default [0, -45]. */
|
|
24
|
+
readonly wind?: readonly [number, number];
|
|
25
|
+
/** Velocity damping per second. Default 4. */
|
|
26
|
+
readonly drag?: number;
|
|
27
|
+
/** Bounce coefficient, zero to one. Default 0.5. */
|
|
28
|
+
readonly restitution?: number;
|
|
29
|
+
/** Packed committed solids in receiver-local coordinates (e.g. physicsObstacles2D).
|
|
30
|
+
* Revision must change whenever data changes. Up to 8192 packed numbers.
|
|
31
|
+
* Sweeps run as one WASM batch; mutually exclusive with collide.
|
|
32
|
+
*/
|
|
33
|
+
readonly obstacles?: Readonly<{
|
|
34
|
+
/**
|
|
35
|
+
* Reads the current committed values required by this integration. See
|
|
36
|
+
* {@link PibblEmbersPhysicsOptions}.
|
|
37
|
+
* @returns The current obstacle revision and packed geometry arrays.
|
|
38
|
+
*/
|
|
39
|
+
read(): Readonly<{
|
|
40
|
+
/**
|
|
41
|
+
* Revision used to detect changes to the underlying state or geometry. See
|
|
42
|
+
* {@link PibblEmbersPhysicsOptions}.
|
|
43
|
+
*/
|
|
44
|
+
revision: number;
|
|
45
|
+
/** Packed box obstacle data consumed by the simulation. See {@link PibblEmbersPhysicsOptions}. */
|
|
46
|
+
boxes: Float64Array;
|
|
47
|
+
/**
|
|
48
|
+
* Packed ellipse obstacle data consumed by the simulation. See
|
|
49
|
+
* {@link PibblEmbersPhysicsOptions}.
|
|
50
|
+
*/
|
|
51
|
+
ellipses: Float64Array;
|
|
52
|
+
/**
|
|
53
|
+
* Packed polygon obstacle data consumed by the simulation. See
|
|
54
|
+
* {@link PibblEmbersPhysicsOptions}.
|
|
55
|
+
*/
|
|
56
|
+
polygons: Float64Array;
|
|
57
|
+
}>;
|
|
58
|
+
}>;
|
|
59
|
+
/**
|
|
60
|
+
* Synchronous point sweep, called in Advance. Return the closest hit, if any.
|
|
61
|
+
* @param from - Previous particle position.
|
|
62
|
+
* @param to - Proposed particle position.
|
|
63
|
+
* @returns Collision information, or undefined when motion is unobstructed. See
|
|
64
|
+
* {@link PibblEmberCollision} .
|
|
65
|
+
*/
|
|
66
|
+
readonly collide?: (from: readonly [number, number], to: readonly [number, number]) => PibblEmberCollision | undefined;
|
|
67
|
+
}
|
|
68
|
+
export declare function resolveEmbersPhysics(options: PibblEmbersPhysicsOptions): Readonly<{
|
|
69
|
+
obstacles: Readonly<{
|
|
70
|
+
/**
|
|
71
|
+
* Reads the current committed values required by this integration. See
|
|
72
|
+
* {@link PibblEmbersPhysicsOptions}.
|
|
73
|
+
* @returns The current obstacle revision and packed geometry arrays.
|
|
74
|
+
*/
|
|
75
|
+
read(): Readonly<{
|
|
76
|
+
/**
|
|
77
|
+
* Revision used to detect changes to the underlying state or geometry. See
|
|
78
|
+
* {@link PibblEmbersPhysicsOptions}.
|
|
79
|
+
*/
|
|
80
|
+
revision: number;
|
|
81
|
+
/** Packed box obstacle data consumed by the simulation. See {@link PibblEmbersPhysicsOptions}. */
|
|
82
|
+
boxes: Float64Array;
|
|
83
|
+
/**
|
|
84
|
+
* Packed ellipse obstacle data consumed by the simulation. See
|
|
85
|
+
* {@link PibblEmbersPhysicsOptions}.
|
|
86
|
+
*/
|
|
87
|
+
ellipses: Float64Array;
|
|
88
|
+
/**
|
|
89
|
+
* Packed polygon obstacle data consumed by the simulation. See
|
|
90
|
+
* {@link PibblEmbersPhysicsOptions}.
|
|
91
|
+
*/
|
|
92
|
+
polygons: Float64Array;
|
|
93
|
+
}>;
|
|
94
|
+
}> | undefined;
|
|
95
|
+
gravity: readonly [number, number];
|
|
96
|
+
wind: readonly [number, number];
|
|
97
|
+
drag: number;
|
|
98
|
+
restitution: number;
|
|
99
|
+
collide: ((from: readonly [number, number], to: readonly [number, number]) => PibblEmberCollision | undefined) | undefined;
|
|
100
|
+
}>;
|
|
101
|
+
type Kernel = ReturnType<ReturnType<typeof lazyTransitionKernel>>;
|
|
102
|
+
export declare function emberSimulation(kernel: Kernel, options: ReturnType<typeof resolveEmbersPhysics>, region: Readonly<{
|
|
103
|
+
x: number;
|
|
104
|
+
y: number;
|
|
105
|
+
width: number;
|
|
106
|
+
height: number;
|
|
107
|
+
}>, linger: number, burnWidth: number): {
|
|
108
|
+
reset(): void;
|
|
109
|
+
readonly disposed: boolean;
|
|
110
|
+
dispose(): void;
|
|
111
|
+
advance(elapsed: number, progressAt: (time: number) => number): void;
|
|
112
|
+
present(): void;
|
|
113
|
+
};
|
|
114
|
+
export {};
|