@motionscript/core 0.1.0-alpha.7 → 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 +12 -0
- package/LICENSE +201 -201
- package/NOTICE +49 -48
- 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.d.ts.map +1 -1
- package/dist/assets/manager.js +7 -5
- 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.d.ts +73 -0
- package/dist/attributes/audio/effects/chain.d.ts.map +1 -0
- package/dist/attributes/audio/effects/chain.js +67 -0
- package/dist/attributes/audio/effects/chain.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/echo.d.ts +14 -0
- package/dist/attributes/audio/effects/implementations/echo.d.ts.map +1 -0
- package/dist/attributes/audio/{filters → effects}/implementations/echo.js +2 -2
- package/dist/attributes/audio/effects/implementations/echo.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/gain.d.ts +10 -0
- package/dist/attributes/audio/effects/implementations/gain.d.ts.map +1 -0
- package/dist/attributes/audio/{filters → effects}/implementations/gain.js +2 -2
- package/dist/attributes/audio/effects/implementations/gain.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/highpass.d.ts +12 -0
- package/dist/attributes/audio/effects/implementations/highpass.d.ts.map +1 -0
- package/dist/attributes/audio/{filters → effects}/implementations/highpass.js +2 -2
- package/dist/attributes/audio/effects/implementations/highpass.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/lowpass.d.ts +12 -0
- package/dist/attributes/audio/effects/implementations/lowpass.d.ts.map +1 -0
- package/dist/attributes/audio/{filters → effects}/implementations/lowpass.js +2 -2
- package/dist/attributes/audio/effects/implementations/lowpass.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/tremolo.d.ts +12 -0
- package/dist/attributes/audio/effects/implementations/tremolo.d.ts.map +1 -0
- package/dist/attributes/audio/{filters → effects}/implementations/tremolo.js +2 -2
- package/dist/attributes/audio/effects/implementations/tremolo.js.map +1 -0
- package/dist/attributes/audio/effects/index.d.ts +12 -0
- package/dist/attributes/audio/effects/index.d.ts.map +1 -0
- package/dist/attributes/audio/effects/index.js +4 -0
- package/dist/attributes/audio/effects/index.js.map +1 -0
- package/dist/attributes/audio/effects/registry.d.ts +36 -0
- package/dist/attributes/audio/effects/registry.d.ts.map +1 -0
- package/dist/attributes/audio/effects/registry.js +80 -0
- package/dist/attributes/audio/effects/registry.js.map +1 -0
- package/dist/attributes/audio/effects/union.d.ts +14 -0
- package/dist/attributes/audio/effects/union.d.ts.map +1 -0
- package/dist/attributes/audio/effects/union.js +24 -0
- package/dist/attributes/audio/effects/union.js.map +1 -0
- package/dist/attributes/audio/ramp.d.ts +103 -0
- package/dist/attributes/audio/ramp.d.ts.map +1 -0
- package/dist/attributes/audio/ramp.js +246 -0
- package/dist/attributes/audio/ramp.js.map +1 -0
- package/dist/attributes/audio/request.d.ts +24 -13
- package/dist/attributes/audio/request.d.ts.map +1 -1
- package/dist/attributes/audio/request.js +4 -3
- package/dist/attributes/audio/request.js.map +1 -1
- package/dist/attributes/audio/schedule.d.ts +21 -13
- package/dist/attributes/audio/schedule.d.ts.map +1 -1
- package/dist/attributes/audio/schedule.js +42 -28
- package/dist/attributes/audio/schedule.js.map +1 -1
- package/dist/attributes/audio/sound.d.ts +15 -12
- package/dist/attributes/audio/sound.d.ts.map +1 -1
- package/dist/attributes/audio/sound.js +8 -10
- package/dist/attributes/audio/sound.js.map +1 -1
- package/dist/attributes/audio/transition.d.ts +33 -0
- package/dist/attributes/audio/transition.d.ts.map +1 -0
- package/dist/attributes/audio/transition.js +48 -0
- package/dist/attributes/audio/transition.js.map +1 -0
- package/dist/attributes/index.d.ts +4 -3
- package/dist/attributes/index.d.ts.map +1 -1
- package/dist/attributes/index.js +4 -7
- 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.d.ts +2 -2
- package/dist/attributes/layout/matrix2d.js.map +1 -1
- package/dist/attributes/layout/size.js.map +1 -1
- package/dist/attributes/layout/space3d.js +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.d.ts +7 -7
- package/dist/attributes/properties/typed.d.ts.map +1 -1
- package/dist/attributes/properties/typed.js +6 -6
- 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.d.ts +1 -2
- package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.js +1 -2
- 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.d.ts +96 -409
- package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/chain.js +93 -283
- package/dist/attributes/shape/effects/chain.js.map +1 -1
- package/dist/attributes/shape/effects/effect-data.d.ts +1 -1
- package/dist/attributes/shape/effects/effect-data.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.d.ts +45 -13
- package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.js +29 -23
- package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +32 -7
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js +17 -15
- package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts +46 -10
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js +21 -19
- package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.d.ts +32 -7
- package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.js +17 -11
- package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.d.ts +16 -3
- package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.js +13 -5
- package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.d.ts +28 -9
- package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.js +15 -14
- package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +21 -5
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +15 -10
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +96 -26
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js +29 -26
- package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.d.ts +20 -6
- package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.js +26 -23
- package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +26 -5
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js +15 -10
- package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.d.ts +58 -11
- package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.js +26 -20
- package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +46 -14
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js +24 -29
- package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.d.ts +26 -7
- package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.js +17 -16
- package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.d.ts +29 -7
- package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.js +17 -14
- package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.d.ts +76 -19
- package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.js +28 -22
- package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.d.ts +149 -42
- package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.js +74 -72
- package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.d.ts +43 -11
- package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.js +21 -18
- package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts +17 -3
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js +13 -5
- package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.d.ts +40 -9
- package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.js +20 -16
- package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.d.ts +23 -5
- package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.js +15 -10
- package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +57 -18
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js +25 -22
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.d.ts +34 -7
- package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.js +20 -16
- package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.d.ts +27 -9
- package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.js +17 -14
- package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +54 -19
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.js +42 -20
- package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +17 -3
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js +13 -9
- package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.d.ts +28 -8
- package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.js +18 -17
- package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts +25 -6
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js +16 -14
- package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.d.ts +14 -3
- package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.js +13 -9
- package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +91 -26
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.js +27 -28
- package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +49 -10
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js +19 -20
- package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +36 -6
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js +16 -15
- package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts +52 -11
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js +21 -18
- package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.d.ts +23 -9
- package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.js +15 -12
- package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.d.ts +90 -34
- package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.js +42 -26
- package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts +23 -5
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js +16 -11
- package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.d.ts +40 -9
- package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.js +19 -16
- package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.d.ts +24 -5
- package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.js +17 -11
- package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.d.ts +35 -8
- package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.js +17 -16
- package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.d.ts +37 -7
- package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.js +19 -18
- package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.d.ts +24 -5
- package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.js +15 -10
- package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.d.ts +61 -14
- package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.js +26 -23
- package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
- package/dist/attributes/shape/effects/index.d.ts +4 -2
- package/dist/attributes/shape/effects/index.d.ts.map +1 -1
- package/dist/attributes/shape/effects/index.js +1 -1
- package/dist/attributes/shape/effects/index.js.map +1 -1
- package/dist/attributes/shape/effects/registry.d.ts +11 -0
- package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
- package/dist/attributes/shape/effects/registry.js +113 -102
- package/dist/attributes/shape/effects/registry.js.map +1 -1
- package/dist/attributes/shape/effects/spec.d.ts +229 -0
- package/dist/attributes/shape/effects/spec.d.ts.map +1 -0
- package/dist/attributes/shape/effects/spec.js +178 -0
- package/dist/attributes/shape/effects/spec.js.map +1 -0
- 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.d.ts +7 -9
- package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
- package/dist/attributes/shape/fill/chain.js +9 -11
- 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.d.ts +27 -26
- package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.js +20 -14
- 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.d.ts +1 -1
- package/dist/attributes/shape/fill/index.d.ts.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.d.ts +1 -2
- package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
- package/dist/attributes/shape/fill/registry.js +1 -2
- 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 +2 -6
- package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
- package/dist/attributes/shape/filters/chain.js +1 -5
- 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.d.ts +2 -2
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.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.d.ts +1 -1
- package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
- 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 +2 -3
- 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.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.d.ts +2 -0
- package/dist/attributes/shape/shaders/index.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/index.js +2 -0
- package/dist/attributes/shape/shaders/index.js.map +1 -1
- package/dist/attributes/shape/shaders/language.d.ts +26 -0
- package/dist/attributes/shape/shaders/language.d.ts.map +1 -0
- package/dist/attributes/shape/shaders/language.js +20 -0
- package/dist/attributes/shape/shaders/language.js.map +1 -0
- package/dist/attributes/shape/shaders/pack.d.ts +25 -11
- package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/pack.js +9 -4
- package/dist/attributes/shape/shaders/pack.js.map +1 -1
- package/dist/attributes/shape/shaders/resolve.d.ts +4 -5
- package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/resolve.js +3 -6
- package/dist/attributes/shape/shaders/resolve.js.map +1 -1
- package/dist/attributes/shape/shaders/uniforms.d.ts +41 -0
- package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -0
- package/dist/attributes/shape/shaders/uniforms.js +0 -0
- package/dist/attributes/shape/shaders/uniforms.js.map +1 -0
- 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-7DB6BI27.js +6 -0
- package/dist/browser/chunks/chunk-7DB6BI27.js.map +7 -0
- package/dist/browser/chunks/chunk-IX53IFBD.js +13 -0
- 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 +4 -4
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +2 -2
- package/dist/browser/manifest.json +1 -1
- package/dist/browser/sdk.js +1 -1
- package/dist/component.js.map +1 -1
- package/dist/components/builtins/audio/audio.d.ts +14 -5
- package/dist/components/builtins/audio/audio.d.ts.map +1 -1
- package/dist/components/builtins/audio/audio.js +10 -13
- package/dist/components/builtins/audio/audio.js.map +1 -1
- package/dist/components/builtins/geometry/composite.d.ts +3 -3
- 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.d.ts +7 -7
- package/dist/components/builtins/media/media.d.ts.map +1 -1
- package/dist/components/builtins/media/media.js +4 -10
- 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.d.ts.map +1 -1
- package/dist/components/builtins/text/text.js +3 -0
- 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.d.ts +38 -11
- package/dist/components/factory/api.d.ts.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.d.ts.map +1 -1
- package/dist/components/factory/component3d.js +11 -3
- package/dist/components/factory/component3d.js.map +1 -1
- package/dist/components/factory/factory.d.ts +3 -0
- package/dist/components/factory/factory.d.ts.map +1 -1
- package/dist/components/factory/factory.js +39 -5
- 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.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.d.ts +1 -1
- package/dist/components/trees/2d/node-render.js +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.d.ts +1 -1
- package/dist/components/trees/2d/node2d.js +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.d.ts +16 -9
- package/dist/components/trees/audio/node-audio.d.ts.map +1 -1
- package/dist/components/trees/audio/node-audio.js +15 -11
- 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.d.ts +12 -2
- package/dist/document/command-traits.d.ts.map +1 -1
- package/dist/document/command-traits.js +34 -6
- 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.d.ts +8 -0
- package/dist/document/index.d.ts.map +1 -1
- package/dist/document/index.js +4 -0
- package/dist/document/index.js.map +1 -1
- package/dist/document/migrate.d.ts +70 -0
- package/dist/document/migrate.d.ts.map +1 -0
- package/dist/document/migrate.js +202 -0
- package/dist/document/migrate.js.map +1 -0
- package/dist/document/missing-node.d.ts +27 -0
- package/dist/document/missing-node.d.ts.map +1 -0
- package/dist/document/missing-node.js +48 -0
- package/dist/document/missing-node.js.map +1 -0
- package/dist/document/node-decorator.js.map +1 -1
- package/dist/document/node-descriptor.d.ts +4 -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 +2 -1
- package/dist/document/placement.d.ts.map +1 -1
- package/dist/document/placement.js.map +1 -1
- package/dist/document/project.d.ts +2 -0
- package/dist/document/project.d.ts.map +1 -1
- package/dist/document/project.js +1 -0
- package/dist/document/project.js.map +1 -1
- package/dist/document/prop-evolution.d.ts +51 -0
- package/dist/document/prop-evolution.d.ts.map +1 -0
- package/dist/document/prop-evolution.js +83 -0
- package/dist/document/prop-evolution.js.map +1 -0
- package/dist/document/registry.d.ts +16 -0
- package/dist/document/registry.d.ts.map +1 -1
- package/dist/document/registry.js +30 -4
- package/dist/document/registry.js.map +1 -1
- package/dist/document/settled-index.d.ts +2 -0
- package/dist/document/settled-index.d.ts.map +1 -1
- package/dist/document/settled-index.js +5 -5
- package/dist/document/settled-index.js.map +1 -1
- package/dist/document/timeline-patch.d.ts +4 -0
- package/dist/document/timeline-patch.d.ts.map +1 -1
- package/dist/document/timeline-patch.js +28 -3
- package/dist/document/timeline-patch.js.map +1 -1
- package/dist/document/timeline.d.ts +45 -1
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +172 -42
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.d.ts +14 -28
- package/dist/document/types.d.ts.map +1 -1
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.d.ts +17 -5
- package/dist/document/validate.d.ts.map +1 -1
- package/dist/document/validate.js +158 -21
- package/dist/document/validate.js.map +1 -1
- package/dist/document/vocabulary.d.ts +28 -0
- package/dist/document/vocabulary.d.ts.map +1 -0
- package/dist/document/vocabulary.js +42 -0
- package/dist/document/vocabulary.js.map +1 -0
- package/dist/experimental.d.ts +68 -8
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js +22 -8
- 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.d.ts +13 -0
- package/dist/platform/exporter.d.ts.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.d.ts +1 -1
- package/dist/renamed-scene-names.d.ts.map +1 -1
- package/dist/renamed-scene-names.js +1 -1
- package/dist/renamed-scene-names.js.map +1 -1
- package/dist/render/canvas-render-context2d.d.ts +9 -0
- package/dist/render/canvas-render-context2d.d.ts.map +1 -1
- package/dist/render/canvas-render-context2d.js +10 -0
- package/dist/render/canvas-render-context2d.js.map +1 -1
- package/dist/render/clip-contains.js +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.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.js.map +1 -1
- package/dist/render/graphics2d.js.map +1 -1
- package/dist/render/index.d.ts +2 -0
- package/dist/render/index.d.ts.map +1 -1
- package/dist/render/index.js +1 -0
- 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 +1 -1
- package/dist/render/render-context2d.js.map +1 -1
- package/dist/render/render-issue.d.ts +39 -0
- package/dist/render/render-issue.d.ts.map +1 -0
- package/dist/render/render-issue.js +29 -0
- package/dist/render/render-issue.js.map +1 -0
- package/dist/render/surface.d.ts +2 -2
- 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.d.ts.map +1 -1
- package/dist/render3d/graphics3d.js +54 -5
- 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 +2 -1
- package/dist/runtime/asset-refine.js.map +1 -1
- package/dist/runtime/asset-timeline.d.ts +10 -0
- package/dist/runtime/asset-timeline.d.ts.map +1 -1
- package/dist/runtime/asset-timeline.js.map +1 -1
- package/dist/runtime/asset-update.d.ts.map +1 -1
- package/dist/runtime/asset-update.js +7 -0
- 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 +3 -1
- package/dist/runtime/clip-instance.d.ts.map +1 -1
- package/dist/runtime/clip-instance.js +4 -0
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.d.ts.map +1 -1
- package/dist/runtime/clip-store.js +17 -2
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.d.ts +5 -3
- package/dist/runtime/engine.d.ts.map +1 -1
- package/dist/runtime/engine.js +2 -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.d.ts.map +1 -1
- package/dist/runtime/playback-controller.js +14 -4
- 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 +7 -3
- package/dist/runtime/session.d.ts.map +1 -1
- package/dist/runtime/session.js +11 -4
- 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.d.ts +1 -1
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.d.ts +8 -6
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +10 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command-decorator.d.ts +7 -0
- package/dist/tween/command-decorator.d.ts.map +1 -1
- package/dist/tween/command-decorator.js +1 -0
- 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.d.ts +2 -0
- package/dist/tween/ease/describe.d.ts.map +1 -1
- package/dist/tween/ease/describe.js +4 -0
- package/dist/tween/ease/describe.js.map +1 -1
- package/dist/tween/ease/spec.d.ts +31 -0
- package/dist/tween/ease/spec.d.ts.map +1 -0
- package/dist/tween/ease/spec.js +51 -0
- package/dist/tween/ease/spec.js.map +1 -0
- package/dist/tween/ease/type.js.map +1 -1
- package/dist/tween/index.d.ts +1 -0
- package/dist/tween/index.d.ts.map +1 -1
- package/dist/tween/index.js +1 -0
- 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 +2 -2
- 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.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.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.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.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.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-D4FSTPML.js +0 -14
- package/dist/browser/chunks/chunk-D4FSTPML.js.map +0 -7
- package/dist/browser/chunks/chunk-LKUYVFU3.js.map +0 -7
- package/dist/browser/chunks/chunk-RTNATFWX.js +0 -5
- package/dist/browser/chunks/chunk-RTNATFWX.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
package/dist/document/types.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { CurvePoint } from "../tween/ease/curve.js";
|
|
1
|
+
import type { EaseSpec } from "../tween/ease/spec.js";
|
|
3
2
|
import { type LoopSpec } from "../tween/loop.js";
|
|
4
3
|
import type { Theme } from "../project/config.js";
|
|
5
4
|
/**
|
|
@@ -49,9 +48,11 @@ export interface NodeSpec {
|
|
|
49
48
|
id: string;
|
|
50
49
|
/**
|
|
51
50
|
* Registry key of the node's class — `"rect"`, `"text"`, `"canvas3d"`, or
|
|
52
|
-
* whatever a custom node registered itself as.
|
|
53
|
-
*
|
|
54
|
-
*
|
|
51
|
+
* whatever a custom node registered itself as. A key the registry lacks
|
|
52
|
+
* builds as an inert placeholder that keeps the row's id, props and
|
|
53
|
+
* children and is reported in `buildErrors` (`missing-node.ts`), so one
|
|
54
|
+
* missing component costs one node rather than the clip; `validateDocument`
|
|
55
|
+
* with a registry reports it up front.
|
|
55
56
|
*/
|
|
56
57
|
type: string;
|
|
57
58
|
/**
|
|
@@ -148,29 +149,8 @@ export interface VariableSpec {
|
|
|
148
149
|
*/
|
|
149
150
|
lerp?: string;
|
|
150
151
|
}
|
|
151
|
-
/**
|
|
152
|
-
|
|
153
|
-
*
|
|
154
|
-
* Mirrors the `linear`/`easeIn`/`easeOut`/`easeInOut` families in
|
|
155
|
-
* `tween/ease/constants.ts` — `kind` picks the direction, `args` picks the
|
|
156
|
-
* family and its knobs. Resolved to an `EasingFunction` once, at compile time.
|
|
157
|
-
*
|
|
158
|
-
* `kind: "custom"` resolves through the registry instead — `args` is then
|
|
159
|
-
* the key a host passed to `Registry.addEase`/`RegistryOptions.eases`,
|
|
160
|
-
* for an ease no standard family expresses (an authored curve, a physically
|
|
161
|
-
* simulated one).
|
|
162
|
-
*/
|
|
163
|
-
export interface EaseSpec {
|
|
164
|
-
kind: "linear" | "in" | "out" | "inOut" | "custom";
|
|
165
|
-
/**
|
|
166
|
-
* Family and its parameters (`"quad"`, or `{ type: "back", overshoot: 2 }`)
|
|
167
|
-
* for every `kind` but `"custom"`, whose `args` is instead the drawn curve
|
|
168
|
-
* itself — a {@link CurvePoint} chain from (0, 0) to (1, 1), so the timing
|
|
169
|
-
* travels with the document — or the `Registry.addEase` key of a function
|
|
170
|
-
* the host registered.
|
|
171
|
-
*/
|
|
172
|
-
args?: EaseParams | CurvePoint[] | string;
|
|
173
|
-
}
|
|
152
|
+
/** How a command eases, as data — resolved to an `EasingFunction` once, at compile time. */
|
|
153
|
+
export type { EaseSpec } from "../tween/ease/spec.js";
|
|
174
154
|
/**
|
|
175
155
|
* One command, **placed on the timeline**.
|
|
176
156
|
*
|
|
@@ -265,6 +245,8 @@ export interface CommandSpec {
|
|
|
265
245
|
*/
|
|
266
246
|
export interface StillDocument {
|
|
267
247
|
kind: "still";
|
|
248
|
+
/** The format it was written in — see `migrate.ts`. Absent is format 0, every document written before the field existed. */
|
|
249
|
+
formatVersion?: number;
|
|
268
250
|
/** Every node in the scene, including the root. Order here is irrelevant — `parentId`/`layerOrder` carry the structure. */
|
|
269
251
|
nodes: NodeSpec[];
|
|
270
252
|
/** Values props bind to with an expression. Fixed here — nothing on a still changes one. */
|
|
@@ -294,6 +276,8 @@ export interface StillDocument {
|
|
|
294
276
|
*/
|
|
295
277
|
export interface CompositionDocument {
|
|
296
278
|
kind: "composition";
|
|
279
|
+
/** The format it was written in — see `migrate.ts`. Absent is format 0, every document written before the field existed. */
|
|
280
|
+
formatVersion?: number;
|
|
297
281
|
/** Every node, the root included. Order is irrelevant — `parentId`/`layerOrder` carry the structure. */
|
|
298
282
|
nodes: TimedNodeSpec[];
|
|
299
283
|
/** Values props bind to with an expression, and that `variableTo`/`variableSet` may drive. */
|
|
@@ -334,6 +318,8 @@ export interface CompositionDocument {
|
|
|
334
318
|
*/
|
|
335
319
|
export interface AudioDocument {
|
|
336
320
|
kind: "audio";
|
|
321
|
+
/** The format it was written in — see `migrate.ts`. Absent is format 0, every document written before the field existed. */
|
|
322
|
+
formatVersion?: number;
|
|
337
323
|
/** Every node, the root bus included. */
|
|
338
324
|
nodes: TimedNodeSpec[];
|
|
339
325
|
/** Values props bind to with an expression, and that `variableTo`/`variableSet` may drive. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/document/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/document/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;;GAIG;AACH,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,QAAQ;IACrB,8EAA8E;IAC9E,EAAE,EAAE,MAAM,CAAC;IACX;;;;;;;OAOG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;;;;;;;;OAcG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;OAK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CAAC;IAC3D,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC;QAC3B,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS;YAAE,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAClE,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;YAAE,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IACjG,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC","sourcesContent":["import type { EaseParams } from \"@/tween/ease/constants\";\r\nimport type { CurvePoint } from \"@/tween/ease/curve\";\r\nimport { loopPasses, type LoopSpec } from \"@/tween/loop\";\r\nimport type { Theme } from \"@/project/config\";\r\n\r\n/**\r\n * Re-exported as part of the document vocabulary: a loop is stored on a\r\n * {@link CommandSpec} the way an {@link EaseSpec} is, but its arithmetic is a\r\n * tween concern and lives with the tweens (`tween/loop.ts`).\r\n */\r\nexport type { LoopDirection, LoopSpec } from \"@/tween/loop\";\r\n\r\n/**\r\n * The clip document: what a clip **is**, as data.\r\n *\r\n * A visual clip used to be a generator function, so the only way to know what frame N\r\n * looked like was to run frames 0..N-1. That made a whole class of host\r\n * impossible — a document cannot be stored, diffed, synced or evaluated out of\r\n * order when its meaning is \"whatever running this code does\". These types are\r\n * the replacement: a clip is rows, and a frame is a pure function of them.\r\n *\r\n * The split between what is data and what is code is deliberate and total:\r\n *\r\n * - **Nodes are code.** A node type is a class registered under a string key\r\n * (see `document/registry.ts`). That is the extension point — a custom node\r\n * with its own `property` declarations, its own `renderSelf`, its own\r\n * `command` methods — and it is where anything a JSON value cannot express\r\n * (a computed lookup table, a generated point cloud) belongs.\r\n * - **Documents are data.** Which nodes exist, what props they carry, and what\r\n * happens to them over time are plain JSON.\r\n *\r\n * Everything here is JSON-serializable by construction: no functions, no class\r\n * instances. A document round-trips through a file or a database column without\r\n * a mapping layer.\r\n */\r\n\r\n/**\r\n * One node, as a row.\r\n *\r\n * Flat rather than nested, for two reasons that both bite immediately\r\n * otherwise: a command addresses its target by `id`, and a nested tree makes\r\n * \"move this node under that one\" a structural rewrite rather than a\r\n * single-field edit. It is also the shape a relational store already wants —\r\n * `parentId` is a self-referencing foreign key.\r\n *\r\n * The scene root is not special-cased here: it is the one row with\r\n * `id: \"\"`, `type: \"canvas2d\"` and `parentId: null` — see\r\n * {@link CommandSpec.targetId}.\r\n */\r\nexport interface NodeSpec {\r\n /** Stable identity. Command targets resolve to it; it survives reordering. */\r\n id: string;\r\n /**\r\n * Registry key of the node's class — `\"rect\"`, `\"text\"`, `\"canvas3d\"`, or\r\n * whatever a custom node registered itself as. An unknown key is a\r\n * validation error rather than a silently-skipped node: a document that\r\n * half-renders is worse than one that refuses to.\r\n */\r\n type: string;\r\n /**\r\n * The handle an **expression** names this node by: `\"=[card.x]\"` reads the\r\n * `x` of the node keyed `card`. See {@link CompositionDocument} and\r\n * `document/expression/`.\r\n *\r\n * Optional and **never generated**, unlike {@link id} — a node has one\r\n * because an author wrote one, which is what makes it safe to point a\r\n * formula at. Unique per document all the same: a second `card` would make\r\n * `[card.x]` mean whichever row was read last. It is a *reference*, not an\r\n * address — a `parentId` or a `targetId` is always an {@link id}, so there is\r\n * exactly one way to say which node and one way to say which handle.\r\n *\r\n * Not a display label. A host that wants one keeps it, since nothing here\r\n * reads it.\r\n */\r\n key?: string;\r\n /** Parent node id, or `null` for a direct child of the scene root. */\r\n parentId: string | null;\r\n /**\r\n * Position among siblings. Load-bearing rather than cosmetic: a `row`/\r\n * `column` parent lays its children out in exactly this order.\r\n */\r\n layerOrder: number;\r\n /**\r\n * Authored props, **sparse** — only what differs from the type's declared\r\n * defaults. A freshly created node is `{}`, which is what keeps a document\r\n * diff small and lets a change to a default actually reach existing\r\n * documents.\r\n */\r\n props: Record<string, unknown>;\r\n}\r\n\r\n/**\r\n * A {@link NodeSpec} placed on a clip's clock: present from {@link startAt} until\r\n * {@link endAt}.\r\n *\r\n * The span is a field of the node rather than a pair of commands, so a node is\r\n * the same row whether a still or a composition holds it — moving a subtree\r\n * between the two is dropping or adding these two fields, never rewriting rows.\r\n * Not `start`/`end`: a painted node already owns those as path-trim props.\r\n */\r\nexport interface TimedNodeSpec extends NodeSpec {\r\n /** Seconds from the clip's start at which the node enters the tree. Absent is `0`. */\r\n startAt?: number;\r\n /** Seconds at which it leaves. Absent is never — it stays to the clip's end. */\r\n endAt?: number;\r\n}\r\n\r\n/**\r\n * A **variable**: a value with a name, in neither the tree nor the command list.\r\n *\r\n * The thing that exists purely so a change can happen in *one* place. Twelve\r\n * nodes fading together used to be twelve `to` commands whose `at` and\r\n * `duration` had to be kept equal by hand; with a variable it is one\r\n * `variableTo` and twelve props bound to `\"=[fade]\"`.\r\n *\r\n * Every document kind declares them the same way, in `variables`. On a still\r\n * nothing can change one, so it is a fixed value; on a composition a\r\n * `variableTo`/`variableSet` command may drive it. A variable has no presence\r\n * span: an expression naming one that \"does not exist yet\" is a broken document,\r\n * so a variable holds its declared {@link value} from t=0 until a command\r\n * changes it.\r\n *\r\n * Nothing reads a variable except an expression (`document/expression/`), and an\r\n * expression can only appear in a prop — so a variable cannot read another\r\n * variable, and no chain of them can cycle. A prop reading another node's prop\r\n * (`[key.x]`) is the case that can, and `validate.ts` refuses it.\r\n */\r\nexport interface VariableSpec {\r\n /**\r\n * Stable identity. Commands target it, and `[id]` in an expression names\r\n * it — one key, not two, so there is nothing to keep in sync.\r\n */\r\n id: string;\r\n /** A display label for a host's UI. Expressions never see it. */\r\n name?: string;\r\n /**\r\n * What it holds before anything changes it, and the value type every\r\n * command that writes it is expected to produce.\r\n *\r\n * Any JSON value. A number is the common case, but a colour string, a\r\n * `Vector2` or a whole fill object all work — a lone `\"=[x]\"` hands the\r\n * value through untouched, so a variable is as expressive as the prop it\r\n * drives.\r\n */\r\n value: unknown;\r\n /**\r\n * How it interpolates, by registry key — `\"number\"`, `\"vector2\"`,\r\n * `\"vector3\"`, `\"color\"`, `\"step\"`, or anything `Registry.addLerp`\r\n * added. A command may override it per tween.\r\n *\r\n * Absent means `\"number\"` for a numeric {@link value} and `\"step\"` for\r\n * anything else: snap at the end rather than interpolate garbage.\r\n */\r\n lerp?: string;\r\n}\r\n\r\n/**\r\n * How a command eases, as data.\r\n *\r\n * Mirrors the `linear`/`easeIn`/`easeOut`/`easeInOut` families in\r\n * `tween/ease/constants.ts` — `kind` picks the direction, `args` picks the\r\n * family and its knobs. Resolved to an `EasingFunction` once, at compile time.\r\n *\r\n * `kind: \"custom\"` resolves through the registry instead — `args` is then\r\n * the key a host passed to `Registry.addEase`/`RegistryOptions.eases`,\r\n * for an ease no standard family expresses (an authored curve, a physically\r\n * simulated one).\r\n */\r\nexport interface EaseSpec {\r\n kind: \"linear\" | \"in\" | \"out\" | \"inOut\" | \"custom\";\r\n /**\r\n * Family and its parameters (`\"quad\"`, or `{ type: \"back\", overshoot: 2 }`)\r\n * for every `kind` but `\"custom\"`, whose `args` is instead the drawn curve\r\n * itself — a {@link CurvePoint} chain from (0, 0) to (1, 1), so the timing\r\n * travels with the document — or the `Registry.addEase` key of a function\r\n * the host registered.\r\n */\r\n args?: EaseParams | CurvePoint[] | string;\r\n}\r\n\r\n/**\r\n * One command, **placed on the timeline**.\r\n *\r\n * The placement is the whole idea. A generator expressed sequencing by\r\n * suspending — running `a` to completion before `b` began — which is why order\r\n * of evaluation was order of execution, and why seeking backwards meant\r\n * starting over. A command\r\n * carries its own `at`, so:\r\n *\r\n * - **sequence** is `b.at === a.at + a.duration`,\r\n * - **parallel** is two commands sharing an `at`,\r\n * - **wait** is a gap between them.\r\n *\r\n * There are no `sequence`/`parallel`/`wait` primitives any more because there\r\n * is nothing left for them to do. And because every command's span is declared\r\n * rather than discovered, the scene's duration, its asset windows and each\r\n * node's lifespan are all readable straight off the document — see\r\n * `runtime/analysis.ts`.\r\n */\r\nexport interface CommandSpec {\r\n /** Stable identity, so a host can address and reorder one command. */\r\n id: string;\r\n /**\r\n * Registry key of the command — `\"to\"`, `\"set\"`, `\"variableTo\"`, or any\r\n * `command()` method a node class exposes (`\"moveTo\"`, `\"fillTo\"`,\r\n * `\"countTo\"`, …). See `document/registry.ts`. A command changes what a\r\n * node holds, never whether it exists — that is its {@link TimedNodeSpec} span.\r\n */\r\n type: string;\r\n /**\r\n * The node this command acts on, or `null` for the scene root — the\r\n * `Canvas2D` that is simultaneously the scene's layout frame, its\r\n * background paint and its camera (the node with `id: \"\"`,\r\n * `type: \"canvas2d\"`).\r\n *\r\n * A **variable** command (`\"variableTo\"`, `\"variableSet\"`) names a\r\n * {@link VariableSpec} here instead. The command type says which table the\r\n * id is looked up in, so there is no prefix to write; ids are required to be\r\n * unique across nodes and variables so a host grouping its timeline rows by\r\n * `targetId` cannot conflate the two.\r\n */\r\n targetId: string | null;\r\n /**\r\n * Seconds from the scene's start at which the command begins.\r\n *\r\n * Seconds rather than a frame index because a document has to survive an\r\n * fps change: the same scene rendered at 30 and at 60 must be the same\r\n * animation, not the same integers. Frames are derived (`at * fps`).\r\n */\r\n at: number;\r\n /**\r\n * Seconds **one pass** takes. Absent or `0` is a stamp — it applies at once.\r\n *\r\n * One pass rather than the whole span, so that {@link loop}ing a command\r\n * repeats it instead of squeezing the same motion into the same time: a\r\n * two-second spin repeated three times runs for six seconds and each turn\r\n * still takes two. The span is {@link commandSpan}.\r\n */\r\n duration?: number;\r\n /** How it eases, per pass. Absent means the command's own default. */\r\n easing?: EaseSpec;\r\n /**\r\n * How it repeats. Absent runs it once.\r\n *\r\n * A placement field beside {@link at} and {@link duration} rather than\r\n * something inside {@link args}, because repeating is not any one command's\r\n * business: the runtime wraps the *built* command, so `to`, `fillTo`,\r\n * `countTo` and a node's own `command()` all loop by the same code and a\r\n * newly written command type gets it for free.\r\n */\r\n loop?: LoopSpec;\r\n /**\r\n * The command's arguments. Shape is per command type: `\"to\"`/`\"set\"`'s *is*\r\n * the props diff, `\"variableTo\"`'s carries the `value`, a named command\r\n * carries its leading arguments by parameter name. Never wrapped in an extra\r\n * key for a command with exactly one argument.\r\n */\r\n args: Record<string, unknown>;\r\n}\r\n\r\n/**\r\n * A **still**: a node tree and nothing else.\r\n *\r\n * One frame, no timeline, no commands. It is its own document type rather than\r\n * \"an animation nobody ran\" because the two are edited by different tools and\r\n * validated by different rules — a still carrying a duration, or a half-applied\r\n * tween, is a document that should never have been representable.\r\n *\r\n * The scene root — `fill`, `overlay`, `flow`, `align`, `padding`, the camera\r\n * (`zoom`, `origin`, `heading`) — is not a separate field: it is the row in\r\n * {@link nodes} with `id: \"\"` and `type: \"canvas2d\"`. Omitting it gets the\r\n * default root.\r\n */\r\nexport interface StillDocument {\r\n kind: \"still\";\r\n /** Every node in the scene, including the root. Order here is irrelevant — `parentId`/`layerOrder` carry the structure. */\r\n nodes: NodeSpec[];\r\n /** Values props bind to with an expression. Fixed here — nothing on a still changes one. */\r\n variables?: VariableSpec[];\r\n /**\r\n * Colour tokens and typography presets this clip resolves against.\r\n *\r\n * On the clip, not only on the project, because a theme is part of what a\r\n * clip *looks like* — a lower third in a brand's palette is that document,\r\n * not that document plus a setting a host remembered to pass alongside it.\r\n * A project's own `theme` is the default for clips that declare none.\r\n */\r\n theme?: Theme;\r\n}\r\n\r\n/**\r\n * A **composition**: a still's node tree, placed in time, and the commands that\r\n * animate it.\r\n *\r\n * The nodes are the same rows a still holds, each with its own span, so when a\r\n * node appears is one editable field rather than an implicit consequence of\r\n * where a `stage.add(...)` sat in a function body — and a subtree lifted out of\r\n * a still drops in here unchanged.\r\n *\r\n * The scene root is the row in {@link nodes} with `id: \"\"` and\r\n * `type: \"canvas2d\"`, as on a still. Omitting it gets the default root; a\r\n * command targeting `null` animates it like any other node.\r\n */\r\nexport interface CompositionDocument {\r\n kind: \"composition\";\r\n /** Every node, the root included. Order is irrelevant — `parentId`/`layerOrder` carry the structure. */\r\n nodes: TimedNodeSpec[];\r\n /** Values props bind to with an expression, and that `variableTo`/`variableSet` may drive. */\r\n variables?: VariableSpec[];\r\n /** Every command. Order in the array is irrelevant; `at` is the placement. */\r\n commands: CommandSpec[];\r\n /**\r\n * Colour tokens and typography presets this clip resolves against.\r\n *\r\n * On the clip, not only on the project, because a theme is part of what a\r\n * clip *looks like* — a lower third in a brand's palette is that document,\r\n * not that document plus a setting a host remembered to pass alongside it.\r\n * A project's own `theme` is the default for clips that declare none.\r\n */\r\n theme?: Theme;\r\n\r\n /**\r\n * Total length in seconds. Defaults to the last moment anything happens — a\r\n * command's end, or a node's start or finite end — which is what you want\r\n * almost always; set it to hold on the final frame, or to cut a scene short.\r\n */\r\n duration?: number;\r\n}\r\n\r\n/**\r\n * An **audio document**: a bus tree placed in time, and the commands that move\r\n * it.\r\n *\r\n * The audio counterpart to {@link CompositionDocument}, and it reads the same\r\n * way for the same reason — when a sound starts is its node's `startAt`, not a\r\n * consequence of running something.\r\n *\r\n * The root is implicit, on the same convention a composition uses for its\r\n * `canvas2d`: `targetId: null` on a command, and `parentId: null` on a node,\r\n * name *this document's own root bus* — the row with `id: \"\"` and\r\n * `type: \"audioBus\"`. Omitting it gets the default one.\r\n *\r\n * There is deliberately no \"still\" case for audio: unlike a picture, sound with\r\n * no timeline is silence, so the degenerate case is not worth a document kind.\r\n */\r\nexport interface AudioDocument {\r\n kind: \"audio\";\r\n /** Every node, the root bus included. */\r\n nodes: TimedNodeSpec[];\r\n /** Values props bind to with an expression, and that `variableTo`/`variableSet` may drive. */\r\n variables?: VariableSpec[];\r\n /** Every command. Order in the array is irrelevant; `at` is the placement. */\r\n commands: CommandSpec[];\r\n /** Defaults to the last moment anything happens, same rule as {@link CompositionDocument}. */\r\n duration?: number;\r\n}\r\n\r\n/** Either **visual** document kind — the two that draw. */\r\nexport type VisualDocument = StillDocument | CompositionDocument;\r\n\r\n/**\r\n * Anything a project track can play: a picture, or sound.\r\n *\r\n * One union rather than two lists, because a track is a placement and a\r\n * placement does not care which. A composition already carries both halves —\r\n * its `canvas2d` root takes audio children as readily as visual ones — so an\r\n * {@link AudioDocument} is not \"the audio track kind\", it is the clip you reach\r\n * for when there is no picture to go with the sound.\r\n */\r\nexport type ClipDocument = VisualDocument | AudioDocument;\r\n\r\n/** Narrows a {@link VisualDocument} to a still. */\r\nexport function isStillDocument(doc: VisualDocument): doc is StillDocument {\r\n return doc.kind === \"still\";\r\n}\r\n\r\n/** Narrows a {@link VisualDocument} to a composition. */\r\nexport function isCompositionDocument(doc: VisualDocument): doc is CompositionDocument {\r\n return doc.kind === \"composition\";\r\n}\r\n\r\n/** Narrows a {@link ClipDocument} to an audio document. */\r\nexport function isAudioDocument(doc: ClipDocument): doc is AudioDocument {\r\n return doc.kind === \"audio\";\r\n}\r\n\r\n/** Narrows a {@link ClipDocument} to one that has a clock — anything but a still. */\r\nexport function hasTimeline(doc: ClipDocument): doc is CompositionDocument | AudioDocument {\r\n return doc.kind !== \"still\";\r\n}\r\n\r\n/**\r\n * The id the scene root answers to — the empty string, a real id rather than a\r\n * missing one. A host storing its root under some other id maps it here at the\r\n * one boundary its rows become a document.\r\n */\r\nexport const ROOT_NODE_ID = \"\";\r\n\r\n/** When a node is in the tree. `end` is `Infinity` for a node that never leaves. */\r\nexport interface NodeSpan {\r\n start: number;\r\n end: number;\r\n}\r\n\r\n/** A node's own span, as declared. A still's node — no span fields — is present always. */\r\nexport function nodeSpan(spec: NodeSpec | TimedNodeSpec): NodeSpan {\r\n const timed = spec as TimedNodeSpec;\r\n return { start: timed.startAt ?? 0, end: timed.endAt ?? Infinity };\r\n}\r\n\r\n/**\r\n * When a node is actually drawn: its own span intersected with every ancestor's.\r\n *\r\n * A child hangs off its parent, so it cannot outlive it — this is what the\r\n * runtime already does, and what an editor drawing a clipped bar or a validator\r\n * asking \"is the target there\" should read. Empty (`start >= end`) when the\r\n * spans never overlap; `undefined` for an id no row declares.\r\n */\r\nexport function effectiveSpan(nodes: readonly (NodeSpec | TimedNodeSpec)[], id: string): NodeSpan | undefined {\r\n return effectiveSpanIn(new Map(nodes.map((n) => [n.id, n])), id);\r\n}\r\n\r\n/**\r\n * {@link effectiveSpan} for every row at once, each ancestor chain walked once\r\n * however many descendants share it.\r\n */\r\nexport function effectiveSpans(nodes: readonly (NodeSpec | TimedNodeSpec)[]): Map<string, NodeSpan> {\r\n const byId = new Map(nodes.map((n) => [n.id, n]));\r\n const spans = new Map<string, NodeSpan>();\r\n const chain: (NodeSpec | TimedNodeSpec)[] = [];\r\n const inChain = new Set<string>();\r\n for (const start of byId.values()) {\r\n if (spans.has(start.id)) continue;\r\n chain.length = 0;\r\n inChain.clear();\r\n let above: NodeSpan | undefined;\r\n let spec: NodeSpec | TimedNodeSpec | undefined = start;\r\n while (spec) {\r\n const known = spans.get(spec.id);\r\n if (known) {\r\n above = known;\r\n break;\r\n }\r\n if (inChain.has(spec.id)) {\r\n // A parent cycle has no top to fold down from; an invalid document\r\n // gets the single-id answer for each member instead.\r\n for (const member of chain) spans.set(member.id, effectiveSpanIn(byId, member.id)!);\r\n chain.length = 0;\r\n break;\r\n }\r\n chain.push(spec);\r\n inChain.add(spec.id);\r\n spec = spec.parentId === null ? undefined : byId.get(spec.parentId);\r\n }\r\n for (let i = chain.length - 1; i >= 0; i--) {\r\n const span = nodeSpan(chain[i]);\r\n if (above) {\r\n span.start = Math.max(span.start, above.start);\r\n span.end = Math.min(span.end, above.end);\r\n }\r\n spans.set(chain[i].id, span);\r\n above = span;\r\n }\r\n }\r\n return spans;\r\n}\r\n\r\n/** @internal {@link effectiveSpan} over an id map a caller already holds. */\r\nexport function effectiveSpanIn(\r\n byId: ReadonlyMap<string, NodeSpec | TimedNodeSpec>,\r\n id: string,\r\n): NodeSpan | undefined {\r\n let spec = byId.get(id);\r\n if (!spec) return undefined;\r\n const span = nodeSpan(spec);\r\n const seen = new Set<string>();\r\n while (spec.parentId !== null && !seen.has(spec.id)) {\r\n seen.add(spec.id);\r\n const parent = byId.get(spec.parentId);\r\n if (!parent) break;\r\n const own = nodeSpan(parent);\r\n span.start = Math.max(span.start, own.start);\r\n span.end = Math.min(span.end, own.end);\r\n spec = parent;\r\n }\r\n return span;\r\n}\r\n\r\n/** A node with its span dropped — what a timed node becomes when it lands in a still. */\r\nexport function untimed(spec: NodeSpec | TimedNodeSpec): NodeSpec {\r\n const { startAt: _startAt, endAt: _endAt, ...rest } = spec as TimedNodeSpec;\r\n return rest;\r\n}\r\n\r\n/**\r\n * Seconds a command occupies: one pass, or every pass of a counted loop.\r\n *\r\n * An unlimited loop counts as **one** pass. It has no length of its own — it\r\n * runs for as long as there is clip — so letting it answer here would be a\r\n * command asking for a scene as long as it wants, which is a scene that can\r\n * never end.\r\n */\r\nexport function commandSpan(command: CommandSpec): number {\r\n const duration = command.duration ?? 0;\r\n if (duration <= 0 || !command.loop || command.loop.count === null) return duration;\r\n return duration * loopPasses(command.loop);\r\n}\r\n\r\n/**\r\n * How long a clip runs: its declared `duration`, else the last moment anything in\r\n * it happens — a command's end, or a node's arrival or finite departure. A still\r\n * has none.\r\n */\r\nexport function documentDuration(doc: ClipDocument): number {\r\n if (!hasTimeline(doc)) return 0;\r\n if (doc.duration !== undefined) return doc.duration;\r\n let end = 0;\r\n for (const command of doc.commands) {\r\n end = Math.max(end, command.at + commandSpan(command));\r\n }\r\n for (const node of doc.nodes) {\r\n if (node.startAt !== undefined) end = Math.max(end, node.startAt);\r\n if (node.endAt !== undefined && Number.isFinite(node.endAt)) end = Math.max(end, node.endAt);\r\n }\r\n return end;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/document/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAiB,MAAM,cAAc,CAAC;AAoWzD,mDAAmD;AACnD,MAAM,UAAU,eAAe,CAAC,GAAmB;IAC/C,OAAO,GAAG,CAAC,IAAI,KAAK,OAAO,CAAC;AAChC,CAAC;AAED,yDAAyD;AACzD,MAAM,UAAU,qBAAqB,CAAC,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AClE,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;YAAE,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IACjG,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC","sourcesContent":["import type { EaseSpec } from \"@/tween/ease/spec\";\nimport { loopPasses, type LoopSpec } from \"@/tween/loop\";\nimport type { Theme } from \"@/project/config\";\n\n/**\n * Re-exported as part of the document vocabulary: a loop is stored on a\n * {@link CommandSpec} the way an {@link EaseSpec} is, but its arithmetic is a\n * tween concern and lives with the tweens (`tween/loop.ts`).\n */\nexport type { LoopDirection, LoopSpec } from \"@/tween/loop\";\n\n/**\n * The clip document: what a clip **is**, as data.\n *\n * A visual clip used to be a generator function, so the only way to know what frame N\n * looked like was to run frames 0..N-1. That made a whole class of host\n * impossible — a document cannot be stored, diffed, synced or evaluated out of\n * order when its meaning is \"whatever running this code does\". These types are\n * the replacement: a clip is rows, and a frame is a pure function of them.\n *\n * The split between what is data and what is code is deliberate and total:\n *\n * - **Nodes are code.** A node type is a class registered under a string key\n * (see `document/registry.ts`). That is the extension point — a custom node\n * with its own `property` declarations, its own `renderSelf`, its own\n * `command` methods — and it is where anything a JSON value cannot express\n * (a computed lookup table, a generated point cloud) belongs.\n * - **Documents are data.** Which nodes exist, what props they carry, and what\n * happens to them over time are plain JSON.\n *\n * Everything here is JSON-serializable by construction: no functions, no class\n * instances. A document round-trips through a file or a database column without\n * a mapping layer.\n */\n\n/**\n * One node, as a row.\n *\n * Flat rather than nested, for two reasons that both bite immediately\n * otherwise: a command addresses its target by `id`, and a nested tree makes\n * \"move this node under that one\" a structural rewrite rather than a\n * single-field edit. It is also the shape a relational store already wants —\n * `parentId` is a self-referencing foreign key.\n *\n * The scene root is not special-cased here: it is the one row with\n * `id: \"\"`, `type: \"canvas2d\"` and `parentId: null` — see\n * {@link CommandSpec.targetId}.\n */\nexport interface NodeSpec {\n /** Stable identity. Command targets resolve to it; it survives reordering. */\n id: string;\n /**\n * Registry key of the node's class — `\"rect\"`, `\"text\"`, `\"canvas3d\"`, or\n * whatever a custom node registered itself as. A key the registry lacks\n * builds as an inert placeholder that keeps the row's id, props and\n * children and is reported in `buildErrors` (`missing-node.ts`), so one\n * missing component costs one node rather than the clip; `validateDocument`\n * with a registry reports it up front.\n */\n type: string;\n /**\n * The handle an **expression** names this node by: `\"=[card.x]\"` reads the\n * `x` of the node keyed `card`. See {@link CompositionDocument} and\n * `document/expression/`.\n *\n * Optional and **never generated**, unlike {@link id} — a node has one\n * because an author wrote one, which is what makes it safe to point a\n * formula at. Unique per document all the same: a second `card` would make\n * `[card.x]` mean whichever row was read last. It is a *reference*, not an\n * address — a `parentId` or a `targetId` is always an {@link id}, so there is\n * exactly one way to say which node and one way to say which handle.\n *\n * Not a display label. A host that wants one keeps it, since nothing here\n * reads it.\n */\n key?: string;\n /** Parent node id, or `null` for a direct child of the scene root. */\n parentId: string | null;\n /**\n * Position among siblings. Load-bearing rather than cosmetic: a `row`/\n * `column` parent lays its children out in exactly this order.\n */\n layerOrder: number;\n /**\n * Authored props, **sparse** — only what differs from the type's declared\n * defaults. A freshly created node is `{}`, which is what keeps a document\n * diff small and lets a change to a default actually reach existing\n * documents.\n */\n props: Record<string, unknown>;\n}\n\n/**\n * A {@link NodeSpec} placed on a clip's clock: present from {@link startAt} until\n * {@link endAt}.\n *\n * The span is a field of the node rather than a pair of commands, so a node is\n * the same row whether a still or a composition holds it — moving a subtree\n * between the two is dropping or adding these two fields, never rewriting rows.\n * Not `start`/`end`: a painted node already owns those as path-trim props.\n */\nexport interface TimedNodeSpec extends NodeSpec {\n /** Seconds from the clip's start at which the node enters the tree. Absent is `0`. */\n startAt?: number;\n /** Seconds at which it leaves. Absent is never — it stays to the clip's end. */\n endAt?: number;\n}\n\n/**\n * A **variable**: a value with a name, in neither the tree nor the command list.\n *\n * The thing that exists purely so a change can happen in *one* place. Twelve\n * nodes fading together used to be twelve `to` commands whose `at` and\n * `duration` had to be kept equal by hand; with a variable it is one\n * `variableTo` and twelve props bound to `\"=[fade]\"`.\n *\n * Every document kind declares them the same way, in `variables`. On a still\n * nothing can change one, so it is a fixed value; on a composition a\n * `variableTo`/`variableSet` command may drive it. A variable has no presence\n * span: an expression naming one that \"does not exist yet\" is a broken document,\n * so a variable holds its declared {@link value} from t=0 until a command\n * changes it.\n *\n * Nothing reads a variable except an expression (`document/expression/`), and an\n * expression can only appear in a prop — so a variable cannot read another\n * variable, and no chain of them can cycle. A prop reading another node's prop\n * (`[key.x]`) is the case that can, and `validate.ts` refuses it.\n */\nexport interface VariableSpec {\n /**\n * Stable identity. Commands target it, and `[id]` in an expression names\n * it — one key, not two, so there is nothing to keep in sync.\n */\n id: string;\n /** A display label for a host's UI. Expressions never see it. */\n name?: string;\n /**\n * What it holds before anything changes it, and the value type every\n * command that writes it is expected to produce.\n *\n * Any JSON value. A number is the common case, but a colour string, a\n * `Vector2` or a whole fill object all work — a lone `\"=[x]\"` hands the\n * value through untouched, so a variable is as expressive as the prop it\n * drives.\n */\n value: unknown;\n /**\n * How it interpolates, by registry key — `\"number\"`, `\"vector2\"`,\n * `\"vector3\"`, `\"color\"`, `\"step\"`, or anything `Registry.addLerp`\n * added. A command may override it per tween.\n *\n * Absent means `\"number\"` for a numeric {@link value} and `\"step\"` for\n * anything else: snap at the end rather than interpolate garbage.\n */\n lerp?: string;\n}\n\n/** How a command eases, as data — resolved to an `EasingFunction` once, at compile time. */\nexport type { EaseSpec } from \"@/tween/ease/spec\";\n\n/**\n * One command, **placed on the timeline**.\n *\n * The placement is the whole idea. A generator expressed sequencing by\n * suspending — running `a` to completion before `b` began — which is why order\n * of evaluation was order of execution, and why seeking backwards meant\n * starting over. A command\n * carries its own `at`, so:\n *\n * - **sequence** is `b.at === a.at + a.duration`,\n * - **parallel** is two commands sharing an `at`,\n * - **wait** is a gap between them.\n *\n * There are no `sequence`/`parallel`/`wait` primitives any more because there\n * is nothing left for them to do. And because every command's span is declared\n * rather than discovered, the scene's duration, its asset windows and each\n * node's lifespan are all readable straight off the document — see\n * `runtime/analysis.ts`.\n */\nexport interface CommandSpec {\n /** Stable identity, so a host can address and reorder one command. */\n id: string;\n /**\n * Registry key of the command — `\"to\"`, `\"set\"`, `\"variableTo\"`, or any\n * `command()` method a node class exposes (`\"moveTo\"`, `\"fillTo\"`,\n * `\"countTo\"`, …). See `document/registry.ts`. A command changes what a\n * node holds, never whether it exists — that is its {@link TimedNodeSpec} span.\n */\n type: string;\n /**\n * The node this command acts on, or `null` for the scene root — the\n * `Canvas2D` that is simultaneously the scene's layout frame, its\n * background paint and its camera (the node with `id: \"\"`,\n * `type: \"canvas2d\"`).\n *\n * A **variable** command (`\"variableTo\"`, `\"variableSet\"`) names a\n * {@link VariableSpec} here instead. The command type says which table the\n * id is looked up in, so there is no prefix to write; ids are required to be\n * unique across nodes and variables so a host grouping its timeline rows by\n * `targetId` cannot conflate the two.\n */\n targetId: string | null;\n /**\n * Seconds from the scene's start at which the command begins.\n *\n * Seconds rather than a frame index because a document has to survive an\n * fps change: the same scene rendered at 30 and at 60 must be the same\n * animation, not the same integers. Frames are derived (`at * fps`).\n */\n at: number;\n /**\n * Seconds **one pass** takes. Absent or `0` is a stamp — it applies at once.\n *\n * One pass rather than the whole span, so that {@link loop}ing a command\n * repeats it instead of squeezing the same motion into the same time: a\n * two-second spin repeated three times runs for six seconds and each turn\n * still takes two. The span is {@link commandSpan}.\n */\n duration?: number;\n /** How it eases, per pass. Absent means the command's own default. */\n easing?: EaseSpec;\n /**\n * How it repeats. Absent runs it once.\n *\n * A placement field beside {@link at} and {@link duration} rather than\n * something inside {@link args}, because repeating is not any one command's\n * business: the runtime wraps the *built* command, so `to`, `fillTo`,\n * `countTo` and a node's own `command()` all loop by the same code and a\n * newly written command type gets it for free.\n */\n loop?: LoopSpec;\n /**\n * The command's arguments. Shape is per command type: `\"to\"`/`\"set\"`'s *is*\n * the props diff, `\"variableTo\"`'s carries the `value`, a named command\n * carries its leading arguments by parameter name. Never wrapped in an extra\n * key for a command with exactly one argument.\n */\n args: Record<string, unknown>;\n}\n\n/**\n * A **still**: a node tree and nothing else.\n *\n * One frame, no timeline, no commands. It is its own document type rather than\n * \"an animation nobody ran\" because the two are edited by different tools and\n * validated by different rules — a still carrying a duration, or a half-applied\n * tween, is a document that should never have been representable.\n *\n * The scene root — `fill`, `overlay`, `flow`, `align`, `padding`, the camera\n * (`zoom`, `origin`, `heading`) — is not a separate field: it is the row in\n * {@link nodes} with `id: \"\"` and `type: \"canvas2d\"`. Omitting it gets the\n * default root.\n */\nexport interface StillDocument {\n kind: \"still\";\n /** The format it was written in — see `migrate.ts`. Absent is format 0, every document written before the field existed. */\n formatVersion?: number;\n /** Every node in the scene, including the root. Order here is irrelevant — `parentId`/`layerOrder` carry the structure. */\n nodes: NodeSpec[];\n /** Values props bind to with an expression. Fixed here — nothing on a still changes one. */\n variables?: VariableSpec[];\n /**\n * Colour tokens and typography presets this clip resolves against.\n *\n * On the clip, not only on the project, because a theme is part of what a\n * clip *looks like* — a lower third in a brand's palette is that document,\n * not that document plus a setting a host remembered to pass alongside it.\n * A project's own `theme` is the default for clips that declare none.\n */\n theme?: Theme;\n}\n\n/**\n * A **composition**: a still's node tree, placed in time, and the commands that\n * animate it.\n *\n * The nodes are the same rows a still holds, each with its own span, so when a\n * node appears is one editable field rather than an implicit consequence of\n * where a `stage.add(...)` sat in a function body — and a subtree lifted out of\n * a still drops in here unchanged.\n *\n * The scene root is the row in {@link nodes} with `id: \"\"` and\n * `type: \"canvas2d\"`, as on a still. Omitting it gets the default root; a\n * command targeting `null` animates it like any other node.\n */\nexport interface CompositionDocument {\n kind: \"composition\";\n /** The format it was written in — see `migrate.ts`. Absent is format 0, every document written before the field existed. */\n formatVersion?: number;\n /** Every node, the root included. Order is irrelevant — `parentId`/`layerOrder` carry the structure. */\n nodes: TimedNodeSpec[];\n /** Values props bind to with an expression, and that `variableTo`/`variableSet` may drive. */\n variables?: VariableSpec[];\n /** Every command. Order in the array is irrelevant; `at` is the placement. */\n commands: CommandSpec[];\n /**\n * Colour tokens and typography presets this clip resolves against.\n *\n * On the clip, not only on the project, because a theme is part of what a\n * clip *looks like* — a lower third in a brand's palette is that document,\n * not that document plus a setting a host remembered to pass alongside it.\n * A project's own `theme` is the default for clips that declare none.\n */\n theme?: Theme;\n\n /**\n * Total length in seconds. Defaults to the last moment anything happens — a\n * command's end, or a node's start or finite end — which is what you want\n * almost always; set it to hold on the final frame, or to cut a scene short.\n */\n duration?: number;\n}\n\n/**\n * An **audio document**: a bus tree placed in time, and the commands that move\n * it.\n *\n * The audio counterpart to {@link CompositionDocument}, and it reads the same\n * way for the same reason — when a sound starts is its node's `startAt`, not a\n * consequence of running something.\n *\n * The root is implicit, on the same convention a composition uses for its\n * `canvas2d`: `targetId: null` on a command, and `parentId: null` on a node,\n * name *this document's own root bus* — the row with `id: \"\"` and\n * `type: \"audioBus\"`. Omitting it gets the default one.\n *\n * There is deliberately no \"still\" case for audio: unlike a picture, sound with\n * no timeline is silence, so the degenerate case is not worth a document kind.\n */\nexport interface AudioDocument {\n kind: \"audio\";\n /** The format it was written in — see `migrate.ts`. Absent is format 0, every document written before the field existed. */\n formatVersion?: number;\n /** Every node, the root bus included. */\n nodes: TimedNodeSpec[];\n /** Values props bind to with an expression, and that `variableTo`/`variableSet` may drive. */\n variables?: VariableSpec[];\n /** Every command. Order in the array is irrelevant; `at` is the placement. */\n commands: CommandSpec[];\n /** Defaults to the last moment anything happens, same rule as {@link CompositionDocument}. */\n duration?: number;\n}\n\n/** Either **visual** document kind — the two that draw. */\nexport type VisualDocument = StillDocument | CompositionDocument;\n\n/**\n * Anything a project track can play: a picture, or sound.\n *\n * One union rather than two lists, because a track is a placement and a\n * placement does not care which. A composition already carries both halves —\n * its `canvas2d` root takes audio children as readily as visual ones — so an\n * {@link AudioDocument} is not \"the audio track kind\", it is the clip you reach\n * for when there is no picture to go with the sound.\n */\nexport type ClipDocument = VisualDocument | AudioDocument;\n\n/** Narrows a {@link VisualDocument} to a still. */\nexport function isStillDocument(doc: VisualDocument): doc is StillDocument {\n return doc.kind === \"still\";\n}\n\n/** Narrows a {@link VisualDocument} to a composition. */\nexport function isCompositionDocument(doc: VisualDocument): doc is CompositionDocument {\n return doc.kind === \"composition\";\n}\n\n/** Narrows a {@link ClipDocument} to an audio document. */\nexport function isAudioDocument(doc: ClipDocument): doc is AudioDocument {\n return doc.kind === \"audio\";\n}\n\n/** Narrows a {@link ClipDocument} to one that has a clock — anything but a still. */\nexport function hasTimeline(doc: ClipDocument): doc is CompositionDocument | AudioDocument {\n return doc.kind !== \"still\";\n}\n\n/**\n * The id the scene root answers to — the empty string, a real id rather than a\n * missing one. A host storing its root under some other id maps it here at the\n * one boundary its rows become a document.\n */\nexport const ROOT_NODE_ID = \"\";\n\n/** When a node is in the tree. `end` is `Infinity` for a node that never leaves. */\nexport interface NodeSpan {\n start: number;\n end: number;\n}\n\n/** A node's own span, as declared. A still's node — no span fields — is present always. */\nexport function nodeSpan(spec: NodeSpec | TimedNodeSpec): NodeSpan {\n const timed = spec as TimedNodeSpec;\n return { start: timed.startAt ?? 0, end: timed.endAt ?? Infinity };\n}\n\n/**\n * When a node is actually drawn: its own span intersected with every ancestor's.\n *\n * A child hangs off its parent, so it cannot outlive it — this is what the\n * runtime already does, and what an editor drawing a clipped bar or a validator\n * asking \"is the target there\" should read. Empty (`start >= end`) when the\n * spans never overlap; `undefined` for an id no row declares.\n */\nexport function effectiveSpan(nodes: readonly (NodeSpec | TimedNodeSpec)[], id: string): NodeSpan | undefined {\n return effectiveSpanIn(new Map(nodes.map((n) => [n.id, n])), id);\n}\n\n/**\n * {@link effectiveSpan} for every row at once, each ancestor chain walked once\n * however many descendants share it.\n */\nexport function effectiveSpans(nodes: readonly (NodeSpec | TimedNodeSpec)[]): Map<string, NodeSpan> {\n const byId = new Map(nodes.map((n) => [n.id, n]));\n const spans = new Map<string, NodeSpan>();\n const chain: (NodeSpec | TimedNodeSpec)[] = [];\n const inChain = new Set<string>();\n for (const start of byId.values()) {\n if (spans.has(start.id)) continue;\n chain.length = 0;\n inChain.clear();\n let above: NodeSpan | undefined;\n let spec: NodeSpec | TimedNodeSpec | undefined = start;\n while (spec) {\n const known = spans.get(spec.id);\n if (known) {\n above = known;\n break;\n }\n if (inChain.has(spec.id)) {\n // A parent cycle has no top to fold down from; an invalid document\n // gets the single-id answer for each member instead.\n for (const member of chain) spans.set(member.id, effectiveSpanIn(byId, member.id)!);\n chain.length = 0;\n break;\n }\n chain.push(spec);\n inChain.add(spec.id);\n spec = spec.parentId === null ? undefined : byId.get(spec.parentId);\n }\n for (let i = chain.length - 1; i >= 0; i--) {\n const span = nodeSpan(chain[i]);\n if (above) {\n span.start = Math.max(span.start, above.start);\n span.end = Math.min(span.end, above.end);\n }\n spans.set(chain[i].id, span);\n above = span;\n }\n }\n return spans;\n}\n\n/** @internal {@link effectiveSpan} over an id map a caller already holds. */\nexport function effectiveSpanIn(\n byId: ReadonlyMap<string, NodeSpec | TimedNodeSpec>,\n id: string,\n): NodeSpan | undefined {\n let spec = byId.get(id);\n if (!spec) return undefined;\n const span = nodeSpan(spec);\n const seen = new Set<string>();\n while (spec.parentId !== null && !seen.has(spec.id)) {\n seen.add(spec.id);\n const parent = byId.get(spec.parentId);\n if (!parent) break;\n const own = nodeSpan(parent);\n span.start = Math.max(span.start, own.start);\n span.end = Math.min(span.end, own.end);\n spec = parent;\n }\n return span;\n}\n\n/** A node with its span dropped — what a timed node becomes when it lands in a still. */\nexport function untimed(spec: NodeSpec | TimedNodeSpec): NodeSpec {\n const { startAt: _startAt, endAt: _endAt, ...rest } = spec as TimedNodeSpec;\n return rest;\n}\n\n/**\n * Seconds a command occupies: one pass, or every pass of a counted loop.\n *\n * An unlimited loop counts as **one** pass. It has no length of its own — it\n * runs for as long as there is clip — so letting it answer here would be a\n * command asking for a scene as long as it wants, which is a scene that can\n * never end.\n */\nexport function commandSpan(command: CommandSpec): number {\n const duration = command.duration ?? 0;\n if (duration <= 0 || !command.loop || command.loop.count === null) return duration;\n return duration * loopPasses(command.loop);\n}\n\n/**\n * How long a clip runs: its declared `duration`, else the last moment anything in\n * it happens — a command's end, or a node's arrival or finite departure. A still\n * has none.\n */\nexport function documentDuration(doc: ClipDocument): number {\n if (!hasTimeline(doc)) return 0;\n if (doc.duration !== undefined) return doc.duration;\n let end = 0;\n for (const command of doc.commands) {\n end = Math.max(end, command.at + commandSpan(command));\n }\n for (const node of doc.nodes) {\n if (node.startAt !== undefined) end = Math.max(end, node.startAt);\n if (node.endAt !== undefined && Number.isFinite(node.endAt)) end = Math.max(end, node.endAt);\n }\n return end;\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Registry } from "./registry.js";
|
|
1
2
|
import type { ClipDocument } from "./types.js";
|
|
2
3
|
/**
|
|
3
4
|
* Schema validation for a {@link VisualDocument}.
|
|
@@ -11,7 +12,9 @@ import type { ClipDocument } from "./types.js";
|
|
|
11
12
|
* the node class's business — it declares that with `property`, and it is
|
|
12
13
|
* checked where it is applied. What can only be checked here is what spans
|
|
13
14
|
* rows: that a parent exists, that the tree has no cycle, that a command's
|
|
14
|
-
* target is present when the command runs.
|
|
15
|
+
* target is present when the command runs. Audio rows are the exception: a
|
|
16
|
+
* ramp or a transition is JSON their nodes read unchecked, and one a device
|
|
17
|
+
* cannot schedule fails long after the document was accepted.
|
|
15
18
|
*/
|
|
16
19
|
/** One problem with a document. `path` locates it, JSON-Pointer style. */
|
|
17
20
|
export interface ValidationIssue {
|
|
@@ -20,6 +23,15 @@ export interface ValidationIssue {
|
|
|
20
23
|
/** What is wrong, in a sentence a host can show. */
|
|
21
24
|
message: string;
|
|
22
25
|
}
|
|
26
|
+
/** What {@link validateDocument} checks against beyond the format itself. */
|
|
27
|
+
export interface ValidateOptions {
|
|
28
|
+
/**
|
|
29
|
+
* Also report every node type and command this registry cannot build — the
|
|
30
|
+
* strict check a build no longer makes, since a build stands an inert
|
|
31
|
+
* placeholder in for an unknown type and skips an unknown command.
|
|
32
|
+
*/
|
|
33
|
+
registry?: Registry;
|
|
34
|
+
}
|
|
23
35
|
/** The result of {@link validateDocument}. */
|
|
24
36
|
export interface ValidationResult {
|
|
25
37
|
valid: boolean;
|
|
@@ -32,7 +44,7 @@ export interface ValidationResult {
|
|
|
32
44
|
* document's problems wants the list, and a fix-one-rerun loop over a large
|
|
33
45
|
* scene is what makes an importer feel broken.
|
|
34
46
|
*/
|
|
35
|
-
export declare function validateDocument(doc: unknown): ValidationResult;
|
|
47
|
+
export declare function validateDocument(doc: unknown, options?: ValidateOptions): ValidationResult;
|
|
36
48
|
/**
|
|
37
49
|
* Validate a **project** document: the tracks, and every clip in them.
|
|
38
50
|
*
|
|
@@ -41,12 +53,12 @@ export declare function validateDocument(doc: unknown): ValidationResult;
|
|
|
41
53
|
* prefixed by the track that carries it, so a host can point at the row rather
|
|
42
54
|
* than at "some clip".
|
|
43
55
|
*/
|
|
44
|
-
export declare function validateProjectDocument(doc: unknown): ValidationResult;
|
|
56
|
+
export declare function validateProjectDocument(doc: unknown, options?: ValidateOptions): ValidationResult;
|
|
45
57
|
/** {@link validateProjectDocument}, but throwing. */
|
|
46
|
-
export declare function assertValidProjectDocument(doc: unknown): void;
|
|
58
|
+
export declare function assertValidProjectDocument(doc: unknown, options?: ValidateOptions): void;
|
|
47
59
|
/**
|
|
48
60
|
* {@link validateDocument}, but throwing. For a caller that has no UI to show
|
|
49
61
|
* issues in and wants the document or an error.
|
|
50
62
|
*/
|
|
51
|
-
export declare function assertValidDocument(doc: unknown): ClipDocument;
|
|
63
|
+
export declare function assertValidDocument(doc: unknown, options?: ValidateOptions): ClipDocument;
|
|
52
64
|
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/document/validate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/document/validate.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAER,YAAY,EASf,MAAM,SAAS,CAAC;AAGjB;;;;;;;;;;;;;;;GAeG;AAEH,0EAA0E;AAC1E,MAAM,WAAW,eAAe;IAC5B,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,6EAA6E;AAC7E,MAAM,WAAW,eAAe;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACvB;AAED,8CAA8C;AAC9C,MAAM,WAAW,gBAAgB;IAC7B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,eAAe,EAAE,CAAC;CAC7B;AAo0BD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,GAAE,eAAoB,GAAG,gBAAgB,CAuB9F;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,GAAE,eAAoB,GAAG,gBAAgB,CA0ErG;AAmBD,qDAAqD;AACrD,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,IAAI,CAMxF;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,YAAY,CAOzF"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { isEaseCurve } from "../tween/ease/curve.js";
|
|
2
|
+
import { EASE_KINDS } from "../tween/ease/spec.js";
|
|
2
3
|
import { expressionOps } from "./expression/ops.js";
|
|
4
|
+
import { DOCUMENT_FORMAT_VERSION } from "./migrate.js";
|
|
3
5
|
import { effectiveSpanIn } from "./types.js";
|
|
4
|
-
const EASE_KINDS = new Set(["linear", "in", "out", "inOut", "custom"]);
|
|
5
6
|
const LOOP_DIRECTIONS = new Set(["normal", "reverse", "alternate"]);
|
|
6
7
|
function isPlainObject(v) {
|
|
7
8
|
return typeof v === "object" && v !== null && !Array.isArray(v);
|
|
@@ -32,6 +33,80 @@ function checkEase(ease, path, issues) {
|
|
|
32
33
|
});
|
|
33
34
|
}
|
|
34
35
|
}
|
|
36
|
+
/** An audio ease runs on a device with no `Registry`, so a custom one has to be its drawn curve. */
|
|
37
|
+
function checkAudioEase(ease, path, issues) {
|
|
38
|
+
checkEase(ease, path, issues);
|
|
39
|
+
if (isPlainObject(ease) && ease.kind === "custom" && !isEaseCurve(ease.args)) {
|
|
40
|
+
issues.push({ path: `${path}.args`, message: "an audio ease cannot name a registered ease; draw its curve (two or more `{ x, y }` points) instead." });
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function checkParam(value, path, issues) {
|
|
44
|
+
if (value === undefined || (typeof value === "number" && Number.isFinite(value)) || expressionOps.isSource(value))
|
|
45
|
+
return;
|
|
46
|
+
if (!isPlainObject(value) || !Array.isArray(value.keys)) {
|
|
47
|
+
issues.push({ path, message: "must be a finite number, an expression or a ramp, `{ keys: [{ at, value }, …] }`." });
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
value.keys.forEach((key, i) => {
|
|
51
|
+
const at = `${path}.keys[${i}]`;
|
|
52
|
+
if (!isPlainObject(key)) {
|
|
53
|
+
issues.push({ path: at, message: "a ramp key must be an object." });
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if ((key.at === undefined) === (key.before === undefined) || !isTime(key.at ?? key.before)) {
|
|
57
|
+
issues.push({ path: at, message: "a ramp key needs exactly one of `at` (seconds after the start) or `before` (seconds before the end), >= 0." });
|
|
58
|
+
}
|
|
59
|
+
if (typeof key.value !== "number" || !Number.isFinite(key.value)) {
|
|
60
|
+
issues.push({ path: `${at}.value`, message: "a ramp key's value must be a finite number." });
|
|
61
|
+
}
|
|
62
|
+
checkAudioEase(key.ease, `${at}.ease`, issues);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
const TRANSITION_KEYS = new Set(["duration", "curve"]);
|
|
66
|
+
function checkTransition(transition, path, issues) {
|
|
67
|
+
if (transition === undefined)
|
|
68
|
+
return;
|
|
69
|
+
if (!isPlainObject(transition)) {
|
|
70
|
+
issues.push({ path, message: "a transition must be an object, `{ duration, curve? }`." });
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (!isTime(transition.duration)) {
|
|
74
|
+
issues.push({ path: `${path}.duration`, message: "a transition's duration must be a finite number of seconds >= 0." });
|
|
75
|
+
}
|
|
76
|
+
if (transition.curve !== undefined && transition.curve !== "equalPower")
|
|
77
|
+
checkAudioEase(transition.curve, `${path}.curve`, issues);
|
|
78
|
+
for (const key of Object.keys(transition)) {
|
|
79
|
+
if (!TRANSITION_KEYS.has(key))
|
|
80
|
+
issues.push({ path: `${path}.${key}`, message: `a transition has no "${key}" (yet): only duration and curve.` });
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function checkAudioProps(type, props, path, issues) {
|
|
84
|
+
if ("filters" in props) {
|
|
85
|
+
issues.push({ path: `${path}.filters`, message: "audio `filters` was renamed to `effects`." });
|
|
86
|
+
}
|
|
87
|
+
for (const name of ["volume", "pan", ...(type === "sound" ? ["speed"] : [])])
|
|
88
|
+
checkParam(props[name], `${path}.${name}`, issues);
|
|
89
|
+
if (type === "sound" && props.loop === true && isPlainObject(props.speed)) {
|
|
90
|
+
issues.push({ path: `${path}.speed`, message: "a looping sound cannot ramp its speed: there is no one pass of the source for the ramp to run over." });
|
|
91
|
+
}
|
|
92
|
+
const effects = props.effects;
|
|
93
|
+
if (effects !== undefined) {
|
|
94
|
+
const list = Array.isArray(effects) ? effects : [effects];
|
|
95
|
+
list.forEach((effect, i) => {
|
|
96
|
+
const at = Array.isArray(effects) ? `${path}.effects[${i}]` : `${path}.effects`;
|
|
97
|
+
if (!isPlainObject(effect) || typeof effect.type !== "string") {
|
|
98
|
+
issues.push({ path: at, message: "an effect must be an object with a `type`." });
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
for (const [field, value] of Object.entries(effect)) {
|
|
102
|
+
if (field !== "type")
|
|
103
|
+
checkParam(value, `${at}.${field}`, issues);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
checkTransition(props.transitionIn, `${path}.transitionIn`, issues);
|
|
108
|
+
checkTransition(props.transitionOut, `${path}.transitionOut`, issues);
|
|
109
|
+
}
|
|
35
110
|
function checkLoop(loop, path, issues) {
|
|
36
111
|
if (loop === undefined)
|
|
37
112
|
return;
|
|
@@ -82,6 +157,9 @@ function checkNodeSpec(node, path, issues) {
|
|
|
82
157
|
issues.push({ path: `${path}.props`, message: "props must be an object (`{}` when nothing is set)." });
|
|
83
158
|
ok = false;
|
|
84
159
|
}
|
|
160
|
+
else if (type === "sound" || type === "audioBus") {
|
|
161
|
+
checkAudioProps(type, props, `${path}.props`, issues);
|
|
162
|
+
}
|
|
85
163
|
if (key !== undefined) {
|
|
86
164
|
if (typeof key !== "string" || key.length === 0) {
|
|
87
165
|
issues.push({ path: `${path}.key`, message: "key must be a non-empty string when present." });
|
|
@@ -471,6 +549,54 @@ function checkRetiredFields(doc, issues) {
|
|
|
471
549
|
});
|
|
472
550
|
}
|
|
473
551
|
}
|
|
552
|
+
/** A `formatVersion`, when present, is one this engine can read. Absent is format 0. */
|
|
553
|
+
function checkFormatVersion(doc, issues) {
|
|
554
|
+
const version = doc.formatVersion;
|
|
555
|
+
if (version === undefined)
|
|
556
|
+
return;
|
|
557
|
+
if (typeof version !== "number" || !Number.isInteger(version) || version < 0) {
|
|
558
|
+
issues.push({ path: "formatVersion", message: "formatVersion must be a whole number >= 0 when present." });
|
|
559
|
+
}
|
|
560
|
+
else if (version > DOCUMENT_FORMAT_VERSION) {
|
|
561
|
+
issues.push({
|
|
562
|
+
path: "formatVersion",
|
|
563
|
+
message: `format ${version} is newer than this engine reads (${DOCUMENT_FORMAT_VERSION}) — open it with a newer engine.`,
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
/** A project's fields from before `tracks` was the one list, and where each went. */
|
|
568
|
+
const RETIRED_PROJECT_FIELDS = {
|
|
569
|
+
visualTracks: "visual and audio tracks were merged into `tracks` — move each row there.",
|
|
570
|
+
audioTracks: "visual and audio tracks were merged into `tracks` — move each row there.",
|
|
571
|
+
backgrounds: "a background is a track — put it first in `tracks`.",
|
|
572
|
+
overlays: "an overlay is a track — put it last in `tracks`.",
|
|
573
|
+
commands: "a project has no commands — each clip carries its own.",
|
|
574
|
+
constants: "a project has no constants — declare `variables` in each clip.",
|
|
575
|
+
};
|
|
576
|
+
/** Every node type and command a clip names, against `registry`. */
|
|
577
|
+
function checkVocabulary(sites, commands, rootType, variables, registry, issues) {
|
|
578
|
+
const typeOf = new Map([["", rootType]]);
|
|
579
|
+
for (const site of sites) {
|
|
580
|
+
typeOf.set(site.spec.id, site.spec.type);
|
|
581
|
+
if (!registry.hasNode(site.spec.type)) {
|
|
582
|
+
issues.push({ path: `${site.path}.type`, message: `node type "${site.spec.type}" is not registered.` });
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
for (const { spec, path } of commands) {
|
|
586
|
+
if (registry.command(spec.type))
|
|
587
|
+
continue;
|
|
588
|
+
if (spec.targetId !== null && variables.has(spec.targetId)) {
|
|
589
|
+
issues.push({ path: `${path}.type`, message: `"${spec.type}" is not a variable command.` });
|
|
590
|
+
continue;
|
|
591
|
+
}
|
|
592
|
+
const type = typeOf.get(spec.targetId ?? "");
|
|
593
|
+
if (type === undefined || !registry.hasNode(type))
|
|
594
|
+
continue;
|
|
595
|
+
if (!registry.takesCommand(type, spec.type)) {
|
|
596
|
+
issues.push({ path: `${path}.type`, message: `node type "${type}" has no command "${spec.type}".` });
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
}
|
|
474
600
|
/**
|
|
475
601
|
* The node rows every clip kind shares, checked the same way whichever holds
|
|
476
602
|
* them — a cycle or a missing parent is the same bug in a still and a
|
|
@@ -509,7 +635,7 @@ function checkSpan(spec, path, issues) {
|
|
|
509
635
|
}
|
|
510
636
|
}
|
|
511
637
|
/** Validate a still: a node tree, and nothing about time. */
|
|
512
|
-
function validateStill(doc, issues) {
|
|
638
|
+
function validateStill(doc, issues, registry) {
|
|
513
639
|
checkRetiredFields(doc, issues);
|
|
514
640
|
if (doc.commands !== undefined) {
|
|
515
641
|
issues.push({
|
|
@@ -530,6 +656,8 @@ function validateStill(doc, issues) {
|
|
|
530
656
|
}
|
|
531
657
|
const ok = sites.map((s) => s.spec);
|
|
532
658
|
checkIdSpace(ok, variables, issues);
|
|
659
|
+
if (registry)
|
|
660
|
+
checkVocabulary(sites, [], "canvas2d", variables, registry, issues);
|
|
533
661
|
const keyed = checkNodeKeys(sites, issues);
|
|
534
662
|
const declared = new Set(variables.keys());
|
|
535
663
|
const keys = new Set(keyed.keys());
|
|
@@ -542,8 +670,8 @@ function validateStill(doc, issues) {
|
|
|
542
670
|
checkExpressionCycles(bound, issues);
|
|
543
671
|
}
|
|
544
672
|
/** Validate a composition: a still's rules over its nodes, plus their spans and the commands on them. */
|
|
545
|
-
function validateComposition(doc, issues) {
|
|
546
|
-
validateTimedDocument(doc, "canvas2d", issues);
|
|
673
|
+
function validateComposition(doc, issues, registry) {
|
|
674
|
+
validateTimedDocument(doc, "canvas2d", issues, registry);
|
|
547
675
|
}
|
|
548
676
|
/**
|
|
549
677
|
* Validate an audio document.
|
|
@@ -554,8 +682,8 @@ function validateComposition(doc, issues) {
|
|
|
554
682
|
* running before its target the same bug — and the same message — whichever
|
|
555
683
|
* kind of clip it appears in.
|
|
556
684
|
*/
|
|
557
|
-
function validateAudio(doc, issues) {
|
|
558
|
-
validateTimedDocument(doc, "audioBus", issues);
|
|
685
|
+
function validateAudio(doc, issues, registry) {
|
|
686
|
+
validateTimedDocument(doc, "audioBus", issues, registry);
|
|
559
687
|
}
|
|
560
688
|
/** Command types the format no longer has, and where what they did went. */
|
|
561
689
|
const RETIRED_COMMANDS = {
|
|
@@ -563,7 +691,7 @@ const RETIRED_COMMANDS = {
|
|
|
563
691
|
variable: "a variable is declared in `variables`.",
|
|
564
692
|
};
|
|
565
693
|
/** The shared body of {@link validateComposition} and {@link validateAudio}. */
|
|
566
|
-
function validateTimedDocument(doc, rootType, issues) {
|
|
694
|
+
function validateTimedDocument(doc, rootType, issues, registry) {
|
|
567
695
|
checkRetiredFields(doc, issues);
|
|
568
696
|
if (!Array.isArray(doc.commands)) {
|
|
569
697
|
issues.push({ path: "commands", message: "commands must be an array." });
|
|
@@ -609,6 +737,8 @@ function validateTimedDocument(doc, rootType, issues) {
|
|
|
609
737
|
// its declared value from t=0, so there is no "before it exists" to run
|
|
610
738
|
// ahead of. See `VariableSpec`.
|
|
611
739
|
const byId = new Map(nodes.map((n) => [n.id, n]));
|
|
740
|
+
if (registry)
|
|
741
|
+
checkVocabulary(nodeSites, valid, rootType, variables, registry, issues);
|
|
612
742
|
for (const { spec: c, path } of valid) {
|
|
613
743
|
if (c.targetId === null)
|
|
614
744
|
continue;
|
|
@@ -660,20 +790,22 @@ function validateTimedDocument(doc, rootType, issues) {
|
|
|
660
790
|
* document's problems wants the list, and a fix-one-rerun loop over a large
|
|
661
791
|
* scene is what makes an importer feel broken.
|
|
662
792
|
*/
|
|
663
|
-
export function validateDocument(doc) {
|
|
793
|
+
export function validateDocument(doc, options = {}) {
|
|
664
794
|
const issues = [];
|
|
665
795
|
if (!isPlainObject(doc)) {
|
|
666
796
|
return { valid: false, issues: [{ path: "", message: "document must be an object." }] };
|
|
667
797
|
}
|
|
798
|
+
checkFormatVersion(doc, issues);
|
|
799
|
+
const { registry } = options;
|
|
668
800
|
const kind = doc.kind;
|
|
669
801
|
if (kind === "still") {
|
|
670
|
-
validateStill(doc, issues);
|
|
802
|
+
validateStill(doc, issues, registry);
|
|
671
803
|
}
|
|
672
804
|
else if (kind === "composition") {
|
|
673
|
-
validateComposition(doc, issues);
|
|
805
|
+
validateComposition(doc, issues, registry);
|
|
674
806
|
}
|
|
675
807
|
else if (kind === "audio") {
|
|
676
|
-
validateAudio(doc, issues);
|
|
808
|
+
validateAudio(doc, issues, registry);
|
|
677
809
|
}
|
|
678
810
|
else {
|
|
679
811
|
issues.push({
|
|
@@ -691,7 +823,7 @@ export function validateDocument(doc) {
|
|
|
691
823
|
* prefixed by the track that carries it, so a host can point at the row rather
|
|
692
824
|
* than at "some clip".
|
|
693
825
|
*/
|
|
694
|
-
export function validateProjectDocument(doc) {
|
|
826
|
+
export function validateProjectDocument(doc, options = {}) {
|
|
695
827
|
const issues = [];
|
|
696
828
|
if (!isPlainObject(doc)) {
|
|
697
829
|
return { valid: false, issues: [{ path: "", message: "document must be an object." }] };
|
|
@@ -703,9 +835,14 @@ export function validateProjectDocument(doc) {
|
|
|
703
835
|
if (typeof project.name !== "string" || project.name.length === 0) {
|
|
704
836
|
issues.push({ path: "name", message: "name must be a non-empty string." });
|
|
705
837
|
}
|
|
706
|
-
if (project.fps !== undefined && (typeof project.fps !== "number" || !(project.fps > 0))) {
|
|
838
|
+
if (project.fps !== undefined && (typeof project.fps !== "number" || !(project.fps > 0) || !Number.isFinite(project.fps))) {
|
|
707
839
|
issues.push({ path: "fps", message: "fps must be a positive number when present." });
|
|
708
840
|
}
|
|
841
|
+
checkFormatVersion(project, issues);
|
|
842
|
+
for (const [field, message] of Object.entries(RETIRED_PROJECT_FIELDS)) {
|
|
843
|
+
if (project[field] !== undefined)
|
|
844
|
+
issues.push({ path: field, message });
|
|
845
|
+
}
|
|
709
846
|
// The one field that used to be three. Zero tracks is a legitimate state,
|
|
710
847
|
// not a mistake to reject — a freshly created project has no clips yet,
|
|
711
848
|
// and every host of this array already treats an empty one as ordinary
|
|
@@ -752,7 +889,7 @@ export function validateProjectDocument(doc) {
|
|
|
752
889
|
issues.push({ path: `${path}.clip`, message: "clip is required — a track places a clip document inline." });
|
|
753
890
|
return;
|
|
754
891
|
}
|
|
755
|
-
for (const issue of clipIssuesOf(track.clip)) {
|
|
892
|
+
for (const issue of clipIssuesOf(track.clip, options)) {
|
|
756
893
|
issues.push({ path: `${path}.clip${issue.path ? `.${issue.path}` : ""}`, message: issue.message });
|
|
757
894
|
}
|
|
758
895
|
});
|
|
@@ -764,9 +901,9 @@ export function validateProjectDocument(doc) {
|
|
|
764
901
|
* not seen again — the same identity contract `Session.replace` already holds.
|
|
765
902
|
*/
|
|
766
903
|
const CLIP_ISSUES = new WeakMap();
|
|
767
|
-
function clipIssuesOf(clip) {
|
|
768
|
-
if (!isPlainObject(clip))
|
|
769
|
-
return validateDocument(clip).issues;
|
|
904
|
+
function clipIssuesOf(clip, options) {
|
|
905
|
+
if (!isPlainObject(clip) || options.registry)
|
|
906
|
+
return validateDocument(clip, options).issues;
|
|
770
907
|
let issues = CLIP_ISSUES.get(clip);
|
|
771
908
|
if (!issues) {
|
|
772
909
|
issues = validateDocument(clip).issues;
|
|
@@ -775,8 +912,8 @@ function clipIssuesOf(clip) {
|
|
|
775
912
|
return issues;
|
|
776
913
|
}
|
|
777
914
|
/** {@link validateProjectDocument}, but throwing. */
|
|
778
|
-
export function assertValidProjectDocument(doc) {
|
|
779
|
-
const { valid, issues } = validateProjectDocument(doc);
|
|
915
|
+
export function assertValidProjectDocument(doc, options) {
|
|
916
|
+
const { valid, issues } = validateProjectDocument(doc, options);
|
|
780
917
|
if (!valid) {
|
|
781
918
|
const detail = issues.map((i) => ` ${i.path || "<root>"}: ${i.message}`).join("\n");
|
|
782
919
|
throw new Error(`Invalid project document:\n${detail}`);
|
|
@@ -786,8 +923,8 @@ export function assertValidProjectDocument(doc) {
|
|
|
786
923
|
* {@link validateDocument}, but throwing. For a caller that has no UI to show
|
|
787
924
|
* issues in and wants the document or an error.
|
|
788
925
|
*/
|
|
789
|
-
export function assertValidDocument(doc) {
|
|
790
|
-
const { valid, issues } = validateDocument(doc);
|
|
926
|
+
export function assertValidDocument(doc, options) {
|
|
927
|
+
const { valid, issues } = validateDocument(doc, options);
|
|
791
928
|
if (!valid) {
|
|
792
929
|
const detail = issues.map((i) => ` ${i.path || "<root>"}: ${i.message}`).join("\n");
|
|
793
930
|
throw new Error(`Invalid clip document:\n${detail}`);
|