@motionscript/core 0.1.0-alpha.8 → 0.1.0-alpha.9
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/CHANGELOG.md +6 -0
- package/LICENSE +201 -201
- package/NOTICE +49 -49
- package/README.md +91 -91
- package/dist/assets/asset-index.js.map +1 -1
- package/dist/assets/catalog.js.map +1 -1
- package/dist/assets/errors.js.map +1 -1
- package/dist/assets/index.js.map +1 -1
- package/dist/assets/manager.js.map +1 -1
- package/dist/assets/manifest.js.map +1 -1
- package/dist/assets/record.js.map +1 -1
- package/dist/assets/scope.js.map +1 -1
- package/dist/attributes/audio/effects/chain.js.map +1 -1
- package/dist/attributes/audio/effects/implementations/echo.js.map +1 -1
- package/dist/attributes/audio/effects/implementations/gain.js.map +1 -1
- package/dist/attributes/audio/effects/implementations/highpass.js.map +1 -1
- package/dist/attributes/audio/effects/implementations/lowpass.js.map +1 -1
- package/dist/attributes/audio/effects/implementations/tremolo.js.map +1 -1
- package/dist/attributes/audio/effects/index.js.map +1 -1
- package/dist/attributes/audio/effects/registry.js.map +1 -1
- package/dist/attributes/audio/effects/union.js.map +1 -1
- package/dist/attributes/audio/ramp.js.map +1 -1
- package/dist/attributes/audio/request.js.map +1 -1
- package/dist/attributes/audio/schedule.js.map +1 -1
- package/dist/attributes/audio/sound.js.map +1 -1
- package/dist/attributes/audio/transition.js.map +1 -1
- package/dist/attributes/index.js.map +1 -1
- package/dist/attributes/layout/alignment.js.map +1 -1
- package/dist/attributes/layout/index.js.map +1 -1
- package/dist/attributes/layout/insets.js.map +1 -1
- package/dist/attributes/layout/matrix2d.js.map +1 -1
- package/dist/attributes/layout/size.js.map +1 -1
- package/dist/attributes/layout/space3d.js.map +1 -1
- package/dist/attributes/layout/transform3d.js.map +1 -1
- package/dist/attributes/layout/vector2.js.map +1 -1
- package/dist/attributes/layout/world-transform.js.map +1 -1
- package/dist/attributes/mask/boolean.js.map +1 -1
- package/dist/attributes/mask/mask.js.map +1 -1
- package/dist/attributes/properties/decorator.js.map +1 -1
- package/dist/attributes/properties/inputs.js.map +1 -1
- package/dist/attributes/properties/typed.js.map +1 -1
- package/dist/attributes/render3d/orbit.js.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
- package/dist/attributes/shape/corners/corner-style.js.map +1 -1
- package/dist/attributes/shape/corners/corners.js.map +1 -1
- package/dist/attributes/shape/corners/index.js.map +1 -1
- package/dist/attributes/shape/effects/backdrop.js.map +1 -1
- package/dist/attributes/shape/effects/chain.js.map +1 -1
- package/dist/attributes/shape/effects/effect-data.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.d.ts +2 -2
- package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.d.ts +2 -2
- package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.d.ts +4 -4
- package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.d.ts +2 -2
- package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.d.ts +2 -2
- package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
- package/dist/attributes/shape/effects/index.js.map +1 -1
- package/dist/attributes/shape/effects/registry.js.map +1 -1
- package/dist/attributes/shape/effects/spec.js.map +1 -1
- package/dist/attributes/shape/effects/union.js.map +1 -1
- package/dist/attributes/shape/fill/blend.js.map +1 -1
- package/dist/attributes/shape/fill/chain.js.map +1 -1
- package/dist/attributes/shape/fill/coerce.js.map +1 -1
- package/dist/attributes/shape/fill/color/constants.js.map +1 -1
- package/dist/attributes/shape/fill/color/parser.js.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/color.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/conic-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/linear-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/radial-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/stripe.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
- package/dist/attributes/shape/fill/index.js.map +1 -1
- package/dist/attributes/shape/fill/lerp.js.map +1 -1
- package/dist/attributes/shape/fill/media-preset.js.map +1 -1
- package/dist/attributes/shape/fill/registry.js.map +1 -1
- package/dist/attributes/shape/fill/union.js.map +1 -1
- package/dist/attributes/shape/filters/chain.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/alpha.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/exposure.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/posterize-time.js.map +1 -1
- package/dist/attributes/shape/filters/index.js.map +1 -1
- package/dist/attributes/shape/filters/registry.js.map +1 -1
- package/dist/attributes/shape/filters/union.js.map +1 -1
- package/dist/attributes/shape/path/anchors.js.map +1 -1
- package/dist/attributes/shape/path/bezier.js.map +1 -1
- package/dist/attributes/shape/path/index.js.map +1 -1
- package/dist/attributes/shape/path/measure.js.map +1 -1
- package/dist/attributes/shape/path/morph.js.map +1 -1
- package/dist/attributes/shape/path/ops.js.map +1 -1
- package/dist/attributes/shape/path/types.js.map +1 -1
- package/dist/attributes/shape/path/walk.js.map +1 -1
- package/dist/attributes/shape/shaders/index.js.map +1 -1
- package/dist/attributes/shape/shaders/language.js.map +1 -1
- package/dist/attributes/shape/shaders/pack.js.map +1 -1
- package/dist/attributes/shape/shaders/resolve.js.map +1 -1
- package/dist/attributes/shape/shadow/index.js.map +1 -1
- package/dist/attributes/shape/shadow/shadow.js.map +1 -1
- package/dist/attributes/shape/stroke/index.js.map +1 -1
- package/dist/attributes/shape/stroke/stroke.js.map +1 -1
- package/dist/attributes/shared/operators.js.map +1 -1
- package/dist/attributes/text/index.js.map +1 -1
- package/dist/attributes/text/ops.js.map +1 -1
- package/dist/attributes/text/types.js.map +1 -1
- package/dist/browser/chunks/{chunk-LKUYVFU3.js → chunk-4BDLFEOC.js} +1 -1
- package/dist/browser/chunks/chunk-4BDLFEOC.js.map +7 -0
- package/dist/browser/chunks/{chunk-GKM6UZJR.js → chunk-7DB6BI27.js} +2 -2
- package/dist/browser/chunks/chunk-7DB6BI27.js.map +7 -0
- package/dist/browser/chunks/{chunk-AOT33LMS.js → chunk-IX53IFBD.js} +2 -2
- package/dist/browser/chunks/chunk-IX53IFBD.js.map +7 -0
- package/dist/browser/chunks/{chunk-ZRPZPWZU.js → chunk-Q55UPA3E.js} +1 -1
- package/dist/browser/chunks/chunk-Q55UPA3E.js.map +7 -0
- package/dist/browser/component.js +1 -1
- package/dist/browser/experimental.js +1 -1
- package/dist/browser/experimental.js.map +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/sdk.js +1 -1
- package/dist/component.js.map +1 -1
- package/dist/components/builtins/audio/audio.js.map +1 -1
- package/dist/components/builtins/geometry/composite.js.map +1 -1
- package/dist/components/builtins/geometry/geometry.js.map +1 -1
- package/dist/components/builtins/geometry/shape-outline.js.map +1 -1
- package/dist/components/builtins/layout/layout.js.map +1 -1
- package/dist/components/builtins/media/media.js.map +1 -1
- package/dist/components/builtins/providers/providers.js.map +1 -1
- package/dist/components/builtins/text/number-format.js.map +1 -1
- package/dist/components/builtins/text/number-pattern.js.map +1 -1
- package/dist/components/builtins/text/text-defaults.js.map +1 -1
- package/dist/components/builtins/text/text-layout.js.map +1 -1
- package/dist/components/builtins/text/text.d.ts +9 -9
- package/dist/components/builtins/text/text.js.map +1 -1
- package/dist/components/builtins/three/canvas3d.js.map +1 -1
- package/dist/components/builtins/three/grid-geometry3d.js.map +1 -1
- package/dist/components/builtins/three/three.js.map +1 -1
- package/dist/components/factory/api.js.map +1 -1
- package/dist/components/factory/clip-of.js.map +1 -1
- package/dist/components/factory/commands-for.js.map +1 -1
- package/dist/components/factory/component-audio.js.map +1 -1
- package/dist/components/factory/component2d.js.map +1 -1
- package/dist/components/factory/component3d.js.map +1 -1
- package/dist/components/factory/factory.js.map +1 -1
- package/dist/components/factory/timeline.js.map +1 -1
- package/dist/components/factory/type-def.js.map +1 -1
- package/dist/components/factory/types.js.map +1 -1
- package/dist/components/factory/views.js.map +1 -1
- package/dist/components/modules/aim.js.map +1 -1
- package/dist/components/modules/corners.js.map +1 -1
- package/dist/components/modules/flow.js.map +1 -1
- package/dist/components/modules/material.js.map +1 -1
- package/dist/components/modules/paint.js.map +1 -1
- package/dist/components/modules/shapes.js.map +1 -1
- package/dist/components/modules/text-layout.js.map +1 -1
- package/dist/components/modules/text-style.d.ts +1 -1
- package/dist/components/modules/text-style.js.map +1 -1
- package/dist/components/modules/three-entries.js.map +1 -1
- package/dist/components/modules/view3d.js.map +1 -1
- package/dist/components/trees/2d/group-bounds.js.map +1 -1
- package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
- package/dist/components/trees/2d/node-motion.js.map +1 -1
- package/dist/components/trees/2d/node-render.js.map +1 -1
- package/dist/components/trees/2d/node-space.js.map +1 -1
- package/dist/components/trees/2d/node-transform.js.map +1 -1
- package/dist/components/trees/2d/node2d.js.map +1 -1
- package/dist/components/trees/audio/index.js.map +1 -1
- package/dist/components/trees/audio/node-audio.js.map +1 -1
- package/dist/components/trees/index.js.map +1 -1
- package/dist/components/trees/node/node-editor-state.js.map +1 -1
- package/dist/components/trees/node/node-reactive.js.map +1 -1
- package/dist/components/trees/node/node-time.js.map +1 -1
- package/dist/components/trees/node/node-walk.js.map +1 -1
- package/dist/components/trees/node/node.js.map +1 -1
- package/dist/components/trees/root/canvas2d-node.js.map +1 -1
- package/dist/components/trees/three/node3d.js.map +1 -1
- package/dist/document/audio.js.map +1 -1
- package/dist/document/builtins.js.map +1 -1
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/deny-globals.js.map +1 -1
- package/dist/document/diff.js.map +1 -1
- package/dist/document/doc-index.js.map +1 -1
- package/dist/document/expression/compile.js.map +1 -1
- package/dist/document/expression/index.js.map +1 -1
- package/dist/document/expression/ops.js.map +1 -1
- package/dist/document/expression/parse.js.map +1 -1
- package/dist/document/expression/refs.js.map +1 -1
- package/dist/document/expression/types.js.map +1 -1
- package/dist/document/expression/walk.js.map +1 -1
- package/dist/document/index.js.map +1 -1
- package/dist/document/migrate.js.map +1 -1
- package/dist/document/missing-node.js.map +1 -1
- package/dist/document/node-decorator.js.map +1 -1
- package/dist/document/node-descriptor.js.map +1 -1
- package/dist/document/placement.js.map +1 -1
- package/dist/document/project.js.map +1 -1
- package/dist/document/prop-evolution.js.map +1 -1
- package/dist/document/registry.js.map +1 -1
- package/dist/document/settled-index.js.map +1 -1
- package/dist/document/timeline-patch.js.map +1 -1
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.js.map +1 -1
- package/dist/document/vocabulary.js.map +1 -1
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/layout/bounds.js.map +1 -1
- package/dist/layout/constraints.js.map +1 -1
- package/dist/layout/flex.js.map +1 -1
- package/dist/layout/freeform.js.map +1 -1
- package/dist/layout/grid.js.map +1 -1
- package/dist/layout/index.js.map +1 -1
- package/dist/layout/item.js.map +1 -1
- package/dist/layout/ops.js.map +1 -1
- package/dist/layout/types.js.map +1 -1
- package/dist/platform/audio-sink.js.map +1 -1
- package/dist/platform/exporter.js.map +1 -1
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/stepped-clock.js.map +1 -1
- package/dist/platform/storage-adapter.js.map +1 -1
- package/dist/platform/ticker.js.map +1 -1
- package/dist/project/config.js.map +1 -1
- package/dist/project/index.js.map +1 -1
- package/dist/project/tree.js.map +1 -1
- package/dist/props/host.js.map +1 -1
- package/dist/props/index.js.map +1 -1
- package/dist/props/observer.js.map +1 -1
- package/dist/props/slot.js.map +1 -1
- package/dist/renamed-scene-names.js.map +1 -1
- package/dist/render/canvas-render-context2d.js.map +1 -1
- package/dist/render/clip-contains.js.map +1 -1
- package/dist/render/clip.js.map +1 -1
- package/dist/render/descriptors/ellipse.js.map +1 -1
- package/dist/render/descriptors/line.js.map +1 -1
- package/dist/render/descriptors/path-builder.js.map +1 -1
- package/dist/render/descriptors/path.js.map +1 -1
- package/dist/render/descriptors/polygon.js.map +1 -1
- package/dist/render/descriptors/polygram.js.map +1 -1
- package/dist/render/descriptors/rect.js.map +1 -1
- package/dist/render/descriptors/richtext.js.map +1 -1
- package/dist/render/descriptors/shape.js.map +1 -1
- package/dist/render/descriptors/text.js.map +1 -1
- package/dist/render/descriptors/transform.js.map +1 -1
- package/dist/render/graphics2d.js.map +1 -1
- package/dist/render/index.js.map +1 -1
- package/dist/render/measure-context.js.map +1 -1
- package/dist/render/null-render-context.js.map +1 -1
- package/dist/render/render-context2d.js.map +1 -1
- package/dist/render/render-issue.js.map +1 -1
- package/dist/render/surface.js.map +1 -1
- package/dist/render/text-defaults.js.map +1 -1
- package/dist/render/text-layout.js.map +1 -1
- package/dist/render3d/bounds3d.js.map +1 -1
- package/dist/render3d/builders.js.map +1 -1
- package/dist/render3d/camera.js.map +1 -1
- package/dist/render3d/fill3d.js.map +1 -1
- package/dist/render3d/geometry.js.map +1 -1
- package/dist/render3d/graphics3d.js.map +1 -1
- package/dist/render3d/index.js.map +1 -1
- package/dist/render3d/inert.js.map +1 -1
- package/dist/render3d/light.js.map +1 -1
- package/dist/render3d/material.js.map +1 -1
- package/dist/render3d/matrix4.js.map +1 -1
- package/dist/render3d/render-context3d.js.map +1 -1
- package/dist/render3d/resources.js.map +1 -1
- package/dist/render3d/rounded-box.js.map +1 -1
- package/dist/render3d/scene-settings.js.map +1 -1
- package/dist/render3d/scene3d.js.map +1 -1
- package/dist/render3d/segments.js.map +1 -1
- package/dist/render3d/texture.js.map +1 -1
- package/dist/render3d/tracking.js.map +1 -1
- package/dist/render3d/transform.js.map +1 -1
- package/dist/render3d/vector3.js.map +1 -1
- package/dist/render3d/walk.js.map +1 -1
- package/dist/runtime/asset-refine.js.map +1 -1
- package/dist/runtime/asset-timeline.js.map +1 -1
- package/dist/runtime/asset-update.js.map +1 -1
- package/dist/runtime/audio-index.js.map +1 -1
- package/dist/runtime/builtin-context.js.map +1 -1
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/frame-time.js.map +1 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/node-picking.js.map +1 -1
- package/dist/runtime/node-picking3d.js.map +1 -1
- package/dist/runtime/placement.js.map +1 -1
- package/dist/runtime/playback-controller.js.map +1 -1
- package/dist/runtime/playback.js.map +1 -1
- package/dist/runtime/precompisition.js.map +1 -1
- package/dist/runtime/project-assets.js.map +1 -1
- package/dist/runtime/session.js.map +1 -1
- package/dist/runtime/settle.js.map +1 -1
- package/dist/runtime/state-evaluator.js.map +1 -1
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command-decorator.js.map +1 -1
- package/dist/tween/command.js.map +1 -1
- package/dist/tween/ease/constants.js.map +1 -1
- package/dist/tween/ease/curve.js.map +1 -1
- package/dist/tween/ease/describe.js.map +1 -1
- package/dist/tween/ease/spec.js.map +1 -1
- package/dist/tween/ease/type.js.map +1 -1
- package/dist/tween/index.js.map +1 -1
- package/dist/tween/inert.js.map +1 -1
- package/dist/tween/lerp.js.map +1 -1
- package/dist/tween/loop.js.map +1 -1
- package/dist/tween/prepare.js.map +1 -1
- package/dist/tween/stepper.js.map +1 -1
- package/dist/tween/to-command.js.map +1 -1
- package/dist/util/clamp.js.map +1 -1
- package/dist/util/context.js.map +1 -1
- package/dist/util/csv.js.map +1 -1
- package/dist/util/generateList.js.map +1 -1
- package/dist/util/index.js.map +1 -1
- package/dist/util/metrics.js.map +1 -1
- package/dist/util/random.js.map +1 -1
- package/dist/util/reference.js.map +1 -1
- package/dist/util/scheduler.js.map +1 -1
- package/package.json +1 -1
- package/dist/attributes/audio/filters/chain.d.ts +0 -113
- package/dist/attributes/audio/filters/chain.d.ts.map +0 -1
- package/dist/attributes/audio/filters/chain.js +0 -104
- package/dist/attributes/audio/filters/chain.js.map +0 -1
- package/dist/attributes/audio/filters/curve.d.ts +0 -152
- package/dist/attributes/audio/filters/curve.d.ts.map +0 -1
- package/dist/attributes/audio/filters/curve.js +0 -250
- package/dist/attributes/audio/filters/curve.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/echo.d.ts +0 -14
- package/dist/attributes/audio/filters/implementations/echo.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/echo.js +0 -11
- package/dist/attributes/audio/filters/implementations/echo.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/gain.d.ts +0 -10
- package/dist/attributes/audio/filters/implementations/gain.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/gain.js +0 -6
- package/dist/attributes/audio/filters/implementations/gain.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/highpass.d.ts +0 -12
- package/dist/attributes/audio/filters/implementations/highpass.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/highpass.js +0 -10
- package/dist/attributes/audio/filters/implementations/highpass.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/lowpass.d.ts +0 -12
- package/dist/attributes/audio/filters/implementations/lowpass.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/lowpass.js +0 -10
- package/dist/attributes/audio/filters/implementations/lowpass.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/speed.d.ts +0 -18
- package/dist/attributes/audio/filters/implementations/speed.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/speed.js +0 -6
- package/dist/attributes/audio/filters/implementations/speed.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/tremolo.d.ts +0 -12
- package/dist/attributes/audio/filters/implementations/tremolo.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/tremolo.js +0 -10
- package/dist/attributes/audio/filters/implementations/tremolo.js.map +0 -1
- package/dist/attributes/audio/filters/index.d.ts +0 -22
- package/dist/attributes/audio/filters/index.d.ts.map +0 -1
- package/dist/attributes/audio/filters/index.js +0 -8
- package/dist/attributes/audio/filters/index.js.map +0 -1
- package/dist/attributes/audio/filters/registry.d.ts +0 -36
- package/dist/attributes/audio/filters/registry.d.ts.map +0 -1
- package/dist/attributes/audio/filters/registry.js +0 -82
- package/dist/attributes/audio/filters/registry.js.map +0 -1
- package/dist/attributes/audio/filters/union.d.ts +0 -18
- package/dist/attributes/audio/filters/union.d.ts.map +0 -1
- package/dist/attributes/audio/filters/union.js +0 -28
- package/dist/attributes/audio/filters/union.js.map +0 -1
- package/dist/attributes/shape/sksl-uniforms.d.ts +0 -146
- package/dist/attributes/shape/sksl-uniforms.d.ts.map +0 -1
- package/dist/attributes/shape/sksl-uniforms.js +0 -0
- package/dist/attributes/shape/sksl-uniforms.js.map +0 -1
- package/dist/browser/chunks/chunk-AOT33LMS.js.map +0 -7
- package/dist/browser/chunks/chunk-GKM6UZJR.js.map +0 -7
- package/dist/browser/chunks/chunk-LKUYVFU3.js.map +0 -7
- package/dist/browser/chunks/chunk-ZRPZPWZU.js.map +0 -7
- package/dist/component/api.d.ts +0 -508
- package/dist/component/api.d.ts.map +0 -1
- package/dist/component/api.js +0 -4
- package/dist/component/api.js.map +0 -1
- package/dist/component/builtins/audio.d.ts +0 -26
- package/dist/component/builtins/audio.d.ts.map +0 -1
- package/dist/component/builtins/audio.js +0 -41
- package/dist/component/builtins/audio.js.map +0 -1
- package/dist/component/builtins/canvas3d.d.ts +0 -98
- package/dist/component/builtins/canvas3d.d.ts.map +0 -1
- package/dist/component/builtins/canvas3d.js +0 -21
- package/dist/component/builtins/canvas3d.js.map +0 -1
- package/dist/component/builtins/composite.d.ts +0 -56
- package/dist/component/builtins/composite.d.ts.map +0 -1
- package/dist/component/builtins/composite.js +0 -25
- package/dist/component/builtins/composite.js.map +0 -1
- package/dist/component/builtins/geometry.d.ts +0 -505
- package/dist/component/builtins/geometry.d.ts.map +0 -1
- package/dist/component/builtins/geometry.js +0 -107
- package/dist/component/builtins/geometry.js.map +0 -1
- package/dist/component/builtins/layout.d.ts +0 -88
- package/dist/component/builtins/layout.d.ts.map +0 -1
- package/dist/component/builtins/layout.js +0 -84
- package/dist/component/builtins/layout.js.map +0 -1
- package/dist/component/builtins/media.d.ts +0 -95
- package/dist/component/builtins/media.d.ts.map +0 -1
- package/dist/component/builtins/media.js +0 -149
- package/dist/component/builtins/media.js.map +0 -1
- package/dist/component/builtins/providers.d.ts +0 -23
- package/dist/component/builtins/providers.d.ts.map +0 -1
- package/dist/component/builtins/providers.js +0 -30
- package/dist/component/builtins/providers.js.map +0 -1
- package/dist/component/builtins/text.d.ts +0 -193
- package/dist/component/builtins/text.d.ts.map +0 -1
- package/dist/component/builtins/text.js +0 -113
- package/dist/component/builtins/text.js.map +0 -1
- package/dist/component/builtins/three.d.ts +0 -1085
- package/dist/component/builtins/three.d.ts.map +0 -1
- package/dist/component/builtins/three.js +0 -265
- package/dist/component/builtins/three.js.map +0 -1
- package/dist/component/clip-of.d.ts +0 -5
- package/dist/component/clip-of.d.ts.map +0 -1
- package/dist/component/clip-of.js +0 -33
- package/dist/component/clip-of.js.map +0 -1
- package/dist/component/commands-for.d.ts +0 -19
- package/dist/component/commands-for.d.ts.map +0 -1
- package/dist/component/commands-for.js +0 -5
- package/dist/component/commands-for.js.map +0 -1
- package/dist/component/component-audio.d.ts +0 -9
- package/dist/component/component-audio.d.ts.map +0 -1
- package/dist/component/component-audio.js +0 -18
- package/dist/component/component-audio.js.map +0 -1
- package/dist/component/component2d.d.ts +0 -9
- package/dist/component/component2d.d.ts.map +0 -1
- package/dist/component/component2d.js +0 -239
- package/dist/component/component2d.js.map +0 -1
- package/dist/component/component3d.d.ts +0 -9
- package/dist/component/component3d.d.ts.map +0 -1
- package/dist/component/component3d.js +0 -99
- package/dist/component/component3d.js.map +0 -1
- package/dist/component/factory.d.ts +0 -63
- package/dist/component/factory.d.ts.map +0 -1
- package/dist/component/factory.js +0 -313
- package/dist/component/factory.js.map +0 -1
- package/dist/component/modules/aim.d.ts +0 -30
- package/dist/component/modules/aim.d.ts.map +0 -1
- package/dist/component/modules/aim.js +0 -39
- package/dist/component/modules/aim.js.map +0 -1
- package/dist/component/modules/corners.d.ts +0 -13
- package/dist/component/modules/corners.d.ts.map +0 -1
- package/dist/component/modules/corners.js +0 -12
- package/dist/component/modules/corners.js.map +0 -1
- package/dist/component/modules/flow.d.ts +0 -26
- package/dist/component/modules/flow.d.ts.map +0 -1
- package/dist/component/modules/flow.js +0 -55
- package/dist/component/modules/flow.js.map +0 -1
- package/dist/component/modules/material.d.ts +0 -40
- package/dist/component/modules/material.d.ts.map +0 -1
- package/dist/component/modules/material.js +0 -75
- package/dist/component/modules/material.js.map +0 -1
- package/dist/component/modules/paint.d.ts +0 -71
- package/dist/component/modules/paint.d.ts.map +0 -1
- package/dist/component/modules/paint.js +0 -106
- package/dist/component/modules/paint.js.map +0 -1
- package/dist/component/modules/shapes.d.ts +0 -31
- package/dist/component/modules/shapes.d.ts.map +0 -1
- package/dist/component/modules/shapes.js +0 -43
- package/dist/component/modules/shapes.js.map +0 -1
- package/dist/component/modules/text-layout.d.ts +0 -26
- package/dist/component/modules/text-layout.d.ts.map +0 -1
- package/dist/component/modules/text-layout.js +0 -57
- package/dist/component/modules/text-layout.js.map +0 -1
- package/dist/component/modules/text-style.d.ts +0 -48
- package/dist/component/modules/text-style.d.ts.map +0 -1
- package/dist/component/modules/text-style.js +0 -63
- package/dist/component/modules/text-style.js.map +0 -1
- package/dist/component/modules/three-entries.d.ts +0 -23
- package/dist/component/modules/three-entries.d.ts.map +0 -1
- package/dist/component/modules/three-entries.js +0 -41
- package/dist/component/modules/three-entries.js.map +0 -1
- package/dist/component/modules/view3d.d.ts +0 -55
- package/dist/component/modules/view3d.d.ts.map +0 -1
- package/dist/component/modules/view3d.js +0 -160
- package/dist/component/modules/view3d.js.map +0 -1
- package/dist/component/timeline.d.ts +0 -22
- package/dist/component/timeline.d.ts.map +0 -1
- package/dist/component/timeline.js +0 -128
- package/dist/component/timeline.js.map +0 -1
- package/dist/component/type-def.d.ts +0 -26
- package/dist/component/type-def.d.ts.map +0 -1
- package/dist/component/type-def.js +0 -16
- package/dist/component/type-def.js.map +0 -1
- package/dist/component/types.d.ts +0 -91
- package/dist/component/types.d.ts.map +0 -1
- package/dist/component/types.js +0 -88
- package/dist/component/types.js.map +0 -1
- package/dist/component/views.d.ts +0 -121
- package/dist/component/views.d.ts.map +0 -1
- package/dist/component/views.js +0 -413
- package/dist/component/views.js.map +0 -1
- package/dist/document/withdraw.d.ts +0 -28
- package/dist/document/withdraw.d.ts.map +0 -1
- package/dist/document/withdraw.js +0 -61
- package/dist/document/withdraw.js.map +0 -1
- package/dist/jsx/jsx-dev-runtime.d.ts +0 -3
- package/dist/jsx/jsx-dev-runtime.d.ts.map +0 -1
- package/dist/jsx/jsx-dev-runtime.js +0 -3
- package/dist/jsx/jsx-dev-runtime.js.map +0 -1
- package/dist/jsx/jsx-runtime.d.ts +0 -27
- package/dist/jsx/jsx-runtime.d.ts.map +0 -1
- package/dist/jsx/jsx-runtime.js +0 -26
- package/dist/jsx/jsx-runtime.js.map +0 -1
- package/dist/nodes/2d/node-lifecycle.d.ts +0 -46
- package/dist/nodes/2d/node-lifecycle.d.ts.map +0 -1
- package/dist/nodes/2d/node-lifecycle.js +0 -264
- package/dist/nodes/2d/node-lifecycle.js.map +0 -1
- package/dist/nodes/2d/node-motion.d.ts +0 -56
- package/dist/nodes/2d/node-motion.d.ts.map +0 -1
- package/dist/nodes/2d/node-motion.js +0 -86
- package/dist/nodes/2d/node-motion.js.map +0 -1
- package/dist/nodes/2d/node-render.d.ts +0 -44
- package/dist/nodes/2d/node-render.d.ts.map +0 -1
- package/dist/nodes/2d/node-render.js +0 -80
- package/dist/nodes/2d/node-render.js.map +0 -1
- package/dist/nodes/2d/node-space.d.ts +0 -63
- package/dist/nodes/2d/node-space.d.ts.map +0 -1
- package/dist/nodes/2d/node-space.js +0 -131
- package/dist/nodes/2d/node-space.js.map +0 -1
- package/dist/nodes/2d/node-transform.d.ts +0 -55
- package/dist/nodes/2d/node-transform.d.ts.map +0 -1
- package/dist/nodes/2d/node-transform.js +0 -73
- package/dist/nodes/2d/node-transform.js.map +0 -1
- package/dist/nodes/2d/node2d.d.ts +0 -1111
- package/dist/nodes/2d/node2d.d.ts.map +0 -1
- package/dist/nodes/2d/node2d.js +0 -1665
- package/dist/nodes/2d/node2d.js.map +0 -1
- package/dist/nodes/2d/paint-node.d.ts +0 -142
- package/dist/nodes/2d/paint-node.d.ts.map +0 -1
- package/dist/nodes/2d/paint-node.js +0 -232
- package/dist/nodes/2d/paint-node.js.map +0 -1
- package/dist/nodes/audio/audio-bus.d.ts +0 -28
- package/dist/nodes/audio/audio-bus.d.ts.map +0 -1
- package/dist/nodes/audio/audio-bus.js +0 -33
- package/dist/nodes/audio/audio-bus.js.map +0 -1
- package/dist/nodes/audio/index.d.ts +0 -4
- package/dist/nodes/audio/index.d.ts.map +0 -1
- package/dist/nodes/audio/index.js +0 -2
- package/dist/nodes/audio/index.js.map +0 -1
- package/dist/nodes/audio/node-audio.d.ts +0 -107
- package/dist/nodes/audio/node-audio.d.ts.map +0 -1
- package/dist/nodes/audio/node-audio.js +0 -179
- package/dist/nodes/audio/node-audio.js.map +0 -1
- package/dist/nodes/audio/sound-node.d.ts +0 -41
- package/dist/nodes/audio/sound-node.d.ts.map +0 -1
- package/dist/nodes/audio/sound-node.js +0 -71
- package/dist/nodes/audio/sound-node.js.map +0 -1
- package/dist/nodes/geometry/boolean-node.d.ts +0 -28
- package/dist/nodes/geometry/boolean-node.d.ts.map +0 -1
- package/dist/nodes/geometry/boolean-node.js +0 -81
- package/dist/nodes/geometry/boolean-node.js.map +0 -1
- package/dist/nodes/geometry/bounds-shape-node.d.ts +0 -149
- package/dist/nodes/geometry/bounds-shape-node.d.ts.map +0 -1
- package/dist/nodes/geometry/bounds-shape-node.js +0 -181
- package/dist/nodes/geometry/bounds-shape-node.js.map +0 -1
- package/dist/nodes/geometry/box-path-node.d.ts +0 -89
- package/dist/nodes/geometry/box-path-node.d.ts.map +0 -1
- package/dist/nodes/geometry/box-path-node.js +0 -116
- package/dist/nodes/geometry/box-path-node.js.map +0 -1
- package/dist/nodes/geometry/ellipse-node.d.ts +0 -18
- package/dist/nodes/geometry/ellipse-node.d.ts.map +0 -1
- package/dist/nodes/geometry/ellipse-node.js +0 -45
- package/dist/nodes/geometry/ellipse-node.js.map +0 -1
- package/dist/nodes/geometry/group-bounds.d.ts +0 -56
- package/dist/nodes/geometry/group-bounds.d.ts.map +0 -1
- package/dist/nodes/geometry/group-bounds.js +0 -87
- package/dist/nodes/geometry/group-bounds.js.map +0 -1
- package/dist/nodes/geometry/mask-node.d.ts +0 -33
- package/dist/nodes/geometry/mask-node.d.ts.map +0 -1
- package/dist/nodes/geometry/mask-node.js +0 -66
- package/dist/nodes/geometry/mask-node.js.map +0 -1
- package/dist/nodes/geometry/path-node.d.ts +0 -26
- package/dist/nodes/geometry/path-node.d.ts.map +0 -1
- package/dist/nodes/geometry/path-node.js +0 -58
- package/dist/nodes/geometry/path-node.js.map +0 -1
- package/dist/nodes/geometry/polygon-node.d.ts +0 -26
- package/dist/nodes/geometry/polygon-node.d.ts.map +0 -1
- package/dist/nodes/geometry/polygon-node.js +0 -47
- package/dist/nodes/geometry/polygon-node.js.map +0 -1
- package/dist/nodes/geometry/polygram-node.d.ts +0 -33
- package/dist/nodes/geometry/polygram-node.d.ts.map +0 -1
- package/dist/nodes/geometry/polygram-node.js +0 -52
- package/dist/nodes/geometry/polygram-node.js.map +0 -1
- package/dist/nodes/geometry/rect-node.d.ts +0 -38
- package/dist/nodes/geometry/rect-node.d.ts.map +0 -1
- package/dist/nodes/geometry/rect-node.js +0 -56
- package/dist/nodes/geometry/rect-node.js.map +0 -1
- package/dist/nodes/geometry/shape-node.d.ts +0 -71
- package/dist/nodes/geometry/shape-node.d.ts.map +0 -1
- package/dist/nodes/geometry/shape-node.js +0 -140
- package/dist/nodes/geometry/shape-node.js.map +0 -1
- package/dist/nodes/geometry/shape-outline.d.ts +0 -93
- package/dist/nodes/geometry/shape-outline.d.ts.map +0 -1
- package/dist/nodes/geometry/shape-outline.js +0 -470
- package/dist/nodes/geometry/shape-outline.js.map +0 -1
- package/dist/nodes/index.d.ts +0 -53
- package/dist/nodes/index.d.ts.map +0 -1
- package/dist/nodes/index.js +0 -35
- package/dist/nodes/index.js.map +0 -1
- package/dist/nodes/layout/camera-node.d.ts +0 -80
- package/dist/nodes/layout/camera-node.d.ts.map +0 -1
- package/dist/nodes/layout/camera-node.js +0 -153
- package/dist/nodes/layout/camera-node.js.map +0 -1
- package/dist/nodes/layout/orbit-camera-node.d.ts +0 -80
- package/dist/nodes/layout/orbit-camera-node.d.ts.map +0 -1
- package/dist/nodes/layout/orbit-camera-node.js +0 -118
- package/dist/nodes/layout/orbit-camera-node.js.map +0 -1
- package/dist/nodes/layout/rotated-box.d.ts +0 -20
- package/dist/nodes/layout/rotated-box.d.ts.map +0 -1
- package/dist/nodes/layout/rotated-box.js +0 -76
- package/dist/nodes/layout/rotated-box.js.map +0 -1
- package/dist/nodes/media/video-node.d.ts +0 -229
- package/dist/nodes/media/video-node.d.ts.map +0 -1
- package/dist/nodes/media/video-node.js +0 -350
- package/dist/nodes/media/video-node.js.map +0 -1
- package/dist/nodes/node/declare-paints.d.ts +0 -19
- package/dist/nodes/node/declare-paints.d.ts.map +0 -1
- package/dist/nodes/node/declare-paints.js +0 -27
- package/dist/nodes/node/declare-paints.js.map +0 -1
- package/dist/nodes/node/node-editor-state.d.ts +0 -53
- package/dist/nodes/node/node-editor-state.d.ts.map +0 -1
- package/dist/nodes/node/node-editor-state.js +0 -23
- package/dist/nodes/node/node-editor-state.js.map +0 -1
- package/dist/nodes/node/node-reactive.d.ts +0 -89
- package/dist/nodes/node/node-reactive.d.ts.map +0 -1
- package/dist/nodes/node/node-reactive.js +0 -135
- package/dist/nodes/node/node-reactive.js.map +0 -1
- package/dist/nodes/node/node-time.d.ts +0 -39
- package/dist/nodes/node/node-time.d.ts.map +0 -1
- package/dist/nodes/node/node-time.js +0 -14
- package/dist/nodes/node/node-time.js.map +0 -1
- package/dist/nodes/node/node-walk.d.ts +0 -46
- package/dist/nodes/node/node-walk.d.ts.map +0 -1
- package/dist/nodes/node/node-walk.js +0 -74
- package/dist/nodes/node/node-walk.js.map +0 -1
- package/dist/nodes/node/node.d.ts +0 -445
- package/dist/nodes/node/node.d.ts.map +0 -1
- package/dist/nodes/node/node.js +0 -745
- package/dist/nodes/node/node.js.map +0 -1
- package/dist/nodes/node/text-defaults.d.ts +0 -32
- package/dist/nodes/node/text-defaults.d.ts.map +0 -1
- package/dist/nodes/node/text-defaults.js +0 -37
- package/dist/nodes/node/text-defaults.js.map +0 -1
- package/dist/nodes/root/canvas2d-node.d.ts +0 -163
- package/dist/nodes/root/canvas2d-node.d.ts.map +0 -1
- package/dist/nodes/root/canvas2d-node.js +0 -264
- package/dist/nodes/root/canvas2d-node.js.map +0 -1
- package/dist/nodes/root/provider-node.d.ts +0 -47
- package/dist/nodes/root/provider-node.d.ts.map +0 -1
- package/dist/nodes/root/provider-node.js +0 -63
- package/dist/nodes/root/provider-node.js.map +0 -1
- package/dist/nodes/root/theme-provider-node.d.ts +0 -29
- package/dist/nodes/root/theme-provider-node.d.ts.map +0 -1
- package/dist/nodes/root/theme-provider-node.js +0 -43
- package/dist/nodes/root/theme-provider-node.js.map +0 -1
- package/dist/nodes/text/default-text-style-node.d.ts +0 -103
- package/dist/nodes/text/default-text-style-node.d.ts.map +0 -1
- package/dist/nodes/text/default-text-style-node.js +0 -146
- package/dist/nodes/text/default-text-style-node.js.map +0 -1
- package/dist/nodes/text/number-format.d.ts +0 -66
- package/dist/nodes/text/number-format.d.ts.map +0 -1
- package/dist/nodes/text/number-format.js +0 -227
- package/dist/nodes/text/number-format.js.map +0 -1
- package/dist/nodes/text/number-node.d.ts +0 -94
- package/dist/nodes/text/number-node.d.ts.map +0 -1
- package/dist/nodes/text/number-node.js +0 -86
- package/dist/nodes/text/number-node.js.map +0 -1
- package/dist/nodes/text/number-pattern.d.ts +0 -51
- package/dist/nodes/text/number-pattern.d.ts.map +0 -1
- package/dist/nodes/text/number-pattern.js +0 -77
- package/dist/nodes/text/number-pattern.js.map +0 -1
- package/dist/nodes/text/richtext-node.d.ts +0 -68
- package/dist/nodes/text/richtext-node.d.ts.map +0 -1
- package/dist/nodes/text/richtext-node.js +0 -78
- package/dist/nodes/text/richtext-node.js.map +0 -1
- package/dist/nodes/text/text-base.d.ts +0 -118
- package/dist/nodes/text/text-base.d.ts.map +0 -1
- package/dist/nodes/text/text-base.js +0 -153
- package/dist/nodes/text/text-base.js.map +0 -1
- package/dist/nodes/text/text-layout.d.ts +0 -87
- package/dist/nodes/text/text-layout.d.ts.map +0 -1
- package/dist/nodes/text/text-layout.js +0 -368
- package/dist/nodes/text/text-layout.js.map +0 -1
- package/dist/nodes/text/text-node.d.ts +0 -84
- package/dist/nodes/text/text-node.d.ts.map +0 -1
- package/dist/nodes/text/text-node.js +0 -188
- package/dist/nodes/text/text-node.js.map +0 -1
- package/dist/nodes/text/text-selection.d.ts +0 -125
- package/dist/nodes/text/text-selection.d.ts.map +0 -1
- package/dist/nodes/text/text-selection.js +0 -209
- package/dist/nodes/text/text-selection.js.map +0 -1
- package/dist/nodes/three/camera-nodes.d.ts +0 -109
- package/dist/nodes/three/camera-nodes.d.ts.map +0 -1
- package/dist/nodes/three/camera-nodes.js +0 -112
- package/dist/nodes/three/camera-nodes.js.map +0 -1
- package/dist/nodes/three/canvas3d-node.d.ts +0 -295
- package/dist/nodes/three/canvas3d-node.d.ts.map +0 -1
- package/dist/nodes/three/canvas3d-node.js +0 -486
- package/dist/nodes/three/canvas3d-node.js.map +0 -1
- package/dist/nodes/three/drawable-nodes.d.ts +0 -173
- package/dist/nodes/three/drawable-nodes.d.ts.map +0 -1
- package/dist/nodes/three/drawable-nodes.js +0 -284
- package/dist/nodes/three/drawable-nodes.js.map +0 -1
- package/dist/nodes/three/environment-nodes.d.ts +0 -106
- package/dist/nodes/three/environment-nodes.d.ts.map +0 -1
- package/dist/nodes/three/environment-nodes.js +0 -134
- package/dist/nodes/three/environment-nodes.js.map +0 -1
- package/dist/nodes/three/geometry-nodes.d.ts +0 -197
- package/dist/nodes/three/geometry-nodes.d.ts.map +0 -1
- package/dist/nodes/three/geometry-nodes.js +0 -322
- package/dist/nodes/three/geometry-nodes.js.map +0 -1
- package/dist/nodes/three/grid-geometry3d.d.ts +0 -62
- package/dist/nodes/three/grid-geometry3d.d.ts.map +0 -1
- package/dist/nodes/three/grid-geometry3d.js +0 -114
- package/dist/nodes/three/grid-geometry3d.js.map +0 -1
- package/dist/nodes/three/group3d.d.ts +0 -23
- package/dist/nodes/three/group3d.d.ts.map +0 -1
- package/dist/nodes/three/group3d.js +0 -21
- package/dist/nodes/three/group3d.js.map +0 -1
- package/dist/nodes/three/light-nodes.d.ts +0 -120
- package/dist/nodes/three/light-nodes.d.ts.map +0 -1
- package/dist/nodes/three/light-nodes.js +0 -173
- package/dist/nodes/three/light-nodes.js.map +0 -1
- package/dist/nodes/three/mesh3d.d.ts +0 -117
- package/dist/nodes/three/mesh3d.d.ts.map +0 -1
- package/dist/nodes/three/mesh3d.js +0 -147
- package/dist/nodes/three/mesh3d.js.map +0 -1
- package/dist/nodes/three/node3d.d.ts +0 -230
- package/dist/nodes/three/node3d.d.ts.map +0 -1
- package/dist/nodes/three/node3d.js +0 -337
- package/dist/nodes/three/node3d.js.map +0 -1
- package/dist/render/descriptors/latex.d.ts +0 -6
- package/dist/render/descriptors/latex.d.ts.map +0 -1
- package/dist/render/descriptors/latex.js +0 -2
- package/dist/render/descriptors/latex.js.map +0 -1
- package/dist/tween/seekable.d.ts +0 -81
- package/dist/tween/seekable.d.ts.map +0 -1
- package/dist/tween/seekable.js +0 -137
- package/dist/tween/seekable.js.map +0 -1
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { Node2D } from "../../nodes/2d/node2d.js";
|
|
8
|
-
import { property } from "../../attributes/properties/decorator.js";
|
|
9
|
-
import { TextStyleToken } from "../../runtime/builtin-context.js";
|
|
10
|
-
import { EMPTY_TEXT_STYLE, TEXT_STYLE_KEYS, textOps } from "../../attributes/text/ops.js";
|
|
11
|
-
/**
|
|
12
|
-
* Sets default text styling for everything drawn below it — the {@link Text} /
|
|
13
|
-
* {@link RichText} nodes *and* the raw `Graphics2D` `text`/`richText` ops a custom
|
|
14
|
-
* node draws. A descendant inherits each style prop it didn't set itself, from
|
|
15
|
-
* the nearest ancestor `DefaultTextStyle` that did — author-set props always win
|
|
16
|
-
* over inherited ones. Nesting accumulates per key (an inner `fontSize` and an
|
|
17
|
-
* outer `fontFamily` both apply).
|
|
18
|
-
*
|
|
19
|
-
* Two channels carry that, because a node and a drawing have nothing else in
|
|
20
|
-
* common:
|
|
21
|
-
*
|
|
22
|
-
* - **Nodes**, through context. Built on the same machinery as {@link Provider}:
|
|
23
|
-
* it contributes the built-in {@link TextStyleToken}, merging only the keys the
|
|
24
|
-
* author explicitly passed onto any ancestor's defaults. It contributes the
|
|
25
|
-
* author's *raw* prop values (not resolved cell values), so each consumer
|
|
26
|
-
* resolves them once through its own mapper — e.g. `fill='red'` is resolved by
|
|
27
|
-
* `Text`'s fill mapper, not pre-resolved here. {@link applyTextDefaults} is the
|
|
28
|
-
* consuming end.
|
|
29
|
-
* - **Graphics2D**, through the render context ({@link RenderContext2D.pushTextStyle}),
|
|
30
|
-
* pushed around this node's children for the duration of their draw and folded
|
|
31
|
-
* into each under-specified text op. A `Graphics2D` isn't in the tree and has no
|
|
32
|
-
* bind step, so the draw scope is the only place it can inherit from.
|
|
33
|
-
*
|
|
34
|
-
* Only the *shaping* keys reach a drawn op — `fill`/`stroke`/`shadow` are
|
|
35
|
-
* group-scoped paint ops in a `Graphics2D`, not per-shape slots, so defaulting
|
|
36
|
-
* them would change which shapes a group's paint covers. See
|
|
37
|
-
* {@link TEXT_SHAPING_KEYS}.
|
|
38
|
-
*
|
|
39
|
-
* A node that owns its typography opts out of the second channel with
|
|
40
|
-
* `ctx.pushTextStyle(null)`; `@motionscript/code`'s `Code` does exactly that.
|
|
41
|
-
*
|
|
42
|
-
* Layout-transparent like {@link Provider} — carries style, not appearance.
|
|
43
|
-
*/
|
|
44
|
-
export class DefaultTextStyle extends Node2D {
|
|
45
|
-
constructor(props) {
|
|
46
|
-
super(props);
|
|
47
|
-
}
|
|
48
|
-
provideContext(parent) {
|
|
49
|
-
const inherited = parent.get(TextStyleToken);
|
|
50
|
-
const merged = textOps.mergeStyle(inherited, this._props);
|
|
51
|
-
return merged === inherited ? parent : parent.with(TextStyleToken, merged);
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Open the render-context text-style scope around this node's children, so
|
|
55
|
-
* the `Graphics2D` they draw inherit the same defaults their `Text` nodes do.
|
|
56
|
-
*
|
|
57
|
-
* `super.renderContent` is what renders those children, so the scope has to
|
|
58
|
-
* wrap it — and be closed in a `finally`, since the stack outlives this node
|
|
59
|
-
* and a leaked frame would restyle every sibling drawn after it.
|
|
60
|
-
*/
|
|
61
|
-
renderContent(ctx) {
|
|
62
|
-
ctx.pushTextStyle(this.currentStyle());
|
|
63
|
-
try {
|
|
64
|
-
super.renderContent(ctx);
|
|
65
|
-
}
|
|
66
|
-
finally {
|
|
67
|
-
ctx.popTextStyle();
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* The keys this node currently sets, at their resolved values.
|
|
72
|
-
*
|
|
73
|
-
* Read off the properties rather than out of `_props` (which
|
|
74
|
-
* {@link provideContext} uses): a prop can be a callback or mid-tween, and a
|
|
75
|
-
* drawn op needs this frame's *value*. An unset prop defaults to `undefined`,
|
|
76
|
-
* which is the same "didn't set it" signal the context channel reads.
|
|
77
|
-
*/
|
|
78
|
-
currentStyle() {
|
|
79
|
-
return textOps.mergeStyle(EMPTY_TEXT_STYLE, this);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
__decorate([
|
|
83
|
-
property({ default: undefined })
|
|
84
|
-
], DefaultTextStyle.prototype, "fontFamily", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
property({ default: undefined })
|
|
87
|
-
], DefaultTextStyle.prototype, "fontSize", void 0);
|
|
88
|
-
__decorate([
|
|
89
|
-
property({ default: undefined })
|
|
90
|
-
], DefaultTextStyle.prototype, "fontWeight", void 0);
|
|
91
|
-
__decorate([
|
|
92
|
-
property({ default: undefined })
|
|
93
|
-
], DefaultTextStyle.prototype, "fontStyle", void 0);
|
|
94
|
-
__decorate([
|
|
95
|
-
property({ default: undefined })
|
|
96
|
-
], DefaultTextStyle.prototype, "letterSpacing", void 0);
|
|
97
|
-
__decorate([
|
|
98
|
-
property({ default: undefined })
|
|
99
|
-
], DefaultTextStyle.prototype, "lineHeight", void 0);
|
|
100
|
-
__decorate([
|
|
101
|
-
property({ default: undefined })
|
|
102
|
-
], DefaultTextStyle.prototype, "textAlign", void 0);
|
|
103
|
-
__decorate([
|
|
104
|
-
property({ default: undefined })
|
|
105
|
-
], DefaultTextStyle.prototype, "fill", void 0);
|
|
106
|
-
__decorate([
|
|
107
|
-
property({ default: undefined })
|
|
108
|
-
], DefaultTextStyle.prototype, "stroke", void 0);
|
|
109
|
-
__decorate([
|
|
110
|
-
property({ default: undefined })
|
|
111
|
-
], DefaultTextStyle.prototype, "shadow", void 0);
|
|
112
|
-
/**
|
|
113
|
-
* Apply text-style defaults to a `Text`/`RichText` node, for each style key the
|
|
114
|
-
* author didn't pass — the node end of {@link DefaultTextStyle}'s context
|
|
115
|
-
* channel, run once from the node's `resolveContext`.
|
|
116
|
-
*
|
|
117
|
-
* Precedence per key, highest to lowest: the author's own prop; the node's
|
|
118
|
-
* `variant` preset; the nearest enclosing `<DefaultTextStyle>`; the theme's
|
|
119
|
-
* `default` preset; and last the node's `@property` default, which its
|
|
120
|
-
* constructor already applied. Each value is written through the property
|
|
121
|
-
* setter, so a preset's `fill: 'brand-500'` is resolved exactly as if the author
|
|
122
|
-
* had written it. A node with no `'autofit'` size (`modes.autofit` false)
|
|
123
|
-
* skips an inherited `'autofit'`, keeping its own size.
|
|
124
|
-
*
|
|
125
|
-
* @internal
|
|
126
|
-
*/
|
|
127
|
-
export function applyTextDefaults(node, props, modes = { autofit: true }) {
|
|
128
|
-
const variant = props?.variant;
|
|
129
|
-
const cascade = textOps.mergeStyle(textOps.mergeStyle(textOps.preset("default"), node.useContext(TextStyleToken)), variant ? textOps.preset(variant) : undefined);
|
|
130
|
-
const target = node;
|
|
131
|
-
for (const key of TEXT_STYLE_KEYS) {
|
|
132
|
-
if (props?.[key] !== undefined)
|
|
133
|
-
continue;
|
|
134
|
-
const value = cascade[key];
|
|
135
|
-
// An unset `fontFamily` is legitimate: the renderer resolves it against the
|
|
136
|
-
// faces actually loaded, which core cannot see (`paragraph-layout.ts`'s `familyOf`).
|
|
137
|
-
if (value === undefined)
|
|
138
|
-
continue;
|
|
139
|
-
// A block of runs has no autofit mode (it is sized by its box), so an
|
|
140
|
-
// inherited `'autofit'` stays out, as `patchSpans` leaves it out of a span.
|
|
141
|
-
if (key === "fontSize" && value === "autofit" && !modes.autofit)
|
|
142
|
-
continue;
|
|
143
|
-
target[key] = value;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
//# sourceMappingURL=default-text-style-node.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"default-text-style-node.js","sourceRoot":"","sources":["../../../src/nodes/text/default-text-style-node.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,MAAM,EAA2B,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAoBnF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,OAAO,gBAAiB,SAAQ,MAA6B;IAY/D,YAAY,KAA0D;QACl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nimport { ContextMap } from \"@/util/context\";\r\nimport { TextStyleToken } from \"@/runtime/builtin-context\";\r\nimport { EMPTY_TEXT_STYLE, TEXT_STYLE_KEYS, textOps } from \"@/attributes/text/ops\";\r\nimport type { FontStyle, TextAlign, TextStyle } from \"@/attributes/text/types\";\r\nimport { Fill } from \"@/attributes/shape/fill/chain\";\r\nimport { type Stroke } from \"@/attributes/shape/stroke/stroke\";\r\nimport { type Shadow } from \"@/attributes/shape/shadow/shadow\";\r\nimport { type RenderPass2D } from \"@/render/render-context2d\";\r\n\r\nexport interface DefaultTextStyleProps extends Node2DProps {\r\n fontFamily: string;\r\n fontSize: number | 'autofit';\r\n fontWeight: number;\r\n fontStyle: FontStyle;\r\n letterSpacing: number;\r\n lineHeight: number;\r\n textAlign: TextAlign;\r\n fill: Fill;\r\n stroke: Stroke;\r\n shadow: Shadow;\r\n}\r\n\r\n/**\r\n * Sets default text styling for everything drawn below it — the {@link Text} /\r\n * {@link RichText} nodes *and* the raw `Graphics2D` `text`/`richText` ops a custom\r\n * node draws. A descendant inherits each style prop it didn't set itself, from\r\n * the nearest ancestor `DefaultTextStyle` that did — author-set props always win\r\n * over inherited ones. Nesting accumulates per key (an inner `fontSize` and an\r\n * outer `fontFamily` both apply).\r\n *\r\n * Two channels carry that, because a node and a drawing have nothing else in\r\n * common:\r\n *\r\n * - **Nodes**, through context. Built on the same machinery as {@link Provider}:\r\n * it contributes the built-in {@link TextStyleToken}, merging only the keys the\r\n * author explicitly passed onto any ancestor's defaults. It contributes the\r\n * author's *raw* prop values (not resolved cell values), so each consumer\r\n * resolves them once through its own mapper — e.g. `fill='red'` is resolved by\r\n * `Text`'s fill mapper, not pre-resolved here. {@link applyTextDefaults} is the\r\n * consuming end.\r\n * - **Graphics2D**, through the render context ({@link RenderContext2D.pushTextStyle}),\r\n * pushed around this node's children for the duration of their draw and folded\r\n * into each under-specified text op. A `Graphics2D` isn't in the tree and has no\r\n * bind step, so the draw scope is the only place it can inherit from.\r\n *\r\n * Only the *shaping* keys reach a drawn op — `fill`/`stroke`/`shadow` are\r\n * group-scoped paint ops in a `Graphics2D`, not per-shape slots, so defaulting\r\n * them would change which shapes a group's paint covers. See\r\n * {@link TEXT_SHAPING_KEYS}.\r\n *\r\n * A node that owns its typography opts out of the second channel with\r\n * `ctx.pushTextStyle(null)`; `@motionscript/code`'s `Code` does exactly that.\r\n *\r\n * Layout-transparent like {@link Provider} — carries style, not appearance.\r\n */\r\nexport class DefaultTextStyle extends Node2D<DefaultTextStyleProps> {\r\n @property({ default: undefined }) declare readonly fontFamily?: string;\r\n @property({ default: undefined }) declare readonly fontSize?: number | 'autofit';\r\n @property({ default: undefined }) declare readonly fontWeight?: number;\r\n @property({ default: undefined }) declare readonly fontStyle?: FontStyle;\r\n @property({ default: undefined }) declare readonly letterSpacing?: number;\r\n @property({ default: undefined }) declare readonly lineHeight?: number;\r\n @property({ default: undefined }) declare readonly textAlign?: TextAlign;\r\n @property({ default: undefined }) declare readonly fill?: Fill;\r\n @property({ default: undefined }) declare readonly stroke?: Stroke;\r\n @property({ default: undefined }) declare readonly shadow?: Shadow;\r\n\r\n constructor(props: NodeConfig<DefaultTextStyle, DefaultTextStyleProps>) {\r\n super(props);\r\n }\r\n\r\n protected override provideContext(parent: ContextMap): ContextMap {\r\n const inherited = parent.get(TextStyleToken);\r\n const merged = textOps.mergeStyle(inherited, this._props as TextStyle | undefined);\r\n return merged === inherited ? parent : parent.with(TextStyleToken, merged);\r\n }\r\n\r\n /**\r\n * Open the render-context text-style scope around this node's children, so\r\n * the `Graphics2D` they draw inherit the same defaults their `Text` nodes do.\r\n *\r\n * `super.renderContent` is what renders those children, so the scope has to\r\n * wrap it — and be closed in a `finally`, since the stack outlives this node\r\n * and a leaked frame would restyle every sibling drawn after it.\r\n */\r\n protected override renderContent(ctx: RenderPass2D): void {\r\n ctx.pushTextStyle(this.currentStyle());\r\n try {\r\n super.renderContent(ctx);\r\n } finally {\r\n ctx.popTextStyle();\r\n }\r\n }\r\n\r\n /**\r\n * The keys this node currently sets, at their resolved values.\r\n *\r\n * Read off the properties rather than out of `_props` (which\r\n * {@link provideContext} uses): a prop can be a callback or mid-tween, and a\r\n * drawn op needs this frame's *value*. An unset prop defaults to `undefined`,\r\n * which is the same \"didn't set it\" signal the context channel reads.\r\n */\r\n private currentStyle(): TextStyle {\r\n return textOps.mergeStyle(EMPTY_TEXT_STYLE, this);\r\n }\r\n}\r\n\r\n/**\r\n * Apply text-style defaults to a `Text`/`RichText` node, for each style key the\r\n * author didn't pass — the node end of {@link DefaultTextStyle}'s context\r\n * channel, run once from the node's `resolveContext`.\r\n *\r\n * Precedence per key, highest to lowest: the author's own prop; the node's\r\n * `variant` preset; the nearest enclosing `<DefaultTextStyle>`; the theme's\r\n * `default` preset; and last the node's `@property` default, which its\r\n * constructor already applied. Each value is written through the property\r\n * setter, so a preset's `fill: 'brand-500'` is resolved exactly as if the author\r\n * had written it. A node with no `'autofit'` size (`modes.autofit` false)\r\n * skips an inherited `'autofit'`, keeping its own size.\r\n *\r\n * @internal\r\n */\r\nexport function applyTextDefaults(\r\n node: Node2D,\r\n props?: Record<string, unknown>,\r\n modes: { autofit: boolean } = { autofit: true },\r\n): void {\r\n const variant = props?.variant as string | undefined;\r\n const cascade = textOps.mergeStyle(\r\n textOps.mergeStyle(textOps.preset(\"default\"), node.useContext(TextStyleToken)),\r\n variant ? textOps.preset(variant) : undefined,\r\n );\r\n const target = node as unknown as Record<string, unknown>;\r\n for (const key of TEXT_STYLE_KEYS) {\r\n if (props?.[key] !== undefined) continue;\r\n const value = cascade[key];\r\n // An unset `fontFamily` is legitimate: the renderer resolves it against the\r\n // faces actually loaded, which core cannot see (`paragraph-layout.ts`'s `familyOf`).\r\n if (value === undefined) continue;\r\n // A block of runs has no autofit mode (it is sized by its box), so an\r\n // inherited `'autofit'` stays out, as `patchSpans` leaves it out of a span.\r\n if (key === \"fontSize\" && value === \"autofit\" && !modes.autofit) continue;\r\n target[key] = value;\r\n }\r\n}\r\n"]}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* How a chart writes a number down.
|
|
3
|
-
*
|
|
4
|
-
* One formatter, driven by a **pattern**, and the named formats are patterns
|
|
5
|
-
* too — `currency` is `$#,##0.00` and nothing more. That is the whole design:
|
|
6
|
-
* a dropdown of four presets and a free-text pattern are otherwise two features
|
|
7
|
-
* that drift, one of them gaining a thousands separator or a negative sign the
|
|
8
|
-
* other never hears about. Here the preset *is* the custom case with the
|
|
9
|
-
* pattern filled in, so there is one set of rules to get right.
|
|
10
|
-
*
|
|
11
|
-
* The grammar is the spreadsheet one, because that is where the numbers come
|
|
12
|
-
* from and what an author already knows:
|
|
13
|
-
*
|
|
14
|
-
* | Pattern | 1234.5 | 0.07 |
|
|
15
|
-
* | ------------ | --------- | ------ |
|
|
16
|
-
* | `#,##0.##` | `1,234.5` | `0.07` |
|
|
17
|
-
* | `0` | `1235` | `0` |
|
|
18
|
-
* | `$#,##0.00` | `$1,234.50` | `$0.07` |
|
|
19
|
-
* | `0.#%` | `123450%` | `7%` |
|
|
20
|
-
* | `#,##0 kg` | `1,235 kg` | `0 kg` |
|
|
21
|
-
*
|
|
22
|
-
* - `0` is a digit that is always written, `#` one that is written only when
|
|
23
|
-
* the number needs it. So `0.00` pads to two decimals and `0.##` trims.
|
|
24
|
-
* - A `,` anywhere in the integer run turns grouping on; where it sits doesn't
|
|
25
|
-
* matter, since `#,##0` and `#,###,##0` mean the same thing to everyone who
|
|
26
|
-
* writes them.
|
|
27
|
-
* - `%` scales by 100 as well as printing — that is what makes it a percent
|
|
28
|
-
* rather than a suffix, and it is why `0.07` under `0.#%` is `7%`. A column
|
|
29
|
-
* that is *already* in percent points wants `#,##0'%'`: quoted, so the sign
|
|
30
|
-
* is printed and nothing is scaled.
|
|
31
|
-
* - Anything else is literal, before the digits or after them. Quote it to be
|
|
32
|
-
* sure — `'#'#,##0` prints a leading hash.
|
|
33
|
-
*
|
|
34
|
-
* Deliberately **not** `Intl.NumberFormat`. Its output is locale-dependent, and
|
|
35
|
-
* a chart is a picture with a fixed layout: the same project rendering
|
|
36
|
-
* `1,234.50` on the author's machine and `1.234,50` on the export box is a
|
|
37
|
-
* silently different image, and the wider string can reflow an axis. What an
|
|
38
|
-
* author wants here is the format they *typed*.
|
|
39
|
-
*/
|
|
40
|
-
/** The named formats the inspector offers, plus the escape hatch. */
|
|
41
|
-
export type NumberFormatName = "plain" | "number" | "currency" | "percent" | "custom";
|
|
42
|
-
/**
|
|
43
|
-
* The pattern behind each named format.
|
|
44
|
-
*
|
|
45
|
-
* `plain` is the historic behaviour — integers bare, everything else to one
|
|
46
|
-
* decimal — kept as the default so no existing chart re-labels itself. The rest
|
|
47
|
-
* are the three formats a chart of money, counts or shares actually needs.
|
|
48
|
-
*/
|
|
49
|
-
export declare const NUMBER_PATTERNS: Record<Exclude<NumberFormatName, "custom">, string>;
|
|
50
|
-
/**
|
|
51
|
-
* `value` written the way `pattern` says.
|
|
52
|
-
*
|
|
53
|
-
* A non-finite value prints empty rather than `NaN`: a tick with no number
|
|
54
|
-
* behind it is a tick that shouldn't caption itself, and `NaN` on an axis reads
|
|
55
|
-
* as a broken chart rather than as missing data.
|
|
56
|
-
*/
|
|
57
|
-
export declare function formatNumber(value: number, pattern: string): string;
|
|
58
|
-
/**
|
|
59
|
-
* The pattern a `(format, custom)` pair names.
|
|
60
|
-
*
|
|
61
|
-
* A blank custom pattern falls back to the plain one rather than to the empty
|
|
62
|
-
* string, so an axis switched to Custom is readable while it is being typed
|
|
63
|
-
* into rather than a column of nothing.
|
|
64
|
-
*/
|
|
65
|
-
export declare function patternFor(format: NumberFormatName | undefined, custom: string | undefined): string;
|
|
66
|
-
//# sourceMappingURL=number-format.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"number-format.d.ts","sourceRoot":"","sources":["../../../src/nodes/text/number-format.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,qEAAqE;AACrE,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAA;AAErF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,OAAO,CAAC,gBAAgB,EAAE,QAAQ,CAAC,EAAE,MAAM,CAQ/E,CAAA;AA6JD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAqBnE;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,gBAAgB,GAAG,SAAS,EACpC,MAAM,EAAE,MAAM,GAAG,SAAS,GACzB,MAAM,CAMR"}
|
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* How a chart writes a number down.
|
|
3
|
-
*
|
|
4
|
-
* One formatter, driven by a **pattern**, and the named formats are patterns
|
|
5
|
-
* too — `currency` is `$#,##0.00` and nothing more. That is the whole design:
|
|
6
|
-
* a dropdown of four presets and a free-text pattern are otherwise two features
|
|
7
|
-
* that drift, one of them gaining a thousands separator or a negative sign the
|
|
8
|
-
* other never hears about. Here the preset *is* the custom case with the
|
|
9
|
-
* pattern filled in, so there is one set of rules to get right.
|
|
10
|
-
*
|
|
11
|
-
* The grammar is the spreadsheet one, because that is where the numbers come
|
|
12
|
-
* from and what an author already knows:
|
|
13
|
-
*
|
|
14
|
-
* | Pattern | 1234.5 | 0.07 |
|
|
15
|
-
* | ------------ | --------- | ------ |
|
|
16
|
-
* | `#,##0.##` | `1,234.5` | `0.07` |
|
|
17
|
-
* | `0` | `1235` | `0` |
|
|
18
|
-
* | `$#,##0.00` | `$1,234.50` | `$0.07` |
|
|
19
|
-
* | `0.#%` | `123450%` | `7%` |
|
|
20
|
-
* | `#,##0 kg` | `1,235 kg` | `0 kg` |
|
|
21
|
-
*
|
|
22
|
-
* - `0` is a digit that is always written, `#` one that is written only when
|
|
23
|
-
* the number needs it. So `0.00` pads to two decimals and `0.##` trims.
|
|
24
|
-
* - A `,` anywhere in the integer run turns grouping on; where it sits doesn't
|
|
25
|
-
* matter, since `#,##0` and `#,###,##0` mean the same thing to everyone who
|
|
26
|
-
* writes them.
|
|
27
|
-
* - `%` scales by 100 as well as printing — that is what makes it a percent
|
|
28
|
-
* rather than a suffix, and it is why `0.07` under `0.#%` is `7%`. A column
|
|
29
|
-
* that is *already* in percent points wants `#,##0'%'`: quoted, so the sign
|
|
30
|
-
* is printed and nothing is scaled.
|
|
31
|
-
* - Anything else is literal, before the digits or after them. Quote it to be
|
|
32
|
-
* sure — `'#'#,##0` prints a leading hash.
|
|
33
|
-
*
|
|
34
|
-
* Deliberately **not** `Intl.NumberFormat`. Its output is locale-dependent, and
|
|
35
|
-
* a chart is a picture with a fixed layout: the same project rendering
|
|
36
|
-
* `1,234.50` on the author's machine and `1.234,50` on the export box is a
|
|
37
|
-
* silently different image, and the wider string can reflow an axis. What an
|
|
38
|
-
* author wants here is the format they *typed*.
|
|
39
|
-
*/
|
|
40
|
-
/**
|
|
41
|
-
* The pattern behind each named format.
|
|
42
|
-
*
|
|
43
|
-
* `plain` is the historic behaviour — integers bare, everything else to one
|
|
44
|
-
* decimal — kept as the default so no existing chart re-labels itself. The rest
|
|
45
|
-
* are the three formats a chart of money, counts or shares actually needs.
|
|
46
|
-
*/
|
|
47
|
-
export const NUMBER_PATTERNS = {
|
|
48
|
-
// Ungrouped on purpose: this is what `formatMarker` did before there were
|
|
49
|
-
// formats at all, and it is the default, so every chart already drawn keeps
|
|
50
|
-
// the labels it has. Grouping is what the reader picks `number` for.
|
|
51
|
-
plain: "#.#",
|
|
52
|
-
number: "#,##0.##",
|
|
53
|
-
currency: "$#,##0.00",
|
|
54
|
-
percent: "#,##0.#%",
|
|
55
|
-
};
|
|
56
|
-
/** What a pattern with no digits in it falls back to: the `plain` reading. */
|
|
57
|
-
const DEFAULT_PARSED = {
|
|
58
|
-
prefix: "",
|
|
59
|
-
suffix: "",
|
|
60
|
-
grouped: false,
|
|
61
|
-
minInt: 1,
|
|
62
|
-
minFrac: 0,
|
|
63
|
-
maxFrac: 1,
|
|
64
|
-
percent: false,
|
|
65
|
-
};
|
|
66
|
-
/** Walk `text`, calling `visit` with each character and whether it is quoted. */
|
|
67
|
-
function scan(text, visit) {
|
|
68
|
-
let quoted = false;
|
|
69
|
-
for (const ch of text) {
|
|
70
|
-
if (ch === "'") {
|
|
71
|
-
quoted = !quoted;
|
|
72
|
-
continue;
|
|
73
|
-
}
|
|
74
|
-
visit(ch, quoted);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
/** Does `text` hold `ch` outside quotes? */
|
|
78
|
-
function hasBare(text, ch) {
|
|
79
|
-
let found = false;
|
|
80
|
-
scan(text, (c, quoted) => {
|
|
81
|
-
if (c === ch && !quoted)
|
|
82
|
-
found = true;
|
|
83
|
-
});
|
|
84
|
-
return found;
|
|
85
|
-
}
|
|
86
|
-
/** `text` with every unquoted `ch` dropped, quoting preserved. */
|
|
87
|
-
function removeBare(text, ch) {
|
|
88
|
-
let out = "";
|
|
89
|
-
let quoted = false;
|
|
90
|
-
for (const c of text) {
|
|
91
|
-
if (c === "'") {
|
|
92
|
-
quoted = !quoted;
|
|
93
|
-
out += c;
|
|
94
|
-
continue;
|
|
95
|
-
}
|
|
96
|
-
if (c === ch && !quoted)
|
|
97
|
-
continue;
|
|
98
|
-
out += c;
|
|
99
|
-
}
|
|
100
|
-
return out;
|
|
101
|
-
}
|
|
102
|
-
/** `text` with its quotes taken off — what actually gets printed. */
|
|
103
|
-
function literal(text) {
|
|
104
|
-
let out = "";
|
|
105
|
-
scan(text, (ch) => {
|
|
106
|
-
out += ch;
|
|
107
|
-
});
|
|
108
|
-
return out;
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* The `[start, end)` of the pattern's digit run — the first stretch of `#0,.`
|
|
112
|
-
* outside quotes.
|
|
113
|
-
*
|
|
114
|
-
* Quote-aware, so `'#'#,##0` reads its leading hash as text and its run as the
|
|
115
|
-
* three characters after it. Without that, a quoted `#` would be taken for the
|
|
116
|
-
* number and the real digits for a suffix.
|
|
117
|
-
*/
|
|
118
|
-
function digitRun(pattern) {
|
|
119
|
-
let quoted = false;
|
|
120
|
-
let start = -1;
|
|
121
|
-
for (let i = 0; i < pattern.length; i++) {
|
|
122
|
-
const ch = pattern[i];
|
|
123
|
-
if (ch === "'") {
|
|
124
|
-
quoted = !quoted;
|
|
125
|
-
if (start >= 0)
|
|
126
|
-
return [start, i];
|
|
127
|
-
continue;
|
|
128
|
-
}
|
|
129
|
-
const isDigit = !quoted && "#0,.".includes(ch);
|
|
130
|
-
if (isDigit && start < 0)
|
|
131
|
-
start = i;
|
|
132
|
-
else if (!isDigit && start >= 0)
|
|
133
|
-
return [start, i];
|
|
134
|
-
}
|
|
135
|
-
return start < 0 ? null : [start, pattern.length];
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Split `pattern` into its literal edges and its digit run.
|
|
139
|
-
*
|
|
140
|
-
* Everything before the run is a prefix and everything after it a suffix, which
|
|
141
|
-
* is what lets `$#,##0.00`, `#,##0 kg` and `€ #,##0` all work without the
|
|
142
|
-
* language needing a quoting rule for the parts that are only ever text.
|
|
143
|
-
*/
|
|
144
|
-
function parsePattern(pattern) {
|
|
145
|
-
const run = digitRun(pattern);
|
|
146
|
-
if (!run) {
|
|
147
|
-
// No digits at all is not a number format. Fall back rather than print the
|
|
148
|
-
// literal for every tick, which would read as an axis of identical labels.
|
|
149
|
-
return DEFAULT_PARSED;
|
|
150
|
-
}
|
|
151
|
-
const digits = pattern.slice(run[0], run[1]);
|
|
152
|
-
const rawPrefix = pattern.slice(0, run[0]);
|
|
153
|
-
const rawSuffix = pattern.slice(run[1]);
|
|
154
|
-
// An **unquoted** `%` is the percent operator; a quoted one is a sign the
|
|
155
|
-
// author wants printed over data that is already in percent points.
|
|
156
|
-
const percent = hasBare(rawPrefix, "%") || hasBare(rawSuffix, "%");
|
|
157
|
-
const prefix = literal(percent ? removeBare(rawPrefix, "%") : rawPrefix);
|
|
158
|
-
const suffix = literal(percent ? removeBare(rawSuffix, "%") : rawSuffix);
|
|
159
|
-
const point = digits.indexOf(".");
|
|
160
|
-
const intPart = point < 0 ? digits : digits.slice(0, point);
|
|
161
|
-
const fracPart = point < 0 ? "" : digits.slice(point + 1);
|
|
162
|
-
const count = (s, ch) => s.split(ch).length - 1;
|
|
163
|
-
return {
|
|
164
|
-
prefix,
|
|
165
|
-
suffix: percent ? `${suffix}%` : suffix,
|
|
166
|
-
grouped: intPart.includes(","),
|
|
167
|
-
minInt: Math.max(1, count(intPart, "0")),
|
|
168
|
-
minFrac: count(fracPart, "0"),
|
|
169
|
-
maxFrac: fracPart.length,
|
|
170
|
-
percent,
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
/** Parsed patterns are reused across every tick of every frame. */
|
|
174
|
-
const cache = new Map();
|
|
175
|
-
function parsed(pattern) {
|
|
176
|
-
const held = cache.get(pattern);
|
|
177
|
-
if (held)
|
|
178
|
-
return held;
|
|
179
|
-
const next = parsePattern(pattern);
|
|
180
|
-
cache.set(pattern, next);
|
|
181
|
-
return next;
|
|
182
|
-
}
|
|
183
|
-
/** `1234567` → `1,234,567`. Only the integer run is grouped. */
|
|
184
|
-
function group(digits) {
|
|
185
|
-
return digits.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* `value` written the way `pattern` says.
|
|
189
|
-
*
|
|
190
|
-
* A non-finite value prints empty rather than `NaN`: a tick with no number
|
|
191
|
-
* behind it is a tick that shouldn't caption itself, and `NaN` on an axis reads
|
|
192
|
-
* as a broken chart rather than as missing data.
|
|
193
|
-
*/
|
|
194
|
-
export function formatNumber(value, pattern) {
|
|
195
|
-
if (!Number.isFinite(value))
|
|
196
|
-
return "";
|
|
197
|
-
const p = parsed(pattern);
|
|
198
|
-
const scaled = p.percent ? value * 100 : value;
|
|
199
|
-
const rounded = scaled.toFixed(p.maxFrac);
|
|
200
|
-
// Rounding is what decides the sign, not the input: -0.001 at two decimals is
|
|
201
|
-
// "0.00", and printing it as "-0.00" puts a minus sign on an axis's zero.
|
|
202
|
-
const negative = rounded.startsWith("-");
|
|
203
|
-
const [rawInt = "0", rawFrac = ""] = (negative ? rounded.slice(1) : rounded).split(".");
|
|
204
|
-
const intDigits = rawInt.padStart(p.minInt, "0");
|
|
205
|
-
// `#` trims, `0` pads: drop trailing zeros down to the required minimum.
|
|
206
|
-
let frac = rawFrac;
|
|
207
|
-
while (frac.length > p.minFrac && frac.endsWith("0"))
|
|
208
|
-
frac = frac.slice(0, -1);
|
|
209
|
-
const body = (p.grouped ? group(intDigits) : intDigits) + (frac ? `.${frac}` : "");
|
|
210
|
-
const sign = negative && Number(rounded) !== 0 ? "-" : "";
|
|
211
|
-
return `${sign}${p.prefix}${body}${p.suffix}`;
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* The pattern a `(format, custom)` pair names.
|
|
215
|
-
*
|
|
216
|
-
* A blank custom pattern falls back to the plain one rather than to the empty
|
|
217
|
-
* string, so an axis switched to Custom is readable while it is being typed
|
|
218
|
-
* into rather than a column of nothing.
|
|
219
|
-
*/
|
|
220
|
-
export function patternFor(format, custom) {
|
|
221
|
-
if (format === "custom") {
|
|
222
|
-
const trimmed = custom?.trim() ?? "";
|
|
223
|
-
return trimmed === "" ? NUMBER_PATTERNS.plain : trimmed;
|
|
224
|
-
}
|
|
225
|
-
return NUMBER_PATTERNS[format ?? "plain"] ?? NUMBER_PATTERNS.plain;
|
|
226
|
-
}
|
|
227
|
-
//# sourceMappingURL=number-format.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"number-format.js","sourceRoot":"","sources":["../../../src/nodes/text/number-format.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA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IACzD,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,CAAA;AAC/C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CACxB,MAAoC,EACpC,MAA0B;IAE1B,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;QACxB,MAAM,OAAO,GAAG,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA;QACpC,OAAO,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAA;IACzD,CAAC;IACD,OAAO,eAAe,CAAC,MAAM,IAAI,OAAO,CAAC,IAAI,eAAe,CAAC,KAAK,CAAA;AACpE,CAAC","sourcesContent":["/**\r\n * How a chart writes a number down.\r\n *\r\n * One formatter, driven by a **pattern**, and the named formats are patterns\r\n * too — `currency` is `$#,##0.00` and nothing more. That is the whole design:\r\n * a dropdown of four presets and a free-text pattern are otherwise two features\r\n * that drift, one of them gaining a thousands separator or a negative sign the\r\n * other never hears about. Here the preset *is* the custom case with the\r\n * pattern filled in, so there is one set of rules to get right.\r\n *\r\n * The grammar is the spreadsheet one, because that is where the numbers come\r\n * from and what an author already knows:\r\n *\r\n * | Pattern | 1234.5 | 0.07 |\r\n * | ------------ | --------- | ------ |\r\n * | `#,##0.##` | `1,234.5` | `0.07` |\r\n * | `0` | `1235` | `0` |\r\n * | `$#,##0.00` | `$1,234.50` | `$0.07` |\r\n * | `0.#%` | `123450%` | `7%` |\r\n * | `#,##0 kg` | `1,235 kg` | `0 kg` |\r\n *\r\n * - `0` is a digit that is always written, `#` one that is written only when\r\n * the number needs it. So `0.00` pads to two decimals and `0.##` trims.\r\n * - A `,` anywhere in the integer run turns grouping on; where it sits doesn't\r\n * matter, since `#,##0` and `#,###,##0` mean the same thing to everyone who\r\n * writes them.\r\n * - `%` scales by 100 as well as printing — that is what makes it a percent\r\n * rather than a suffix, and it is why `0.07` under `0.#%` is `7%`. A column\r\n * that is *already* in percent points wants `#,##0'%'`: quoted, so the sign\r\n * is printed and nothing is scaled.\r\n * - Anything else is literal, before the digits or after them. Quote it to be\r\n * sure — `'#'#,##0` prints a leading hash.\r\n *\r\n * Deliberately **not** `Intl.NumberFormat`. Its output is locale-dependent, and\r\n * a chart is a picture with a fixed layout: the same project rendering\r\n * `1,234.50` on the author's machine and `1.234,50` on the export box is a\r\n * silently different image, and the wider string can reflow an axis. What an\r\n * author wants here is the format they *typed*.\r\n */\r\n\r\n/** The named formats the inspector offers, plus the escape hatch. */\r\nexport type NumberFormatName = \"plain\" | \"number\" | \"currency\" | \"percent\" | \"custom\"\r\n\r\n/**\r\n * The pattern behind each named format.\r\n *\r\n * `plain` is the historic behaviour — integers bare, everything else to one\r\n * decimal — kept as the default so no existing chart re-labels itself. The rest\r\n * are the three formats a chart of money, counts or shares actually needs.\r\n */\r\nexport const NUMBER_PATTERNS: Record<Exclude<NumberFormatName, \"custom\">, string> = {\r\n // Ungrouped on purpose: this is what `formatMarker` did before there were\r\n // formats at all, and it is the default, so every chart already drawn keeps\r\n // the labels it has. Grouping is what the reader picks `number` for.\r\n plain: \"#.#\",\r\n number: \"#,##0.##\",\r\n currency: \"$#,##0.00\",\r\n percent: \"#,##0.#%\",\r\n}\r\n\r\n/** A pattern taken apart once, so formatting a tick is not a parse. */\r\ninterface ParsedPattern {\r\n prefix: string\r\n suffix: string\r\n grouped: boolean\r\n /** Digits always written left of the point — the count of `0`s there. */\r\n minInt: number\r\n /** Digits always written right of it. */\r\n minFrac: number\r\n /** The most that may be written right of it. */\r\n maxFrac: number\r\n /** Scale by 100 and print a `%`. */\r\n percent: boolean\r\n}\r\n\r\n/** What a pattern with no digits in it falls back to: the `plain` reading. */\r\nconst DEFAULT_PARSED: ParsedPattern = {\r\n prefix: \"\",\r\n suffix: \"\",\r\n grouped: false,\r\n minInt: 1,\r\n minFrac: 0,\r\n maxFrac: 1,\r\n percent: false,\r\n}\r\n\r\n/** Walk `text`, calling `visit` with each character and whether it is quoted. */\r\nfunction scan(text: string, visit: (ch: string, quoted: boolean) => void): void {\r\n let quoted = false\r\n for (const ch of text) {\r\n if (ch === \"'\") {\r\n quoted = !quoted\r\n continue\r\n }\r\n visit(ch, quoted)\r\n }\r\n}\r\n\r\n/** Does `text` hold `ch` outside quotes? */\r\nfunction hasBare(text: string, ch: string): boolean {\r\n let found = false\r\n scan(text, (c, quoted) => {\r\n if (c === ch && !quoted) found = true\r\n })\r\n return found\r\n}\r\n\r\n/** `text` with every unquoted `ch` dropped, quoting preserved. */\r\nfunction removeBare(text: string, ch: string): string {\r\n let out = \"\"\r\n let quoted = false\r\n for (const c of text) {\r\n if (c === \"'\") {\r\n quoted = !quoted\r\n out += c\r\n continue\r\n }\r\n if (c === ch && !quoted) continue\r\n out += c\r\n }\r\n return out\r\n}\r\n\r\n/** `text` with its quotes taken off — what actually gets printed. */\r\nfunction literal(text: string): string {\r\n let out = \"\"\r\n scan(text, (ch) => {\r\n out += ch\r\n })\r\n return out\r\n}\r\n\r\n/**\r\n * The `[start, end)` of the pattern's digit run — the first stretch of `#0,.`\r\n * outside quotes.\r\n *\r\n * Quote-aware, so `'#'#,##0` reads its leading hash as text and its run as the\r\n * three characters after it. Without that, a quoted `#` would be taken for the\r\n * number and the real digits for a suffix.\r\n */\r\nfunction digitRun(pattern: string): [number, number] | null {\r\n let quoted = false\r\n let start = -1\r\n for (let i = 0; i < pattern.length; i++) {\r\n const ch = pattern[i]\r\n if (ch === \"'\") {\r\n quoted = !quoted\r\n if (start >= 0) return [start, i]\r\n continue\r\n }\r\n const isDigit = !quoted && \"#0,.\".includes(ch)\r\n if (isDigit && start < 0) start = i\r\n else if (!isDigit && start >= 0) return [start, i]\r\n }\r\n return start < 0 ? null : [start, pattern.length]\r\n}\r\n\r\n/**\r\n * Split `pattern` into its literal edges and its digit run.\r\n *\r\n * Everything before the run is a prefix and everything after it a suffix, which\r\n * is what lets `$#,##0.00`, `#,##0 kg` and `€ #,##0` all work without the\r\n * language needing a quoting rule for the parts that are only ever text.\r\n */\r\nfunction parsePattern(pattern: string): ParsedPattern {\r\n const run = digitRun(pattern)\r\n if (!run) {\r\n // No digits at all is not a number format. Fall back rather than print the\r\n // literal for every tick, which would read as an axis of identical labels.\r\n return DEFAULT_PARSED\r\n }\r\n\r\n const digits = pattern.slice(run[0], run[1])\r\n const rawPrefix = pattern.slice(0, run[0])\r\n const rawSuffix = pattern.slice(run[1])\r\n\r\n // An **unquoted** `%` is the percent operator; a quoted one is a sign the\r\n // author wants printed over data that is already in percent points.\r\n const percent = hasBare(rawPrefix, \"%\") || hasBare(rawSuffix, \"%\")\r\n const prefix = literal(percent ? removeBare(rawPrefix, \"%\") : rawPrefix)\r\n const suffix = literal(percent ? removeBare(rawSuffix, \"%\") : rawSuffix)\r\n\r\n const point = digits.indexOf(\".\")\r\n const intPart = point < 0 ? digits : digits.slice(0, point)\r\n const fracPart = point < 0 ? \"\" : digits.slice(point + 1)\r\n\r\n const count = (s: string, ch: string) => s.split(ch).length - 1\r\n\r\n return {\r\n prefix,\r\n suffix: percent ? `${suffix}%` : suffix,\r\n grouped: intPart.includes(\",\"),\r\n minInt: Math.max(1, count(intPart, \"0\")),\r\n minFrac: count(fracPart, \"0\"),\r\n maxFrac: fracPart.length,\r\n percent,\r\n }\r\n}\r\n\r\n/** Parsed patterns are reused across every tick of every frame. */\r\nconst cache = new Map<string, ParsedPattern>()\r\n\r\nfunction parsed(pattern: string): ParsedPattern {\r\n const held = cache.get(pattern)\r\n if (held) return held\r\n const next = parsePattern(pattern)\r\n cache.set(pattern, next)\r\n return next\r\n}\r\n\r\n/** `1234567` → `1,234,567`. Only the integer run is grouped. */\r\nfunction group(digits: string): string {\r\n return digits.replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\")\r\n}\r\n\r\n/**\r\n * `value` written the way `pattern` says.\r\n *\r\n * A non-finite value prints empty rather than `NaN`: a tick with no number\r\n * behind it is a tick that shouldn't caption itself, and `NaN` on an axis reads\r\n * as a broken chart rather than as missing data.\r\n */\r\nexport function formatNumber(value: number, pattern: string): string {\r\n if (!Number.isFinite(value)) return \"\"\r\n const p = parsed(pattern)\r\n\r\n const scaled = p.percent ? value * 100 : value\r\n const rounded = scaled.toFixed(p.maxFrac)\r\n // Rounding is what decides the sign, not the input: -0.001 at two decimals is\r\n // \"0.00\", and printing it as \"-0.00\" puts a minus sign on an axis's zero.\r\n const negative = rounded.startsWith(\"-\")\r\n const [rawInt = \"0\", rawFrac = \"\"] = (\r\n negative ? rounded.slice(1) : rounded\r\n ).split(\".\")\r\n\r\n const intDigits = rawInt.padStart(p.minInt, \"0\")\r\n // `#` trims, `0` pads: drop trailing zeros down to the required minimum.\r\n let frac = rawFrac\r\n while (frac.length > p.minFrac && frac.endsWith(\"0\")) frac = frac.slice(0, -1)\r\n\r\n const body = (p.grouped ? group(intDigits) : intDigits) + (frac ? `.${frac}` : \"\")\r\n const sign = negative && Number(rounded) !== 0 ? \"-\" : \"\"\r\n return `${sign}${p.prefix}${body}${p.suffix}`\r\n}\r\n\r\n/**\r\n * The pattern a `(format, custom)` pair names.\r\n *\r\n * A blank custom pattern falls back to the plain one rather than to the empty\r\n * string, so an axis switched to Custom is readable while it is being typed\r\n * into rather than a column of nothing.\r\n */\r\nexport function patternFor(\r\n format: NumberFormatName | undefined,\r\n custom: string | undefined\r\n): string {\r\n if (format === \"custom\") {\r\n const trimmed = custom?.trim() ?? \"\"\r\n return trimmed === \"\" ? NUMBER_PATTERNS.plain : trimmed\r\n }\r\n return NUMBER_PATTERNS[format ?? \"plain\"] ?? NUMBER_PATTERNS.plain\r\n}\r\n"]}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { NodeConfig } from "../../nodes/2d/node2d.js";
|
|
2
|
-
import { TextBase, TextBaseProps } from "./text-base.js";
|
|
3
|
-
import { type Command, type CommandArgs } from "../../tween/command.js";
|
|
4
|
-
/**
|
|
5
|
-
* How a {@link NumberNode}'s value is written down.
|
|
6
|
-
*
|
|
7
|
-
* `'custom'` hands the pattern over verbatim through
|
|
8
|
-
* {@link NumberProps.customPattern}; the other three compose one from
|
|
9
|
-
* {@link NumberProps.fractionDigits} and {@link NumberProps.grouped}.
|
|
10
|
-
*/
|
|
11
|
-
export type NumberFormat = "currency" | "percent" | "number" | "custom";
|
|
12
|
-
export interface NumberProps extends TextBaseProps {
|
|
13
|
-
/** The numeric value to display. Tweenable — `to({ value })` counts. */
|
|
14
|
-
value: number;
|
|
15
|
-
/**
|
|
16
|
-
* How the figure is written:
|
|
17
|
-
* - `'number'` — plain decimal (the default)
|
|
18
|
-
* - `'currency'` — money, prefixed with {@link NumberProps.currencySymbol}
|
|
19
|
-
* - `'percent'` — multiplies by 100 and appends `%` (so `0.42` → `42%`)
|
|
20
|
-
* - `'custom'` — {@link NumberProps.customPattern}, verbatim
|
|
21
|
-
*/
|
|
22
|
-
format: NumberFormat;
|
|
23
|
-
/**
|
|
24
|
-
* The pattern, when {@link NumberProps.format} is `'custom'` — the same
|
|
25
|
-
* grammar `formatNumber` takes (`#,##0.00`, `0.0%`, `$#,##0`).
|
|
26
|
-
*/
|
|
27
|
-
customPattern: string;
|
|
28
|
-
/**
|
|
29
|
-
* Fixed number of decimal places. Always exactly this many, which is what
|
|
30
|
-
* keeps a counting animation from flickering trailing digits as the value
|
|
31
|
-
* crosses an integer boundary.
|
|
32
|
-
*/
|
|
33
|
-
fractionDigits: number;
|
|
34
|
-
/** Group digits in threes — `1,000` rather than `1000`. */
|
|
35
|
-
grouped: boolean;
|
|
36
|
-
/** The symbol a `'currency'` figure is prefixed with. */
|
|
37
|
-
currencySymbol: string;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Renders a number through this package's own formatter, so the string is a
|
|
41
|
-
* function of the props alone.
|
|
42
|
-
*
|
|
43
|
-
* **Deliberately not `Intl.NumberFormat`.** A scene is a picture with a fixed
|
|
44
|
-
* layout, and `Intl` reads the *host* locale — so the same project renders
|
|
45
|
-
* `1,234.50` on the author's machine and `1.234,50` on an export box, which is
|
|
46
|
-
* a silently different image, and a wider string reflows the shot around it.
|
|
47
|
-
* The same formatter draws a chart axis (`formatNumber`), so a figure and an
|
|
48
|
-
* axis label in one scene agree about grouping, rounding, and the sign on a
|
|
49
|
-
* value that rounds to zero.
|
|
50
|
-
*
|
|
51
|
-
* **A sibling of {@link Text}, not a subclass of it.** Both extend
|
|
52
|
-
* {@link TextBase} and so share every font, fill, layout and measurement
|
|
53
|
-
* behaviour — but a figure is not copy. It has no `text` prop to type into, no
|
|
54
|
-
* `append`/`prepend`, no `find`/`word`/`line` selections and no wrapping,
|
|
55
|
-
* because none of those are operations anyone performs on a quantity; what it
|
|
56
|
-
* draws is derived from {@link value} and the five format props and nothing
|
|
57
|
-
* else can write it. `start`/`end` are still the Write On reveal window every
|
|
58
|
-
* glyph node reinterprets them as.
|
|
59
|
-
*
|
|
60
|
-
* Because {@link value} is a plain numeric prop, `to({ value })` interpolates
|
|
61
|
-
* it like any other number, giving a counting / rolling animation for free.
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* const price = createRef<NumberNode>();
|
|
65
|
-
* <NumberNode ref={price} value={0} format={'currency'} fractionDigits={2} />
|
|
66
|
-
* price().to({ value: 1299.99 }, 1.5); // counts up to "$1,299.99"
|
|
67
|
-
*/
|
|
68
|
-
export declare class NumberNode extends TextBase<NumberProps> {
|
|
69
|
-
readonly value: number;
|
|
70
|
-
readonly format: NumberFormat;
|
|
71
|
-
readonly customPattern: string;
|
|
72
|
-
readonly fractionDigits: number;
|
|
73
|
-
readonly grouped: boolean;
|
|
74
|
-
readonly currencySymbol: string;
|
|
75
|
-
constructor(props: NodeConfig<NumberNode, NumberProps>);
|
|
76
|
-
/**
|
|
77
|
-
* The figure as the format props write it.
|
|
78
|
-
*
|
|
79
|
-
* {@link TextBase} calls this wherever it needs the string — measuring,
|
|
80
|
-
* declaring fonts, drawing — so the six props are read fresh every frame:
|
|
81
|
-
* changing a format, or tweening the value, reformats and redraws without
|
|
82
|
-
* this class owning a binding of its own.
|
|
83
|
-
*/
|
|
84
|
-
displayText(): string;
|
|
85
|
-
/** The figure as the format props write it. The public name for {@link displayText}. */
|
|
86
|
-
formatted(): string;
|
|
87
|
-
/** Animate {@link value}, counting through the formatted display. */
|
|
88
|
-
countTo(args: CommandArgs<{
|
|
89
|
-
value: number;
|
|
90
|
-
}> & {
|
|
91
|
-
duration: number;
|
|
92
|
-
}): Command<NumberProps>;
|
|
93
|
-
}
|
|
94
|
-
//# sourceMappingURL=number-node.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"number-node.d.ts","sourceRoot":"","sources":["../../../src/nodes/text/number-node.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGtD,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAIjE;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAGxE,MAAM,WAAW,WAAY,SAAQ,aAAa;IAC9C,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;OAMG;IACH,MAAM,EAAE,YAAY,CAAC;IACrB;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB,2DAA2D;IAC3D,OAAO,EAAE,OAAO,CAAC;IACjB,yDAAyD;IACzD,cAAc,EAAE,MAAM,CAAC;CAC1B;AAGD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,qBAAa,UAAW,SAAQ,QAAQ,CAAC,WAAW,CAAC;IAEjD,SAA2C,KAAK,EAAE,MAAM,CAAC;IACzD,SAAkD,MAAM,EAAE,YAAY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