@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,112 @@
|
|
|
1
|
+
import { definePrimitive } from "../define-primitive.js";
|
|
2
|
+
import {
|
|
3
|
+
resolveRegularPolygonGeometry
|
|
4
|
+
} from "../geometry/regular-polygon.js";
|
|
5
|
+
import {
|
|
6
|
+
integerAtLeast
|
|
7
|
+
} from "../geometry/validation.js";
|
|
8
|
+
import {
|
|
9
|
+
resolveLocalOffset,
|
|
10
|
+
stripLayoutParticipation
|
|
11
|
+
} from "../style/resolve-built-in.js";
|
|
12
|
+
import { registerOpaqueStyleProperties } from "../style/resolve-dispatch.js";
|
|
13
|
+
import { renderPath } from "./path.js";
|
|
14
|
+
import { resolveRoundedCornerStyle } from "./rounded-corner-style.js";
|
|
15
|
+
import {
|
|
16
|
+
circularPercentageBasis,
|
|
17
|
+
resolveFiniteShapeNumber,
|
|
18
|
+
resolveNonnegativeShapeLength,
|
|
19
|
+
shapeGeometryErrorFactory
|
|
20
|
+
} from "./shape-style.js";
|
|
21
|
+
function renderRegularPolygon(props, style, ctx) {
|
|
22
|
+
const {
|
|
23
|
+
sides,
|
|
24
|
+
cx,
|
|
25
|
+
cy,
|
|
26
|
+
rotation,
|
|
27
|
+
circumradius,
|
|
28
|
+
inradius,
|
|
29
|
+
sideLength,
|
|
30
|
+
cornerRadius,
|
|
31
|
+
cornerRadii,
|
|
32
|
+
geometryErrorFactory,
|
|
33
|
+
...pathStyle
|
|
34
|
+
} = style;
|
|
35
|
+
const geometry = resolveRegularPolygonGeometry({
|
|
36
|
+
sides,
|
|
37
|
+
cx,
|
|
38
|
+
cy,
|
|
39
|
+
rotation,
|
|
40
|
+
...circumradius === void 0 ? {} : { circumradius },
|
|
41
|
+
...inradius === void 0 ? {} : { inradius },
|
|
42
|
+
...sideLength === void 0 ? {} : { sideLength },
|
|
43
|
+
cornerRadius,
|
|
44
|
+
cornerRadii
|
|
45
|
+
}, geometryErrorFactory);
|
|
46
|
+
return renderPath({
|
|
47
|
+
...props,
|
|
48
|
+
keyboardNavigationBounds: props.keyboardNavigationBounds ?? geometry.bounds
|
|
49
|
+
}, {
|
|
50
|
+
...pathStyle,
|
|
51
|
+
d: geometry.path
|
|
52
|
+
}, ctx);
|
|
53
|
+
}
|
|
54
|
+
const RegularPolygon = definePrimitive(renderRegularPolygon, {
|
|
55
|
+
resolveStyle: (style, context) => {
|
|
56
|
+
const errorFactory = shapeGeometryErrorFactory(context);
|
|
57
|
+
const sides = integerAtLeast(style.sides, 3, "sides", errorFactory);
|
|
58
|
+
const basis = circularPercentageBasis(context);
|
|
59
|
+
return {
|
|
60
|
+
...stripLayoutParticipation(style),
|
|
61
|
+
sides,
|
|
62
|
+
cx: resolveLocalOffset(
|
|
63
|
+
style.cx,
|
|
64
|
+
context.percentageBasis.width,
|
|
65
|
+
"cx",
|
|
66
|
+
context
|
|
67
|
+
),
|
|
68
|
+
cy: resolveLocalOffset(
|
|
69
|
+
style.cy,
|
|
70
|
+
context.percentageBasis.height,
|
|
71
|
+
"cy",
|
|
72
|
+
context
|
|
73
|
+
),
|
|
74
|
+
rotation: resolveFiniteShapeNumber(
|
|
75
|
+
style.rotation ?? -Math.PI / 2,
|
|
76
|
+
"rotation",
|
|
77
|
+
context
|
|
78
|
+
),
|
|
79
|
+
...style.circumradius === void 0 ? {} : {
|
|
80
|
+
circumradius: resolveNonnegativeShapeLength(
|
|
81
|
+
style.circumradius,
|
|
82
|
+
basis,
|
|
83
|
+
"circumradius",
|
|
84
|
+
context
|
|
85
|
+
)
|
|
86
|
+
},
|
|
87
|
+
...style.inradius === void 0 ? {} : {
|
|
88
|
+
inradius: resolveNonnegativeShapeLength(
|
|
89
|
+
style.inradius,
|
|
90
|
+
basis,
|
|
91
|
+
"inradius",
|
|
92
|
+
context
|
|
93
|
+
)
|
|
94
|
+
},
|
|
95
|
+
...style.sideLength === void 0 ? {} : {
|
|
96
|
+
sideLength: resolveNonnegativeShapeLength(
|
|
97
|
+
style.sideLength,
|
|
98
|
+
basis,
|
|
99
|
+
"sideLength",
|
|
100
|
+
context
|
|
101
|
+
)
|
|
102
|
+
},
|
|
103
|
+
...resolveRoundedCornerStyle(sides, style, context),
|
|
104
|
+
geometryErrorFactory: errorFactory
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
registerOpaqueStyleProperties(RegularPolygon, ["fill", "stroke", "cursor"]);
|
|
109
|
+
export {
|
|
110
|
+
RegularPolygon
|
|
111
|
+
};
|
|
112
|
+
//# sourceMappingURL=regular-polygon.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/components/regular-polygon.ts"],
|
|
4
|
+
"sourcesContent": ["import { definePrimitive } from '../define-primitive.js';\nimport type {\n PibblEventFocusOptions,\n PibblEventHandlers,\n PibblEventParticipationOptions,\n} from '../events/types.js';\nimport {\n resolveRegularPolygonGeometry,\n type RegularPolygonPathOptions,\n} from '../geometry/regular-polygon.js';\nimport {\n integerAtLeast,\n type GeometryErrorFactory,\n} from '../geometry/validation.js';\nimport {\n resolveLocalOffset,\n stripLayoutParticipation,\n} from '../style/resolve-built-in.js';\nimport { registerOpaqueStyleProperties } from '../style/resolve-dispatch.js';\nimport type {\n BoxStyle,\n CursorStyle,\n LayoutItemStyle,\n Length,\n PaintStyle,\n RoundedCornerStyle,\n} from '../style/types.js';\nimport type { RenderingContext2D, SystemStyle } from '../types.js';\nimport type { PibblPhysics2DPropExtension } from '../types.js';\nimport { renderPath } from './path.js';\nimport { resolveRoundedCornerStyle } from './rounded-corner-style.js';\nimport {\n circularPercentageBasis,\n resolveFiniteShapeNumber,\n resolveNonnegativeShapeLength,\n shapeGeometryErrorFactory,\n} from './shape-style.js';\n\n/**\n * Authored inputs for RegularPolygon, including the declared data and presentation options.\n *\n * @see {@link PibblEventHandlers}\n * @see {@link PibblEventParticipationOptions}\n * @see {@link PibblPhysics2DPropExtension}\n * @see {@link RegularPolygon}\n */\nexport interface RegularPolygonProps\n extends PibblEventHandlers, PibblEventFocusOptions, PibblEventParticipationOptions, PibblPhysics2DPropExtension {}\n\n/**\n * Center, side count, rotation, and paint shared by regular-polygon size variants.\n *\n * @see {@link RegularPolygonStyle}\n */\ninterface RegularPolygonCommonStyle extends RoundedCornerStyle {\n /** Number of sides of the regular polygon. See {@link RegularPolygonCommonStyle}. */\n sides: number;\n /** Horizontal coordinate of the center. See {@link Length}. */\n cx?: Exclude<Length, 'auto'>;\n /** Vertical coordinate of the center. See {@link Length}. */\n cy?: Exclude<Length, 'auto'>;\n /** Rotation applied to the containing geometry. See {@link RegularPolygonCommonStyle}. */\n rotation?: number;\n /**\n * Width used for line hit testing independently of the visible stroke width. See\n * {@link RegularPolygonCommonStyle}.\n */\n lineInteractionWidth?: number;\n}\n\n/**\n * Exactly one declared size measure for a regular polygon.\n *\n * @see {@link RegularPolygonStyle}\n */\ntype RegularPolygonSizeStyle =\n | {\n /** Distance from the polygon center to a vertex. See {@link Length}. */\n circumradius: Exclude<Length, 'auto'>;\n /**\n * Not accepted in this variant; use the alternative fields instead. See\n * {@link RegularPolygonSizeStyle}.\n */\n inradius?: never;\n /**\n * Not accepted in this variant; use the alternative fields instead. See\n * {@link RegularPolygonSizeStyle}.\n */\n sideLength?: never;\n }\n | {\n /**\n * Not accepted in this variant; use the alternative fields instead. See\n * {@link RegularPolygonSizeStyle}.\n */\n circumradius?: never;\n /** Distance from the polygon center to an edge. See {@link Length}. */\n inradius: Exclude<Length, 'auto'>;\n /**\n * Not accepted in this variant; use the alternative fields instead. See\n * {@link RegularPolygonSizeStyle}.\n */\n sideLength?: never;\n }\n | {\n /**\n * Not accepted in this variant; use the alternative fields instead. See\n * {@link RegularPolygonSizeStyle}.\n */\n circumradius?: never;\n /**\n * Not accepted in this variant; use the alternative fields instead. See\n * {@link RegularPolygonSizeStyle}.\n */\n inradius?: never;\n /** Length of one polygon edge. See {@link Length}. */\n sideLength: Exclude<Length, 'auto'>;\n };\n\n/**\n * Supported geometry and presentation properties for RegularPolygon.\n *\n * @see {@link SystemStyle}\n * @see {@link PaintStyle}\n * @see {@link CursorStyle}\n * @see {@link BoxStyle}\n * @see {@link LayoutItemStyle}\n * @see {@link RegularPolygon}\n */\nexport type RegularPolygonStyle = RegularPolygonCommonStyle &\n RegularPolygonSizeStyle &\n SystemStyle &\n PaintStyle &\n CursorStyle &\n BoxStyle &\n LayoutItemStyle;\n\ninterface ResolvedRegularPolygonStyle\n extends SystemStyle, PaintStyle, CursorStyle {\n sides: number;\n cx: number;\n cy: number;\n rotation: number;\n circumradius?: number;\n inradius?: number;\n sideLength?: number;\n cornerRadius?: number;\n cornerRadii?: readonly (number | null | undefined)[];\n lineInteractionWidth?: number;\n geometryErrorFactory: GeometryErrorFactory;\n}\n\nfunction renderRegularPolygon(\n props: RegularPolygonProps,\n style: Readonly<ResolvedRegularPolygonStyle>,\n ctx: RenderingContext2D,\n) {\n const {\n sides,\n cx,\n cy,\n rotation,\n circumradius,\n inradius,\n sideLength,\n cornerRadius,\n cornerRadii,\n geometryErrorFactory,\n ...pathStyle\n } = style;\n const geometry = resolveRegularPolygonGeometry({\n sides,\n cx,\n cy,\n rotation,\n ...(circumradius === undefined ? {} : { circumradius }),\n ...(inradius === undefined ? {} : { inradius }),\n ...(sideLength === undefined ? {} : { sideLength }),\n cornerRadius,\n cornerRadii,\n } as RegularPolygonPathOptions, geometryErrorFactory);\n\n return renderPath({\n ...props,\n keyboardNavigationBounds: props.keyboardNavigationBounds ?? geometry.bounds,\n }, {\n ...pathStyle,\n d: geometry.path,\n }, ctx);\n}\n\n/**\n * Describes a regular-polygon primitive for JSX or createElement authoring.\n *\n * @param props - Authored component inputs, supplied through JSX or createElement. See the linked\n * props and style types.\n * @throws When called directly; Pibbl mounts this component through JSX or createElement.\n *\n * @see {@link RegularPolygonProps}\n * @see {@link RegularPolygonStyle}\n */\nexport const RegularPolygon = definePrimitive<\n RegularPolygonProps,\n RegularPolygonStyle,\n RegularPolygonStyle,\n ResolvedRegularPolygonStyle\n>(renderRegularPolygon, {\n resolveStyle: (style, context) => {\n const errorFactory = shapeGeometryErrorFactory(context);\n const sides = integerAtLeast(style.sides, 3, 'sides', errorFactory);\n const basis = circularPercentageBasis(context);\n return {\n ...stripLayoutParticipation(style),\n sides,\n cx: resolveLocalOffset(\n style.cx,\n context.percentageBasis.width,\n 'cx',\n context,\n ),\n cy: resolveLocalOffset(\n style.cy,\n context.percentageBasis.height,\n 'cy',\n context,\n ),\n rotation: resolveFiniteShapeNumber(\n style.rotation ?? -Math.PI / 2,\n 'rotation',\n context,\n ),\n ...(style.circumradius === undefined ? {} : {\n circumradius: resolveNonnegativeShapeLength(\n style.circumradius,\n basis,\n 'circumradius',\n context,\n ),\n }),\n ...(style.inradius === undefined ? {} : {\n inradius: resolveNonnegativeShapeLength(\n style.inradius,\n basis,\n 'inradius',\n context,\n ),\n }),\n ...(style.sideLength === undefined ? {} : {\n sideLength: resolveNonnegativeShapeLength(\n style.sideLength,\n basis,\n 'sideLength',\n context,\n ),\n }),\n ...resolveRoundedCornerStyle(sides, style, context),\n geometryErrorFactory: errorFactory,\n } as ResolvedRegularPolygonStyle;\n },\n});\nregisterOpaqueStyleProperties(RegularPolygon, ['fill', 'stroke', 'cursor']);\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,uBAAuB;AAMhC;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,qCAAqC;AAW9C,SAAS,kBAAkB;AAC3B,SAAS,iCAAiC;AAC1C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAoHP,SAAS,qBACP,OACA,OACA,KACA;AACA,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,WAAW,8BAA8B;AAAA,IAC7C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAI,iBAAiB,SAAY,CAAC,IAAI,EAAE,aAAa;AAAA,IACrD,GAAI,aAAa,SAAY,CAAC,IAAI,EAAE,SAAS;AAAA,IAC7C,GAAI,eAAe,SAAY,CAAC,IAAI,EAAE,WAAW;AAAA,IACjD;AAAA,IACA;AAAA,EACF,GAAgC,oBAAoB;AAEpD,SAAO,WAAW;AAAA,IAChB,GAAG;AAAA,IACH,0BAA0B,MAAM,4BAA4B,SAAS;AAAA,EACvE,GAAG;AAAA,IACD,GAAG;AAAA,IACH,GAAG,SAAS;AAAA,EACd,GAAG,GAAG;AACR;AAYO,MAAM,iBAAiB,gBAK5B,sBAAsB;AAAA,EACtB,cAAc,CAAC,OAAO,YAAY;AAChC,UAAM,eAAe,0BAA0B,OAAO;AACtD,UAAM,QAAQ,eAAe,MAAM,OAAO,GAAG,SAAS,YAAY;AAClE,UAAM,QAAQ,wBAAwB,OAAO;AAC7C,WAAO;AAAA,MACL,GAAG,yBAAyB,KAAK;AAAA,MACjC;AAAA,MACA,IAAI;AAAA,QACF,MAAM;AAAA,QACN,QAAQ,gBAAgB;AAAA,QACxB;AAAA,QACA;AAAA,MACF;AAAA,MACA,IAAI;AAAA,QACF,MAAM;AAAA,QACN,QAAQ,gBAAgB;AAAA,QACxB;AAAA,QACA;AAAA,MACF;AAAA,MACA,UAAU;AAAA,QACR,MAAM,YAAY,CAAC,KAAK,KAAK;AAAA,QAC7B;AAAA,QACA;AAAA,MACF;AAAA,MACA,GAAI,MAAM,iBAAiB,SAAY,CAAC,IAAI;AAAA,QAC1C,cAAc;AAAA,UACZ,MAAM;AAAA,UACN;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA,MACA,GAAI,MAAM,aAAa,SAAY,CAAC,IAAI;AAAA,QACtC,UAAU;AAAA,UACR,MAAM;AAAA,UACN;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA,MACA,GAAI,MAAM,eAAe,SAAY,CAAC,IAAI;AAAA,QACxC,YAAY;AAAA,UACV,MAAM;AAAA,UACN;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA,MACA,GAAG,0BAA0B,OAAO,OAAO,OAAO;AAAA,MAClD,sBAAsB;AAAA,IACxB;AAAA,EACF;AACF,CAAC;AACD,8BAA8B,gBAAgB,CAAC,QAAQ,UAAU,QAAQ,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { RoundedCornerStyle } from '../style/types.js';
|
|
2
|
+
import type { StyleResolutionContext } from '../types.js';
|
|
3
|
+
export interface ResolvedRoundedCornerStyle {
|
|
4
|
+
cornerRadius?: number;
|
|
5
|
+
cornerRadii?: readonly (number | null | undefined)[];
|
|
6
|
+
}
|
|
7
|
+
export declare function resolveRoundedCornerStyle(cornerCount: number, style: Readonly<RoundedCornerStyle>, context: Readonly<StyleResolutionContext>): ResolvedRoundedCornerStyle;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { layoutDiagnostic } from "../style/diagnostics.js";
|
|
2
|
+
import { resolveRequiredLength } from "../style/resolve-built-in.js";
|
|
3
|
+
import { circularPercentageBasis } from "./shape-style.js";
|
|
4
|
+
function resolveRoundedCornerStyle(cornerCount, style, context) {
|
|
5
|
+
if (style.cornerRadii && style.cornerRadii.length > cornerCount) {
|
|
6
|
+
throw layoutDiagnostic({
|
|
7
|
+
component: context.component,
|
|
8
|
+
property: "cornerRadii",
|
|
9
|
+
value: style.cornerRadii.length,
|
|
10
|
+
algorithm: context.algorithm,
|
|
11
|
+
constraints: context.constraints,
|
|
12
|
+
reason: `length must not exceed corner count ${cornerCount}`
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
const basis = circularPercentageBasis(context);
|
|
16
|
+
const resolveRadius = (value, property) => {
|
|
17
|
+
const resolved = resolveRequiredLength(value, basis, property, context);
|
|
18
|
+
if (resolved < 0) {
|
|
19
|
+
throw layoutDiagnostic({
|
|
20
|
+
component: context.component,
|
|
21
|
+
property,
|
|
22
|
+
value,
|
|
23
|
+
algorithm: context.algorithm,
|
|
24
|
+
constraints: context.constraints,
|
|
25
|
+
reason: "must resolve to a nonnegative number"
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return resolved;
|
|
29
|
+
};
|
|
30
|
+
return {
|
|
31
|
+
cornerRadius: style.cornerRadius === void 0 ? void 0 : resolveRadius(style.cornerRadius, "cornerRadius"),
|
|
32
|
+
cornerRadii: style.cornerRadii?.map(
|
|
33
|
+
(radius, index) => radius === null || radius === void 0 ? radius : resolveRadius(radius, `cornerRadii[${index}]`)
|
|
34
|
+
)
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
resolveRoundedCornerStyle
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=rounded-corner-style.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/components/rounded-corner-style.ts"],
|
|
4
|
+
"sourcesContent": ["import { layoutDiagnostic } from '../style/diagnostics.js';\nimport { resolveRequiredLength } from '../style/resolve-built-in.js';\nimport type { RoundedCornerStyle } from '../style/types.js';\nimport type { StyleResolutionContext } from '../types.js';\nimport { circularPercentageBasis } from './shape-style.js';\n\nexport interface ResolvedRoundedCornerStyle {\n cornerRadius?: number;\n cornerRadii?: readonly (number | null | undefined)[];\n}\n\nexport function resolveRoundedCornerStyle(\n cornerCount: number,\n style: Readonly<RoundedCornerStyle>,\n context: Readonly<StyleResolutionContext>,\n): ResolvedRoundedCornerStyle {\n if (style.cornerRadii && style.cornerRadii.length > cornerCount) {\n throw layoutDiagnostic({\n component: context.component,\n property: 'cornerRadii',\n value: style.cornerRadii.length,\n algorithm: context.algorithm,\n constraints: context.constraints,\n reason: `length must not exceed corner count ${cornerCount}`,\n });\n }\n\n const basis = circularPercentageBasis(context);\n const resolveRadius = (\n value: NonNullable<RoundedCornerStyle['cornerRadius']>,\n property: string,\n ) => {\n const resolved = resolveRequiredLength(value, basis, property, context);\n if (resolved < 0) {\n throw layoutDiagnostic({\n component: context.component,\n property,\n value,\n algorithm: context.algorithm,\n constraints: context.constraints,\n reason: 'must resolve to a nonnegative number',\n });\n }\n return resolved;\n };\n\n return {\n cornerRadius: style.cornerRadius === undefined ? undefined :\n resolveRadius(style.cornerRadius, 'cornerRadius'),\n cornerRadii: style.cornerRadii?.map((radius, index) =>\n radius === null || radius === undefined ? radius :\n resolveRadius(radius, `cornerRadii[${index}]`),\n ),\n };\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,wBAAwB;AACjC,SAAS,6BAA6B;AAGtC,SAAS,+BAA+B;AAOjC,SAAS,0BACd,aACA,OACA,SAC4B;AAC5B,MAAI,MAAM,eAAe,MAAM,YAAY,SAAS,aAAa;AAC/D,UAAM,iBAAiB;AAAA,MACrB,WAAW,QAAQ;AAAA,MACnB,UAAU;AAAA,MACV,OAAO,MAAM,YAAY;AAAA,MACzB,WAAW,QAAQ;AAAA,MACnB,aAAa,QAAQ;AAAA,MACrB,QAAQ,uCAAuC,WAAW;AAAA,IAC5D,CAAC;AAAA,EACH;AAEA,QAAM,QAAQ,wBAAwB,OAAO;AAC7C,QAAM,gBAAgB,CACpB,OACA,aACG;AACH,UAAM,WAAW,sBAAsB,OAAO,OAAO,UAAU,OAAO;AACtE,QAAI,WAAW,GAAG;AAChB,YAAM,iBAAiB;AAAA,QACrB,WAAW,QAAQ;AAAA,QACnB;AAAA,QACA;AAAA,QACA,WAAW,QAAQ;AAAA,QACnB,aAAa,QAAQ;AAAA,QACrB,QAAQ;AAAA,MACV,CAAC;AAAA,IACH;AACA,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL,cAAc,MAAM,iBAAiB,SAAY,SAC/C,cAAc,MAAM,cAAc,cAAc;AAAA,IAClD,aAAa,MAAM,aAAa;AAAA,MAAI,CAAC,QAAQ,UAC3C,WAAW,QAAQ,WAAW,SAAY,SACxC,cAAc,QAAQ,eAAe,KAAK,GAAG;AAAA,IACjD;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Length } from '../style/types.js';
|
|
2
|
+
import type { StyleResolutionContext } from '../types.js';
|
|
3
|
+
import type { GeometryErrorFactory } from '../geometry/validation.js';
|
|
4
|
+
export declare function resolveNonnegativeShapeLength(value: Exclude<Length, 'auto'>, reference: number, property: string, context: Readonly<StyleResolutionContext>): number;
|
|
5
|
+
export declare function resolveFiniteShapeNumber(value: number, property: string, context: Readonly<StyleResolutionContext>): number;
|
|
6
|
+
export declare function circularPercentageBasis(context: Readonly<StyleResolutionContext>): number;
|
|
7
|
+
export declare function shapeGeometryErrorFactory(context: Readonly<StyleResolutionContext>): GeometryErrorFactory;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { layoutDiagnostic } from "../style/diagnostics.js";
|
|
2
|
+
import { resolveRequiredLength } from "../style/resolve-built-in.js";
|
|
3
|
+
function resolveNonnegativeShapeLength(value, reference, property, context) {
|
|
4
|
+
const resolved = resolveRequiredLength(value, reference, property, context);
|
|
5
|
+
if (resolved < 0) {
|
|
6
|
+
throw layoutDiagnostic({
|
|
7
|
+
component: context.component,
|
|
8
|
+
property,
|
|
9
|
+
value,
|
|
10
|
+
algorithm: context.algorithm,
|
|
11
|
+
constraints: context.constraints,
|
|
12
|
+
reason: "must resolve to a nonnegative number"
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return resolved;
|
|
16
|
+
}
|
|
17
|
+
function resolveFiniteShapeNumber(value, property, context) {
|
|
18
|
+
if (!Number.isFinite(value)) {
|
|
19
|
+
throw layoutDiagnostic({
|
|
20
|
+
component: context.component,
|
|
21
|
+
property,
|
|
22
|
+
value,
|
|
23
|
+
algorithm: context.algorithm,
|
|
24
|
+
constraints: context.constraints,
|
|
25
|
+
reason: "must be a finite number"
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return value;
|
|
29
|
+
}
|
|
30
|
+
function circularPercentageBasis(context) {
|
|
31
|
+
return Math.min(
|
|
32
|
+
context.percentageBasis.width,
|
|
33
|
+
context.percentageBasis.height
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
function shapeGeometryErrorFactory(context) {
|
|
37
|
+
return (property, value, reason) => layoutDiagnostic({
|
|
38
|
+
component: context.component,
|
|
39
|
+
property,
|
|
40
|
+
value,
|
|
41
|
+
algorithm: context.algorithm,
|
|
42
|
+
constraints: context.constraints,
|
|
43
|
+
reason
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
circularPercentageBasis,
|
|
48
|
+
resolveFiniteShapeNumber,
|
|
49
|
+
resolveNonnegativeShapeLength,
|
|
50
|
+
shapeGeometryErrorFactory
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=shape-style.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/components/shape-style.ts"],
|
|
4
|
+
"sourcesContent": ["import { layoutDiagnostic } from '../style/diagnostics.js';\nimport { resolveRequiredLength } from '../style/resolve-built-in.js';\nimport type { Length } from '../style/types.js';\nimport type { StyleResolutionContext } from '../types.js';\nimport type { GeometryErrorFactory } from '../geometry/validation.js';\n\nexport function resolveNonnegativeShapeLength(\n value: Exclude<Length, 'auto'>,\n reference: number,\n property: string,\n context: Readonly<StyleResolutionContext>,\n): number {\n const resolved = resolveRequiredLength(value, reference, property, context);\n if (resolved < 0) {\n throw layoutDiagnostic({\n component: context.component,\n property,\n value,\n algorithm: context.algorithm,\n constraints: context.constraints,\n reason: 'must resolve to a nonnegative number',\n });\n }\n return resolved;\n}\n\nexport function resolveFiniteShapeNumber(\n value: number,\n property: string,\n context: Readonly<StyleResolutionContext>,\n): number {\n if (!Number.isFinite(value)) {\n throw layoutDiagnostic({\n component: context.component,\n property,\n value,\n algorithm: context.algorithm,\n constraints: context.constraints,\n reason: 'must be a finite number',\n });\n }\n return value;\n}\n\nexport function circularPercentageBasis(\n context: Readonly<StyleResolutionContext>,\n): number {\n return Math.min(\n context.percentageBasis.width,\n context.percentageBasis.height,\n );\n}\n\nexport function shapeGeometryErrorFactory(\n context: Readonly<StyleResolutionContext>,\n): GeometryErrorFactory {\n return (property, value, reason) => layoutDiagnostic({\n component: context.component,\n property,\n value,\n algorithm: context.algorithm,\n constraints: context.constraints,\n reason,\n });\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,wBAAwB;AACjC,SAAS,6BAA6B;AAK/B,SAAS,8BACd,OACA,WACA,UACA,SACQ;AACR,QAAM,WAAW,sBAAsB,OAAO,WAAW,UAAU,OAAO;AAC1E,MAAI,WAAW,GAAG;AAChB,UAAM,iBAAiB;AAAA,MACrB,WAAW,QAAQ;AAAA,MACnB;AAAA,MACA;AAAA,MACA,WAAW,QAAQ;AAAA,MACnB,aAAa,QAAQ;AAAA,MACrB,QAAQ;AAAA,IACV,CAAC;AAAA,EACH;AACA,SAAO;AACT;AAEO,SAAS,yBACd,OACA,UACA,SACQ;AACR,MAAI,CAAC,OAAO,SAAS,KAAK,GAAG;AAC3B,UAAM,iBAAiB;AAAA,MACrB,WAAW,QAAQ;AAAA,MACnB;AAAA,MACA;AAAA,MACA,WAAW,QAAQ;AAAA,MACnB,aAAa,QAAQ;AAAA,MACrB,QAAQ;AAAA,IACV,CAAC;AAAA,EACH;AACA,SAAO;AACT;AAEO,SAAS,wBACd,SACQ;AACR,SAAO,KAAK;AAAA,IACV,QAAQ,gBAAgB;AAAA,IACxB,QAAQ,gBAAgB;AAAA,EAC1B;AACF;AAEO,SAAS,0BACd,SACsB;AACtB,SAAO,CAAC,UAAU,OAAO,WAAW,iBAAiB;AAAA,IACnD,WAAW,QAAQ;AAAA,IACnB;AAAA,IACA;AAAA,IACA,WAAW,QAAQ;AAAA,IACnB,aAAa,QAAQ;AAAA,IACrB;AAAA,EACF,CAAC;AACH;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { PibblEventFocusOptions, PibblEventHandlers, PibblEventParticipationOptions } from '../events/types.js';
|
|
2
|
+
import type { BoxStyle, CursorStyle, LayoutItemStyle, Length, PaintStyle, RoundedCornerStyle } from '../style/types.js';
|
|
3
|
+
import type { SystemStyle } from '../types.js';
|
|
4
|
+
import type { PibblPhysics2DPropExtension } from '../types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Authored inputs for Star, including the declared data and presentation options.
|
|
7
|
+
*
|
|
8
|
+
* @see {@link PibblEventHandlers}
|
|
9
|
+
* @see {@link PibblEventParticipationOptions}
|
|
10
|
+
* @see {@link PibblPhysics2DPropExtension}
|
|
11
|
+
* @see {@link Star}
|
|
12
|
+
*/
|
|
13
|
+
export interface StarProps extends PibblEventHandlers, PibblEventFocusOptions, PibblEventParticipationOptions, PibblPhysics2DPropExtension {
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Supported geometry and presentation properties for Star.
|
|
17
|
+
*
|
|
18
|
+
* @see {@link RoundedCornerStyle}
|
|
19
|
+
* @see {@link SystemStyle}
|
|
20
|
+
* @see {@link PaintStyle}
|
|
21
|
+
* @see {@link CursorStyle}
|
|
22
|
+
* @see {@link BoxStyle}
|
|
23
|
+
* @see {@link LayoutItemStyle}
|
|
24
|
+
* @see {@link Length}
|
|
25
|
+
* @see {@link Star}
|
|
26
|
+
*/
|
|
27
|
+
export interface StarStyle extends RoundedCornerStyle, SystemStyle, PaintStyle, CursorStyle, BoxStyle, LayoutItemStyle {
|
|
28
|
+
/** Points defining the geometry or reported by the contact query. See {@link StarStyle}. */
|
|
29
|
+
points: number;
|
|
30
|
+
/** Horizontal coordinate of the center. See {@link Length}. */
|
|
31
|
+
cx?: Exclude<Length, 'auto'>;
|
|
32
|
+
/** Vertical coordinate of the center. See {@link Length}. */
|
|
33
|
+
cy?: Exclude<Length, 'auto'>;
|
|
34
|
+
/** Radius of the outer boundary. See {@link Length}. */
|
|
35
|
+
outerRadius: Exclude<Length, 'auto'>;
|
|
36
|
+
/** Radius of the inner boundary. See {@link Length}. */
|
|
37
|
+
innerRadius: Exclude<Length, 'auto'>;
|
|
38
|
+
/** Rotation applied to the containing geometry. See {@link StarStyle}. */
|
|
39
|
+
rotation?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Width used for line hit testing independently of the visible stroke width. See
|
|
42
|
+
* {@link StarStyle}.
|
|
43
|
+
*/
|
|
44
|
+
lineInteractionWidth?: number;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Describes a star primitive for JSX or createElement authoring.
|
|
48
|
+
*
|
|
49
|
+
* @param props - Authored component inputs, supplied through JSX or createElement. See the linked
|
|
50
|
+
* props and style types.
|
|
51
|
+
* @throws When called directly; Pibbl mounts this component through JSX or createElement.
|
|
52
|
+
*
|
|
53
|
+
* @see {@link StarProps}
|
|
54
|
+
* @see {@link StarStyle}
|
|
55
|
+
*/
|
|
56
|
+
export declare const Star: import("@pibbl/core").PibblPrimitiveComponent<StarProps, import("@pibbl/core").PrimitiveInput<StarProps, StarStyle>>;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { definePrimitive } from "../define-primitive.js";
|
|
2
|
+
import {
|
|
3
|
+
resolveStarGeometry
|
|
4
|
+
} from "../geometry/star.js";
|
|
5
|
+
import {
|
|
6
|
+
integerAtLeast
|
|
7
|
+
} from "../geometry/validation.js";
|
|
8
|
+
import {
|
|
9
|
+
resolveLocalOffset,
|
|
10
|
+
stripLayoutParticipation
|
|
11
|
+
} from "../style/resolve-built-in.js";
|
|
12
|
+
import { registerOpaqueStyleProperties } from "../style/resolve-dispatch.js";
|
|
13
|
+
import { renderPath } from "./path.js";
|
|
14
|
+
import { resolveRoundedCornerStyle } from "./rounded-corner-style.js";
|
|
15
|
+
import {
|
|
16
|
+
circularPercentageBasis,
|
|
17
|
+
resolveFiniteShapeNumber,
|
|
18
|
+
resolveNonnegativeShapeLength,
|
|
19
|
+
shapeGeometryErrorFactory
|
|
20
|
+
} from "./shape-style.js";
|
|
21
|
+
function renderStar(props, style, ctx) {
|
|
22
|
+
const {
|
|
23
|
+
points,
|
|
24
|
+
cx,
|
|
25
|
+
cy,
|
|
26
|
+
outerRadius,
|
|
27
|
+
innerRadius,
|
|
28
|
+
rotation,
|
|
29
|
+
cornerRadius,
|
|
30
|
+
cornerRadii,
|
|
31
|
+
geometryErrorFactory,
|
|
32
|
+
...pathStyle
|
|
33
|
+
} = style;
|
|
34
|
+
const geometry = resolveStarGeometry({
|
|
35
|
+
points,
|
|
36
|
+
cx,
|
|
37
|
+
cy,
|
|
38
|
+
outerRadius,
|
|
39
|
+
innerRadius,
|
|
40
|
+
rotation,
|
|
41
|
+
cornerRadius,
|
|
42
|
+
cornerRadii
|
|
43
|
+
}, geometryErrorFactory);
|
|
44
|
+
return renderPath({
|
|
45
|
+
...props,
|
|
46
|
+
keyboardNavigationBounds: props.keyboardNavigationBounds ?? geometry.bounds
|
|
47
|
+
}, {
|
|
48
|
+
...pathStyle,
|
|
49
|
+
d: geometry.path
|
|
50
|
+
}, ctx);
|
|
51
|
+
}
|
|
52
|
+
const Star = definePrimitive(renderStar, {
|
|
53
|
+
resolveStyle: (style, context) => {
|
|
54
|
+
const errorFactory = shapeGeometryErrorFactory(context);
|
|
55
|
+
const points = integerAtLeast(style.points, 3, "points", errorFactory);
|
|
56
|
+
const basis = circularPercentageBasis(context);
|
|
57
|
+
return {
|
|
58
|
+
...stripLayoutParticipation(style),
|
|
59
|
+
points,
|
|
60
|
+
cx: resolveLocalOffset(
|
|
61
|
+
style.cx,
|
|
62
|
+
context.percentageBasis.width,
|
|
63
|
+
"cx",
|
|
64
|
+
context
|
|
65
|
+
),
|
|
66
|
+
cy: resolveLocalOffset(
|
|
67
|
+
style.cy,
|
|
68
|
+
context.percentageBasis.height,
|
|
69
|
+
"cy",
|
|
70
|
+
context
|
|
71
|
+
),
|
|
72
|
+
outerRadius: resolveNonnegativeShapeLength(
|
|
73
|
+
style.outerRadius,
|
|
74
|
+
basis,
|
|
75
|
+
"outerRadius",
|
|
76
|
+
context
|
|
77
|
+
),
|
|
78
|
+
innerRadius: resolveNonnegativeShapeLength(
|
|
79
|
+
style.innerRadius,
|
|
80
|
+
basis,
|
|
81
|
+
"innerRadius",
|
|
82
|
+
context
|
|
83
|
+
),
|
|
84
|
+
rotation: resolveFiniteShapeNumber(
|
|
85
|
+
style.rotation ?? -Math.PI / 2,
|
|
86
|
+
"rotation",
|
|
87
|
+
context
|
|
88
|
+
),
|
|
89
|
+
...resolveRoundedCornerStyle(points * 2, style, context),
|
|
90
|
+
geometryErrorFactory: errorFactory
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
registerOpaqueStyleProperties(Star, ["fill", "stroke", "cursor"]);
|
|
95
|
+
export {
|
|
96
|
+
Star
|
|
97
|
+
};
|
|
98
|
+
//# sourceMappingURL=star.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/components/star.ts"],
|
|
4
|
+
"sourcesContent": ["import { definePrimitive } from '../define-primitive.js';\nimport type {\n PibblEventFocusOptions,\n PibblEventHandlers,\n PibblEventParticipationOptions,\n} from '../events/types.js';\nimport {\n resolveStarGeometry,\n type StarPathOptions,\n} from '../geometry/star.js';\nimport {\n integerAtLeast,\n type GeometryErrorFactory,\n} from '../geometry/validation.js';\nimport {\n resolveLocalOffset,\n stripLayoutParticipation,\n} from '../style/resolve-built-in.js';\nimport { registerOpaqueStyleProperties } from '../style/resolve-dispatch.js';\nimport type {\n BoxStyle,\n CursorStyle,\n LayoutItemStyle,\n Length,\n PaintStyle,\n RoundedCornerStyle,\n} from '../style/types.js';\nimport type { RenderingContext2D, SystemStyle } from '../types.js';\nimport type { PibblPhysics2DPropExtension } from '../types.js';\nimport { renderPath } from './path.js';\nimport { resolveRoundedCornerStyle } from './rounded-corner-style.js';\nimport {\n circularPercentageBasis,\n resolveFiniteShapeNumber,\n resolveNonnegativeShapeLength,\n shapeGeometryErrorFactory,\n} from './shape-style.js';\n\n/**\n * Authored inputs for Star, including the declared data and presentation options.\n *\n * @see {@link PibblEventHandlers}\n * @see {@link PibblEventParticipationOptions}\n * @see {@link PibblPhysics2DPropExtension}\n * @see {@link Star}\n */\nexport interface StarProps extends PibblEventHandlers, PibblEventFocusOptions, PibblEventParticipationOptions, PibblPhysics2DPropExtension {}\n\n/**\n * Supported geometry and presentation properties for Star.\n *\n * @see {@link RoundedCornerStyle}\n * @see {@link SystemStyle}\n * @see {@link PaintStyle}\n * @see {@link CursorStyle}\n * @see {@link BoxStyle}\n * @see {@link LayoutItemStyle}\n * @see {@link Length}\n * @see {@link Star}\n */\nexport interface StarStyle\n extends\n RoundedCornerStyle,\n SystemStyle,\n PaintStyle,\n CursorStyle,\n BoxStyle,\n LayoutItemStyle {\n /** Points defining the geometry or reported by the contact query. See {@link StarStyle}. */\n points: number;\n /** Horizontal coordinate of the center. See {@link Length}. */\n cx?: Exclude<Length, 'auto'>;\n /** Vertical coordinate of the center. See {@link Length}. */\n cy?: Exclude<Length, 'auto'>;\n /** Radius of the outer boundary. See {@link Length}. */\n outerRadius: Exclude<Length, 'auto'>;\n /** Radius of the inner boundary. See {@link Length}. */\n innerRadius: Exclude<Length, 'auto'>;\n /** Rotation applied to the containing geometry. See {@link StarStyle}. */\n rotation?: number;\n /**\n * Width used for line hit testing independently of the visible stroke width. See\n * {@link StarStyle}.\n */\n lineInteractionWidth?: number;\n}\n\ninterface ResolvedStarStyle extends SystemStyle, PaintStyle, CursorStyle {\n points: number;\n cx: number;\n cy: number;\n outerRadius: number;\n innerRadius: number;\n rotation: number;\n cornerRadius?: number;\n cornerRadii?: readonly (number | null | undefined)[];\n lineInteractionWidth?: number;\n geometryErrorFactory: GeometryErrorFactory;\n}\n\nfunction renderStar(\n props: StarProps,\n style: Readonly<ResolvedStarStyle>,\n ctx: RenderingContext2D,\n) {\n const {\n points,\n cx,\n cy,\n outerRadius,\n innerRadius,\n rotation,\n cornerRadius,\n cornerRadii,\n geometryErrorFactory,\n ...pathStyle\n } = style;\n const geometry = resolveStarGeometry({\n points,\n cx,\n cy,\n outerRadius,\n innerRadius,\n rotation,\n cornerRadius,\n cornerRadii,\n } satisfies StarPathOptions, geometryErrorFactory);\n\n return renderPath({\n ...props,\n keyboardNavigationBounds: props.keyboardNavigationBounds ?? geometry.bounds,\n }, {\n ...pathStyle,\n d: geometry.path,\n }, ctx);\n}\n\n/**\n * Describes a star primitive for JSX or createElement authoring.\n *\n * @param props - Authored component inputs, supplied through JSX or createElement. See the linked\n * props and style types.\n * @throws When called directly; Pibbl mounts this component through JSX or createElement.\n *\n * @see {@link StarProps}\n * @see {@link StarStyle}\n */\nexport const Star = definePrimitive<\n StarProps,\n StarStyle,\n StarStyle,\n ResolvedStarStyle\n>(renderStar, {\n resolveStyle: (style, context) => {\n const errorFactory = shapeGeometryErrorFactory(context);\n const points = integerAtLeast(style.points, 3, 'points', errorFactory);\n const basis = circularPercentageBasis(context);\n return {\n ...stripLayoutParticipation(style),\n points,\n cx: resolveLocalOffset(\n style.cx,\n context.percentageBasis.width,\n 'cx',\n context,\n ),\n cy: resolveLocalOffset(\n style.cy,\n context.percentageBasis.height,\n 'cy',\n context,\n ),\n outerRadius: resolveNonnegativeShapeLength(\n style.outerRadius,\n basis,\n 'outerRadius',\n context,\n ),\n innerRadius: resolveNonnegativeShapeLength(\n style.innerRadius,\n basis,\n 'innerRadius',\n context,\n ),\n rotation: resolveFiniteShapeNumber(\n style.rotation ?? -Math.PI / 2,\n 'rotation',\n context,\n ),\n ...resolveRoundedCornerStyle(points * 2, style, context),\n geometryErrorFactory: errorFactory,\n };\n },\n});\nregisterOpaqueStyleProperties(Star, ['fill', 'stroke', 'cursor']);\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,uBAAuB;AAMhC;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,qCAAqC;AAW9C,SAAS,kBAAkB;AAC3B,SAAS,iCAAiC;AAC1C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAgEP,SAAS,WACP,OACA,OACA,KACA;AACA,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,WAAW,oBAAoB;AAAA,IACnC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,GAA6B,oBAAoB;AAEjD,SAAO,WAAW;AAAA,IAChB,GAAG;AAAA,IACH,0BAA0B,MAAM,4BAA4B,SAAS;AAAA,EACvE,GAAG;AAAA,IACD,GAAG;AAAA,IACH,GAAG,SAAS;AAAA,EACd,GAAG,GAAG;AACR;AAYO,MAAM,OAAO,gBAKlB,YAAY;AAAA,EACZ,cAAc,CAAC,OAAO,YAAY;AAChC,UAAM,eAAe,0BAA0B,OAAO;AACtD,UAAM,SAAS,eAAe,MAAM,QAAQ,GAAG,UAAU,YAAY;AACrE,UAAM,QAAQ,wBAAwB,OAAO;AAC7C,WAAO;AAAA,MACL,GAAG,yBAAyB,KAAK;AAAA,MACjC;AAAA,MACA,IAAI;AAAA,QACF,MAAM;AAAA,QACN,QAAQ,gBAAgB;AAAA,QACxB;AAAA,QACA;AAAA,MACF;AAAA,MACA,IAAI;AAAA,QACF,MAAM;AAAA,QACN,QAAQ,gBAAgB;AAAA,QACxB;AAAA,QACA;AAAA,MACF;AAAA,MACA,aAAa;AAAA,QACX,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACA,aAAa;AAAA,QACX,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACA,UAAU;AAAA,QACR,MAAM,YAAY,CAAC,KAAK,KAAK;AAAA,QAC7B;AAAA,QACA;AAAA,MACF;AAAA,MACA,GAAG,0BAA0B,SAAS,GAAG,OAAO,OAAO;AAAA,MACvD,sBAAsB;AAAA,IACxB;AAAA,EACF;AACF,CAAC;AACD,8BAA8B,MAAM,CAAC,QAAQ,UAAU,QAAQ,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PibblEventHandlers } from '../events/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Event props shared by child-bearing Canvas built-ins.
|
|
4
|
+
*
|
|
5
|
+
* @see {@link PibblEventHandlers}
|
|
6
|
+
*/
|
|
7
|
+
export interface PibblStructuralEventProps extends PibblEventHandlers {
|
|
8
|
+
}
|
|
9
|
+
/** Registers a structural ancestor without creating hit-test geometry. */
|
|
10
|
+
export declare function wireStructuralEvents(handlers: PibblEventHandlers): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/components/structural-events.ts"],
|
|
4
|
+
"sourcesContent": ["import type { PibblEventHandlers } from '../events/types.js';\nimport { useEventListener } from '../hooks/use-event-listener.js';\n\n/**\n * Event props shared by child-bearing Canvas built-ins.\n *\n * @see {@link PibblEventHandlers}\n */\nexport interface PibblStructuralEventProps extends PibblEventHandlers {}\n\n/** Registers a structural ancestor without creating hit-test geometry. */\nexport function wireStructuralEvents(handlers: PibblEventHandlers): void {\n useEventListener(handlers);\n}\n"],
|
|
5
|
+
"mappings": "AACA,SAAS,wBAAwB;AAU1B,SAAS,qBAAqB,UAAoC;AACvE,mBAAiB,QAAQ;AAC3B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { PibblPhysics2DPropExtension } from '../types.js';
|
|
2
|
+
import type { SvgPathStyle } from '../style/types.js';
|
|
3
|
+
import type { PathProps } from './path.js';
|
|
4
|
+
/**
|
|
5
|
+
* Authored inputs for SvgPath, including the declared data and presentation options.
|
|
6
|
+
*
|
|
7
|
+
* @see {@link PathProps}
|
|
8
|
+
* @see {@link PibblPhysics2DPropExtension}
|
|
9
|
+
* @see {@link SvgPath}
|
|
10
|
+
*/
|
|
11
|
+
export interface SvgPathProps extends PathProps, PibblPhysics2DPropExtension {
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Describes an SVG-data path primitive for JSX or createElement authoring.
|
|
15
|
+
*
|
|
16
|
+
* @param props - Authored component inputs, supplied through JSX or createElement. See the linked
|
|
17
|
+
* props and style types.
|
|
18
|
+
* @throws When called directly; Pibbl mounts this component through JSX or createElement.
|
|
19
|
+
*
|
|
20
|
+
* @see {@link SvgPathProps}
|
|
21
|
+
* @see {@link SvgPathStyle}
|
|
22
|
+
*/
|
|
23
|
+
export declare const SvgPath: import("@pibbl/core").PibblPrimitiveComponent<SvgPathProps, import("@pibbl/core").PrimitiveInput<SvgPathProps, SvgPathStyle>>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { definePrimitive } from "../define-primitive.js";
|
|
2
|
+
import { createSvgPath } from "../geometry/svg-path.js";
|
|
3
|
+
import { stripLayoutParticipation } from "../style/resolve-built-in.js";
|
|
4
|
+
import { registerOpaqueStyleProperties } from "../style/resolve-dispatch.js";
|
|
5
|
+
import { renderPath } from "./path.js";
|
|
6
|
+
function renderSvgPath(props, style, ctx) {
|
|
7
|
+
const { d, ...pathStyle } = style;
|
|
8
|
+
const svgPath = createSvgPath({ d });
|
|
9
|
+
return renderPath(
|
|
10
|
+
props,
|
|
11
|
+
{
|
|
12
|
+
...pathStyle,
|
|
13
|
+
d: svgPath
|
|
14
|
+
},
|
|
15
|
+
ctx
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
const SvgPath = definePrimitive(renderSvgPath, {
|
|
19
|
+
resolveStyle: (style) => stripLayoutParticipation(style)
|
|
20
|
+
});
|
|
21
|
+
registerOpaqueStyleProperties(SvgPath, ["d", "fill", "stroke", "cursor"]);
|
|
22
|
+
export {
|
|
23
|
+
SvgPath
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=svg-path.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/components/svg-path.ts"],
|
|
4
|
+
"sourcesContent": ["import { definePrimitive } from '../define-primitive.js';\nimport { createSvgPath } from '../geometry/svg-path.js';\nimport { RenderingContext2D } from '../types.js';\nimport type { PibblPhysics2DPropExtension } from '../types.js';\nimport { stripLayoutParticipation } from '../style/resolve-built-in.js';\nimport { registerOpaqueStyleProperties } from '../style/resolve-dispatch.js';\nimport type { ResolvedSvgPathStyle, SvgPathStyle } from '../style/types.js';\nimport { renderPath } from './path.js';\nimport type { PathProps } from './path.js';\n\n/**\n * Authored inputs for SvgPath, including the declared data and presentation options.\n *\n * @see {@link PathProps}\n * @see {@link PibblPhysics2DPropExtension}\n * @see {@link SvgPath}\n */\nexport interface SvgPathProps extends PathProps, PibblPhysics2DPropExtension {}\n\nfunction renderSvgPath(\n props: SvgPathProps,\n style: Readonly<ResolvedSvgPathStyle>,\n ctx: RenderingContext2D,\n) {\n const { d, ...pathStyle } = style;\n const svgPath = createSvgPath({ d });\n return renderPath(\n props,\n {\n ...pathStyle,\n d: svgPath,\n },\n ctx,\n );\n}\n\n/**\n * Describes an SVG-data path primitive for JSX or createElement authoring.\n *\n * @param props - Authored component inputs, supplied through JSX or createElement. See the linked\n * props and style types.\n * @throws When called directly; Pibbl mounts this component through JSX or createElement.\n *\n * @see {@link SvgPathProps}\n * @see {@link SvgPathStyle}\n */\nexport const SvgPath = definePrimitive<\n SvgPathProps,\n SvgPathStyle,\n SvgPathStyle,\n ResolvedSvgPathStyle\n>(renderSvgPath, {\n resolveStyle: style =>\n stripLayoutParticipation(style) as ResolvedSvgPathStyle,\n});\nregisterOpaqueStyleProperties(SvgPath, ['d', 'fill', 'stroke', 'cursor']);\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,uBAAuB;AAChC,SAAS,qBAAqB;AAG9B,SAAS,gCAAgC;AACzC,SAAS,qCAAqC;AAE9C,SAAS,kBAAkB;AAY3B,SAAS,cACP,OACA,OACA,KACA;AACA,QAAM,EAAE,GAAG,GAAG,UAAU,IAAI;AAC5B,QAAM,UAAU,cAAc,EAAE,EAAE,CAAC;AACnC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA;AAAA,EACF;AACF;AAYO,MAAM,UAAU,gBAKrB,eAAe;AAAA,EACf,cAAc,WACZ,yBAAyB,KAAK;AAClC,CAAC;AACD,8BAA8B,SAAS,CAAC,KAAK,QAAQ,UAAU,QAAQ,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { TextStyle } from '../style/types.js';
|
|
2
|
+
type TextLayoutStyle = Omit<TextStyle, 'x' | 'y' | 'width' | 'height'> & {
|
|
3
|
+
x?: number;
|
|
4
|
+
y?: number;
|
|
5
|
+
width?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
};
|
|
8
|
+
export interface TextBounds {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
}
|
|
14
|
+
export interface TextLayoutLine {
|
|
15
|
+
text: string;
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
bounds: TextBounds;
|
|
19
|
+
squishWidth?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface TextLayout {
|
|
22
|
+
lines: readonly TextLayoutLine[];
|
|
23
|
+
bounds: TextBounds | undefined;
|
|
24
|
+
clipBounds: TextBounds | undefined;
|
|
25
|
+
}
|
|
26
|
+
export type MeasureText = (text: string) => TextMetrics;
|
|
27
|
+
/** Resolves text line breaking and geometry without rendering or runtime state. */
|
|
28
|
+
export declare function resolveTextLayout(measureText: MeasureText, text: string, style: Readonly<TextLayoutStyle>): TextLayout;
|
|
29
|
+
/** Resolves finite clip geometry, with an optional pure height fallback. */
|
|
30
|
+
export declare function resolveTextClipBounds(style: Readonly<TextLayoutStyle>, fallbackHeight?: number): TextBounds | undefined;
|
|
31
|
+
export {};
|