@motionscript/core 0.1.0-alpha.3 → 0.1.0-alpha.6
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 +247 -0
- package/LICENSE +201 -201
- package/NOTICE +48 -0
- package/README.md +93 -72
- package/dist/assets/asset-index.js.map +1 -1
- package/dist/assets/catalog.d.ts +9 -0
- package/dist/assets/catalog.d.ts.map +1 -1
- package/dist/assets/catalog.js +11 -0
- package/dist/assets/catalog.js.map +1 -1
- package/dist/assets/errors.d.ts.map +1 -1
- package/dist/assets/errors.js +8 -3
- package/dist/assets/errors.js.map +1 -1
- package/dist/assets/index.js.map +1 -1
- package/dist/assets/manager.d.ts +26 -1
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/assets/manager.js +79 -4
- 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.d.ts +3 -3
- package/dist/assets/scope.d.ts.map +1 -1
- package/dist/assets/scope.js.map +1 -1
- package/dist/attributes/audio/filters/chain.d.ts +1 -1
- package/dist/attributes/audio/filters/chain.js.map +1 -1
- package/dist/attributes/audio/filters/curve.d.ts +8 -8
- package/dist/attributes/audio/filters/curve.d.ts.map +1 -1
- package/dist/attributes/audio/filters/curve.js +20 -19
- package/dist/attributes/audio/filters/curve.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/echo.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/gain.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/highpass.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/lowpass.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/speed.d.ts +2 -2
- package/dist/attributes/audio/filters/implementations/speed.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/tremolo.js.map +1 -1
- package/dist/attributes/audio/filters/index.d.ts +1 -1
- package/dist/attributes/audio/filters/index.d.ts.map +1 -1
- package/dist/attributes/audio/filters/index.js +1 -1
- package/dist/attributes/audio/filters/index.js.map +1 -1
- package/dist/attributes/audio/filters/registry.js.map +1 -1
- package/dist/attributes/audio/filters/union.js.map +1 -1
- package/dist/attributes/audio/request.d.ts +17 -2
- package/dist/attributes/audio/request.d.ts.map +1 -1
- package/dist/attributes/audio/request.js.map +1 -1
- package/dist/attributes/audio/schedule.d.ts +4 -2
- package/dist/attributes/audio/schedule.d.ts.map +1 -1
- package/dist/attributes/audio/schedule.js +15 -8
- package/dist/attributes/audio/schedule.js.map +1 -1
- package/dist/attributes/audio/sound.d.ts +4 -2
- package/dist/attributes/audio/sound.d.ts.map +1 -1
- package/dist/attributes/audio/sound.js +8 -4
- package/dist/attributes/audio/sound.js.map +1 -1
- package/dist/attributes/index.js.map +1 -1
- package/dist/attributes/layout/alignment.js +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/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.d.ts +3 -1
- package/dist/attributes/properties/decorator.d.ts.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.d.ts +9 -2
- package/dist/attributes/properties/typed.d.ts.map +1 -1
- package/dist/attributes/properties/typed.js +15 -1
- package/dist/attributes/properties/typed.js.map +1 -1
- package/dist/attributes/render3d/orbit.d.ts +8 -8
- package/dist/attributes/render3d/orbit.js +7 -7
- 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.d.ts +4 -4
- package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
- package/dist/attributes/shape/effects/backdrop.js.map +1 -1
- package/dist/attributes/shape/effects/chain.d.ts +28 -120
- package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/chain.js +16 -88
- 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.d.ts +2 -2
- package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -1
- 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.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.d.ts +15 -24
- package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
- 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.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.d.ts +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.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.js +15 -8
- 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.d.ts +2 -6
- package/dist/attributes/shape/effects/index.d.ts.map +1 -1
- package/dist/attributes/shape/effects/index.js.map +1 -1
- package/dist/attributes/shape/effects/registry.d.ts +23 -6
- package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
- package/dist/attributes/shape/effects/registry.js +44 -10
- package/dist/attributes/shape/effects/registry.js.map +1 -1
- package/dist/attributes/shape/effects/union.d.ts +2 -6
- package/dist/attributes/shape/effects/union.d.ts.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 +81 -44
- package/dist/attributes/shape/fill/color/parser.js.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.d.ts +16 -0
- package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -0
- package/dist/attributes/shape/fill/gradient-stops.js +65 -0
- package/dist/attributes/shape/fill/gradient-stops.js.map +1 -0
- 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.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/conic-gradient.js +2 -5
- 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.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js +2 -10
- 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.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.js +5 -4
- package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/linear-gradient.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/linear-gradient.js +2 -6
- 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.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/radial-gradient.js +2 -5
- 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 +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.d.ts +4 -10
- package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
- package/dist/attributes/shape/filters/chain.js +1 -13
- 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.d.ts +1 -1
- package/dist/attributes/shape/filters/index.js.map +1 -1
- package/dist/attributes/shape/filters/registry.d.ts +2 -2
- package/dist/attributes/shape/filters/registry.js +3 -3
- package/dist/attributes/shape/filters/registry.js.map +1 -1
- package/dist/attributes/shape/filters/union.d.ts +6 -7
- package/dist/attributes/shape/filters/union.d.ts.map +1 -1
- package/dist/attributes/shape/filters/union.js.map +1 -1
- package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
- package/dist/attributes/shape/path/anchors.js +12 -5
- 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.d.ts.map +1 -1
- package/dist/attributes/shape/path/morph.js +16 -4
- 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/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.d.ts +2 -2
- package/dist/attributes/shape/stroke/index.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/index.js +1 -1
- package/dist/attributes/shape/stroke/index.js.map +1 -1
- package/dist/attributes/shape/stroke/stroke.d.ts +27 -6
- package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/stroke.js +22 -2
- 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.d.ts +6 -0
- package/dist/attributes/text/ops.d.ts.map +1 -1
- package/dist/attributes/text/ops.js +1 -0
- package/dist/attributes/text/ops.js.map +1 -1
- package/dist/attributes/text/types.js.map +1 -1
- package/dist/browser/chunks/chunk-2RIYH36X.js +3 -0
- package/dist/browser/chunks/chunk-2RIYH36X.js.map +7 -0
- package/dist/browser/chunks/chunk-DDJN3QII.js +15 -0
- package/dist/browser/chunks/chunk-DDJN3QII.js.map +7 -0
- package/dist/browser/chunks/chunk-DHB4COFY.js +2 -0
- package/dist/browser/chunks/chunk-DHB4COFY.js.map +7 -0
- package/dist/browser/chunks/chunk-EJDPYDQI.js +5 -0
- package/dist/browser/chunks/chunk-EJDPYDQI.js.map +7 -0
- package/dist/browser/chunks/chunk-SFNJRPBV.js +2 -0
- package/dist/browser/chunks/chunk-SFNJRPBV.js.map +7 -0
- package/dist/browser/chunks/chunk-XAWE4EAK.js +2 -0
- package/dist/browser/chunks/chunk-XAWE4EAK.js.map +7 -0
- package/dist/browser/component.js +1 -1
- package/dist/browser/component.js.map +4 -4
- package/dist/browser/experimental.js +2 -0
- package/dist/browser/experimental.js.map +7 -0
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/browser/jsx-jsx-dev-runtime.js +1 -1
- package/dist/browser/jsx-jsx-runtime.js +1 -1
- package/dist/browser/manifest.json +4 -2
- package/dist/browser/sdk.js +1 -1
- package/dist/component/api.d.ts +508 -0
- package/dist/component/api.d.ts.map +1 -0
- package/dist/component/api.js +4 -0
- package/dist/component/api.js.map +1 -0
- package/dist/component/builtins/audio.d.ts +26 -0
- package/dist/component/builtins/audio.d.ts.map +1 -0
- package/dist/component/builtins/audio.js +41 -0
- package/dist/component/builtins/audio.js.map +1 -0
- package/dist/component/builtins/canvas3d.d.ts +98 -0
- package/dist/component/builtins/canvas3d.d.ts.map +1 -0
- package/dist/component/builtins/canvas3d.js +21 -0
- package/dist/component/builtins/canvas3d.js.map +1 -0
- package/dist/component/builtins/composite.d.ts +56 -0
- package/dist/component/builtins/composite.d.ts.map +1 -0
- package/dist/component/builtins/composite.js +25 -0
- package/dist/component/builtins/composite.js.map +1 -0
- package/dist/component/builtins/geometry.d.ts +505 -0
- package/dist/component/builtins/geometry.d.ts.map +1 -0
- package/dist/component/builtins/geometry.js +107 -0
- package/dist/component/builtins/geometry.js.map +1 -0
- package/dist/component/builtins/layout.d.ts +88 -0
- package/dist/component/builtins/layout.d.ts.map +1 -0
- package/dist/component/builtins/layout.js +84 -0
- package/dist/component/builtins/layout.js.map +1 -0
- package/dist/component/builtins/media.d.ts +95 -0
- package/dist/component/builtins/media.d.ts.map +1 -0
- package/dist/component/builtins/media.js +149 -0
- package/dist/component/builtins/media.js.map +1 -0
- package/dist/component/builtins/providers.d.ts +23 -0
- package/dist/component/builtins/providers.d.ts.map +1 -0
- package/dist/component/builtins/providers.js +30 -0
- package/dist/component/builtins/providers.js.map +1 -0
- package/dist/component/builtins/text.d.ts +193 -0
- package/dist/component/builtins/text.d.ts.map +1 -0
- package/dist/component/builtins/text.js +113 -0
- package/dist/component/builtins/text.js.map +1 -0
- package/dist/component/builtins/three.d.ts +1085 -0
- package/dist/component/builtins/three.d.ts.map +1 -0
- package/dist/component/builtins/three.js +265 -0
- package/dist/component/builtins/three.js.map +1 -0
- package/dist/component/clip-of.d.ts +5 -0
- package/dist/component/clip-of.d.ts.map +1 -0
- package/dist/component/clip-of.js +33 -0
- package/dist/component/clip-of.js.map +1 -0
- package/dist/component/commands-for.d.ts +19 -0
- package/dist/component/commands-for.d.ts.map +1 -0
- package/dist/component/commands-for.js +5 -0
- package/dist/component/commands-for.js.map +1 -0
- package/dist/component/component-audio.d.ts +9 -0
- package/dist/component/component-audio.d.ts.map +1 -0
- package/dist/component/component-audio.js +18 -0
- package/dist/component/component-audio.js.map +1 -0
- package/dist/component/component2d.d.ts +9 -0
- package/dist/component/component2d.d.ts.map +1 -0
- package/dist/component/component2d.js +239 -0
- package/dist/component/component2d.js.map +1 -0
- package/dist/component/component3d.d.ts +9 -0
- package/dist/component/component3d.d.ts.map +1 -0
- package/dist/component/component3d.js +99 -0
- package/dist/component/component3d.js.map +1 -0
- package/dist/component/factory.d.ts +63 -0
- package/dist/component/factory.d.ts.map +1 -0
- package/dist/component/factory.js +313 -0
- package/dist/component/factory.js.map +1 -0
- package/dist/component/modules/aim.d.ts +30 -0
- package/dist/component/modules/aim.d.ts.map +1 -0
- package/dist/component/modules/aim.js +39 -0
- package/dist/component/modules/aim.js.map +1 -0
- package/dist/component/modules/corners.d.ts +13 -0
- package/dist/component/modules/corners.d.ts.map +1 -0
- package/dist/component/modules/corners.js +12 -0
- package/dist/component/modules/corners.js.map +1 -0
- package/dist/component/modules/flow.d.ts +26 -0
- package/dist/component/modules/flow.d.ts.map +1 -0
- package/dist/component/modules/flow.js +55 -0
- package/dist/component/modules/flow.js.map +1 -0
- package/dist/component/modules/material.d.ts +40 -0
- package/dist/component/modules/material.d.ts.map +1 -0
- package/dist/component/modules/material.js +75 -0
- package/dist/component/modules/material.js.map +1 -0
- package/dist/component/modules/paint.d.ts +71 -0
- package/dist/component/modules/paint.d.ts.map +1 -0
- package/dist/component/modules/paint.js +106 -0
- package/dist/component/modules/paint.js.map +1 -0
- package/dist/component/modules/shapes.d.ts +31 -0
- package/dist/component/modules/shapes.d.ts.map +1 -0
- package/dist/component/modules/shapes.js +43 -0
- package/dist/component/modules/shapes.js.map +1 -0
- package/dist/component/modules/text-layout.d.ts +26 -0
- package/dist/component/modules/text-layout.d.ts.map +1 -0
- package/dist/component/modules/text-layout.js +57 -0
- package/dist/component/modules/text-layout.js.map +1 -0
- package/dist/component/modules/text-style.d.ts +48 -0
- package/dist/component/modules/text-style.d.ts.map +1 -0
- package/dist/component/modules/text-style.js +63 -0
- package/dist/component/modules/text-style.js.map +1 -0
- package/dist/component/modules/three-entries.d.ts +23 -0
- package/dist/component/modules/three-entries.d.ts.map +1 -0
- package/dist/component/modules/three-entries.js +41 -0
- package/dist/component/modules/three-entries.js.map +1 -0
- package/dist/component/modules/view3d.d.ts +55 -0
- package/dist/component/modules/view3d.d.ts.map +1 -0
- package/dist/component/modules/view3d.js +160 -0
- package/dist/component/modules/view3d.js.map +1 -0
- package/dist/component/timeline.d.ts +22 -0
- package/dist/component/timeline.d.ts.map +1 -0
- package/dist/component/timeline.js +128 -0
- package/dist/component/timeline.js.map +1 -0
- package/dist/component/type-def.d.ts +26 -0
- package/dist/component/type-def.d.ts.map +1 -0
- package/dist/component/type-def.js +16 -0
- package/dist/component/type-def.js.map +1 -0
- package/dist/component/types.d.ts +91 -0
- package/dist/component/types.d.ts.map +1 -0
- package/dist/component/types.js +88 -0
- package/dist/component/types.js.map +1 -0
- package/dist/component/views.d.ts +121 -0
- package/dist/component/views.d.ts.map +1 -0
- package/dist/component/views.js +413 -0
- package/dist/component/views.js.map +1 -0
- package/dist/component.d.ts +4 -5
- package/dist/component.d.ts.map +1 -1
- package/dist/component.js +3 -5
- package/dist/component.js.map +1 -1
- package/dist/document/audio.d.ts +10 -2
- package/dist/document/audio.d.ts.map +1 -1
- package/dist/document/audio.js +45 -4
- package/dist/document/audio.js.map +1 -1
- package/dist/document/builtins.d.ts.map +1 -1
- package/dist/document/builtins.js +15 -39
- package/dist/document/builtins.js.map +1 -1
- package/dist/document/command-traits.d.ts +1 -1
- package/dist/document/command-traits.js +16 -1
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/deny-globals.js.map +1 -1
- package/dist/document/diff.d.ts.map +1 -1
- package/dist/document/diff.js +3 -3
- package/dist/document/diff.js.map +1 -1
- package/dist/document/doc-index.d.ts +2 -2
- package/dist/document/doc-index.d.ts.map +1 -1
- package/dist/document/doc-index.js +3 -3
- package/dist/document/doc-index.js.map +1 -1
- package/dist/document/expression/compile.d.ts.map +1 -1
- package/dist/document/expression/compile.js +8 -5
- package/dist/document/expression/compile.js.map +1 -1
- package/dist/document/expression/index.js.map +1 -1
- package/dist/document/expression/ops.js +1 -1
- package/dist/document/expression/ops.js.map +1 -1
- package/dist/document/expression/parse.d.ts.map +1 -1
- package/dist/document/expression/parse.js +15 -6
- package/dist/document/expression/parse.js.map +1 -1
- package/dist/document/expression/refs.d.ts +1 -1
- package/dist/document/expression/refs.js +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.d.ts.map +1 -1
- package/dist/document/expression/walk.js +2 -1
- package/dist/document/expression/walk.js.map +1 -1
- package/dist/document/index.d.ts +2 -0
- package/dist/document/index.d.ts.map +1 -1
- package/dist/document/index.js +2 -0
- package/dist/document/index.js.map +1 -1
- package/dist/document/node-decorator.js.map +1 -1
- package/dist/document/node-descriptor.d.ts +25 -0
- package/dist/document/node-descriptor.d.ts.map +1 -1
- package/dist/document/node-descriptor.js.map +1 -1
- package/dist/document/placement.d.ts +70 -0
- package/dist/document/placement.d.ts.map +1 -0
- package/dist/document/placement.js +83 -0
- package/dist/document/placement.js.map +1 -0
- package/dist/document/project.d.ts +2 -2
- package/dist/document/project.d.ts.map +1 -1
- package/dist/document/project.js.map +1 -1
- package/dist/document/registry.d.ts +23 -11
- package/dist/document/registry.d.ts.map +1 -1
- package/dist/document/registry.js +46 -19
- package/dist/document/registry.js.map +1 -1
- package/dist/document/settled-index.d.ts +49 -0
- package/dist/document/settled-index.d.ts.map +1 -0
- package/dist/document/settled-index.js +247 -0
- package/dist/document/settled-index.js.map +1 -0
- package/dist/document/timeline-patch.js.map +1 -1
- package/dist/document/timeline.d.ts +100 -19
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +290 -42
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.d.ts +12 -12
- package/dist/document/types.d.ts.map +1 -1
- package/dist/document/types.js +2 -2
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.d.ts +2 -2
- package/dist/document/validate.d.ts.map +1 -1
- package/dist/document/validate.js +37 -31
- package/dist/document/validate.js.map +1 -1
- package/dist/document/withdraw.d.ts +28 -0
- package/dist/document/withdraw.d.ts.map +1 -0
- package/dist/document/withdraw.js +61 -0
- package/dist/document/withdraw.js.map +1 -0
- package/dist/experimental.d.ts +22 -0
- package/dist/experimental.d.ts.map +1 -0
- package/dist/experimental.js +20 -0
- package/dist/experimental.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/jsx/jsx-dev-runtime.js.map +1 -1
- package/dist/jsx/jsx-runtime.d.ts +9 -1
- package/dist/jsx/jsx-runtime.d.ts.map +1 -1
- package/dist/jsx/jsx-runtime.js +13 -3
- package/dist/jsx/jsx-runtime.js.map +1 -1
- package/dist/layout/bounds.d.ts +0 -1
- package/dist/layout/bounds.d.ts.map +1 -1
- package/dist/layout/bounds.js.map +1 -1
- package/dist/layout/constraints.js.map +1 -1
- package/dist/layout/flex.d.ts +4 -2
- package/dist/layout/flex.d.ts.map +1 -1
- package/dist/layout/flex.js +27 -11
- 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.d.ts +6 -0
- package/dist/layout/ops.d.ts.map +1 -1
- package/dist/layout/ops.js +6 -0
- package/dist/layout/ops.js.map +1 -1
- package/dist/layout/types.js.map +1 -1
- package/dist/nodes/2d/node-lifecycle.js.map +1 -1
- package/dist/nodes/2d/node-motion.js.map +1 -1
- package/dist/nodes/2d/node-render.d.ts +3 -3
- package/dist/nodes/2d/node-render.d.ts.map +1 -1
- package/dist/nodes/2d/node-render.js.map +1 -1
- package/dist/nodes/2d/node-transform.js.map +1 -1
- package/dist/nodes/2d/node2d.d.ts +115 -3
- package/dist/nodes/2d/node2d.d.ts.map +1 -1
- package/dist/nodes/2d/node2d.js +180 -28
- package/dist/nodes/2d/node2d.js.map +1 -1
- package/dist/nodes/2d/paint-node.d.ts +27 -0
- package/dist/nodes/2d/paint-node.d.ts.map +1 -1
- package/dist/nodes/2d/paint-node.js +42 -0
- package/dist/nodes/2d/paint-node.js.map +1 -1
- package/dist/nodes/audio/audio-bus.js.map +1 -1
- package/dist/nodes/audio/index.d.ts +2 -2
- package/dist/nodes/audio/index.d.ts.map +1 -1
- package/dist/nodes/audio/index.js +0 -2
- package/dist/nodes/audio/index.js.map +1 -1
- package/dist/nodes/audio/node-audio.js.map +1 -1
- package/dist/nodes/audio/sound-node.d.ts +4 -3
- package/dist/nodes/audio/sound-node.d.ts.map +1 -1
- package/dist/nodes/audio/sound-node.js +4 -1
- package/dist/nodes/audio/sound-node.js.map +1 -1
- package/dist/nodes/geometry/bounds-shape-node.d.ts +4 -4
- package/dist/nodes/geometry/bounds-shape-node.js +2 -2
- package/dist/nodes/geometry/bounds-shape-node.js.map +1 -1
- package/dist/nodes/geometry/box-path-node.d.ts +3 -3
- package/dist/nodes/geometry/box-path-node.js +2 -2
- package/dist/nodes/geometry/box-path-node.js.map +1 -1
- package/dist/nodes/geometry/ellipse-node.js.map +1 -1
- package/dist/nodes/geometry/group-bounds.d.ts +2 -2
- package/dist/nodes/geometry/group-bounds.d.ts.map +1 -1
- package/dist/nodes/geometry/group-bounds.js +1 -2
- package/dist/nodes/geometry/group-bounds.js.map +1 -1
- package/dist/nodes/geometry/path-node.d.ts.map +1 -1
- package/dist/nodes/geometry/path-node.js +6 -0
- package/dist/nodes/geometry/path-node.js.map +1 -1
- package/dist/nodes/geometry/polygon-node.js.map +1 -1
- package/dist/nodes/geometry/polygram-node.js.map +1 -1
- package/dist/nodes/geometry/rect-node.js.map +1 -1
- package/dist/nodes/geometry/shape-node.js.map +1 -1
- package/dist/nodes/geometry/shape-outline.d.ts +2 -2
- package/dist/nodes/geometry/shape-outline.d.ts.map +1 -1
- package/dist/nodes/geometry/shape-outline.js +2 -13
- package/dist/nodes/geometry/shape-outline.js.map +1 -1
- package/dist/nodes/index.d.ts +40 -33
- package/dist/nodes/index.d.ts.map +1 -1
- package/dist/nodes/index.js +17 -36
- package/dist/nodes/index.js.map +1 -1
- package/dist/nodes/layout/camera-node.d.ts +9 -0
- package/dist/nodes/layout/camera-node.d.ts.map +1 -1
- package/dist/nodes/layout/camera-node.js +38 -3
- package/dist/nodes/layout/camera-node.js.map +1 -1
- package/dist/nodes/layout/orbit-camera-node.d.ts +1 -1
- package/dist/nodes/layout/orbit-camera-node.js +1 -1
- package/dist/nodes/layout/orbit-camera-node.js.map +1 -1
- package/dist/nodes/layout/rotated-box.js.map +1 -1
- package/dist/nodes/media/video-node.d.ts.map +1 -1
- package/dist/nodes/media/video-node.js +2 -0
- package/dist/nodes/media/video-node.js.map +1 -1
- package/dist/nodes/node/declare-paints.js.map +1 -1
- package/dist/nodes/node/node-editor-state.js.map +1 -1
- package/dist/nodes/node/node-reactive.js.map +1 -1
- package/dist/nodes/node/node-time.d.ts +3 -3
- package/dist/nodes/node/node-time.d.ts.map +1 -1
- package/dist/nodes/node/node-time.js +1 -1
- package/dist/nodes/node/node-time.js.map +1 -1
- package/dist/nodes/node/node-walk.js.map +1 -1
- package/dist/nodes/node/node.d.ts +12 -4
- package/dist/nodes/node/node.d.ts.map +1 -1
- package/dist/nodes/node/node.js +67 -27
- package/dist/nodes/node/node.js.map +1 -1
- package/dist/nodes/node/text-defaults.d.ts +10 -12
- package/dist/nodes/node/text-defaults.d.ts.map +1 -1
- package/dist/nodes/node/text-defaults.js +10 -12
- package/dist/nodes/node/text-defaults.js.map +1 -1
- package/dist/nodes/{scene → root}/canvas2d-node.d.ts +4 -3
- package/dist/nodes/root/canvas2d-node.d.ts.map +1 -0
- package/dist/nodes/{scene → root}/canvas2d-node.js +5 -2
- package/dist/nodes/root/canvas2d-node.js.map +1 -0
- package/dist/nodes/root/provider-node.d.ts.map +1 -0
- package/dist/nodes/root/provider-node.js.map +1 -0
- package/dist/nodes/root/theme-provider-node.d.ts.map +1 -0
- package/dist/nodes/root/theme-provider-node.js.map +1 -0
- package/dist/nodes/text/default-text-style-node.d.ts +5 -2
- package/dist/nodes/text/default-text-style-node.d.ts.map +1 -1
- package/dist/nodes/text/default-text-style-node.js +10 -4
- package/dist/nodes/text/default-text-style-node.js.map +1 -1
- package/dist/nodes/text/number-format.d.ts +1 -1
- package/dist/nodes/text/number-format.js +1 -1
- package/dist/nodes/text/number-format.js.map +1 -1
- package/dist/nodes/text/number-node.js.map +1 -1
- package/dist/nodes/text/number-pattern.js.map +1 -1
- package/dist/nodes/text/richtext-node.d.ts +0 -5
- package/dist/nodes/text/richtext-node.d.ts.map +1 -1
- package/dist/nodes/text/richtext-node.js +6 -72
- package/dist/nodes/text/richtext-node.js.map +1 -1
- package/dist/nodes/text/text-base.d.ts +5 -22
- package/dist/nodes/text/text-base.d.ts.map +1 -1
- package/dist/nodes/text/text-base.js +13 -364
- package/dist/nodes/text/text-base.js.map +1 -1
- package/dist/nodes/text/text-layout.d.ts +87 -0
- package/dist/nodes/text/text-layout.d.ts.map +1 -0
- package/dist/nodes/text/text-layout.js +368 -0
- package/dist/nodes/text/text-layout.js.map +1 -0
- package/dist/nodes/text/text-node.js.map +1 -1
- package/dist/nodes/text/text-selection.js.map +1 -1
- package/dist/nodes/three/camera-nodes.d.ts +21 -3
- package/dist/nodes/three/camera-nodes.d.ts.map +1 -1
- package/dist/nodes/three/camera-nodes.js +42 -1
- package/dist/nodes/three/camera-nodes.js.map +1 -1
- package/dist/nodes/three/canvas3d-node.d.ts +32 -7
- package/dist/nodes/three/canvas3d-node.d.ts.map +1 -1
- package/dist/nodes/three/canvas3d-node.js +50 -2
- package/dist/nodes/three/canvas3d-node.js.map +1 -1
- package/dist/nodes/three/drawable-nodes.d.ts +25 -11
- package/dist/nodes/three/drawable-nodes.d.ts.map +1 -1
- package/dist/nodes/three/drawable-nodes.js +43 -13
- package/dist/nodes/three/drawable-nodes.js.map +1 -1
- package/dist/nodes/three/environment-nodes.d.ts +9 -3
- package/dist/nodes/three/environment-nodes.d.ts.map +1 -1
- package/dist/nodes/three/environment-nodes.js.map +1 -1
- package/dist/nodes/three/geometry-nodes.d.ts +2 -2
- package/dist/nodes/three/geometry-nodes.js +2 -2
- package/dist/nodes/three/geometry-nodes.js.map +1 -1
- package/dist/nodes/three/grid-geometry3d.js.map +1 -1
- package/dist/nodes/three/group3d.js.map +1 -1
- package/dist/nodes/three/light-nodes.d.ts.map +1 -1
- package/dist/nodes/three/light-nodes.js +3 -3
- package/dist/nodes/three/light-nodes.js.map +1 -1
- package/dist/nodes/three/mesh3d.js.map +1 -1
- package/dist/nodes/three/node3d.d.ts +48 -0
- package/dist/nodes/three/node3d.d.ts.map +1 -1
- package/dist/nodes/three/node3d.js +53 -3
- package/dist/nodes/three/node3d.js.map +1 -1
- package/dist/platform/audio-sink.d.ts +2 -2
- package/dist/platform/audio-sink.d.ts.map +1 -1
- package/dist/platform/audio-sink.js.map +1 -1
- package/dist/platform/exporter.d.ts +13 -8
- package/dist/platform/exporter.d.ts.map +1 -1
- package/dist/platform/exporter.js.map +1 -1
- package/dist/platform/index.d.ts +1 -1
- package/dist/platform/index.d.ts.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.d.ts +12 -6
- package/dist/platform/storage-adapter.d.ts.map +1 -1
- package/dist/platform/storage-adapter.js +4 -0
- package/dist/platform/storage-adapter.js.map +1 -1
- package/dist/platform/ticker.d.ts +6 -0
- package/dist/platform/ticker.d.ts.map +1 -1
- package/dist/platform/ticker.js +6 -0
- 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.d.ts +3 -3
- package/dist/project/tree.d.ts.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.d.ts +17 -0
- package/dist/renamed-scene-names.d.ts.map +1 -0
- package/dist/renamed-scene-names.js +9 -0
- package/dist/renamed-scene-names.js.map +1 -0
- package/dist/render/canvas-render-context2d.d.ts +2 -2
- package/dist/render/canvas-render-context2d.d.ts.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/latex.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.d.ts +12 -0
- package/dist/render/descriptors/shape.d.ts.map +1 -1
- package/dist/render/descriptors/shape.js.map +1 -1
- package/dist/render/descriptors/text.d.ts +2 -2
- package/dist/render/descriptors/text.js +2 -2
- package/dist/render/descriptors/text.js.map +1 -1
- package/dist/render/descriptors/transform.d.ts +2 -2
- package/dist/render/descriptors/transform.d.ts.map +1 -1
- package/dist/render/descriptors/transform.js.map +1 -1
- package/dist/render/graphics2d.d.ts +3 -3
- package/dist/render/graphics2d.d.ts.map +1 -1
- package/dist/render/graphics2d.js +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.d.ts +2 -2
- package/dist/render/render-context2d.d.ts.map +1 -1
- package/dist/render/render-context2d.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.d.ts.map +1 -1
- package/dist/render3d/bounds3d.js +4 -2
- package/dist/render3d/bounds3d.js.map +1 -1
- package/dist/render3d/builders.js.map +1 -1
- package/dist/render3d/camera.d.ts +6 -0
- package/dist/render3d/camera.d.ts.map +1 -1
- package/dist/render3d/camera.js +5 -3
- package/dist/render3d/camera.js.map +1 -1
- package/dist/render3d/fill3d.d.ts +2 -9
- package/dist/render3d/fill3d.d.ts.map +1 -1
- package/dist/render3d/fill3d.js +2 -13
- package/dist/render3d/fill3d.js.map +1 -1
- package/dist/render3d/geometry.d.ts +8 -1
- package/dist/render3d/geometry.d.ts.map +1 -1
- package/dist/render3d/geometry.js.map +1 -1
- package/dist/render3d/graphics3d.d.ts +8 -4
- package/dist/render3d/graphics3d.d.ts.map +1 -1
- package/dist/render3d/graphics3d.js +18 -10
- package/dist/render3d/graphics3d.js.map +1 -1
- package/dist/render3d/index.d.ts +1 -1
- package/dist/render3d/index.js +1 -1
- package/dist/render3d/index.js.map +1 -1
- package/dist/render3d/inert.d.ts +14 -0
- package/dist/render3d/inert.d.ts.map +1 -0
- package/dist/render3d/inert.js +62 -0
- package/dist/render3d/inert.js.map +1 -0
- package/dist/render3d/light.js.map +1 -1
- package/dist/render3d/material.d.ts +10 -5
- package/dist/render3d/material.d.ts.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.d.ts +23 -4
- package/dist/render3d/scene-settings.d.ts.map +1 -1
- package/dist/render3d/scene-settings.js.map +1 -1
- package/dist/render3d/scene3d.d.ts +11 -0
- package/dist/render3d/scene3d.d.ts.map +1 -1
- package/dist/render3d/scene3d.js +39 -6
- package/dist/render3d/scene3d.js.map +1 -1
- package/dist/render3d/segments.js.map +1 -1
- package/dist/render3d/texture.d.ts +9 -0
- package/dist/render3d/texture.d.ts.map +1 -1
- package/dist/render3d/texture.js +13 -0
- package/dist/render3d/texture.js.map +1 -1
- package/dist/render3d/tracking.js.map +1 -1
- package/dist/render3d/transform.d.ts +1 -1
- package/dist/render3d/transform.js.map +1 -1
- package/dist/render3d/vector3.d.ts +18 -1
- package/dist/render3d/vector3.d.ts.map +1 -1
- package/dist/render3d/vector3.js +27 -0
- package/dist/render3d/vector3.js.map +1 -1
- package/dist/render3d/walk.d.ts +1 -1
- package/dist/render3d/walk.d.ts.map +1 -1
- package/dist/render3d/walk.js +5 -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.d.ts +9 -4
- package/dist/runtime/clip-instance.d.ts.map +1 -1
- package/dist/runtime/clip-instance.js +27 -9
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.d.ts +18 -0
- package/dist/runtime/clip-store.d.ts.map +1 -1
- package/dist/runtime/clip-store.js +97 -0
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.d.ts +5 -0
- package/dist/runtime/engine.d.ts.map +1 -1
- package/dist/runtime/engine.js +2 -0
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/frame-time.d.ts +31 -0
- package/dist/runtime/frame-time.d.ts.map +1 -0
- package/dist/runtime/frame-time.js +29 -0
- package/dist/runtime/frame-time.js.map +1 -0
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +1 -0
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/node-picking.d.ts +44 -3
- package/dist/runtime/node-picking.d.ts.map +1 -1
- package/dist/runtime/node-picking.js +124 -10
- package/dist/runtime/node-picking.js.map +1 -1
- package/dist/runtime/node-picking3d.d.ts +13 -5
- package/dist/runtime/node-picking3d.d.ts.map +1 -1
- package/dist/runtime/node-picking3d.js +10 -2
- package/dist/runtime/node-picking3d.js.map +1 -1
- package/dist/runtime/placement.d.ts.map +1 -1
- package/dist/runtime/placement.js +4 -5
- package/dist/runtime/placement.js.map +1 -1
- package/dist/runtime/playback-controller.d.ts +31 -2
- package/dist/runtime/playback-controller.d.ts.map +1 -1
- package/dist/runtime/playback-controller.js +63 -6
- 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.d.ts +9 -7
- package/dist/runtime/session.d.ts.map +1 -1
- package/dist/runtime/session.js +12 -4
- package/dist/runtime/session.js.map +1 -1
- package/dist/runtime/settle.js.map +1 -1
- package/dist/runtime/state-evaluator.d.ts +1 -1
- package/dist/runtime/state-evaluator.d.ts.map +1 -1
- package/dist/runtime/state-evaluator.js +4 -3
- package/dist/runtime/state-evaluator.js.map +1 -1
- package/dist/runtime/text-geometry.d.ts.map +1 -1
- package/dist/runtime/text-geometry.js +7 -3
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.d.ts +50 -25
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +52 -42
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command-decorator.d.ts +2 -0
- package/dist/tween/command-decorator.d.ts.map +1 -1
- package/dist/tween/command-decorator.js.map +1 -1
- package/dist/tween/command.d.ts +12 -0
- package/dist/tween/command.d.ts.map +1 -1
- package/dist/tween/command.js +14 -0
- package/dist/tween/command.js.map +1 -1
- package/dist/tween/ease/constants.d.ts.map +1 -1
- package/dist/tween/ease/constants.js +8 -5
- package/dist/tween/ease/constants.js.map +1 -1
- package/dist/tween/ease/curve.d.ts.map +1 -1
- package/dist/tween/ease/curve.js +4 -3
- package/dist/tween/ease/curve.js.map +1 -1
- package/dist/tween/ease/describe.d.ts +15 -0
- package/dist/tween/ease/describe.d.ts.map +1 -0
- package/dist/tween/ease/describe.js +37 -0
- package/dist/tween/ease/describe.js.map +1 -0
- 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.d.ts +3 -3
- package/dist/tween/prepare.js +3 -3
- package/dist/tween/prepare.js.map +1 -1
- package/dist/tween/seekable.d.ts +1 -1
- package/dist/tween/seekable.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.d.ts +1 -1
- package/dist/util/metrics.js +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 +7 -1
- package/dist/attributes/shape/effects/implementations/displace.d.ts +0 -48
- package/dist/attributes/shape/effects/implementations/displace.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/displace.js +0 -30
- package/dist/attributes/shape/effects/implementations/displace.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/god-rays.d.ts +0 -28
- package/dist/attributes/shape/effects/implementations/god-rays.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/god-rays.js +0 -26
- package/dist/attributes/shape/effects/implementations/god-rays.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/texture.d.ts +0 -28
- package/dist/attributes/shape/effects/implementations/texture.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/texture.js +0 -25
- package/dist/attributes/shape/effects/implementations/texture.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/trails.d.ts +0 -41
- package/dist/attributes/shape/effects/implementations/trails.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/trails.js +0 -22
- package/dist/attributes/shape/effects/implementations/trails.js.map +0 -1
- package/dist/browser/chunks/chunk-2T3HXSC2.js +0 -2
- package/dist/browser/chunks/chunk-2T3HXSC2.js.map +0 -7
- package/dist/browser/chunks/chunk-KJXGRHOL.js +0 -3
- package/dist/browser/chunks/chunk-KJXGRHOL.js.map +0 -7
- package/dist/browser/chunks/chunk-TGDX2SS2.js +0 -18
- package/dist/browser/chunks/chunk-TGDX2SS2.js.map +0 -7
- package/dist/nodes/geometry/dot-grid-node.d.ts +0 -105
- package/dist/nodes/geometry/dot-grid-node.d.ts.map +0 -1
- package/dist/nodes/geometry/dot-grid-node.js +0 -142
- package/dist/nodes/geometry/dot-grid-node.js.map +0 -1
- package/dist/nodes/geometry/grid-lines.d.ts +0 -101
- package/dist/nodes/geometry/grid-lines.d.ts.map +0 -1
- package/dist/nodes/geometry/grid-lines.js +0 -128
- package/dist/nodes/geometry/grid-lines.js.map +0 -1
- package/dist/nodes/geometry/grid-pattern-node.d.ts +0 -58
- package/dist/nodes/geometry/grid-pattern-node.d.ts.map +0 -1
- package/dist/nodes/geometry/grid-pattern-node.js +0 -172
- package/dist/nodes/geometry/grid-pattern-node.js.map +0 -1
- package/dist/nodes/geometry/line-grid-node.d.ts +0 -62
- package/dist/nodes/geometry/line-grid-node.d.ts.map +0 -1
- package/dist/nodes/geometry/line-grid-node.js +0 -127
- package/dist/nodes/geometry/line-grid-node.js.map +0 -1
- package/dist/nodes/geometry/line-node.d.ts +0 -58
- package/dist/nodes/geometry/line-node.d.ts.map +0 -1
- package/dist/nodes/geometry/line-node.js +0 -123
- package/dist/nodes/geometry/line-node.js.map +0 -1
- package/dist/nodes/geometry/viewport-pattern-node.d.ts +0 -39
- package/dist/nodes/geometry/viewport-pattern-node.d.ts.map +0 -1
- package/dist/nodes/geometry/viewport-pattern-node.js +0 -79
- package/dist/nodes/geometry/viewport-pattern-node.js.map +0 -1
- package/dist/nodes/scene/canvas2d-node.d.ts.map +0 -1
- package/dist/nodes/scene/canvas2d-node.js.map +0 -1
- package/dist/nodes/scene/provider-node.d.ts.map +0 -1
- package/dist/nodes/scene/provider-node.js.map +0 -1
- package/dist/nodes/scene/theme-provider-node.d.ts.map +0 -1
- package/dist/nodes/scene/theme-provider-node.js.map +0 -1
- /package/dist/nodes/{scene → root}/provider-node.d.ts +0 -0
- /package/dist/nodes/{scene → root}/provider-node.js +0 -0
- /package/dist/nodes/{scene → root}/theme-provider-node.d.ts +0 -0
- /package/dist/nodes/{scene → root}/theme-provider-node.js +0 -0
|
@@ -10,6 +10,8 @@ import { commandNodeRefs, commandTraits, hasNodeRef, isContextProvider, isLayout
|
|
|
10
10
|
import { diffClip } from "./diff.js";
|
|
11
11
|
import { indexDocument } from "./doc-index.js";
|
|
12
12
|
import { expressionOps } from "./expression/ops.js";
|
|
13
|
+
import { SettledIndex } from "./settled-index.js";
|
|
14
|
+
import { commandSoundsOf } from "../component/timeline.js";
|
|
13
15
|
import { planTimelinePatch } from "./timeline-patch.js";
|
|
14
16
|
import { documentDuration, isStillDocument, nodeSpan, ROOT_NODE_ID } from "./types.js";
|
|
15
17
|
/** Resolve an {@link EaseSpec} to the function the tween actually calls. */
|
|
@@ -94,10 +96,10 @@ function presenceOf(doc) {
|
|
|
94
96
|
return spans;
|
|
95
97
|
}
|
|
96
98
|
/**
|
|
97
|
-
* The
|
|
99
|
+
* The clip document, compiled and evaluable, over the one canvas it builds
|
|
98
100
|
* into — its live nodes, presence and baselines all belong to that tree.
|
|
99
101
|
*/
|
|
100
|
-
export class
|
|
102
|
+
export class ClipTimeline {
|
|
101
103
|
canvas;
|
|
102
104
|
constructor(doc, registry, canvas) {
|
|
103
105
|
this.canvas = canvas;
|
|
@@ -162,6 +164,12 @@ export class SceneTimeline {
|
|
|
162
164
|
captureInitial(entry);
|
|
163
165
|
captureInitial(this._root);
|
|
164
166
|
this._baselined = new Set(this._present);
|
|
167
|
+
for (const id of this._present) {
|
|
168
|
+
if (this._live.get(id)?.node.mounted === false) {
|
|
169
|
+
this._baselined.delete(id);
|
|
170
|
+
this._unmounted.add(id);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
165
173
|
}
|
|
166
174
|
/**
|
|
167
175
|
* Build every command against the laid-out tree, then put the tree back.
|
|
@@ -175,10 +183,13 @@ export class SceneTimeline {
|
|
|
175
183
|
* own `at` — see {@link _compileCommands}.
|
|
176
184
|
*/
|
|
177
185
|
compile(settle = () => { }) {
|
|
186
|
+
this._settled = null;
|
|
178
187
|
this._compileCommands(settle);
|
|
179
188
|
this._restoreBaselines();
|
|
180
|
-
|
|
189
|
+
const moved = this.syncPresence(0);
|
|
190
|
+
if (this._restoreDisplaced(this._collectDisplaced()) || moved)
|
|
181
191
|
settle();
|
|
192
|
+
this._indexSettled();
|
|
182
193
|
}
|
|
183
194
|
/** What a variable holds at the last evaluated time. For a host's inspector. */
|
|
184
195
|
variableValue(id) {
|
|
@@ -188,6 +199,29 @@ export class SceneTimeline {
|
|
|
188
199
|
variables() {
|
|
189
200
|
return this._varSpecs;
|
|
190
201
|
}
|
|
202
|
+
/** The time the tree's presence was last synced to. */
|
|
203
|
+
get presenceTime() {
|
|
204
|
+
return this._presenceIndex().time;
|
|
205
|
+
}
|
|
206
|
+
/** Every sound a placed command plays, in clip seconds, with the node that plays it. */
|
|
207
|
+
commandSounds() {
|
|
208
|
+
const out = [];
|
|
209
|
+
for (const placed of this._placed) {
|
|
210
|
+
const played = commandSoundsOf(placed.command);
|
|
211
|
+
if (!played)
|
|
212
|
+
continue;
|
|
213
|
+
for (const sound of played.sounds) {
|
|
214
|
+
out.push({
|
|
215
|
+
node: played.host,
|
|
216
|
+
at: placed.start + sound.at,
|
|
217
|
+
until: sound.until === undefined ? undefined : placed.start + sound.until,
|
|
218
|
+
src: sound.src,
|
|
219
|
+
options: sound.options,
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return out;
|
|
224
|
+
}
|
|
191
225
|
/** Every compiled command, in timeline order — the indices {@link evaluateAt} reports writes under. */
|
|
192
226
|
placedCommands() {
|
|
193
227
|
return this._placed;
|
|
@@ -212,6 +246,13 @@ export class SceneTimeline {
|
|
|
212
246
|
this._evaluateObserved(seconds, onWrite);
|
|
213
247
|
return;
|
|
214
248
|
}
|
|
249
|
+
if (this._settled) {
|
|
250
|
+
this._restoreBaselines(this._wholeRestore);
|
|
251
|
+
for (const { slot, baseline } of this._slotRestore)
|
|
252
|
+
slot.restoreFrom(baseline);
|
|
253
|
+
this._settled.evaluate(this._placed, seconds);
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
215
256
|
this._restoreBaselines();
|
|
216
257
|
for (const placed of this._placed) {
|
|
217
258
|
if (seconds < placed.start)
|
|
@@ -294,6 +335,22 @@ export class SceneTimeline {
|
|
|
294
335
|
liveNode(id) {
|
|
295
336
|
return id === ROOT_NODE_ID ? this.canvas : this._live.get(id)?.node;
|
|
296
337
|
}
|
|
338
|
+
/**
|
|
339
|
+
* What a row holds before any command has acted on it: its props as it
|
|
340
|
+
* arrived, or as built for one that has not arrived yet. The same at every
|
|
341
|
+
* time, which is what tells it from the node's live props. A bound prop is
|
|
342
|
+
* read through its binding, so it answers for the tree as it stands.
|
|
343
|
+
*/
|
|
344
|
+
baselineProps(id) {
|
|
345
|
+
const entry = id === ROOT_NODE_ID ? this._root : this._live.get(id);
|
|
346
|
+
if (!entry)
|
|
347
|
+
return undefined;
|
|
348
|
+
const layer = entry.baseline === NO_LAYER ? entry.initial : entry.baseline;
|
|
349
|
+
const props = {};
|
|
350
|
+
for (const [key, snap] of layer)
|
|
351
|
+
props[key] = snap.fn ? snap.fn() : snap.value;
|
|
352
|
+
return props;
|
|
353
|
+
}
|
|
297
354
|
presenceSlot(id) {
|
|
298
355
|
return id === ROOT_NODE_ID ? this._root?.presence : this._live.get(id)?.presence;
|
|
299
356
|
}
|
|
@@ -316,10 +373,11 @@ export class SceneTimeline {
|
|
|
316
373
|
*/
|
|
317
374
|
applyUpdate(patch, settle, prepare) {
|
|
318
375
|
if (!this._root)
|
|
319
|
-
throw new Error("
|
|
376
|
+
throw new Error("ClipTimeline.applyUpdate needs a built timeline.");
|
|
320
377
|
if (patch.prev !== this._docIndex) {
|
|
321
378
|
throw new Error("This patch was planned against a different version of the document.");
|
|
322
379
|
}
|
|
380
|
+
this._settled = null;
|
|
323
381
|
this._restoreBaselines();
|
|
324
382
|
this.syncPresence(0);
|
|
325
383
|
this._updateVariables(patch);
|
|
@@ -329,8 +387,13 @@ export class SceneTimeline {
|
|
|
329
387
|
const fresh = this._updateStructure(patch);
|
|
330
388
|
for (const entry of fresh) {
|
|
331
389
|
captureInitial(entry);
|
|
332
|
-
|
|
333
|
-
|
|
390
|
+
const id = entry.spec.id;
|
|
391
|
+
if (!this._present.has(id))
|
|
392
|
+
continue;
|
|
393
|
+
if (entry.node.mounted)
|
|
394
|
+
this._baselined.add(id);
|
|
395
|
+
else
|
|
396
|
+
this._unmounted.add(id);
|
|
334
397
|
}
|
|
335
398
|
if (patch.diff.rootChanged) {
|
|
336
399
|
const host = this.canvas;
|
|
@@ -354,6 +417,7 @@ export class SceneTimeline {
|
|
|
354
417
|
const touched = new Set();
|
|
355
418
|
this._animated = [];
|
|
356
419
|
this._animatedVars = [];
|
|
420
|
+
this._animatedParts = [];
|
|
357
421
|
if (!isStillDocument(this._doc)) {
|
|
358
422
|
for (const spec of patch.next.ordered) {
|
|
359
423
|
let entry = rebuilt.get(spec.id);
|
|
@@ -370,8 +434,10 @@ export class SceneTimeline {
|
|
|
370
434
|
}
|
|
371
435
|
this._placed = placed;
|
|
372
436
|
this._restoreBaselines();
|
|
373
|
-
|
|
437
|
+
const moved = this.syncPresence(0);
|
|
438
|
+
if (this._restoreDisplaced(this._collectDisplaced()) || moved)
|
|
374
439
|
settle();
|
|
440
|
+
this._indexSettled();
|
|
375
441
|
}
|
|
376
442
|
_doc;
|
|
377
443
|
/** The vocabulary this document is compiled against — see `document/registry.ts`. */
|
|
@@ -393,6 +459,12 @@ export class SceneTimeline {
|
|
|
393
459
|
/** Node ids by {@link NodeSpec.key}. Read off the document, so it needs no build. */
|
|
394
460
|
_keyed;
|
|
395
461
|
_placed = [];
|
|
462
|
+
/** Built after every compile and update, when any placed command is marked settling (`tween/command`). */
|
|
463
|
+
_settled = null;
|
|
464
|
+
/** With {@link _settled}: the animated nodes an unmarked command writes, put back whole… */
|
|
465
|
+
_wholeRestore = [];
|
|
466
|
+
/** …and, on every other animated node, the baseline of each slot a marked command writes. */
|
|
467
|
+
_slotRestore = [];
|
|
396
468
|
/** The scene root (`targetId: null`), plus its baseline. */
|
|
397
469
|
_root = null;
|
|
398
470
|
/**
|
|
@@ -407,12 +479,28 @@ export class SceneTimeline {
|
|
|
407
479
|
_animated = [];
|
|
408
480
|
/** Only the variables some command writes to. Same reasoning. */
|
|
409
481
|
_animatedVars = [];
|
|
482
|
+
/**
|
|
483
|
+
* Slots on a part a node built for itself that some command writes, restored
|
|
484
|
+
* alongside {@link _animated}. A part is no document row, so its baseline is
|
|
485
|
+
* the slot's state the first time a command wrote it — see {@link _notePartWrite}.
|
|
486
|
+
*/
|
|
487
|
+
_animatedParts = [];
|
|
488
|
+
_partBaselines = new WeakMap();
|
|
410
489
|
/** Children each parent built for itself, which the document must not disturb. */
|
|
411
490
|
_baseChildCount = new Map();
|
|
412
491
|
/** Node ids currently in the tree, so presence only churns when it changes. */
|
|
413
492
|
_present = new Set();
|
|
414
493
|
/** Node ids whose baseline was taken while mounted — see {@link _compileCommands}. */
|
|
415
494
|
_baselined = new Set();
|
|
495
|
+
/**
|
|
496
|
+
* Rows present at time 0 that a lifecycle command (`removeChildAt`,
|
|
497
|
+
* `reparent`) took out of the parent their row names, as compile left them.
|
|
498
|
+
* Presence only moves a row across its own span, so nothing else would put
|
|
499
|
+
* one back before its command starts.
|
|
500
|
+
*/
|
|
501
|
+
_displaced = [];
|
|
502
|
+
/** Rows that arrived, or were built, while an ancestor was out of the tree and wait for it — see {@link _baselineArrival}. */
|
|
503
|
+
_unmounted = new Set();
|
|
416
504
|
_presence = null;
|
|
417
505
|
/** The rows the last {@link syncPresence} brought in, in document order. */
|
|
418
506
|
_arrived = [];
|
|
@@ -524,18 +612,23 @@ export class SceneTimeline {
|
|
|
524
612
|
* Truncating is what keeps the pair a function of the chain rather than of
|
|
525
613
|
* how the playhead got here.
|
|
526
614
|
*/
|
|
527
|
-
_restoreBaselines() {
|
|
615
|
+
_restoreBaselines(nodes = this._animated) {
|
|
616
|
+
// Structure before props: a node put back is attached, and the baseline is
|
|
617
|
+
// what it holds once attached.
|
|
618
|
+
this._restoreDisplaced(this._displaced);
|
|
528
619
|
// Variables first, so a prop bound to one recomputes against the restored
|
|
529
620
|
// value rather than a stale one.
|
|
530
621
|
for (const entry of this._animatedVars)
|
|
531
622
|
entry.cell.set(entry.baseline);
|
|
532
|
-
for (const entry of
|
|
623
|
+
for (const entry of nodes) {
|
|
533
624
|
const host = entry.node;
|
|
534
625
|
applySnapshotLayer(host, entry.baseline);
|
|
535
626
|
if (host._stateStack.length > entry.baseStackDepth) {
|
|
536
627
|
host._stateStack.length = entry.baseStackDepth;
|
|
537
628
|
}
|
|
538
629
|
}
|
|
630
|
+
for (const slot of this._animatedParts)
|
|
631
|
+
slot.restoreFrom(this._partBaselines.get(slot));
|
|
539
632
|
}
|
|
540
633
|
/**
|
|
541
634
|
* Build every command, in timeline order, against a node already holding
|
|
@@ -562,28 +655,134 @@ export class SceneTimeline {
|
|
|
562
655
|
// Every node present but not yet baselined arrived in this sync:
|
|
563
656
|
// one that left and came back was baselined the first time.
|
|
564
657
|
for (const row of this._arrived) {
|
|
565
|
-
if (this._baselined.has(row.id))
|
|
566
|
-
|
|
567
|
-
const arrived = this._live.get(row.id);
|
|
568
|
-
if (arrived)
|
|
569
|
-
captureBaseline(arrived);
|
|
570
|
-
this._baselined.add(row.id);
|
|
658
|
+
if (!this._baselined.has(row.id))
|
|
659
|
+
this._baselineArrival(row.id);
|
|
571
660
|
}
|
|
661
|
+
this._baselineMounted();
|
|
572
662
|
if (settles[i])
|
|
573
663
|
settle();
|
|
574
664
|
}
|
|
575
665
|
const placed = this._buildPlaced(spec);
|
|
576
|
-
if (!placed)
|
|
577
|
-
continue;
|
|
578
666
|
this._placed.push(placed);
|
|
579
667
|
this._touch(placed, touched);
|
|
580
668
|
}
|
|
581
669
|
}
|
|
670
|
+
/**
|
|
671
|
+
* Building runs every marked command to its end, which the restore then undoes.
|
|
672
|
+
* A node only marked commands write keeps every other slot at its baseline from
|
|
673
|
+
* here on, so an evaluation puts back only the slots they write.
|
|
674
|
+
*/
|
|
675
|
+
_indexSettled() {
|
|
676
|
+
const index = (this._settled = SettledIndex.build(this._placed));
|
|
677
|
+
if (!index)
|
|
678
|
+
return;
|
|
679
|
+
this._restoreBaselines();
|
|
680
|
+
const whole = new Set();
|
|
681
|
+
const written = new Map();
|
|
682
|
+
this._placed.forEach((placed, i) => {
|
|
683
|
+
const held = index.holds(i);
|
|
684
|
+
if (!held)
|
|
685
|
+
whole.add(placed.owner);
|
|
686
|
+
for (const slot of placed.writes) {
|
|
687
|
+
const host = slot._host;
|
|
688
|
+
const entry = host === null ? undefined : host.id === ROOT_NODE_ID ? this._root : this._live.get(host.id);
|
|
689
|
+
if (!entry)
|
|
690
|
+
continue;
|
|
691
|
+
if (!held)
|
|
692
|
+
whole.add(entry);
|
|
693
|
+
else if (written.has(entry))
|
|
694
|
+
written.get(entry).add(slot);
|
|
695
|
+
else
|
|
696
|
+
written.set(entry, new Set([slot]));
|
|
697
|
+
}
|
|
698
|
+
});
|
|
699
|
+
this._wholeRestore = [];
|
|
700
|
+
this._slotRestore = [];
|
|
701
|
+
for (const entry of this._animated) {
|
|
702
|
+
const slots = whole.has(entry) ? null : slotBaselines(entry, written.get(entry));
|
|
703
|
+
if (slots)
|
|
704
|
+
this._slotRestore.push(...slots);
|
|
705
|
+
else
|
|
706
|
+
this._wholeRestore.push(entry);
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
/** The present rows whose node is no longer under the parent its row names. */
|
|
710
|
+
_collectDisplaced() {
|
|
711
|
+
const out = [];
|
|
712
|
+
for (const id of this._present) {
|
|
713
|
+
const entry = this._live.get(id);
|
|
714
|
+
const parent = entry && this._declaredParent(id);
|
|
715
|
+
if (entry && parent && entry.node.parent !== parent)
|
|
716
|
+
out.push(entry);
|
|
717
|
+
}
|
|
718
|
+
out.sort((a, b) => this._presenceIndex().row(a.spec.id).slot - this._presenceIndex().row(b.spec.id).slot);
|
|
719
|
+
return (this._displaced = out);
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
* Put displaced rows back where {@link syncPresence} would have inserted them.
|
|
723
|
+
* Returns whether any moved.
|
|
724
|
+
*/
|
|
725
|
+
_restoreDisplaced(entries) {
|
|
726
|
+
let moved = false;
|
|
727
|
+
for (const entry of entries) {
|
|
728
|
+
const id = entry.spec.id;
|
|
729
|
+
const row = this._presenceIndex().row(id);
|
|
730
|
+
const parent = this._declaredParent(id);
|
|
731
|
+
if (!row || !parent || !this._present.has(id) || entry.node.parent === parent)
|
|
732
|
+
continue;
|
|
733
|
+
entry.node.parent?.remove(entry.node);
|
|
734
|
+
const base = this._baseChildCount.get(row.siblings.parentId) ?? 0;
|
|
735
|
+
parent.addChildAt({ data: { child: entry.node, index: base + row.siblings.before(row.slot) } });
|
|
736
|
+
moved = true;
|
|
737
|
+
}
|
|
738
|
+
return moved;
|
|
739
|
+
}
|
|
740
|
+
/** The node a row's `parentId` names: the canvas for the root, `undefined` while that row is unbuilt. */
|
|
741
|
+
_declaredParent(id) {
|
|
742
|
+
const parentId = this._presenceIndex().row(id)?.siblings.parentId;
|
|
743
|
+
if (parentId === undefined)
|
|
744
|
+
return undefined;
|
|
745
|
+
return parentId === ROOT_NODE_ID ? this.canvas : this._live.get(parentId)?.node;
|
|
746
|
+
}
|
|
747
|
+
/**
|
|
748
|
+
* Take the baseline of a row that has just arrived, if it is mounted.
|
|
749
|
+
*
|
|
750
|
+
* A baseline is the node as it stands once attached: an unmounted node's cells
|
|
751
|
+
* hold pre-attach values, without what it inherits from its ancestors. A row
|
|
752
|
+
* can arrive while an ancestor is still out of the tree (a child entering
|
|
753
|
+
* before its parent), so its baseline waits in {@link _unmounted} until
|
|
754
|
+
* {@link _baselineMounted} finds it mounted.
|
|
755
|
+
*/
|
|
756
|
+
_baselineArrival(id) {
|
|
757
|
+
const entry = this._live.get(id);
|
|
758
|
+
if (entry && !entry.node.mounted) {
|
|
759
|
+
this._unmounted.add(id);
|
|
760
|
+
return;
|
|
761
|
+
}
|
|
762
|
+
if (entry)
|
|
763
|
+
captureBaseline(entry);
|
|
764
|
+
this._baselined.add(id);
|
|
765
|
+
this._unmounted.delete(id);
|
|
766
|
+
}
|
|
767
|
+
/** Baseline the rows that arrived unmounted and have since been mounted by an ancestor arriving. */
|
|
768
|
+
_baselineMounted() {
|
|
769
|
+
for (const id of this._unmounted) {
|
|
770
|
+
const entry = this._live.get(id);
|
|
771
|
+
if (!entry) {
|
|
772
|
+
this._unmounted.delete(id);
|
|
773
|
+
}
|
|
774
|
+
else if (entry.node.mounted) {
|
|
775
|
+
captureBaseline(entry);
|
|
776
|
+
this._baselined.add(id);
|
|
777
|
+
this._unmounted.delete(id);
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
}
|
|
582
781
|
/**
|
|
583
782
|
* Build one command against the tree as it stands and run it to its end —
|
|
584
783
|
* which is what leaves its target where the next command's `from` must start.
|
|
585
|
-
* Undone wholesale by {@link _restoreBaselines}.
|
|
586
|
-
*
|
|
784
|
+
* Undone wholesale by {@link _restoreBaselines}. Throws when its target names
|
|
785
|
+
* no row, for a node-scoped command of any kind.
|
|
587
786
|
*
|
|
588
787
|
* The running-to-`at(1)` cannot be skipped: `node.to({ x: 100 })` reads `x`
|
|
589
788
|
* when the command is *constructed*, so a chain built against the untouched
|
|
@@ -599,20 +798,19 @@ export class SceneTimeline {
|
|
|
599
798
|
// cannot collide with another type's command of the same name.
|
|
600
799
|
let entry = this._registry.command(spec.type);
|
|
601
800
|
if (!entry) {
|
|
602
|
-
const
|
|
603
|
-
const
|
|
604
|
-
const factory = typeKey ? this._registry.nodeCommand(typeKey, spec.type) : undefined;
|
|
801
|
+
const typeKey = this._targetOrThrow(spec).entry.spec.type;
|
|
802
|
+
const factory = this._registry.nodeCommand(typeKey, spec.type);
|
|
605
803
|
if (!factory) {
|
|
606
|
-
throw new Error(`Node type "${typeKey
|
|
804
|
+
throw new Error(`Node type "${typeKey}" has no command "${spec.type}" ` +
|
|
607
805
|
`(command ${spec.id}). It publishes: ` +
|
|
608
|
-
`${
|
|
806
|
+
`${this._registry.commandKeys(typeKey).join(", ") || "none"}.` +
|
|
609
807
|
(LEGACY_COMMAND_HINTS[spec.type] ? ` ${LEGACY_COMMAND_HINTS[spec.type]}` : ""));
|
|
610
808
|
}
|
|
611
809
|
entry = { key: spec.type, scope: "node", factory };
|
|
612
810
|
}
|
|
613
811
|
const duration = spec.duration ?? 0;
|
|
614
812
|
const easing = resolveEase(spec.easing, this._registry);
|
|
615
|
-
const recorder = new WriteRecorder();
|
|
813
|
+
const recorder = new WriteRecorder(this._notePartWrite);
|
|
616
814
|
// Applied inside `buildToEnd`, so the `at(1)` that leaves the target where
|
|
617
815
|
// the next command's `from` starts is the *loop's* end — which for an odd
|
|
618
816
|
// number of `alternate` passes is back where it began. A looped command
|
|
@@ -631,9 +829,7 @@ export class SceneTimeline {
|
|
|
631
829
|
const command = observeSlots(recorder, () => buildToEnd(() => repeat(factory(variable.target, spec.args, duration, easing))));
|
|
632
830
|
return { spec, start: spec.at, duration: loop ? command.duration : duration, command, writes: recorder.writes, readsLayout: recorder.readsLayout, owner: variable };
|
|
633
831
|
}
|
|
634
|
-
const target = this.
|
|
635
|
-
if (!target)
|
|
636
|
-
return null;
|
|
832
|
+
const target = this._targetOrThrow(spec);
|
|
637
833
|
const args = entry.binds ? this._bindArgs(spec.args) : (this._assertNoExpressions(spec), spec.args);
|
|
638
834
|
const { factory } = entry;
|
|
639
835
|
const command = observeSlots(recorder, () => buildToEnd(() => repeat(factory(target.node, args, duration, easing))));
|
|
@@ -661,11 +857,10 @@ export class SceneTimeline {
|
|
|
661
857
|
* playhead reached it, which is the one thing the whole design forbids.
|
|
662
858
|
*
|
|
663
859
|
* `writes` is already recorded (see {@link WriteRecorder}) and a slot carries
|
|
664
|
-
* its owner, so this needs no declaration from the command. A slot
|
|
665
|
-
*
|
|
666
|
-
*
|
|
667
|
-
*
|
|
668
|
-
* rebuilt with its parent.
|
|
860
|
+
* its owner, so this needs no declaration from the command. A variable's slot
|
|
861
|
+
* arrives as {@link PlacedCommand.owner}. A slot on a part a node built for
|
|
862
|
+
* itself has no row to be restored through, so it is restored on its own, to
|
|
863
|
+
* the state {@link _notePartWrite} saw before any command wrote it.
|
|
669
864
|
*/
|
|
670
865
|
_touch(placed, touched) {
|
|
671
866
|
this._touchOwner(placed.owner, touched);
|
|
@@ -674,8 +869,13 @@ export class SceneTimeline {
|
|
|
674
869
|
if (host === null)
|
|
675
870
|
continue;
|
|
676
871
|
const entry = host.id === ROOT_NODE_ID ? this._root : this._live.get(host.id);
|
|
677
|
-
if (entry)
|
|
872
|
+
if (entry) {
|
|
678
873
|
this._touchOwner(entry, touched);
|
|
874
|
+
}
|
|
875
|
+
else if (this._partBaselines.has(slot) && !touched.has(slot)) {
|
|
876
|
+
touched.add(slot);
|
|
877
|
+
this._animatedParts.push(slot);
|
|
878
|
+
}
|
|
679
879
|
}
|
|
680
880
|
}
|
|
681
881
|
_touchOwner(owner, touched) {
|
|
@@ -687,6 +887,23 @@ export class SceneTimeline {
|
|
|
687
887
|
else
|
|
688
888
|
this._animated.push(owner);
|
|
689
889
|
}
|
|
890
|
+
/**
|
|
891
|
+
* Save a part's slot the first time a command is about to write it.
|
|
892
|
+
*
|
|
893
|
+
* Called by the observer *before* the write lands, while a command is built:
|
|
894
|
+
* every earlier command has run to its end by then, but none of them wrote
|
|
895
|
+
* this slot, so what it holds is what the part was built with (plus whatever
|
|
896
|
+
* the command's own factory primed, which is part of the command, not of the
|
|
897
|
+
* part).
|
|
898
|
+
*/
|
|
899
|
+
_notePartWrite = (slot) => {
|
|
900
|
+
const host = slot._host;
|
|
901
|
+
if (host === null || this._partBaselines.has(slot))
|
|
902
|
+
return;
|
|
903
|
+
if (host.id === ROOT_NODE_ID || this._live.has(host.id))
|
|
904
|
+
return;
|
|
905
|
+
this._partBaselines.set(slot, slot.snapshot());
|
|
906
|
+
};
|
|
690
907
|
/**
|
|
691
908
|
* Compile the expressions in a binding command's args.
|
|
692
909
|
*
|
|
@@ -719,6 +936,15 @@ export class SceneTimeline {
|
|
|
719
936
|
`Bind the prop where the node is authored (or with a "set" command) and animate the variable ` +
|
|
720
937
|
`with "variableTo" instead.`);
|
|
721
938
|
}
|
|
939
|
+
/** The live node a node-scoped command targets; one error, naming the `targetId`, when no row has it. */
|
|
940
|
+
_targetOrThrow(spec) {
|
|
941
|
+
const target = this._targetOf(spec);
|
|
942
|
+
if (!target) {
|
|
943
|
+
throw new Error(`Command ${spec.id} ("${spec.type}") targets node "${spec.targetId}", ` +
|
|
944
|
+
`which this document does not declare.`);
|
|
945
|
+
}
|
|
946
|
+
return target;
|
|
947
|
+
}
|
|
722
948
|
/** Resolve a command's `targetId` to a live node, or `null` if it names nothing. */
|
|
723
949
|
_targetOf(spec) {
|
|
724
950
|
if (spec.targetId === null) {
|
|
@@ -862,6 +1088,7 @@ export class SceneTimeline {
|
|
|
862
1088
|
this._live.delete(id);
|
|
863
1089
|
this._baseChildCount.delete(id);
|
|
864
1090
|
this._baselined.delete(id);
|
|
1091
|
+
this._unmounted.delete(id);
|
|
865
1092
|
}
|
|
866
1093
|
for (const id of patch.reinstantiate) {
|
|
867
1094
|
const entry = this._live.get(id);
|
|
@@ -881,6 +1108,7 @@ export class SceneTimeline {
|
|
|
881
1108
|
entry.spec = spec;
|
|
882
1109
|
entry.node = node;
|
|
883
1110
|
this._baselined.delete(spec.id);
|
|
1111
|
+
this._unmounted.delete(spec.id);
|
|
884
1112
|
}
|
|
885
1113
|
else {
|
|
886
1114
|
entry = {
|
|
@@ -960,12 +1188,11 @@ export class SceneTimeline {
|
|
|
960
1188
|
const step = steps[i];
|
|
961
1189
|
if (settles[i])
|
|
962
1190
|
pending = true;
|
|
963
|
-
this.syncPresence(step.at)
|
|
1191
|
+
if (this.syncPresence(step.at))
|
|
1192
|
+
this._baselineMounted();
|
|
964
1193
|
if (step.capture !== undefined) {
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
captureBaseline(entry);
|
|
968
|
-
this._baselined.add(step.capture);
|
|
1194
|
+
this._baselined.delete(step.capture);
|
|
1195
|
+
this._baselineArrival(step.capture);
|
|
969
1196
|
continue;
|
|
970
1197
|
}
|
|
971
1198
|
// After this `at`'s captures, as compile baselines arrivals before it settles.
|
|
@@ -979,9 +1206,7 @@ export class SceneTimeline {
|
|
|
979
1206
|
old.command.at(1);
|
|
980
1207
|
continue;
|
|
981
1208
|
}
|
|
982
|
-
|
|
983
|
-
if (placed)
|
|
984
|
-
rebuilt.set(spec.id, placed);
|
|
1209
|
+
rebuilt.set(spec.id, this._buildPlaced(spec));
|
|
985
1210
|
}
|
|
986
1211
|
return rebuilt;
|
|
987
1212
|
}
|
|
@@ -999,13 +1224,21 @@ const LEGACY_COMMAND_HINTS = {
|
|
|
999
1224
|
const NO_LAYER = new Map();
|
|
1000
1225
|
/** Records what building one command wrote, and whether it read a laid-out box. */
|
|
1001
1226
|
class WriteRecorder {
|
|
1227
|
+
firstWrite;
|
|
1002
1228
|
writes = new Set();
|
|
1003
1229
|
readsLayout = false;
|
|
1230
|
+
/** `firstWrite` runs the first time a slot is written, before the write lands. */
|
|
1231
|
+
constructor(firstWrite) {
|
|
1232
|
+
this.firstWrite = firstWrite;
|
|
1233
|
+
}
|
|
1004
1234
|
read(slot) {
|
|
1005
1235
|
if (slot._name === LAYOUT_SLOT)
|
|
1006
1236
|
this.readsLayout = true;
|
|
1007
1237
|
}
|
|
1008
1238
|
write(slot) {
|
|
1239
|
+
if (this.writes.has(slot))
|
|
1240
|
+
return;
|
|
1241
|
+
this.firstWrite(slot);
|
|
1009
1242
|
this.writes.add(slot);
|
|
1010
1243
|
}
|
|
1011
1244
|
}
|
|
@@ -1033,6 +1266,21 @@ function captureBaseline(entry) {
|
|
|
1033
1266
|
entry.baseline = captureLayer(host);
|
|
1034
1267
|
entry.baseStackDepth = host._stateStack.length;
|
|
1035
1268
|
}
|
|
1269
|
+
/** The baseline of each of `slots`, or `null` when one isn't among the node's props. */
|
|
1270
|
+
function slotBaselines(entry, slots) {
|
|
1271
|
+
if (!slots)
|
|
1272
|
+
return [];
|
|
1273
|
+
const cells = entry.node.__cells?.slots;
|
|
1274
|
+
if (!cells)
|
|
1275
|
+
return null;
|
|
1276
|
+
const out = [];
|
|
1277
|
+
for (const [key, slot] of cells) {
|
|
1278
|
+
const baseline = slots.has(slot) ? entry.baseline.get(key) : undefined;
|
|
1279
|
+
if (baseline)
|
|
1280
|
+
out.push({ slot, baseline });
|
|
1281
|
+
}
|
|
1282
|
+
return out.length === slots.size ? out : null;
|
|
1283
|
+
}
|
|
1036
1284
|
function captureInitial(entry) {
|
|
1037
1285
|
captureBaseline(entry);
|
|
1038
1286
|
entry.initial = entry.baseline;
|