@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,50 @@
|
|
|
1
|
+
import { pointAccessor, pointData } from "./point-data.js";
|
|
2
|
+
function pieSlices(data, { value: input, keyBy }) {
|
|
3
|
+
pointData(data, "pieSlices");
|
|
4
|
+
const accessor = pointAccessor(input);
|
|
5
|
+
const keys = /* @__PURE__ */ new Set();
|
|
6
|
+
let total = 0;
|
|
7
|
+
const rows = data.map((datum, index) => {
|
|
8
|
+
const raw = accessor(datum, index, data);
|
|
9
|
+
const value = raw == null ? 0 : raw;
|
|
10
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < 0)
|
|
11
|
+
throw new RangeError(
|
|
12
|
+
`pieSlices: value at index ${index} must be finite and nonnegative, null, or undefined.`
|
|
13
|
+
);
|
|
14
|
+
total += value;
|
|
15
|
+
const rawKey = keyBy === void 0 ? index : typeof keyBy === "function" ? keyBy(datum, index, data) : datum[keyBy];
|
|
16
|
+
if (typeof rawKey !== "string" && (typeof rawKey !== "number" || !Number.isFinite(rawKey)))
|
|
17
|
+
throw new TypeError(
|
|
18
|
+
`pieSlices: keyBy at index ${index} must return a string or finite number.`
|
|
19
|
+
);
|
|
20
|
+
const key = String(rawKey);
|
|
21
|
+
if (keys.has(key)) throw new Error(`pieSlices: duplicate key "${key}".`);
|
|
22
|
+
keys.add(key);
|
|
23
|
+
return { datum, index, key, value };
|
|
24
|
+
});
|
|
25
|
+
if (!Number.isFinite(total))
|
|
26
|
+
throw new RangeError(
|
|
27
|
+
"pieSlices: value total must be finite; rescale the values."
|
|
28
|
+
);
|
|
29
|
+
const start = -Math.PI / 2;
|
|
30
|
+
let sum = 0;
|
|
31
|
+
let angle = start;
|
|
32
|
+
return Object.freeze(
|
|
33
|
+
rows.map((row) => {
|
|
34
|
+
const startAngle = angle;
|
|
35
|
+
sum += row.value;
|
|
36
|
+
if (total > 0 && row.value > 0)
|
|
37
|
+
angle = start + sum / total * Math.PI * 2;
|
|
38
|
+
return Object.freeze({
|
|
39
|
+
...row,
|
|
40
|
+
fraction: total === 0 ? 0 : row.value / total,
|
|
41
|
+
startAngle,
|
|
42
|
+
endAngle: angle
|
|
43
|
+
});
|
|
44
|
+
})
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
pieSlices
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=pie-slices.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/features/viz/lib/pie-slices.ts"],
|
|
4
|
+
"sourcesContent": ["import type { PieLayoutProps, PieLayoutSlice } from './pie-types.js';\nimport type { LineAccessor } from \"./types.js\";\nimport type { PlotKeyAccessor } from \"./plot-types.js\";\nimport { pointAccessor, pointData } from \"./point-data.js\";\n\n/**\n * Value and stable-key accessors used to derive pie-slice geometry.\n *\n * @see {@link LineAccessor}\n * @see {@link PlotKeyAccessor}\n * @see {@link pieSlices}\n * @see {@link PieLayoutProps}\n */\nexport interface PieOptions<D> {\n /** Value associated with this sample, input, or result. See {@link LineAccessor}. */\n readonly value: LineAccessor<D>;\n /** Property or callback supplying stable identity for each datum. See {@link PlotKeyAccessor}. */\n readonly keyBy?: PlotKeyAccessor<D>;\n}\n\n/**\n * A datum's key, value, fraction, and angular interval in a pie layout.\n *\n * @see {@link pieSlices}\n * @see {@link PieLayoutProps}\n * @see {@link PieLayoutSlice}\n */\nexport interface PieSliceGeometry<D> {\n /** The original data item selected by this result. See {@link PieSliceGeometry}. */\n readonly datum: D;\n /** Index of the selected datum in its source data. See {@link PieSliceGeometry}. */\n readonly index: number;\n /** Stable identity used by the containing protocol. See {@link PieSliceGeometry}. */\n readonly key: string;\n /** Value associated with this sample, input, or result. See {@link PieSliceGeometry}. */\n readonly value: number;\n /** Normalized share or position represented by this value. See {@link PieSliceGeometry}. */\n readonly fraction: number;\n /** Angle at which the arc or slice begins. See {@link PieSliceGeometry}. */\n readonly startAngle: number;\n /** Angle at which the arc or slice ends. See {@link PieSliceGeometry}. */\n readonly endAngle: number;\n}\n\n/**\n * Pure source-ordered full-circle layout. Angles use Canvas radians, clockwise from the top.\n *\n * @param data - Records whose values determine slice proportions.\n * @param options - Value accessor and optional stable key accessor. See {@link PieOptions}.\n * @returns Ordered slice geometry associated with the input records. See {@link PieSliceGeometry}.\n *\n * @see {@link PieOptions}\n * @see {@link PieSliceGeometry}\n */\nexport function pieSlices<D>(\n data: readonly D[],\n { value: input, keyBy }: PieOptions<D>,\n): readonly PieSliceGeometry<D>[] {\n pointData(data, \"pieSlices\");\n const accessor = pointAccessor(input);\n const keys = new Set<string>();\n let total = 0;\n const rows = data.map((datum, index) => {\n const raw = accessor(datum, index, data);\n const value = raw == null ? 0 : raw;\n if (typeof value !== \"number\" || !Number.isFinite(value) || value < 0)\n throw new RangeError(\n `pieSlices: value at index ${index} must be finite and nonnegative, null, or undefined.`,\n );\n total += value;\n const rawKey =\n keyBy === undefined\n ? index\n : typeof keyBy === \"function\"\n ? keyBy(datum, index, data)\n : datum[keyBy];\n if (\n typeof rawKey !== \"string\" &&\n (typeof rawKey !== \"number\" || !Number.isFinite(rawKey))\n )\n throw new TypeError(\n `pieSlices: keyBy at index ${index} must return a string or finite number.`,\n );\n const key = String(rawKey);\n if (keys.has(key)) throw new Error(`pieSlices: duplicate key \"${key}\".`);\n keys.add(key);\n return { datum, index, key, value };\n });\n if (!Number.isFinite(total))\n throw new RangeError(\n \"pieSlices: value total must be finite; rescale the values.\",\n );\n const start = -Math.PI / 2;\n let sum = 0;\n let angle = start;\n return Object.freeze(\n rows.map((row) => {\n const startAngle = angle;\n sum += row.value;\n if (total > 0 && row.value > 0)\n angle = start + (sum / total) * Math.PI * 2;\n return Object.freeze({\n ...row,\n fraction: total === 0 ? 0 : row.value / total,\n startAngle,\n endAngle: angle,\n });\n }),\n );\n}\n"],
|
|
5
|
+
"mappings": "AAGA,SAAS,eAAe,iBAAiB;AAmDlC,SAAS,UACd,MACA,EAAE,OAAO,OAAO,MAAM,GACU;AAChC,YAAU,MAAM,WAAW;AAC3B,QAAM,WAAW,cAAc,KAAK;AACpC,QAAM,OAAO,oBAAI,IAAY;AAC7B,MAAI,QAAQ;AACZ,QAAM,OAAO,KAAK,IAAI,CAAC,OAAO,UAAU;AACtC,UAAM,MAAM,SAAS,OAAO,OAAO,IAAI;AACvC,UAAM,QAAQ,OAAO,OAAO,IAAI;AAChC,QAAI,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,KAAK,QAAQ;AAClE,YAAM,IAAI;AAAA,QACR,6BAA6B,KAAK;AAAA,MACpC;AACF,aAAS;AACT,UAAM,SACJ,UAAU,SACN,QACA,OAAO,UAAU,aACf,MAAM,OAAO,OAAO,IAAI,IACxB,MAAM,KAAK;AACnB,QACE,OAAO,WAAW,aACjB,OAAO,WAAW,YAAY,CAAC,OAAO,SAAS,MAAM;AAEtD,YAAM,IAAI;AAAA,QACR,6BAA6B,KAAK;AAAA,MACpC;AACF,UAAM,MAAM,OAAO,MAAM;AACzB,QAAI,KAAK,IAAI,GAAG,EAAG,OAAM,IAAI,MAAM,6BAA6B,GAAG,IAAI;AACvE,SAAK,IAAI,GAAG;AACZ,WAAO,EAAE,OAAO,OAAO,KAAK,MAAM;AAAA,EACpC,CAAC;AACD,MAAI,CAAC,OAAO,SAAS,KAAK;AACxB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AACF,QAAM,QAAQ,CAAC,KAAK,KAAK;AACzB,MAAI,MAAM;AACV,MAAI,QAAQ;AACZ,SAAO,OAAO;AAAA,IACZ,KAAK,IAAI,CAAC,QAAQ;AAChB,YAAM,aAAa;AACnB,aAAO,IAAI;AACX,UAAI,QAAQ,KAAK,IAAI,QAAQ;AAC3B,gBAAQ,QAAS,MAAM,QAAS,KAAK,KAAK;AAC5C,aAAO,OAAO,OAAO;AAAA,QACnB,GAAG;AAAA,QACH,UAAU,UAAU,IAAI,IAAI,IAAI,QAAQ;AAAA,QACxC;AAAA,QACA,UAAU;AAAA,MACZ,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import type { PieLabel, PieSlice } from "./pie-layout.js";
|
|
2
|
+
import type { PibblNode, PibblEventHandlers, PibblEventParticipationOptions, SignalValue, FillStyle, StrokeStyle, WedgeProps, WedgeStyle } from "@pibbl/core";
|
|
3
|
+
import type { SignalStyle } from "@pibbl/core/internal";
|
|
4
|
+
import type { PieOptions, PieSliceGeometry } from "./pie-slices.js";
|
|
5
|
+
import type { HoverBounds } from "./hover-placement.js";
|
|
6
|
+
/**
|
|
7
|
+
* Places pie labels inside, outside, or automatically according to available space.
|
|
8
|
+
*
|
|
9
|
+
* @see {@link PieLayoutProps}
|
|
10
|
+
*/
|
|
11
|
+
export type PieLabelPlacement = "inside" | "outside" | "auto";
|
|
12
|
+
/**
|
|
13
|
+
* A placed label with text geometry and optional leader, or a hidden label with its reason.
|
|
14
|
+
*
|
|
15
|
+
* @see {@link PieLayoutSlice}
|
|
16
|
+
*/
|
|
17
|
+
export type PieLabelLayout = Readonly<{
|
|
18
|
+
/** The literal "hidden" identifying this variant. See {@link PieLabelLayout}. */
|
|
19
|
+
status: "hidden";
|
|
20
|
+
/** Reason the operation could not produce its ordinary result. See {@link PieLabelLayout}. */
|
|
21
|
+
reason: "empty" | "inside-fit" | "space";
|
|
22
|
+
/** Text displayed by the placed label. See {@link PieLabelLayout}. */
|
|
23
|
+
text: string;
|
|
24
|
+
}> | Readonly<{
|
|
25
|
+
/** The literal "placed" identifying this variant. See {@link PieLabelLayout}. */
|
|
26
|
+
status: "placed";
|
|
27
|
+
/**
|
|
28
|
+
* Preferred placement relative to the anchor or containing geometry. See
|
|
29
|
+
* {@link PieLabelLayout}.
|
|
30
|
+
*/
|
|
31
|
+
placement: "inside" | "outside";
|
|
32
|
+
/** Text displayed by the placed label. See {@link PieLabelLayout}. */
|
|
33
|
+
text: string;
|
|
34
|
+
/** Canvas font string used to draw or measure text. See {@link PieLabelLayout}. */
|
|
35
|
+
font: string;
|
|
36
|
+
/**
|
|
37
|
+
* Horizontal coordinate or displacement in the containing coordinate system. See
|
|
38
|
+
* {@link PieLabelLayout}.
|
|
39
|
+
*/
|
|
40
|
+
x: number;
|
|
41
|
+
/**
|
|
42
|
+
* Vertical coordinate or displacement in the containing coordinate system. See
|
|
43
|
+
* {@link PieLabelLayout}.
|
|
44
|
+
*/
|
|
45
|
+
y: number;
|
|
46
|
+
/**
|
|
47
|
+
* Horizontal extent in the units of the containing geometry or surface. See
|
|
48
|
+
* {@link PieLabelLayout}.
|
|
49
|
+
*/
|
|
50
|
+
width: number;
|
|
51
|
+
/**
|
|
52
|
+
* Vertical extent in the units of the containing geometry or surface. See
|
|
53
|
+
* {@link PieLabelLayout}.
|
|
54
|
+
*/
|
|
55
|
+
height: number;
|
|
56
|
+
/** Horizontal origin used to paint the placed label text. See {@link PieLabelLayout}. */
|
|
57
|
+
textX: number;
|
|
58
|
+
/** Vertical origin used to paint the placed label text. See {@link PieLabelLayout}. */
|
|
59
|
+
textY: number;
|
|
60
|
+
/** Ordered logical points of the label's leader line. See {@link PieLabelLayout}. */
|
|
61
|
+
leader?: readonly (readonly [number, number])[];
|
|
62
|
+
}>;
|
|
63
|
+
/**
|
|
64
|
+
* Pie-slice data extended with center, radii, and optional label placement.
|
|
65
|
+
*
|
|
66
|
+
* @see {@link PieSliceGeometry}
|
|
67
|
+
* @see {@link PieLabelLayout}
|
|
68
|
+
* @see {@link PieLayoutProps}
|
|
69
|
+
* @see {@link PieSliceProps}
|
|
70
|
+
* @see {@link PieLabelProps}
|
|
71
|
+
*/
|
|
72
|
+
export interface PieLayoutSlice<D> extends PieSliceGeometry<D> {
|
|
73
|
+
/** Horizontal coordinate of the center. See {@link PieLayoutSlice}. */
|
|
74
|
+
readonly cx: number;
|
|
75
|
+
/** Vertical coordinate of the center. See {@link PieLayoutSlice}. */
|
|
76
|
+
readonly cy: number;
|
|
77
|
+
/** Radius in the coordinate system of this geometry or effect. See {@link PieLayoutSlice}. */
|
|
78
|
+
readonly radius: number;
|
|
79
|
+
/** Radius of the inner boundary. See {@link PieLayoutSlice}. */
|
|
80
|
+
readonly innerRadius: number;
|
|
81
|
+
/** Resolved label placement, or a reason that the label is hidden. See {@link PieLabelLayout}. */
|
|
82
|
+
readonly label?: PieLabelLayout;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Supported geometry and presentation properties for PieLayout.
|
|
86
|
+
*
|
|
87
|
+
* @see {@link PieLayoutProps}
|
|
88
|
+
*/
|
|
89
|
+
export interface PieLayoutStyle {
|
|
90
|
+
/** Horizontal coordinate of the center. See {@link PieLayoutStyle}. */
|
|
91
|
+
readonly cx?: number;
|
|
92
|
+
/** Vertical coordinate of the center. See {@link PieLayoutStyle}. */
|
|
93
|
+
readonly cy?: number;
|
|
94
|
+
/** Radius in the coordinate system of this geometry or effect. See {@link PieLayoutStyle}. */
|
|
95
|
+
readonly radius?: number;
|
|
96
|
+
/** Radius of the inner boundary. See {@link PieLayoutStyle}. */
|
|
97
|
+
readonly innerRadius?: number;
|
|
98
|
+
/** Canvas font used when measuring pie labels. See {@link PieLayoutStyle}. */
|
|
99
|
+
readonly labelFont?: string;
|
|
100
|
+
/** Clearance between pie geometry and its labels. See {@link PieLayoutStyle}. */
|
|
101
|
+
readonly labelGap?: number;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Authored inputs for PieLayout, including the declared data and presentation options.
|
|
105
|
+
*
|
|
106
|
+
* @see {@link PieOptions}
|
|
107
|
+
* @see {@link SignalValue}
|
|
108
|
+
* @see {@link PieSliceGeometry}
|
|
109
|
+
* @see {@link PieLabelPlacement}
|
|
110
|
+
* @see {@link HoverBounds}
|
|
111
|
+
* @see {@link SignalStyle}
|
|
112
|
+
* @see {@link PieLayoutStyle}
|
|
113
|
+
* @see {@link PieLayoutSlice}
|
|
114
|
+
* @see {@link PibblNode}
|
|
115
|
+
*/
|
|
116
|
+
export interface PieLayoutProps<D> extends PieOptions<D> {
|
|
117
|
+
/**
|
|
118
|
+
* Application data supplied to the component or reported by the event. See {@link SignalValue}.
|
|
119
|
+
*/
|
|
120
|
+
readonly data: SignalValue<readonly D[]>;
|
|
121
|
+
/** Opts into cached geometry for mutable inputs; advance after nonreactive changes. */
|
|
122
|
+
readonly revision?: SignalValue<number>;
|
|
123
|
+
/**
|
|
124
|
+
* Formats the text associated with a pie slice. See {@link PieSliceGeometry}.
|
|
125
|
+
* @param slice - Slice whose label text is needed. See {@link PieSliceGeometry}.
|
|
126
|
+
* @returns Label text for the slice.
|
|
127
|
+
*/
|
|
128
|
+
readonly label?: (slice: PieSliceGeometry<D>) => string;
|
|
129
|
+
/**
|
|
130
|
+
* Preferred placement relative to the anchor or containing geometry. See {@link SignalValue},
|
|
131
|
+
* {@link PieLabelPlacement}.
|
|
132
|
+
*/
|
|
133
|
+
readonly placement?: SignalValue<PieLabelPlacement>;
|
|
134
|
+
/**
|
|
135
|
+
* Logical region constraining the content or query. See {@link SignalValue},
|
|
136
|
+
* {@link HoverBounds}.
|
|
137
|
+
*/
|
|
138
|
+
readonly bounds?: SignalValue<HoverBounds>;
|
|
139
|
+
/**
|
|
140
|
+
* Declared presentation and layout properties. See {@link SignalValue}, {@link SignalStyle},
|
|
141
|
+
* {@link PieLayoutStyle}.
|
|
142
|
+
*/
|
|
143
|
+
readonly style?: SignalValue<SignalStyle<PieLayoutStyle>>;
|
|
144
|
+
/**
|
|
145
|
+
* Descendant content or the callback that supplies it. See {@link PieLayoutSlice},
|
|
146
|
+
* {@link PibblNode}.
|
|
147
|
+
* @param slice - Slice geometry and layout metadata. See {@link PieLayoutSlice}.
|
|
148
|
+
* @returns Pibbl content representing the slice. See {@link PibblNode}.
|
|
149
|
+
*/
|
|
150
|
+
readonly children: (slice: PieLayoutSlice<D>) => PibblNode;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Supported geometry and presentation properties for PieSlice.
|
|
154
|
+
*
|
|
155
|
+
* @see {@link WedgeStyle}
|
|
156
|
+
* @see {@link PieSliceProps}
|
|
157
|
+
*/
|
|
158
|
+
export type PieSliceStyle = Omit<WedgeStyle, "cx" | "cy" | "radius" | "startAngle" | "endAngle" | "counterclockwise">;
|
|
159
|
+
/**
|
|
160
|
+
* Authored inputs for PieSlice, including the declared data and presentation options.
|
|
161
|
+
*
|
|
162
|
+
* @see {@link WedgeProps}
|
|
163
|
+
* @see {@link PieLayoutSlice}
|
|
164
|
+
* @see {@link SignalValue}
|
|
165
|
+
* @see {@link SignalStyle}
|
|
166
|
+
* @see {@link PieSliceStyle}
|
|
167
|
+
* @see {@link PibblNode}
|
|
168
|
+
* @see {@link PieSlice}
|
|
169
|
+
*/
|
|
170
|
+
export interface PieSliceProps<D> extends WedgeProps {
|
|
171
|
+
/** Resolved pie geometry and label placement to present. See {@link PieLayoutSlice}. */
|
|
172
|
+
readonly slice: PieLayoutSlice<D>;
|
|
173
|
+
/**
|
|
174
|
+
* Declared presentation and layout properties. See {@link SignalValue}, {@link SignalStyle},
|
|
175
|
+
* {@link PieSliceStyle}.
|
|
176
|
+
*/
|
|
177
|
+
readonly style?: SignalValue<SignalStyle<PieSliceStyle>>;
|
|
178
|
+
/** Descendant content or the callback that supplies it. See {@link PibblNode}. */
|
|
179
|
+
readonly children?: PibblNode;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Supported geometry and presentation properties for PieLabel.
|
|
183
|
+
*
|
|
184
|
+
* @see {@link FillStyle}
|
|
185
|
+
* @see {@link StrokeStyle}
|
|
186
|
+
* @see {@link PieLabelProps}
|
|
187
|
+
*/
|
|
188
|
+
export interface PieLabelStyle {
|
|
189
|
+
/** Paint used for the interior. See {@link FillStyle}. */
|
|
190
|
+
readonly fill?: FillStyle;
|
|
191
|
+
/** Paint used for a pie label's leader line. See {@link StrokeStyle}. */
|
|
192
|
+
readonly leaderStroke?: StrokeStyle;
|
|
193
|
+
/** Stroke width of a pie label's leader line. See {@link PieLabelStyle}. */
|
|
194
|
+
readonly leaderWidth?: number;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Authored inputs for PieLabel, including the declared data and presentation options.
|
|
198
|
+
*
|
|
199
|
+
* @see {@link PibblEventHandlers}
|
|
200
|
+
* @see {@link PibblEventParticipationOptions}
|
|
201
|
+
* @see {@link PieLayoutSlice}
|
|
202
|
+
* @see {@link SignalValue}
|
|
203
|
+
* @see {@link SignalStyle}
|
|
204
|
+
* @see {@link PieLabelStyle}
|
|
205
|
+
* @see {@link PieLabel}
|
|
206
|
+
*/
|
|
207
|
+
export interface PieLabelProps<D> extends PibblEventHandlers, PibblEventParticipationOptions {
|
|
208
|
+
/** Resolved pie geometry and label placement to present. See {@link PieLayoutSlice}. */
|
|
209
|
+
readonly slice: PieLayoutSlice<D>;
|
|
210
|
+
/**
|
|
211
|
+
* Declared presentation and layout properties. See {@link SignalValue}, {@link SignalStyle},
|
|
212
|
+
* {@link PieLabelStyle}.
|
|
213
|
+
*/
|
|
214
|
+
readonly style?: SignalValue<SignalStyle<PieLabelStyle>>;
|
|
215
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PibblNode } from "@pibbl/core";
|
|
2
|
+
import type { PlotSeriesProps } from "./plot-types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Places keyed custom Pibbl subtrees at local data coordinates.
|
|
5
|
+
*
|
|
6
|
+
* @param props - Data, coordinate accessors, scales, keys, and per-datum renderer. See
|
|
7
|
+
* {@link PlotSeriesProps} .
|
|
8
|
+
* @returns Pibbl nodes placing each rendered datum at its mapped coordinates. See {@link PibblNode}.
|
|
9
|
+
*
|
|
10
|
+
* @see {@link PlotSeriesProps}
|
|
11
|
+
* @see {@link PibblNode}
|
|
12
|
+
*/
|
|
13
|
+
export declare function PlotSeries<D>({ data: input, x: xInput, y: yInput, xScale: xId, yScale: yId, defined, keyBy, render, ...events }: PlotSeriesProps<D>): PibblNode;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx } from "@pibbl/core/jsx-runtime";
|
|
2
|
+
import { Group, resolveSignalValue } from "@pibbl/core";
|
|
3
|
+
import { pointAccessor, pointData, finiteCoordinate } from "./point-data.js";
|
|
4
|
+
import { useScale } from "./use-scale.js";
|
|
5
|
+
function PlotRow({
|
|
6
|
+
datum,
|
|
7
|
+
index,
|
|
8
|
+
data,
|
|
9
|
+
render
|
|
10
|
+
}) {
|
|
11
|
+
return render(datum, index, data);
|
|
12
|
+
}
|
|
13
|
+
function PlotSeries({
|
|
14
|
+
data: input,
|
|
15
|
+
x: xInput,
|
|
16
|
+
y: yInput,
|
|
17
|
+
xScale: xId,
|
|
18
|
+
yScale: yId,
|
|
19
|
+
defined,
|
|
20
|
+
keyBy,
|
|
21
|
+
render,
|
|
22
|
+
...events
|
|
23
|
+
}) {
|
|
24
|
+
const xs = useScale(xId).get(), ys = useScale(yId).get();
|
|
25
|
+
const data = pointData(resolveSignalValue(input), "PlotSeries");
|
|
26
|
+
if (typeof render !== "function")
|
|
27
|
+
throw new TypeError("PlotSeries: render must be a synchronous function.");
|
|
28
|
+
const x = pointAccessor(xInput), y = pointAccessor(yInput);
|
|
29
|
+
const keys = /* @__PURE__ */ new Set();
|
|
30
|
+
const nodes = [];
|
|
31
|
+
for (let i = 0; i < data.length; i++) {
|
|
32
|
+
const datum = data[i];
|
|
33
|
+
if (defined && !defined(datum, i, data)) continue;
|
|
34
|
+
const xv = x(datum, i, data), yv = y(datum, i, data);
|
|
35
|
+
if (!finiteCoordinate(xv) || !finiteCoordinate(yv)) continue;
|
|
36
|
+
const px = xs.map(xv), py = ys.map(yv);
|
|
37
|
+
const key = keyBy === void 0 ? i : typeof keyBy === "function" ? keyBy(datum, i, data) : datum[keyBy];
|
|
38
|
+
if (typeof key !== "string" && typeof key !== "number")
|
|
39
|
+
throw new TypeError("PlotSeries: keyBy must return a string or number.");
|
|
40
|
+
const normalized = String(key);
|
|
41
|
+
if (keys.has(normalized))
|
|
42
|
+
throw new Error(`PlotSeries: duplicate key "${normalized}".`);
|
|
43
|
+
keys.add(normalized);
|
|
44
|
+
nodes.push(
|
|
45
|
+
/* @__PURE__ */ jsx(Group, { style: { translateX: px, translateY: py }, children: /* @__PURE__ */ jsx(PlotRow, { datum, index: i, data, render }) }, normalized)
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
return /* @__PURE__ */ jsx(Group, { ...events, children: nodes });
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
PlotSeries
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=plot-series.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/features/viz/lib/plot-series.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Group, resolveSignalValue } from \"@pibbl/core\";\nimport type { PibblNode } from \"@pibbl/core\";\nimport type { PlotSeriesProps } from \"./plot-types.js\";\nimport { pointAccessor, pointData, finiteCoordinate } from \"./point-data.js\";\nimport { useScale } from \"./use-scale.js\";\nfunction PlotRow<D>({\n datum,\n index,\n data,\n render,\n}: {\n datum: D;\n index: number;\n data: readonly D[];\n render: PlotSeriesProps<D>[\"render\"];\n}): PibblNode {\n return render(datum, index, data);\n}\n/**\n * Places keyed custom Pibbl subtrees at local data coordinates.\n *\n * @param props - Data, coordinate accessors, scales, keys, and per-datum renderer. See\n * {@link PlotSeriesProps} .\n * @returns Pibbl nodes placing each rendered datum at its mapped coordinates. See {@link PibblNode}.\n *\n * @see {@link PlotSeriesProps}\n * @see {@link PibblNode}\n */\nexport function PlotSeries<D>({\n data: input,\n x: xInput,\n y: yInput,\n xScale: xId,\n yScale: yId,\n defined,\n keyBy,\n render,\n ...events\n}: PlotSeriesProps<D>): PibblNode {\n const xs = useScale(xId).get(),\n ys = useScale(yId).get();\n const data = pointData(resolveSignalValue(input), \"PlotSeries\");\n if (typeof render !== \"function\")\n throw new TypeError(\"PlotSeries: render must be a synchronous function.\");\n const x = pointAccessor(xInput),\n y = pointAccessor(yInput);\n const keys = new Set<string>();\n const nodes: PibblNode[] = [];\n for (let i = 0; i < data.length; i++) {\n const datum = data[i];\n if (defined && !defined(datum, i, data)) continue;\n const xv = x(datum, i, data),\n yv = y(datum, i, data);\n if (!finiteCoordinate(xv) || !finiteCoordinate(yv)) continue;\n const px = xs.map(xv),\n py = ys.map(yv);\n const key =\n keyBy === undefined\n ? i\n : typeof keyBy === \"function\"\n ? keyBy(datum, i, data)\n : datum[keyBy];\n if (typeof key !== \"string\" && typeof key !== \"number\")\n throw new TypeError(\"PlotSeries: keyBy must return a string or number.\");\n const normalized = String(key);\n if (keys.has(normalized))\n throw new Error(`PlotSeries: duplicate key \"${normalized}\".`);\n keys.add(normalized);\n nodes.push(\n <Group key={normalized} style={{ translateX: px, translateY: py }}>\n <PlotRow datum={datum} index={i} data={data} render={render} />\n </Group>,\n );\n }\n return <Group {...events}>{nodes}</Group>;\n}\n"],
|
|
5
|
+
"mappings": "AAsEQ;AAtER,SAAS,OAAO,0BAA0B;AAG1C,SAAS,eAAe,WAAW,wBAAwB;AAC3D,SAAS,gBAAgB;AACzB,SAAS,QAAW;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAKc;AACZ,SAAO,OAAO,OAAO,OAAO,IAAI;AAClC;AAWO,SAAS,WAAc;AAAA,EAC5B,MAAM;AAAA,EACN,GAAG;AAAA,EACH,GAAG;AAAA,EACH,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAkC;AAChC,QAAM,KAAK,SAAS,GAAG,EAAE,IAAI,GAC3B,KAAK,SAAS,GAAG,EAAE,IAAI;AACzB,QAAM,OAAO,UAAU,mBAAmB,KAAK,GAAG,YAAY;AAC9D,MAAI,OAAO,WAAW;AACpB,UAAM,IAAI,UAAU,oDAAoD;AAC1E,QAAM,IAAI,cAAc,MAAM,GAC5B,IAAI,cAAc,MAAM;AAC1B,QAAM,OAAO,oBAAI,IAAY;AAC7B,QAAM,QAAqB,CAAC;AAC5B,WAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,UAAM,QAAQ,KAAK,CAAC;AACpB,QAAI,WAAW,CAAC,QAAQ,OAAO,GAAG,IAAI,EAAG;AACzC,UAAM,KAAK,EAAE,OAAO,GAAG,IAAI,GACzB,KAAK,EAAE,OAAO,GAAG,IAAI;AACvB,QAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,EAAE,EAAG;AACpD,UAAM,KAAK,GAAG,IAAI,EAAE,GAClB,KAAK,GAAG,IAAI,EAAE;AAChB,UAAM,MACJ,UAAU,SACN,IACA,OAAO,UAAU,aACf,MAAM,OAAO,GAAG,IAAI,IACpB,MAAM,KAAK;AACnB,QAAI,OAAO,QAAQ,YAAY,OAAO,QAAQ;AAC5C,YAAM,IAAI,UAAU,mDAAmD;AACzE,UAAM,aAAa,OAAO,GAAG;AAC7B,QAAI,KAAK,IAAI,UAAU;AACrB,YAAM,IAAI,MAAM,8BAA8B,UAAU,IAAI;AAC9D,SAAK,IAAI,UAAU;AACnB,UAAM;AAAA,MACJ,oBAAC,SAAuB,OAAO,EAAE,YAAY,IAAI,YAAY,GAAG,GAC9D,8BAAC,WAAQ,OAAc,OAAO,GAAG,MAAY,QAAgB,KADnD,UAEZ;AAAA,IACF;AAAA,EACF;AACA,SAAO,oBAAC,SAAO,GAAG,QAAS,iBAAM;AACnC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { PlotSeries } from "./plot-series.js";
|
|
2
|
+
import type { PieOptions } from "./pie-slices.js";
|
|
3
|
+
import type { PibblEventHandlers, PibblNode, SignalValue } from "@pibbl/core";
|
|
4
|
+
import type { PointAccessor } from "./point-types.js";
|
|
5
|
+
import type { ScaleId } from "./types.js";
|
|
6
|
+
/**
|
|
7
|
+
* A property or callback that provides stable identity for a plotted datum.
|
|
8
|
+
*
|
|
9
|
+
* @param datum - Datum requiring an identity.
|
|
10
|
+
* @param index - Zero-based index in the source data.
|
|
11
|
+
* @param data - Complete source data array.
|
|
12
|
+
* @returns A stable string or numeric key for the datum.
|
|
13
|
+
*
|
|
14
|
+
* @see {@link PlotSeriesProps}
|
|
15
|
+
* @see {@link PieOptions}
|
|
16
|
+
*/
|
|
17
|
+
export type PlotKeyAccessor<D> = {
|
|
18
|
+
[K in keyof D]-?: D[K] extends string | number ? K : never;
|
|
19
|
+
}[keyof D] | ((datum: D, index: number, data: readonly D[]) => string | number);
|
|
20
|
+
/**
|
|
21
|
+
* Authored inputs for PlotSeries, including the declared data and presentation options.
|
|
22
|
+
*
|
|
23
|
+
* @see {@link PibblEventHandlers}
|
|
24
|
+
* @see {@link SignalValue}
|
|
25
|
+
* @see {@link PointAccessor}
|
|
26
|
+
* @see {@link ScaleId}
|
|
27
|
+
* @see {@link PlotKeyAccessor}
|
|
28
|
+
* @see {@link PibblNode}
|
|
29
|
+
* @see {@link PlotSeries}
|
|
30
|
+
*/
|
|
31
|
+
export interface PlotSeriesProps<D> extends PibblEventHandlers {
|
|
32
|
+
/**
|
|
33
|
+
* Application data supplied to the component or reported by the event. See {@link SignalValue}.
|
|
34
|
+
*/
|
|
35
|
+
readonly data: SignalValue<readonly D[]>;
|
|
36
|
+
/** Property key or callback extracting the horizontal domain coordinate. See {@link PointAccessor}. */
|
|
37
|
+
readonly x: PointAccessor<D>;
|
|
38
|
+
/** Property key or callback extracting the vertical domain coordinate. See {@link PointAccessor}. */
|
|
39
|
+
readonly y: PointAccessor<D>;
|
|
40
|
+
/** The scale used to map horizontal data coordinates. See {@link ScaleId}. */
|
|
41
|
+
readonly xScale: ScaleId;
|
|
42
|
+
/** The scale used to map vertical data coordinates. See {@link ScaleId}. */
|
|
43
|
+
readonly yScale: ScaleId;
|
|
44
|
+
/**
|
|
45
|
+
* Returns whether a datum contributes drawable or queryable coordinates. See
|
|
46
|
+
* {@link PlotSeriesProps}.
|
|
47
|
+
* @param datum - Datum to test.
|
|
48
|
+
* @param index - Zero-based index in the source data.
|
|
49
|
+
* @param data - Complete source data array.
|
|
50
|
+
* @returns Whether this datum should participate in the series or query.
|
|
51
|
+
*/
|
|
52
|
+
readonly defined?: (datum: D, index: number, data: readonly D[]) => boolean;
|
|
53
|
+
/** Property or callback supplying stable identity for each datum. See {@link PlotKeyAccessor}. */
|
|
54
|
+
readonly keyBy?: PlotKeyAccessor<D>;
|
|
55
|
+
/**
|
|
56
|
+
* Renders the current data or resources using the supplied context. See {@link PibblNode}.
|
|
57
|
+
* @param datum - Datum to render.
|
|
58
|
+
* @param index - Zero-based index in the source data.
|
|
59
|
+
* @param data - Complete source data array.
|
|
60
|
+
* @returns Pibbl content to place at the datum's mapped coordinates. See {@link PibblNode}.
|
|
61
|
+
*/
|
|
62
|
+
readonly render: (datum: D, index: number, data: readonly D[]) => PibblNode;
|
|
63
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PointAccessor } from "./point-types.js";
|
|
2
|
+
import type { LineCoordinate } from "./types.js";
|
|
3
|
+
export declare function pointAccessor<D>(input: PointAccessor<D>): (datum: D, index: number, data: readonly D[]) => LineCoordinate;
|
|
4
|
+
export declare function finiteCoordinate(value: unknown): value is number;
|
|
5
|
+
export declare function pointData<D>(data: readonly D[], receiver: string): readonly D[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function pointAccessor(input) {
|
|
2
|
+
return typeof input === "function" ? input : (datum) => datum[input];
|
|
3
|
+
}
|
|
4
|
+
function finiteCoordinate(value) {
|
|
5
|
+
return typeof value === "number" && Number.isFinite(value);
|
|
6
|
+
}
|
|
7
|
+
function pointData(data, receiver) {
|
|
8
|
+
if (!Array.isArray(data))
|
|
9
|
+
throw new TypeError(`${receiver}: data must be an array.`);
|
|
10
|
+
return data;
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
finiteCoordinate,
|
|
14
|
+
pointAccessor,
|
|
15
|
+
pointData
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=point-data.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/features/viz/lib/point-data.ts"],
|
|
4
|
+
"sourcesContent": ["import type { PointAccessor } from \"./point-types.js\";\nimport type { LineCoordinate } from \"./types.js\";\nexport function pointAccessor<D>(\n input: PointAccessor<D>,\n): (datum: D, index: number, data: readonly D[]) => LineCoordinate {\n return typeof input === \"function\"\n ? input\n : (datum) => datum[input] as LineCoordinate;\n}\nexport function finiteCoordinate(value: unknown): value is number {\n return typeof value === \"number\" && Number.isFinite(value);\n}\nexport function pointData<D>(\n data: readonly D[],\n receiver: string,\n): readonly D[] {\n if (!Array.isArray(data))\n throw new TypeError(`${receiver}: data must be an array.`);\n return data;\n}\n"],
|
|
5
|
+
"mappings": "AAEO,SAAS,cACd,OACiE;AACjE,SAAO,OAAO,UAAU,aACpB,QACA,CAAC,UAAU,MAAM,KAAK;AAC5B;AACO,SAAS,iBAAiB,OAAiC;AAChE,SAAO,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK;AAC3D;AACO,SAAS,UACd,MACA,UACc;AACd,MAAI,CAAC,MAAM,QAAQ,IAAI;AACrB,UAAM,IAAI,UAAU,GAAG,QAAQ,0BAA0B;AAC3D,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
function circle(path, x, y, radius, reverse = false) {
|
|
2
|
+
path.moveTo(x + radius, y);
|
|
3
|
+
path.arc(x, y, radius, 0, Math.PI * 2, reverse);
|
|
4
|
+
path.closePath();
|
|
5
|
+
}
|
|
6
|
+
function pointPath(x, y, radius) {
|
|
7
|
+
const path = new Path2D();
|
|
8
|
+
circle(path, x, y, radius);
|
|
9
|
+
return path;
|
|
10
|
+
}
|
|
11
|
+
function appendPointTarget(path, x, y, radius, fill, strokeWidth) {
|
|
12
|
+
if (radius === 0 || !fill && strokeWidth === 0) return;
|
|
13
|
+
const outer = radius + strokeWidth / 2;
|
|
14
|
+
if (!Number.isFinite(outer) || !Number.isFinite(x + outer) || !Number.isFinite(y + outer))
|
|
15
|
+
throw new RangeError("PointSeries: circle geometry overflow.");
|
|
16
|
+
circle(path, x, y, outer);
|
|
17
|
+
const inner = radius - strokeWidth / 2;
|
|
18
|
+
if (!fill && inner > 0) circle(path, x, y, inner, true);
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
appendPointTarget,
|
|
22
|
+
pointPath
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=point-geometry.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/features/viz/lib/point-geometry.ts"],
|
|
4
|
+
"sourcesContent": ["/** Separate contours avoid line segments between circles; opposite inner winding makes rings. */\nfunction circle(\n path: Path2D,\n x: number,\n y: number,\n radius: number,\n reverse = false,\n) {\n path.moveTo(x + radius, y);\n path.arc(x, y, radius, 0, Math.PI * 2, reverse);\n path.closePath();\n}\nexport function pointPath(x: number, y: number, radius: number): Path2D {\n const path = new Path2D();\n circle(path, x, y, radius);\n return path;\n}\nexport function appendPointTarget(\n path: Path2D,\n x: number,\n y: number,\n radius: number,\n fill: boolean,\n strokeWidth: number,\n): void {\n if (radius === 0 || (!fill && strokeWidth === 0)) return;\n const outer = radius + strokeWidth / 2;\n if (\n !Number.isFinite(outer) ||\n !Number.isFinite(x + outer) ||\n !Number.isFinite(y + outer)\n )\n throw new RangeError(\"PointSeries: circle geometry overflow.\");\n circle(path, x, y, outer);\n const inner = radius - strokeWidth / 2;\n if (!fill && inner > 0) circle(path, x, y, inner, true);\n}\n"],
|
|
5
|
+
"mappings": "AACA,SAAS,OACP,MACA,GACA,GACA,QACA,UAAU,OACV;AACA,OAAK,OAAO,IAAI,QAAQ,CAAC;AACzB,OAAK,IAAI,GAAG,GAAG,QAAQ,GAAG,KAAK,KAAK,GAAG,OAAO;AAC9C,OAAK,UAAU;AACjB;AACO,SAAS,UAAU,GAAW,GAAW,QAAwB;AACtE,QAAM,OAAO,IAAI,OAAO;AACxB,SAAO,MAAM,GAAG,GAAG,MAAM;AACzB,SAAO;AACT;AACO,SAAS,kBACd,MACA,GACA,GACA,QACA,MACA,aACM;AACN,MAAI,WAAW,KAAM,CAAC,QAAQ,gBAAgB,EAAI;AAClD,QAAM,QAAQ,SAAS,cAAc;AACrC,MACE,CAAC,OAAO,SAAS,KAAK,KACtB,CAAC,OAAO,SAAS,IAAI,KAAK,KAC1B,CAAC,OAAO,SAAS,IAAI,KAAK;AAE1B,UAAM,IAAI,WAAW,wCAAwC;AAC/D,SAAO,MAAM,GAAG,GAAG,KAAK;AACxB,QAAM,QAAQ,SAAS,cAAc;AACrC,MAAI,CAAC,QAAQ,QAAQ,EAAG,QAAO,MAAM,GAAG,GAAG,OAAO,IAAI;AACxD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PointSeriesProps } from "./point-types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Batched circles in source paint order with one ordinary Pibbl target.
|
|
4
|
+
*
|
|
5
|
+
* @param props - Data, coordinate accessors, scales, and point styling. See
|
|
6
|
+
* {@link PointSeriesProps} .
|
|
7
|
+
* @returns Pibbl nodes drawing the point marks.
|
|
8
|
+
*
|
|
9
|
+
* @see {@link PointSeriesProps}
|
|
10
|
+
*/
|
|
11
|
+
export declare function PointSeries<D>({ data: input, x: xInput, y: yInput, xScale: xId, yScale: yId, defined, style: styleInput, ...events }: PointSeriesProps<D>): import("../../../jsx-runtime.js").JSX.Element;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { jsx } from "@pibbl/core/jsx-runtime";
|
|
2
|
+
import { resolveTexturePaint } from "@pibbl/core/internal";
|
|
3
|
+
import {
|
|
4
|
+
Path,
|
|
5
|
+
isSignal,
|
|
6
|
+
resolveSignalValue,
|
|
7
|
+
useCanvasContext
|
|
8
|
+
} from "@pibbl/core";
|
|
9
|
+
import { useScale } from "./use-scale.js";
|
|
10
|
+
import { finiteCoordinate, pointAccessor, pointData } from "./point-data.js";
|
|
11
|
+
import { appendPointTarget, pointPath } from "./point-geometry.js";
|
|
12
|
+
import { opacity, width } from "./paint.js";
|
|
13
|
+
const fields = ["radius", "fill", "stroke", "strokeWidth", "opacity", "cursor"];
|
|
14
|
+
function paint(value, name) {
|
|
15
|
+
if (value === void 0 || typeof value === "string" || value instanceof CanvasGradient || value instanceof CanvasPattern)
|
|
16
|
+
return value;
|
|
17
|
+
throw new TypeError(`PointSeries: invalid ${name}.`);
|
|
18
|
+
}
|
|
19
|
+
function styleObject(input, callback) {
|
|
20
|
+
if (input === null || typeof input !== "object" || Array.isArray(input))
|
|
21
|
+
throw new TypeError("PointSeries: style must be an object.");
|
|
22
|
+
const result = {};
|
|
23
|
+
for (const key of Object.keys(input)) {
|
|
24
|
+
if (!fields.includes(key) || callback && key === "cursor")
|
|
25
|
+
throw new TypeError(`PointSeries: unsupported style field ${key}.`);
|
|
26
|
+
const value = input[key];
|
|
27
|
+
if (callback && isSignal(value))
|
|
28
|
+
throw new TypeError(
|
|
29
|
+
"PointSeries: datum styles must contain plain values; read signals explicitly."
|
|
30
|
+
);
|
|
31
|
+
result[key] = callback ? value : resolveSignalValue(value);
|
|
32
|
+
}
|
|
33
|
+
return result;
|
|
34
|
+
}
|
|
35
|
+
function normalized(style) {
|
|
36
|
+
const radius = width(style.radius ?? 3, "PointSeries radius");
|
|
37
|
+
if (style.cursor !== void 0 && typeof style.cursor !== "string")
|
|
38
|
+
throw new TypeError("PointSeries: cursor must be a string.");
|
|
39
|
+
return {
|
|
40
|
+
radius,
|
|
41
|
+
fill: paint(style.fill ?? "#2563eb", "fill"),
|
|
42
|
+
stroke: paint(style.stroke, "stroke"),
|
|
43
|
+
strokeWidth: width(style.strokeWidth ?? 1, "PointSeries"),
|
|
44
|
+
opacity: opacity(style.opacity ?? 1, "PointSeries"),
|
|
45
|
+
cursor: style.cursor
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function PointSeries({
|
|
49
|
+
data: input,
|
|
50
|
+
x: xInput,
|
|
51
|
+
y: yInput,
|
|
52
|
+
xScale: xId,
|
|
53
|
+
yScale: yId,
|
|
54
|
+
defined,
|
|
55
|
+
style: styleInput,
|
|
56
|
+
...events
|
|
57
|
+
}) {
|
|
58
|
+
const xs = useScale(xId).get(), ys = useScale(yId).get();
|
|
59
|
+
const data = pointData(resolveSignalValue(input), "PointSeries");
|
|
60
|
+
const x = pointAccessor(xInput), y = pointAccessor(yInput);
|
|
61
|
+
const specified = resolveSignalValue(styleInput);
|
|
62
|
+
const shared = typeof specified === "function" ? void 0 : normalized(styleObject(specified ?? {}, false));
|
|
63
|
+
const ctx = useCanvasContext();
|
|
64
|
+
const target = new Path2D();
|
|
65
|
+
for (let i = 0; i < data.length; i++) {
|
|
66
|
+
const datum = data[i];
|
|
67
|
+
if (defined && !defined(datum, i, data)) continue;
|
|
68
|
+
const xv = x(datum, i, data), yv = y(datum, i, data);
|
|
69
|
+
if (!finiteCoordinate(xv) || !finiteCoordinate(yv)) continue;
|
|
70
|
+
const px = xs.map(xv), py = ys.map(yv);
|
|
71
|
+
const style = shared ?? normalized(
|
|
72
|
+
styleObject(
|
|
73
|
+
specified(
|
|
74
|
+
datum,
|
|
75
|
+
i,
|
|
76
|
+
data
|
|
77
|
+
),
|
|
78
|
+
true
|
|
79
|
+
)
|
|
80
|
+
);
|
|
81
|
+
if (style.radius === 0) continue;
|
|
82
|
+
appendPointTarget(
|
|
83
|
+
target,
|
|
84
|
+
px,
|
|
85
|
+
py,
|
|
86
|
+
style.radius,
|
|
87
|
+
!!style.fill,
|
|
88
|
+
style.stroke ? style.strokeWidth : 0
|
|
89
|
+
);
|
|
90
|
+
const path = pointPath(px, py, style.radius);
|
|
91
|
+
ctx.save();
|
|
92
|
+
try {
|
|
93
|
+
ctx.globalAlpha *= style.opacity;
|
|
94
|
+
if (style.fill) {
|
|
95
|
+
ctx.fillStyle = resolveTexturePaint(style.fill, ctx, { x: px - style.radius, y: py - style.radius, width: style.radius * 2, height: style.radius * 2 });
|
|
96
|
+
ctx.fill(path);
|
|
97
|
+
}
|
|
98
|
+
if (style.stroke && style.strokeWidth > 0) {
|
|
99
|
+
ctx.strokeStyle = resolveTexturePaint(style.stroke, ctx, { x: px - style.radius, y: py - style.radius, width: style.radius * 2, height: style.radius * 2 });
|
|
100
|
+
ctx.lineWidth = style.strokeWidth;
|
|
101
|
+
ctx.stroke(path);
|
|
102
|
+
}
|
|
103
|
+
} finally {
|
|
104
|
+
ctx.restore();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return /* @__PURE__ */ jsx(
|
|
108
|
+
Path,
|
|
109
|
+
{
|
|
110
|
+
...events,
|
|
111
|
+
style: { d: target, fill: "transparent", cursor: shared?.cursor }
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
export {
|
|
116
|
+
PointSeries
|
|
117
|
+
};
|
|
118
|
+
//# sourceMappingURL=point-series.js.map
|