@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,1078 @@
|
|
|
1
|
+
import { getInteractionRoot } from "../global-state.js";
|
|
2
|
+
import { batch } from "../signals/graph.js";
|
|
3
|
+
import {
|
|
4
|
+
adaptClipboardEvent,
|
|
5
|
+
isNativeClipboardEventType
|
|
6
|
+
} from "./adapters/clipboard.js";
|
|
7
|
+
import {
|
|
8
|
+
adaptDragEvent,
|
|
9
|
+
isNativeDragEventType
|
|
10
|
+
} from "./adapters/drag.js";
|
|
11
|
+
import {
|
|
12
|
+
adaptEditingEvent,
|
|
13
|
+
isNativeEditingEventType
|
|
14
|
+
} from "./adapters/editing.js";
|
|
15
|
+
import {
|
|
16
|
+
adaptKeyboardFocusEvent,
|
|
17
|
+
isNativeKeyboardFocusEventType
|
|
18
|
+
} from "./adapters/keyboard-focus.js";
|
|
19
|
+
import {
|
|
20
|
+
adaptMouseEvent,
|
|
21
|
+
isNativeMouseEventType
|
|
22
|
+
} from "./adapters/mouse.js";
|
|
23
|
+
import {
|
|
24
|
+
adaptPointerEvent,
|
|
25
|
+
isNativePointerEventType
|
|
26
|
+
} from "./adapters/pointer.js";
|
|
27
|
+
import {
|
|
28
|
+
adaptTouchEvent,
|
|
29
|
+
isNativeTouchEventType
|
|
30
|
+
} from "./adapters/touch.js";
|
|
31
|
+
import {
|
|
32
|
+
adaptWheelEvent,
|
|
33
|
+
isNativeWheelEventType
|
|
34
|
+
} from "./adapters/wheel.js";
|
|
35
|
+
import { planBoundaryTransitions } from "./boundary-transitions.js";
|
|
36
|
+
import { buildEventPath } from "./event-path.js";
|
|
37
|
+
import {
|
|
38
|
+
resolveCoordinateOutput,
|
|
39
|
+
resolveCoordinateTarget
|
|
40
|
+
} from "./hit-test.js";
|
|
41
|
+
import { PibblHitDisposition } from "./paint-entry.js";
|
|
42
|
+
import {
|
|
43
|
+
dispatchCapturedResolverInput,
|
|
44
|
+
dispatchResolvedInput,
|
|
45
|
+
getResolverPointerCapture
|
|
46
|
+
} from "./resolver-input.js";
|
|
47
|
+
import { dispatchEventPath } from "./propagation.js";
|
|
48
|
+
import {
|
|
49
|
+
activateLogicalPointerCapture,
|
|
50
|
+
cancelLogicalPointerCapture,
|
|
51
|
+
consumeLogicalPointerCaptureLoss,
|
|
52
|
+
getLogicalPointerCapture,
|
|
53
|
+
processPendingLogicalPointerCapture
|
|
54
|
+
} from "./pointer-capture.js";
|
|
55
|
+
import {
|
|
56
|
+
releaseTarget
|
|
57
|
+
} from "./registrations.js";
|
|
58
|
+
const cursorDefaultOwnership = /* @__PURE__ */ new WeakMap();
|
|
59
|
+
const pointerHoverTargets = /* @__PURE__ */ new WeakMap();
|
|
60
|
+
const touchTargets = /* @__PURE__ */ new WeakMap();
|
|
61
|
+
const dragHoverTargets = /* @__PURE__ */ new WeakMap();
|
|
62
|
+
const manipulationPointerPresses = /* @__PURE__ */ new WeakMap();
|
|
63
|
+
const pendingManipulationActivations = /* @__PURE__ */ new WeakMap();
|
|
64
|
+
const manipulationActivationRoots = /* @__PURE__ */ new WeakSet();
|
|
65
|
+
function suppressManipulationActivation(instance, pointerId) {
|
|
66
|
+
const root = getInteractionRoot(instance);
|
|
67
|
+
retainManipulationActivationState(root);
|
|
68
|
+
let pending = pendingManipulationActivations.get(root);
|
|
69
|
+
if (!pending) {
|
|
70
|
+
pending = /* @__PURE__ */ new Map();
|
|
71
|
+
pendingManipulationActivations.set(root, pending);
|
|
72
|
+
}
|
|
73
|
+
pending.set(pointerId, Object.freeze({
|
|
74
|
+
pointerPress: manipulationPointerPresses.get(root)?.get(pointerId),
|
|
75
|
+
mouseDown: root.interaction.primaryDown
|
|
76
|
+
}));
|
|
77
|
+
}
|
|
78
|
+
function dispatchNativeEvent(instance, type, nativeEvent) {
|
|
79
|
+
const root = getInteractionRoot(instance);
|
|
80
|
+
batch(() => {
|
|
81
|
+
dispatchClassifiedNativeEvent(root, type, nativeEvent);
|
|
82
|
+
dispatchObservers(root.eventRoot.observers.get(type), nativeEvent);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function dispatchToLogicalTarget(type, target, originalEvent, relatedTarget = null, sourceEvent) {
|
|
86
|
+
if (!target.live) return void 0;
|
|
87
|
+
return batch(
|
|
88
|
+
() => dispatchEventPath({
|
|
89
|
+
type,
|
|
90
|
+
target,
|
|
91
|
+
relatedTarget,
|
|
92
|
+
originalEvent,
|
|
93
|
+
sourceEvent
|
|
94
|
+
})
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
function classifyNativeEventType(type) {
|
|
98
|
+
switch (type) {
|
|
99
|
+
case "pointerover":
|
|
100
|
+
case "pointerenter":
|
|
101
|
+
case "pointerdown":
|
|
102
|
+
case "pointermove":
|
|
103
|
+
case "pointerrawupdate":
|
|
104
|
+
case "pointerup":
|
|
105
|
+
case "pointercancel":
|
|
106
|
+
case "pointerout":
|
|
107
|
+
case "pointerleave":
|
|
108
|
+
case "gotpointercapture":
|
|
109
|
+
case "lostpointercapture":
|
|
110
|
+
return "pointer";
|
|
111
|
+
case "click":
|
|
112
|
+
case "dblclick":
|
|
113
|
+
case "auxclick":
|
|
114
|
+
case "contextmenu":
|
|
115
|
+
case "mouseover":
|
|
116
|
+
case "mouseenter":
|
|
117
|
+
case "mousedown":
|
|
118
|
+
case "mousemove":
|
|
119
|
+
case "mouseup":
|
|
120
|
+
case "mouseout":
|
|
121
|
+
case "mouseleave":
|
|
122
|
+
return "mouse";
|
|
123
|
+
case "touchstart":
|
|
124
|
+
case "touchmove":
|
|
125
|
+
case "touchend":
|
|
126
|
+
case "touchcancel":
|
|
127
|
+
return "touch";
|
|
128
|
+
case "wheel":
|
|
129
|
+
return "wheel";
|
|
130
|
+
case "keydown":
|
|
131
|
+
case "keyup":
|
|
132
|
+
case "focus":
|
|
133
|
+
case "blur":
|
|
134
|
+
case "focusin":
|
|
135
|
+
case "focusout":
|
|
136
|
+
return "keyboard-focus";
|
|
137
|
+
case "beforeinput":
|
|
138
|
+
case "input":
|
|
139
|
+
case "change":
|
|
140
|
+
case "compositionstart":
|
|
141
|
+
case "compositionupdate":
|
|
142
|
+
case "compositionend":
|
|
143
|
+
case "select":
|
|
144
|
+
case "selectionchange":
|
|
145
|
+
return "editing";
|
|
146
|
+
case "copy":
|
|
147
|
+
case "cut":
|
|
148
|
+
case "paste":
|
|
149
|
+
return "clipboard";
|
|
150
|
+
case "dragstart":
|
|
151
|
+
case "drag":
|
|
152
|
+
case "dragend":
|
|
153
|
+
case "dragenter":
|
|
154
|
+
case "dragleave":
|
|
155
|
+
case "dragover":
|
|
156
|
+
case "drop":
|
|
157
|
+
return "drag";
|
|
158
|
+
}
|
|
159
|
+
return assertNever(type);
|
|
160
|
+
}
|
|
161
|
+
function dispatchClassifiedNativeEvent(root, type, nativeEvent) {
|
|
162
|
+
const route = classifyNativeEventType(type);
|
|
163
|
+
switch (route) {
|
|
164
|
+
case "pointer": {
|
|
165
|
+
if (!isNativePointerEventType(type)) {
|
|
166
|
+
throw nativeRouteMismatch(type, route);
|
|
167
|
+
}
|
|
168
|
+
const input = adaptPointerEvent(root, type, nativeEvent);
|
|
169
|
+
if (input) dispatchPointerEvent(root, input);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
case "mouse": {
|
|
173
|
+
if (!isNativeMouseEventType(type)) {
|
|
174
|
+
throw nativeRouteMismatch(type, route);
|
|
175
|
+
}
|
|
176
|
+
const input = adaptMouseEvent(root, type, nativeEvent);
|
|
177
|
+
if (input) dispatchMouseEvent(root, input);
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
case "touch": {
|
|
181
|
+
if (!isNativeTouchEventType(type)) {
|
|
182
|
+
throw nativeRouteMismatch(type, route);
|
|
183
|
+
}
|
|
184
|
+
const input = adaptTouchEvent(root, type, nativeEvent);
|
|
185
|
+
if (input) dispatchTouchEvent(root, input);
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
case "wheel": {
|
|
189
|
+
if (!isNativeWheelEventType(type)) {
|
|
190
|
+
throw nativeRouteMismatch(type, route);
|
|
191
|
+
}
|
|
192
|
+
const input = adaptWheelEvent(root, nativeEvent);
|
|
193
|
+
if (input) dispatchWheelEvent(root, input);
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
case "keyboard-focus": {
|
|
197
|
+
if (!isNativeKeyboardFocusEventType(type)) {
|
|
198
|
+
throw nativeRouteMismatch(type, route);
|
|
199
|
+
}
|
|
200
|
+
const input = adaptKeyboardFocusEvent(type, nativeEvent);
|
|
201
|
+
if (input) dispatchFocusedNativeEvent(root, input);
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
case "editing": {
|
|
205
|
+
if (!isNativeEditingEventType(type)) {
|
|
206
|
+
throw nativeRouteMismatch(type, route);
|
|
207
|
+
}
|
|
208
|
+
const input = adaptEditingEvent(type, nativeEvent);
|
|
209
|
+
if (input) dispatchFocusedNativeEvent(root, input);
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
case "clipboard": {
|
|
213
|
+
if (!isNativeClipboardEventType(type)) {
|
|
214
|
+
throw nativeRouteMismatch(type, route);
|
|
215
|
+
}
|
|
216
|
+
const input = adaptClipboardEvent(type, nativeEvent);
|
|
217
|
+
if (input) dispatchFocusedNativeEvent(root, input);
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
case "drag": {
|
|
221
|
+
if (!isNativeDragEventType(type)) {
|
|
222
|
+
throw nativeRouteMismatch(type, route);
|
|
223
|
+
}
|
|
224
|
+
const input = adaptDragEvent(root, type, nativeEvent);
|
|
225
|
+
if (input) dispatchDragEvent(root, input);
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
return assertNever(route);
|
|
230
|
+
}
|
|
231
|
+
function dispatchFocusedNativeEvent(root, input) {
|
|
232
|
+
const installedPolicy = root.eventRoot.focusPolicy;
|
|
233
|
+
const policy = installedPolicy?.beforeNativeDispatch ? installedPolicy.beforeNativeDispatch(input.type, input.originalEvent) : installedPolicy;
|
|
234
|
+
const target = policy?.resolveKeyboardTarget();
|
|
235
|
+
if (!policy || !target || !isLiveNode(root, target)) return;
|
|
236
|
+
const event = dispatchToLogicalTarget(
|
|
237
|
+
input.type,
|
|
238
|
+
target,
|
|
239
|
+
input.originalEvent
|
|
240
|
+
);
|
|
241
|
+
if ((input.type === "keydown" || input.type === "keyup") && event && isLiveNode(root, target) && root.eventRoot.focusPolicy === policy && policy.resolveKeyboardTarget() === target) {
|
|
242
|
+
policy.afterDispatch(event);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
function nativeRouteMismatch(type, route) {
|
|
246
|
+
return new Error(`Pibbl event ${type} is not valid for the ${route} route.`);
|
|
247
|
+
}
|
|
248
|
+
function releaseEventNodeState(instance, node) {
|
|
249
|
+
const root = getInteractionRoot(instance);
|
|
250
|
+
releasePointerHoverTarget(root.eventRoot, node);
|
|
251
|
+
releaseTouchTarget(root.eventRoot, node);
|
|
252
|
+
releaseDragHoverTarget(root.eventRoot, node);
|
|
253
|
+
const interaction = root.interaction;
|
|
254
|
+
if (node.kind === "target" && interaction.hoveredRegion === node) {
|
|
255
|
+
const canvas = interaction.pointerCanvas;
|
|
256
|
+
interaction.hoveredRegion = void 0;
|
|
257
|
+
releaseCursor(root);
|
|
258
|
+
if (canvas) applyCursor(root, void 0, canvas);
|
|
259
|
+
}
|
|
260
|
+
interaction.primaryDown = removeActivationNode(
|
|
261
|
+
interaction.primaryDown,
|
|
262
|
+
node
|
|
263
|
+
);
|
|
264
|
+
interaction.primaryUp = removeActivationNode(interaction.primaryUp, node);
|
|
265
|
+
removeActivationNodeFromMap(interaction.auxiliaryDown, node);
|
|
266
|
+
removeActivationNodeFromMap(interaction.auxiliaryUp, node);
|
|
267
|
+
if (interaction.clickStreakTarget === node) {
|
|
268
|
+
interaction.clickStreakTarget = void 0;
|
|
269
|
+
interaction.clickStreak = 0;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
function removeInteractionRegion(_instance, region) {
|
|
273
|
+
releaseTarget(region);
|
|
274
|
+
}
|
|
275
|
+
function refreshInteractionCursor(instance, region) {
|
|
276
|
+
const root = getInteractionRoot(instance);
|
|
277
|
+
if (root.interaction.hoveredRegion === region && root.interaction.pointerCanvas) {
|
|
278
|
+
applyCursor(root, region, root.interaction.pointerCanvas);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
function updateCursorDefault(instance, cursorDefault) {
|
|
282
|
+
const root = getInteractionRoot(instance);
|
|
283
|
+
const existing = cursorDefaultOwnership.get(cursorDefault);
|
|
284
|
+
if (existing?.root === root) return;
|
|
285
|
+
releaseCursorDefaultOwnership(cursorDefault);
|
|
286
|
+
const hub = root.eventRoot.nativeListeners;
|
|
287
|
+
if (!hub) return;
|
|
288
|
+
cursorDefaultOwnership.set(cursorDefault, {
|
|
289
|
+
root,
|
|
290
|
+
releases: [hub.acquire("mousemove"), hub.acquire("mouseout")]
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
function removeCursorDefault(instance, cursorDefault) {
|
|
294
|
+
releaseCursorDefaultOwnership(cursorDefault);
|
|
295
|
+
const root = getInteractionRoot(instance);
|
|
296
|
+
root.cursorDefaults.delete(cursorDefault);
|
|
297
|
+
if (root.interaction.cursorDefault === cursorDefault) {
|
|
298
|
+
const canvas = root.interaction.pointerCanvas;
|
|
299
|
+
releaseCursor(root);
|
|
300
|
+
if (canvas) applyCursor(root, root.interaction.hoveredRegion, canvas);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
function refreshCursorDefault(instance) {
|
|
304
|
+
const root = getInteractionRoot(instance);
|
|
305
|
+
const canvas = root.interaction.pointerCanvas;
|
|
306
|
+
if (canvas) applyCursor(root, root.interaction.hoveredRegion, canvas);
|
|
307
|
+
}
|
|
308
|
+
function dispatchPointerEvent(root, input) {
|
|
309
|
+
if (input.type !== "gotpointercapture" && input.type !== "lostpointercapture") {
|
|
310
|
+
processPendingLogicalPointerCapture(
|
|
311
|
+
root.eventRoot,
|
|
312
|
+
input.originalEvent.pointerId,
|
|
313
|
+
(target) => dispatchPointerNode("lostpointercapture", target, input),
|
|
314
|
+
(target) => dispatchPointerNode("gotpointercapture", target, input)
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
switch (input.type) {
|
|
318
|
+
case "pointerover":
|
|
319
|
+
dispatchPointerBoundaryEntry(root, input);
|
|
320
|
+
return;
|
|
321
|
+
case "pointermove":
|
|
322
|
+
dispatchPointerMove(root, input);
|
|
323
|
+
return;
|
|
324
|
+
case "pointerout":
|
|
325
|
+
dispatchRootPointerOut(root, input);
|
|
326
|
+
return;
|
|
327
|
+
case "pointerdown":
|
|
328
|
+
case "pointerrawupdate":
|
|
329
|
+
dispatchPointerCoordinateEvent(root, input);
|
|
330
|
+
return;
|
|
331
|
+
case "pointerup":
|
|
332
|
+
dispatchPointerCoordinateEvent(root, input);
|
|
333
|
+
deleteManipulationPointerPress(root, input.originalEvent.pointerId);
|
|
334
|
+
return;
|
|
335
|
+
case "pointercancel":
|
|
336
|
+
dispatchPointerCancel(root, input);
|
|
337
|
+
deleteManipulationPointerPress(root, input.originalEvent.pointerId);
|
|
338
|
+
return;
|
|
339
|
+
case "gotpointercapture":
|
|
340
|
+
dispatchGotPointerCapture(root, input);
|
|
341
|
+
return;
|
|
342
|
+
case "lostpointercapture":
|
|
343
|
+
dispatchLostPointerCapture(root, input);
|
|
344
|
+
return;
|
|
345
|
+
case "pointerenter":
|
|
346
|
+
case "pointerleave":
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
function dispatchPointerBoundaryEntry(root, input) {
|
|
351
|
+
const pointerId = input.originalEvent.pointerId;
|
|
352
|
+
const previous = livePointerHover(root, pointerId);
|
|
353
|
+
const next = resolvePointerTarget(root, input);
|
|
354
|
+
if (previous === next) return;
|
|
355
|
+
dispatchPointerTransition(root, previous, next, input, false);
|
|
356
|
+
}
|
|
357
|
+
function dispatchPointerMove(root, input) {
|
|
358
|
+
const pointerId = input.originalEvent.pointerId;
|
|
359
|
+
const previous = livePointerHover(root, pointerId);
|
|
360
|
+
const next = resolvePointerTarget(root, input, true);
|
|
361
|
+
if (previous === next) {
|
|
362
|
+
if (next) dispatchPointerNode("pointermove", next, input);
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
dispatchPointerTransition(root, previous, next, input, true);
|
|
366
|
+
}
|
|
367
|
+
function dispatchRootPointerOut(root, input) {
|
|
368
|
+
const pointerId = input.originalEvent.pointerId;
|
|
369
|
+
const previous = livePointerHover(root, pointerId);
|
|
370
|
+
dispatchPointerTransition(root, previous, void 0, input, false);
|
|
371
|
+
}
|
|
372
|
+
function dispatchPointerTransition(root, previous, next, input, dispatchMove) {
|
|
373
|
+
const pointerId = input.originalEvent.pointerId;
|
|
374
|
+
const oldPath = previous ? buildEventPath(previous) : [];
|
|
375
|
+
const newPath = next ? buildEventPath(next) : [];
|
|
376
|
+
const plan = planBoundaryTransitions(oldPath, newPath);
|
|
377
|
+
const oldLeaf = oldPath.at(-1);
|
|
378
|
+
const newLeaf = newPath.at(-1);
|
|
379
|
+
deletePointerHover(root.eventRoot, pointerId);
|
|
380
|
+
if (oldLeaf?.live) {
|
|
381
|
+
dispatchPointerNode("pointerout", oldLeaf, input, newLeaf ?? null);
|
|
382
|
+
}
|
|
383
|
+
for (const node of plan.exited) {
|
|
384
|
+
if (node.live) {
|
|
385
|
+
dispatchPointerNode("pointerleave", node, input, newLeaf ?? null);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
const liveNext = next && isLiveNode(root, next) ? next : void 0;
|
|
389
|
+
if (!liveNext) return;
|
|
390
|
+
setPointerHover(root.eventRoot, pointerId, liveNext);
|
|
391
|
+
dispatchPointerNode("pointerover", liveNext, input, oldLeaf ?? null);
|
|
392
|
+
if (!isLiveNode(root, liveNext)) return;
|
|
393
|
+
for (const node of plan.entered) {
|
|
394
|
+
if (!isLiveNode(root, liveNext)) return;
|
|
395
|
+
if (node.live) {
|
|
396
|
+
dispatchPointerNode("pointerenter", node, input, oldLeaf ?? null);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
if (dispatchMove && isLiveNode(root, liveNext)) {
|
|
400
|
+
dispatchPointerNode("pointermove", liveNext, input);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
function dispatchPointerCoordinateEvent(root, input) {
|
|
404
|
+
const policy = root.eventRoot.focusPolicy;
|
|
405
|
+
const logicalCapture = getLogicalPointerCapture(
|
|
406
|
+
root.eventRoot,
|
|
407
|
+
input.originalEvent.pointerId
|
|
408
|
+
);
|
|
409
|
+
const coordinateTarget = !logicalCapture || input.press ? input.type === "pointerdown" || input.type === "pointerup" || input.type === "pointercancel" ? resolvePointerInputTarget(root, input) : resolveCoordinateTarget(root.eventRoot, input) : void 0;
|
|
410
|
+
const target = logicalCapture ?? coordinateTarget;
|
|
411
|
+
if (input.type === "pointerdown") {
|
|
412
|
+
recordManipulationPointerPress(root, input.originalEvent.pointerId, coordinateTarget);
|
|
413
|
+
}
|
|
414
|
+
const event = target ? dispatchPointerNode(input.type, target, input) : void 0;
|
|
415
|
+
if (input.press) {
|
|
416
|
+
dispatchPressDefault(root, policy, {
|
|
417
|
+
source: "pointer",
|
|
418
|
+
target: coordinateTarget,
|
|
419
|
+
event,
|
|
420
|
+
originalEvent: input.originalEvent,
|
|
421
|
+
x: input.press.x,
|
|
422
|
+
y: input.press.y,
|
|
423
|
+
pointerId: input.press.pointerId,
|
|
424
|
+
pointerType: input.press.pointerType
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
function dispatchPointerCancel(root, input) {
|
|
429
|
+
dispatchPointerCoordinateEvent(root, input);
|
|
430
|
+
cancelLogicalPointerCapture(
|
|
431
|
+
root.eventRoot,
|
|
432
|
+
input.originalEvent.pointerId
|
|
433
|
+
);
|
|
434
|
+
}
|
|
435
|
+
function dispatchGotPointerCapture(root, input) {
|
|
436
|
+
const target = activateLogicalPointerCapture(
|
|
437
|
+
root.eventRoot,
|
|
438
|
+
input.originalEvent.pointerId
|
|
439
|
+
);
|
|
440
|
+
if (target) dispatchPointerNode("gotpointercapture", target, input);
|
|
441
|
+
}
|
|
442
|
+
function dispatchLostPointerCapture(root, input) {
|
|
443
|
+
const target = consumeLogicalPointerCaptureLoss(
|
|
444
|
+
root.eventRoot,
|
|
445
|
+
input.originalEvent.pointerId
|
|
446
|
+
);
|
|
447
|
+
if (target) dispatchPointerNode("lostpointercapture", target, input);
|
|
448
|
+
}
|
|
449
|
+
function resolvePointerTarget(root, input, deliverInput = false) {
|
|
450
|
+
const logicalCapture = getLogicalPointerCapture(
|
|
451
|
+
root.eventRoot,
|
|
452
|
+
input.originalEvent.pointerId
|
|
453
|
+
);
|
|
454
|
+
if (logicalCapture) return logicalCapture;
|
|
455
|
+
const resolverCapture = getResolverPointerCapture(
|
|
456
|
+
root.eventRoot,
|
|
457
|
+
input.originalEvent.pointerId
|
|
458
|
+
);
|
|
459
|
+
if (resolverCapture) {
|
|
460
|
+
if (deliverInput && input.type === "pointermove") {
|
|
461
|
+
dispatchCapturedResolverInput(
|
|
462
|
+
resolverCapture,
|
|
463
|
+
"pointermove",
|
|
464
|
+
input,
|
|
465
|
+
input.originalEvent
|
|
466
|
+
);
|
|
467
|
+
}
|
|
468
|
+
return void 0;
|
|
469
|
+
}
|
|
470
|
+
return deliverInput && input.type === "pointermove" ? resolveCoordinateInputTarget(root, input, "pointermove") : resolveCoordinateTarget(root.eventRoot, input);
|
|
471
|
+
}
|
|
472
|
+
function resolvePointerInputTarget(root, input) {
|
|
473
|
+
const type = input.type;
|
|
474
|
+
const captured = getResolverPointerCapture(
|
|
475
|
+
root.eventRoot,
|
|
476
|
+
input.originalEvent.pointerId
|
|
477
|
+
);
|
|
478
|
+
if (captured && (type === "pointerup" || type === "pointercancel")) {
|
|
479
|
+
dispatchCapturedResolverInput(captured, type, input, input.originalEvent);
|
|
480
|
+
return void 0;
|
|
481
|
+
}
|
|
482
|
+
return resolveCoordinateInputTarget(root, input, type);
|
|
483
|
+
}
|
|
484
|
+
function dispatchPointerNode(type, target, input, relatedTarget = null) {
|
|
485
|
+
if (!target.live) return void 0;
|
|
486
|
+
return dispatchEventPath({
|
|
487
|
+
type,
|
|
488
|
+
target,
|
|
489
|
+
relatedTarget,
|
|
490
|
+
originalEvent: input.originalEvent,
|
|
491
|
+
x: input.x,
|
|
492
|
+
y: input.y
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
function livePointerHover(root, pointerId) {
|
|
496
|
+
const targets = pointerHoverTargets.get(root.eventRoot);
|
|
497
|
+
const target = targets?.get(pointerId);
|
|
498
|
+
if (!target || isLiveNode(root, target)) return target;
|
|
499
|
+
targets?.delete(pointerId);
|
|
500
|
+
if (targets?.size === 0) pointerHoverTargets.delete(root.eventRoot);
|
|
501
|
+
return void 0;
|
|
502
|
+
}
|
|
503
|
+
function setPointerHover(eventRoot, pointerId, target) {
|
|
504
|
+
let targets = pointerHoverTargets.get(eventRoot);
|
|
505
|
+
if (!targets) {
|
|
506
|
+
targets = /* @__PURE__ */ new Map();
|
|
507
|
+
pointerHoverTargets.set(eventRoot, targets);
|
|
508
|
+
}
|
|
509
|
+
targets.set(pointerId, target);
|
|
510
|
+
}
|
|
511
|
+
function deletePointerHover(eventRoot, pointerId) {
|
|
512
|
+
const targets = pointerHoverTargets.get(eventRoot);
|
|
513
|
+
targets?.delete(pointerId);
|
|
514
|
+
if (targets?.size === 0) pointerHoverTargets.delete(eventRoot);
|
|
515
|
+
}
|
|
516
|
+
function releasePointerHoverTarget(eventRoot, target) {
|
|
517
|
+
const targets = pointerHoverTargets.get(eventRoot);
|
|
518
|
+
if (!targets) return;
|
|
519
|
+
for (const [pointerId, hovered] of targets) {
|
|
520
|
+
if (hovered === target) targets.delete(pointerId);
|
|
521
|
+
}
|
|
522
|
+
if (targets.size === 0) pointerHoverTargets.delete(eventRoot);
|
|
523
|
+
}
|
|
524
|
+
function dispatchTouchEvent(root, input) {
|
|
525
|
+
const policy = root.eventRoot.focusPolicy;
|
|
526
|
+
const groups = /* @__PURE__ */ new Map();
|
|
527
|
+
const defaultContacts = [];
|
|
528
|
+
for (const contact of input.changedContacts) {
|
|
529
|
+
const identifier = contact.touch.identifier;
|
|
530
|
+
let target;
|
|
531
|
+
if (input.type === "touchstart") {
|
|
532
|
+
target = resolveCoordinateTarget(root.eventRoot, contact);
|
|
533
|
+
if (target) setTouchTarget(root.eventRoot, identifier, target);
|
|
534
|
+
else deleteTouchTarget(root.eventRoot, identifier);
|
|
535
|
+
} else {
|
|
536
|
+
target = liveTouchTarget(root, identifier);
|
|
537
|
+
}
|
|
538
|
+
defaultContacts.push({
|
|
539
|
+
identifier,
|
|
540
|
+
target: target?.kind === "target" ? target : void 0,
|
|
541
|
+
x: contact.x,
|
|
542
|
+
y: contact.y
|
|
543
|
+
});
|
|
544
|
+
if (target) {
|
|
545
|
+
const contacts = groups.get(target);
|
|
546
|
+
if (contacts) contacts.push(contact);
|
|
547
|
+
else groups.set(target, [contact]);
|
|
548
|
+
}
|
|
549
|
+
if (input.type === "touchend" || input.type === "touchcancel") {
|
|
550
|
+
deleteTouchTarget(root.eventRoot, identifier);
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
for (const [target, contacts] of groups) {
|
|
554
|
+
if (!isLiveNode(root, target)) continue;
|
|
555
|
+
const first = contacts[0];
|
|
556
|
+
dispatchEventPath({
|
|
557
|
+
type: input.type,
|
|
558
|
+
target,
|
|
559
|
+
originalEvent: input.originalEvent,
|
|
560
|
+
x: first.x,
|
|
561
|
+
y: first.y
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
dispatchTouchDefault(root, policy, {
|
|
565
|
+
type: input.type,
|
|
566
|
+
changedContacts: Object.freeze(defaultContacts),
|
|
567
|
+
activeIdentifiers: Object.freeze(
|
|
568
|
+
Array.from(input.originalEvent.touches, (touch) => touch.identifier)
|
|
569
|
+
),
|
|
570
|
+
originalEvent: input.originalEvent
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
function liveTouchTarget(root, identifier) {
|
|
574
|
+
const target = touchTargets.get(root.eventRoot)?.get(identifier);
|
|
575
|
+
if (!target || isLiveNode(root, target)) return target;
|
|
576
|
+
deleteTouchTarget(root.eventRoot, identifier);
|
|
577
|
+
return void 0;
|
|
578
|
+
}
|
|
579
|
+
function setTouchTarget(eventRoot, identifier, target) {
|
|
580
|
+
let targets = touchTargets.get(eventRoot);
|
|
581
|
+
if (!targets) {
|
|
582
|
+
targets = /* @__PURE__ */ new Map();
|
|
583
|
+
touchTargets.set(eventRoot, targets);
|
|
584
|
+
}
|
|
585
|
+
targets.set(identifier, target);
|
|
586
|
+
}
|
|
587
|
+
function deleteTouchTarget(eventRoot, identifier) {
|
|
588
|
+
const targets = touchTargets.get(eventRoot);
|
|
589
|
+
targets?.delete(identifier);
|
|
590
|
+
if (targets?.size === 0) touchTargets.delete(eventRoot);
|
|
591
|
+
}
|
|
592
|
+
function releaseTouchTarget(eventRoot, target) {
|
|
593
|
+
const targets = touchTargets.get(eventRoot);
|
|
594
|
+
if (!targets) return;
|
|
595
|
+
for (const [identifier, owner] of targets) {
|
|
596
|
+
if (owner === target) targets.delete(identifier);
|
|
597
|
+
}
|
|
598
|
+
if (targets.size === 0) touchTargets.delete(eventRoot);
|
|
599
|
+
}
|
|
600
|
+
function dispatchWheelEvent(root, input) {
|
|
601
|
+
const target = resolveCoordinateInputTarget(root, input, "wheel");
|
|
602
|
+
if (!target) return;
|
|
603
|
+
dispatchEventPath({
|
|
604
|
+
type: "wheel",
|
|
605
|
+
target,
|
|
606
|
+
originalEvent: input.originalEvent,
|
|
607
|
+
x: input.x,
|
|
608
|
+
y: input.y
|
|
609
|
+
});
|
|
610
|
+
}
|
|
611
|
+
function dispatchDragEvent(root, input) {
|
|
612
|
+
switch (input.type) {
|
|
613
|
+
case "dragenter":
|
|
614
|
+
reconcileDragTarget(root, input);
|
|
615
|
+
return;
|
|
616
|
+
case "dragover": {
|
|
617
|
+
const target = reconcileDragTarget(root, input);
|
|
618
|
+
if (target) dispatchDragNode("dragover", target, input);
|
|
619
|
+
return;
|
|
620
|
+
}
|
|
621
|
+
case "dragleave":
|
|
622
|
+
dispatchDragTransition(
|
|
623
|
+
root,
|
|
624
|
+
liveDragHover(root),
|
|
625
|
+
void 0,
|
|
626
|
+
input
|
|
627
|
+
);
|
|
628
|
+
return;
|
|
629
|
+
case "drop": {
|
|
630
|
+
const target = reconcileDragTarget(root, input);
|
|
631
|
+
if (target) dispatchDragNode("drop", target, input);
|
|
632
|
+
dragHoverTargets.delete(root.eventRoot);
|
|
633
|
+
return;
|
|
634
|
+
}
|
|
635
|
+
case "dragend":
|
|
636
|
+
dispatchDragCoordinateEvent(root, input);
|
|
637
|
+
dragHoverTargets.delete(root.eventRoot);
|
|
638
|
+
return;
|
|
639
|
+
case "dragstart":
|
|
640
|
+
case "drag":
|
|
641
|
+
dispatchDragCoordinateEvent(root, input);
|
|
642
|
+
return;
|
|
643
|
+
}
|
|
644
|
+
return assertNever(input.type);
|
|
645
|
+
}
|
|
646
|
+
function reconcileDragTarget(root, input) {
|
|
647
|
+
const previous = liveDragHover(root);
|
|
648
|
+
const next = resolveCoordinateTarget(root.eventRoot, input);
|
|
649
|
+
if (previous === next) return next;
|
|
650
|
+
return dispatchDragTransition(root, previous, next, input);
|
|
651
|
+
}
|
|
652
|
+
function dispatchDragTransition(root, previous, next, input) {
|
|
653
|
+
const oldPath = previous ? buildEventPath(previous) : [];
|
|
654
|
+
const newPath = next ? buildEventPath(next) : [];
|
|
655
|
+
const plan = planBoundaryTransitions(oldPath, newPath);
|
|
656
|
+
const oldLeaf = oldPath.at(-1);
|
|
657
|
+
const newLeaf = newPath.at(-1);
|
|
658
|
+
dragHoverTargets.delete(root.eventRoot);
|
|
659
|
+
for (const node of plan.exited) {
|
|
660
|
+
if (node.live) {
|
|
661
|
+
dispatchDragNode("dragleave", node, input, newLeaf ?? null);
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
const liveNext = next && isLiveNode(root, next) ? next : void 0;
|
|
665
|
+
if (!liveNext) return void 0;
|
|
666
|
+
dragHoverTargets.set(root.eventRoot, liveNext);
|
|
667
|
+
for (const node of plan.entered) {
|
|
668
|
+
if (!isLiveNode(root, liveNext)) {
|
|
669
|
+
dragHoverTargets.delete(root.eventRoot);
|
|
670
|
+
return void 0;
|
|
671
|
+
}
|
|
672
|
+
if (node.live) {
|
|
673
|
+
dispatchDragNode("dragenter", node, input, oldLeaf ?? null);
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
return isLiveNode(root, liveNext) ? liveNext : void 0;
|
|
677
|
+
}
|
|
678
|
+
function dispatchDragCoordinateEvent(root, input) {
|
|
679
|
+
const target = resolveCoordinateTarget(root.eventRoot, input);
|
|
680
|
+
if (target) dispatchDragNode(input.type, target, input);
|
|
681
|
+
}
|
|
682
|
+
function dispatchDragNode(type, target, input, relatedTarget = null) {
|
|
683
|
+
if (!target.live) return;
|
|
684
|
+
dispatchEventPath({
|
|
685
|
+
type,
|
|
686
|
+
target,
|
|
687
|
+
relatedTarget,
|
|
688
|
+
originalEvent: input.originalEvent,
|
|
689
|
+
x: input.x,
|
|
690
|
+
y: input.y
|
|
691
|
+
});
|
|
692
|
+
}
|
|
693
|
+
function liveDragHover(root) {
|
|
694
|
+
const target = dragHoverTargets.get(root.eventRoot);
|
|
695
|
+
if (!target || isLiveNode(root, target)) return target;
|
|
696
|
+
dragHoverTargets.delete(root.eventRoot);
|
|
697
|
+
return void 0;
|
|
698
|
+
}
|
|
699
|
+
function releaseDragHoverTarget(eventRoot, target) {
|
|
700
|
+
if (dragHoverTargets.get(eventRoot) === target) {
|
|
701
|
+
dragHoverTargets.delete(eventRoot);
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
function dispatchMouseEvent(root, input) {
|
|
705
|
+
switch (input.type) {
|
|
706
|
+
case "mousemove":
|
|
707
|
+
dispatchMouseMove(root, input);
|
|
708
|
+
return;
|
|
709
|
+
case "mouseout":
|
|
710
|
+
dispatchRootMouseOut(root, input);
|
|
711
|
+
return;
|
|
712
|
+
case "mousedown":
|
|
713
|
+
case "mouseup":
|
|
714
|
+
dispatchMouseButton(root, input);
|
|
715
|
+
return;
|
|
716
|
+
case "click":
|
|
717
|
+
case "auxclick":
|
|
718
|
+
dispatchActivation(root, input, input.type);
|
|
719
|
+
return;
|
|
720
|
+
case "dblclick":
|
|
721
|
+
dispatchDoubleClick(root, input);
|
|
722
|
+
return;
|
|
723
|
+
case "contextmenu":
|
|
724
|
+
dispatchCoordinateEvent(root, input);
|
|
725
|
+
return;
|
|
726
|
+
case "mouseover":
|
|
727
|
+
case "mouseenter":
|
|
728
|
+
case "mouseleave":
|
|
729
|
+
return;
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
function dispatchMouseMove(root, input) {
|
|
733
|
+
const canvas = root.eventRoot.canvas;
|
|
734
|
+
if (!canvas) return;
|
|
735
|
+
root.interaction.pointerCanvas = canvas;
|
|
736
|
+
const previous = liveTarget(root, root.interaction.hoveredRegion);
|
|
737
|
+
const next = resolveCoordinateTarget(root.eventRoot, input);
|
|
738
|
+
if (previous === next) {
|
|
739
|
+
applyCursor(root, next, canvas);
|
|
740
|
+
if (next) dispatchMouseNode("mousemove", next, input);
|
|
741
|
+
return;
|
|
742
|
+
}
|
|
743
|
+
dispatchMouseTransition(root, previous, next, input, canvas);
|
|
744
|
+
}
|
|
745
|
+
function dispatchRootMouseOut(root, input) {
|
|
746
|
+
const previous = liveTarget(root, root.interaction.hoveredRegion);
|
|
747
|
+
root.interaction.pointerCanvas = void 0;
|
|
748
|
+
dispatchMouseTransition(root, previous, void 0, input, void 0);
|
|
749
|
+
}
|
|
750
|
+
function dispatchMouseTransition(root, previous, next, input, pointerCanvas) {
|
|
751
|
+
const oldPath = previous ? buildEventPath(previous) : [];
|
|
752
|
+
const newPath = next ? buildEventPath(next) : [];
|
|
753
|
+
const plan = planBoundaryTransitions(oldPath, newPath);
|
|
754
|
+
const oldLeaf = oldPath.at(-1);
|
|
755
|
+
const newLeaf = newPath.at(-1);
|
|
756
|
+
root.interaction.hoveredRegion = void 0;
|
|
757
|
+
releaseCursor(root);
|
|
758
|
+
if (oldLeaf?.live) {
|
|
759
|
+
dispatchMouseNode("mouseout", oldLeaf, input, newLeaf ?? null);
|
|
760
|
+
}
|
|
761
|
+
for (const node of plan.exited) {
|
|
762
|
+
if (node.live) dispatchMouseNode("mouseleave", node, input, newLeaf ?? null);
|
|
763
|
+
}
|
|
764
|
+
const liveNext = liveTarget(root, next);
|
|
765
|
+
if (!liveNext) {
|
|
766
|
+
if (pointerCanvas) applyCursor(root, void 0, pointerCanvas);
|
|
767
|
+
return;
|
|
768
|
+
}
|
|
769
|
+
root.interaction.hoveredRegion = liveNext;
|
|
770
|
+
if (pointerCanvas) applyCursor(root, liveNext, pointerCanvas);
|
|
771
|
+
dispatchMouseNode("mouseover", liveNext, input, oldLeaf ?? null);
|
|
772
|
+
if (!liveTarget(root, liveNext)) return;
|
|
773
|
+
for (const node of plan.entered) {
|
|
774
|
+
if (!liveTarget(root, liveNext)) return;
|
|
775
|
+
if (node.live) dispatchMouseNode("mouseenter", node, input, oldLeaf ?? null);
|
|
776
|
+
}
|
|
777
|
+
if (liveTarget(root, liveNext)) {
|
|
778
|
+
dispatchMouseNode("mousemove", liveNext, input);
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
function dispatchMouseButton(root, input) {
|
|
782
|
+
const policy = root.eventRoot.focusPolicy;
|
|
783
|
+
const target = resolveCoordinateTarget(root.eventRoot, input);
|
|
784
|
+
const path = target ? buildEventPath(target) : void 0;
|
|
785
|
+
const activation = path ? Object.freeze({
|
|
786
|
+
button: input.originalEvent.button,
|
|
787
|
+
path
|
|
788
|
+
}) : void 0;
|
|
789
|
+
const button = input.originalEvent.button;
|
|
790
|
+
if (input.type === "mousedown") {
|
|
791
|
+
if (button === 0) {
|
|
792
|
+
root.interaction.primaryDown = activation;
|
|
793
|
+
root.interaction.primaryUp = void 0;
|
|
794
|
+
} else {
|
|
795
|
+
updateActivationMap(root.interaction.auxiliaryDown, button, activation);
|
|
796
|
+
root.interaction.auxiliaryUp.delete(button);
|
|
797
|
+
}
|
|
798
|
+
} else {
|
|
799
|
+
if (button === 0) {
|
|
800
|
+
root.interaction.primaryUp = activation;
|
|
801
|
+
} else {
|
|
802
|
+
updateActivationMap(root.interaction.auxiliaryUp, button, activation);
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
const event = target ? dispatchMouseNode(input.type, target, input) : void 0;
|
|
806
|
+
if (input.press) {
|
|
807
|
+
dispatchPressDefault(root, policy, {
|
|
808
|
+
source: "mouse",
|
|
809
|
+
target,
|
|
810
|
+
event,
|
|
811
|
+
originalEvent: input.originalEvent,
|
|
812
|
+
x: input.press.x,
|
|
813
|
+
y: input.press.y
|
|
814
|
+
});
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
function dispatchActivation(root, input, type) {
|
|
818
|
+
const interaction = root.interaction;
|
|
819
|
+
const button = input.originalEvent.button;
|
|
820
|
+
const down = type === "click" ? interaction.primaryDown : interaction.auxiliaryDown.get(button);
|
|
821
|
+
const up = type === "click" ? interaction.primaryUp : interaction.auxiliaryUp.get(button);
|
|
822
|
+
const target = activationTarget(
|
|
823
|
+
root,
|
|
824
|
+
down,
|
|
825
|
+
up,
|
|
826
|
+
button,
|
|
827
|
+
type
|
|
828
|
+
);
|
|
829
|
+
if (type === "click") {
|
|
830
|
+
interaction.primaryDown = void 0;
|
|
831
|
+
interaction.primaryUp = void 0;
|
|
832
|
+
} else {
|
|
833
|
+
interaction.auxiliaryDown.delete(button);
|
|
834
|
+
interaction.auxiliaryUp.delete(button);
|
|
835
|
+
}
|
|
836
|
+
const coordinateTarget = type === "click" ? resolveCoordinateInputTarget(root, input, "click") : resolveCoordinateTarget(root.eventRoot, input);
|
|
837
|
+
if (type === "click" && consumeManipulationActivation(root, down, up, coordinateTarget, input.originalEvent)) {
|
|
838
|
+
resetClickStreak(root);
|
|
839
|
+
return;
|
|
840
|
+
}
|
|
841
|
+
if (!target || !coordinateTarget || !buildEventPath(coordinateTarget).includes(target)) {
|
|
842
|
+
if (type === "click") resetClickStreak(root);
|
|
843
|
+
return;
|
|
844
|
+
}
|
|
845
|
+
dispatchMouseNode(type, target, input);
|
|
846
|
+
if (type !== "click") return;
|
|
847
|
+
if (!isLiveNode(root, target)) {
|
|
848
|
+
resetClickStreak(root);
|
|
849
|
+
return;
|
|
850
|
+
}
|
|
851
|
+
if (interaction.clickStreakTarget === target) {
|
|
852
|
+
interaction.clickStreak++;
|
|
853
|
+
} else {
|
|
854
|
+
interaction.clickStreakTarget = target;
|
|
855
|
+
interaction.clickStreak = 1;
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
function dispatchDoubleClick(root, input) {
|
|
859
|
+
const target = root.interaction.clickStreakTarget;
|
|
860
|
+
if (!target || root.interaction.clickStreak < 2 || !isLiveNode(root, target)) {
|
|
861
|
+
return;
|
|
862
|
+
}
|
|
863
|
+
if (!coordinatePathIncludes(root, input, target)) return;
|
|
864
|
+
dispatchMouseNode("dblclick", target, input);
|
|
865
|
+
}
|
|
866
|
+
function coordinatePathIncludes(root, input, node) {
|
|
867
|
+
const coordinateTarget = resolveCoordinateTarget(root.eventRoot, input);
|
|
868
|
+
return Boolean(
|
|
869
|
+
coordinateTarget && buildEventPath(coordinateTarget).includes(node)
|
|
870
|
+
);
|
|
871
|
+
}
|
|
872
|
+
function dispatchCoordinateEvent(root, input) {
|
|
873
|
+
const target = input.type === "contextmenu" ? resolveCoordinateInputTarget(root, input, "contextmenu") : resolveCoordinateTarget(root.eventRoot, input);
|
|
874
|
+
if (target) dispatchMouseNode(input.type, target, input);
|
|
875
|
+
}
|
|
876
|
+
function resolveCoordinateInputTarget(root, point, type) {
|
|
877
|
+
const output = resolveCoordinateOutput(root.eventRoot, point);
|
|
878
|
+
dispatchResolvedInput(output, type, point, point.originalEvent);
|
|
879
|
+
return output.disposition === PibblHitDisposition.Target ? output.target ?? void 0 : void 0;
|
|
880
|
+
}
|
|
881
|
+
function dispatchMouseNode(type, target, input, relatedTarget = null) {
|
|
882
|
+
if (!target.live) return void 0;
|
|
883
|
+
return dispatchEventPath({
|
|
884
|
+
type,
|
|
885
|
+
target,
|
|
886
|
+
relatedTarget,
|
|
887
|
+
originalEvent: input.originalEvent,
|
|
888
|
+
x: input.x,
|
|
889
|
+
y: input.y
|
|
890
|
+
});
|
|
891
|
+
}
|
|
892
|
+
function dispatchPressDefault(root, policy, input) {
|
|
893
|
+
if (policy && root.eventRoot.focusPolicy === policy && policy.afterPressDispatch) {
|
|
894
|
+
policy.afterPressDispatch(input);
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
function dispatchTouchDefault(root, policy, input) {
|
|
898
|
+
if (policy && root.eventRoot.focusPolicy === policy && policy.afterTouchDispatch) {
|
|
899
|
+
policy.afterTouchDispatch(input);
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
function activationTarget(root, down, up, button, type) {
|
|
903
|
+
if (!down || !up || down.button !== button || up.button !== button || (type === "click" ? button !== 0 : button === 0)) {
|
|
904
|
+
return void 0;
|
|
905
|
+
}
|
|
906
|
+
const upNodes = new Set(up.path);
|
|
907
|
+
for (let index = down.path.length - 1; index >= 0; index--) {
|
|
908
|
+
const node = down.path[index];
|
|
909
|
+
if (upNodes.has(node) && isLiveNode(root, node)) return node;
|
|
910
|
+
}
|
|
911
|
+
return void 0;
|
|
912
|
+
}
|
|
913
|
+
function isLiveNode(root, node) {
|
|
914
|
+
if (!node.live || node.owner.eventRoot !== root.eventRoot) return false;
|
|
915
|
+
if (node.kind === "target") return root.eventRoot.targets.has(node);
|
|
916
|
+
return root.eventRoot.listenersByComponent.get(node.component.id)?.has(node) ?? false;
|
|
917
|
+
}
|
|
918
|
+
function liveTarget(root, target) {
|
|
919
|
+
return target && isLiveNode(root, target) ? target : void 0;
|
|
920
|
+
}
|
|
921
|
+
function removeActivationNode(activation, node) {
|
|
922
|
+
if (!activation?.path.includes(node)) return activation;
|
|
923
|
+
if (node.kind === "target") return void 0;
|
|
924
|
+
const path = activation.path.filter((candidate) => candidate !== node);
|
|
925
|
+
return path.length > 0 ? Object.freeze({ ...activation, path }) : void 0;
|
|
926
|
+
}
|
|
927
|
+
function removeActivationNodeFromMap(activations, node) {
|
|
928
|
+
for (const [button, activation] of activations) {
|
|
929
|
+
updateActivationMap(
|
|
930
|
+
activations,
|
|
931
|
+
button,
|
|
932
|
+
removeActivationNode(activation, node)
|
|
933
|
+
);
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
function updateActivationMap(activations, button, activation) {
|
|
937
|
+
if (activation) activations.set(button, activation);
|
|
938
|
+
else activations.delete(button);
|
|
939
|
+
}
|
|
940
|
+
function resetClickStreak(root) {
|
|
941
|
+
root.interaction.clickStreakTarget = void 0;
|
|
942
|
+
root.interaction.clickStreak = 0;
|
|
943
|
+
}
|
|
944
|
+
function recordManipulationPointerPress(root, pointerId, target) {
|
|
945
|
+
retainManipulationActivationState(root);
|
|
946
|
+
pendingManipulationActivations.get(root)?.delete(pointerId);
|
|
947
|
+
const press = Object.freeze({
|
|
948
|
+
path: target ? Object.freeze(buildEventPath(target)) : void 0
|
|
949
|
+
});
|
|
950
|
+
let presses = manipulationPointerPresses.get(root);
|
|
951
|
+
if (!presses) {
|
|
952
|
+
presses = /* @__PURE__ */ new Map();
|
|
953
|
+
manipulationPointerPresses.set(root, presses);
|
|
954
|
+
}
|
|
955
|
+
presses.set(pointerId, press);
|
|
956
|
+
}
|
|
957
|
+
function deleteManipulationPointerPress(root, pointerId) {
|
|
958
|
+
const presses = manipulationPointerPresses.get(root);
|
|
959
|
+
if (!presses) return;
|
|
960
|
+
presses.delete(pointerId);
|
|
961
|
+
if (presses.size === 0) manipulationPointerPresses.delete(root);
|
|
962
|
+
}
|
|
963
|
+
function retainManipulationActivationState(root) {
|
|
964
|
+
if (manipulationActivationRoots.has(root)) return;
|
|
965
|
+
manipulationActivationRoots.add(root);
|
|
966
|
+
root.mainTeardowns.add(() => {
|
|
967
|
+
manipulationPointerPresses.delete(root);
|
|
968
|
+
pendingManipulationActivations.delete(root);
|
|
969
|
+
manipulationActivationRoots.delete(root);
|
|
970
|
+
});
|
|
971
|
+
}
|
|
972
|
+
function consumeManipulationActivation(root, down, up, coordinateTarget, nativeEvent) {
|
|
973
|
+
const pending = pendingManipulationActivations.get(root);
|
|
974
|
+
if (!pending) return false;
|
|
975
|
+
const pointerId = clickPointerId(nativeEvent);
|
|
976
|
+
if (pointerId !== void 0) {
|
|
977
|
+
const activation = pending.get(pointerId);
|
|
978
|
+
if (!activation || !matchesManipulationActivation(activation, down, up, coordinateTarget)) {
|
|
979
|
+
return false;
|
|
980
|
+
}
|
|
981
|
+
deletePendingManipulationActivation(root, pending, pointerId);
|
|
982
|
+
return true;
|
|
983
|
+
}
|
|
984
|
+
let match;
|
|
985
|
+
for (const [candidatePointerId, activation] of pending) {
|
|
986
|
+
if (!matchesManipulationActivation(activation, down, up, coordinateTarget)) continue;
|
|
987
|
+
if (match !== void 0) return false;
|
|
988
|
+
match = candidatePointerId;
|
|
989
|
+
}
|
|
990
|
+
if (match === void 0) return false;
|
|
991
|
+
deletePendingManipulationActivation(root, pending, match);
|
|
992
|
+
return true;
|
|
993
|
+
}
|
|
994
|
+
function clickPointerId(nativeEvent) {
|
|
995
|
+
const pointerId = Reflect.get(nativeEvent, "pointerId");
|
|
996
|
+
return typeof pointerId === "number" && Number.isFinite(pointerId) ? pointerId : void 0;
|
|
997
|
+
}
|
|
998
|
+
function deletePendingManipulationActivation(root, pending, pointerId) {
|
|
999
|
+
pending.delete(pointerId);
|
|
1000
|
+
if (pending.size === 0) pendingManipulationActivations.delete(root);
|
|
1001
|
+
}
|
|
1002
|
+
function matchesManipulationActivation(activation, down, up, coordinateTarget) {
|
|
1003
|
+
if (activation.mouseDown && activation.mouseDown === down) return true;
|
|
1004
|
+
const pointerPath = activation.pointerPress?.path;
|
|
1005
|
+
const pressTarget = pointerPath?.at(-1);
|
|
1006
|
+
if (!pressTarget || !coordinateTarget) return false;
|
|
1007
|
+
const coordinatePath = buildEventPath(coordinateTarget);
|
|
1008
|
+
if (!coordinatePath.includes(pressTarget)) return false;
|
|
1009
|
+
return (!down || down.path.includes(pressTarget)) && (!up || up.path.includes(pressTarget));
|
|
1010
|
+
}
|
|
1011
|
+
function dispatchObservers(observers, event) {
|
|
1012
|
+
if (!observers) return;
|
|
1013
|
+
for (const observer of Array.from(observers)) {
|
|
1014
|
+
if (!observers.has(observer)) continue;
|
|
1015
|
+
try {
|
|
1016
|
+
observer(event);
|
|
1017
|
+
} catch (error) {
|
|
1018
|
+
try {
|
|
1019
|
+
globalThis.reportError(error);
|
|
1020
|
+
} catch {
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
function releaseCursorDefaultOwnership(cursorDefault) {
|
|
1026
|
+
const ownership = cursorDefaultOwnership.get(cursorDefault);
|
|
1027
|
+
if (!ownership) return;
|
|
1028
|
+
cursorDefaultOwnership.delete(cursorDefault);
|
|
1029
|
+
for (const release of ownership.releases) release();
|
|
1030
|
+
}
|
|
1031
|
+
function applyCursor(instance, region, canvas) {
|
|
1032
|
+
const interaction = instance.interaction;
|
|
1033
|
+
const cursorDefault = region?.cursor ? void 0 : lastCursorDefault(instance);
|
|
1034
|
+
const style = region?.cursor ?? cursorDefault?.style;
|
|
1035
|
+
if (interaction.cursorRegion === region && interaction.cursorDefault === cursorDefault && interaction.cursorCanvas === canvas && interaction.cursorStyle === canvas.style.cursor && style === interaction.cursorStyle) {
|
|
1036
|
+
return;
|
|
1037
|
+
}
|
|
1038
|
+
releaseCursor(instance);
|
|
1039
|
+
if (style && !canvas.style.cursor) {
|
|
1040
|
+
canvas.style.cursor = style;
|
|
1041
|
+
if (canvas.style.cursor) {
|
|
1042
|
+
interaction.cursorRegion = region;
|
|
1043
|
+
interaction.cursorDefault = cursorDefault;
|
|
1044
|
+
interaction.cursorCanvas = canvas;
|
|
1045
|
+
interaction.cursorStyle = canvas.style.cursor;
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
function lastCursorDefault(instance) {
|
|
1050
|
+
return Array.from(instance.cursorDefaults).at(-1);
|
|
1051
|
+
}
|
|
1052
|
+
function releaseCursor(instance) {
|
|
1053
|
+
const interaction = instance.interaction;
|
|
1054
|
+
const { cursorCanvas, cursorStyle } = interaction;
|
|
1055
|
+
if (cursorCanvas && cursorStyle && cursorCanvas.style.cursor === cursorStyle) {
|
|
1056
|
+
cursorCanvas.style.removeProperty("cursor");
|
|
1057
|
+
}
|
|
1058
|
+
interaction.cursorRegion = void 0;
|
|
1059
|
+
interaction.cursorDefault = void 0;
|
|
1060
|
+
interaction.cursorCanvas = void 0;
|
|
1061
|
+
interaction.cursorStyle = void 0;
|
|
1062
|
+
}
|
|
1063
|
+
function assertNever(value) {
|
|
1064
|
+
throw new Error(`Unhandled Pibbl event route: ${String(value)}`);
|
|
1065
|
+
}
|
|
1066
|
+
export {
|
|
1067
|
+
classifyNativeEventType,
|
|
1068
|
+
dispatchNativeEvent,
|
|
1069
|
+
dispatchToLogicalTarget,
|
|
1070
|
+
refreshCursorDefault,
|
|
1071
|
+
refreshInteractionCursor,
|
|
1072
|
+
releaseEventNodeState,
|
|
1073
|
+
removeCursorDefault,
|
|
1074
|
+
removeInteractionRegion,
|
|
1075
|
+
suppressManipulationActivation,
|
|
1076
|
+
updateCursorDefault
|
|
1077
|
+
};
|
|
1078
|
+
//# sourceMappingURL=dispatch.js.map
|