@motionscript/core 0.1.0-alpha.8 → 0.1.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/LICENSE +201 -201
- package/NOTICE +49 -49
- package/README.md +91 -91
- package/dist/assets/asset-index.js.map +1 -1
- package/dist/assets/catalog.js.map +1 -1
- package/dist/assets/errors.js.map +1 -1
- package/dist/assets/index.js.map +1 -1
- package/dist/assets/manager.js.map +1 -1
- package/dist/assets/manifest.js.map +1 -1
- package/dist/assets/record.js.map +1 -1
- package/dist/assets/scope.js.map +1 -1
- package/dist/attributes/audio/effects/chain.js.map +1 -1
- package/dist/attributes/audio/effects/implementations/echo.js.map +1 -1
- package/dist/attributes/audio/effects/implementations/gain.js.map +1 -1
- package/dist/attributes/audio/effects/implementations/highpass.js.map +1 -1
- package/dist/attributes/audio/effects/implementations/lowpass.js.map +1 -1
- package/dist/attributes/audio/effects/implementations/tremolo.js.map +1 -1
- package/dist/attributes/audio/effects/index.js.map +1 -1
- package/dist/attributes/audio/effects/registry.js.map +1 -1
- package/dist/attributes/audio/effects/union.js.map +1 -1
- package/dist/attributes/audio/ramp.js.map +1 -1
- package/dist/attributes/audio/request.js.map +1 -1
- package/dist/attributes/audio/schedule.js.map +1 -1
- package/dist/attributes/audio/sound.js.map +1 -1
- package/dist/attributes/audio/transition.js.map +1 -1
- package/dist/attributes/index.js.map +1 -1
- package/dist/attributes/layout/alignment.js.map +1 -1
- package/dist/attributes/layout/index.js.map +1 -1
- package/dist/attributes/layout/insets.js.map +1 -1
- package/dist/attributes/layout/matrix2d.js.map +1 -1
- package/dist/attributes/layout/size.js.map +1 -1
- package/dist/attributes/layout/space3d.js.map +1 -1
- package/dist/attributes/layout/transform3d.js.map +1 -1
- package/dist/attributes/layout/vector2.js.map +1 -1
- package/dist/attributes/layout/world-transform.js.map +1 -1
- package/dist/attributes/mask/boolean.js.map +1 -1
- package/dist/attributes/mask/mask.js.map +1 -1
- package/dist/attributes/properties/decorator.js.map +1 -1
- package/dist/attributes/properties/inputs.js.map +1 -1
- package/dist/attributes/properties/typed.js.map +1 -1
- package/dist/attributes/render3d/orbit.js.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
- package/dist/attributes/shape/corners/corner-style.js.map +1 -1
- package/dist/attributes/shape/corners/corners.js.map +1 -1
- package/dist/attributes/shape/corners/index.js.map +1 -1
- package/dist/attributes/shape/effects/backdrop.js.map +1 -1
- package/dist/attributes/shape/effects/chain.js.map +1 -1
- package/dist/attributes/shape/effects/effect-data.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.d.ts +2 -2
- package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.d.ts +2 -2
- package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.d.ts +4 -4
- package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.d.ts +2 -2
- package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.d.ts +2 -2
- package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
- package/dist/attributes/shape/effects/index.js.map +1 -1
- package/dist/attributes/shape/effects/registry.js.map +1 -1
- package/dist/attributes/shape/effects/spec.js.map +1 -1
- package/dist/attributes/shape/effects/union.js.map +1 -1
- package/dist/attributes/shape/fill/blend.js.map +1 -1
- package/dist/attributes/shape/fill/chain.js.map +1 -1
- package/dist/attributes/shape/fill/coerce.js.map +1 -1
- package/dist/attributes/shape/fill/color/constants.js.map +1 -1
- package/dist/attributes/shape/fill/color/parser.js.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/color.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/conic-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/linear-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/radial-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/stripe.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
- package/dist/attributes/shape/fill/index.js.map +1 -1
- package/dist/attributes/shape/fill/lerp.js.map +1 -1
- package/dist/attributes/shape/fill/media-preset.js.map +1 -1
- package/dist/attributes/shape/fill/registry.js.map +1 -1
- package/dist/attributes/shape/fill/union.js.map +1 -1
- package/dist/attributes/shape/filters/chain.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/alpha.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/exposure.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/posterize-time.js.map +1 -1
- package/dist/attributes/shape/filters/index.js.map +1 -1
- package/dist/attributes/shape/filters/registry.js.map +1 -1
- package/dist/attributes/shape/filters/union.js.map +1 -1
- package/dist/attributes/shape/path/anchors.js.map +1 -1
- package/dist/attributes/shape/path/bezier.js.map +1 -1
- package/dist/attributes/shape/path/index.js.map +1 -1
- package/dist/attributes/shape/path/measure.js.map +1 -1
- package/dist/attributes/shape/path/morph.js.map +1 -1
- package/dist/attributes/shape/path/ops.js.map +1 -1
- package/dist/attributes/shape/path/types.js.map +1 -1
- package/dist/attributes/shape/path/walk.js.map +1 -1
- package/dist/attributes/shape/shaders/index.js.map +1 -1
- package/dist/attributes/shape/shaders/language.js.map +1 -1
- package/dist/attributes/shape/shaders/pack.js.map +1 -1
- package/dist/attributes/shape/shaders/resolve.js.map +1 -1
- package/dist/attributes/shape/shadow/index.js.map +1 -1
- package/dist/attributes/shape/shadow/shadow.js.map +1 -1
- package/dist/attributes/shape/stroke/index.js.map +1 -1
- package/dist/attributes/shape/stroke/stroke.js.map +1 -1
- package/dist/attributes/shared/operators.js.map +1 -1
- package/dist/attributes/text/index.js.map +1 -1
- package/dist/attributes/text/ops.js.map +1 -1
- package/dist/attributes/text/types.js.map +1 -1
- package/dist/browser/chunks/{chunk-LKUYVFU3.js → chunk-4BDLFEOC.js} +1 -1
- package/dist/browser/chunks/chunk-4BDLFEOC.js.map +7 -0
- package/dist/browser/chunks/{chunk-GKM6UZJR.js → chunk-7DB6BI27.js} +2 -2
- package/dist/browser/chunks/chunk-7DB6BI27.js.map +7 -0
- package/dist/browser/chunks/{chunk-AOT33LMS.js → chunk-IX53IFBD.js} +2 -2
- package/dist/browser/chunks/chunk-IX53IFBD.js.map +7 -0
- package/dist/browser/chunks/{chunk-ZRPZPWZU.js → chunk-Q55UPA3E.js} +1 -1
- package/dist/browser/chunks/chunk-Q55UPA3E.js.map +7 -0
- package/dist/browser/component.js +1 -1
- package/dist/browser/experimental.js +1 -1
- package/dist/browser/experimental.js.map +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/sdk.js +1 -1
- package/dist/component.js.map +1 -1
- package/dist/components/builtins/audio/audio.js.map +1 -1
- package/dist/components/builtins/geometry/composite.js.map +1 -1
- package/dist/components/builtins/geometry/geometry.js.map +1 -1
- package/dist/components/builtins/geometry/shape-outline.js.map +1 -1
- package/dist/components/builtins/layout/layout.js.map +1 -1
- package/dist/components/builtins/media/media.js.map +1 -1
- package/dist/components/builtins/providers/providers.js.map +1 -1
- package/dist/components/builtins/text/number-format.js.map +1 -1
- package/dist/components/builtins/text/number-pattern.js.map +1 -1
- package/dist/components/builtins/text/text-defaults.js.map +1 -1
- package/dist/components/builtins/text/text-layout.js.map +1 -1
- package/dist/components/builtins/text/text.d.ts +9 -9
- package/dist/components/builtins/text/text.js.map +1 -1
- package/dist/components/builtins/three/canvas3d.js.map +1 -1
- package/dist/components/builtins/three/grid-geometry3d.js.map +1 -1
- package/dist/components/builtins/three/three.js.map +1 -1
- package/dist/components/factory/api.js.map +1 -1
- package/dist/components/factory/clip-of.js.map +1 -1
- package/dist/components/factory/commands-for.js.map +1 -1
- package/dist/components/factory/component-audio.js.map +1 -1
- package/dist/components/factory/component2d.js.map +1 -1
- package/dist/components/factory/component3d.js.map +1 -1
- package/dist/components/factory/factory.js.map +1 -1
- package/dist/components/factory/timeline.js.map +1 -1
- package/dist/components/factory/type-def.js.map +1 -1
- package/dist/components/factory/types.js.map +1 -1
- package/dist/components/factory/views.js.map +1 -1
- package/dist/components/modules/aim.js.map +1 -1
- package/dist/components/modules/corners.js.map +1 -1
- package/dist/components/modules/flow.js.map +1 -1
- package/dist/components/modules/material.js.map +1 -1
- package/dist/components/modules/paint.js.map +1 -1
- package/dist/components/modules/shapes.js.map +1 -1
- package/dist/components/modules/text-layout.js.map +1 -1
- package/dist/components/modules/text-style.d.ts +1 -1
- package/dist/components/modules/text-style.js.map +1 -1
- package/dist/components/modules/three-entries.js.map +1 -1
- package/dist/components/modules/view3d.js.map +1 -1
- package/dist/components/trees/2d/group-bounds.js.map +1 -1
- package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
- package/dist/components/trees/2d/node-motion.js.map +1 -1
- package/dist/components/trees/2d/node-render.js.map +1 -1
- package/dist/components/trees/2d/node-space.js.map +1 -1
- package/dist/components/trees/2d/node-transform.js.map +1 -1
- package/dist/components/trees/2d/node2d.js.map +1 -1
- package/dist/components/trees/audio/index.js.map +1 -1
- package/dist/components/trees/audio/node-audio.js.map +1 -1
- package/dist/components/trees/index.js.map +1 -1
- package/dist/components/trees/node/node-editor-state.js.map +1 -1
- package/dist/components/trees/node/node-reactive.js.map +1 -1
- package/dist/components/trees/node/node-time.js.map +1 -1
- package/dist/components/trees/node/node-walk.js.map +1 -1
- package/dist/components/trees/node/node.js.map +1 -1
- package/dist/components/trees/root/canvas2d-node.js.map +1 -1
- package/dist/components/trees/three/node3d.js.map +1 -1
- package/dist/document/audio.js.map +1 -1
- package/dist/document/builtins.js.map +1 -1
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/deny-globals.js.map +1 -1
- package/dist/document/diff.js.map +1 -1
- package/dist/document/doc-index.js.map +1 -1
- package/dist/document/expression/compile.js.map +1 -1
- package/dist/document/expression/index.js.map +1 -1
- package/dist/document/expression/ops.js.map +1 -1
- package/dist/document/expression/parse.js.map +1 -1
- package/dist/document/expression/refs.js.map +1 -1
- package/dist/document/expression/types.js.map +1 -1
- package/dist/document/expression/walk.js.map +1 -1
- package/dist/document/index.js.map +1 -1
- package/dist/document/migrate.js.map +1 -1
- package/dist/document/missing-node.js.map +1 -1
- package/dist/document/node-decorator.js.map +1 -1
- package/dist/document/node-descriptor.js.map +1 -1
- package/dist/document/placement.js.map +1 -1
- package/dist/document/project.js.map +1 -1
- package/dist/document/prop-evolution.js.map +1 -1
- package/dist/document/registry.js.map +1 -1
- package/dist/document/settled-index.js.map +1 -1
- package/dist/document/timeline-patch.js.map +1 -1
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.js.map +1 -1
- package/dist/document/vocabulary.js.map +1 -1
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/layout/bounds.js.map +1 -1
- package/dist/layout/constraints.js.map +1 -1
- package/dist/layout/flex.js.map +1 -1
- package/dist/layout/freeform.js.map +1 -1
- package/dist/layout/grid.js.map +1 -1
- package/dist/layout/index.js.map +1 -1
- package/dist/layout/item.js.map +1 -1
- package/dist/layout/ops.js.map +1 -1
- package/dist/layout/types.js.map +1 -1
- package/dist/platform/audio-sink.js.map +1 -1
- package/dist/platform/exporter.js.map +1 -1
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/stepped-clock.js.map +1 -1
- package/dist/platform/storage-adapter.js.map +1 -1
- package/dist/platform/ticker.js.map +1 -1
- package/dist/project/config.js.map +1 -1
- package/dist/project/index.js.map +1 -1
- package/dist/project/tree.js.map +1 -1
- package/dist/props/host.js.map +1 -1
- package/dist/props/index.js.map +1 -1
- package/dist/props/observer.js.map +1 -1
- package/dist/props/slot.js.map +1 -1
- package/dist/renamed-scene-names.js.map +1 -1
- package/dist/render/canvas-render-context2d.js.map +1 -1
- package/dist/render/clip-contains.js.map +1 -1
- package/dist/render/clip.js.map +1 -1
- package/dist/render/descriptors/ellipse.js.map +1 -1
- package/dist/render/descriptors/line.js.map +1 -1
- package/dist/render/descriptors/path-builder.js.map +1 -1
- package/dist/render/descriptors/path.js.map +1 -1
- package/dist/render/descriptors/polygon.js.map +1 -1
- package/dist/render/descriptors/polygram.js.map +1 -1
- package/dist/render/descriptors/rect.js.map +1 -1
- package/dist/render/descriptors/richtext.js.map +1 -1
- package/dist/render/descriptors/shape.js.map +1 -1
- package/dist/render/descriptors/text.js.map +1 -1
- package/dist/render/descriptors/transform.js.map +1 -1
- package/dist/render/graphics2d.js.map +1 -1
- package/dist/render/index.js.map +1 -1
- package/dist/render/measure-context.js.map +1 -1
- package/dist/render/null-render-context.js.map +1 -1
- package/dist/render/render-context2d.js.map +1 -1
- package/dist/render/render-issue.js.map +1 -1
- package/dist/render/surface.js.map +1 -1
- package/dist/render/text-defaults.js.map +1 -1
- package/dist/render/text-layout.js.map +1 -1
- package/dist/render3d/bounds3d.js.map +1 -1
- package/dist/render3d/builders.js.map +1 -1
- package/dist/render3d/camera.js.map +1 -1
- package/dist/render3d/fill3d.js.map +1 -1
- package/dist/render3d/geometry.js.map +1 -1
- package/dist/render3d/graphics3d.js.map +1 -1
- package/dist/render3d/index.js.map +1 -1
- package/dist/render3d/inert.js.map +1 -1
- package/dist/render3d/light.js.map +1 -1
- package/dist/render3d/material.js.map +1 -1
- package/dist/render3d/matrix4.js.map +1 -1
- package/dist/render3d/render-context3d.js.map +1 -1
- package/dist/render3d/resources.js.map +1 -1
- package/dist/render3d/rounded-box.js.map +1 -1
- package/dist/render3d/scene-settings.js.map +1 -1
- package/dist/render3d/scene3d.js.map +1 -1
- package/dist/render3d/segments.js.map +1 -1
- package/dist/render3d/texture.js.map +1 -1
- package/dist/render3d/tracking.js.map +1 -1
- package/dist/render3d/transform.js.map +1 -1
- package/dist/render3d/vector3.js.map +1 -1
- package/dist/render3d/walk.js.map +1 -1
- package/dist/runtime/asset-refine.js.map +1 -1
- package/dist/runtime/asset-timeline.js.map +1 -1
- package/dist/runtime/asset-update.js.map +1 -1
- package/dist/runtime/audio-index.js.map +1 -1
- package/dist/runtime/builtin-context.js.map +1 -1
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/frame-time.js.map +1 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/node-picking.js.map +1 -1
- package/dist/runtime/node-picking3d.js.map +1 -1
- package/dist/runtime/placement.js.map +1 -1
- package/dist/runtime/playback-controller.js.map +1 -1
- package/dist/runtime/playback.js.map +1 -1
- package/dist/runtime/precompisition.js.map +1 -1
- package/dist/runtime/project-assets.js.map +1 -1
- package/dist/runtime/session.js.map +1 -1
- package/dist/runtime/settle.js.map +1 -1
- package/dist/runtime/state-evaluator.js.map +1 -1
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command-decorator.js.map +1 -1
- package/dist/tween/command.js.map +1 -1
- package/dist/tween/ease/constants.js.map +1 -1
- package/dist/tween/ease/curve.js.map +1 -1
- package/dist/tween/ease/describe.js.map +1 -1
- package/dist/tween/ease/spec.js.map +1 -1
- package/dist/tween/ease/type.js.map +1 -1
- package/dist/tween/index.js.map +1 -1
- package/dist/tween/inert.js.map +1 -1
- package/dist/tween/lerp.js.map +1 -1
- package/dist/tween/loop.js.map +1 -1
- package/dist/tween/prepare.js.map +1 -1
- package/dist/tween/stepper.js.map +1 -1
- package/dist/tween/to-command.js.map +1 -1
- package/dist/util/clamp.js.map +1 -1
- package/dist/util/context.js.map +1 -1
- package/dist/util/csv.js.map +1 -1
- package/dist/util/generateList.js.map +1 -1
- package/dist/util/index.js.map +1 -1
- package/dist/util/metrics.js.map +1 -1
- package/dist/util/random.js.map +1 -1
- package/dist/util/reference.js.map +1 -1
- package/dist/util/scheduler.js.map +1 -1
- package/package.json +1 -1
- package/dist/attributes/audio/filters/chain.d.ts +0 -113
- package/dist/attributes/audio/filters/chain.d.ts.map +0 -1
- package/dist/attributes/audio/filters/chain.js +0 -104
- package/dist/attributes/audio/filters/chain.js.map +0 -1
- package/dist/attributes/audio/filters/curve.d.ts +0 -152
- package/dist/attributes/audio/filters/curve.d.ts.map +0 -1
- package/dist/attributes/audio/filters/curve.js +0 -250
- package/dist/attributes/audio/filters/curve.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/echo.d.ts +0 -14
- package/dist/attributes/audio/filters/implementations/echo.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/echo.js +0 -11
- package/dist/attributes/audio/filters/implementations/echo.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/gain.d.ts +0 -10
- package/dist/attributes/audio/filters/implementations/gain.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/gain.js +0 -6
- package/dist/attributes/audio/filters/implementations/gain.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/highpass.d.ts +0 -12
- package/dist/attributes/audio/filters/implementations/highpass.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/highpass.js +0 -10
- package/dist/attributes/audio/filters/implementations/highpass.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/lowpass.d.ts +0 -12
- package/dist/attributes/audio/filters/implementations/lowpass.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/lowpass.js +0 -10
- package/dist/attributes/audio/filters/implementations/lowpass.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/speed.d.ts +0 -18
- package/dist/attributes/audio/filters/implementations/speed.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/speed.js +0 -6
- package/dist/attributes/audio/filters/implementations/speed.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/tremolo.d.ts +0 -12
- package/dist/attributes/audio/filters/implementations/tremolo.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/tremolo.js +0 -10
- package/dist/attributes/audio/filters/implementations/tremolo.js.map +0 -1
- package/dist/attributes/audio/filters/index.d.ts +0 -22
- package/dist/attributes/audio/filters/index.d.ts.map +0 -1
- package/dist/attributes/audio/filters/index.js +0 -8
- package/dist/attributes/audio/filters/index.js.map +0 -1
- package/dist/attributes/audio/filters/registry.d.ts +0 -36
- package/dist/attributes/audio/filters/registry.d.ts.map +0 -1
- package/dist/attributes/audio/filters/registry.js +0 -82
- package/dist/attributes/audio/filters/registry.js.map +0 -1
- package/dist/attributes/audio/filters/union.d.ts +0 -18
- package/dist/attributes/audio/filters/union.d.ts.map +0 -1
- package/dist/attributes/audio/filters/union.js +0 -28
- package/dist/attributes/audio/filters/union.js.map +0 -1
- package/dist/attributes/shape/sksl-uniforms.d.ts +0 -146
- package/dist/attributes/shape/sksl-uniforms.d.ts.map +0 -1
- package/dist/attributes/shape/sksl-uniforms.js +0 -0
- package/dist/attributes/shape/sksl-uniforms.js.map +0 -1
- package/dist/browser/chunks/chunk-AOT33LMS.js.map +0 -7
- package/dist/browser/chunks/chunk-GKM6UZJR.js.map +0 -7
- package/dist/browser/chunks/chunk-LKUYVFU3.js.map +0 -7
- package/dist/browser/chunks/chunk-ZRPZPWZU.js.map +0 -7
- package/dist/component/api.d.ts +0 -508
- package/dist/component/api.d.ts.map +0 -1
- package/dist/component/api.js +0 -4
- package/dist/component/api.js.map +0 -1
- package/dist/component/builtins/audio.d.ts +0 -26
- package/dist/component/builtins/audio.d.ts.map +0 -1
- package/dist/component/builtins/audio.js +0 -41
- package/dist/component/builtins/audio.js.map +0 -1
- package/dist/component/builtins/canvas3d.d.ts +0 -98
- package/dist/component/builtins/canvas3d.d.ts.map +0 -1
- package/dist/component/builtins/canvas3d.js +0 -21
- package/dist/component/builtins/canvas3d.js.map +0 -1
- package/dist/component/builtins/composite.d.ts +0 -56
- package/dist/component/builtins/composite.d.ts.map +0 -1
- package/dist/component/builtins/composite.js +0 -25
- package/dist/component/builtins/composite.js.map +0 -1
- package/dist/component/builtins/geometry.d.ts +0 -505
- package/dist/component/builtins/geometry.d.ts.map +0 -1
- package/dist/component/builtins/geometry.js +0 -107
- package/dist/component/builtins/geometry.js.map +0 -1
- package/dist/component/builtins/layout.d.ts +0 -88
- package/dist/component/builtins/layout.d.ts.map +0 -1
- package/dist/component/builtins/layout.js +0 -84
- package/dist/component/builtins/layout.js.map +0 -1
- package/dist/component/builtins/media.d.ts +0 -95
- package/dist/component/builtins/media.d.ts.map +0 -1
- package/dist/component/builtins/media.js +0 -149
- package/dist/component/builtins/media.js.map +0 -1
- package/dist/component/builtins/providers.d.ts +0 -23
- package/dist/component/builtins/providers.d.ts.map +0 -1
- package/dist/component/builtins/providers.js +0 -30
- package/dist/component/builtins/providers.js.map +0 -1
- package/dist/component/builtins/text.d.ts +0 -193
- package/dist/component/builtins/text.d.ts.map +0 -1
- package/dist/component/builtins/text.js +0 -113
- package/dist/component/builtins/text.js.map +0 -1
- package/dist/component/builtins/three.d.ts +0 -1085
- package/dist/component/builtins/three.d.ts.map +0 -1
- package/dist/component/builtins/three.js +0 -265
- package/dist/component/builtins/three.js.map +0 -1
- package/dist/component/clip-of.d.ts +0 -5
- package/dist/component/clip-of.d.ts.map +0 -1
- package/dist/component/clip-of.js +0 -33
- package/dist/component/clip-of.js.map +0 -1
- package/dist/component/commands-for.d.ts +0 -19
- package/dist/component/commands-for.d.ts.map +0 -1
- package/dist/component/commands-for.js +0 -5
- package/dist/component/commands-for.js.map +0 -1
- package/dist/component/component-audio.d.ts +0 -9
- package/dist/component/component-audio.d.ts.map +0 -1
- package/dist/component/component-audio.js +0 -18
- package/dist/component/component-audio.js.map +0 -1
- package/dist/component/component2d.d.ts +0 -9
- package/dist/component/component2d.d.ts.map +0 -1
- package/dist/component/component2d.js +0 -239
- package/dist/component/component2d.js.map +0 -1
- package/dist/component/component3d.d.ts +0 -9
- package/dist/component/component3d.d.ts.map +0 -1
- package/dist/component/component3d.js +0 -99
- package/dist/component/component3d.js.map +0 -1
- package/dist/component/factory.d.ts +0 -63
- package/dist/component/factory.d.ts.map +0 -1
- package/dist/component/factory.js +0 -313
- package/dist/component/factory.js.map +0 -1
- package/dist/component/modules/aim.d.ts +0 -30
- package/dist/component/modules/aim.d.ts.map +0 -1
- package/dist/component/modules/aim.js +0 -39
- package/dist/component/modules/aim.js.map +0 -1
- package/dist/component/modules/corners.d.ts +0 -13
- package/dist/component/modules/corners.d.ts.map +0 -1
- package/dist/component/modules/corners.js +0 -12
- package/dist/component/modules/corners.js.map +0 -1
- package/dist/component/modules/flow.d.ts +0 -26
- package/dist/component/modules/flow.d.ts.map +0 -1
- package/dist/component/modules/flow.js +0 -55
- package/dist/component/modules/flow.js.map +0 -1
- package/dist/component/modules/material.d.ts +0 -40
- package/dist/component/modules/material.d.ts.map +0 -1
- package/dist/component/modules/material.js +0 -75
- package/dist/component/modules/material.js.map +0 -1
- package/dist/component/modules/paint.d.ts +0 -71
- package/dist/component/modules/paint.d.ts.map +0 -1
- package/dist/component/modules/paint.js +0 -106
- package/dist/component/modules/paint.js.map +0 -1
- package/dist/component/modules/shapes.d.ts +0 -31
- package/dist/component/modules/shapes.d.ts.map +0 -1
- package/dist/component/modules/shapes.js +0 -43
- package/dist/component/modules/shapes.js.map +0 -1
- package/dist/component/modules/text-layout.d.ts +0 -26
- package/dist/component/modules/text-layout.d.ts.map +0 -1
- package/dist/component/modules/text-layout.js +0 -57
- package/dist/component/modules/text-layout.js.map +0 -1
- package/dist/component/modules/text-style.d.ts +0 -48
- package/dist/component/modules/text-style.d.ts.map +0 -1
- package/dist/component/modules/text-style.js +0 -63
- package/dist/component/modules/text-style.js.map +0 -1
- package/dist/component/modules/three-entries.d.ts +0 -23
- package/dist/component/modules/three-entries.d.ts.map +0 -1
- package/dist/component/modules/three-entries.js +0 -41
- package/dist/component/modules/three-entries.js.map +0 -1
- package/dist/component/modules/view3d.d.ts +0 -55
- package/dist/component/modules/view3d.d.ts.map +0 -1
- package/dist/component/modules/view3d.js +0 -160
- package/dist/component/modules/view3d.js.map +0 -1
- package/dist/component/timeline.d.ts +0 -22
- package/dist/component/timeline.d.ts.map +0 -1
- package/dist/component/timeline.js +0 -128
- package/dist/component/timeline.js.map +0 -1
- package/dist/component/type-def.d.ts +0 -26
- package/dist/component/type-def.d.ts.map +0 -1
- package/dist/component/type-def.js +0 -16
- package/dist/component/type-def.js.map +0 -1
- package/dist/component/types.d.ts +0 -91
- package/dist/component/types.d.ts.map +0 -1
- package/dist/component/types.js +0 -88
- package/dist/component/types.js.map +0 -1
- package/dist/component/views.d.ts +0 -121
- package/dist/component/views.d.ts.map +0 -1
- package/dist/component/views.js +0 -413
- package/dist/component/views.js.map +0 -1
- package/dist/document/withdraw.d.ts +0 -28
- package/dist/document/withdraw.d.ts.map +0 -1
- package/dist/document/withdraw.js +0 -61
- package/dist/document/withdraw.js.map +0 -1
- package/dist/jsx/jsx-dev-runtime.d.ts +0 -3
- package/dist/jsx/jsx-dev-runtime.d.ts.map +0 -1
- package/dist/jsx/jsx-dev-runtime.js +0 -3
- package/dist/jsx/jsx-dev-runtime.js.map +0 -1
- package/dist/jsx/jsx-runtime.d.ts +0 -27
- package/dist/jsx/jsx-runtime.d.ts.map +0 -1
- package/dist/jsx/jsx-runtime.js +0 -26
- package/dist/jsx/jsx-runtime.js.map +0 -1
- package/dist/nodes/2d/node-lifecycle.d.ts +0 -46
- package/dist/nodes/2d/node-lifecycle.d.ts.map +0 -1
- package/dist/nodes/2d/node-lifecycle.js +0 -264
- package/dist/nodes/2d/node-lifecycle.js.map +0 -1
- package/dist/nodes/2d/node-motion.d.ts +0 -56
- package/dist/nodes/2d/node-motion.d.ts.map +0 -1
- package/dist/nodes/2d/node-motion.js +0 -86
- package/dist/nodes/2d/node-motion.js.map +0 -1
- package/dist/nodes/2d/node-render.d.ts +0 -44
- package/dist/nodes/2d/node-render.d.ts.map +0 -1
- package/dist/nodes/2d/node-render.js +0 -80
- package/dist/nodes/2d/node-render.js.map +0 -1
- package/dist/nodes/2d/node-space.d.ts +0 -63
- package/dist/nodes/2d/node-space.d.ts.map +0 -1
- package/dist/nodes/2d/node-space.js +0 -131
- package/dist/nodes/2d/node-space.js.map +0 -1
- package/dist/nodes/2d/node-transform.d.ts +0 -55
- package/dist/nodes/2d/node-transform.d.ts.map +0 -1
- package/dist/nodes/2d/node-transform.js +0 -73
- package/dist/nodes/2d/node-transform.js.map +0 -1
- package/dist/nodes/2d/node2d.d.ts +0 -1111
- package/dist/nodes/2d/node2d.d.ts.map +0 -1
- package/dist/nodes/2d/node2d.js +0 -1665
- package/dist/nodes/2d/node2d.js.map +0 -1
- package/dist/nodes/2d/paint-node.d.ts +0 -142
- package/dist/nodes/2d/paint-node.d.ts.map +0 -1
- package/dist/nodes/2d/paint-node.js +0 -232
- package/dist/nodes/2d/paint-node.js.map +0 -1
- package/dist/nodes/audio/audio-bus.d.ts +0 -28
- package/dist/nodes/audio/audio-bus.d.ts.map +0 -1
- package/dist/nodes/audio/audio-bus.js +0 -33
- package/dist/nodes/audio/audio-bus.js.map +0 -1
- package/dist/nodes/audio/index.d.ts +0 -4
- package/dist/nodes/audio/index.d.ts.map +0 -1
- package/dist/nodes/audio/index.js +0 -2
- package/dist/nodes/audio/index.js.map +0 -1
- package/dist/nodes/audio/node-audio.d.ts +0 -107
- package/dist/nodes/audio/node-audio.d.ts.map +0 -1
- package/dist/nodes/audio/node-audio.js +0 -179
- package/dist/nodes/audio/node-audio.js.map +0 -1
- package/dist/nodes/audio/sound-node.d.ts +0 -41
- package/dist/nodes/audio/sound-node.d.ts.map +0 -1
- package/dist/nodes/audio/sound-node.js +0 -71
- package/dist/nodes/audio/sound-node.js.map +0 -1
- package/dist/nodes/geometry/boolean-node.d.ts +0 -28
- package/dist/nodes/geometry/boolean-node.d.ts.map +0 -1
- package/dist/nodes/geometry/boolean-node.js +0 -81
- package/dist/nodes/geometry/boolean-node.js.map +0 -1
- package/dist/nodes/geometry/bounds-shape-node.d.ts +0 -149
- package/dist/nodes/geometry/bounds-shape-node.d.ts.map +0 -1
- package/dist/nodes/geometry/bounds-shape-node.js +0 -181
- package/dist/nodes/geometry/bounds-shape-node.js.map +0 -1
- package/dist/nodes/geometry/box-path-node.d.ts +0 -89
- package/dist/nodes/geometry/box-path-node.d.ts.map +0 -1
- package/dist/nodes/geometry/box-path-node.js +0 -116
- package/dist/nodes/geometry/box-path-node.js.map +0 -1
- package/dist/nodes/geometry/ellipse-node.d.ts +0 -18
- package/dist/nodes/geometry/ellipse-node.d.ts.map +0 -1
- package/dist/nodes/geometry/ellipse-node.js +0 -45
- package/dist/nodes/geometry/ellipse-node.js.map +0 -1
- package/dist/nodes/geometry/group-bounds.d.ts +0 -56
- package/dist/nodes/geometry/group-bounds.d.ts.map +0 -1
- package/dist/nodes/geometry/group-bounds.js +0 -87
- package/dist/nodes/geometry/group-bounds.js.map +0 -1
- package/dist/nodes/geometry/mask-node.d.ts +0 -33
- package/dist/nodes/geometry/mask-node.d.ts.map +0 -1
- package/dist/nodes/geometry/mask-node.js +0 -66
- package/dist/nodes/geometry/mask-node.js.map +0 -1
- package/dist/nodes/geometry/path-node.d.ts +0 -26
- package/dist/nodes/geometry/path-node.d.ts.map +0 -1
- package/dist/nodes/geometry/path-node.js +0 -58
- package/dist/nodes/geometry/path-node.js.map +0 -1
- package/dist/nodes/geometry/polygon-node.d.ts +0 -26
- package/dist/nodes/geometry/polygon-node.d.ts.map +0 -1
- package/dist/nodes/geometry/polygon-node.js +0 -47
- package/dist/nodes/geometry/polygon-node.js.map +0 -1
- package/dist/nodes/geometry/polygram-node.d.ts +0 -33
- package/dist/nodes/geometry/polygram-node.d.ts.map +0 -1
- package/dist/nodes/geometry/polygram-node.js +0 -52
- package/dist/nodes/geometry/polygram-node.js.map +0 -1
- package/dist/nodes/geometry/rect-node.d.ts +0 -38
- package/dist/nodes/geometry/rect-node.d.ts.map +0 -1
- package/dist/nodes/geometry/rect-node.js +0 -56
- package/dist/nodes/geometry/rect-node.js.map +0 -1
- package/dist/nodes/geometry/shape-node.d.ts +0 -71
- package/dist/nodes/geometry/shape-node.d.ts.map +0 -1
- package/dist/nodes/geometry/shape-node.js +0 -140
- package/dist/nodes/geometry/shape-node.js.map +0 -1
- package/dist/nodes/geometry/shape-outline.d.ts +0 -93
- package/dist/nodes/geometry/shape-outline.d.ts.map +0 -1
- package/dist/nodes/geometry/shape-outline.js +0 -470
- package/dist/nodes/geometry/shape-outline.js.map +0 -1
- package/dist/nodes/index.d.ts +0 -53
- package/dist/nodes/index.d.ts.map +0 -1
- package/dist/nodes/index.js +0 -35
- package/dist/nodes/index.js.map +0 -1
- package/dist/nodes/layout/camera-node.d.ts +0 -80
- package/dist/nodes/layout/camera-node.d.ts.map +0 -1
- package/dist/nodes/layout/camera-node.js +0 -153
- package/dist/nodes/layout/camera-node.js.map +0 -1
- package/dist/nodes/layout/orbit-camera-node.d.ts +0 -80
- package/dist/nodes/layout/orbit-camera-node.d.ts.map +0 -1
- package/dist/nodes/layout/orbit-camera-node.js +0 -118
- package/dist/nodes/layout/orbit-camera-node.js.map +0 -1
- package/dist/nodes/layout/rotated-box.d.ts +0 -20
- package/dist/nodes/layout/rotated-box.d.ts.map +0 -1
- package/dist/nodes/layout/rotated-box.js +0 -76
- package/dist/nodes/layout/rotated-box.js.map +0 -1
- package/dist/nodes/media/video-node.d.ts +0 -229
- package/dist/nodes/media/video-node.d.ts.map +0 -1
- package/dist/nodes/media/video-node.js +0 -350
- package/dist/nodes/media/video-node.js.map +0 -1
- package/dist/nodes/node/declare-paints.d.ts +0 -19
- package/dist/nodes/node/declare-paints.d.ts.map +0 -1
- package/dist/nodes/node/declare-paints.js +0 -27
- package/dist/nodes/node/declare-paints.js.map +0 -1
- package/dist/nodes/node/node-editor-state.d.ts +0 -53
- package/dist/nodes/node/node-editor-state.d.ts.map +0 -1
- package/dist/nodes/node/node-editor-state.js +0 -23
- package/dist/nodes/node/node-editor-state.js.map +0 -1
- package/dist/nodes/node/node-reactive.d.ts +0 -89
- package/dist/nodes/node/node-reactive.d.ts.map +0 -1
- package/dist/nodes/node/node-reactive.js +0 -135
- package/dist/nodes/node/node-reactive.js.map +0 -1
- package/dist/nodes/node/node-time.d.ts +0 -39
- package/dist/nodes/node/node-time.d.ts.map +0 -1
- package/dist/nodes/node/node-time.js +0 -14
- package/dist/nodes/node/node-time.js.map +0 -1
- package/dist/nodes/node/node-walk.d.ts +0 -46
- package/dist/nodes/node/node-walk.d.ts.map +0 -1
- package/dist/nodes/node/node-walk.js +0 -74
- package/dist/nodes/node/node-walk.js.map +0 -1
- package/dist/nodes/node/node.d.ts +0 -445
- package/dist/nodes/node/node.d.ts.map +0 -1
- package/dist/nodes/node/node.js +0 -745
- package/dist/nodes/node/node.js.map +0 -1
- package/dist/nodes/node/text-defaults.d.ts +0 -32
- package/dist/nodes/node/text-defaults.d.ts.map +0 -1
- package/dist/nodes/node/text-defaults.js +0 -37
- package/dist/nodes/node/text-defaults.js.map +0 -1
- package/dist/nodes/root/canvas2d-node.d.ts +0 -163
- package/dist/nodes/root/canvas2d-node.d.ts.map +0 -1
- package/dist/nodes/root/canvas2d-node.js +0 -264
- package/dist/nodes/root/canvas2d-node.js.map +0 -1
- package/dist/nodes/root/provider-node.d.ts +0 -47
- package/dist/nodes/root/provider-node.d.ts.map +0 -1
- package/dist/nodes/root/provider-node.js +0 -63
- package/dist/nodes/root/provider-node.js.map +0 -1
- package/dist/nodes/root/theme-provider-node.d.ts +0 -29
- package/dist/nodes/root/theme-provider-node.d.ts.map +0 -1
- package/dist/nodes/root/theme-provider-node.js +0 -43
- package/dist/nodes/root/theme-provider-node.js.map +0 -1
- package/dist/nodes/text/default-text-style-node.d.ts +0 -103
- package/dist/nodes/text/default-text-style-node.d.ts.map +0 -1
- package/dist/nodes/text/default-text-style-node.js +0 -146
- package/dist/nodes/text/default-text-style-node.js.map +0 -1
- package/dist/nodes/text/number-format.d.ts +0 -66
- package/dist/nodes/text/number-format.d.ts.map +0 -1
- package/dist/nodes/text/number-format.js +0 -227
- package/dist/nodes/text/number-format.js.map +0 -1
- package/dist/nodes/text/number-node.d.ts +0 -94
- package/dist/nodes/text/number-node.d.ts.map +0 -1
- package/dist/nodes/text/number-node.js +0 -86
- package/dist/nodes/text/number-node.js.map +0 -1
- package/dist/nodes/text/number-pattern.d.ts +0 -51
- package/dist/nodes/text/number-pattern.d.ts.map +0 -1
- package/dist/nodes/text/number-pattern.js +0 -77
- package/dist/nodes/text/number-pattern.js.map +0 -1
- package/dist/nodes/text/richtext-node.d.ts +0 -68
- package/dist/nodes/text/richtext-node.d.ts.map +0 -1
- package/dist/nodes/text/richtext-node.js +0 -78
- package/dist/nodes/text/richtext-node.js.map +0 -1
- package/dist/nodes/text/text-base.d.ts +0 -118
- package/dist/nodes/text/text-base.d.ts.map +0 -1
- package/dist/nodes/text/text-base.js +0 -153
- package/dist/nodes/text/text-base.js.map +0 -1
- package/dist/nodes/text/text-layout.d.ts +0 -87
- package/dist/nodes/text/text-layout.d.ts.map +0 -1
- package/dist/nodes/text/text-layout.js +0 -368
- package/dist/nodes/text/text-layout.js.map +0 -1
- package/dist/nodes/text/text-node.d.ts +0 -84
- package/dist/nodes/text/text-node.d.ts.map +0 -1
- package/dist/nodes/text/text-node.js +0 -188
- package/dist/nodes/text/text-node.js.map +0 -1
- package/dist/nodes/text/text-selection.d.ts +0 -125
- package/dist/nodes/text/text-selection.d.ts.map +0 -1
- package/dist/nodes/text/text-selection.js +0 -209
- package/dist/nodes/text/text-selection.js.map +0 -1
- package/dist/nodes/three/camera-nodes.d.ts +0 -109
- package/dist/nodes/three/camera-nodes.d.ts.map +0 -1
- package/dist/nodes/three/camera-nodes.js +0 -112
- package/dist/nodes/three/camera-nodes.js.map +0 -1
- package/dist/nodes/three/canvas3d-node.d.ts +0 -295
- package/dist/nodes/three/canvas3d-node.d.ts.map +0 -1
- package/dist/nodes/three/canvas3d-node.js +0 -486
- package/dist/nodes/three/canvas3d-node.js.map +0 -1
- package/dist/nodes/three/drawable-nodes.d.ts +0 -173
- package/dist/nodes/three/drawable-nodes.d.ts.map +0 -1
- package/dist/nodes/three/drawable-nodes.js +0 -284
- package/dist/nodes/three/drawable-nodes.js.map +0 -1
- package/dist/nodes/three/environment-nodes.d.ts +0 -106
- package/dist/nodes/three/environment-nodes.d.ts.map +0 -1
- package/dist/nodes/three/environment-nodes.js +0 -134
- package/dist/nodes/three/environment-nodes.js.map +0 -1
- package/dist/nodes/three/geometry-nodes.d.ts +0 -197
- package/dist/nodes/three/geometry-nodes.d.ts.map +0 -1
- package/dist/nodes/three/geometry-nodes.js +0 -322
- package/dist/nodes/three/geometry-nodes.js.map +0 -1
- package/dist/nodes/three/grid-geometry3d.d.ts +0 -62
- package/dist/nodes/three/grid-geometry3d.d.ts.map +0 -1
- package/dist/nodes/three/grid-geometry3d.js +0 -114
- package/dist/nodes/three/grid-geometry3d.js.map +0 -1
- package/dist/nodes/three/group3d.d.ts +0 -23
- package/dist/nodes/three/group3d.d.ts.map +0 -1
- package/dist/nodes/three/group3d.js +0 -21
- package/dist/nodes/three/group3d.js.map +0 -1
- package/dist/nodes/three/light-nodes.d.ts +0 -120
- package/dist/nodes/three/light-nodes.d.ts.map +0 -1
- package/dist/nodes/three/light-nodes.js +0 -173
- package/dist/nodes/three/light-nodes.js.map +0 -1
- package/dist/nodes/three/mesh3d.d.ts +0 -117
- package/dist/nodes/three/mesh3d.d.ts.map +0 -1
- package/dist/nodes/three/mesh3d.js +0 -147
- package/dist/nodes/three/mesh3d.js.map +0 -1
- package/dist/nodes/three/node3d.d.ts +0 -230
- package/dist/nodes/three/node3d.d.ts.map +0 -1
- package/dist/nodes/three/node3d.js +0 -337
- package/dist/nodes/three/node3d.js.map +0 -1
- package/dist/render/descriptors/latex.d.ts +0 -6
- package/dist/render/descriptors/latex.d.ts.map +0 -1
- package/dist/render/descriptors/latex.js +0 -2
- package/dist/render/descriptors/latex.js.map +0 -1
- package/dist/tween/seekable.d.ts +0 -81
- package/dist/tween/seekable.d.ts.map +0 -1
- package/dist/tween/seekable.js +0 -137
- package/dist/tween/seekable.js.map +0 -1
|
@@ -1,153 +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 { textOps } from "../../attributes/text/ops.js";
|
|
8
|
-
import { PaintNode } from "../../nodes/2d/paint-node.js";
|
|
9
|
-
import { property } from "../../attributes/properties/decorator.js";
|
|
10
|
-
import { Graphics2D } from "../../render/graphics2d.js";
|
|
11
|
-
import { declareGlyphAssets, measureGlyphs, textSegments, textState } from "./text-layout.js";
|
|
12
|
-
import { applyTextDefaults } from "./default-text-style-node.js";
|
|
13
|
-
/**
|
|
14
|
-
* **A node whose box is the box of some shaped glyphs.**
|
|
15
|
-
*
|
|
16
|
-
* Everything about setting a string in a face — the shaping props, the
|
|
17
|
-
* cascade that fills them in, measuring the block, declaring the fonts it needs
|
|
18
|
-
* and drawing it — and nothing about *where the string comes from*, which is
|
|
19
|
-
* {@link displayText}'s and is the only thing its subclasses disagree about.
|
|
20
|
-
* {@link Text} is handed one and lets an author edit it; {@link NumberNode}
|
|
21
|
-
* derives one from a number and a format.
|
|
22
|
-
*
|
|
23
|
-
* That seam is the reason this class exists rather than `NumberNode extends
|
|
24
|
-
* Text`. A figure is not a string: `append`, `prepend`, `find`, `word`,
|
|
25
|
-
* `wrap` and the `text` prop itself are all operations on copy somebody typed,
|
|
26
|
-
* and a number inheriting them offered an editor a Content field over a value it
|
|
27
|
-
* could not write to and a "Append Text" command over a quantity. What the two
|
|
28
|
-
* genuinely share is glyphs, and that is what is here.
|
|
29
|
-
*
|
|
30
|
-
* **Not `Intl`, anywhere below this.** A scene is a picture with a fixed layout;
|
|
31
|
-
* see {@link NumberNode} for the argument.
|
|
32
|
-
*/
|
|
33
|
-
export class TextBase extends PaintNode {
|
|
34
|
-
/** Whether long lines break — a single-line figure never does. */
|
|
35
|
-
get wrapsText() { return false; }
|
|
36
|
-
/** The path the glyphs ride, for a type that offers text-on-path. */
|
|
37
|
-
get glyphPath() { return null; }
|
|
38
|
-
/**
|
|
39
|
-
* Live per-range style overrides — {@link Text}'s selections. A derived
|
|
40
|
-
* string has no ranges anyone could have selected, so the base answers with
|
|
41
|
-
* none and {@link buildSegments} keeps only the reveal window.
|
|
42
|
-
*/
|
|
43
|
-
styledRuns() { return []; }
|
|
44
|
-
/** Stretches a document styles apart from the node — {@link Text}'s `runs`. */
|
|
45
|
-
styleRuns() { return []; }
|
|
46
|
-
// Inherit text-style defaults from the nearest ancestor <DefaultTextStyle>
|
|
47
|
-
// for any style prop the author didn't set. This is context-value application
|
|
48
|
-
// (structure is fixed — a glyph node has no children), so it belongs in
|
|
49
|
-
// resolveContext, which runs once after the tree + context exist. Writing
|
|
50
|
-
// through _writeProp applies each field's own mapper (e.g. `fill`'s color
|
|
51
|
-
// resolver) once.
|
|
52
|
-
resolveContext(ctx) {
|
|
53
|
-
applyTextDefaults(this, this._props);
|
|
54
|
-
}
|
|
55
|
-
// Glyphs don't hug/fill based on children (there are none) — they hug their
|
|
56
|
-
// own glyph box by default, filling only when the box has to be resolved
|
|
57
|
-
// externally: `autofit` measures glyphs against the allotted box.
|
|
58
|
-
applyDefaultSize(props) {
|
|
59
|
-
const autofit = props?.fontSize === 'autofit';
|
|
60
|
-
this.applyProp("height", props?.height ?? (autofit ? "fill" : "hug"));
|
|
61
|
-
this.applyProp("width", props?.width ?? (autofit ? "fill" : "hug"));
|
|
62
|
-
}
|
|
63
|
-
measure(constraints, scope) {
|
|
64
|
-
return measureGlyphs(this, this._source(), constraints, scope);
|
|
65
|
-
}
|
|
66
|
-
/** The string cut at every style boundary — see {@link textSegments}. */
|
|
67
|
-
buildSegments() {
|
|
68
|
-
return textSegments(this, this._source());
|
|
69
|
-
}
|
|
70
|
-
declareAssets(assets) {
|
|
71
|
-
super.declareAssets(assets);
|
|
72
|
-
declareGlyphAssets(this, this._source(), assets);
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* The descriptor this node draws itself as, at the current frame.
|
|
76
|
-
*
|
|
77
|
-
* `@internal` — split out so `node-picking`'s caret geometry is measured
|
|
78
|
-
* from the same state that gets painted.
|
|
79
|
-
*/
|
|
80
|
-
/** @internal */
|
|
81
|
-
_textState() {
|
|
82
|
-
return textState(this, this._source(), this.layoutBounds);
|
|
83
|
-
}
|
|
84
|
-
// The bare text op as a Graphics2D (no paint), plus whether selection segments
|
|
85
|
-
// are active. Glyphs have no single fillable silhouette path, so the generic
|
|
86
|
-
// PaintNode.shapeGraphics() stays null and these nodes drive their own stroke
|
|
87
|
-
// pass off this builder instead.
|
|
88
|
-
textOpGraphics() {
|
|
89
|
-
const state = this._textState();
|
|
90
|
-
return { g: new Graphics2D().text(state), segments: state.segments != null };
|
|
91
|
-
}
|
|
92
|
-
renderSelf(ctx) {
|
|
93
|
-
const { g, segments } = this.textOpGraphics();
|
|
94
|
-
g.shadow(this.shadow);
|
|
95
|
-
// With segments the renderer paints each run with its own fill/stroke, so
|
|
96
|
-
// the node-level paint is omitted to avoid double-painting.
|
|
97
|
-
if (!segments) {
|
|
98
|
-
g.fill(this.fill);
|
|
99
|
-
}
|
|
100
|
-
ctx.draw(g);
|
|
101
|
-
}
|
|
102
|
-
// The stroke only applies to the non-segment / text-on-path case; the
|
|
103
|
-
// segmented branch paints its own fill/stroke per run in renderSelf.
|
|
104
|
-
renderStroke(ctx) {
|
|
105
|
-
const stroke = this.stroke;
|
|
106
|
-
if (stroke.length === 0)
|
|
107
|
-
return;
|
|
108
|
-
const { g, segments } = this.textOpGraphics();
|
|
109
|
-
if (segments)
|
|
110
|
-
return;
|
|
111
|
-
ctx.draw(g.stroke(stroke));
|
|
112
|
-
}
|
|
113
|
-
_source() {
|
|
114
|
-
return { text: this.displayText(), wraps: this.wrapsText, glyphPath: this.glyphPath, selections: this.styledRuns(), runs: this.styleRuns() };
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
__decorate([
|
|
118
|
-
property()
|
|
119
|
-
], TextBase.prototype, "fontFamily", void 0);
|
|
120
|
-
__decorate([
|
|
121
|
-
property({ default: 48, tween: textOps.lerpFontSize })
|
|
122
|
-
], TextBase.prototype, "fontSize", void 0);
|
|
123
|
-
__decorate([
|
|
124
|
-
property({ default: 400 })
|
|
125
|
-
], TextBase.prototype, "fontWeight", void 0);
|
|
126
|
-
__decorate([
|
|
127
|
-
property({ default: 'normal' })
|
|
128
|
-
], TextBase.prototype, "fontStyle", void 0);
|
|
129
|
-
__decorate([
|
|
130
|
-
property({ default: 0 })
|
|
131
|
-
], TextBase.prototype, "letterSpacing", void 0);
|
|
132
|
-
__decorate([
|
|
133
|
-
property({ default: 1.2 })
|
|
134
|
-
], TextBase.prototype, "lineHeight", void 0);
|
|
135
|
-
__decorate([
|
|
136
|
-
property({ default: 'center' })
|
|
137
|
-
], TextBase.prototype, "textAlign", void 0);
|
|
138
|
-
__decorate([
|
|
139
|
-
property({ default: 'center', kind: 'enum', options: ['top', 'center', 'bottom'] })
|
|
140
|
-
], TextBase.prototype, "verticalAlign", void 0);
|
|
141
|
-
__decorate([
|
|
142
|
-
property({ default: 'none', kind: 'enum', options: ['none', 'underline', 'line-through'] })
|
|
143
|
-
], TextBase.prototype, "textDecoration", void 0);
|
|
144
|
-
__decorate([
|
|
145
|
-
property({ default: 'none', kind: 'enum', options: ['none', 'upper', 'lower', 'title'] })
|
|
146
|
-
], TextBase.prototype, "textCase", void 0);
|
|
147
|
-
__decorate([
|
|
148
|
-
property({ default: 12 })
|
|
149
|
-
], TextBase.prototype, "minFontSize", void 0);
|
|
150
|
-
__decorate([
|
|
151
|
-
property({ default: undefined })
|
|
152
|
-
], TextBase.prototype, "variant", void 0);
|
|
153
|
-
//# sourceMappingURL=text-base.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text-base.js","sourceRoot":"","sources":["../../../src/nodes/text/text-base.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAc,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAO7D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAMjD,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAmB,MAAM,eAAe,CAAC;AAC5G,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,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAsB,EAAE,CAAC;0CAC3E;AACQ;IAA3C,QAAQ,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;6CAAsC;AACb;IAAlD,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;yCAAmC","sourcesContent":["import type { FontStyle, ResolvedTextRun, TextAlign, TextCase, TextDecoration, VerticalAlign } from \"@/attributes/text/types\";\r\nimport { textOps } from \"@/attributes/text/ops\";\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 { SizeConstraints } from \"@/layout/constraints\";\r\nimport { MeasureContext2D } from \"@/render/measure-context\";\r\nimport { Size2D } from \"@/attributes/layout/size\";\r\nimport { RenderContext2D } from \"@/render/render-context2d\";\r\nimport { Graphics2D } from \"@/render/graphics2d\";\r\nimport { TextSegment, TextState } from \"@/render/descriptors/text\";\r\nimport type { AssetScope } from \"@/assets/scope\";\r\nimport { StrokeResolved } from \"@/attributes/shape/stroke/stroke\";\r\nimport { PathData } from \"@/render/descriptors/path\";\r\nimport type { TextSelection } from \"./text-selection\";\r\nimport { declareGlyphAssets, measureGlyphs, textSegments, textState, type TextSource } from \"./text-layout\";\r\nimport { applyTextDefaults } from \"./default-text-style-node\";\r\n\r\n\r\n/** The fields a string is shaped and set by, shared by every node that draws glyphs. */\r\nexport interface TextBaseProps extends PaintProps {\r\n fontSize: number | 'autofit';\r\n fontFamily: string;\r\n fontWeight: number;\r\n fontStyle: FontStyle;\r\n letterSpacing: number;\r\n lineHeight: number;\r\n textAlign: TextAlign;\r\n verticalAlign: VerticalAlign;\r\n textDecoration: TextDecoration;\r\n textCase: TextCase;\r\n minFontSize: number;\r\n /**\r\n * Name of a typography preset from `theme.typography` (e.g. `\"header\"`).\r\n * Supplies any text-style prop (fontSize, fontWeight, …) not set explicitly\r\n * here. An explicit prop always wins over the preset; the preset wins over an\r\n * inherited `<DefaultTextStyle>`.\r\n */\r\n variant: string;\r\n}\r\n\r\n\r\n/**\r\n * **A node whose box is the box of some shaped glyphs.**\r\n *\r\n * Everything about setting a string in a face — the shaping props, the\r\n * cascade that fills them in, measuring the block, declaring the fonts it needs\r\n * and drawing it — and nothing about *where the string comes from*, which is\r\n * {@link displayText}'s and is the only thing its subclasses disagree about.\r\n * {@link Text} is handed one and lets an author edit it; {@link NumberNode}\r\n * derives one from a number and a format.\r\n *\r\n * That seam is the reason this class exists rather than `NumberNode extends\r\n * Text`. A figure is not a string: `append`, `prepend`, `find`, `word`,\r\n * `wrap` and the `text` prop itself are all operations on copy somebody typed,\r\n * and a number inheriting them offered an editor a Content field over a value it\r\n * could not write to and a \"Append Text\" command over a quantity. What the two\r\n * genuinely share is glyphs, and that is what is here.\r\n *\r\n * **Not `Intl`, anywhere below this.** A scene is a picture with a fixed layout;\r\n * see {@link NumberNode} for the argument.\r\n */\r\nexport abstract class TextBase<P extends TextBaseProps = TextBaseProps> extends PaintNode<P> {\r\n\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 // `'autofit'` is a mode, not a magnitude: the shared rule steps it at the\r\n // midpoint, where the numeric cell tween would compute `'autofit' + …` = NaN.\r\n @property({ default: 48, tween: textOps.lerpFontSize }) declare readonly fontSize: number | 'autofit';\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: 'center', kind: 'enum', options: ['top', 'center', 'bottom'] satisfies VerticalAlign[] })\r\n declare readonly verticalAlign: VerticalAlign;\r\n @property({ default: 'none', kind: 'enum', options: ['none', 'underline', 'line-through'] satisfies TextDecoration[] })\r\n declare readonly textDecoration: TextDecoration;\r\n @property({ default: 'none', kind: 'enum', options: ['none', 'upper', 'lower', 'title'] satisfies TextCase[] })\r\n declare readonly textCase: TextCase;\r\n @property({ default: 12 }) declare readonly minFontSize: number;\r\n @property({ default: undefined }) declare readonly variant?: string;\r\n\r\n /**\r\n * The string this node draws, this frame.\r\n *\r\n * Read fresh everywhere below rather than cached into a prop, so a subclass\r\n * deriving it from other props — a figure from its value and its format —\r\n * reformats and redraws without owning a binding of its own.\r\n */\r\n abstract displayText(): string;\r\n\r\n /** Whether long lines break — a single-line figure never does. */\r\n protected get wrapsText(): boolean { return false; }\r\n\r\n /** The path the glyphs ride, for a type that offers text-on-path. */\r\n protected get glyphPath(): PathData | null { return null; }\r\n\r\n /**\r\n * Live per-range style overrides — {@link Text}'s selections. A derived\r\n * string has no ranges anyone could have selected, so the base answers with\r\n * none and {@link buildSegments} keeps only the reveal window.\r\n */\r\n protected styledRuns(): readonly TextSelection[] { return []; }\r\n\r\n /** Stretches a document styles apart from the node — {@link Text}'s `runs`. */\r\n protected styleRuns(): readonly ResolvedTextRun[] { return []; }\r\n\r\n // Inherit text-style defaults from the nearest ancestor <DefaultTextStyle>\r\n // for any style prop the author didn't set. This is context-value application\r\n // (structure is fixed — a glyph node has no children), so it belongs in\r\n // resolveContext, which runs once after the tree + context exist. Writing\r\n // through _writeProp applies each field's own mapper (e.g. `fill`'s color\r\n // resolver) once.\r\n protected override resolveContext(ctx: ContextMap): void {\r\n applyTextDefaults(this, this._props as Record<string, unknown> | undefined);\r\n }\r\n\r\n // Glyphs don't hug/fill based on children (there are none) — they hug their\r\n // own glyph box by default, filling only when the box has to be resolved\r\n // externally: `autofit` measures glyphs against the allotted box.\r\n protected override applyDefaultSize(props?: NodeConfig<any, P>): void {\r\n const autofit = props?.fontSize === 'autofit';\r\n this.applyProp(\"height\", props?.height ?? (autofit ? \"fill\" : \"hug\"));\r\n this.applyProp(\"width\", props?.width ?? (autofit ? \"fill\" : \"hug\"));\r\n }\r\n\r\n measure(constraints: SizeConstraints, scope: MeasureContext2D): Partial<Size2D> {\r\n return measureGlyphs(this, this._source(), constraints, scope);\r\n }\r\n\r\n /** The string cut at every style boundary — see {@link textSegments}. */\r\n protected buildSegments(): TextSegment[] | null {\r\n return textSegments(this, this._source());\r\n }\r\n\r\n override declareAssets(assets: AssetScope): void {\r\n super.declareAssets(assets);\r\n declareGlyphAssets(this, this._source(), assets);\r\n }\r\n\r\n /**\r\n * The descriptor this node draws itself as, at the current frame.\r\n *\r\n * `@internal` — split out so `node-picking`'s caret geometry is measured\r\n * from the same state that gets painted.\r\n */\r\n /** @internal */\r\n _textState(): Partial<TextState> {\r\n return textState(this, this._source(), this.layoutBounds);\r\n }\r\n\r\n // The bare text op as a Graphics2D (no paint), plus whether selection segments\r\n // are active. Glyphs have no single fillable silhouette path, so the generic\r\n // PaintNode.shapeGraphics() stays null and these nodes drive their own stroke\r\n // pass off this builder instead.\r\n private textOpGraphics(): { g: Graphics2D; segments: boolean } {\r\n const state = this._textState();\r\n return { g: new Graphics2D().text(state), segments: state.segments != null };\r\n }\r\n\r\n protected override renderSelf(ctx: RenderContext2D): void {\r\n const { g, segments } = this.textOpGraphics();\r\n g.shadow(this.shadow);\r\n // With segments the renderer paints each run with its own fill/stroke, so\r\n // the node-level paint is omitted to avoid double-painting.\r\n if (!segments) {\r\n g.fill(this.fill);\r\n }\r\n ctx.draw(g);\r\n }\r\n\r\n // The stroke only applies to the non-segment / text-on-path case; the\r\n // segmented branch paints its own fill/stroke per run in renderSelf.\r\n protected override renderStroke(ctx: RenderContext2D): void {\r\n const stroke = this.stroke as StrokeResolved[];\r\n if (stroke.length === 0) return;\r\n const { g, segments } = this.textOpGraphics();\r\n if (segments) return;\r\n ctx.draw(g.stroke(stroke));\r\n }\r\n\r\n private _source(): TextSource {\r\n return { text: this.displayText(), wraps: this.wrapsText, glyphPath: this.glyphPath, selections: this.styledRuns(), runs: this.styleRuns() };\r\n }\r\n}\r\n"]}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import type { AssetScope } from "../../assets/scope.js";
|
|
2
|
-
import type { Size2D, SizeInput } from "../../attributes/layout/size.js";
|
|
3
|
-
import type { FontStyle, ResolvedTextRun, ResolvedTextSpan, TextAlign, TextCase, TextDecoration, TextSpan, VerticalAlign } from "../../attributes/text/types.js";
|
|
4
|
-
import type { RichTextState } from "../../render/descriptors/richtext.js";
|
|
5
|
-
import type { SizeConstraints } from "../../layout/constraints.js";
|
|
6
|
-
import type { PathData } from "../../render/descriptors/path.js";
|
|
7
|
-
import type { TextSegment, TextState } from "../../render/descriptors/text.js";
|
|
8
|
-
import type { MeasureContext2D } from "../../render/measure-context.js";
|
|
9
|
-
import { type TextSelection } from "./text-selection.js";
|
|
10
|
-
/**
|
|
11
|
-
* Setting a string in a face: measuring the block, cutting it into styled
|
|
12
|
-
* pieces, and the descriptor it draws as. Plain functions over resolved values,
|
|
13
|
-
* shared by `TextBase` and the components' `TextLayout` module, so a glyph node
|
|
14
|
-
* shapes one way whichever it is.
|
|
15
|
-
*/
|
|
16
|
-
/** The shaping fields a glyph node reads, resolved. */
|
|
17
|
-
export interface TextValues {
|
|
18
|
-
readonly fontFamily: string;
|
|
19
|
-
readonly fontSize: number | "autofit";
|
|
20
|
-
readonly fontWeight: number;
|
|
21
|
-
readonly fontStyle: FontStyle;
|
|
22
|
-
readonly letterSpacing: number;
|
|
23
|
-
readonly lineHeight: number;
|
|
24
|
-
readonly textAlign: TextAlign;
|
|
25
|
-
readonly verticalAlign: VerticalAlign;
|
|
26
|
-
readonly textDecoration: TextDecoration;
|
|
27
|
-
readonly textCase: TextCase;
|
|
28
|
-
readonly minFontSize: number;
|
|
29
|
-
readonly fill: unknown;
|
|
30
|
-
readonly stroke: unknown;
|
|
31
|
-
readonly start: number;
|
|
32
|
-
readonly end: number;
|
|
33
|
-
readonly width: SizeInput;
|
|
34
|
-
readonly height: SizeInput;
|
|
35
|
-
}
|
|
36
|
-
/** Where the string comes from, and what styles parts of it. */
|
|
37
|
-
export interface TextSource {
|
|
38
|
-
readonly text: string;
|
|
39
|
-
readonly wraps: boolean;
|
|
40
|
-
/** The path the glyphs ride, for text-on-path. */
|
|
41
|
-
readonly glyphPath: PathData | null;
|
|
42
|
-
/** Live per-range overrides: `Text`'s selections. */
|
|
43
|
-
readonly selections: readonly TextSelection[];
|
|
44
|
-
/** Stretches a document styles apart from the node: `Text`'s `runs`. */
|
|
45
|
-
readonly runs: readonly ResolvedTextRun[];
|
|
46
|
-
}
|
|
47
|
-
export declare function casedText(s: TextValues, src: TextSource): string;
|
|
48
|
-
/** The block's size: hugged to its glyphs, filled across, and its own height even when it fills, so a hugging ancestor sees its content. */
|
|
49
|
-
export declare function measureGlyphs(s: TextValues, src: TextSource, constraints: SizeConstraints, scope: MeasureContext2D): Size2D;
|
|
50
|
-
/**
|
|
51
|
-
* The string cut at every style boundary, each piece's overrides resolved by the
|
|
52
|
-
* overlap rule: later selections win for transform, paint and font; opacity
|
|
53
|
-
* multiplies. Also folds in the Write On reveal window. `null` when neither is
|
|
54
|
-
* active, so rendering keeps its single-op path; and always `null` on a path,
|
|
55
|
-
* where the string is laid along it as one run.
|
|
56
|
-
*/
|
|
57
|
-
export declare function textSegments(s: TextValues, src: TextSource): TextSegment[] | null;
|
|
58
|
-
/** The descriptor the block draws as, in a box of `size`. Picking's caret geometry reads the same one. */
|
|
59
|
-
export declare function textState(s: TextValues, src: TextSource, size: Size2D | undefined): Partial<TextState>;
|
|
60
|
-
/**
|
|
61
|
-
* The node's own face, plus whatever a piece sets in another, and the pieces'
|
|
62
|
-
* paints. Naming a family here is what lets it load before layout, rather than
|
|
63
|
-
* being discovered by measuring against the fallback face.
|
|
64
|
-
*/
|
|
65
|
-
export declare function declareGlyphAssets(s: TextValues, src: TextSource, assets: Pick<AssetScope, "font" | "fill">): void;
|
|
66
|
-
/** What a rich-text node reads: spans, and the face they inherit from. */
|
|
67
|
-
export interface RichValues {
|
|
68
|
-
readonly spans: readonly TextSpan[];
|
|
69
|
-
readonly fontFamily: string;
|
|
70
|
-
readonly fontSize: number;
|
|
71
|
-
readonly fontWeight: number;
|
|
72
|
-
readonly fontStyle: FontStyle;
|
|
73
|
-
readonly letterSpacing: number;
|
|
74
|
-
readonly lineHeight: number;
|
|
75
|
-
readonly textAlign: TextAlign;
|
|
76
|
-
readonly fill: unknown;
|
|
77
|
-
readonly stroke: unknown;
|
|
78
|
-
readonly width: SizeInput;
|
|
79
|
-
readonly height: SizeInput;
|
|
80
|
-
}
|
|
81
|
-
/** Every span flattened to a run, each field it leaves unset taken from the node. */
|
|
82
|
-
export declare function richRuns(s: RichValues): ResolvedTextSpan[];
|
|
83
|
-
/** Lines broken only at `\n`, each as tall as its tallest run; an empty node keeps one line of its own size. */
|
|
84
|
-
export declare function measureRich(s: RichValues, constraints: SizeConstraints, scope: MeasureContext2D): Size2D;
|
|
85
|
-
export declare function richState(s: RichValues, size: Size2D | undefined): Partial<RichTextState>;
|
|
86
|
-
export declare function declareRichAssets(s: RichValues, assets: Pick<AssetScope, "font" | "fill">): void;
|
|
87
|
-
//# sourceMappingURL=text-layout.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text-layout.d.ts","sourceRoot":"","sources":["../../../src/nodes/text/text-layout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAA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QAAQ,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;CAC9B;AAED,qFAAqF;AACrF,wBAAgB,QAAQ,CAAC,CAAC,EAAE,UAAU,GAAG,gBAAgB,EAAE,CAU1D;AAED,gHAAgH;AAChH,wBAAgB,WAAW,CAAC,CAAC,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,KAAK,EAAE,gBAAgB,GAAG,MAAM,CA4BxG;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,CAEzF;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,IAAI,CAMhG"}
|
|
@@ -1,368 +0,0 @@
|
|
|
1
|
-
import { pathOps } from "../../attributes/shape/path/ops.js";
|
|
2
|
-
import { textOps } from "../../attributes/text/ops.js";
|
|
3
|
-
import { AUTOFIT_PROBE_SIZE } from "./text-selection.js";
|
|
4
|
-
export function casedText(s, src) {
|
|
5
|
-
return textOps.applyCase(src.text, s.textCase);
|
|
6
|
-
}
|
|
7
|
-
/** The block's size: hugged to its glyphs, filled across, and its own height even when it fills, so a hugging ancestor sees its content. */
|
|
8
|
-
export function measureGlyphs(s, src, constraints, scope) {
|
|
9
|
-
// Text-on-path: the visual extent is the path's bounding box, not a text
|
|
10
|
-
// line box. Size the node to the path (node-local coords, like Path).
|
|
11
|
-
if (src.glyphPath != null) {
|
|
12
|
-
const { width, height } = pathOps.size(src.glyphPath);
|
|
13
|
-
const wm = s.width;
|
|
14
|
-
const hm = s.height;
|
|
15
|
-
return {
|
|
16
|
-
width: typeof wm === "number" ? wm : wm === "hug" ? width : (constraints.maxWidth ?? width),
|
|
17
|
-
height: typeof hm === "number" ? hm : hm === "hug" ? height : (constraints.maxHeight ?? height),
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
const measureFontSize = s.fontSize === "autofit" ? 16 : s.fontSize;
|
|
21
|
-
const paragraphs = casedText(s, src).split("\n");
|
|
22
|
-
// A styled run changes the box, which is why measuring cannot read the
|
|
23
|
-
// node's five font fields and stop there: one word set two sizes up makes
|
|
24
|
-
// the line taller and the block wider. So when selections are live the
|
|
25
|
-
// intrinsic size is summed across the pieces, each in its own style.
|
|
26
|
-
const styled = textSegments(s, src);
|
|
27
|
-
const lineStyles = styled === null
|
|
28
|
-
? null
|
|
29
|
-
: measureStyledLines(styled, {
|
|
30
|
-
fontFamily: s.fontFamily,
|
|
31
|
-
fontSize: measureFontSize,
|
|
32
|
-
fontStyle: s.fontStyle,
|
|
33
|
-
fontWeight: s.fontWeight,
|
|
34
|
-
letterSpacing: s.letterSpacing,
|
|
35
|
-
});
|
|
36
|
-
const lineH = measureFontSize * s.lineHeight;
|
|
37
|
-
const intrinsicW = lineStyles
|
|
38
|
-
? Math.max(...lineStyles.map(line => line.runs.reduce((w, run) => w + scope.measureText(run.text, run.fontSize, run.fontFamily, run.fontWeight, run.letterSpacing, run.fontStyle).width, 0)))
|
|
39
|
-
: Math.max(...paragraphs.map(l => scope.measureText(l, measureFontSize, s.fontFamily, s.fontWeight, s.letterSpacing, s.fontStyle).width));
|
|
40
|
-
const wm = s.width;
|
|
41
|
-
const hm = s.height;
|
|
42
|
-
const resolvedW = typeof wm === "number" ? wm : wm === "hug" ? intrinsicW : constraints.maxWidth ?? 0;
|
|
43
|
-
// When wrap is on and the box has a finite width narrower than the text,
|
|
44
|
-
// height needs to account for the extra lines produced by wrapping. Each
|
|
45
|
-
// line is as tall as its tallest run.
|
|
46
|
-
const wraps = src.wraps && resolvedW > 0;
|
|
47
|
-
const lineSizes = lineStyles === null
|
|
48
|
-
? null
|
|
49
|
-
: wraps
|
|
50
|
-
? wrappedLineSizes(lineStyles, resolvedW, scope)
|
|
51
|
-
: lineStyles.map(line => Math.max(...line.runs.map(run => run.fontSize)));
|
|
52
|
-
const intrinsicH = lineSizes
|
|
53
|
-
? lineSizes.reduce((h, size) => h + size * s.lineHeight, 0)
|
|
54
|
-
: (wraps
|
|
55
|
-
? paragraphs.reduce((n, p) => n + countWrappedLines(p, resolvedW, measureFontSize, s.fontFamily, s.fontWeight, scope, s.letterSpacing, s.fontStyle), 0)
|
|
56
|
-
: paragraphs.length) * lineH;
|
|
57
|
-
return { width: resolvedW, height: typeof hm === "number" ? hm : intrinsicH };
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* The string cut at every style boundary, each piece's overrides resolved by the
|
|
61
|
-
* overlap rule: later selections win for transform, paint and font; opacity
|
|
62
|
-
* multiplies. Also folds in the Write On reveal window. `null` when neither is
|
|
63
|
-
* active, so rendering keeps its single-op path; and always `null` on a path,
|
|
64
|
-
* where the string is laid along it as one run.
|
|
65
|
-
*/
|
|
66
|
-
export function textSegments(s, src) {
|
|
67
|
-
if (src.glyphPath != null)
|
|
68
|
-
return null;
|
|
69
|
-
const active = src.selections.filter(sel => sel.ranges.length > 0 && !sel.isIdentity);
|
|
70
|
-
const runs = src.runs.filter(r => r.end > r.start);
|
|
71
|
-
const text = casedText(s, src);
|
|
72
|
-
if (text.length === 0)
|
|
73
|
-
return null;
|
|
74
|
-
// Write On: a glyph has no path to trim, so `start`/`end` are a
|
|
75
|
-
// character-reveal window instead: opacity over a range of characters.
|
|
76
|
-
const hasReveal = s.start > 0 || s.end < 1;
|
|
77
|
-
if (active.length === 0 && runs.length === 0 && !hasReveal)
|
|
78
|
-
return null;
|
|
79
|
-
// A hard cut at whole characters, one at a time, the way DaVinci's Write On does.
|
|
80
|
-
const revealStart = Math.round(s.start * text.length);
|
|
81
|
-
const revealEnd = Math.round(s.end * text.length);
|
|
82
|
-
// `'autofit'` settles on a size the block is measured into, which no single
|
|
83
|
-
// piece can be asked for, so pieces shape at the probe size a selection's
|
|
84
|
-
// `fontSize` override starts from.
|
|
85
|
-
const nodeFontSize = typeof s.fontSize === "number" ? s.fontSize : AUTOFIT_PROBE_SIZE;
|
|
86
|
-
const fill = s.fill;
|
|
87
|
-
const stroke = s.stroke;
|
|
88
|
-
const cuts = new Set([0, text.length]);
|
|
89
|
-
for (const run of runs) {
|
|
90
|
-
cuts.add(run.start);
|
|
91
|
-
cuts.add(run.end);
|
|
92
|
-
}
|
|
93
|
-
for (const sel of active) {
|
|
94
|
-
for (const r of sel.ranges) {
|
|
95
|
-
cuts.add(r.start);
|
|
96
|
-
cuts.add(r.end);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
if (hasReveal) {
|
|
100
|
-
cuts.add(revealStart);
|
|
101
|
-
cuts.add(revealEnd);
|
|
102
|
-
}
|
|
103
|
-
const points = [...cuts].filter(c => c >= 0 && c <= text.length).sort((a, b) => a - b);
|
|
104
|
-
const segments = [];
|
|
105
|
-
for (let i = 0; i < points.length - 1; i++) {
|
|
106
|
-
const start = points[i];
|
|
107
|
-
const end = points[i + 1];
|
|
108
|
-
if (end <= start)
|
|
109
|
-
continue;
|
|
110
|
-
// Every shaping field is stated, so the paragraph builder and the caret
|
|
111
|
-
// read a piece the same way.
|
|
112
|
-
const seg = {
|
|
113
|
-
text: text.slice(start, end),
|
|
114
|
-
fontFamily: s.fontFamily,
|
|
115
|
-
fontSize: nodeFontSize,
|
|
116
|
-
fontStyle: s.fontStyle,
|
|
117
|
-
fontWeight: s.fontWeight,
|
|
118
|
-
letterSpacing: s.letterSpacing,
|
|
119
|
-
textDecoration: s.textDecoration,
|
|
120
|
-
opacity: 1,
|
|
121
|
-
x: 0,
|
|
122
|
-
y: 0,
|
|
123
|
-
scale: 1,
|
|
124
|
-
rotation: 0,
|
|
125
|
-
fill,
|
|
126
|
-
stroke,
|
|
127
|
-
};
|
|
128
|
-
// The document's styling first, so a selection animates from it.
|
|
129
|
-
for (const run of runs) {
|
|
130
|
-
if (start < run.start || end > run.end)
|
|
131
|
-
continue;
|
|
132
|
-
if (run.fontFamily !== undefined)
|
|
133
|
-
seg.fontFamily = run.fontFamily;
|
|
134
|
-
if (run.fontSize !== undefined)
|
|
135
|
-
seg.fontSize = run.fontSize;
|
|
136
|
-
if (run.fontStyle !== undefined)
|
|
137
|
-
seg.fontStyle = run.fontStyle;
|
|
138
|
-
if (run.fontWeight !== undefined)
|
|
139
|
-
seg.fontWeight = run.fontWeight;
|
|
140
|
-
if (run.letterSpacing !== undefined)
|
|
141
|
-
seg.letterSpacing = run.letterSpacing;
|
|
142
|
-
if (run.textDecoration !== undefined)
|
|
143
|
-
seg.textDecoration = run.textDecoration;
|
|
144
|
-
if (run.fill !== undefined)
|
|
145
|
-
seg.fill = run.fill;
|
|
146
|
-
if (run.stroke !== undefined)
|
|
147
|
-
seg.stroke = run.stroke;
|
|
148
|
-
}
|
|
149
|
-
// Creation order: opacity multiplies, others last-wins. A shaping field a
|
|
150
|
-
// selection still holds at the node's own value is one it never touched,
|
|
151
|
-
// and must not undo a run's.
|
|
152
|
-
for (const sel of active) {
|
|
153
|
-
if (!sel.ranges.some(r => start >= r.start && end <= r.end))
|
|
154
|
-
continue;
|
|
155
|
-
const o = sel.overrides;
|
|
156
|
-
seg.opacity *= o.opacity;
|
|
157
|
-
seg.x = o.x;
|
|
158
|
-
seg.y = o.y;
|
|
159
|
-
seg.scale = o.scale;
|
|
160
|
-
seg.rotation = o.rotation;
|
|
161
|
-
if (o.fontFamily !== s.fontFamily)
|
|
162
|
-
seg.fontFamily = o.fontFamily;
|
|
163
|
-
if (o.fontSize !== nodeFontSize)
|
|
164
|
-
seg.fontSize = o.fontSize;
|
|
165
|
-
if (o.fontStyle !== s.fontStyle)
|
|
166
|
-
seg.fontStyle = o.fontStyle;
|
|
167
|
-
if (o.fontWeight !== s.fontWeight)
|
|
168
|
-
seg.fontWeight = o.fontWeight;
|
|
169
|
-
if (o.letterSpacing !== s.letterSpacing)
|
|
170
|
-
seg.letterSpacing = o.letterSpacing;
|
|
171
|
-
if (o.fill !== null)
|
|
172
|
-
seg.fill = o.fill;
|
|
173
|
-
if (o.stroke !== null)
|
|
174
|
-
seg.stroke = o.stroke;
|
|
175
|
-
}
|
|
176
|
-
if (hasReveal && !(start >= revealStart && end <= revealEnd))
|
|
177
|
-
seg.opacity = 0;
|
|
178
|
-
segments.push(seg);
|
|
179
|
-
}
|
|
180
|
-
return segments;
|
|
181
|
-
}
|
|
182
|
-
/** The descriptor the block draws as, in a box of `size`. Picking's caret geometry reads the same one. */
|
|
183
|
-
export function textState(s, src, size) {
|
|
184
|
-
return {
|
|
185
|
-
text: casedText(s, src),
|
|
186
|
-
fontSize: s.fontSize,
|
|
187
|
-
fontFamily: s.fontFamily,
|
|
188
|
-
fontWeight: s.fontWeight,
|
|
189
|
-
fontStyle: s.fontStyle,
|
|
190
|
-
letterSpacing: s.letterSpacing,
|
|
191
|
-
lineHeight: s.lineHeight,
|
|
192
|
-
textAlign: s.textAlign,
|
|
193
|
-
verticalAlign: s.verticalAlign,
|
|
194
|
-
textDecoration: s.textDecoration,
|
|
195
|
-
wrap: src.wraps,
|
|
196
|
-
minFontSize: s.minFontSize,
|
|
197
|
-
width: size?.width ?? 0,
|
|
198
|
-
height: size?.height ?? 0,
|
|
199
|
-
segments: textSegments(s, src) ?? undefined,
|
|
200
|
-
path: src.glyphPath,
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* The node's own face, plus whatever a piece sets in another, and the pieces'
|
|
205
|
-
* paints. Naming a family here is what lets it load before layout, rather than
|
|
206
|
-
* being discovered by measuring against the fallback face.
|
|
207
|
-
*/
|
|
208
|
-
export function declareGlyphAssets(s, src, assets) {
|
|
209
|
-
// Nothing may name a family at all; an `undefined` key is not a font to load.
|
|
210
|
-
if (s.fontFamily)
|
|
211
|
-
assets.font(s.fontFamily, s.fontWeight);
|
|
212
|
-
for (const segment of textSegments(s, src) ?? []) {
|
|
213
|
-
const family = segment.fontFamily ?? s.fontFamily;
|
|
214
|
-
if (family)
|
|
215
|
-
assets.font(family, segment.fontWeight);
|
|
216
|
-
assets.fill(segment.fill ?? []);
|
|
217
|
-
for (const stroke of segment.stroke ?? [])
|
|
218
|
-
assets.fill(stroke.fill);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
/** The segments as lines of runs, split at every newline; an empty line keeps the node's own face. */
|
|
222
|
-
function measureStyledLines(segments, fallback) {
|
|
223
|
-
const lines = [{ runs: [] }];
|
|
224
|
-
for (const segment of segments) {
|
|
225
|
-
const style = {
|
|
226
|
-
fontFamily: segment.fontFamily ?? fallback.fontFamily,
|
|
227
|
-
fontSize: segment.fontSize ?? fallback.fontSize,
|
|
228
|
-
fontStyle: segment.fontStyle ?? fallback.fontStyle,
|
|
229
|
-
fontWeight: segment.fontWeight,
|
|
230
|
-
letterSpacing: segment.letterSpacing,
|
|
231
|
-
};
|
|
232
|
-
const parts = segment.text.split("\n");
|
|
233
|
-
for (let i = 0; i < parts.length; i++) {
|
|
234
|
-
if (i > 0)
|
|
235
|
-
lines.push({ runs: [] });
|
|
236
|
-
lines[lines.length - 1].runs.push({ text: parts[i], ...style });
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
for (const line of lines) {
|
|
240
|
-
if (line.runs.length === 0)
|
|
241
|
-
line.runs.push({ ...fallback, text: "" });
|
|
242
|
-
}
|
|
243
|
-
return lines;
|
|
244
|
-
}
|
|
245
|
-
/** Each wrapped line's tallest run, breaking at whitespace the way the paragraph builder does. */
|
|
246
|
-
function wrappedLineSizes(lines, maxWidth, scope) {
|
|
247
|
-
const sizes = [];
|
|
248
|
-
for (const line of lines) {
|
|
249
|
-
const tokens = [];
|
|
250
|
-
for (const run of line.runs) {
|
|
251
|
-
for (const part of run.text.split(/(\s+)/)) {
|
|
252
|
-
if (part.length === 0)
|
|
253
|
-
continue;
|
|
254
|
-
const space = /^\s+$/.test(part);
|
|
255
|
-
const width = scope.measureText(part, run.fontSize, run.fontFamily, run.fontWeight, run.letterSpacing, run.fontStyle).width;
|
|
256
|
-
const last = tokens[tokens.length - 1];
|
|
257
|
-
if (last && !last.space && !space) {
|
|
258
|
-
last.width += width;
|
|
259
|
-
last.size = Math.max(last.size, run.fontSize);
|
|
260
|
-
}
|
|
261
|
-
else {
|
|
262
|
-
tokens.push({ width, size: run.fontSize, space });
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
if (tokens.length === 0) {
|
|
267
|
-
sizes.push(Math.max(...line.runs.map(run => run.fontSize)));
|
|
268
|
-
continue;
|
|
269
|
-
}
|
|
270
|
-
let lineW = tokens[0].width;
|
|
271
|
-
let size = tokens[0].size;
|
|
272
|
-
for (const token of tokens.slice(1)) {
|
|
273
|
-
if (lineW + token.width <= maxWidth) {
|
|
274
|
-
lineW += token.width;
|
|
275
|
-
size = Math.max(size, token.size);
|
|
276
|
-
}
|
|
277
|
-
else {
|
|
278
|
-
sizes.push(size);
|
|
279
|
-
lineW = token.space ? 0 : token.width;
|
|
280
|
-
size = token.space ? 0 : token.size;
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
sizes.push(size > 0 ? size : Math.max(...line.runs.map(run => run.fontSize)));
|
|
284
|
-
}
|
|
285
|
-
return sizes;
|
|
286
|
-
}
|
|
287
|
-
function countWrappedLines(paragraph, maxWidth, fontSize, fontFamily, fontWeight, scope, letterSpacing = 0, fontStyle = "normal") {
|
|
288
|
-
if (paragraph.length === 0)
|
|
289
|
-
return 1;
|
|
290
|
-
if (scope.measureText(paragraph, fontSize, fontFamily, fontWeight, letterSpacing, fontStyle).width <= maxWidth)
|
|
291
|
-
return 1;
|
|
292
|
-
const words = paragraph.split(/(\s+)/).filter(w => w.length > 0);
|
|
293
|
-
let lines = 1;
|
|
294
|
-
let lineW = 0;
|
|
295
|
-
for (const word of words) {
|
|
296
|
-
const w = scope.measureText(word, fontSize, fontFamily, fontWeight, letterSpacing, fontStyle).width;
|
|
297
|
-
if (lineW === 0) {
|
|
298
|
-
lineW = w;
|
|
299
|
-
}
|
|
300
|
-
else if (lineW + w <= maxWidth) {
|
|
301
|
-
lineW += w;
|
|
302
|
-
}
|
|
303
|
-
else {
|
|
304
|
-
lines++;
|
|
305
|
-
lineW = /^\s+$/.test(word) ? 0 : w;
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
return lines;
|
|
309
|
-
}
|
|
310
|
-
/** Every span flattened to a run, each field it leaves unset taken from the node. */
|
|
311
|
-
export function richRuns(s) {
|
|
312
|
-
return textOps.flatten(s.spans, {
|
|
313
|
-
fontFamily: s.fontFamily,
|
|
314
|
-
fontSize: s.fontSize,
|
|
315
|
-
fontWeight: s.fontWeight,
|
|
316
|
-
fontStyle: s.fontStyle,
|
|
317
|
-
letterSpacing: s.letterSpacing,
|
|
318
|
-
fill: s.fill,
|
|
319
|
-
stroke: s.stroke,
|
|
320
|
-
});
|
|
321
|
-
}
|
|
322
|
-
/** Lines broken only at `\n`, each as tall as its tallest run; an empty node keeps one line of its own size. */
|
|
323
|
-
export function measureRich(s, constraints, scope) {
|
|
324
|
-
let lineW = 0;
|
|
325
|
-
let maxLineH = 0;
|
|
326
|
-
let totalW = 0;
|
|
327
|
-
let totalH = 0;
|
|
328
|
-
const finishLine = () => {
|
|
329
|
-
if (lineW > totalW)
|
|
330
|
-
totalW = lineW;
|
|
331
|
-
totalH += maxLineH;
|
|
332
|
-
lineW = 0;
|
|
333
|
-
maxLineH = 0;
|
|
334
|
-
};
|
|
335
|
-
for (const run of richRuns(s)) {
|
|
336
|
-
const lh = run.fontSize * s.lineHeight;
|
|
337
|
-
const segments = run.text.split("\n");
|
|
338
|
-
for (let i = 0; i < segments.length; i++) {
|
|
339
|
-
if (i > 0)
|
|
340
|
-
finishLine();
|
|
341
|
-
lineW += scope.measureText(segments[i], run.fontSize, run.fontFamily, run.fontWeight, run.letterSpacing, run.fontStyle).width;
|
|
342
|
-
if (lh > maxLineH)
|
|
343
|
-
maxLineH = lh;
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
finishLine();
|
|
347
|
-
if (totalH === 0)
|
|
348
|
-
totalH = s.fontSize * s.lineHeight;
|
|
349
|
-
const wm = s.width;
|
|
350
|
-
const hm = s.height;
|
|
351
|
-
return {
|
|
352
|
-
width: typeof wm === "number" ? wm : wm === "hug" ? totalW : constraints.maxWidth ?? 0,
|
|
353
|
-
height: typeof hm === "number" ? hm : hm === "hug" ? totalH : constraints.maxHeight ?? 0,
|
|
354
|
-
};
|
|
355
|
-
}
|
|
356
|
-
export function richState(s, size) {
|
|
357
|
-
return { spans: richRuns(s), lineHeight: s.lineHeight, textAlign: s.textAlign, width: size?.width ?? 0, height: size?.height ?? 0 };
|
|
358
|
-
}
|
|
359
|
-
export function declareRichAssets(s, assets) {
|
|
360
|
-
for (const run of richRuns(s)) {
|
|
361
|
-
if (run.fontFamily)
|
|
362
|
-
assets.font(run.fontFamily, run.fontWeight);
|
|
363
|
-
assets.fill(run.fill);
|
|
364
|
-
for (const stroke of run.stroke)
|
|
365
|
-
assets.fill(stroke.fill);
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
//# sourceMappingURL=text-layout.js.map
|