@motionscript/core 0.1.0-alpha.8 → 0.1.0
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 +25 -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.d.ts.map +1 -1
- package/dist/attributes/shape/fill/color/parser.js +20 -5
- 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-CCGVIR4F.js +3 -0
- package/dist/browser/chunks/chunk-CCGVIR4F.js.map +7 -0
- package/dist/browser/chunks/chunk-N4WSN5WY.js +13 -0
- package/dist/browser/chunks/chunk-N4WSN5WY.js.map +7 -0
- package/dist/browser/chunks/chunk-WZSI3GSK.js +6 -0
- package/dist/browser/chunks/chunk-WZSI3GSK.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/manifest.json +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.d.ts.map +1 -1
- package/dist/components/factory/views.js +41 -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.d.ts +3 -4
- package/dist/components/trees/node/node-reactive.d.ts.map +1 -1
- package/dist/components/trees/node/node-reactive.js +13 -10
- 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.d.ts +8 -0
- package/dist/document/command-traits.d.ts.map +1 -1
- package/dist/document/command-traits.js +17 -0
- 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.d.ts +6 -0
- package/dist/document/settled-index.d.ts.map +1 -1
- package/dist/document/settled-index.js +18 -1
- package/dist/document/settled-index.js.map +1 -1
- package/dist/document/timeline-patch.js.map +1 -1
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +26 -6
- 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.d.ts +5 -0
- package/dist/props/host.d.ts.map +1 -1
- package/dist/props/host.js +3 -1
- package/dist/props/host.js.map +1 -1
- package/dist/props/index.js.map +1 -1
- package/dist/props/layout.d.ts +29 -0
- package/dist/props/layout.d.ts.map +1 -0
- package/dist/props/layout.js +84 -0
- package/dist/props/layout.js.map +1 -0
- 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 +0 -13
- package/dist/browser/chunks/chunk-AOT33LMS.js.map +0 -7
- package/dist/browser/chunks/chunk-GKM6UZJR.js +0 -6
- 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 +0 -3
- 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,86 +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 { property } from "../../attributes/properties/decorator.js";
|
|
8
|
-
import { TextBase } from "./text-base.js";
|
|
9
|
-
import { formatNumber } from "./number-format.js";
|
|
10
|
-
import { numberNodePattern } from "./number-pattern.js";
|
|
11
|
-
import { command } from "../../tween/command-decorator.js";
|
|
12
|
-
/**
|
|
13
|
-
* Renders a number through this package's own formatter, so the string is a
|
|
14
|
-
* function of the props alone.
|
|
15
|
-
*
|
|
16
|
-
* **Deliberately not `Intl.NumberFormat`.** A scene is a picture with a fixed
|
|
17
|
-
* layout, and `Intl` reads the *host* locale — so the same project renders
|
|
18
|
-
* `1,234.50` on the author's machine and `1.234,50` on an export box, which is
|
|
19
|
-
* a silently different image, and a wider string reflows the shot around it.
|
|
20
|
-
* The same formatter draws a chart axis (`formatNumber`), so a figure and an
|
|
21
|
-
* axis label in one scene agree about grouping, rounding, and the sign on a
|
|
22
|
-
* value that rounds to zero.
|
|
23
|
-
*
|
|
24
|
-
* **A sibling of {@link Text}, not a subclass of it.** Both extend
|
|
25
|
-
* {@link TextBase} and so share every font, fill, layout and measurement
|
|
26
|
-
* behaviour — but a figure is not copy. It has no `text` prop to type into, no
|
|
27
|
-
* `append`/`prepend`, no `find`/`word`/`line` selections and no wrapping,
|
|
28
|
-
* because none of those are operations anyone performs on a quantity; what it
|
|
29
|
-
* draws is derived from {@link value} and the five format props and nothing
|
|
30
|
-
* else can write it. `start`/`end` are still the Write On reveal window every
|
|
31
|
-
* glyph node reinterprets them as.
|
|
32
|
-
*
|
|
33
|
-
* Because {@link value} is a plain numeric prop, `to({ value })` interpolates
|
|
34
|
-
* it like any other number, giving a counting / rolling animation for free.
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* const price = createRef<NumberNode>();
|
|
38
|
-
* <NumberNode ref={price} value={0} format={'currency'} fractionDigits={2} />
|
|
39
|
-
* price().to({ value: 1299.99 }, 1.5); // counts up to "$1,299.99"
|
|
40
|
-
*/
|
|
41
|
-
export class NumberNode extends TextBase {
|
|
42
|
-
constructor(props) {
|
|
43
|
-
super(props);
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* The figure as the format props write it.
|
|
47
|
-
*
|
|
48
|
-
* {@link TextBase} calls this wherever it needs the string — measuring,
|
|
49
|
-
* declaring fonts, drawing — so the six props are read fresh every frame:
|
|
50
|
-
* changing a format, or tweening the value, reformats and redraws without
|
|
51
|
-
* this class owning a binding of its own.
|
|
52
|
-
*/
|
|
53
|
-
displayText() {
|
|
54
|
-
return this.formatted();
|
|
55
|
-
}
|
|
56
|
-
/** The figure as the format props write it. The public name for {@link displayText}. */
|
|
57
|
-
formatted() {
|
|
58
|
-
return formatNumber(this.value, numberNodePattern(this));
|
|
59
|
-
}
|
|
60
|
-
/** Animate {@link value}, counting through the formatted display. */
|
|
61
|
-
countTo(args) {
|
|
62
|
-
return this.to({ data: args.data, duration: args.duration, easing: args.easing });
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
__decorate([
|
|
66
|
-
property({ default: 0 })
|
|
67
|
-
], NumberNode.prototype, "value", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
property({ default: "number" })
|
|
70
|
-
], NumberNode.prototype, "format", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
property({ default: "" })
|
|
73
|
-
], NumberNode.prototype, "customPattern", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
property({ default: 0 })
|
|
76
|
-
], NumberNode.prototype, "fractionDigits", void 0);
|
|
77
|
-
__decorate([
|
|
78
|
-
property({ default: true })
|
|
79
|
-
], NumberNode.prototype, "grouped", void 0);
|
|
80
|
-
__decorate([
|
|
81
|
-
property({ default: "$" })
|
|
82
|
-
], NumberNode.prototype, "currencySymbol", void 0);
|
|
83
|
-
__decorate([
|
|
84
|
-
command({ args: [{ key: "value", kind: "number" }] })
|
|
85
|
-
], NumberNode.prototype, "countTo", null);
|
|
86
|
-
//# sourceMappingURL=number-node.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"number-node.js","sourceRoot":"","sources":["../../../src/nodes/text/number-node.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAiB,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AA0CpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,OAAO,UAAW,SAAQ,QAAqB;IASjD,YAAY,KAA0C;QAClD,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;IAED;;;;;;;OAOG;IACM,WAAW;QAChB,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC;IAC5B,CAAC;IAED,wFAAwF;IACxF,SAAS;QACL,OAAO,YAAY,CAAC,IAAI,CAAC,KAAK,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED,qEAAqE;IAErE,OAAO,CAAC,IAA2D;QAC/D,OAAO,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAA4B,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9G,CAAC;CACJ;AAjC8C;IAA1C,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;yCAAgC;AACP;IAAjD,QAAQ,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;0CAAuC;AAC3B;IAA3C,QAAQ,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;iDAAwC;AACvB;IAA1C,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;kDAAyC;AACpB;IAA7C,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAAmC;AAClB;IAA5C,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;kDAAyC;AAyBpE;IADC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;yCAGrD","sourcesContent":["import { property } from \"@/attributes/properties/decorator\";\r\nimport { NodeConfig } from \"@/nodes/2d/node2d\";\r\nimport { TextBase, TextBaseProps } from \"./text-base\";\r\nimport { formatNumber } from \"./number-format\";\r\nimport { numberNodePattern } from \"./number-pattern\";\r\nimport { type Command, type CommandArgs } from \"@/tween/command\";\r\nimport { command } from \"@/tween/command-decorator\";\r\n\r\n\r\n/**\r\n * How a {@link NumberNode}'s value is written down.\r\n *\r\n * `'custom'` hands the pattern over verbatim through\r\n * {@link NumberProps.customPattern}; the other three compose one from\r\n * {@link NumberProps.fractionDigits} and {@link NumberProps.grouped}.\r\n */\r\nexport type NumberFormat = \"currency\" | \"percent\" | \"number\" | \"custom\";\r\n\r\n\r\nexport interface NumberProps extends TextBaseProps {\r\n /** The numeric value to display. Tweenable — `to({ value })` counts. */\r\n value: number;\r\n /**\r\n * How the figure is written:\r\n * - `'number'` — plain decimal (the default)\r\n * - `'currency'` — money, prefixed with {@link NumberProps.currencySymbol}\r\n * - `'percent'` — multiplies by 100 and appends `%` (so `0.42` → `42%`)\r\n * - `'custom'` — {@link NumberProps.customPattern}, verbatim\r\n */\r\n format: NumberFormat;\r\n /**\r\n * The pattern, when {@link NumberProps.format} is `'custom'` — the same\r\n * grammar `formatNumber` takes (`#,##0.00`, `0.0%`, `$#,##0`).\r\n */\r\n customPattern: string;\r\n /**\r\n * Fixed number of decimal places. Always exactly this many, which is what\r\n * keeps a counting animation from flickering trailing digits as the value\r\n * crosses an integer boundary.\r\n */\r\n fractionDigits: number;\r\n /** Group digits in threes — `1,000` rather than `1000`. */\r\n grouped: boolean;\r\n /** The symbol a `'currency'` figure is prefixed with. */\r\n currencySymbol: string;\r\n}\r\n\r\n\r\n/**\r\n * Renders a number through this package's own formatter, so the string is a\r\n * function of the props alone.\r\n *\r\n * **Deliberately not `Intl.NumberFormat`.** A scene is a picture with a fixed\r\n * layout, and `Intl` reads the *host* locale — so the same project renders\r\n * `1,234.50` on the author's machine and `1.234,50` on an export box, which is\r\n * a silently different image, and a wider string reflows the shot around it.\r\n * The same formatter draws a chart axis (`formatNumber`), so a figure and an\r\n * axis label in one scene agree about grouping, rounding, and the sign on a\r\n * value that rounds to zero.\r\n *\r\n * **A sibling of {@link Text}, not a subclass of it.** Both extend\r\n * {@link TextBase} and so share every font, fill, layout and measurement\r\n * behaviour — but a figure is not copy. It has no `text` prop to type into, no\r\n * `append`/`prepend`, no `find`/`word`/`line` selections and no wrapping,\r\n * because none of those are operations anyone performs on a quantity; what it\r\n * draws is derived from {@link value} and the five format props and nothing\r\n * else can write it. `start`/`end` are still the Write On reveal window every\r\n * glyph node reinterprets them as.\r\n *\r\n * Because {@link value} is a plain numeric prop, `to({ value })` interpolates\r\n * it like any other number, giving a counting / rolling animation for free.\r\n *\r\n * @example\r\n * const price = createRef<NumberNode>();\r\n * <NumberNode ref={price} value={0} format={'currency'} fractionDigits={2} />\r\n * price().to({ value: 1299.99 }, 1.5); // counts up to \"$1,299.99\"\r\n */\r\nexport class NumberNode extends TextBase<NumberProps> {\r\n\r\n @property({ default: 0 }) declare readonly value: number;\r\n @property({ default: \"number\" }) declare readonly format: NumberFormat;\r\n @property({ default: \"\" }) declare readonly customPattern: string;\r\n @property({ default: 0 }) declare readonly fractionDigits: number;\r\n @property({ default: true }) declare readonly grouped: boolean;\r\n @property({ default: \"$\" }) declare readonly currencySymbol: string;\r\n\r\n constructor(props: NodeConfig<NumberNode, NumberProps>) {\r\n super(props);\r\n }\r\n\r\n /**\r\n * The figure as the format props write it.\r\n *\r\n * {@link TextBase} calls this wherever it needs the string — measuring,\r\n * declaring fonts, drawing — so the six props are read fresh every frame:\r\n * changing a format, or tweening the value, reformats and redraws without\r\n * this class owning a binding of its own.\r\n */\r\n override displayText(): string {\r\n return this.formatted();\r\n }\r\n\r\n /** The figure as the format props write it. The public name for {@link displayText}. */\r\n formatted(): string {\r\n return formatNumber(this.value, numberNodePattern(this));\r\n }\r\n\r\n /** Animate {@link value}, counting through the formatted display. */\r\n @command({ args: [{ key: \"value\", kind: \"number\" }] })\r\n countTo(args: CommandArgs<{ value: number }> & { duration: number }): Command<NumberProps> {\r\n return this.to({ data: args.data as Partial<NumberProps>, duration: args.duration, easing: args.easing });\r\n }\r\n}\r\n"]}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The Number node's format controls, resolved into the one pattern the app's
|
|
3
|
-
* formatter takes.
|
|
4
|
-
*
|
|
5
|
-
* There is already exactly one answer in this package to "how is a number
|
|
6
|
-
* written down" — `./number-format`, whose docblock has the grammar and
|
|
7
|
-
* the argument for it. This module adds no second one. What it adds is the
|
|
8
|
-
* *panel's* half: a figure on the canvas is set up by picking a format and
|
|
9
|
-
* saying how many decimals, where a chart axis is set up by picking a preset,
|
|
10
|
-
* and those two are the same statement typed differently.
|
|
11
|
-
*
|
|
12
|
-
* So the controls compose a pattern rather than being honoured beside one. A
|
|
13
|
-
* Number node showing `$1,234.50` and an axis labelled `$#,##0.00` go through
|
|
14
|
-
* the same parser and round the same way, which is the thing that would drift
|
|
15
|
-
* if the node reached for `Intl.NumberFormat` instead.
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* How a Number node writes its figure.
|
|
19
|
-
*
|
|
20
|
-
* The chart's five minus `plain`, which exists there only to keep charts drawn
|
|
21
|
-
* before there were formats labelling themselves the way they always have. A
|
|
22
|
-
* node has no such history, and "plain" beside "number" is a distinction
|
|
23
|
-
* nobody browsing a dropdown can make.
|
|
24
|
-
*/
|
|
25
|
-
export declare const NUMBER_NODE_FORMATS: readonly ["number", "currency", "percent", "custom"];
|
|
26
|
-
export type NumberNodeFormat = (typeof NUMBER_NODE_FORMATS)[number];
|
|
27
|
-
/** The most decimals the panel will let a figure carry. */
|
|
28
|
-
export declare const MAX_FRACTION_DIGITS = 10;
|
|
29
|
-
/** The Number node's format controls, as the class holds them. */
|
|
30
|
-
export interface NumberFormatOptions {
|
|
31
|
-
/** How the figure is written — see {@link NumberNode.format}. */
|
|
32
|
-
format: string;
|
|
33
|
-
/** The pattern typed by hand — read only when the format is `custom`. */
|
|
34
|
-
customPattern: string;
|
|
35
|
-
fractionDigits: number;
|
|
36
|
-
grouped: boolean;
|
|
37
|
-
/** Printed before the figure when the format is `currency`. */
|
|
38
|
-
currencySymbol: string;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* The pattern `options` names.
|
|
42
|
-
*
|
|
43
|
-
* `custom` hands the typed pattern straight to {@link patternFor}, which is what
|
|
44
|
-
* makes the escape hatch the *same* language the presets are written in rather
|
|
45
|
-
* than a second one. Every other format is composed here, because the three
|
|
46
|
-
* controls beside the dropdown — decimals, grouping, the symbol — are what a
|
|
47
|
-
* preset would otherwise have to be duplicated for (`#,##0.00` and `#,##0.000`
|
|
48
|
-
* and `0.00` and…).
|
|
49
|
-
*/
|
|
50
|
-
export declare function numberNodePattern(options: NumberFormatOptions): string;
|
|
51
|
-
//# sourceMappingURL=number-pattern.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"number-pattern.d.ts","sourceRoot":"","sources":["../../../src/nodes/text/number-pattern.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,sDAKtB,CAAA;AAEV,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEnE,2DAA2D;AAC3D,eAAO,MAAM,mBAAmB,KAAK,CAAA;AAErC,kEAAkE;AAClE,MAAM,WAAW,mBAAmB;IAClC,iEAAiE;IACjE,MAAM,EAAE,MAAM,CAAA;IACd,yEAAyE;IACzE,aAAa,EAAE,MAAM,CAAA;IACrB,cAAc,EAAE,MAAM,CAAA;IACtB,OAAO,EAAE,OAAO,CAAA;IAChB,+DAA+D;IAC/D,cAAc,EAAE,MAAM,CAAA;CACvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,CAsBtE"}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The Number node's format controls, resolved into the one pattern the app's
|
|
3
|
-
* formatter takes.
|
|
4
|
-
*
|
|
5
|
-
* There is already exactly one answer in this package to "how is a number
|
|
6
|
-
* written down" — `./number-format`, whose docblock has the grammar and
|
|
7
|
-
* the argument for it. This module adds no second one. What it adds is the
|
|
8
|
-
* *panel's* half: a figure on the canvas is set up by picking a format and
|
|
9
|
-
* saying how many decimals, where a chart axis is set up by picking a preset,
|
|
10
|
-
* and those two are the same statement typed differently.
|
|
11
|
-
*
|
|
12
|
-
* So the controls compose a pattern rather than being honoured beside one. A
|
|
13
|
-
* Number node showing `$1,234.50` and an axis labelled `$#,##0.00` go through
|
|
14
|
-
* the same parser and round the same way, which is the thing that would drift
|
|
15
|
-
* if the node reached for `Intl.NumberFormat` instead.
|
|
16
|
-
*/
|
|
17
|
-
import { patternFor } from "./number-format.js";
|
|
18
|
-
/**
|
|
19
|
-
* How a Number node writes its figure.
|
|
20
|
-
*
|
|
21
|
-
* The chart's five minus `plain`, which exists there only to keep charts drawn
|
|
22
|
-
* before there were formats labelling themselves the way they always have. A
|
|
23
|
-
* node has no such history, and "plain" beside "number" is a distinction
|
|
24
|
-
* nobody browsing a dropdown can make.
|
|
25
|
-
*/
|
|
26
|
-
export const NUMBER_NODE_FORMATS = [
|
|
27
|
-
"number",
|
|
28
|
-
"currency",
|
|
29
|
-
"percent",
|
|
30
|
-
"custom",
|
|
31
|
-
];
|
|
32
|
-
/** The most decimals the panel will let a figure carry. */
|
|
33
|
-
export const MAX_FRACTION_DIGITS = 10;
|
|
34
|
-
/**
|
|
35
|
-
* The pattern `options` names.
|
|
36
|
-
*
|
|
37
|
-
* `custom` hands the typed pattern straight to {@link patternFor}, which is what
|
|
38
|
-
* makes the escape hatch the *same* language the presets are written in rather
|
|
39
|
-
* than a second one. Every other format is composed here, because the three
|
|
40
|
-
* controls beside the dropdown — decimals, grouping, the symbol — are what a
|
|
41
|
-
* preset would otherwise have to be duplicated for (`#,##0.00` and `#,##0.000`
|
|
42
|
-
* and `0.00` and…).
|
|
43
|
-
*/
|
|
44
|
-
export function numberNodePattern(options) {
|
|
45
|
-
if (options.format === "custom") {
|
|
46
|
-
return patternFor("custom", options.customPattern);
|
|
47
|
-
}
|
|
48
|
-
const digits = Math.min(MAX_FRACTION_DIGITS, Math.max(0, Math.round(options.fractionDigits)));
|
|
49
|
-
const integer = options.grouped ? "#,##0" : "0";
|
|
50
|
-
const fraction = digits > 0 ? `.${"0".repeat(digits)}` : "";
|
|
51
|
-
const body = `${integer}${fraction}`;
|
|
52
|
-
if (options.format === "currency") {
|
|
53
|
-
return `${quoted(options.currencySymbol)}${body}`;
|
|
54
|
-
}
|
|
55
|
-
// Bare, so the parser reads it as the percent *operator* and scales by 100 —
|
|
56
|
-
// which is what makes a stored 0.42 read as "42%". A symbol an author wants
|
|
57
|
-
// printed over data that is already in percent points is a custom pattern
|
|
58
|
-
// with the sign quoted, exactly as it is on an axis.
|
|
59
|
-
if (options.format === "percent")
|
|
60
|
-
return `${body}%`;
|
|
61
|
-
return body;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* `symbol` as a pattern literal.
|
|
65
|
-
*
|
|
66
|
-
* Quoted rather than concatenated, because the two most likely symbols after `$`
|
|
67
|
-
* are `€` and `£` and the two after those are whatever an author types — and an
|
|
68
|
-
* unquoted `#`, `0`, `,`, `.` or `%` in there would be read as part of the
|
|
69
|
-
* number. The quote character itself is dropped rather than escaped: the grammar
|
|
70
|
-
* has no escape for it, and a currency symbol containing an apostrophe is not a
|
|
71
|
-
* thing anyone has.
|
|
72
|
-
*/
|
|
73
|
-
function quoted(symbol) {
|
|
74
|
-
const literal = symbol.replaceAll("'", "");
|
|
75
|
-
return literal === "" ? "" : `'${literal}'`;
|
|
76
|
-
}
|
|
77
|
-
//# sourceMappingURL=number-pattern.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"number-pattern.js","sourceRoot":"","sources":["../../../src/nodes/text/number-pattern.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,QAAQ;IACR,UAAU;IACV,SAAS;IACT,QAAQ;CACA,CAAA;AAIV,2DAA2D;AAC3D,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAA;AAcrC;;;;;;;;;GASG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAA4B;IAC5D,IAAI,OAAO,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;QAChC,OAAO,UAAU,CAAC,QAAQ,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;IACpD,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CACrB,mBAAmB,EACnB,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAChD,CAAA;IACD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAA;IAC/C,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;IAC3D,MAAM,IAAI,GAAG,GAAG,OAAO,GAAG,QAAQ,EAAE,CAAA;IAEpC,IAAI,OAAO,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;QAClC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI,EAAE,CAAA;IACnD,CAAC;IACD,6EAA6E;IAC7E,4EAA4E;IAC5E,0EAA0E;IAC1E,qDAAqD;IACrD,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS;QAAE,OAAO,GAAG,IAAI,GAAG,CAAA;IACnD,OAAO,IAAI,CAAA;AACb,CAAC;AAED;;;;;;;;;GASG;AACH,SAAS,MAAM,CAAC,MAAc;IAC5B,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;IAC1C,OAAO,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,OAAO,GAAG,CAAA;AAC7C,CAAC","sourcesContent":["/**\r\n * The Number node's format controls, resolved into the one pattern the app's\r\n * formatter takes.\r\n *\r\n * There is already exactly one answer in this package to \"how is a number\r\n * written down\" — `./number-format`, whose docblock has the grammar and\r\n * the argument for it. This module adds no second one. What it adds is the\r\n * *panel's* half: a figure on the canvas is set up by picking a format and\r\n * saying how many decimals, where a chart axis is set up by picking a preset,\r\n * and those two are the same statement typed differently.\r\n *\r\n * So the controls compose a pattern rather than being honoured beside one. A\r\n * Number node showing `$1,234.50` and an axis labelled `$#,##0.00` go through\r\n * the same parser and round the same way, which is the thing that would drift\r\n * if the node reached for `Intl.NumberFormat` instead.\r\n */\r\n\r\nimport { patternFor } from \"./number-format\";\r\n\r\n/**\r\n * How a Number node writes its figure.\r\n *\r\n * The chart's five minus `plain`, which exists there only to keep charts drawn\r\n * before there were formats labelling themselves the way they always have. A\r\n * node has no such history, and \"plain\" beside \"number\" is a distinction\r\n * nobody browsing a dropdown can make.\r\n */\r\nexport const NUMBER_NODE_FORMATS = [\r\n \"number\",\r\n \"currency\",\r\n \"percent\",\r\n \"custom\",\r\n] as const\r\n\r\nexport type NumberNodeFormat = (typeof NUMBER_NODE_FORMATS)[number]\r\n\r\n/** The most decimals the panel will let a figure carry. */\r\nexport const MAX_FRACTION_DIGITS = 10\r\n\r\n/** The Number node's format controls, as the class holds them. */\r\nexport interface NumberFormatOptions {\r\n /** How the figure is written — see {@link NumberNode.format}. */\r\n format: string\r\n /** The pattern typed by hand — read only when the format is `custom`. */\r\n customPattern: string\r\n fractionDigits: number\r\n grouped: boolean\r\n /** Printed before the figure when the format is `currency`. */\r\n currencySymbol: string\r\n}\r\n\r\n/**\r\n * The pattern `options` names.\r\n *\r\n * `custom` hands the typed pattern straight to {@link patternFor}, which is what\r\n * makes the escape hatch the *same* language the presets are written in rather\r\n * than a second one. Every other format is composed here, because the three\r\n * controls beside the dropdown — decimals, grouping, the symbol — are what a\r\n * preset would otherwise have to be duplicated for (`#,##0.00` and `#,##0.000`\r\n * and `0.00` and…).\r\n */\r\nexport function numberNodePattern(options: NumberFormatOptions): string {\r\n if (options.format === \"custom\") {\r\n return patternFor(\"custom\", options.customPattern)\r\n }\r\n\r\n const digits = Math.min(\r\n MAX_FRACTION_DIGITS,\r\n Math.max(0, Math.round(options.fractionDigits))\r\n )\r\n const integer = options.grouped ? \"#,##0\" : \"0\"\r\n const fraction = digits > 0 ? `.${\"0\".repeat(digits)}` : \"\"\r\n const body = `${integer}${fraction}`\r\n\r\n if (options.format === \"currency\") {\r\n return `${quoted(options.currencySymbol)}${body}`\r\n }\r\n // Bare, so the parser reads it as the percent *operator* and scales by 100 —\r\n // which is what makes a stored 0.42 read as \"42%\". A symbol an author wants\r\n // printed over data that is already in percent points is a custom pattern\r\n // with the sign quoted, exactly as it is on an axis.\r\n if (options.format === \"percent\") return `${body}%`\r\n return body\r\n}\r\n\r\n/**\r\n * `symbol` as a pattern literal.\r\n *\r\n * Quoted rather than concatenated, because the two most likely symbols after `$`\r\n * are `€` and `£` and the two after those are whatever an author types — and an\r\n * unquoted `#`, `0`, `,`, `.` or `%` in there would be read as part of the\r\n * number. The quote character itself is dropped rather than escaped: the grammar\r\n * has no escape for it, and a currency symbol containing an apostrophe is not a\r\n * thing anyone has.\r\n */\r\nfunction quoted(symbol: string): string {\r\n const literal = symbol.replaceAll(\"'\", \"\")\r\n return literal === \"\" ? \"\" : `'${literal}'`\r\n}\r\n"]}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { RenderContext2D } from "../../render/render-context2d.js";
|
|
2
|
-
import { SizeConstraints } from "../../layout/constraints.js";
|
|
3
|
-
import { MeasureContext2D } from "../../render/measure-context.js";
|
|
4
|
-
import type { AssetScope } from "../../assets/scope.js";
|
|
5
|
-
import { Size2D } from "../../attributes/layout/size.js";
|
|
6
|
-
import { PaintNode, PaintProps } from "../../nodes/2d/paint-node.js";
|
|
7
|
-
import { NodeConfig } from "../../nodes/2d/node2d.js";
|
|
8
|
-
import { ContextMap } from "../../util/context.js";
|
|
9
|
-
import type { FontStyle, ResolvedTextSpan, TextAlign, TextSpan } from "../../attributes/text/types.js";
|
|
10
|
-
export interface RichTextProps extends PaintProps {
|
|
11
|
-
spans: TextSpan | TextSpan[];
|
|
12
|
-
/** Default font family inherited by spans that don't set one. */
|
|
13
|
-
fontFamily: string;
|
|
14
|
-
/** Default font size inherited by spans that don't set one. */
|
|
15
|
-
fontSize: number;
|
|
16
|
-
/** Default font weight inherited by spans that don't set one. */
|
|
17
|
-
fontWeight: number;
|
|
18
|
-
/** Default font style inherited by spans that don't set one. */
|
|
19
|
-
fontStyle: FontStyle;
|
|
20
|
-
/** Default letter spacing inherited by spans that don't set one. */
|
|
21
|
-
letterSpacing: number;
|
|
22
|
-
/** Line height multiplier applied to each run's font size. */
|
|
23
|
-
lineHeight: number;
|
|
24
|
-
textAlign: TextAlign;
|
|
25
|
-
/**
|
|
26
|
-
* Name of a typography preset from `theme.typography` (e.g. `"body"`).
|
|
27
|
-
* Supplies any node-level default (fontSize, fontWeight, …) not set
|
|
28
|
-
* explicitly here, which `runs()` then folds into each span. An explicit prop
|
|
29
|
-
* wins over the preset; the preset wins over an inherited `<DefaultTextStyle>`.
|
|
30
|
-
*/
|
|
31
|
-
variant: string;
|
|
32
|
-
}
|
|
33
|
-
export declare class RichText extends PaintNode<RichTextProps> {
|
|
34
|
-
readonly spans: TextSpan[];
|
|
35
|
-
/**
|
|
36
|
-
* The family this text is set in. **No default** — it comes from the cascade
|
|
37
|
-
* in `applyTextDefaults`: what the author passed, else a `variant` preset,
|
|
38
|
-
* else the nearest enclosing `<DefaultTextStyle>`, else the theme's `default`
|
|
39
|
-
* typography preset.
|
|
40
|
-
*
|
|
41
|
-
* A literal default here would sit *under* all four and quietly win whenever
|
|
42
|
-
* every one of them was silent, which is precisely the case worth hearing
|
|
43
|
-
* about: text set in a face nobody chose is text whose font was never
|
|
44
|
-
* declared and so never loaded. Left unset, the renderer says so instead —
|
|
45
|
-
* see `requireFontFamily`.
|
|
46
|
-
*/
|
|
47
|
-
readonly fontFamily: string;
|
|
48
|
-
readonly fontSize: number;
|
|
49
|
-
readonly fontWeight: number;
|
|
50
|
-
readonly fontStyle: FontStyle;
|
|
51
|
-
readonly letterSpacing: number;
|
|
52
|
-
readonly lineHeight: number;
|
|
53
|
-
readonly textAlign: TextAlign;
|
|
54
|
-
readonly variant?: string;
|
|
55
|
-
constructor(props: NodeConfig<RichText, RichTextProps>);
|
|
56
|
-
protected resolveContext(ctx: ContextMap): void;
|
|
57
|
-
protected applyDefaultSize(props?: NodeConfig<RichText, RichTextProps>): void;
|
|
58
|
-
/**
|
|
59
|
-
* Flatten the nested span tree against this node's defaults, returning
|
|
60
|
-
* leaf runs in document order. Children inherit any style fields the
|
|
61
|
-
* parent set; explicit fields on a child override them.
|
|
62
|
-
*/
|
|
63
|
-
runs(): ResolvedTextSpan[];
|
|
64
|
-
declareAssets(assets: AssetScope): void;
|
|
65
|
-
measure(constraints: SizeConstraints, scope: MeasureContext2D): Partial<Size2D>;
|
|
66
|
-
protected renderSelf(ctx: RenderContext2D): void;
|
|
67
|
-
}
|
|
68
|
-
//# sourceMappingURL=richtext-node.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"richtext-node.d.ts","sourceRoot":"","sources":["../../../src/nodes/text/richtext-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAKhG,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC7C,KAAK,EAAE,QAAQ,GAAG,QAAQ,EAAE,CAAC;IAC7B,iEAAiE;IACjE,UAAU,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,CAAC;IACjB,iEAAiE;IACjE,UAAU,EAAE,MAAM,CAAC;IACnB,gEAAgE;IAChE,SAAS,EAAE,SAAS,CAAC;IACrB,oEAAoE;IACpE,aAAa,EAAE,MAAM,CAAC;IACtB,8DAA8D;IAC9D,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;IACrB;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,qBAAa,QAAS,SAAQ,SAAS,CAAC,aAAa,CAAC;IAIlD,SAIoB,KAAK,EAAE,QAAQ,EAAE,CAAC;IACtC;;;;;;;;;;;OAWG;IACH,SAA6B,UAAU,EAAE,MAAM,CAAC;IAChD,SAA4C,QAAQ,EAAE,MAAM,CAAC;IAC7D,SAA6C,UAAU,EAAE,MAAM,CAAC;IAChE,SAAkD,SAAS,EAAE,SAAS,CAAC;IACvE,SAA2C,aAAa,EAAE,MAAM,CAAC;IACjE,SAA6C,UAAU,EAAE,MAAM,CAAC;IAChE,SAAkD,SAAS,EAAE,SAAS,CAAC;IACvE,SAAmD,OAAO,CAAC,EAAE,MAAM,CAAC;gBAExD,KAAK,EAAE,UAAU,CAAC,QAAQ,EAAE,aAAa,CAAC;cAQnC,cAAc,CAAC,GAAG,EAAE,UAAU,GAAG,IAAI;cAMrC,gBAAgB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,QAAQ,EAAE,aAAa,CAAC,GAAG,IAAI;IAKtF;;;;OAIG;IACH,IAAI,IAAI,gBAAgB,EAAE;IAIjB,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAKhD,OAAO,CAAC,WAAW,EAAE,eAAe,EAAE,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC;cAI5D,UAAU,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI;CAG5D"}
|
|
@@ -1,78 +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 { Graphics2D } from "../../render/graphics2d.js";
|
|
8
|
-
import { PaintNode } from "../../nodes/2d/paint-node.js";
|
|
9
|
-
import { property } from "../../attributes/properties/decorator.js";
|
|
10
|
-
import { applyTextDefaults } from "./default-text-style-node.js";
|
|
11
|
-
import { declareRichAssets, measureRich, richRuns, richState } from "./text-layout.js";
|
|
12
|
-
export class RichText extends PaintNode {
|
|
13
|
-
constructor(props) {
|
|
14
|
-
super(props);
|
|
15
|
-
}
|
|
16
|
-
// Inherit text-style defaults from the nearest ancestor <DefaultTextStyle> for
|
|
17
|
-
// any default the author didn't set; these node-level defaults are then folded
|
|
18
|
-
// into each span. Context-value application (spans are fixed structure), so it
|
|
19
|
-
// lives in resolveContext — runs once after the tree + context exist. See Text.
|
|
20
|
-
resolveContext(ctx) {
|
|
21
|
-
applyTextDefaults(this, this._props, { autofit: false });
|
|
22
|
-
}
|
|
23
|
-
// RichText always sizes to its own laid-out spans — it has no children
|
|
24
|
-
// to hug — so it ignores the base has-children default and always hugs.
|
|
25
|
-
applyDefaultSize(props) {
|
|
26
|
-
this.applyProp("height", props?.height ?? "hug");
|
|
27
|
-
this.applyProp("width", props?.width ?? "hug");
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Flatten the nested span tree against this node's defaults, returning
|
|
31
|
-
* leaf runs in document order. Children inherit any style fields the
|
|
32
|
-
* parent set; explicit fields on a child override them.
|
|
33
|
-
*/
|
|
34
|
-
runs() {
|
|
35
|
-
return richRuns(this);
|
|
36
|
-
}
|
|
37
|
-
declareAssets(assets) {
|
|
38
|
-
super.declareAssets(assets);
|
|
39
|
-
declareRichAssets(this, assets);
|
|
40
|
-
}
|
|
41
|
-
measure(constraints, scope) {
|
|
42
|
-
return measureRich(this, constraints, scope);
|
|
43
|
-
}
|
|
44
|
-
renderSelf(ctx) {
|
|
45
|
-
ctx.draw(new Graphics2D().richText(richState(this, this.layoutBounds)));
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
__decorate([
|
|
49
|
-
property({
|
|
50
|
-
default: [],
|
|
51
|
-
mapper: (v) => v == null ? [] : Array.isArray(v) ? v : [v],
|
|
52
|
-
})
|
|
53
|
-
], RichText.prototype, "spans", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
property()
|
|
56
|
-
], RichText.prototype, "fontFamily", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
property({ default: 48 })
|
|
59
|
-
], RichText.prototype, "fontSize", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
property({ default: 400 })
|
|
62
|
-
], RichText.prototype, "fontWeight", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
property({ default: 'normal' })
|
|
65
|
-
], RichText.prototype, "fontStyle", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
property({ default: 0 })
|
|
68
|
-
], RichText.prototype, "letterSpacing", void 0);
|
|
69
|
-
__decorate([
|
|
70
|
-
property({ default: 1.2 })
|
|
71
|
-
], RichText.prototype, "lineHeight", void 0);
|
|
72
|
-
__decorate([
|
|
73
|
-
property({ default: 'center' })
|
|
74
|
-
], RichText.prototype, "textAlign", void 0);
|
|
75
|
-
__decorate([
|
|
76
|
-
property({ default: undefined })
|
|
77
|
-
], RichText.prototype, "variant", void 0);
|
|
78
|
-
//# sourceMappingURL=richtext-node.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"richtext-node.js","sourceRoot":"","sources":["../../../src/nodes/text/richtext-node.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAKjD,OAAO,EAAE,SAAS,EAAc,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAI7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AA2BpF,MAAM,OAAO,QAAS,SAAQ,SAAwB;IA8BlD,YAAY,KAA0C;QAClD,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;IAED,+EAA+E;IAC/E,+EAA+E;IAC/E,+EAA+E;IAC/E,kFAAkF;IAC/D,cAAc,CAAC,GAAe;QAC7C,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,MAA6C,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;IACpG,CAAC;IAED,yEAAyE;IACzE,0EAA0E;IACvD,gBAAgB,CAAC,KAA2C;QAC3E,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,IAAI,KAAK,CAAC,CAAC;QACjD,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,IAAI,KAAK,CAAC,CAAC;IACnD,CAAC;IAED;;;;OAIG;IACH,IAAI;QACA,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAEQ,aAAa,CAAC,MAAkB;QACrC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAC5B,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACpC,CAAC;IAED,OAAO,CAAC,WAA4B,EAAE,KAAuB;QACzD,OAAO,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;IACjD,CAAC;IAEkB,UAAU,CAAC,GAAoB;QAC9C,GAAG,CAAC,IAAI,CAAC,IAAI,UAAU,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAC5E,CAAC;CACJ;AA9DuB;IAJnB,QAAQ,CAAC;QACN,OAAO,EAAE,EAAE;QACX,MAAM,EAAE,CAAC,CAAoC,EAAc,EAAE,CACzD,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAClD,CAAC;uCAAoC;AAaT;IAA5B,QAAQ,EAAE;4CAAqC;AACJ;IAA3C,QAAQ,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;0CAAmC;AAChB;IAA5C,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;4CAAqC;AACd;IAAjD,QAAQ,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;2CAAuC;AAC5B;IAA1C,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;+CAAwC;AACpB;IAA5C,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;4CAAqC;AACd;IAAjD,QAAQ,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;2CAAuC;AACpB;IAAlD,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;yCAAmC","sourcesContent":["import { RenderContext2D } from \"@/render/render-context2d\";\r\nimport { Graphics2D } from \"@/render/graphics2d\";\r\nimport { SizeConstraints } from \"@/layout/constraints\";\r\nimport { MeasureContext2D } from \"@/render/measure-context\";\r\nimport type { AssetScope } from \"@/assets/scope\";\r\nimport { Size2D } from \"@/attributes/layout/size\";\r\nimport { PaintNode, PaintProps } from \"@/nodes/2d/paint-node\";\r\nimport { property } from \"@/attributes/properties/decorator\";\r\nimport { NodeConfig } from \"@/nodes/2d/node2d\";\r\nimport { ContextMap } from \"@/util/context\";\r\nimport type { FontStyle, ResolvedTextSpan, TextAlign, TextSpan } from \"@/attributes/text/types\";\r\nimport { applyTextDefaults } from \"./default-text-style-node\";\r\nimport { declareRichAssets, measureRich, richRuns, richState } from \"./text-layout\";\r\n\r\n\r\nexport interface RichTextProps extends PaintProps {\r\n spans: TextSpan | TextSpan[];\r\n /** Default font family inherited by spans that don't set one. */\r\n fontFamily: string;\r\n /** Default font size inherited by spans that don't set one. */\r\n fontSize: number;\r\n /** Default font weight inherited by spans that don't set one. */\r\n fontWeight: number;\r\n /** Default font style inherited by spans that don't set one. */\r\n fontStyle: FontStyle;\r\n /** Default letter spacing inherited by spans that don't set one. */\r\n letterSpacing: number;\r\n /** Line height multiplier applied to each run's font size. */\r\n lineHeight: number;\r\n textAlign: TextAlign;\r\n /**\r\n * Name of a typography preset from `theme.typography` (e.g. `\"body\"`).\r\n * Supplies any node-level default (fontSize, fontWeight, …) not set\r\n * explicitly here, which `runs()` then folds into each span. An explicit prop\r\n * wins over the preset; the preset wins over an inherited `<DefaultTextStyle>`.\r\n */\r\n variant: string;\r\n}\r\n\r\nexport class RichText extends PaintNode<RichTextProps> {\r\n\r\n\r\n\r\n @property({\r\n default: [],\r\n mapper: (v: TextSpan | TextSpan[] | undefined): TextSpan[] =>\r\n v == null ? [] : Array.isArray(v) ? v : [v],\r\n }) declare readonly spans: TextSpan[];\r\n /**\r\n * The family this text is set in. **No default** — it comes from the cascade\r\n * in `applyTextDefaults`: what the author passed, else a `variant` preset,\r\n * else the nearest enclosing `<DefaultTextStyle>`, else the theme's `default`\r\n * typography preset.\r\n *\r\n * A literal default here would sit *under* all four and quietly win whenever\r\n * every one of them was silent, which is precisely the case worth hearing\r\n * about: text set in a face nobody chose is text whose font was never\r\n * declared and so never loaded. Left unset, the renderer says so instead —\r\n * see `requireFontFamily`.\r\n */\r\n @property() declare readonly fontFamily: string;\r\n @property({ default: 48 }) declare readonly fontSize: number;\r\n @property({ default: 400 }) declare readonly fontWeight: number;\r\n @property({ default: 'normal' }) declare readonly fontStyle: FontStyle;\r\n @property({ default: 0 }) declare readonly letterSpacing: number;\r\n @property({ default: 1.2 }) declare readonly lineHeight: number;\r\n @property({ default: 'center' }) declare readonly textAlign: TextAlign;\r\n @property({ default: undefined }) declare readonly variant?: string;\r\n\r\n constructor(props: NodeConfig<RichText, RichTextProps>) {\r\n super(props);\r\n }\r\n\r\n // Inherit text-style defaults from the nearest ancestor <DefaultTextStyle> for\r\n // any default the author didn't set; these node-level defaults are then folded\r\n // into each span. Context-value application (spans are fixed structure), so it\r\n // lives in resolveContext — runs once after the tree + context exist. See Text.\r\n protected override resolveContext(ctx: ContextMap): void {\r\n applyTextDefaults(this, this._props as Record<string, unknown> | undefined, { autofit: false });\r\n }\r\n\r\n // RichText always sizes to its own laid-out spans — it has no children\r\n // to hug — so it ignores the base has-children default and always hugs.\r\n protected override applyDefaultSize(props?: NodeConfig<RichText, RichTextProps>): void {\r\n this.applyProp(\"height\", props?.height ?? \"hug\");\r\n this.applyProp(\"width\", props?.width ?? \"hug\");\r\n }\r\n\r\n /**\r\n * Flatten the nested span tree against this node's defaults, returning\r\n * leaf runs in document order. Children inherit any style fields the\r\n * parent set; explicit fields on a child override them.\r\n */\r\n runs(): ResolvedTextSpan[] {\r\n return richRuns(this);\r\n }\r\n\r\n override declareAssets(assets: AssetScope): void {\r\n super.declareAssets(assets);\r\n declareRichAssets(this, assets);\r\n }\r\n\r\n measure(constraints: SizeConstraints, scope: MeasureContext2D): Partial<Size2D> {\r\n return measureRich(this, constraints, scope);\r\n }\r\n\r\n protected override renderSelf(ctx: RenderContext2D): void {\r\n ctx.draw(new Graphics2D().richText(richState(this, this.layoutBounds)));\r\n }\r\n}\r\n"]}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import type { FontStyle, ResolvedTextRun, TextAlign, TextCase, TextDecoration, VerticalAlign } from "../../attributes/text/types.js";
|
|
2
|
-
import { PaintNode, PaintProps } from "../../nodes/2d/paint-node.js";
|
|
3
|
-
import { NodeConfig } from "../../nodes/2d/node2d.js";
|
|
4
|
-
import { ContextMap } from "../../util/context.js";
|
|
5
|
-
import { SizeConstraints } from "../../layout/constraints.js";
|
|
6
|
-
import { MeasureContext2D } from "../../render/measure-context.js";
|
|
7
|
-
import { Size2D } from "../../attributes/layout/size.js";
|
|
8
|
-
import { RenderContext2D } from "../../render/render-context2d.js";
|
|
9
|
-
import { TextSegment, TextState } from "../../render/descriptors/text.js";
|
|
10
|
-
import type { AssetScope } from "../../assets/scope.js";
|
|
11
|
-
import { PathData } from "../../render/descriptors/path.js";
|
|
12
|
-
import type { TextSelection } from "./text-selection.js";
|
|
13
|
-
/** The fields a string is shaped and set by, shared by every node that draws glyphs. */
|
|
14
|
-
export interface TextBaseProps extends PaintProps {
|
|
15
|
-
fontSize: number | 'autofit';
|
|
16
|
-
fontFamily: string;
|
|
17
|
-
fontWeight: number;
|
|
18
|
-
fontStyle: FontStyle;
|
|
19
|
-
letterSpacing: number;
|
|
20
|
-
lineHeight: number;
|
|
21
|
-
textAlign: TextAlign;
|
|
22
|
-
verticalAlign: VerticalAlign;
|
|
23
|
-
textDecoration: TextDecoration;
|
|
24
|
-
textCase: TextCase;
|
|
25
|
-
minFontSize: number;
|
|
26
|
-
/**
|
|
27
|
-
* Name of a typography preset from `theme.typography` (e.g. `"header"`).
|
|
28
|
-
* Supplies any text-style prop (fontSize, fontWeight, …) not set explicitly
|
|
29
|
-
* here. An explicit prop always wins over the preset; the preset wins over an
|
|
30
|
-
* inherited `<DefaultTextStyle>`.
|
|
31
|
-
*/
|
|
32
|
-
variant: string;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* **A node whose box is the box of some shaped glyphs.**
|
|
36
|
-
*
|
|
37
|
-
* Everything about setting a string in a face — the shaping props, the
|
|
38
|
-
* cascade that fills them in, measuring the block, declaring the fonts it needs
|
|
39
|
-
* and drawing it — and nothing about *where the string comes from*, which is
|
|
40
|
-
* {@link displayText}'s and is the only thing its subclasses disagree about.
|
|
41
|
-
* {@link Text} is handed one and lets an author edit it; {@link NumberNode}
|
|
42
|
-
* derives one from a number and a format.
|
|
43
|
-
*
|
|
44
|
-
* That seam is the reason this class exists rather than `NumberNode extends
|
|
45
|
-
* Text`. A figure is not a string: `append`, `prepend`, `find`, `word`,
|
|
46
|
-
* `wrap` and the `text` prop itself are all operations on copy somebody typed,
|
|
47
|
-
* and a number inheriting them offered an editor a Content field over a value it
|
|
48
|
-
* could not write to and a "Append Text" command over a quantity. What the two
|
|
49
|
-
* genuinely share is glyphs, and that is what is here.
|
|
50
|
-
*
|
|
51
|
-
* **Not `Intl`, anywhere below this.** A scene is a picture with a fixed layout;
|
|
52
|
-
* see {@link NumberNode} for the argument.
|
|
53
|
-
*/
|
|
54
|
-
export declare abstract class TextBase<P extends TextBaseProps = TextBaseProps> extends PaintNode<P> {
|
|
55
|
-
/**
|
|
56
|
-
* The family this text is set in. **No default** — it comes from the cascade
|
|
57
|
-
* in `applyTextDefaults`: what the author passed, else a `variant` preset,
|
|
58
|
-
* else the nearest enclosing `<DefaultTextStyle>`, else the theme's `default`
|
|
59
|
-
* typography preset.
|
|
60
|
-
*
|
|
61
|
-
* A literal default here would sit *under* all four and quietly win whenever
|
|
62
|
-
* every one of them was silent, which is precisely the case worth hearing
|
|
63
|
-
* about: text set in a face nobody chose is text whose font was never
|
|
64
|
-
* declared and so never loaded. Left unset, the renderer says so instead —
|
|
65
|
-
* see `requireFontFamily`.
|
|
66
|
-
*/
|
|
67
|
-
readonly fontFamily: string;
|
|
68
|
-
readonly fontSize: number | 'autofit';
|
|
69
|
-
readonly fontWeight: number;
|
|
70
|
-
readonly fontStyle: FontStyle;
|
|
71
|
-
readonly letterSpacing: number;
|
|
72
|
-
readonly lineHeight: number;
|
|
73
|
-
readonly textAlign: TextAlign;
|
|
74
|
-
readonly verticalAlign: VerticalAlign;
|
|
75
|
-
readonly textDecoration: TextDecoration;
|
|
76
|
-
readonly textCase: TextCase;
|
|
77
|
-
readonly minFontSize: number;
|
|
78
|
-
readonly variant?: string;
|
|
79
|
-
/**
|
|
80
|
-
* The string this node draws, this frame.
|
|
81
|
-
*
|
|
82
|
-
* Read fresh everywhere below rather than cached into a prop, so a subclass
|
|
83
|
-
* deriving it from other props — a figure from its value and its format —
|
|
84
|
-
* reformats and redraws without owning a binding of its own.
|
|
85
|
-
*/
|
|
86
|
-
abstract displayText(): string;
|
|
87
|
-
/** Whether long lines break — a single-line figure never does. */
|
|
88
|
-
protected get wrapsText(): boolean;
|
|
89
|
-
/** The path the glyphs ride, for a type that offers text-on-path. */
|
|
90
|
-
protected get glyphPath(): PathData | null;
|
|
91
|
-
/**
|
|
92
|
-
* Live per-range style overrides — {@link Text}'s selections. A derived
|
|
93
|
-
* string has no ranges anyone could have selected, so the base answers with
|
|
94
|
-
* none and {@link buildSegments} keeps only the reveal window.
|
|
95
|
-
*/
|
|
96
|
-
protected styledRuns(): readonly TextSelection[];
|
|
97
|
-
/** Stretches a document styles apart from the node — {@link Text}'s `runs`. */
|
|
98
|
-
protected styleRuns(): readonly ResolvedTextRun[];
|
|
99
|
-
protected resolveContext(ctx: ContextMap): void;
|
|
100
|
-
protected applyDefaultSize(props?: NodeConfig<any, P>): void;
|
|
101
|
-
measure(constraints: SizeConstraints, scope: MeasureContext2D): Partial<Size2D>;
|
|
102
|
-
/** The string cut at every style boundary — see {@link textSegments}. */
|
|
103
|
-
protected buildSegments(): TextSegment[] | null;
|
|
104
|
-
declareAssets(assets: AssetScope): void;
|
|
105
|
-
/**
|
|
106
|
-
* The descriptor this node draws itself as, at the current frame.
|
|
107
|
-
*
|
|
108
|
-
* `@internal` — split out so `node-picking`'s caret geometry is measured
|
|
109
|
-
* from the same state that gets painted.
|
|
110
|
-
*/
|
|
111
|
-
/** @internal */
|
|
112
|
-
_textState(): Partial<TextState>;
|
|
113
|
-
private textOpGraphics;
|
|
114
|
-
protected renderSelf(ctx: RenderContext2D): void;
|
|
115
|
-
protected renderStroke(ctx: RenderContext2D): void;
|
|
116
|
-
private _source;
|
|
117
|
-
}
|
|
118
|
-
//# sourceMappingURL=text-base.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text-base.d.ts","sourceRoot":"","sources":["../../../src/nodes/text/text-base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE9H,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKtD,wFAAwF;AACxF,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC7C,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;IACrB,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,cAAc,CAAC;IAC/B,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;CACnB;AAGD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,8BAAsB,QAAQ,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IAExF;;;;;;;;;;;OAWG;IACH,SAA6B,UAAU,EAAE,MAAM,CAAC;IAGhD,SAAyE,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IACtG,SAA6C,UAAU,EAAE,MAAM,CAAC;IAChE,SAAkD,SAAS,EAAE,SAAS,CAAC;IACvE,SAA2C,aAAa,EAAE,MAAM,CAAC;IACjE,SAA6C,UAAU,EAAE,MAAM,CAAC;IAChE,SAAkD,SAAS,EAAE,SAAS,CAAC;IACvE,SACiB,aAAa,EAAE,aAAa,CAAC;IAC9C,SACiB,cAAc,EAAE,cAAc,CAAC;IAChD,SACiB,QAAQ,EAAE,QAAQ,CAAC;IACpC,SAA4C,WAAW,EAAE,MAAM,CAAC;IAChE,SAAmD,OAAO,CAAC,EAAE,MAAM,CAAC;IAEpE;;;;;;OAMG;IACH,QAAQ,CAAC,WAAW,IAAI,MAAM;IAE9B,kEAAkE;IAClE,SAAS,KAAK,SAAS,IAAI,OAAO,CAAkB;IAEpD,qEAAqE;IACrE,SAAS,KAAK,SAAS,IAAI,QAAQ,GAAG,IAAI,CAAiB;IAE3D;;;;OAIG;IACH,SAAS,CAAC,UAAU,IAAI,SAAS,aAAa,EAAE;IAEhD,+EAA+E;IAC/E,SAAS,CAAC,SAAS,IAAI,SAAS,eAAe,EAAE;cAQ9B,cAAc,CAAC,GAAG,EAAE,UAAU,GAAG,IAAI;cAOrC,gBAAgB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,IAAI;IAMrE,OAAO,CAAC,WAAW,EAAE,eAAe,EAAE,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC;IAI/E,yEAAyE;IACzE,SAAS,CAAC,aAAa,IAAI,WAAW,EAAE,GAAG,IAAI;IAItC,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAKhD;;;;;OAKG;IACH,gBAAgB;IAChB,UAAU,IAAI,OAAO,CAAC,SAAS,CAAC;IAQhC,OAAO,CAAC,cAAc;cAKH,UAAU,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI;cAatC,YAAY,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI;IAQ3D,OAAO,CAAC,OAAO;CAGlB"}
|