@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
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { ProjectDocument } from "./project.js";
|
|
2
|
+
import type { ClipDocument } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Saved documents outlive the engine that wrote them, so each carries the
|
|
5
|
+
* format it was written in and this module carries every step from one format
|
|
6
|
+
* to the next.
|
|
7
|
+
*
|
|
8
|
+
* A step is a pure function over JSON: it never mutates what it is handed and
|
|
9
|
+
* never needs a registry, so a host can run it over a row it has not opened
|
|
10
|
+
* and a test can pin it with two literals. Steps only ever go up; a document
|
|
11
|
+
* newer than the engine is refused with {@link DocumentTooNewError} rather than
|
|
12
|
+
* read as whatever it happens to resemble.
|
|
13
|
+
*/
|
|
14
|
+
/** The format this engine reads natively and writes. A document without `formatVersion` is format 0. */
|
|
15
|
+
export declare const DOCUMENT_FORMAT_VERSION = 2;
|
|
16
|
+
/** A document written by a newer engine than this one. Thrown before anything reads it. */
|
|
17
|
+
export declare class DocumentTooNewError extends Error {
|
|
18
|
+
readonly version: number;
|
|
19
|
+
readonly supported: number;
|
|
20
|
+
constructor(version: number, supported?: number);
|
|
21
|
+
}
|
|
22
|
+
/** A document as JSON, before anything has checked its shape. */
|
|
23
|
+
export type JsonDocument = Record<string, unknown>;
|
|
24
|
+
/** One thing a migration changed. `path` locates it as a `ValidationIssue`'s does. */
|
|
25
|
+
export interface DocumentChange {
|
|
26
|
+
/** The format the step that made it read. */
|
|
27
|
+
from: number;
|
|
28
|
+
path: string;
|
|
29
|
+
message: string;
|
|
30
|
+
}
|
|
31
|
+
/** Records a change at `path`, relative to the document the step was handed. */
|
|
32
|
+
export type NoteChange = (path: string, message: string) => void;
|
|
33
|
+
/** The step from format {@link from} to `from + 1`. */
|
|
34
|
+
export interface DocumentMigration {
|
|
35
|
+
readonly from: number;
|
|
36
|
+
/** What the format change was, for a changelog or a host's log. */
|
|
37
|
+
readonly description: string;
|
|
38
|
+
/** Run on every clip document, standalone or inside a project's track. */
|
|
39
|
+
readonly clip?: (clip: JsonDocument, note: NoteChange) => JsonDocument;
|
|
40
|
+
/** Run on a project's own fields, before its clips. */
|
|
41
|
+
readonly project?: (project: JsonDocument, note: NoteChange) => JsonDocument;
|
|
42
|
+
}
|
|
43
|
+
export interface DocumentMigrationResult<T> {
|
|
44
|
+
/** The input itself when it was already current; otherwise a new document stamped with {@link to}. */
|
|
45
|
+
document: T;
|
|
46
|
+
from: number;
|
|
47
|
+
to: number;
|
|
48
|
+
changes: DocumentChange[];
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Every step, oldest first. A release that changes what a stored document
|
|
52
|
+
* means adds the next one here, bumps {@link DOCUMENT_FORMAT_VERSION}, and
|
|
53
|
+
* gives the step a test (`tests/migrate.test.ts`).
|
|
54
|
+
*/
|
|
55
|
+
export declare const DOCUMENT_MIGRATIONS: readonly DocumentMigration[];
|
|
56
|
+
/** The format a document says it is in: its `formatVersion`, or 0 when it has none. */
|
|
57
|
+
export declare function documentFormatVersion(doc: unknown): number;
|
|
58
|
+
/**
|
|
59
|
+
* Bring a still, composition, audio or project document up to
|
|
60
|
+
* {@link DOCUMENT_FORMAT_VERSION}.
|
|
61
|
+
*
|
|
62
|
+
* A clip inside a project with no `formatVersion` of its own is read at the
|
|
63
|
+
* project's, since it was written alongside it. Anything that is not a
|
|
64
|
+
* document comes back untouched, for validation to describe.
|
|
65
|
+
*/
|
|
66
|
+
export declare function migrateDocument<T extends ProjectDocument | ClipDocument>(doc: T): DocumentMigrationResult<T>;
|
|
67
|
+
export declare function migrateDocument(doc: unknown): DocumentMigrationResult<unknown>;
|
|
68
|
+
/** @internal {@link migrateDocument} over a given list of steps, for a test pinning the runner. */
|
|
69
|
+
export declare function migrateDocumentWith(doc: unknown, migrations: readonly DocumentMigration[], target: number): DocumentMigrationResult<unknown>;
|
|
70
|
+
//# sourceMappingURL=migrate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/document/migrate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;;;;;;;;;GAUG;AAEH,wGAAwG;AACxG,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,2FAA2F;AAC3F,qBAAa,mBAAoB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;gBAEf,OAAO,EAAE,MAAM,EAAE,SAAS,GAAE,MAAgC;CAS3E;AAED,iEAAiE;AACjE,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEnD,sFAAsF;AACtF,MAAM,WAAW,cAAc;IAC3B,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,gFAAgF;AAChF,MAAM,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;AAEjE,uDAAuD;AACvD,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,mEAAmE;IACnE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,0EAA0E;IAC1E,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,KAAK,YAAY,CAAC;IACvE,uDAAuD;IACvD,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,KAAK,YAAY,CAAC;CAChF;AAED,MAAM,WAAW,uBAAuB,CAAC,CAAC;IACtC,sGAAsG;IACtG,QAAQ,EAAE,CAAC,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,cAAc,EAAE,CAAC;CAC7B;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,iBAAiB,EA2B3D,CAAC;AA2DF,uFAAuF;AACvF,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAQ1D;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,eAAe,GAAG,YAAY,EAAE,GAAG,EAAE,CAAC,GAAG,uBAAuB,CAAC,CAAC,CAAC,CAAC;AAC9G,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;AAKhF,mGAAmG;AACnG,wBAAgB,mBAAmB,CAC/B,GAAG,EAAE,OAAO,EACZ,UAAU,EAAE,SAAS,iBAAiB,EAAE,EACxC,MAAM,EAAE,MAAM,GACf,uBAAuB,CAAC,OAAO,CAAC,CAYlC"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Saved documents outlive the engine that wrote them, so each carries the
|
|
3
|
+
* format it was written in and this module carries every step from one format
|
|
4
|
+
* to the next.
|
|
5
|
+
*
|
|
6
|
+
* A step is a pure function over JSON: it never mutates what it is handed and
|
|
7
|
+
* never needs a registry, so a host can run it over a row it has not opened
|
|
8
|
+
* and a test can pin it with two literals. Steps only ever go up; a document
|
|
9
|
+
* newer than the engine is refused with {@link DocumentTooNewError} rather than
|
|
10
|
+
* read as whatever it happens to resemble.
|
|
11
|
+
*/
|
|
12
|
+
/** The format this engine reads natively and writes. A document without `formatVersion` is format 0. */
|
|
13
|
+
export const DOCUMENT_FORMAT_VERSION = 2;
|
|
14
|
+
/** A document written by a newer engine than this one. Thrown before anything reads it. */
|
|
15
|
+
export class DocumentTooNewError extends Error {
|
|
16
|
+
version;
|
|
17
|
+
supported;
|
|
18
|
+
constructor(version, supported = DOCUMENT_FORMAT_VERSION) {
|
|
19
|
+
super(`This document is format ${version}, newer than this engine reads (format ${supported}). ` +
|
|
20
|
+
`Open it with a newer engine.`);
|
|
21
|
+
this.name = "DocumentTooNewError";
|
|
22
|
+
this.version = version;
|
|
23
|
+
this.supported = supported;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Every step, oldest first. A release that changes what a stored document
|
|
28
|
+
* means adds the next one here, bumps {@link DOCUMENT_FORMAT_VERSION}, and
|
|
29
|
+
* gives the step a test (`tests/migrate.test.ts`).
|
|
30
|
+
*/
|
|
31
|
+
export const DOCUMENT_MIGRATIONS = [
|
|
32
|
+
{
|
|
33
|
+
from: 0,
|
|
34
|
+
description: "Documents start carrying `formatVersion`; a clip's retired `constants` rows become `variables`.",
|
|
35
|
+
clip: (clip, note) => {
|
|
36
|
+
if (!Array.isArray(clip.constants))
|
|
37
|
+
return clip;
|
|
38
|
+
const { constants, ...rest } = clip;
|
|
39
|
+
const variables = Array.isArray(rest.variables) ? [...rest.variables] : [];
|
|
40
|
+
for (const row of constants) {
|
|
41
|
+
if (typeof row !== "object" || row === null) {
|
|
42
|
+
variables.push(row);
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
const { kind: _kind, ...variable } = row;
|
|
46
|
+
variables.push(variable);
|
|
47
|
+
}
|
|
48
|
+
note("constants", `${constants.length} constant row(s) moved into \`variables\`.`);
|
|
49
|
+
return { ...rest, variables };
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
from: 1,
|
|
54
|
+
description: "SkSL is retired: every shader fill, shader effect and shader pack written in it says `language: \"sksl\"`, " +
|
|
55
|
+
"the `sksl` effect key becomes `shader`, and `coords` is dropped.",
|
|
56
|
+
clip: (clip, note) => retireSkSL(clip, "", note),
|
|
57
|
+
},
|
|
58
|
+
];
|
|
59
|
+
/** SkSL's entry point or an SkSL `uniform` declaration, neither of which a WGSL source can contain. */
|
|
60
|
+
const SKSL_SOURCE = /\b(?:half4|float4|vec4)\s+main\s*\(|^\s*uniform\s+\w+\s+\w+/m;
|
|
61
|
+
const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
62
|
+
// Fills and effects sit in node props, named fills, effect and filter arrays,
|
|
63
|
+
// command values and tween keyframes alike, so the whole clip is walked.
|
|
64
|
+
function retireSkSL(value, path, note) {
|
|
65
|
+
if (Array.isArray(value)) {
|
|
66
|
+
let out;
|
|
67
|
+
value.forEach((item, i) => {
|
|
68
|
+
const next = retireSkSL(item, `${path}[${i}]`, note);
|
|
69
|
+
if (next !== item)
|
|
70
|
+
(out ??= [...value])[i] = next;
|
|
71
|
+
});
|
|
72
|
+
return out ?? value;
|
|
73
|
+
}
|
|
74
|
+
if (!isObject(value))
|
|
75
|
+
return value;
|
|
76
|
+
let out;
|
|
77
|
+
for (const [key, item] of Object.entries(value)) {
|
|
78
|
+
const next = retireSkSL(item, path ? `${path}.${key}` : key, note);
|
|
79
|
+
if (next !== item)
|
|
80
|
+
(out ??= { ...value })[key] = next;
|
|
81
|
+
}
|
|
82
|
+
return retireShader(out ?? value, path, note);
|
|
83
|
+
}
|
|
84
|
+
function retireShader(shader, path, note) {
|
|
85
|
+
const legacyKey = shader.type === "sksl";
|
|
86
|
+
const isShader = legacyKey
|
|
87
|
+
|| (shader.type === "shader" && (typeof shader.source === "string" || typeof shader.shader === "string"))
|
|
88
|
+
|| ((shader.scope === "fill" || shader.scope === "effect") && typeof shader.source === "string");
|
|
89
|
+
if (!isShader)
|
|
90
|
+
return shader;
|
|
91
|
+
const out = { ...shader };
|
|
92
|
+
if (legacyKey)
|
|
93
|
+
out.type = "shader";
|
|
94
|
+
const moved = out.type === "shader" && typeof out.shader === "string" && out.source === undefined;
|
|
95
|
+
if (moved) {
|
|
96
|
+
out.source = out.shader;
|
|
97
|
+
delete out.shader;
|
|
98
|
+
}
|
|
99
|
+
// The `sksl` key meant SkSL whatever its source looked like, unless it said otherwise.
|
|
100
|
+
const sksl = out.language === "sksl"
|
|
101
|
+
|| (out.language === undefined && (legacyKey || SKSL_SOURCE.test(typeof out.source === "string" ? out.source : "")));
|
|
102
|
+
const stamped = sksl && out.language === undefined;
|
|
103
|
+
if (stamped)
|
|
104
|
+
out.language = "sksl";
|
|
105
|
+
const hadCoords = "coords" in out;
|
|
106
|
+
delete out.coords;
|
|
107
|
+
if (sksl)
|
|
108
|
+
note(path, "SkSL shaders no longer draw; port it to WGSL.");
|
|
109
|
+
else if (legacyKey)
|
|
110
|
+
note(path, "The retired `sksl` effect key is now `shader`.");
|
|
111
|
+
else if (moved)
|
|
112
|
+
note(path, "The shader's `shader` field is now `source`.");
|
|
113
|
+
else if (hadCoords)
|
|
114
|
+
note(path, "`coords` dropped; it only ever applied to SkSL.");
|
|
115
|
+
return legacyKey || moved || stamped || hadCoords ? out : shader;
|
|
116
|
+
}
|
|
117
|
+
/** The format a document says it is in: its `formatVersion`, or 0 when it has none. */
|
|
118
|
+
export function documentFormatVersion(doc) {
|
|
119
|
+
if (typeof doc !== "object" || doc === null)
|
|
120
|
+
return 0;
|
|
121
|
+
const version = doc.formatVersion;
|
|
122
|
+
if (version === undefined)
|
|
123
|
+
return 0;
|
|
124
|
+
if (typeof version !== "number" || !Number.isInteger(version) || version < 0) {
|
|
125
|
+
throw new TypeError(`formatVersion must be a whole number >= 0 (got ${JSON.stringify(version)}).`);
|
|
126
|
+
}
|
|
127
|
+
return version;
|
|
128
|
+
}
|
|
129
|
+
export function migrateDocument(doc) {
|
|
130
|
+
return migrateDocumentWith(doc, DOCUMENT_MIGRATIONS, DOCUMENT_FORMAT_VERSION);
|
|
131
|
+
}
|
|
132
|
+
/** @internal {@link migrateDocument} over a given list of steps, for a test pinning the runner. */
|
|
133
|
+
export function migrateDocumentWith(doc, migrations, target) {
|
|
134
|
+
const from = documentFormatVersion(doc);
|
|
135
|
+
if (from > target)
|
|
136
|
+
throw new DocumentTooNewError(from, target);
|
|
137
|
+
if (typeof doc !== "object" || doc === null || Array.isArray(doc)) {
|
|
138
|
+
return { document: doc, from, to: from, changes: [] };
|
|
139
|
+
}
|
|
140
|
+
const changes = [];
|
|
141
|
+
const json = doc;
|
|
142
|
+
const migrated = json.kind === "project"
|
|
143
|
+
? migrateProject(json, from, migrations, target, changes)
|
|
144
|
+
: migrateClip(json, from, migrations, target, changes, "");
|
|
145
|
+
return { document: migrated, from, to: target, changes };
|
|
146
|
+
}
|
|
147
|
+
function stepsBetween(from, to, migrations) {
|
|
148
|
+
const steps = [];
|
|
149
|
+
for (let version = from; version < to; version++) {
|
|
150
|
+
const step = migrations.find((m) => m.from === version);
|
|
151
|
+
if (!step)
|
|
152
|
+
throw new Error(`No document migration from format ${version} to ${version + 1}.`);
|
|
153
|
+
steps.push(step);
|
|
154
|
+
}
|
|
155
|
+
return steps;
|
|
156
|
+
}
|
|
157
|
+
function noteInto(changes, from, prefix) {
|
|
158
|
+
return (path, message) => changes.push({ from, path: prefix && path ? `${prefix}.${path}` : prefix || path, message });
|
|
159
|
+
}
|
|
160
|
+
/** `stamp` false leaves a clip that inherits its project's version without a field of its own. */
|
|
161
|
+
function migrateClip(clip, from, migrations, target, changes, prefix, stamp = true) {
|
|
162
|
+
if (from === target)
|
|
163
|
+
return clip;
|
|
164
|
+
let out = clip;
|
|
165
|
+
for (const step of stepsBetween(from, target, migrations)) {
|
|
166
|
+
if (step.clip)
|
|
167
|
+
out = step.clip(out, noteInto(changes, step.from, prefix));
|
|
168
|
+
}
|
|
169
|
+
return stamp ? { ...out, formatVersion: target } : out;
|
|
170
|
+
}
|
|
171
|
+
function migrateProject(project, from, migrations, target, changes) {
|
|
172
|
+
let out = project;
|
|
173
|
+
if (from < target) {
|
|
174
|
+
for (const step of stepsBetween(from, target, migrations)) {
|
|
175
|
+
if (step.project)
|
|
176
|
+
out = step.project(out, noteInto(changes, step.from, ""));
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
let tracksChanged = false;
|
|
180
|
+
const tracks = Array.isArray(out.tracks)
|
|
181
|
+
? out.tracks.map((track, i) => {
|
|
182
|
+
if (typeof track !== "object" || track === null)
|
|
183
|
+
return track;
|
|
184
|
+
const clip = track.clip;
|
|
185
|
+
if (typeof clip !== "object" || clip === null || Array.isArray(clip))
|
|
186
|
+
return track;
|
|
187
|
+
const own = clip.formatVersion !== undefined;
|
|
188
|
+
const version = own ? documentFormatVersion(clip) : from;
|
|
189
|
+
if (version > target)
|
|
190
|
+
throw new DocumentTooNewError(version, target);
|
|
191
|
+
const next = migrateClip(clip, version, migrations, target, changes, `tracks[${i}].clip`, own);
|
|
192
|
+
if (next === clip)
|
|
193
|
+
return track;
|
|
194
|
+
tracksChanged = true;
|
|
195
|
+
return { ...track, clip: next };
|
|
196
|
+
})
|
|
197
|
+
: out.tracks;
|
|
198
|
+
if (from === target && !tracksChanged)
|
|
199
|
+
return project;
|
|
200
|
+
return { ...out, ...(tracksChanged ? { tracks } : {}), formatVersion: target };
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=migrate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../src/document/migrate.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AAEH,wGAAwG;AACxG,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAEzC,2FAA2F;AAC3F,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IACjC,OAAO,CAAS;IAChB,SAAS,CAAS;IAE3B,YAAY,OAAe,EAAE,YAAoB,uBAAuB;QAC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WAAW,CAAC,IAAoB,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;YAC/G,IAAI,IAAI,KAAK,IAAI;gBAAE,OAAO,KAAK,CAAC;YAChC,aAAa,GAAG,IAAI,CAAC;YACrB,OAAO,EAAE,GAAI,KAAgB,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QAChD,CAAC,CAAC;QACF,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;IACjB,IAAI,IAAI,KAAK,MAAM,IAAI,CAAC,aAAa;QAAE,OAAO,OAAO,CAAC;IACtD,OAAO,EAAE,GAAG,GAAG,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC;AACnF,CAAC","sourcesContent":["import type { ProjectDocument } from \"./project\";\nimport type { ClipDocument } from \"./types\";\n\n/**\n * Saved documents outlive the engine that wrote them, so each carries the\n * format it was written in and this module carries every step from one format\n * to the next.\n *\n * A step is a pure function over JSON: it never mutates what it is handed and\n * never needs a registry, so a host can run it over a row it has not opened\n * and a test can pin it with two literals. Steps only ever go up; a document\n * newer than the engine is refused with {@link DocumentTooNewError} rather than\n * read as whatever it happens to resemble.\n */\n\n/** The format this engine reads natively and writes. A document without `formatVersion` is format 0. */\nexport const DOCUMENT_FORMAT_VERSION = 2;\n\n/** A document written by a newer engine than this one. Thrown before anything reads it. */\nexport class DocumentTooNewError extends Error {\n readonly version: number;\n readonly supported: number;\n\n constructor(version: number, supported: number = DOCUMENT_FORMAT_VERSION) {\n super(\n `This document is format ${version}, newer than this engine reads (format ${supported}). ` +\n `Open it with a newer engine.`,\n );\n this.name = \"DocumentTooNewError\";\n this.version = version;\n this.supported = supported;\n }\n}\n\n/** A document as JSON, before anything has checked its shape. */\nexport type JsonDocument = Record<string, unknown>;\n\n/** One thing a migration changed. `path` locates it as a `ValidationIssue`'s does. */\nexport interface DocumentChange {\n /** The format the step that made it read. */\n from: number;\n path: string;\n message: string;\n}\n\n/** Records a change at `path`, relative to the document the step was handed. */\nexport type NoteChange = (path: string, message: string) => void;\n\n/** The step from format {@link from} to `from + 1`. */\nexport interface DocumentMigration {\n readonly from: number;\n /** What the format change was, for a changelog or a host's log. */\n readonly description: string;\n /** Run on every clip document, standalone or inside a project's track. */\n readonly clip?: (clip: JsonDocument, note: NoteChange) => JsonDocument;\n /** Run on a project's own fields, before its clips. */\n readonly project?: (project: JsonDocument, note: NoteChange) => JsonDocument;\n}\n\nexport interface DocumentMigrationResult<T> {\n /** The input itself when it was already current; otherwise a new document stamped with {@link to}. */\n document: T;\n from: number;\n to: number;\n changes: DocumentChange[];\n}\n\n/**\n * Every step, oldest first. A release that changes what a stored document\n * means adds the next one here, bumps {@link DOCUMENT_FORMAT_VERSION}, and\n * gives the step a test (`tests/migrate.test.ts`).\n */\nexport const DOCUMENT_MIGRATIONS: readonly DocumentMigration[] = [\n {\n from: 0,\n description: \"Documents start carrying `formatVersion`; a clip's retired `constants` rows become `variables`.\",\n clip: (clip, note) => {\n if (!Array.isArray(clip.constants)) return clip;\n const { constants, ...rest } = clip;\n const variables = Array.isArray(rest.variables) ? [...rest.variables] : [];\n for (const row of constants as unknown[]) {\n if (typeof row !== \"object\" || row === null) {\n variables.push(row);\n continue;\n }\n const { kind: _kind, ...variable } = row as Record<string, unknown>;\n variables.push(variable);\n }\n note(\"constants\", `${constants.length} constant row(s) moved into \\`variables\\`.`);\n return { ...rest, variables };\n },\n },\n {\n from: 1,\n description:\n \"SkSL is retired: every shader fill, shader effect and shader pack written in it says `language: \\\"sksl\\\"`, \" +\n \"the `sksl` effect key becomes `shader`, and `coords` is dropped.\",\n clip: (clip, note) => retireSkSL(clip, \"\", note) as JsonDocument,\n },\n];\n\n/** SkSL's entry point or an SkSL `uniform` declaration, neither of which a WGSL source can contain. */\nconst SKSL_SOURCE = /\\b(?:half4|float4|vec4)\\s+main\\s*\\(|^\\s*uniform\\s+\\w+\\s+\\w+/m;\n\ntype JsonObject = Record<string, unknown>;\n\nconst isObject = (value: unknown): value is JsonObject =>\n typeof value === \"object\" && value !== null && !Array.isArray(value);\n\n// Fills and effects sit in node props, named fills, effect and filter arrays,\n// command values and tween keyframes alike, so the whole clip is walked.\nfunction retireSkSL(value: unknown, path: string, note: NoteChange): unknown {\n if (Array.isArray(value)) {\n let out: unknown[] | undefined;\n value.forEach((item, i) => {\n const next = retireSkSL(item, `${path}[${i}]`, note);\n if (next !== item) (out ??= [...value])[i] = next;\n });\n return out ?? value;\n }\n if (!isObject(value)) return value;\n let out: JsonObject | undefined;\n for (const [key, item] of Object.entries(value)) {\n const next = retireSkSL(item, path ? `${path}.${key}` : key, note);\n if (next !== item) (out ??= { ...value })[key] = next;\n }\n return retireShader(out ?? value, path, note);\n}\n\nfunction retireShader(shader: JsonObject, path: string, note: NoteChange): JsonObject {\n const legacyKey = shader.type === \"sksl\";\n const isShader = legacyKey\n || (shader.type === \"shader\" && (typeof shader.source === \"string\" || typeof shader.shader === \"string\"))\n || ((shader.scope === \"fill\" || shader.scope === \"effect\") && typeof shader.source === \"string\");\n if (!isShader) return shader;\n\n const out: JsonObject = { ...shader };\n if (legacyKey) out.type = \"shader\";\n const moved = out.type === \"shader\" && typeof out.shader === \"string\" && out.source === undefined;\n if (moved) {\n out.source = out.shader;\n delete out.shader;\n }\n // The `sksl` key meant SkSL whatever its source looked like, unless it said otherwise.\n const sksl = out.language === \"sksl\"\n || (out.language === undefined && (legacyKey || SKSL_SOURCE.test(typeof out.source === \"string\" ? out.source : \"\")));\n const stamped = sksl && out.language === undefined;\n if (stamped) out.language = \"sksl\";\n const hadCoords = \"coords\" in out;\n delete out.coords;\n\n if (sksl) note(path, \"SkSL shaders no longer draw; port it to WGSL.\");\n else if (legacyKey) note(path, \"The retired `sksl` effect key is now `shader`.\");\n else if (moved) note(path, \"The shader's `shader` field is now `source`.\");\n else if (hadCoords) note(path, \"`coords` dropped; it only ever applied to SkSL.\");\n return legacyKey || moved || stamped || hadCoords ? out : shader;\n}\n\n/** The format a document says it is in: its `formatVersion`, or 0 when it has none. */\nexport function documentFormatVersion(doc: unknown): number {\n if (typeof doc !== \"object\" || doc === null) return 0;\n const version = (doc as { formatVersion?: unknown }).formatVersion;\n if (version === undefined) return 0;\n if (typeof version !== \"number\" || !Number.isInteger(version) || version < 0) {\n throw new TypeError(`formatVersion must be a whole number >= 0 (got ${JSON.stringify(version)}).`);\n }\n return version;\n}\n\n/**\n * Bring a still, composition, audio or project document up to\n * {@link DOCUMENT_FORMAT_VERSION}.\n *\n * A clip inside a project with no `formatVersion` of its own is read at the\n * project's, since it was written alongside it. Anything that is not a\n * document comes back untouched, for validation to describe.\n */\nexport function migrateDocument<T extends ProjectDocument | ClipDocument>(doc: T): DocumentMigrationResult<T>;\nexport function migrateDocument(doc: unknown): DocumentMigrationResult<unknown>;\nexport function migrateDocument(doc: unknown): DocumentMigrationResult<unknown> {\n return migrateDocumentWith(doc, DOCUMENT_MIGRATIONS, DOCUMENT_FORMAT_VERSION);\n}\n\n/** @internal {@link migrateDocument} over a given list of steps, for a test pinning the runner. */\nexport function migrateDocumentWith(\n doc: unknown,\n migrations: readonly DocumentMigration[],\n target: number,\n): DocumentMigrationResult<unknown> {\n const from = documentFormatVersion(doc);\n if (from > target) throw new DocumentTooNewError(from, target);\n if (typeof doc !== \"object\" || doc === null || Array.isArray(doc)) {\n return { document: doc, from, to: from, changes: [] };\n }\n const changes: DocumentChange[] = [];\n const json = doc as JsonDocument;\n const migrated = json.kind === \"project\"\n ? migrateProject(json, from, migrations, target, changes)\n : migrateClip(json, from, migrations, target, changes, \"\");\n return { document: migrated, from, to: target, changes };\n}\n\nfunction stepsBetween(from: number, to: number, migrations: readonly DocumentMigration[]): DocumentMigration[] {\n const steps: DocumentMigration[] = [];\n for (let version = from; version < to; version++) {\n const step = migrations.find((m) => m.from === version);\n if (!step) throw new Error(`No document migration from format ${version} to ${version + 1}.`);\n steps.push(step);\n }\n return steps;\n}\n\nfunction noteInto(changes: DocumentChange[], from: number, prefix: string): NoteChange {\n return (path, message) => changes.push({ from, path: prefix && path ? `${prefix}.${path}` : prefix || path, message });\n}\n\n/** `stamp` false leaves a clip that inherits its project's version without a field of its own. */\nfunction migrateClip(\n clip: JsonDocument,\n from: number,\n migrations: readonly DocumentMigration[],\n target: number,\n changes: DocumentChange[],\n prefix: string,\n stamp = true,\n): JsonDocument {\n if (from === target) return clip;\n let out = clip;\n for (const step of stepsBetween(from, target, migrations)) {\n if (step.clip) out = step.clip(out, noteInto(changes, step.from, prefix));\n }\n return stamp ? { ...out, formatVersion: target } : out;\n}\n\nfunction migrateProject(\n project: JsonDocument,\n from: number,\n migrations: readonly DocumentMigration[],\n target: number,\n changes: DocumentChange[],\n): JsonDocument {\n let out = project;\n if (from < target) {\n for (const step of stepsBetween(from, target, migrations)) {\n if (step.project) out = step.project(out, noteInto(changes, step.from, \"\"));\n }\n }\n let tracksChanged = false;\n const tracks = Array.isArray(out.tracks)\n ? (out.tracks as unknown[]).map((track, i) => {\n if (typeof track !== \"object\" || track === null) return track;\n const clip = (track as { clip?: unknown }).clip;\n if (typeof clip !== \"object\" || clip === null || Array.isArray(clip)) return track;\n const own = (clip as { formatVersion?: unknown }).formatVersion !== undefined;\n const version = own ? documentFormatVersion(clip) : from;\n if (version > target) throw new DocumentTooNewError(version, target);\n const next = migrateClip(clip as JsonDocument, version, migrations, target, changes, `tracks[${i}].clip`, own);\n if (next === clip) return track;\n tracksChanged = true;\n return { ...(track as object), clip: next };\n })\n : out.tracks;\n if (from === target && !tracksChanged) return project;\n return { ...out, ...(tracksChanged ? { tracks } : {}), formatVersion: target };\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Node, NodeDimension } from "../components/trees/node/node.js";
|
|
2
|
+
import type { NodeSpec } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* What a build puts where a row names a type its registry lacks: a node of the
|
|
5
|
+
* row's tree that keeps the row's id, its placement and its children, and
|
|
6
|
+
* draws nothing itself. One unknown type then costs one node rather than the
|
|
7
|
+
* whole clip, and an editor still shows the row where it was.
|
|
8
|
+
*
|
|
9
|
+
* None of these is registered, so no document can name one.
|
|
10
|
+
*/
|
|
11
|
+
/** The type a placeholder stands in for, and the props its row authored. */
|
|
12
|
+
export interface MissingNodeInfo {
|
|
13
|
+
type: string;
|
|
14
|
+
props: Readonly<Record<string, unknown>>;
|
|
15
|
+
}
|
|
16
|
+
/** Stands in for every placeholder's class when a build compares a live node's class with its row's. */
|
|
17
|
+
export declare const MISSING_TYPE: unique symbol;
|
|
18
|
+
/** @internal A placeholder for `spec`, in `dimension`, taking what it can of `props` (the literal half of the row's). */
|
|
19
|
+
export declare function missingNode(dimension: NodeDimension, spec: NodeSpec, props: Record<string, unknown>): Node;
|
|
20
|
+
/** @internal Of a props bag, what a placeholder of `dimension` takes. */
|
|
21
|
+
export declare function placeholderProps(dimension: NodeDimension, props: Record<string, unknown>): Record<string, unknown>;
|
|
22
|
+
/**
|
|
23
|
+
* The unknown type a live node stands in for, or `undefined` for a real node —
|
|
24
|
+
* so a host can mark the row and keep its props for when the type is back.
|
|
25
|
+
*/
|
|
26
|
+
export declare function missingNodeOf(node: Node): MissingNodeInfo | undefined;
|
|
27
|
+
//# sourceMappingURL=missing-node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"missing-node.d.ts","sourceRoot":"","sources":["../../src/document/missing-node.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC;;;;;;;GAOG;AAEH,4EAA4E;AAC5E,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC5C;AAwBD,wGAAwG;AACxG,eAAO,MAAM,YAAY,EAAE,OAAO,MAAkC,CAAC;AAErE,yHAAyH;AACzH,wBAAgB,WAAW,CAAC,SAAS,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAQ1G;AAED,yEAAyE;AACzE,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAKlH;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,eAAe,GAAG,SAAS,CAErE"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { getPropertyMeta } from "../attributes/properties/decorator.js";
|
|
2
|
+
import { component2d } from "../components/factory/component2d.js";
|
|
3
|
+
import { component3d } from "../components/factory/component3d.js";
|
|
4
|
+
import { componentAudio } from "../components/factory/component-audio.js";
|
|
5
|
+
const MissingNode2D = component2d({ key: "missingNode2d" });
|
|
6
|
+
const MissingNode3D = component3d({ key: "missingNode3d" });
|
|
7
|
+
const MissingNodeAudio = componentAudio({ key: "missingNodeAudio" });
|
|
8
|
+
const PLACEHOLDERS = {
|
|
9
|
+
"2d": MissingNode2D.node,
|
|
10
|
+
"3d": MissingNode3D.node,
|
|
11
|
+
audio: MissingNodeAudio.node,
|
|
12
|
+
};
|
|
13
|
+
/** Placement it keeps; nothing that would draw or composite, so it shows nothing of its own. */
|
|
14
|
+
const DRAWS = new Set(["effects", "blend", "clip", "shadow"]);
|
|
15
|
+
const KEPT = Object.fromEntries(Object.entries(PLACEHOLDERS).map(([dimension, ctor]) => [
|
|
16
|
+
dimension,
|
|
17
|
+
new Set(getPropertyMeta(Object.create(ctor.prototype)).map((m) => m.key).filter((key) => !DRAWS.has(key))),
|
|
18
|
+
]));
|
|
19
|
+
const MISSING = new WeakMap();
|
|
20
|
+
/** Stands in for every placeholder's class when a build compares a live node's class with its row's. */
|
|
21
|
+
export const MISSING_TYPE = Symbol("missingNodeType");
|
|
22
|
+
/** @internal A placeholder for `spec`, in `dimension`, taking what it can of `props` (the literal half of the row's). */
|
|
23
|
+
export function missingNode(dimension, spec, props) {
|
|
24
|
+
const node = new PLACEHOLDERS[dimension]({
|
|
25
|
+
...placeholderProps(dimension, props),
|
|
26
|
+
id: spec.id,
|
|
27
|
+
...(spec.key !== undefined && { key: spec.key }),
|
|
28
|
+
});
|
|
29
|
+
MISSING.set(node, { type: spec.type, props: spec.props });
|
|
30
|
+
return node;
|
|
31
|
+
}
|
|
32
|
+
/** @internal Of a props bag, what a placeholder of `dimension` takes. */
|
|
33
|
+
export function placeholderProps(dimension, props) {
|
|
34
|
+
const kept = KEPT[dimension];
|
|
35
|
+
const out = {};
|
|
36
|
+
for (const [key, value] of Object.entries(props))
|
|
37
|
+
if (kept.has(key))
|
|
38
|
+
out[key] = value;
|
|
39
|
+
return out;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The unknown type a live node stands in for, or `undefined` for a real node —
|
|
43
|
+
* so a host can mark the row and keep its props for when the type is back.
|
|
44
|
+
*/
|
|
45
|
+
export function missingNodeOf(node) {
|
|
46
|
+
return MISSING.get(node);
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=missing-node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"missing-node.js","sourceRoot":"","sources":["../../src/document/missing-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAmBt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S,CAAC,CAAC;QACrC,GAAG,gBAAgB,CAAC,SAAS,EAAE,KAAK,CAAC;QACrC,EAAE,EAAE,IAAI,CAAC,EAAE;QACX,GAAG,CAAC,IAAI,CAAC,GAAG,KAAK,SAAS,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC;KACnD,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;IAC1D,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,gBAAgB,CAAC,SAAwB,EAAE,KAA8B;IACrF,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,GAAG,GAA4B,EAAE,CAAC;IACxC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACtF,OAAO,GAAG,CAAC;AACf,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,IAAU;IACpC,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC","sourcesContent":["import { getPropertyMeta } from \"@/attributes/properties/decorator\";\nimport { component2d } from \"@/components/factory/component2d\";\nimport { component3d } from \"@/components/factory/component3d\";\nimport { componentAudio } from \"@/components/factory/component-audio\";\nimport type { Node, NodeDimension } from \"@/components/trees/node/node\";\nimport type { NodeSpec } from \"./types\";\n\n/**\n * What a build puts where a row names a type its registry lacks: a node of the\n * row's tree that keeps the row's id, its placement and its children, and\n * draws nothing itself. One unknown type then costs one node rather than the\n * whole clip, and an editor still shows the row where it was.\n *\n * None of these is registered, so no document can name one.\n */\n\n/** The type a placeholder stands in for, and the props its row authored. */\nexport interface MissingNodeInfo {\n type: string;\n props: Readonly<Record<string, unknown>>;\n}\n\nconst MissingNode2D = component2d({ key: \"missingNode2d\" });\nconst MissingNode3D = component3d({ key: \"missingNode3d\" });\nconst MissingNodeAudio = componentAudio({ key: \"missingNodeAudio\" });\n\ntype PlaceholderCtor = new (props?: Record<string, unknown>) => Node;\n\nconst PLACEHOLDERS: Record<NodeDimension, PlaceholderCtor> = {\n \"2d\": MissingNode2D.node as unknown as PlaceholderCtor,\n \"3d\": MissingNode3D.node as unknown as PlaceholderCtor,\n audio: MissingNodeAudio.node as unknown as PlaceholderCtor,\n};\n\n/** Placement it keeps; nothing that would draw or composite, so it shows nothing of its own. */\nconst DRAWS = new Set([\"effects\", \"blend\", \"clip\", \"shadow\"]);\n\nconst KEPT = Object.fromEntries(Object.entries(PLACEHOLDERS).map(([dimension, ctor]) => [\n dimension,\n new Set(getPropertyMeta(Object.create(ctor.prototype) as object).map((m) => m.key).filter((key) => !DRAWS.has(key))),\n])) as unknown as Record<NodeDimension, ReadonlySet<string>>;\n\nconst MISSING = new WeakMap<Node, MissingNodeInfo>();\n\n/** Stands in for every placeholder's class when a build compares a live node's class with its row's. */\nexport const MISSING_TYPE: unique symbol = Symbol(\"missingNodeType\");\n\n/** @internal A placeholder for `spec`, in `dimension`, taking what it can of `props` (the literal half of the row's). */\nexport function missingNode(dimension: NodeDimension, spec: NodeSpec, props: Record<string, unknown>): Node {\n const node = new PLACEHOLDERS[dimension]({\n ...placeholderProps(dimension, props),\n id: spec.id,\n ...(spec.key !== undefined && { key: spec.key }),\n });\n MISSING.set(node, { type: spec.type, props: spec.props });\n return node;\n}\n\n/** @internal Of a props bag, what a placeholder of `dimension` takes. */\nexport function placeholderProps(dimension: NodeDimension, props: Record<string, unknown>): Record<string, unknown> {\n const kept = KEPT[dimension];\n const out: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(props)) if (kept.has(key)) out[key] = value;\n return out;\n}\n\n/**\n * The unknown type a live node stands in for, or `undefined` for a real node —\n * so a host can mark the row and keep its props for when the type is back.\n */\nexport function missingNodeOf(node: Node): MissingNodeInfo | undefined {\n return MISSING.get(node);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-decorator.js","sourceRoot":"","sources":["../../src/document/node-decorator.ts"],"names":[],"mappings":"AAEA,yEAAyE;AACzE,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,MAAM,UAAU,IAAI,CAAC,IAAiC;IAClD,iEAAiE;IACjE,4EAA4E;IAC5E,2EAA2E;IAC3E,OAAO;IACP,OAAO,UAAsD,IAAO;QAChE,MAAM,UAAU,GAAuB,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QACtF,IAAI,CAAC,SAAqC,CAAC,SAAS,CAAC,GAAG,UAAU,CAAC;QACpE,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC;AACN,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAsC;IACpE,MAAM,KAAK,GAAG,IAAI,CAAC,SAAgD,CAAC;IACpE,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC;QAAE,OAAO,SAAS,CAAC;IACxF,OAAO,KAAK,CAAC,SAAS,CAAuB,CAAC;AAClD,CAAC","sourcesContent":["import type { NodeTypeDescriptor } from \"./node-descriptor\";\
|
|
1
|
+
{"version":3,"file":"node-decorator.js","sourceRoot":"","sources":["../../src/document/node-decorator.ts"],"names":[],"mappings":"AAEA,yEAAyE;AACzE,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,MAAM,UAAU,IAAI,CAAC,IAAiC;IAClD,iEAAiE;IACjE,4EAA4E;IAC5E,2EAA2E;IAC3E,OAAO;IACP,OAAO,UAAsD,IAAO;QAChE,MAAM,UAAU,GAAuB,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QACtF,IAAI,CAAC,SAAqC,CAAC,SAAS,CAAC,GAAG,UAAU,CAAC;QACpE,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC;AACN,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAsC;IACpE,MAAM,KAAK,GAAG,IAAI,CAAC,SAAgD,CAAC;IACpE,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC;QAAE,OAAO,SAAS,CAAC;IACxF,OAAO,KAAK,CAAC,SAAS,CAAuB,CAAC;AAClD,CAAC","sourcesContent":["import type { NodeTypeDescriptor } from \"./node-descriptor\";\n\n/** Symbol under which `node` metadata is stored on a class prototype. */\nexport const NODE_META = Symbol(\"nodeMeta\");\n\n/**\n * Declare a node class's document key — and nothing else.\n *\n * **It does not register.** Registration happens when the class is handed to a\n * `Registry` (`new Engine(platform, { nodes: [Blob] })`), because a registry is\n * a value an engine owns rather than a table the module graph writes into. A\n * declaration that registered made the *order modules happened to be imported in*\n * part of the engine's state: whichever host loaded first won the key, a second\n * engine in the same process inherited a vocabulary it never asked for, and a\n * class that was merely imported was already registered whether or not anything\n * meant to offer it.\n *\n * What is left is a declaration, read back by {@link getNodeDescriptor}. A\n * component factory makes it for the class it generates (`component2d({ key })`);\n * a hand-written class makes it itself:\n *\n * ```ts\n * class Blob extends Node2D<BlobProps> {\n * declare readonly wobble: number;\n * wobbleTo(args: CommandArgs<{ wobble: number }>) { … }\n * }\n * declareMembers(Blob, {\n * wobble: property({ default: 0.4 }),\n * wobbleTo: command({ args: [\"wobble\"] }),\n * });\n * node(\"blob\")(Blob);\n *\n * const registry = new Registry({ nodes: [Blob] });\n * // { \"type\": \"blob\", \"props\": { \"wobble\": 0.4 } }\n * ```\n *\n * The full form declares everything a host needs to *offer* the type — the\n * shelves it sits on, how it lays children out, what a freshly placed one is\n * seeded with — which is what a component package used to restate in a\n * `manifest.json` beside a class nothing checked it against:\n *\n * ```ts\n * node({\n * key: \"lineChart\",\n * forkable: true,\n * layout: { children: \"freeform\", acceptsChildren: true },\n * seed: { width: 760, height: 460 },\n * })(LineChart);\n * ```\n *\n * None of it is read while rendering — see {@link NodeTypeDescriptor}.\n *\n * **The key is written out, not taken from the class name.** A minifier is free\n * to rename `Blob` to `o`, and the key is what stored documents contain — so a\n * derived one would work in development and silently rewrite every document's\n * vocabulary in a production bundle. It is public API, and spelled like it.\n */\nexport function node(type: string | NodeTypeDescriptor) {\n // Deliberately looser than `NodeConstructor`, which takes a bare\n // `Record<string, unknown>`: a real node class declares its own props type,\n // and requiring assignability would reject exactly the classes this exists\n // for.\n return function <T extends new (...args: never[]) => object>(ctor: T): T {\n const descriptor: NodeTypeDescriptor = typeof type === \"string\" ? { key: type } : type;\n (ctor.prototype as Record<symbol, unknown>)[NODE_META] = descriptor;\n return ctor;\n };\n}\n\n/**\n * What `node` declared on this exact class, or `undefined`.\n *\n * Own prototype only, deliberately: a subclass inherits its parent's methods but\n * not its identity, and a `Card extends Rect` that answered to `\"rect\"` would\n * collide with the real one the moment both were registered.\n */\nexport function getNodeDescriptor(ctor: new (...args: never[]) => object): NodeTypeDescriptor | undefined {\n const proto = ctor.prototype as Record<symbol, unknown> | undefined;\n if (!proto || !Object.prototype.hasOwnProperty.call(proto, NODE_META)) return undefined;\n return proto[NODE_META] as NodeTypeDescriptor;\n}\n"]}
|
|
@@ -82,6 +82,8 @@ export interface NodeTypeDescriptor {
|
|
|
82
82
|
* itself, which is the thing being edited.
|
|
83
83
|
*/
|
|
84
84
|
properties?: Record<string, NodePropertyDescriptor>;
|
|
85
|
+
/** Old prop keys a stored row may still carry → the entry each became. **Derived** from the component's `renamed`. */
|
|
86
|
+
renamed?: Readonly<Record<string, string>>;
|
|
85
87
|
}
|
|
86
88
|
/** One editable property, as a host draws it. */
|
|
87
89
|
export interface NodePropertyDescriptor extends PropertyEditor {
|
|
@@ -89,6 +91,8 @@ export interface NodePropertyDescriptor extends PropertyEditor {
|
|
|
89
91
|
kind: string;
|
|
90
92
|
/** What a freshly placed node holds, when the class declares one. */
|
|
91
93
|
default?: unknown;
|
|
94
|
+
/** Present when the component deprecated it: why, and what to use instead. A host stops offering it. */
|
|
95
|
+
deprecated?: string;
|
|
92
96
|
}
|
|
93
97
|
/** The layout answer a node type's children get from it. */
|
|
94
98
|
export interface NodeLayoutDescriptor {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-descriptor.d.ts","sourceRoot":"","sources":["../../src/document/node-descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,kBAAkB;IAC/B;;;;;OAKG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ,4FAA4F;IAC5F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;IACjC;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,yDAAyD;IACzD,IAAI,CAAC,EAAE,MAAM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C;IACpD,sHAAsH;IACtH,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CAC9C;AAED,iDAAiD;AACjD,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC1D,4EAA4E;IAC5E,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wGAAwG;IACxG,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,4DAA4D;AAC5D,MAAM,WAAW,oBAAoB;IACjC,QAAQ,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,UAAU,GAAG,MAAM,GAAG,UAAU,CAAC;IACpE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,YAAY,CAAC;IAChC,iBAAiB,CAAC,EAAE,YAAY,CAAC;IACjC,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,sCAAsC;AACtC,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-descriptor.js","sourceRoot":"","sources":["../../src/document/node-descriptor.ts"],"names":[],"mappings":"","sourcesContent":["import type { PropertyEditor } from \"@/attributes/properties/decorator\";\
|
|
1
|
+
{"version":3,"file":"node-descriptor.js","sourceRoot":"","sources":["../../src/document/node-descriptor.ts"],"names":[],"mappings":"","sourcesContent":["import type { PropertyEditor } from \"@/attributes/properties/decorator\";\nimport type { NodeDimension } from \"@/components/trees/node/node\";\n\n/**\n * What a node type declares about itself beyond its key.\n *\n * The **technical** description of a type — how it lays children out, what a\n * fresh one is seeded with, what it inherits from. Deliberately *not* how it is\n * presented: no display name, no icon, no shelf, no copy. Those are a host's to\n * resolve and to translate, and a component that carried them would be shipping\n * one language's product decisions inside an engine artifact.\n *\n * It replaced a `manifest.json` written beside each package. Two descriptions of\n * one class is the shape that drifts, and it did: eight of nine packages ended\n * up promising commands their classes had never implemented.\n *\n * **Nothing here is read while rendering.** A frame is identical whether a type\n * declares a seed or not. It exists so a host has one place to ask.\n */\nexport interface NodeTypeDescriptor {\n /**\n * The document key, matching `NodeSpec.type`.\n *\n * **Frozen** for anything already published: a stored document naming it has\n * to keep meaning the same thing forever.\n */\n key: string;\n /** The type it inherits editing sections and commands from, for a host that groups them. */\n parentKey?: string;\n /**\n * Which scene graph the type belongs to — **derived from the class**, never\n * written here, for the same reason {@link properties} is.\n *\n * `dimension` is a getter on the prototype precisely so it answers before a\n * node is constructed, which is what lets a host ask \"can this type go in\n * that tree?\" from the registry alone rather than by building one and\n * catching the throw.\n */\n dimension?: NodeDimension;\n /**\n * The trees it takes children from: its own, or a viewport's two (a Canvas\n * 3D takes 2D and 3D); empty for a type that takes none. **Derived** from\n * the class, as {@link dimension} is.\n */\n holds?: readonly NodeDimension[];\n /**\n * Whether a host may copy this component's source.\n *\n * False for anything a host reaches into by identity — its own primitives. A\n * type is forkable exactly when the host knows nothing about it beyond this.\n */\n forkable?: boolean;\n\n layout?: NodeLayoutDescriptor;\n /** What a freshly placed one's props are seeded with. */\n seed?: Record<string, unknown>;\n\n /**\n * The types this one goes inside: a plot in a coordinate system, a tangent\n * in a plot. A name also stands for every type built on it ({@link parentKey}).\n * Unsaid, it goes wherever its {@link dimension} allows.\n *\n * A statement about the class, not a rule the engine enforces: a node put\n * elsewhere still builds and usually draws nothing, which is exactly what\n * a host is told here so it can offer the type only where it works. See\n * `placement.ts`.\n */\n within?: readonly string[];\n /**\n * Types it needs at least one of beside it, under the same parent: an area\n * between curves needs a curve. For a requirement that is not a parent,\n * because the thing needed is shared or there may be several of it.\n */\n beside?: readonly string[];\n /** Takes only the children that name it in their {@link within}: a plot holds its marks, not a photograph. */\n closed?: boolean;\n\n /**\n * The editable properties, by key — **derived from `property`**, never\n * written here.\n *\n * A hand-written list of a class's properties, beside a class of\n * properties, is exactly the restatement this whole descriptor exists to\n * remove. What a host needs beyond the key — a range, an enum's choices, the\n * controls inside an object-valued prop — is declared on the `property`\n * itself, which is the thing being edited.\n */\n properties?: Record<string, NodePropertyDescriptor>;\n /** Old prop keys a stored row may still carry → the entry each became. **Derived** from the component's `renamed`. */\n renamed?: Readonly<Record<string, string>>;\n}\n\n/** One editable property, as a host draws it. */\nexport interface NodePropertyDescriptor extends PropertyEditor {\n /** The control to draw. Always present here, inferred when not declared. */\n kind: string;\n /** What a freshly placed node holds, when the class declares one. */\n default?: unknown;\n /** Present when the component deprecated it: why, and what to use instead. A host stops offering it. */\n deprecated?: string;\n}\n\n/** The layout answer a node type's children get from it. */\nexport interface NodeLayoutDescriptor {\n children?: \"flow\" | \"horizontal\" | \"vertical\" | \"grid\" | \"freeform\";\n acceptsChildren?: boolean;\n defaultWidthMode?: NodeSizeMode;\n defaultHeightMode?: NodeSizeMode;\n /** What a freshly placed one is sized to. */\n defaultWidth?: number;\n defaultHeight?: number;\n /** A locked width:height, for a type whose box *is* its design. */\n aspectRatio?: number;\n}\n\n/** How a node type sizes one axis. */\nexport type NodeSizeMode = \"fixed\" | \"hug\" | \"fill\";\n"]}
|
|
@@ -13,7 +13,8 @@ import { type NodeSpec } from "./types.js";
|
|
|
13
13
|
* are about the parent; {@link NodeTypeDescriptor.beside} is about the
|
|
14
14
|
* siblings, and is kept apart because a host can meet it by adding one.
|
|
15
15
|
*
|
|
16
|
-
*
|
|
16
|
+
* Only a leaf is enforced when a document is built: a component declaring
|
|
17
|
+
* `allowedChildren: []` throws on a child. A node in any other wrong place
|
|
17
18
|
* builds and, as a rule, draws nothing; this says why.
|
|
18
19
|
*/
|
|
19
20
|
/** Why a node of a type is not where it can work. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"placement.d.ts","sourceRoot":"","sources":["../../src/document/placement.ts"],"names":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CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,+FAA+F;AAC/F,SAAS,OAAO,CAAC,KAAwB,EAAE,GAAW;IAClD,MAAM,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC9B,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;AACpF,CAAC","sourcesContent":["import type { Registry } from \"./registry\";\r\nimport { ROOT_NODE_ID, type NodeSpec } from \"./types\";\r\n\r\n/**\r\n * Where a node type may go, read off the registry without building anything:\r\n * the answer a host needs before it offers a type under a parent, accepts a\r\n * drop, or lets an assistant create a row.\r\n *\r\n * Four things decide it. A parent that takes no children takes none. The two\r\n * trees do not mix: a `Node3D` lives under a Canvas 3D or another 3D node, and\r\n * nothing else does. A type that names where it goes ({@link\r\n * NodeTypeDescriptor.within}) goes only there, and a {@link\r\n * NodeTypeDescriptor.closed} parent takes only the types that name it. Those\r\n * are about the parent; {@link NodeTypeDescriptor.beside} is about the\r\n * siblings, and is kept apart because a host can meet it by adding one.\r\n *\r\n * None of it is enforced when a document is built. A node in the wrong place\r\n * builds and, as a rule, draws nothing; this says why.\r\n */\r\n\r\n/** Why a node of a type is not where it can work. */\r\nexport type PlacementIssue =\r\n /** The parent takes no children. */\r\n | { kind: \"leaf\"; parent: string }\r\n /** A 3D node outside a 3D tree, or anything else inside one. */\r\n | { kind: \"dimension\"; parent: string | null }\r\n /** It goes inside one of `within`, and the parent is none of them. */\r\n | { kind: \"within\"; within: readonly string[] }\r\n /** The parent takes only the types that name it. */\r\n | { kind: \"closed\"; parent: string }\r\n /** It needs one of `beside` under the same parent, and there is none. */\r\n | { kind: \"beside\"; beside: readonly string[] };\r\n\r\nexport interface PlacementOptions {\r\n /**\r\n * A host's own sense of one type standing for another, beside the\r\n * registry's: a copy of a component it made under a new key is still that\r\n * component to whatever goes inside it.\r\n */\r\n isA?: (type: string, name: string) => boolean;\r\n}\r\n\r\n/** The one core type whose children are of the other dimension. */\r\nconst CANVAS_3D = \"canvas3d\";\r\n\r\n/** Whether `type` is `name`, or is built on it through `parentKey`. */\r\nexport function nodeTypeIsA(registry: Registry, type: string, name: string): boolean {\r\n const seen = new Set<string>();\r\n for (let at: string | undefined = type; at !== undefined && !seen.has(at); at = registry.describe(at)?.parentKey) {\r\n if (at === name) return true;\r\n seen.add(at);\r\n }\r\n return false;\r\n}\r\n\r\nfunction among(registry: Registry, type: string, names: readonly string[], options: PlacementOptions): boolean {\r\n return names.some((name) => nodeTypeIsA(registry, type, name) || options.isA?.(type, name) === true);\r\n}\r\n\r\n/**\r\n * Why a node of `child` cannot go directly inside one of `parent`, or `null`\r\n * when it can. A `null` parent is the document's own root, which is 2D and\r\n * names nothing.\r\n */\r\nexport function parentIssue(\r\n registry: Registry,\r\n child: string,\r\n parent: string | null,\r\n options: PlacementOptions = {},\r\n): PlacementIssue | null {\r\n const own = registry.describe(child);\r\n const holder = parent === null ? undefined : registry.describe(parent);\r\n if (parent !== null && (holder?.layout?.acceptsChildren === false || holder?.holds?.length === 0)) return { kind: \"leaf\", parent };\r\n\r\n const within = own?.within ?? [];\r\n if (within.length > 0 && (parent === null || !among(registry, parent, within, options))) {\r\n return { kind: \"within\", within };\r\n }\r\n if (parent !== null && holder?.closed === true && !among(registry, parent, within, options)) {\r\n return { kind: \"closed\", parent };\r\n }\r\n\r\n const inThree = parent !== null && (holder?.dimension === \"3d\" || holder?.holds?.includes(\"3d\") === true || among(registry, parent, [CANVAS_3D], options));\r\n if ((own?.dimension === \"3d\") !== inThree) return { kind: \"dimension\", parent };\r\n return null;\r\n}\r\n\r\n/** The sibling `child` needs that `siblings`, the types already under its parent, do not include; `null` when it needs none or has one. */\r\nexport function siblingIssue(\r\n registry: Registry,\r\n child: string,\r\n siblings: readonly string[],\r\n options: PlacementOptions = {},\r\n): PlacementIssue | null {\r\n const beside = registry.describe(child)?.beside ?? [];\r\n if (beside.length === 0 || siblings.some((type) => among(registry, type, beside, options))) return null;\r\n return { kind: \"beside\", beside };\r\n}\r\n\r\n/**\r\n * Every node of `nodes` that is not where its type says it goes, by id, with\r\n * the first reason. A node of an unregistered type is left out: that is a build\r\n * error, and says so itself.\r\n */\r\nexport function placementIssues(\r\n registry: Registry,\r\n nodes: readonly Pick<NodeSpec, \"id\" | \"type\" | \"parentId\">[],\r\n options: PlacementOptions = {},\r\n): Map<string, PlacementIssue> {\r\n // A document may write its stage as a row or leave it out: either way its children's parent is the root.\r\n const parentOf = (node: Pick<NodeSpec, \"parentId\">) => (node.parentId === ROOT_NODE_ID ? null : node.parentId);\r\n const byId = new Map(nodes.map((node) => [node.id, node]));\r\n const children = new Map<string | null, string[]>();\r\n for (const node of nodes) {\r\n if (node.id === ROOT_NODE_ID) continue;\r\n const under = children.get(parentOf(node));\r\n if (under) under.push(node.type);\r\n else children.set(parentOf(node), [node.type]);\r\n }\r\n const issues = new Map<string, PlacementIssue>();\r\n for (const node of nodes) {\r\n if (node.id === ROOT_NODE_ID || !registry.hasNode(node.type)) continue;\r\n const parentId = parentOf(node);\r\n const parentType = parentId === null ? null : (byId.get(parentId)?.type ?? null);\r\n const issue =\r\n parentIssue(registry, node.type, parentType, options) ??\r\n siblingIssue(registry, node.type, without(children.get(parentId) ?? [], node.type), options);\r\n if (issue) issues.set(node.id, issue);\r\n }\r\n return issues;\r\n}\r\n\r\n// The node's own type once: a second area is a sibling of the first, the first is not its own.\r\nfunction without(types: readonly string[], own: string): string[] {\r\n const at = types.indexOf(own);\r\n return at === -1 ? [...types] : [...types.slice(0, at), ...types.slice(at + 1)];\r\n}\r\n"]}
|
|
1
|
+
{"version":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**\n * Where a node type may go, read off the registry without building anything:\n * the answer a host needs before it offers a type under a parent, accepts a\n * drop, or lets an assistant create a row.\n *\n * Four things decide it. A parent that takes no children takes none. The two\n * trees do not mix: a `Node3D` lives under a Canvas 3D or another 3D node, and\n * nothing else does. A type that names where it goes ({@link\n * NodeTypeDescriptor.within}) goes only there, and a {@link\n * NodeTypeDescriptor.closed} parent takes only the types that name it. Those\n * are about the parent; {@link NodeTypeDescriptor.beside} is about the\n * siblings, and is kept apart because a host can meet it by adding one.\n *\n * Only a leaf is enforced when a document is built: a component declaring\n * `allowedChildren: []` throws on a child. A node in any other wrong place\n * builds and, as a rule, draws nothing; this says why.\n */\n\n/** Why a node of a type is not where it can work. */\nexport type PlacementIssue =\n /** The parent takes no children. */\n | { kind: \"leaf\"; parent: string }\n /** A 3D node outside a 3D tree, or anything else inside one. */\n | { kind: \"dimension\"; parent: string | null }\n /** It goes inside one of `within`, and the parent is none of them. */\n | { kind: \"within\"; within: readonly string[] }\n /** The parent takes only the types that name it. */\n | { kind: \"closed\"; parent: string }\n /** It needs one of `beside` under the same parent, and there is none. */\n | { kind: \"beside\"; beside: readonly string[] };\n\nexport interface PlacementOptions {\n /**\n * A host's own sense of one type standing for another, beside the\n * registry's: a copy of a component it made under a new key is still that\n * component to whatever goes inside it.\n */\n isA?: (type: string, name: string) => boolean;\n}\n\n/** The one core type whose children are of the other dimension. */\nconst CANVAS_3D = \"canvas3d\";\n\n/** Whether `type` is `name`, or is built on it through `parentKey`. */\nexport function nodeTypeIsA(registry: Registry, type: string, name: string): boolean {\n const seen = new Set<string>();\n for (let at: string | undefined = type; at !== undefined && !seen.has(at); at = registry.describe(at)?.parentKey) {\n if (at === name) return true;\n seen.add(at);\n }\n return false;\n}\n\nfunction among(registry: Registry, type: string, names: readonly string[], options: PlacementOptions): boolean {\n return names.some((name) => nodeTypeIsA(registry, type, name) || options.isA?.(type, name) === true);\n}\n\n/**\n * Why a node of `child` cannot go directly inside one of `parent`, or `null`\n * when it can. A `null` parent is the document's own root, which is 2D and\n * names nothing.\n */\nexport function parentIssue(\n registry: Registry,\n child: string,\n parent: string | null,\n options: PlacementOptions = {},\n): PlacementIssue | null {\n const own = registry.describe(child);\n const holder = parent === null ? undefined : registry.describe(parent);\n if (parent !== null && (holder?.layout?.acceptsChildren === false || holder?.holds?.length === 0)) return { kind: \"leaf\", parent };\n\n const within = own?.within ?? [];\n if (within.length > 0 && (parent === null || !among(registry, parent, within, options))) {\n return { kind: \"within\", within };\n }\n if (parent !== null && holder?.closed === true && !among(registry, parent, within, options)) {\n return { kind: \"closed\", parent };\n }\n\n const inThree = parent !== null && (holder?.dimension === \"3d\" || holder?.holds?.includes(\"3d\") === true || among(registry, parent, [CANVAS_3D], options));\n if ((own?.dimension === \"3d\") !== inThree) return { kind: \"dimension\", parent };\n return null;\n}\n\n/** The sibling `child` needs that `siblings`, the types already under its parent, do not include; `null` when it needs none or has one. */\nexport function siblingIssue(\n registry: Registry,\n child: string,\n siblings: readonly string[],\n options: PlacementOptions = {},\n): PlacementIssue | null {\n const beside = registry.describe(child)?.beside ?? [];\n if (beside.length === 0 || siblings.some((type) => among(registry, type, beside, options))) return null;\n return { kind: \"beside\", beside };\n}\n\n/**\n * Every node of `nodes` that is not where its type says it goes, by id, with\n * the first reason. A node of an unregistered type is left out: that is a build\n * error, and says so itself.\n */\nexport function placementIssues(\n registry: Registry,\n nodes: readonly Pick<NodeSpec, \"id\" | \"type\" | \"parentId\">[],\n options: PlacementOptions = {},\n): Map<string, PlacementIssue> {\n // A document may write its stage as a row or leave it out: either way its children's parent is the root.\n const parentOf = (node: Pick<NodeSpec, \"parentId\">) => (node.parentId === ROOT_NODE_ID ? null : node.parentId);\n const byId = new Map(nodes.map((node) => [node.id, node]));\n const children = new Map<string | null, string[]>();\n for (const node of nodes) {\n if (node.id === ROOT_NODE_ID) continue;\n const under = children.get(parentOf(node));\n if (under) under.push(node.type);\n else children.set(parentOf(node), [node.type]);\n }\n const issues = new Map<string, PlacementIssue>();\n for (const node of nodes) {\n if (node.id === ROOT_NODE_ID || !registry.hasNode(node.type)) continue;\n const parentId = parentOf(node);\n const parentType = parentId === null ? null : (byId.get(parentId)?.type ?? null);\n const issue =\n parentIssue(registry, node.type, parentType, options) ??\n siblingIssue(registry, node.type, without(children.get(parentId) ?? [], node.type), options);\n if (issue) issues.set(node.id, issue);\n }\n return issues;\n}\n\n// The node's own type once: a second area is a sibling of the first, the first is not its own.\nfunction without(types: readonly string[], own: string): string[] {\n const at = types.indexOf(own);\n return at === -1 ? [...types] : [...types.slice(0, at), ...types.slice(at + 1)];\n}\n"]}
|
|
@@ -23,6 +23,8 @@ import type { ClipDocument, VisualDocument } from "./types.js";
|
|
|
23
23
|
*/
|
|
24
24
|
export interface ProjectDocument {
|
|
25
25
|
kind: "project";
|
|
26
|
+
/** The format it was written in — see `migrate.ts`. Absent is format 0, every document written before the field existed. */
|
|
27
|
+
formatVersion?: number;
|
|
26
28
|
/** Human-readable project name. */
|
|
27
29
|
name: string;
|
|
28
30
|
/** Target frame rate. Defaults to 60. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/document/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG5D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,SAAS,CAAC;IAChB,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd;;;OAGG;IAC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IACd;;;OAGG;IACH,MAAM,EAAE,KAAK,EAAE,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,KAAK;IAClB;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,qBAAqB;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,IAAI,EAAE,YAAY,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;;OAQG;IACH,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,gDAAgD;AAChD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,eAAe,CAEtE;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC7B,GAAG,EAAE,eAAe,GAAG,cAAc,EACrC,MAAM,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,GAChE,eAAe,CAWjB"}
|
package/dist/document/project.js
CHANGED
|
@@ -15,6 +15,7 @@ export function asProjectDocument(doc, output = {}) {
|
|
|
15
15
|
return doc;
|
|
16
16
|
return {
|
|
17
17
|
kind: "project",
|
|
18
|
+
...(doc.formatVersion !== undefined && { formatVersion: doc.formatVersion }),
|
|
18
19
|
name: output.name ?? "Untitled",
|
|
19
20
|
fps: output.fps,
|
|
20
21
|
viewport: output.viewport,
|