@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,1131 @@
|
|
|
1
|
+
import { GLOBAL_STATE } from "../global-state.js";
|
|
2
|
+
import { Teardowns } from "../teardowns.js";
|
|
3
|
+
import { resolveTargetRootBounds } from "./geometry.js";
|
|
4
|
+
import {
|
|
5
|
+
mountDOMFocusHost
|
|
6
|
+
} from "./dom-focus-host.js";
|
|
7
|
+
import {
|
|
8
|
+
applyDirectionalNavigationDefault,
|
|
9
|
+
applyKeyboardActivationDefault,
|
|
10
|
+
applyTabDefault
|
|
11
|
+
} from "./keyboard-defaults.js";
|
|
12
|
+
import { transitionLogicalFocus } from "./focus-events.js";
|
|
13
|
+
import {
|
|
14
|
+
isHtmlFocusCandidate
|
|
15
|
+
} from "./types.js";
|
|
16
|
+
import { getManagedTabStops } from "./dom-tab-stops.js";
|
|
17
|
+
const UNFOCUSED_SNAPSHOT = Object.freeze({
|
|
18
|
+
isFocused: false,
|
|
19
|
+
isFocusVisible: false
|
|
20
|
+
});
|
|
21
|
+
const retainedDirectionalBoundaries = /* @__PURE__ */ new WeakMap();
|
|
22
|
+
const coordinators = /* @__PURE__ */ new WeakMap();
|
|
23
|
+
const managerOwners = /* @__PURE__ */ new WeakMap();
|
|
24
|
+
const COMPATIBILITY_PRESS_WINDOW_MS = 1500;
|
|
25
|
+
class DirectionalBoundary {
|
|
26
|
+
constructor(owner) {
|
|
27
|
+
this.owner = owner;
|
|
28
|
+
}
|
|
29
|
+
owner;
|
|
30
|
+
committedCandidates = Object.freeze([]);
|
|
31
|
+
get candidates() {
|
|
32
|
+
return this.committedCandidates;
|
|
33
|
+
}
|
|
34
|
+
commit(candidates) {
|
|
35
|
+
this.committedCandidates = candidates;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
class FocusManagerCoordinator {
|
|
39
|
+
constructor(eventRoot) {
|
|
40
|
+
this.eventRoot = eventRoot;
|
|
41
|
+
eventRoot.rootInstance?.mainTeardowns.add(() => this.dispose());
|
|
42
|
+
}
|
|
43
|
+
eventRoot;
|
|
44
|
+
managers = /* @__PURE__ */ new Set();
|
|
45
|
+
transactions = /* @__PURE__ */ new WeakMap();
|
|
46
|
+
active;
|
|
47
|
+
domFocusHost;
|
|
48
|
+
domFocusHostTeardowns;
|
|
49
|
+
disposed = false;
|
|
50
|
+
add(manager) {
|
|
51
|
+
if (this.disposed) {
|
|
52
|
+
throw new Error("Pibbl focus manager root is disposed.");
|
|
53
|
+
}
|
|
54
|
+
this.ensureDOMFocusHost();
|
|
55
|
+
this.managers.add(manager);
|
|
56
|
+
const transaction = this.eventRoot.renderTransaction;
|
|
57
|
+
if (transaction) {
|
|
58
|
+
const state = this.stateFor(transaction);
|
|
59
|
+
state.prepared = manager;
|
|
60
|
+
this.eventRoot.focusPolicy = manager;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
claim(manager) {
|
|
64
|
+
const transaction = this.eventRoot.renderTransaction;
|
|
65
|
+
if (!transaction) {
|
|
66
|
+
if (this.active && this.active !== manager) {
|
|
67
|
+
throw duplicateManagerError();
|
|
68
|
+
}
|
|
69
|
+
this.setActive(manager);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const state = this.stateFor(transaction);
|
|
73
|
+
if (state.claimed && state.claimed !== manager) {
|
|
74
|
+
throw duplicateManagerError();
|
|
75
|
+
}
|
|
76
|
+
state.claimed = manager;
|
|
77
|
+
this.eventRoot.focusPolicy = manager;
|
|
78
|
+
}
|
|
79
|
+
beforeNativeDispatch(type, event) {
|
|
80
|
+
const manager = this.active;
|
|
81
|
+
const routeLogicalEvent = this.domFocusHost?.beforeNativeDispatch(type, event) ?? true;
|
|
82
|
+
return routeLogicalEvent && manager && !manager.isDestroyed ? manager : void 0;
|
|
83
|
+
}
|
|
84
|
+
syncDOMFocusHost(manager) {
|
|
85
|
+
if (this.active === manager) {
|
|
86
|
+
this.domFocusHost?.syncCandidateAvailability(manager.hasFocusCandidates);
|
|
87
|
+
this.domFocusHost?.syncHtmlRegions(manager.htmlFocusRegions);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
focusCanvasFromPress(manager) {
|
|
91
|
+
if (this.active === manager) this.domFocusHost?.focusFromPress();
|
|
92
|
+
}
|
|
93
|
+
claimRetainedManagers(instance) {
|
|
94
|
+
const retained = Array.from(this.managers).filter((manager) => {
|
|
95
|
+
const owner = managerOwners.get(manager);
|
|
96
|
+
return !manager.isDestroyed && !manager.ownerWasReleased && owner !== void 0 && isInstanceWithin(owner, instance);
|
|
97
|
+
});
|
|
98
|
+
const transaction = this.eventRoot.renderTransaction;
|
|
99
|
+
if (!transaction) {
|
|
100
|
+
for (const manager of retained) this.claim(manager);
|
|
101
|
+
return retained;
|
|
102
|
+
}
|
|
103
|
+
const state = this.stateFor(transaction);
|
|
104
|
+
for (const manager of retained) {
|
|
105
|
+
if (state.replayedManagers.has(manager)) continue;
|
|
106
|
+
state.replayedManagers.add(manager);
|
|
107
|
+
this.claim(manager);
|
|
108
|
+
}
|
|
109
|
+
return retained;
|
|
110
|
+
}
|
|
111
|
+
release(manager) {
|
|
112
|
+
if (manager.isDestroyed) return;
|
|
113
|
+
manager.markOwnerReleased();
|
|
114
|
+
const transaction = this.eventRoot.renderTransaction;
|
|
115
|
+
if (transaction) {
|
|
116
|
+
const state = this.stateFor(transaction);
|
|
117
|
+
if (!state.finished) return;
|
|
118
|
+
}
|
|
119
|
+
if (this.active === manager) {
|
|
120
|
+
this.setActive(void 0);
|
|
121
|
+
}
|
|
122
|
+
this.destroy(manager);
|
|
123
|
+
}
|
|
124
|
+
stateFor(transaction) {
|
|
125
|
+
const existing = this.transactions.get(transaction);
|
|
126
|
+
if (existing) return existing;
|
|
127
|
+
const state = {
|
|
128
|
+
prior: this.active,
|
|
129
|
+
replayedManagers: /* @__PURE__ */ new Set(),
|
|
130
|
+
prepared: void 0,
|
|
131
|
+
claimed: void 0,
|
|
132
|
+
finished: false,
|
|
133
|
+
restored: void 0
|
|
134
|
+
};
|
|
135
|
+
this.transactions.set(transaction, state);
|
|
136
|
+
transaction.onFinish((success) => this.finishTransaction(state, success));
|
|
137
|
+
return state;
|
|
138
|
+
}
|
|
139
|
+
finishTransaction(state, success) {
|
|
140
|
+
if (state.finished) return;
|
|
141
|
+
state.finished = true;
|
|
142
|
+
if (success) {
|
|
143
|
+
if (state.claimed) {
|
|
144
|
+
this.active = state.claimed;
|
|
145
|
+
} else if (this.active?.ownerWasReleased) {
|
|
146
|
+
this.active = void 0;
|
|
147
|
+
}
|
|
148
|
+
this.eventRoot.focusPolicy = this.active;
|
|
149
|
+
for (const manager of Array.from(this.managers)) {
|
|
150
|
+
if (manager !== this.active && manager.ownerWasReleased) {
|
|
151
|
+
this.destroy(manager);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
this.domFocusHost?.setManager(this.active);
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
const attemptedReplacement = state.claimed && state.claimed !== state.prior || state.prepared && state.prepared !== state.prior;
|
|
158
|
+
const restored = state.prior && attemptedReplacement && !state.prior.isDestroyed ? state.prior : void 0;
|
|
159
|
+
state.restored = restored;
|
|
160
|
+
this.active = restored;
|
|
161
|
+
this.eventRoot.focusPolicy = restored;
|
|
162
|
+
for (const manager of Array.from(this.managers)) {
|
|
163
|
+
if (manager !== restored) this.destroy(manager);
|
|
164
|
+
}
|
|
165
|
+
this.domFocusHost?.setManager(restored);
|
|
166
|
+
}
|
|
167
|
+
destroy(manager) {
|
|
168
|
+
this.managers.delete(manager);
|
|
169
|
+
manager.destroyFromCoordinator();
|
|
170
|
+
if (this.managers.size === 0) this.disposeDOMFocusHost();
|
|
171
|
+
}
|
|
172
|
+
ensureDOMFocusHost() {
|
|
173
|
+
if (this.domFocusHost) return;
|
|
174
|
+
const canvas = this.eventRoot.canvas;
|
|
175
|
+
if (!canvas) {
|
|
176
|
+
throw new Error(
|
|
177
|
+
"FocusManagement requires an HTMLCanvasElement root; an OffscreenCanvas has no DOM focus host."
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
const teardowns = new Teardowns();
|
|
181
|
+
try {
|
|
182
|
+
this.domFocusHost = mountDOMFocusHost(canvas, this.eventRoot, teardowns);
|
|
183
|
+
this.domFocusHostTeardowns = teardowns;
|
|
184
|
+
} catch (error) {
|
|
185
|
+
teardowns.execute();
|
|
186
|
+
throw error;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
disposeDOMFocusHost() {
|
|
190
|
+
this.domFocusHost = void 0;
|
|
191
|
+
this.domFocusHostTeardowns?.execute();
|
|
192
|
+
this.domFocusHostTeardowns = void 0;
|
|
193
|
+
}
|
|
194
|
+
setActive(manager) {
|
|
195
|
+
this.active = manager;
|
|
196
|
+
this.eventRoot.focusPolicy = manager;
|
|
197
|
+
this.domFocusHost?.setManager(manager);
|
|
198
|
+
}
|
|
199
|
+
dispose() {
|
|
200
|
+
if (this.disposed) return;
|
|
201
|
+
this.disposed = true;
|
|
202
|
+
this.active = void 0;
|
|
203
|
+
this.eventRoot.focusPolicy = void 0;
|
|
204
|
+
for (const manager of Array.from(this.managers)) this.destroy(manager);
|
|
205
|
+
this.disposeDOMFocusHost();
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
class PibblFocusManager {
|
|
209
|
+
constructor(eventRoot, owner) {
|
|
210
|
+
this.eventRoot = eventRoot;
|
|
211
|
+
const canvas = eventRoot.canvas;
|
|
212
|
+
if (!canvas) {
|
|
213
|
+
throw new Error(
|
|
214
|
+
"FocusManagement requires an HTMLCanvasElement root; an OffscreenCanvas has no DOM focus host."
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
managerOwners.set(this, owner);
|
|
218
|
+
this.coordinator = getCoordinator(eventRoot);
|
|
219
|
+
try {
|
|
220
|
+
this.coordinator.add(this);
|
|
221
|
+
} catch (error) {
|
|
222
|
+
managerOwners.delete(this);
|
|
223
|
+
throw error;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
eventRoot;
|
|
227
|
+
committedCandidates = Object.freeze([]);
|
|
228
|
+
committedHtmlCandidates = Object.freeze([]);
|
|
229
|
+
committedNavigationCandidates = Object.freeze([]);
|
|
230
|
+
committedBoundaries = /* @__PURE__ */ new Set();
|
|
231
|
+
pending;
|
|
232
|
+
transactionalPending;
|
|
233
|
+
directionalStack = [];
|
|
234
|
+
focusedTarget;
|
|
235
|
+
focusedHtmlRegion;
|
|
236
|
+
pendingHtmlFocusModality;
|
|
237
|
+
focusVisible = false;
|
|
238
|
+
pendingSpaceTarget;
|
|
239
|
+
pendingPressFocus;
|
|
240
|
+
representedPointerPresses = /* @__PURE__ */ new Map();
|
|
241
|
+
representedTouchContacts = /* @__PURE__ */ new Map();
|
|
242
|
+
activeTouchIdentifiers = /* @__PURE__ */ new Set();
|
|
243
|
+
primaryTouchIdentifier;
|
|
244
|
+
touchSequenceActive = false;
|
|
245
|
+
touchMouseCompatibility;
|
|
246
|
+
focusRenderRevision = 0;
|
|
247
|
+
layerFocusRenderRevisions = /* @__PURE__ */ new WeakMap();
|
|
248
|
+
destroyed = false;
|
|
249
|
+
ownerReleased = false;
|
|
250
|
+
coordinator;
|
|
251
|
+
get candidates() {
|
|
252
|
+
return this.committedCandidates;
|
|
253
|
+
}
|
|
254
|
+
/** @internal Full source-order list including native HtmlBox regions. */
|
|
255
|
+
get navigationCandidates() {
|
|
256
|
+
return this.committedNavigationCandidates;
|
|
257
|
+
}
|
|
258
|
+
get htmlFocusRegions() {
|
|
259
|
+
return this.committedHtmlCandidates.map((candidate) => candidate.region);
|
|
260
|
+
}
|
|
261
|
+
get focusedNavigationCandidate() {
|
|
262
|
+
if (this.focusedHtmlRegion) {
|
|
263
|
+
return this.committedHtmlCandidates.find(
|
|
264
|
+
(candidate) => candidate.region === this.focusedHtmlRegion
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
return this.focusedTarget ? this.committedCandidates.find(
|
|
268
|
+
(candidate) => candidate.target === this.focusedTarget
|
|
269
|
+
) : void 0;
|
|
270
|
+
}
|
|
271
|
+
/** @internal Resolves dynamic native eligibility at each navigation boundary. */
|
|
272
|
+
isNavigationCandidateFocusable(candidate) {
|
|
273
|
+
return isHtmlFocusCandidate(candidate) ? Boolean(
|
|
274
|
+
candidate.region.active && candidate.region.content && getManagedTabStops(candidate.region.content).length
|
|
275
|
+
) : Boolean(this.liveFocusCandidate(candidate.target));
|
|
276
|
+
}
|
|
277
|
+
/** Includes a successful render's collected candidates before commit callbacks settle. */
|
|
278
|
+
get hasFocusCandidates() {
|
|
279
|
+
return this.committedNavigationCandidates.length > 0 || (this.transactionalPending?.frame.targets.length ?? 0) + (this.transactionalPending?.frame.htmlRegions.length ?? 0) > 0;
|
|
280
|
+
}
|
|
281
|
+
get isDestroyed() {
|
|
282
|
+
return this.destroyed;
|
|
283
|
+
}
|
|
284
|
+
get ownerWasReleased() {
|
|
285
|
+
return this.ownerReleased;
|
|
286
|
+
}
|
|
287
|
+
get canvas() {
|
|
288
|
+
const canvas = this.eventRoot.canvas;
|
|
289
|
+
if (!canvas) throw new Error("Pibbl focus manager has no DOM Canvas host.");
|
|
290
|
+
return canvas;
|
|
291
|
+
}
|
|
292
|
+
get logicalFocusTarget() {
|
|
293
|
+
return this.focusedTarget;
|
|
294
|
+
}
|
|
295
|
+
get logicalFocusVisible() {
|
|
296
|
+
return this.focusVisible;
|
|
297
|
+
}
|
|
298
|
+
beginCollection() {
|
|
299
|
+
this.assertLive();
|
|
300
|
+
if (this.pending) {
|
|
301
|
+
throw new Error("FocusManagement cannot enter twice on one Pibbl root.");
|
|
302
|
+
}
|
|
303
|
+
this.coordinator.claim(this);
|
|
304
|
+
this.pending = {
|
|
305
|
+
entries: [],
|
|
306
|
+
targets: [],
|
|
307
|
+
htmlRegions: [],
|
|
308
|
+
observedTargets: /* @__PURE__ */ new Set(),
|
|
309
|
+
observedHtmlRegions: /* @__PURE__ */ new Set(),
|
|
310
|
+
ineligibleTargets: /* @__PURE__ */ new Set(),
|
|
311
|
+
boundaries: new Set(this.directionalStack)
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
finishCollection(success) {
|
|
315
|
+
const pending = this.pending;
|
|
316
|
+
this.pending = void 0;
|
|
317
|
+
if (!pending || !success || this.destroyed) return;
|
|
318
|
+
const transaction = this.eventRoot.renderTransaction;
|
|
319
|
+
if (transaction) {
|
|
320
|
+
this.transactionalPending = { transaction, frame: pending };
|
|
321
|
+
transaction.onFinish((transactionSucceeded) => {
|
|
322
|
+
if (this.transactionalPending?.transaction === transaction) {
|
|
323
|
+
this.transactionalPending = void 0;
|
|
324
|
+
}
|
|
325
|
+
if (transactionSucceeded && !this.destroyed) {
|
|
326
|
+
this.commitCollection(pending);
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
this.commitCollection(pending);
|
|
332
|
+
}
|
|
333
|
+
commitCollection(pending) {
|
|
334
|
+
const collected = [];
|
|
335
|
+
for (const [sourceIndex, observed] of pending.entries.entries()) {
|
|
336
|
+
if ("target" in observed) {
|
|
337
|
+
const target = observed.target;
|
|
338
|
+
collected.push(
|
|
339
|
+
Object.freeze({
|
|
340
|
+
target,
|
|
341
|
+
sourceIndex,
|
|
342
|
+
directionalBoundary: observed.directionalBoundary,
|
|
343
|
+
rootBounds: resolveTargetRootBounds(target)
|
|
344
|
+
})
|
|
345
|
+
);
|
|
346
|
+
continue;
|
|
347
|
+
}
|
|
348
|
+
const region = observed.region;
|
|
349
|
+
if (region.active && region.content)
|
|
350
|
+
collected.push(
|
|
351
|
+
Object.freeze({
|
|
352
|
+
region,
|
|
353
|
+
sourceIndex,
|
|
354
|
+
directionalBoundary: observed.directionalBoundary,
|
|
355
|
+
rootBounds: region.rootBounds
|
|
356
|
+
})
|
|
357
|
+
);
|
|
358
|
+
}
|
|
359
|
+
const navigation = Object.freeze(collected);
|
|
360
|
+
this.commitNavigationCandidates(navigation, pending.boundaries);
|
|
361
|
+
const candidates = navigation.filter(
|
|
362
|
+
(candidate) => !isHtmlFocusCandidate(candidate)
|
|
363
|
+
);
|
|
364
|
+
for (const candidate of candidates) {
|
|
365
|
+
if (candidate.directionalBoundary) {
|
|
366
|
+
retainedDirectionalBoundaries.set(
|
|
367
|
+
candidate.target,
|
|
368
|
+
asDirectionalBoundary(candidate.directionalBoundary)
|
|
369
|
+
);
|
|
370
|
+
} else {
|
|
371
|
+
retainedDirectionalBoundaries.delete(candidate.target);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
observeTarget(target) {
|
|
376
|
+
const pending = this.pending;
|
|
377
|
+
if (!pending) return;
|
|
378
|
+
if (this.pendingSpaceTarget === target && !target.handlers.click) {
|
|
379
|
+
this.cancelSpaceActivation();
|
|
380
|
+
}
|
|
381
|
+
if (!isKeyboardFocusable(target)) {
|
|
382
|
+
this.markPendingIneligible(target);
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
pending.ineligibleTargets.delete(target);
|
|
386
|
+
this.recordPendingTarget(target, this.currentDirectionalBoundary());
|
|
387
|
+
}
|
|
388
|
+
/** @internal Collects one published HtmlBox in source order. */
|
|
389
|
+
observeHtmlRegion(region) {
|
|
390
|
+
const pending = this.pending;
|
|
391
|
+
if (!pending || pending.observedHtmlRegions.has(region)) return;
|
|
392
|
+
pending.observedHtmlRegions.add(region);
|
|
393
|
+
const observed = {
|
|
394
|
+
region,
|
|
395
|
+
directionalBoundary: this.currentDirectionalBoundary()
|
|
396
|
+
};
|
|
397
|
+
pending.htmlRegions.push(observed);
|
|
398
|
+
pending.entries.push(observed);
|
|
399
|
+
}
|
|
400
|
+
/** @internal Removes an unmounted HtmlBox without manufacturing a Canvas target. */
|
|
401
|
+
removeHtmlFocusRegion(region) {
|
|
402
|
+
if (this.pending?.observedHtmlRegions.delete(region)) {
|
|
403
|
+
this.pending.htmlRegions.splice(
|
|
404
|
+
this.pending.htmlRegions.findIndex((entry) => entry.region === region),
|
|
405
|
+
1
|
|
406
|
+
);
|
|
407
|
+
const index = this.pending.entries.findIndex(
|
|
408
|
+
(entry) => "region" in entry && entry.region === region
|
|
409
|
+
);
|
|
410
|
+
if (index >= 0) this.pending.entries.splice(index, 1);
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
if (!this.committedHtmlCandidates.some(
|
|
414
|
+
(candidate) => candidate.region === region
|
|
415
|
+
))
|
|
416
|
+
return;
|
|
417
|
+
const wasFocused = this.focusedHtmlRegion === region;
|
|
418
|
+
const canvas = this.eventRoot.canvas;
|
|
419
|
+
const shouldReturnNativeFocus = Boolean(
|
|
420
|
+
wasFocused && canvas && !this.eventRoot.rootInstance?.mainTeardowns.closed && region.content?.contains(canvas.ownerDocument.activeElement)
|
|
421
|
+
);
|
|
422
|
+
this.commitNavigationCandidates(
|
|
423
|
+
this.committedNavigationCandidates.filter(
|
|
424
|
+
(candidate) => !isHtmlFocusCandidate(candidate) || candidate.region !== region
|
|
425
|
+
),
|
|
426
|
+
this.committedBoundaries
|
|
427
|
+
);
|
|
428
|
+
if (shouldReturnNativeFocus && canvas) {
|
|
429
|
+
this.coordinator.focusCanvasFromPress(this);
|
|
430
|
+
this.clearFocusState();
|
|
431
|
+
}
|
|
432
|
+
if (wasFocused) this.clearHtmlFocus(region);
|
|
433
|
+
}
|
|
434
|
+
/** @internal Deactivates retained DOM hosts while the root has no display area. */
|
|
435
|
+
suspendHtmlRegions() {
|
|
436
|
+
if (this.committedHtmlCandidates.length === 0) return;
|
|
437
|
+
const focused = this.focusedHtmlRegion;
|
|
438
|
+
const canvas = this.eventRoot.canvas;
|
|
439
|
+
const shouldReturnNativeFocus = Boolean(
|
|
440
|
+
focused && canvas && !this.eventRoot.rootInstance?.mainTeardowns.closed && focused.content?.contains(canvas.ownerDocument.activeElement)
|
|
441
|
+
);
|
|
442
|
+
this.commitNavigationCandidates(
|
|
443
|
+
this.committedNavigationCandidates.filter(
|
|
444
|
+
(candidate) => !isHtmlFocusCandidate(candidate)
|
|
445
|
+
),
|
|
446
|
+
this.committedBoundaries
|
|
447
|
+
);
|
|
448
|
+
if (shouldReturnNativeFocus && canvas) {
|
|
449
|
+
this.coordinator.focusCanvasFromPress(this);
|
|
450
|
+
this.clearFocusState();
|
|
451
|
+
}
|
|
452
|
+
if (focused) this.clearHtmlFocus(focused);
|
|
453
|
+
}
|
|
454
|
+
observeTransactionalTarget(target) {
|
|
455
|
+
const transactional = this.transactionalPending;
|
|
456
|
+
if (!transactional || transactional.transaction !== this.eventRoot.renderTransaction)
|
|
457
|
+
return;
|
|
458
|
+
const pending = transactional.frame;
|
|
459
|
+
if (this.pendingSpaceTarget === target && !target.handlers.click) {
|
|
460
|
+
this.cancelSpaceActivation();
|
|
461
|
+
}
|
|
462
|
+
if (!isKeyboardFocusable(target)) {
|
|
463
|
+
pending.ineligibleTargets.add(target);
|
|
464
|
+
const index = pending.targets.findIndex(
|
|
465
|
+
(candidate) => candidate.target === target
|
|
466
|
+
);
|
|
467
|
+
if (index !== -1) pending.targets.splice(index, 1);
|
|
468
|
+
const entryIndex = pending.entries.findIndex(
|
|
469
|
+
(entry) => "target" in entry && entry.target === target
|
|
470
|
+
);
|
|
471
|
+
if (entryIndex !== -1) pending.entries.splice(entryIndex, 1);
|
|
472
|
+
pending.observedTargets.delete(target);
|
|
473
|
+
return;
|
|
474
|
+
}
|
|
475
|
+
pending.ineligibleTargets.delete(target);
|
|
476
|
+
if (pending.observedTargets.has(target)) return;
|
|
477
|
+
pending.observedTargets.add(target);
|
|
478
|
+
const observed = {
|
|
479
|
+
target,
|
|
480
|
+
directionalBoundary: this.currentDirectionalBoundary()
|
|
481
|
+
};
|
|
482
|
+
pending.targets.push(observed);
|
|
483
|
+
pending.entries.push(observed);
|
|
484
|
+
}
|
|
485
|
+
removeTarget(target) {
|
|
486
|
+
if (this.pendingSpaceTarget === target) this.cancelSpaceActivation();
|
|
487
|
+
if (this.pending) {
|
|
488
|
+
this.markPendingIneligible(target);
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
if (!this.committedCandidates.some((candidate) => candidate.target === target)) {
|
|
492
|
+
if (this.focusedTarget === target) this.clearFocusState();
|
|
493
|
+
return;
|
|
494
|
+
}
|
|
495
|
+
this.commitRemovedTarget(target);
|
|
496
|
+
}
|
|
497
|
+
snapshot(target) {
|
|
498
|
+
if (this.ownerReleased || this.pending?.ineligibleTargets.has(target) || target !== this.focusedTarget) {
|
|
499
|
+
return UNFOCUSED_SNAPSHOT;
|
|
500
|
+
}
|
|
501
|
+
return Object.freeze({
|
|
502
|
+
isFocused: true,
|
|
503
|
+
isFocusVisible: this.focusVisible
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
resolveKeyboardTarget() {
|
|
507
|
+
const target = this.focusedTarget;
|
|
508
|
+
if (target && this.pending?.ineligibleTargets.has(target)) return void 0;
|
|
509
|
+
return target && this.committedCandidates.some((candidate) => candidate.target === target) ? target : void 0;
|
|
510
|
+
}
|
|
511
|
+
afterDispatch(event) {
|
|
512
|
+
if (event.type === "keydown") {
|
|
513
|
+
applyTabDefault(this, event);
|
|
514
|
+
}
|
|
515
|
+
if (event.type === "keydown" || event.type === "keyup") {
|
|
516
|
+
applyKeyboardActivationDefault(this, event);
|
|
517
|
+
}
|
|
518
|
+
if (event.type === "keydown") {
|
|
519
|
+
applyDirectionalNavigationDefault(this, event);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
afterPressDispatch(input) {
|
|
523
|
+
if (this.destroyed) return;
|
|
524
|
+
this.purgeExpiredPresses(input.originalEvent.timeStamp);
|
|
525
|
+
switch (input.source) {
|
|
526
|
+
case "pointer":
|
|
527
|
+
this.recordPointerPress(input);
|
|
528
|
+
if (!pressWasPrevented(input)) this.applyPressFocus(input.target);
|
|
529
|
+
return;
|
|
530
|
+
case "mouse":
|
|
531
|
+
if (this.consumeRepresentedMousePress(input)) return;
|
|
532
|
+
if (!pressWasPrevented(input)) this.applyPressFocus(input.target);
|
|
533
|
+
return;
|
|
534
|
+
case "touch":
|
|
535
|
+
if (this.consumeRepresentedTouchPress(input)) return;
|
|
536
|
+
this.recordTouchFallback(input);
|
|
537
|
+
if (!pressWasPrevented(input)) this.applyPressFocus(input.target);
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
afterTouchDispatch(input) {
|
|
542
|
+
if (this.destroyed) return;
|
|
543
|
+
this.purgeExpiredPresses(input.originalEvent.timeStamp);
|
|
544
|
+
this.reconcileTouchContacts(input);
|
|
545
|
+
if (input.type === "touchstart") {
|
|
546
|
+
const primary = this.recordTouchStarts(input);
|
|
547
|
+
if (!primary) return;
|
|
548
|
+
this.afterPressDispatch({
|
|
549
|
+
source: "touch",
|
|
550
|
+
target: primary.target,
|
|
551
|
+
event: void 0,
|
|
552
|
+
originalEvent: input.originalEvent,
|
|
553
|
+
x: primary.x,
|
|
554
|
+
y: primary.y,
|
|
555
|
+
touchIdentifier: primary.identifier
|
|
556
|
+
});
|
|
557
|
+
return;
|
|
558
|
+
}
|
|
559
|
+
if (input.type === "touchend" || input.type === "touchcancel") {
|
|
560
|
+
this.recordTouchTerminals(input);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
beforeNativeDispatch(type, event) {
|
|
564
|
+
return this.coordinator.beforeNativeDispatch(type, event);
|
|
565
|
+
}
|
|
566
|
+
enterDOMFocus(backwards) {
|
|
567
|
+
if (this.destroyed) return;
|
|
568
|
+
const pendingPress = this.pendingPressFocus;
|
|
569
|
+
if (pendingPress) {
|
|
570
|
+
this.pendingPressFocus = void 0;
|
|
571
|
+
transitionLogicalFocus(
|
|
572
|
+
this,
|
|
573
|
+
this.liveFocusCandidate(pendingPress.target),
|
|
574
|
+
"pointer"
|
|
575
|
+
);
|
|
576
|
+
return;
|
|
577
|
+
}
|
|
578
|
+
const candidates = backwards ? [...this.committedNavigationCandidates].reverse() : this.committedNavigationCandidates;
|
|
579
|
+
for (const candidate of candidates) {
|
|
580
|
+
if (this.focusNavigationCandidate(candidate, "keyboard", backwards))
|
|
581
|
+
return;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
leaveDOMFocus() {
|
|
585
|
+
if (this.destroyed) return;
|
|
586
|
+
this.pendingPressFocus = void 0;
|
|
587
|
+
transitionLogicalFocus(this, void 0, "keyboard");
|
|
588
|
+
}
|
|
589
|
+
activateDOMHost() {
|
|
590
|
+
if (!this.destroyed) this.coordinator.syncDOMFocusHost(this);
|
|
591
|
+
}
|
|
592
|
+
focusNavigationCandidate(candidate, modality, backwards = false) {
|
|
593
|
+
if (!candidate) return false;
|
|
594
|
+
if (!isHtmlFocusCandidate(candidate)) {
|
|
595
|
+
this.focusedHtmlRegion && this.clearHtmlFocus(this.focusedHtmlRegion);
|
|
596
|
+
transitionLogicalFocus(
|
|
597
|
+
this,
|
|
598
|
+
this.liveFocusCandidate(candidate.target),
|
|
599
|
+
modality
|
|
600
|
+
);
|
|
601
|
+
return true;
|
|
602
|
+
}
|
|
603
|
+
const region = candidate.region;
|
|
604
|
+
const content = region.active ? region.content : void 0;
|
|
605
|
+
const stops = content ? getManagedTabStops(content) : [];
|
|
606
|
+
const destination = backwards ? stops.at(-1) : stops[0];
|
|
607
|
+
if (!destination) return false;
|
|
608
|
+
if (this.focusedTarget) transitionLogicalFocus(this, void 0, modality);
|
|
609
|
+
this.adoptHtmlFocus(region, modality);
|
|
610
|
+
this.pendingHtmlFocusModality = modality;
|
|
611
|
+
destination.focus({ preventScroll: true });
|
|
612
|
+
this.pendingHtmlFocusModality = void 0;
|
|
613
|
+
return true;
|
|
614
|
+
}
|
|
615
|
+
/** @internal Called by the native region listeners after the browser focuses a descendant. */
|
|
616
|
+
adoptNativeHtmlFocus(region, modality) {
|
|
617
|
+
if (!this.committedHtmlCandidates.some(
|
|
618
|
+
(candidate) => candidate.region === region
|
|
619
|
+
))
|
|
620
|
+
return;
|
|
621
|
+
const carriedModality = modality ?? (this.focusVisible ? "keyboard" : "pointer");
|
|
622
|
+
if (this.focusedTarget)
|
|
623
|
+
transitionLogicalFocus(this, void 0, carriedModality);
|
|
624
|
+
this.adoptHtmlFocus(
|
|
625
|
+
region,
|
|
626
|
+
this.pendingHtmlFocusModality ?? carriedModality
|
|
627
|
+
);
|
|
628
|
+
}
|
|
629
|
+
/** @internal Native blur settled outside a registered host. */
|
|
630
|
+
clearNativeHtmlFocus(region) {
|
|
631
|
+
if (this.focusedHtmlRegion === region) this.clearHtmlFocus(region);
|
|
632
|
+
}
|
|
633
|
+
/** @internal Reconciles a committed host list with the browser focus owner. */
|
|
634
|
+
reconcileNativeHtmlFocus(region) {
|
|
635
|
+
if (region) {
|
|
636
|
+
this.adoptNativeHtmlFocus(region, void 0);
|
|
637
|
+
} else if (this.focusedHtmlRegion) {
|
|
638
|
+
this.clearHtmlFocus(this.focusedHtmlRegion);
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
replayRetainedSubtree(instance) {
|
|
642
|
+
const retainedManagers = this.coordinator.claimRetainedManagers(instance);
|
|
643
|
+
const replayManager = retainedManagers.length === 1 ? retainedManagers[0] : this;
|
|
644
|
+
replayManager.replayRetainedTargets(instance);
|
|
645
|
+
}
|
|
646
|
+
layerFocusRenderRevision(instance) {
|
|
647
|
+
return this.ownerReleased ? void 0 : this.layerFocusRenderRevisions.get(instance);
|
|
648
|
+
}
|
|
649
|
+
replayRetainedTargets(instance) {
|
|
650
|
+
const retained = this.committedNavigationCandidates.filter(
|
|
651
|
+
(candidate) => isHtmlFocusCandidate(candidate) ? isInstanceWithin(candidate.region.owner, instance) : isInstanceWithin(candidate.target.owner, instance)
|
|
652
|
+
);
|
|
653
|
+
if (!retained.some(isHtmlFocusCandidate)) {
|
|
654
|
+
this.replayCanvasOnlyTargets(instance);
|
|
655
|
+
return;
|
|
656
|
+
}
|
|
657
|
+
if (this.pending) {
|
|
658
|
+
for (const candidate of retained) {
|
|
659
|
+
const retainedBoundary = isHtmlFocusCandidate(candidate) ? candidate.directionalBoundary instanceof DirectionalBoundary && isInstanceWithin(candidate.directionalBoundary.owner, instance) ? candidate.directionalBoundary : void 0 : retainedDirectionalBoundaries.get(candidate.target);
|
|
660
|
+
const directionalBoundary = retainedBoundary && isInstanceWithin(retainedBoundary.owner, instance) ? retainedBoundary : this.currentDirectionalBoundary();
|
|
661
|
+
if (directionalBoundary) {
|
|
662
|
+
this.pending.boundaries.add(directionalBoundary);
|
|
663
|
+
}
|
|
664
|
+
if (isHtmlFocusCandidate(candidate)) {
|
|
665
|
+
const region = candidate.region;
|
|
666
|
+
if (!region.active || !region.content) continue;
|
|
667
|
+
if (!this.pending.observedHtmlRegions.has(region)) {
|
|
668
|
+
this.pending.observedHtmlRegions.add(region);
|
|
669
|
+
const observed = { region, directionalBoundary };
|
|
670
|
+
this.pending.htmlRegions.push(observed);
|
|
671
|
+
this.pending.entries.push(observed);
|
|
672
|
+
}
|
|
673
|
+
} else if (isKeyboardFocusable(candidate.target)) {
|
|
674
|
+
this.recordPendingTarget(candidate.target, directionalBoundary);
|
|
675
|
+
} else {
|
|
676
|
+
this.markPendingIneligible(candidate.target);
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
return;
|
|
680
|
+
}
|
|
681
|
+
if (retained.length === 0) return;
|
|
682
|
+
const replayed = new Set(retained);
|
|
683
|
+
const candidates = Object.freeze(
|
|
684
|
+
this.committedNavigationCandidates.map((candidate) => {
|
|
685
|
+
if (!replayed.has(candidate)) return candidate;
|
|
686
|
+
return isHtmlFocusCandidate(candidate) ? Object.freeze({
|
|
687
|
+
...candidate,
|
|
688
|
+
rootBounds: candidate.region.rootBounds
|
|
689
|
+
}) : Object.freeze({
|
|
690
|
+
...candidate,
|
|
691
|
+
rootBounds: resolveTargetRootBounds(candidate.target)
|
|
692
|
+
});
|
|
693
|
+
})
|
|
694
|
+
);
|
|
695
|
+
this.commitNavigationCandidates(candidates, this.committedBoundaries);
|
|
696
|
+
}
|
|
697
|
+
replayCanvasOnlyTargets(instance) {
|
|
698
|
+
const targets = [];
|
|
699
|
+
collectRetainedTargets(instance, targets);
|
|
700
|
+
if (this.pending) {
|
|
701
|
+
for (const target of targets) {
|
|
702
|
+
if (!isKeyboardFocusable(target)) {
|
|
703
|
+
this.markPendingIneligible(target);
|
|
704
|
+
continue;
|
|
705
|
+
}
|
|
706
|
+
const retainedBoundary = retainedDirectionalBoundaries.get(target);
|
|
707
|
+
const directionalBoundary = retainedBoundary && isInstanceWithin(retainedBoundary.owner, instance) ? retainedBoundary : this.currentDirectionalBoundary();
|
|
708
|
+
if (directionalBoundary)
|
|
709
|
+
this.pending.boundaries.add(directionalBoundary);
|
|
710
|
+
this.recordPendingTarget(target, directionalBoundary);
|
|
711
|
+
}
|
|
712
|
+
return;
|
|
713
|
+
}
|
|
714
|
+
const replayed = new Set(targets);
|
|
715
|
+
if (!this.committedCandidates.some(
|
|
716
|
+
(candidate) => replayed.has(candidate.target)
|
|
717
|
+
))
|
|
718
|
+
return;
|
|
719
|
+
const candidates = Object.freeze(
|
|
720
|
+
this.committedCandidates.map(
|
|
721
|
+
(candidate) => replayed.has(candidate.target) ? Object.freeze({
|
|
722
|
+
...candidate,
|
|
723
|
+
rootBounds: resolveTargetRootBounds(candidate.target)
|
|
724
|
+
}) : candidate
|
|
725
|
+
)
|
|
726
|
+
);
|
|
727
|
+
this.commitCandidates(candidates, this.committedBoundaries);
|
|
728
|
+
}
|
|
729
|
+
setFocusState(target, focusVisible) {
|
|
730
|
+
if (target && !this.committedCandidates.some((candidate) => candidate.target === target)) {
|
|
731
|
+
throw new Error(
|
|
732
|
+
"Pibbl logical focus target is not a live focus candidate."
|
|
733
|
+
);
|
|
734
|
+
}
|
|
735
|
+
this.commitLogicalFocus(target, focusVisible);
|
|
736
|
+
}
|
|
737
|
+
liveFocusCandidate(target) {
|
|
738
|
+
return target?.live && target.owner.eventRoot === this.eventRoot && this.committedCandidates.some((candidate) => candidate.target === target) ? target : void 0;
|
|
739
|
+
}
|
|
740
|
+
commitLogicalFocus(target, focusVisible) {
|
|
741
|
+
const nextFocusVisible = Boolean(target && focusVisible);
|
|
742
|
+
if (target === this.focusedTarget && nextFocusVisible === this.focusVisible) {
|
|
743
|
+
return;
|
|
744
|
+
}
|
|
745
|
+
const previous = this.focusedTarget;
|
|
746
|
+
if (this.focusedTarget !== target) this.cancelSpaceActivation();
|
|
747
|
+
this.focusedTarget = target;
|
|
748
|
+
this.focusVisible = nextFocusVisible;
|
|
749
|
+
const revision = ++this.focusRenderRevision;
|
|
750
|
+
this.markFocusRenderLayers(previous, revision);
|
|
751
|
+
this.markFocusRenderLayers(target, revision);
|
|
752
|
+
}
|
|
753
|
+
enterDirectionalBoundary(boundary) {
|
|
754
|
+
const value = asDirectionalBoundary(boundary);
|
|
755
|
+
this.directionalStack.push(value);
|
|
756
|
+
this.pending?.boundaries.add(value);
|
|
757
|
+
}
|
|
758
|
+
exitDirectionalBoundary(boundary) {
|
|
759
|
+
const value = asDirectionalBoundary(boundary);
|
|
760
|
+
if (this.directionalStack.at(-1) !== value) {
|
|
761
|
+
throw new Error("Pibbl directional boundary scope exited out of order.");
|
|
762
|
+
}
|
|
763
|
+
this.directionalStack.pop();
|
|
764
|
+
}
|
|
765
|
+
currentDirectionalBoundary() {
|
|
766
|
+
return this.directionalStack.at(-1);
|
|
767
|
+
}
|
|
768
|
+
markFocusRenderLayers(target, revision) {
|
|
769
|
+
let instance = target?.owner;
|
|
770
|
+
while (instance && instance !== this.eventRoot.rootInstance) {
|
|
771
|
+
this.layerFocusRenderRevisions.set(instance, revision);
|
|
772
|
+
instance = instance.parent ? GLOBAL_STATE.pibblInstances.get(instance.parent) : void 0;
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
dispose() {
|
|
776
|
+
if (this.ownerReleased || this.destroyed) return;
|
|
777
|
+
this.coordinator.release(this);
|
|
778
|
+
}
|
|
779
|
+
markOwnerReleased() {
|
|
780
|
+
this.ownerReleased = true;
|
|
781
|
+
}
|
|
782
|
+
destroyFromCoordinator() {
|
|
783
|
+
if (this.destroyed) return;
|
|
784
|
+
this.destroyed = true;
|
|
785
|
+
managerOwners.delete(this);
|
|
786
|
+
this.pending = void 0;
|
|
787
|
+
this.directionalStack = [];
|
|
788
|
+
this.pendingPressFocus = void 0;
|
|
789
|
+
this.cancelSpaceActivation();
|
|
790
|
+
this.representedPointerPresses.clear();
|
|
791
|
+
this.representedTouchContacts.clear();
|
|
792
|
+
this.activeTouchIdentifiers.clear();
|
|
793
|
+
this.primaryTouchIdentifier = void 0;
|
|
794
|
+
this.touchSequenceActive = false;
|
|
795
|
+
this.touchMouseCompatibility = void 0;
|
|
796
|
+
for (const boundary of this.committedBoundaries) {
|
|
797
|
+
boundary.commit(Object.freeze([]));
|
|
798
|
+
}
|
|
799
|
+
this.committedBoundaries.clear();
|
|
800
|
+
this.committedCandidates = Object.freeze([]);
|
|
801
|
+
this.clearFocusState();
|
|
802
|
+
}
|
|
803
|
+
recordPendingTarget(target, directionalBoundary) {
|
|
804
|
+
const pending = this.pending;
|
|
805
|
+
if (!pending || pending.observedTargets.has(target)) return;
|
|
806
|
+
pending.observedTargets.add(target);
|
|
807
|
+
const observed = { target, directionalBoundary };
|
|
808
|
+
pending.targets.push(observed);
|
|
809
|
+
pending.entries.push(observed);
|
|
810
|
+
}
|
|
811
|
+
markPendingIneligible(target) {
|
|
812
|
+
const pending = this.pending;
|
|
813
|
+
if (!pending) return;
|
|
814
|
+
pending.ineligibleTargets.add(target);
|
|
815
|
+
if (!pending.observedTargets.delete(target)) return;
|
|
816
|
+
for (let index = pending.targets.length - 1; index >= 0; index--) {
|
|
817
|
+
if (pending.targets[index].target === target) {
|
|
818
|
+
pending.targets.splice(index, 1);
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
for (let index = pending.entries.length - 1; index >= 0; index--) {
|
|
822
|
+
const entry = pending.entries[index];
|
|
823
|
+
if ("target" in entry && entry.target === target)
|
|
824
|
+
pending.entries.splice(index, 1);
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
commitCandidates(candidates, boundaries) {
|
|
828
|
+
const canvasByTarget = new Map(
|
|
829
|
+
candidates.map((candidate) => [candidate.target, candidate])
|
|
830
|
+
);
|
|
831
|
+
const navigation = this.committedNavigationCandidates.map(
|
|
832
|
+
(candidate) => isHtmlFocusCandidate(candidate) ? candidate : canvasByTarget.get(candidate.target) ?? candidate
|
|
833
|
+
).filter(
|
|
834
|
+
(candidate) => isHtmlFocusCandidate(candidate) || candidates.some((canvas) => canvas.target === candidate.target)
|
|
835
|
+
);
|
|
836
|
+
if (navigation.length === 0 && candidates.length > 0)
|
|
837
|
+
navigation.push(...candidates);
|
|
838
|
+
this.commitNavigationCandidates(Object.freeze(navigation), boundaries);
|
|
839
|
+
}
|
|
840
|
+
commitNavigationCandidates(candidates, boundaries) {
|
|
841
|
+
const pendingByBoundary = /* @__PURE__ */ new Map();
|
|
842
|
+
for (const boundary of boundaries) pendingByBoundary.set(boundary, []);
|
|
843
|
+
for (const candidate of candidates) {
|
|
844
|
+
if (candidate.directionalBoundary instanceof DirectionalBoundary) {
|
|
845
|
+
pendingByBoundary.get(candidate.directionalBoundary)?.push(candidate);
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
const committedByBoundary = /* @__PURE__ */ new Map();
|
|
849
|
+
for (const [boundary, directCandidates] of pendingByBoundary) {
|
|
850
|
+
committedByBoundary.set(boundary, Object.freeze(directCandidates));
|
|
851
|
+
}
|
|
852
|
+
for (const boundary of this.committedBoundaries) {
|
|
853
|
+
if (!committedByBoundary.has(boundary)) {
|
|
854
|
+
boundary.commit(Object.freeze([]));
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
for (const [boundary, directCandidates] of committedByBoundary) {
|
|
858
|
+
boundary.commit(directCandidates);
|
|
859
|
+
}
|
|
860
|
+
this.committedBoundaries = new Set(committedByBoundary.keys());
|
|
861
|
+
this.committedNavigationCandidates = candidates;
|
|
862
|
+
this.committedCandidates = Object.freeze(
|
|
863
|
+
candidates.filter(
|
|
864
|
+
(candidate) => !isHtmlFocusCandidate(candidate)
|
|
865
|
+
)
|
|
866
|
+
);
|
|
867
|
+
this.committedHtmlCandidates = Object.freeze(
|
|
868
|
+
candidates.filter(
|
|
869
|
+
(candidate) => isHtmlFocusCandidate(candidate)
|
|
870
|
+
)
|
|
871
|
+
);
|
|
872
|
+
if (this.focusedTarget && !candidates.some(
|
|
873
|
+
(candidate) => !isHtmlFocusCandidate(candidate) && candidate.target === this.focusedTarget
|
|
874
|
+
)) {
|
|
875
|
+
this.clearFocusState();
|
|
876
|
+
}
|
|
877
|
+
if (this.focusedHtmlRegion && !this.committedHtmlCandidates.some(
|
|
878
|
+
(candidate) => candidate.region === this.focusedHtmlRegion
|
|
879
|
+
))
|
|
880
|
+
this.clearHtmlFocus(this.focusedHtmlRegion);
|
|
881
|
+
this.activateDOMHost();
|
|
882
|
+
}
|
|
883
|
+
commitRemovedTarget(target) {
|
|
884
|
+
const retained = this.committedCandidates.filter(
|
|
885
|
+
(candidate) => candidate.target !== target
|
|
886
|
+
);
|
|
887
|
+
const candidates = Object.freeze(
|
|
888
|
+
retained.map(
|
|
889
|
+
(candidate, sourceIndex) => Object.freeze({ ...candidate, sourceIndex })
|
|
890
|
+
)
|
|
891
|
+
);
|
|
892
|
+
this.commitCandidates(candidates, this.committedBoundaries);
|
|
893
|
+
}
|
|
894
|
+
clearFocusState() {
|
|
895
|
+
this.cancelSpaceActivation();
|
|
896
|
+
this.focusedTarget = void 0;
|
|
897
|
+
this.focusVisible = false;
|
|
898
|
+
}
|
|
899
|
+
adoptHtmlFocus(region, modality) {
|
|
900
|
+
const visible = modality === "keyboard";
|
|
901
|
+
if (this.focusedHtmlRegion === region && this.focusVisible === visible)
|
|
902
|
+
return;
|
|
903
|
+
const previous = this.focusedHtmlRegion;
|
|
904
|
+
this.focusedHtmlRegion = region;
|
|
905
|
+
this.focusVisible = visible;
|
|
906
|
+
if (previous && previous !== region)
|
|
907
|
+
this.notifyHtmlFocus(previous, false, false);
|
|
908
|
+
this.notifyHtmlFocus(region, true, visible);
|
|
909
|
+
}
|
|
910
|
+
clearHtmlFocus(region) {
|
|
911
|
+
if (this.focusedHtmlRegion !== region) return;
|
|
912
|
+
this.focusedHtmlRegion = void 0;
|
|
913
|
+
this.focusVisible = false;
|
|
914
|
+
this.notifyHtmlFocus(region, false, false);
|
|
915
|
+
}
|
|
916
|
+
notifyHtmlFocus(region, isFocusWithin, isFocusVisible) {
|
|
917
|
+
region.onFocusSnapshot?.(Object.freeze({ isFocusWithin, isFocusVisible }));
|
|
918
|
+
}
|
|
919
|
+
applyPressFocus(requestedTarget) {
|
|
920
|
+
const target = this.liveFocusCandidate(requestedTarget);
|
|
921
|
+
const pending = { target };
|
|
922
|
+
this.pendingPressFocus = pending;
|
|
923
|
+
try {
|
|
924
|
+
this.coordinator.focusCanvasFromPress(this);
|
|
925
|
+
if (this.pendingPressFocus !== pending || this.destroyed || this.canvas.ownerDocument.activeElement !== this.canvas) {
|
|
926
|
+
return;
|
|
927
|
+
}
|
|
928
|
+
this.pendingPressFocus = void 0;
|
|
929
|
+
transitionLogicalFocus(this, this.liveFocusCandidate(target), "pointer");
|
|
930
|
+
} finally {
|
|
931
|
+
if (this.pendingPressFocus === pending)
|
|
932
|
+
this.pendingPressFocus = void 0;
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
beginSpaceActivation(target) {
|
|
936
|
+
this.pendingSpaceTarget = target;
|
|
937
|
+
}
|
|
938
|
+
hasPendingSpaceActivation(target) {
|
|
939
|
+
return Boolean(target && this.pendingSpaceTarget === target);
|
|
940
|
+
}
|
|
941
|
+
consumeSpaceActivation() {
|
|
942
|
+
const target = this.pendingSpaceTarget;
|
|
943
|
+
this.pendingSpaceTarget = void 0;
|
|
944
|
+
return target;
|
|
945
|
+
}
|
|
946
|
+
cancelSpaceActivation() {
|
|
947
|
+
this.pendingSpaceTarget = void 0;
|
|
948
|
+
}
|
|
949
|
+
recordPointerPress(input) {
|
|
950
|
+
if (input.pointerId === void 0) return;
|
|
951
|
+
this.representedPointerPresses.set(input.pointerId, {
|
|
952
|
+
x: input.x,
|
|
953
|
+
y: input.y,
|
|
954
|
+
timeStamp: input.originalEvent.timeStamp,
|
|
955
|
+
suppressMouse: true,
|
|
956
|
+
suppressTouch: input.pointerType === "touch"
|
|
957
|
+
});
|
|
958
|
+
}
|
|
959
|
+
consumeRepresentedMousePress(input) {
|
|
960
|
+
for (const [pointerId, press] of this.representedPointerPresses) {
|
|
961
|
+
if (!press.suppressMouse || !samePress(press, input)) continue;
|
|
962
|
+
press.suppressMouse = false;
|
|
963
|
+
if (!press.suppressTouch)
|
|
964
|
+
this.representedPointerPresses.delete(pointerId);
|
|
965
|
+
return true;
|
|
966
|
+
}
|
|
967
|
+
if (this.touchMouseCompatibility && samePress(this.touchMouseCompatibility, input)) {
|
|
968
|
+
this.touchMouseCompatibility = void 0;
|
|
969
|
+
return true;
|
|
970
|
+
}
|
|
971
|
+
return false;
|
|
972
|
+
}
|
|
973
|
+
consumeRepresentedTouchPress(input) {
|
|
974
|
+
const identifier = input.touchIdentifier;
|
|
975
|
+
if (identifier === void 0) return false;
|
|
976
|
+
const existing = this.representedTouchContacts.get(identifier);
|
|
977
|
+
if (existing && samePress(existing, input)) return true;
|
|
978
|
+
this.representedTouchContacts.set(identifier, pressRecord(input));
|
|
979
|
+
for (const [pointerId, press] of this.representedPointerPresses) {
|
|
980
|
+
if (!press.suppressTouch || !samePress(press, input)) continue;
|
|
981
|
+
press.suppressTouch = false;
|
|
982
|
+
if (!press.suppressMouse)
|
|
983
|
+
this.representedPointerPresses.delete(pointerId);
|
|
984
|
+
return true;
|
|
985
|
+
}
|
|
986
|
+
return false;
|
|
987
|
+
}
|
|
988
|
+
recordTouchFallback(input) {
|
|
989
|
+
this.touchMouseCompatibility = pressRecord(input);
|
|
990
|
+
}
|
|
991
|
+
recordTouchStarts(input) {
|
|
992
|
+
let primary;
|
|
993
|
+
for (const contact of input.changedContacts) {
|
|
994
|
+
if (this.activeTouchIdentifiers.has(contact.identifier)) continue;
|
|
995
|
+
if (!this.touchSequenceActive) {
|
|
996
|
+
this.touchSequenceActive = true;
|
|
997
|
+
this.primaryTouchIdentifier = contact.identifier;
|
|
998
|
+
}
|
|
999
|
+
if (contact.identifier === this.primaryTouchIdentifier) primary = contact;
|
|
1000
|
+
this.activeTouchIdentifiers.add(contact.identifier);
|
|
1001
|
+
}
|
|
1002
|
+
return primary;
|
|
1003
|
+
}
|
|
1004
|
+
reconcileTouchContacts(input) {
|
|
1005
|
+
const activeIdentifiers = new Set(input.activeIdentifiers);
|
|
1006
|
+
for (const identifier of this.activeTouchIdentifiers) {
|
|
1007
|
+
if (activeIdentifiers.has(identifier)) continue;
|
|
1008
|
+
this.activeTouchIdentifiers.delete(identifier);
|
|
1009
|
+
this.representedTouchContacts.delete(identifier);
|
|
1010
|
+
}
|
|
1011
|
+
const startingIdentifiers = input.type === "touchstart" ? new Set(input.changedContacts.map((contact) => contact.identifier)) : void 0;
|
|
1012
|
+
for (const identifier of activeIdentifiers) {
|
|
1013
|
+
if (!startingIdentifiers?.has(identifier)) {
|
|
1014
|
+
this.activeTouchIdentifiers.add(identifier);
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
if (this.activeTouchIdentifiers.size > 0) {
|
|
1018
|
+
this.touchSequenceActive = true;
|
|
1019
|
+
return;
|
|
1020
|
+
}
|
|
1021
|
+
this.touchSequenceActive = false;
|
|
1022
|
+
this.primaryTouchIdentifier = void 0;
|
|
1023
|
+
this.representedTouchContacts.clear();
|
|
1024
|
+
}
|
|
1025
|
+
recordTouchTerminals(input) {
|
|
1026
|
+
for (const contact of input.changedContacts) {
|
|
1027
|
+
this.activeTouchIdentifiers.delete(contact.identifier);
|
|
1028
|
+
this.representedTouchContacts.delete(contact.identifier);
|
|
1029
|
+
}
|
|
1030
|
+
if (this.activeTouchIdentifiers.size > 0) return;
|
|
1031
|
+
this.touchSequenceActive = false;
|
|
1032
|
+
this.primaryTouchIdentifier = void 0;
|
|
1033
|
+
this.representedTouchContacts.clear();
|
|
1034
|
+
}
|
|
1035
|
+
purgeExpiredPresses(timeStamp) {
|
|
1036
|
+
for (const [pointerId, press] of this.representedPointerPresses) {
|
|
1037
|
+
if (!recentPress(press, timeStamp)) {
|
|
1038
|
+
this.representedPointerPresses.delete(pointerId);
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
for (const [identifier, press] of this.representedTouchContacts) {
|
|
1042
|
+
if (!recentPress(press, timeStamp)) {
|
|
1043
|
+
this.representedTouchContacts.delete(identifier);
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
if (this.touchMouseCompatibility && !recentPress(this.touchMouseCompatibility, timeStamp)) {
|
|
1047
|
+
this.touchMouseCompatibility = void 0;
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
assertLive() {
|
|
1051
|
+
if (this.destroyed) throw new Error("Pibbl focus manager is disposed.");
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
function pressWasPrevented(input) {
|
|
1055
|
+
return input.event?.defaultPrevented ?? input.originalEvent.defaultPrevented;
|
|
1056
|
+
}
|
|
1057
|
+
function pressRecord(input) {
|
|
1058
|
+
return {
|
|
1059
|
+
x: input.x,
|
|
1060
|
+
y: input.y,
|
|
1061
|
+
timeStamp: input.originalEvent.timeStamp
|
|
1062
|
+
};
|
|
1063
|
+
}
|
|
1064
|
+
function samePress(press, input) {
|
|
1065
|
+
return recentPress(press, input.originalEvent.timeStamp) && Math.abs(press.x - input.x) <= 1 && Math.abs(press.y - input.y) <= 1;
|
|
1066
|
+
}
|
|
1067
|
+
function recentPress(press, timeStamp) {
|
|
1068
|
+
const elapsed = timeStamp - press.timeStamp;
|
|
1069
|
+
return elapsed >= 0 && elapsed <= COMPATIBILITY_PRESS_WINDOW_MS;
|
|
1070
|
+
}
|
|
1071
|
+
function createFocusManager(eventRoot, owner) {
|
|
1072
|
+
return new PibblFocusManager(eventRoot, owner);
|
|
1073
|
+
}
|
|
1074
|
+
function requireFocusManager(eventRoot) {
|
|
1075
|
+
const manager = eventRoot.focusPolicy;
|
|
1076
|
+
if (!(manager instanceof PibblFocusManager)) {
|
|
1077
|
+
throw new Error(
|
|
1078
|
+
"KeyboardNavigation requires an active FocusManagement focus manager."
|
|
1079
|
+
);
|
|
1080
|
+
}
|
|
1081
|
+
return manager;
|
|
1082
|
+
}
|
|
1083
|
+
function createDirectionalBoundary(owner) {
|
|
1084
|
+
return new DirectionalBoundary(owner);
|
|
1085
|
+
}
|
|
1086
|
+
function getCoordinator(eventRoot) {
|
|
1087
|
+
let coordinator = coordinators.get(eventRoot);
|
|
1088
|
+
if (!coordinator) {
|
|
1089
|
+
coordinator = new FocusManagerCoordinator(eventRoot);
|
|
1090
|
+
coordinators.set(eventRoot, coordinator);
|
|
1091
|
+
}
|
|
1092
|
+
return coordinator;
|
|
1093
|
+
}
|
|
1094
|
+
function duplicateManagerError() {
|
|
1095
|
+
return new Error(
|
|
1096
|
+
"FocusManagement allows only one focus manager per Pibbl root."
|
|
1097
|
+
);
|
|
1098
|
+
}
|
|
1099
|
+
function asDirectionalBoundary(boundary) {
|
|
1100
|
+
if (!(boundary instanceof DirectionalBoundary)) {
|
|
1101
|
+
throw new Error("Unknown Pibbl directional boundary.");
|
|
1102
|
+
}
|
|
1103
|
+
return boundary;
|
|
1104
|
+
}
|
|
1105
|
+
function isKeyboardFocusable(target) {
|
|
1106
|
+
return target.keyboardFocusable ?? Boolean(
|
|
1107
|
+
target.handlers.click || target.handlers.keydown || target.handlers.keyup
|
|
1108
|
+
);
|
|
1109
|
+
}
|
|
1110
|
+
function collectRetainedTargets(instance, targets) {
|
|
1111
|
+
if (instance.mainTeardowns.closed) return;
|
|
1112
|
+
for (const target of instance.eventRoot.targets) {
|
|
1113
|
+
if (target.live && target.owner.eventRoot === instance.eventRoot && !target.owner.mainTeardowns.closed && isInstanceWithin(target.owner, instance))
|
|
1114
|
+
targets.push(target);
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
function isInstanceWithin(instance, ancestor) {
|
|
1118
|
+
let current = instance;
|
|
1119
|
+
while (current) {
|
|
1120
|
+
if (current === ancestor) return true;
|
|
1121
|
+
current = current.parent ? GLOBAL_STATE.pibblInstances.get(current.parent) : void 0;
|
|
1122
|
+
}
|
|
1123
|
+
return false;
|
|
1124
|
+
}
|
|
1125
|
+
export {
|
|
1126
|
+
PibblFocusManager,
|
|
1127
|
+
createDirectionalBoundary,
|
|
1128
|
+
createFocusManager,
|
|
1129
|
+
requireFocusManager
|
|
1130
|
+
};
|
|
1131
|
+
//# sourceMappingURL=focus-manager.js.map
|