@motionscript/core 0.1.0-alpha.0 → 0.1.0-alpha.10
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 +356 -0
- package/NOTICE +49 -0
- package/README.md +29 -10
- package/dist/assets/catalog.d.ts +9 -0
- package/dist/assets/catalog.d.ts.map +1 -1
- package/dist/assets/catalog.js +11 -0
- package/dist/assets/catalog.js.map +1 -1
- package/dist/assets/errors.d.ts.map +1 -1
- package/dist/assets/errors.js +7 -3
- package/dist/assets/errors.js.map +1 -1
- package/dist/assets/manager.d.ts +26 -1
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/assets/manager.js +99 -15
- package/dist/assets/manager.js.map +1 -1
- package/dist/assets/scope.d.ts +4 -4
- package/dist/assets/scope.d.ts.map +1 -1
- package/dist/assets/scope.js +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 +52 -13
- package/dist/attributes/audio/request.d.ts.map +1 -1
- package/dist/attributes/audio/request.js +10 -1
- package/dist/attributes/audio/request.js.map +1 -1
- package/dist/attributes/audio/schedule.d.ts +26 -24
- package/dist/attributes/audio/schedule.d.ts.map +1 -1
- package/dist/attributes/audio/schedule.js +51 -30
- package/dist/attributes/audio/schedule.js.map +1 -1
- package/dist/attributes/audio/sound.d.ts +18 -13
- package/dist/attributes/audio/sound.d.ts.map +1 -1
- package/dist/attributes/audio/sound.js +13 -11
- 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 +8 -8
- package/dist/attributes/index.d.ts.map +1 -1
- package/dist/attributes/index.js +7 -9
- package/dist/attributes/index.js.map +1 -1
- package/dist/attributes/layout/alignment.js +1 -1
- package/dist/attributes/layout/alignment.js.map +1 -1
- package/dist/attributes/layout/insets.d.ts +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.d.ts +1 -1
- package/dist/attributes/layout/size.js +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/properties/decorator.d.ts +56 -12
- package/dist/attributes/properties/decorator.d.ts.map +1 -1
- package/dist/attributes/properties/decorator.js +59 -19
- package/dist/attributes/properties/decorator.js.map +1 -1
- package/dist/attributes/properties/inputs.d.ts +1 -1
- package/dist/attributes/properties/inputs.js +1 -1
- package/dist/attributes/properties/inputs.js.map +1 -1
- package/dist/attributes/properties/typed.d.ts +27 -141
- package/dist/attributes/properties/typed.d.ts.map +1 -1
- package/dist/attributes/properties/typed.js +24 -106
- package/dist/attributes/properties/typed.js.map +1 -1
- package/dist/attributes/render3d/orbit.d.ts +8 -8
- package/dist/attributes/render3d/orbit.js +7 -7
- package/dist/attributes/render3d/orbit.js.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.d.ts +2 -3
- package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.js +2 -3
- package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
- package/dist/attributes/shape/effects/backdrop.d.ts +4 -4
- package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
- package/dist/attributes/shape/effects/backdrop.js.map +1 -1
- package/dist/attributes/shape/effects/chain.d.ts +117 -522
- package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/chain.js +102 -364
- 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 +98 -28
- 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 +21 -7
- 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 +47 -15
- 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 +82 -34
- 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 +35 -8
- 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 +57 -34
- 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 +6 -8
- 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 +34 -6
- package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
- package/dist/attributes/shape/effects/registry.js +157 -112
- 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.d.ts +2 -6
- package/dist/attributes/shape/effects/union.d.ts.map +1 -1
- package/dist/attributes/shape/effects/union.js.map +1 -1
- package/dist/attributes/shape/fill/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/color/parser.d.ts +1 -1
- package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
- package/dist/attributes/shape/fill/color/parser.js +102 -50
- package/dist/attributes/shape/fill/color/parser.js.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.d.ts +16 -0
- package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -0
- package/dist/attributes/shape/fill/gradient-stops.js +65 -0
- package/dist/attributes/shape/fill/gradient-stops.js.map +1 -0
- package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -2
- package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/conic-gradient.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/conic-gradient.js +2 -5
- package/dist/attributes/shape/fill/implementations/conic-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js +2 -10
- package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.js +5 -4
- package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/linear-gradient.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/linear-gradient.js +2 -6
- package/dist/attributes/shape/fill/implementations/linear-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/radial-gradient.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/radial-gradient.js +2 -5
- package/dist/attributes/shape/fill/implementations/radial-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.d.ts +28 -27
- 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/video.d.ts +1 -1
- package/dist/attributes/shape/fill/implementations/video.js +2 -2
- 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.d.ts +9 -1
- package/dist/attributes/shape/fill/lerp.d.ts.map +1 -1
- package/dist/attributes/shape/fill/lerp.js +12 -1
- package/dist/attributes/shape/fill/lerp.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/filters/chain.d.ts +7 -17
- package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
- package/dist/attributes/shape/filters/chain.js +3 -19
- package/dist/attributes/shape/filters/chain.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/index.d.ts +1 -1
- package/dist/attributes/shape/filters/index.js.map +1 -1
- package/dist/attributes/shape/filters/registry.d.ts +3 -3
- package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
- package/dist/attributes/shape/filters/registry.js +6 -6
- package/dist/attributes/shape/filters/registry.js.map +1 -1
- package/dist/attributes/shape/filters/union.d.ts +12 -13
- package/dist/attributes/shape/filters/union.d.ts.map +1 -1
- package/dist/attributes/shape/filters/union.js.map +1 -1
- package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
- package/dist/attributes/shape/path/anchors.js +12 -5
- package/dist/attributes/shape/path/anchors.js.map +1 -1
- package/dist/attributes/shape/path/morph.d.ts.map +1 -1
- package/dist/attributes/shape/path/morph.js +16 -4
- package/dist/attributes/shape/path/morph.js.map +1 -1
- package/dist/attributes/shape/path/ops.d.ts +1 -2
- package/dist/attributes/shape/path/ops.d.ts.map +1 -1
- package/dist/attributes/shape/path/ops.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/stroke/index.d.ts +2 -2
- package/dist/attributes/shape/stroke/index.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/index.js +1 -1
- package/dist/attributes/shape/stroke/index.js.map +1 -1
- package/dist/attributes/shape/stroke/stroke.d.ts +27 -6
- package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/stroke.js +22 -2
- package/dist/attributes/shape/stroke/stroke.js.map +1 -1
- package/dist/attributes/shared/operators.d.ts +2 -2
- package/dist/attributes/shared/operators.js.map +1 -1
- package/dist/attributes/text/ops.d.ts +6 -0
- package/dist/attributes/text/ops.d.ts.map +1 -1
- package/dist/attributes/text/ops.js +1 -0
- package/dist/attributes/text/ops.js.map +1 -1
- package/dist/attributes/text/types.d.ts +2 -3
- package/dist/attributes/text/types.d.ts.map +1 -1
- package/dist/attributes/text/types.js.map +1 -1
- package/dist/browser/chunks/chunk-4BDLFEOC.js +2 -0
- package/dist/browser/chunks/chunk-4BDLFEOC.js.map +7 -0
- package/dist/browser/chunks/chunk-CCGVIR4F.js +3 -0
- package/dist/browser/chunks/chunk-CCGVIR4F.js.map +7 -0
- package/dist/browser/chunks/chunk-N4WSN5WY.js +13 -0
- package/dist/browser/chunks/chunk-N4WSN5WY.js.map +7 -0
- package/dist/browser/chunks/chunk-WZSI3GSK.js +6 -0
- package/dist/browser/chunks/chunk-WZSI3GSK.js.map +7 -0
- package/dist/browser/component.js +1 -1
- package/dist/browser/component.js.map +4 -4
- package/dist/browser/experimental.js +2 -0
- package/dist/browser/experimental.js.map +7 -0
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/browser/manifest.json +5 -5
- package/dist/browser/sdk.js +1 -1
- package/dist/component.d.ts +10 -19
- package/dist/component.d.ts.map +1 -1
- package/dist/component.js +10 -19
- package/dist/component.js.map +1 -1
- package/dist/components/builtins/audio/audio.d.ts +62 -0
- package/dist/components/builtins/audio/audio.d.ts.map +1 -0
- package/dist/components/builtins/audio/audio.js +38 -0
- package/dist/components/builtins/audio/audio.js.map +1 -0
- package/dist/components/builtins/geometry/composite.d.ts +93 -0
- package/dist/components/builtins/geometry/composite.d.ts.map +1 -0
- package/dist/components/builtins/geometry/composite.js +25 -0
- package/dist/components/builtins/geometry/composite.js.map +1 -0
- package/dist/components/builtins/geometry/geometry.d.ts +921 -0
- package/dist/components/builtins/geometry/geometry.d.ts.map +1 -0
- package/dist/components/builtins/geometry/geometry.js +107 -0
- package/dist/components/builtins/geometry/geometry.js.map +1 -0
- package/dist/{nodes → components/builtins}/geometry/shape-outline.d.ts +5 -5
- package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -0
- package/dist/{nodes → components/builtins}/geometry/shape-outline.js +4 -15
- package/dist/components/builtins/geometry/shape-outline.js.map +1 -0
- package/dist/components/builtins/layout/layout.d.ts +186 -0
- package/dist/components/builtins/layout/layout.d.ts.map +1 -0
- package/dist/components/builtins/layout/layout.js +84 -0
- package/dist/components/builtins/layout/layout.js.map +1 -0
- package/dist/components/builtins/media/media.d.ts +240 -0
- package/dist/components/builtins/media/media.d.ts.map +1 -0
- package/dist/components/builtins/media/media.js +143 -0
- package/dist/components/builtins/media/media.js.map +1 -0
- package/dist/components/builtins/providers/providers.d.ts +47 -0
- package/dist/components/builtins/providers/providers.d.ts.map +1 -0
- package/dist/components/builtins/providers/providers.js +30 -0
- package/dist/components/builtins/providers/providers.js.map +1 -0
- package/dist/{nodes → components/builtins}/text/number-format.d.ts +1 -1
- package/dist/components/builtins/text/number-format.d.ts.map +1 -0
- package/dist/{nodes → components/builtins}/text/number-format.js +1 -1
- package/dist/components/builtins/text/number-format.js.map +1 -0
- package/dist/components/builtins/text/number-pattern.d.ts.map +1 -0
- package/dist/components/builtins/text/number-pattern.js.map +1 -0
- package/dist/{nodes/node → components/builtins/text}/text-defaults.d.ts +10 -12
- package/dist/components/builtins/text/text-defaults.d.ts.map +1 -0
- package/dist/{nodes/node → components/builtins/text}/text-defaults.js +10 -12
- package/dist/components/builtins/text/text-defaults.js.map +1 -0
- package/dist/components/builtins/text/text-layout.d.ts +82 -0
- package/dist/components/builtins/text/text-layout.d.ts.map +1 -0
- package/dist/components/builtins/text/text-layout.js +331 -0
- package/dist/components/builtins/text/text-layout.js.map +1 -0
- package/dist/components/builtins/text/text.d.ts +409 -0
- package/dist/components/builtins/text/text.d.ts.map +1 -0
- package/dist/components/builtins/text/text.js +116 -0
- package/dist/components/builtins/text/text.js.map +1 -0
- package/dist/components/builtins/three/canvas3d.d.ts +245 -0
- package/dist/components/builtins/three/canvas3d.d.ts.map +1 -0
- package/dist/components/builtins/three/canvas3d.js +21 -0
- package/dist/components/builtins/three/canvas3d.js.map +1 -0
- package/dist/{nodes → components/builtins}/three/grid-geometry3d.d.ts +2 -2
- package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -0
- package/dist/{nodes → components/builtins}/three/grid-geometry3d.js +1 -1
- package/dist/components/builtins/three/grid-geometry3d.js.map +1 -0
- package/dist/components/builtins/three/three.d.ts +1889 -0
- package/dist/components/builtins/three/three.d.ts.map +1 -0
- package/dist/components/builtins/three/three.js +305 -0
- package/dist/components/builtins/three/three.js.map +1 -0
- package/dist/components/factory/api.d.ts +543 -0
- package/dist/components/factory/api.d.ts.map +1 -0
- package/dist/components/factory/api.js +4 -0
- package/dist/components/factory/api.js.map +1 -0
- package/dist/components/factory/clip-of.d.ts +5 -0
- package/dist/components/factory/clip-of.d.ts.map +1 -0
- package/dist/components/factory/clip-of.js +33 -0
- package/dist/components/factory/clip-of.js.map +1 -0
- package/dist/components/factory/commands-for.d.ts +19 -0
- package/dist/components/factory/commands-for.d.ts.map +1 -0
- package/dist/components/factory/commands-for.js +5 -0
- package/dist/components/factory/commands-for.js.map +1 -0
- package/dist/components/factory/component-audio.d.ts +9 -0
- package/dist/components/factory/component-audio.d.ts.map +1 -0
- package/dist/components/factory/component-audio.js +18 -0
- package/dist/components/factory/component-audio.js.map +1 -0
- package/dist/components/factory/component2d.d.ts +8 -0
- package/dist/components/factory/component2d.d.ts.map +1 -0
- package/dist/components/factory/component2d.js +240 -0
- package/dist/components/factory/component2d.js.map +1 -0
- package/dist/components/factory/component3d.d.ts +9 -0
- package/dist/components/factory/component3d.d.ts.map +1 -0
- package/dist/components/factory/component3d.js +107 -0
- package/dist/components/factory/component3d.js.map +1 -0
- package/dist/components/factory/factory.d.ts +66 -0
- package/dist/components/factory/factory.d.ts.map +1 -0
- package/dist/components/factory/factory.js +347 -0
- package/dist/components/factory/factory.js.map +1 -0
- package/dist/components/factory/timeline.d.ts +22 -0
- package/dist/components/factory/timeline.d.ts.map +1 -0
- package/dist/components/factory/timeline.js +128 -0
- package/dist/components/factory/timeline.js.map +1 -0
- package/dist/components/factory/type-def.d.ts +26 -0
- package/dist/components/factory/type-def.d.ts.map +1 -0
- package/dist/components/factory/type-def.js +16 -0
- package/dist/components/factory/type-def.js.map +1 -0
- package/dist/components/factory/types.d.ts +91 -0
- package/dist/components/factory/types.d.ts.map +1 -0
- package/dist/components/factory/types.js +88 -0
- package/dist/components/factory/types.js.map +1 -0
- package/dist/components/factory/views.d.ts +121 -0
- package/dist/components/factory/views.d.ts.map +1 -0
- package/dist/components/factory/views.js +453 -0
- package/dist/components/factory/views.js.map +1 -0
- package/dist/components/modules/aim.d.ts +30 -0
- package/dist/components/modules/aim.d.ts.map +1 -0
- package/dist/components/modules/aim.js +39 -0
- package/dist/components/modules/aim.js.map +1 -0
- package/dist/components/modules/corners.d.ts +13 -0
- package/dist/components/modules/corners.d.ts.map +1 -0
- package/dist/components/modules/corners.js +12 -0
- package/dist/components/modules/corners.js.map +1 -0
- package/dist/components/modules/flow.d.ts +26 -0
- package/dist/components/modules/flow.d.ts.map +1 -0
- package/dist/components/modules/flow.js +57 -0
- package/dist/components/modules/flow.js.map +1 -0
- package/dist/components/modules/material.d.ts +40 -0
- package/dist/components/modules/material.d.ts.map +1 -0
- package/dist/components/modules/material.js +75 -0
- package/dist/components/modules/material.js.map +1 -0
- package/dist/components/modules/paint.d.ts +71 -0
- package/dist/components/modules/paint.d.ts.map +1 -0
- package/dist/components/modules/paint.js +106 -0
- package/dist/components/modules/paint.js.map +1 -0
- package/dist/components/modules/shapes.d.ts +31 -0
- package/dist/components/modules/shapes.d.ts.map +1 -0
- package/dist/components/modules/shapes.js +43 -0
- package/dist/components/modules/shapes.js.map +1 -0
- package/dist/components/modules/text-layout.d.ts +26 -0
- package/dist/components/modules/text-layout.d.ts.map +1 -0
- package/dist/components/modules/text-layout.js +57 -0
- package/dist/components/modules/text-layout.js.map +1 -0
- package/dist/components/modules/text-style.d.ts +48 -0
- package/dist/components/modules/text-style.d.ts.map +1 -0
- package/dist/components/modules/text-style.js +63 -0
- package/dist/components/modules/text-style.js.map +1 -0
- package/dist/components/modules/three-entries.d.ts +23 -0
- package/dist/components/modules/three-entries.d.ts.map +1 -0
- package/dist/components/modules/three-entries.js +41 -0
- package/dist/components/modules/three-entries.js.map +1 -0
- package/dist/components/modules/view3d.d.ts +59 -0
- package/dist/components/modules/view3d.d.ts.map +1 -0
- package/dist/components/modules/view3d.js +171 -0
- package/dist/components/modules/view3d.js.map +1 -0
- package/dist/{nodes/geometry → components/trees/2d}/group-bounds.d.ts +4 -4
- package/dist/components/trees/2d/group-bounds.d.ts.map +1 -0
- package/dist/{nodes/geometry → components/trees/2d}/group-bounds.js +3 -4
- package/dist/components/trees/2d/group-bounds.js.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-lifecycle.d.ts +2 -2
- package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-lifecycle.js +1 -1
- package/dist/components/trees/2d/node-lifecycle.js.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-motion.d.ts +3 -3
- package/dist/components/trees/2d/node-motion.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-motion.js +1 -1
- package/dist/components/trees/2d/node-motion.js.map +1 -0
- package/dist/components/trees/2d/node-render.d.ts +36 -0
- package/dist/components/trees/2d/node-render.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-render.js +10 -23
- package/dist/components/trees/2d/node-render.js.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-space.d.ts +3 -3
- package/dist/components/trees/2d/node-space.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-space.js +4 -4
- package/dist/components/trees/2d/node-space.js.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-transform.d.ts +2 -2
- package/dist/components/trees/2d/node-transform.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-transform.js +1 -1
- package/dist/components/trees/2d/node-transform.js.map +1 -0
- package/dist/{nodes → components/trees}/2d/node2d.d.ts +206 -185
- package/dist/components/trees/2d/node2d.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node2d.js +296 -324
- package/dist/components/trees/2d/node2d.js.map +1 -0
- package/dist/components/trees/audio/index.d.ts +2 -0
- package/dist/components/trees/audio/index.d.ts.map +1 -0
- package/dist/components/trees/audio/index.js +2 -0
- package/dist/components/trees/audio/index.js.map +1 -0
- package/dist/{nodes → components/trees}/audio/node-audio.d.ts +25 -15
- package/dist/components/trees/audio/node-audio.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/audio/node-audio.js +30 -35
- package/dist/components/trees/audio/node-audio.js.map +1 -0
- package/dist/components/trees/index.d.ts +10 -0
- package/dist/components/trees/index.d.ts.map +1 -0
- package/dist/components/trees/index.js +14 -0
- package/dist/components/trees/index.js.map +1 -0
- package/dist/components/trees/node/node-editor-state.d.ts.map +1 -0
- package/dist/components/trees/node/node-editor-state.js.map +1 -0
- package/dist/{nodes → components/trees}/node/node-reactive.d.ts +9 -10
- package/dist/components/trees/node/node-reactive.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/node/node-reactive.js +16 -13
- package/dist/components/trees/node/node-reactive.js.map +1 -0
- package/dist/{nodes → components/trees}/node/node-time.d.ts +3 -3
- package/dist/components/trees/node/node-time.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/node/node-time.js +1 -1
- package/dist/components/trees/node/node-time.js.map +1 -0
- package/dist/{nodes → components/trees}/node/node-walk.d.ts +1 -1
- package/dist/components/trees/node/node-walk.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/node/node-walk.js +1 -1
- package/dist/components/trees/node/node-walk.js.map +1 -0
- package/dist/{nodes → components/trees}/node/node.d.ts +46 -82
- package/dist/components/trees/node/node.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/node/node.js +89 -114
- package/dist/components/trees/node/node.js.map +1 -0
- package/dist/{nodes/scene → components/trees/root}/canvas2d-node.d.ts +16 -15
- package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -0
- package/dist/{nodes/scene → components/trees/root}/canvas2d-node.js +40 -85
- package/dist/components/trees/root/canvas2d-node.js.map +1 -0
- package/dist/{nodes → components/trees}/three/node3d.d.ts +65 -25
- package/dist/components/trees/three/node3d.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/three/node3d.js +78 -76
- package/dist/components/trees/three/node3d.js.map +1 -0
- package/dist/document/audio.d.ts +10 -2
- package/dist/document/audio.d.ts.map +1 -1
- package/dist/document/audio.js +45 -4
- package/dist/document/audio.js.map +1 -1
- package/dist/document/builtins.d.ts.map +1 -1
- package/dist/document/builtins.js +18 -42
- package/dist/document/builtins.js.map +1 -1
- package/dist/document/command-traits.d.ts +23 -5
- package/dist/document/command-traits.d.ts.map +1 -1
- package/dist/document/command-traits.js +72 -10
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/deny-globals.d.ts +2 -2
- package/dist/document/deny-globals.js +2 -2
- package/dist/document/deny-globals.js.map +1 -1
- package/dist/document/diff.d.ts.map +1 -1
- package/dist/document/diff.js +3 -3
- package/dist/document/diff.js.map +1 -1
- package/dist/document/doc-index.d.ts +2 -2
- package/dist/document/doc-index.d.ts.map +1 -1
- package/dist/document/doc-index.js +3 -3
- package/dist/document/doc-index.js.map +1 -1
- package/dist/document/expression/compile.d.ts.map +1 -1
- package/dist/document/expression/compile.js +8 -5
- package/dist/document/expression/compile.js.map +1 -1
- package/dist/document/expression/index.d.ts +1 -1
- package/dist/document/expression/index.js +1 -1
- package/dist/document/expression/index.js.map +1 -1
- package/dist/document/expression/ops.js +2 -2
- package/dist/document/expression/ops.js.map +1 -1
- package/dist/document/expression/parse.d.ts.map +1 -1
- package/dist/document/expression/parse.js +15 -6
- package/dist/document/expression/parse.js.map +1 -1
- package/dist/document/expression/refs.d.ts +1 -1
- package/dist/document/expression/refs.js +1 -1
- package/dist/document/expression/refs.js.map +1 -1
- package/dist/document/expression/walk.d.ts.map +1 -1
- package/dist/document/expression/walk.js +2 -1
- package/dist/document/expression/walk.js.map +1 -1
- package/dist/document/index.d.ts +10 -1
- package/dist/document/index.d.ts.map +1 -1
- package/dist/document/index.js +6 -1
- 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.d.ts +14 -10
- package/dist/document/node-decorator.d.ts.map +1 -1
- package/dist/document/node-decorator.js +14 -10
- package/dist/document/node-decorator.js.map +1 -1
- package/dist/document/node-descriptor.d.ts +32 -3
- 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 +71 -0
- package/dist/document/placement.d.ts.map +1 -0
- package/dist/document/placement.js +83 -0
- package/dist/document/placement.js.map +1 -0
- package/dist/document/project.d.ts +4 -2
- 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 +71 -44
- package/dist/document/registry.d.ts.map +1 -1
- package/dist/document/registry.js +94 -35
- package/dist/document/registry.js.map +1 -1
- package/dist/document/settled-index.d.ts +57 -0
- package/dist/document/settled-index.d.ts.map +1 -0
- package/dist/document/settled-index.js +264 -0
- package/dist/document/settled-index.js.map +1 -0
- 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 +145 -20
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +478 -80
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.d.ts +30 -44
- package/dist/document/types.d.ts.map +1 -1
- package/dist/document/types.js +2 -2
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.d.ts +20 -8
- package/dist/document/validate.d.ts.map +1 -1
- package/dist/document/validate.js +195 -52
- 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 +82 -0
- package/dist/experimental.d.ts.map +1 -0
- package/dist/experimental.js +34 -0
- package/dist/experimental.js.map +1 -0
- package/dist/index.d.ts +11 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/layout/bounds.d.ts +0 -1
- package/dist/layout/bounds.d.ts.map +1 -1
- package/dist/layout/bounds.js.map +1 -1
- package/dist/layout/flex.d.ts +4 -2
- package/dist/layout/flex.d.ts.map +1 -1
- package/dist/layout/flex.js +27 -11
- package/dist/layout/flex.js.map +1 -1
- package/dist/layout/ops.d.ts +6 -0
- package/dist/layout/ops.d.ts.map +1 -1
- package/dist/layout/ops.js +6 -0
- package/dist/layout/ops.js.map +1 -1
- package/dist/layout/types.d.ts +1 -1
- package/dist/layout/types.js.map +1 -1
- package/dist/platform/audio-sink.d.ts +2 -2
- package/dist/platform/audio-sink.d.ts.map +1 -1
- package/dist/platform/audio-sink.js.map +1 -1
- package/dist/platform/exporter.d.ts +26 -8
- package/dist/platform/exporter.d.ts.map +1 -1
- package/dist/platform/exporter.js.map +1 -1
- package/dist/platform/index.d.ts +1 -1
- package/dist/platform/index.d.ts.map +1 -1
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/storage-adapter.d.ts +12 -6
- package/dist/platform/storage-adapter.d.ts.map +1 -1
- package/dist/platform/storage-adapter.js +4 -0
- package/dist/platform/storage-adapter.js.map +1 -1
- package/dist/platform/ticker.d.ts +6 -0
- package/dist/platform/ticker.d.ts.map +1 -1
- package/dist/platform/ticker.js +6 -0
- package/dist/platform/ticker.js.map +1 -1
- package/dist/project/tree.d.ts +3 -3
- package/dist/project/tree.d.ts.map +1 -1
- package/dist/project/tree.js.map +1 -1
- package/dist/props/host.d.ts +6 -1
- package/dist/props/host.d.ts.map +1 -1
- package/dist/props/host.js +3 -1
- package/dist/props/host.js.map +1 -1
- package/dist/props/layout.d.ts +29 -0
- package/dist/props/layout.d.ts.map +1 -0
- package/dist/props/layout.js +84 -0
- package/dist/props/layout.js.map +1 -0
- package/dist/props/slot.d.ts +1 -1
- package/dist/props/slot.js +1 -1
- package/dist/props/slot.js.map +1 -1
- package/dist/renamed-scene-names.d.ts +17 -0
- package/dist/renamed-scene-names.d.ts.map +1 -0
- package/dist/renamed-scene-names.js +9 -0
- package/dist/renamed-scene-names.js.map +1 -0
- package/dist/render/canvas-render-context2d.d.ts +19 -3
- package/dist/render/canvas-render-context2d.d.ts.map +1 -1
- package/dist/render/canvas-render-context2d.js +20 -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.d.ts +1 -1
- package/dist/render/clip.js +1 -1
- package/dist/render/clip.js.map +1 -1
- package/dist/render/descriptors/rect.js.map +1 -1
- package/dist/render/descriptors/shape.d.ts +12 -0
- package/dist/render/descriptors/shape.d.ts.map +1 -1
- package/dist/render/descriptors/shape.js.map +1 -1
- package/dist/render/descriptors/text.d.ts +15 -9
- package/dist/render/descriptors/text.d.ts.map +1 -1
- package/dist/render/descriptors/text.js +11 -5
- package/dist/render/descriptors/text.js.map +1 -1
- package/dist/render/descriptors/transform.d.ts +2 -2
- package/dist/render/descriptors/transform.d.ts.map +1 -1
- package/dist/render/descriptors/transform.js.map +1 -1
- package/dist/render/graphics2d.d.ts +3 -3
- package/dist/render/graphics2d.d.ts.map +1 -1
- package/dist/render/graphics2d.js +1 -1
- package/dist/render/graphics2d.js.map +1 -1
- package/dist/render/index.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/render-context2d.d.ts +8 -8
- package/dist/render/render-context2d.d.ts.map +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/render3d/bounds3d.d.ts.map +1 -1
- package/dist/render3d/bounds3d.js +4 -2
- package/dist/render3d/bounds3d.js.map +1 -1
- package/dist/render3d/builders.d.ts +1 -1
- package/dist/render3d/builders.js +1 -1
- package/dist/render3d/builders.js.map +1 -1
- package/dist/render3d/camera.d.ts +6 -0
- package/dist/render3d/camera.d.ts.map +1 -1
- package/dist/render3d/camera.js +5 -3
- package/dist/render3d/camera.js.map +1 -1
- package/dist/render3d/fill3d.d.ts +2 -9
- package/dist/render3d/fill3d.d.ts.map +1 -1
- package/dist/render3d/fill3d.js +2 -13
- package/dist/render3d/fill3d.js.map +1 -1
- package/dist/render3d/geometry.d.ts +8 -1
- package/dist/render3d/geometry.d.ts.map +1 -1
- package/dist/render3d/geometry.js.map +1 -1
- package/dist/render3d/graphics3d.d.ts +21 -23
- package/dist/render3d/graphics3d.d.ts.map +1 -1
- package/dist/render3d/graphics3d.js +85 -34
- package/dist/render3d/graphics3d.js.map +1 -1
- package/dist/render3d/index.d.ts +1 -1
- package/dist/render3d/index.js +1 -1
- package/dist/render3d/index.js.map +1 -1
- package/dist/render3d/inert.d.ts +14 -0
- package/dist/render3d/inert.d.ts.map +1 -0
- package/dist/render3d/inert.js +62 -0
- package/dist/render3d/inert.js.map +1 -0
- package/dist/render3d/material.d.ts +10 -5
- package/dist/render3d/material.d.ts.map +1 -1
- package/dist/render3d/material.js.map +1 -1
- package/dist/render3d/resources.d.ts +2 -2
- package/dist/render3d/resources.js +2 -2
- package/dist/render3d/resources.js.map +1 -1
- package/dist/render3d/scene-settings.d.ts +23 -4
- package/dist/render3d/scene-settings.d.ts.map +1 -1
- package/dist/render3d/scene-settings.js.map +1 -1
- package/dist/render3d/scene3d.d.ts +12 -1
- package/dist/render3d/scene3d.d.ts.map +1 -1
- package/dist/render3d/scene3d.js +40 -7
- package/dist/render3d/scene3d.js.map +1 -1
- package/dist/render3d/texture.d.ts +11 -2
- package/dist/render3d/texture.d.ts.map +1 -1
- package/dist/render3d/texture.js +13 -0
- package/dist/render3d/texture.js.map +1 -1
- package/dist/render3d/transform.d.ts +1 -1
- package/dist/render3d/transform.js.map +1 -1
- package/dist/render3d/vector3.d.ts +20 -3
- package/dist/render3d/vector3.d.ts.map +1 -1
- package/dist/render3d/vector3.js +29 -2
- package/dist/render3d/vector3.js.map +1 -1
- package/dist/render3d/walk.d.ts +1 -1
- package/dist/render3d/walk.d.ts.map +1 -1
- package/dist/render3d/walk.js +5 -1
- package/dist/render3d/walk.js.map +1 -1
- package/dist/runtime/asset-refine.d.ts +1 -1
- package/dist/runtime/asset-refine.d.ts.map +1 -1
- package/dist/runtime/asset-refine.js +3 -2
- 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 +8 -1
- package/dist/runtime/asset-update.js.map +1 -1
- package/dist/runtime/audio-index.d.ts +0 -11
- package/dist/runtime/audio-index.d.ts.map +1 -1
- package/dist/runtime/audio-index.js +0 -19
- package/dist/runtime/audio-index.js.map +1 -1
- package/dist/runtime/clip-instance.d.ts +13 -6
- package/dist/runtime/clip-instance.d.ts.map +1 -1
- package/dist/runtime/clip-instance.js +34 -12
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.d.ts +20 -3
- package/dist/runtime/clip-store.d.ts.map +1 -1
- package/dist/runtime/clip-store.js +132 -27
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.d.ts +13 -6
- package/dist/runtime/engine.d.ts.map +1 -1
- package/dist/runtime/engine.js +6 -3
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/frame-time.d.ts +31 -0
- package/dist/runtime/frame-time.d.ts.map +1 -0
- package/dist/runtime/frame-time.js +29 -0
- package/dist/runtime/frame-time.js.map +1 -0
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +1 -0
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/node-picking.d.ts +45 -4
- package/dist/runtime/node-picking.d.ts.map +1 -1
- package/dist/runtime/node-picking.js +127 -13
- package/dist/runtime/node-picking.js.map +1 -1
- package/dist/runtime/node-picking3d.d.ts +14 -6
- package/dist/runtime/node-picking3d.d.ts.map +1 -1
- package/dist/runtime/node-picking3d.js +10 -2
- package/dist/runtime/node-picking3d.js.map +1 -1
- package/dist/runtime/placement.d.ts.map +1 -1
- package/dist/runtime/placement.js +4 -5
- package/dist/runtime/placement.js.map +1 -1
- package/dist/runtime/playback-controller.d.ts +32 -3
- package/dist/runtime/playback-controller.d.ts.map +1 -1
- package/dist/runtime/playback-controller.js +78 -11
- package/dist/runtime/playback-controller.js.map +1 -1
- package/dist/runtime/session.d.ts +16 -10
- package/dist/runtime/session.d.ts.map +1 -1
- package/dist/runtime/session.js +23 -8
- package/dist/runtime/session.js.map +1 -1
- package/dist/runtime/state-evaluator.d.ts +2 -2
- package/dist/runtime/state-evaluator.d.ts.map +1 -1
- package/dist/runtime/state-evaluator.js +4 -3
- package/dist/runtime/state-evaluator.js.map +1 -1
- package/dist/runtime/text-geometry.d.ts +2 -2
- package/dist/runtime/text-geometry.d.ts.map +1 -1
- package/dist/runtime/text-geometry.js +6 -3
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.d.ts +70 -38
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +71 -46
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command-decorator.d.ts +21 -8
- package/dist/tween/command-decorator.d.ts.map +1 -1
- package/dist/tween/command-decorator.js +12 -23
- package/dist/tween/command-decorator.js.map +1 -1
- package/dist/tween/command.d.ts +13 -1
- package/dist/tween/command.d.ts.map +1 -1
- package/dist/tween/command.js +14 -0
- package/dist/tween/command.js.map +1 -1
- package/dist/tween/ease/constants.d.ts.map +1 -1
- package/dist/tween/ease/constants.js +8 -5
- package/dist/tween/ease/constants.js.map +1 -1
- package/dist/tween/ease/curve.d.ts.map +1 -1
- package/dist/tween/ease/curve.js +4 -3
- package/dist/tween/ease/curve.js.map +1 -1
- package/dist/tween/ease/describe.d.ts +17 -0
- package/dist/tween/ease/describe.d.ts.map +1 -0
- package/dist/tween/ease/describe.js +41 -0
- package/dist/tween/ease/describe.js.map +1 -0
- 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/index.d.ts +3 -1
- package/dist/tween/index.d.ts.map +1 -1
- package/dist/tween/index.js +2 -1
- package/dist/tween/index.js.map +1 -1
- package/dist/tween/loop.d.ts +1 -1
- package/dist/tween/loop.js +1 -1
- package/dist/tween/loop.js.map +1 -1
- package/dist/tween/prepare.d.ts +3 -3
- package/dist/tween/prepare.js +3 -3
- package/dist/tween/prepare.js.map +1 -1
- package/dist/util/metrics.d.ts +1 -1
- package/dist/util/metrics.js +1 -1
- package/dist/util/metrics.js.map +1 -1
- package/dist/util/reference.d.ts +6 -6
- package/dist/util/reference.js.map +1 -1
- package/package.json +8 -10
- 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 -249
- 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/effects/implementations/displace.d.ts +0 -48
- package/dist/attributes/shape/effects/implementations/displace.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/displace.js +0 -30
- package/dist/attributes/shape/effects/implementations/displace.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/god-rays.d.ts +0 -28
- package/dist/attributes/shape/effects/implementations/god-rays.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/god-rays.js +0 -26
- package/dist/attributes/shape/effects/implementations/god-rays.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/texture.d.ts +0 -28
- package/dist/attributes/shape/effects/implementations/texture.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/texture.js +0 -25
- package/dist/attributes/shape/effects/implementations/texture.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/trails.d.ts +0 -41
- package/dist/attributes/shape/effects/implementations/trails.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/trails.js +0 -22
- package/dist/attributes/shape/effects/implementations/trails.js.map +0 -1
- package/dist/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-2T3HXSC2.js +0 -2
- package/dist/browser/chunks/chunk-2T3HXSC2.js.map +0 -7
- package/dist/browser/chunks/chunk-P3XQCHDW.js +0 -16
- package/dist/browser/chunks/chunk-P3XQCHDW.js.map +0 -7
- package/dist/browser/chunks/chunk-VJQMKHGQ.js +0 -3
- package/dist/browser/chunks/chunk-VJQMKHGQ.js.map +0 -7
- package/dist/browser/jsx-jsx-dev-runtime.js +0 -2
- package/dist/browser/jsx-jsx-dev-runtime.js.map +0 -7
- package/dist/browser/jsx-jsx-runtime.js +0 -2
- package/dist/browser/jsx-jsx-runtime.js.map +0 -7
- 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 -19
- package/dist/jsx/jsx-runtime.d.ts.map +0 -1
- package/dist/jsx/jsx-runtime.js +0 -16
- package/dist/jsx/jsx-runtime.js.map +0 -1
- package/dist/nodes/2d/node-lifecycle.d.ts.map +0 -1
- package/dist/nodes/2d/node-lifecycle.js.map +0 -1
- package/dist/nodes/2d/node-motion.d.ts.map +0 -1
- 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.map +0 -1
- package/dist/nodes/2d/node-space.d.ts.map +0 -1
- package/dist/nodes/2d/node-space.js.map +0 -1
- package/dist/nodes/2d/node-transform.d.ts.map +0 -1
- package/dist/nodes/2d/node-transform.js.map +0 -1
- package/dist/nodes/2d/node2d.d.ts.map +0 -1
- package/dist/nodes/2d/node2d.js.map +0 -1
- package/dist/nodes/2d/paint-node.d.ts +0 -115
- package/dist/nodes/2d/paint-node.d.ts.map +0 -1
- package/dist/nodes/2d/paint-node.js +0 -190
- 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 -4
- package/dist/nodes/audio/index.js.map +0 -1
- package/dist/nodes/audio/node-audio.d.ts.map +0 -1
- package/dist/nodes/audio/node-audio.js.map +0 -1
- package/dist/nodes/audio/sound-node.d.ts +0 -40
- package/dist/nodes/audio/sound-node.d.ts.map +0 -1
- package/dist/nodes/audio/sound-node.js +0 -68
- 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/dot-grid-node.d.ts +0 -105
- package/dist/nodes/geometry/dot-grid-node.d.ts.map +0 -1
- package/dist/nodes/geometry/dot-grid-node.js +0 -142
- package/dist/nodes/geometry/dot-grid-node.js.map +0 -1
- package/dist/nodes/geometry/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/grid-lines.d.ts +0 -101
- package/dist/nodes/geometry/grid-lines.d.ts.map +0 -1
- package/dist/nodes/geometry/grid-lines.js +0 -128
- package/dist/nodes/geometry/grid-lines.js.map +0 -1
- package/dist/nodes/geometry/grid-pattern-node.d.ts +0 -58
- package/dist/nodes/geometry/grid-pattern-node.d.ts.map +0 -1
- package/dist/nodes/geometry/grid-pattern-node.js +0 -172
- package/dist/nodes/geometry/grid-pattern-node.js.map +0 -1
- package/dist/nodes/geometry/group-bounds.d.ts.map +0 -1
- package/dist/nodes/geometry/group-bounds.js.map +0 -1
- package/dist/nodes/geometry/line-grid-node.d.ts +0 -62
- package/dist/nodes/geometry/line-grid-node.d.ts.map +0 -1
- package/dist/nodes/geometry/line-grid-node.js +0 -127
- package/dist/nodes/geometry/line-grid-node.js.map +0 -1
- package/dist/nodes/geometry/line-node.d.ts +0 -58
- package/dist/nodes/geometry/line-node.d.ts.map +0 -1
- package/dist/nodes/geometry/line-node.js +0 -123
- package/dist/nodes/geometry/line-node.js.map +0 -1
- package/dist/nodes/geometry/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 -52
- 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.map +0 -1
- package/dist/nodes/geometry/shape-outline.js.map +0 -1
- package/dist/nodes/geometry/viewport-pattern-node.d.ts +0 -39
- package/dist/nodes/geometry/viewport-pattern-node.d.ts.map +0 -1
- package/dist/nodes/geometry/viewport-pattern-node.js +0 -79
- package/dist/nodes/geometry/viewport-pattern-node.js.map +0 -1
- package/dist/nodes/index.d.ts +0 -46
- package/dist/nodes/index.d.ts.map +0 -1
- package/dist/nodes/index.js +0 -54
- package/dist/nodes/index.js.map +0 -1
- package/dist/nodes/layout/camera-node.d.ts +0 -71
- package/dist/nodes/layout/camera-node.d.ts.map +0 -1
- package/dist/nodes/layout/camera-node.js +0 -118
- 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 -348
- 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.map +0 -1
- package/dist/nodes/node/node-editor-state.js.map +0 -1
- package/dist/nodes/node/node-reactive.d.ts.map +0 -1
- package/dist/nodes/node/node-reactive.js.map +0 -1
- package/dist/nodes/node/node-time.d.ts.map +0 -1
- package/dist/nodes/node/node-time.js.map +0 -1
- package/dist/nodes/node/node-walk.d.ts.map +0 -1
- package/dist/nodes/node/node-walk.js.map +0 -1
- package/dist/nodes/node/node.d.ts.map +0 -1
- package/dist/nodes/node/node.js.map +0 -1
- package/dist/nodes/node/text-defaults.d.ts.map +0 -1
- package/dist/nodes/node/text-defaults.js.map +0 -1
- package/dist/nodes/scene/canvas2d-node.d.ts.map +0 -1
- package/dist/nodes/scene/canvas2d-node.js.map +0 -1
- package/dist/nodes/scene/provider-node.d.ts +0 -47
- package/dist/nodes/scene/provider-node.d.ts.map +0 -1
- package/dist/nodes/scene/provider-node.js +0 -63
- package/dist/nodes/scene/provider-node.js.map +0 -1
- package/dist/nodes/scene/theme-provider-node.d.ts +0 -29
- package/dist/nodes/scene/theme-provider-node.d.ts.map +0 -1
- package/dist/nodes/scene/theme-provider-node.js +0 -43
- package/dist/nodes/scene/theme-provider-node.js.map +0 -1
- package/dist/nodes/text/default-text-style-node.d.ts +0 -100
- package/dist/nodes/text/default-text-style-node.d.ts.map +0 -1
- package/dist/nodes/text/default-text-style-node.js +0 -140
- package/dist/nodes/text/default-text-style-node.js.map +0 -1
- package/dist/nodes/text/number-format.d.ts.map +0 -1
- 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.map +0 -1
- package/dist/nodes/text/number-pattern.js.map +0 -1
- package/dist/nodes/text/richtext-node.d.ts +0 -73
- package/dist/nodes/text/richtext-node.d.ts.map +0 -1
- package/dist/nodes/text/richtext-node.js +0 -144
- package/dist/nodes/text/richtext-node.js.map +0 -1
- package/dist/nodes/text/text-base.d.ts +0 -135
- package/dist/nodes/text/text-base.d.ts.map +0 -1
- package/dist/nodes/text/text-base.js +0 -504
- package/dist/nodes/text/text-base.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 -91
- package/dist/nodes/three/camera-nodes.d.ts.map +0 -1
- package/dist/nodes/three/camera-nodes.js +0 -71
- package/dist/nodes/three/camera-nodes.js.map +0 -1
- package/dist/nodes/three/canvas3d-node.d.ts +0 -270
- package/dist/nodes/three/canvas3d-node.d.ts.map +0 -1
- package/dist/nodes/three/canvas3d-node.js +0 -438
- package/dist/nodes/three/canvas3d-node.js.map +0 -1
- package/dist/nodes/three/drawable-nodes.d.ts +0 -159
- package/dist/nodes/three/drawable-nodes.d.ts.map +0 -1
- package/dist/nodes/three/drawable-nodes.js +0 -254
- package/dist/nodes/three/drawable-nodes.js.map +0 -1
- package/dist/nodes/three/environment-nodes.d.ts +0 -100
- 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.map +0 -1
- 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.map +0 -1
- 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 -70
- package/dist/tween/seekable.d.ts.map +0 -1
- package/dist/tween/seekable.js +0 -122
- package/dist/tween/seekable.js.map +0 -1
- /package/dist/{nodes → components/builtins}/text/number-pattern.d.ts +0 -0
- /package/dist/{nodes → components/builtins}/text/number-pattern.js +0 -0
- /package/dist/{nodes → components/trees}/node/node-editor-state.d.ts +0 -0
- /package/dist/{nodes → components/trees}/node/node-editor-state.js +0 -0
|
@@ -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;QACpE,KAAK,CACD,2BAA2B,OAAO,0CAA0C,SAAS,KAAK;YAC1F,8BAA8B,CACjC,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,C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O,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;AAmBtE,MAAM,aAAa,GAAG,WAAW,CAAC,EAAE,GAAG,EAAE,eAAe,EAAE,CAAC,CAAC;AAC5D,MAAM,aAAa,GAAG,WAAW,CAAC,EAAE,GAAG,EAAE,eAAe,EAAE,CAAC,CAAC;AAC5D,MAAM,gBAAgB,GAAG,cAAc,CAAC,EAAE,GAAG,EAAE,k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,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,5 +1,5 @@
|
|
|
1
1
|
import type { NodeTypeDescriptor } from "./node-descriptor.js";
|
|
2
|
-
/** Symbol under which
|
|
2
|
+
/** Symbol under which `node` metadata is stored on a class prototype. */
|
|
3
3
|
export declare const NODE_META: unique symbol;
|
|
4
4
|
/**
|
|
5
5
|
* Declare a node class's document key — and nothing else.
|
|
@@ -7,22 +7,26 @@ export declare const NODE_META: unique symbol;
|
|
|
7
7
|
* **It does not register.** Registration happens when the class is handed to a
|
|
8
8
|
* `Registry` (`new Engine(platform, { nodes: [Blob] })`), because a registry is
|
|
9
9
|
* a value an engine owns rather than a table the module graph writes into. A
|
|
10
|
-
*
|
|
10
|
+
* declaration that registered made the *order modules happened to be imported in*
|
|
11
11
|
* part of the engine's state: whichever host loaded first won the key, a second
|
|
12
12
|
* engine in the same process inherited a vocabulary it never asked for, and a
|
|
13
13
|
* class that was merely imported was already registered whether or not anything
|
|
14
14
|
* meant to offer it.
|
|
15
15
|
*
|
|
16
|
-
* What is left is a declaration, read back by {@link getNodeDescriptor}
|
|
16
|
+
* What is left is a declaration, read back by {@link getNodeDescriptor}. A
|
|
17
|
+
* component factory makes it for the class it generates (`component2d({ key })`);
|
|
18
|
+
* a hand-written class makes it itself:
|
|
17
19
|
*
|
|
18
20
|
* ```ts
|
|
19
|
-
* @node("blob")
|
|
20
21
|
* class Blob extends Node2D<BlobProps> {
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* @command({ args: ["wobble"] })
|
|
22
|
+
* declare readonly wobble: number;
|
|
24
23
|
* wobbleTo(args: CommandArgs<{ wobble: number }>) { … }
|
|
25
24
|
* }
|
|
25
|
+
* declareMembers(Blob, {
|
|
26
|
+
* wobble: property({ default: 0.4 }),
|
|
27
|
+
* wobbleTo: command({ args: ["wobble"] }),
|
|
28
|
+
* });
|
|
29
|
+
* node("blob")(Blob);
|
|
26
30
|
*
|
|
27
31
|
* const registry = new Registry({ nodes: [Blob] });
|
|
28
32
|
* // { "type": "blob", "props": { "wobble": 0.4 } }
|
|
@@ -34,12 +38,12 @@ export declare const NODE_META: unique symbol;
|
|
|
34
38
|
* `manifest.json` beside a class nothing checked it against:
|
|
35
39
|
*
|
|
36
40
|
* ```ts
|
|
37
|
-
*
|
|
41
|
+
* node({
|
|
38
42
|
* key: "lineChart",
|
|
39
43
|
* forkable: true,
|
|
40
44
|
* layout: { children: "freeform", acceptsChildren: true },
|
|
41
45
|
* seed: { width: 760, height: 460 },
|
|
42
|
-
* })
|
|
46
|
+
* })(LineChart);
|
|
43
47
|
* ```
|
|
44
48
|
*
|
|
45
49
|
* None of it is read while rendering — see {@link NodeTypeDescriptor}.
|
|
@@ -51,7 +55,7 @@ export declare const NODE_META: unique symbol;
|
|
|
51
55
|
*/
|
|
52
56
|
export declare function node(type: string | NodeTypeDescriptor): <T extends new (...args: never[]) => object>(ctor: T) => T;
|
|
53
57
|
/**
|
|
54
|
-
* What
|
|
58
|
+
* What `node` declared on this exact class, or `undefined`.
|
|
55
59
|
*
|
|
56
60
|
* Own prototype only, deliberately: a subclass inherits its parent's methods but
|
|
57
61
|
* not its identity, and a `Card extends Rect` that answered to `"rect"` would
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-decorator.d.ts","sourceRoot":"","sources":["../../src/document/node-decorator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,
|
|
1
|
+
{"version":3,"file":"node-decorator.d.ts","sourceRoot":"","sources":["../../src/document/node-decorator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,yEAAyE;AACzE,eAAO,MAAM,SAAS,eAAqB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,IAKjC,CAAC,SAAS,KAAK,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,MAAM,EAAE,MAAM,CAAC,KAAG,CAAC,CAK3E;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAIxG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Symbol under which
|
|
1
|
+
/** Symbol under which `node` metadata is stored on a class prototype. */
|
|
2
2
|
export const NODE_META = Symbol("nodeMeta");
|
|
3
3
|
/**
|
|
4
4
|
* Declare a node class's document key — and nothing else.
|
|
@@ -6,22 +6,26 @@ export const NODE_META = Symbol("nodeMeta");
|
|
|
6
6
|
* **It does not register.** Registration happens when the class is handed to a
|
|
7
7
|
* `Registry` (`new Engine(platform, { nodes: [Blob] })`), because a registry is
|
|
8
8
|
* a value an engine owns rather than a table the module graph writes into. A
|
|
9
|
-
*
|
|
9
|
+
* declaration that registered made the *order modules happened to be imported in*
|
|
10
10
|
* part of the engine's state: whichever host loaded first won the key, a second
|
|
11
11
|
* engine in the same process inherited a vocabulary it never asked for, and a
|
|
12
12
|
* class that was merely imported was already registered whether or not anything
|
|
13
13
|
* meant to offer it.
|
|
14
14
|
*
|
|
15
|
-
* What is left is a declaration, read back by {@link getNodeDescriptor}
|
|
15
|
+
* What is left is a declaration, read back by {@link getNodeDescriptor}. A
|
|
16
|
+
* component factory makes it for the class it generates (`component2d({ key })`);
|
|
17
|
+
* a hand-written class makes it itself:
|
|
16
18
|
*
|
|
17
19
|
* ```ts
|
|
18
|
-
* @node("blob")
|
|
19
20
|
* class Blob extends Node2D<BlobProps> {
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* @command({ args: ["wobble"] })
|
|
21
|
+
* declare readonly wobble: number;
|
|
23
22
|
* wobbleTo(args: CommandArgs<{ wobble: number }>) { … }
|
|
24
23
|
* }
|
|
24
|
+
* declareMembers(Blob, {
|
|
25
|
+
* wobble: property({ default: 0.4 }),
|
|
26
|
+
* wobbleTo: command({ args: ["wobble"] }),
|
|
27
|
+
* });
|
|
28
|
+
* node("blob")(Blob);
|
|
25
29
|
*
|
|
26
30
|
* const registry = new Registry({ nodes: [Blob] });
|
|
27
31
|
* // { "type": "blob", "props": { "wobble": 0.4 } }
|
|
@@ -33,12 +37,12 @@ export const NODE_META = Symbol("nodeMeta");
|
|
|
33
37
|
* `manifest.json` beside a class nothing checked it against:
|
|
34
38
|
*
|
|
35
39
|
* ```ts
|
|
36
|
-
*
|
|
40
|
+
* node({
|
|
37
41
|
* key: "lineChart",
|
|
38
42
|
* forkable: true,
|
|
39
43
|
* layout: { children: "freeform", acceptsChildren: true },
|
|
40
44
|
* seed: { width: 760, height: 460 },
|
|
41
|
-
* })
|
|
45
|
+
* })(LineChart);
|
|
42
46
|
* ```
|
|
43
47
|
*
|
|
44
48
|
* None of it is read while rendering — see {@link NodeTypeDescriptor}.
|
|
@@ -60,7 +64,7 @@ export function node(type) {
|
|
|
60
64
|
};
|
|
61
65
|
}
|
|
62
66
|
/**
|
|
63
|
-
* What
|
|
67
|
+
* What `node` declared on this exact class, or `undefined`.
|
|
64
68
|
*
|
|
65
69
|
* Own prototype only, deliberately: a subclass inherits its parent's methods but
|
|
66
70
|
* not its identity, and a `Card extends Rect` that answered to `"rect"` would
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-decorator.js","sourceRoot":"","sources":["../../src/document/node-decorator.ts"],"names":[],"mappings":"AAEA,
|
|
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"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropertyEditor } from "../attributes/properties/decorator.js";
|
|
2
|
-
import type { NodeDimension } from "../
|
|
2
|
+
import type { NodeDimension } from "../components/trees/node/node.js";
|
|
3
3
|
/**
|
|
4
4
|
* What a node type declares about itself beyond its key.
|
|
5
5
|
*
|
|
@@ -36,6 +36,12 @@ export interface NodeTypeDescriptor {
|
|
|
36
36
|
* catching the throw.
|
|
37
37
|
*/
|
|
38
38
|
dimension?: NodeDimension;
|
|
39
|
+
/**
|
|
40
|
+
* The trees it takes children from: its own, or a viewport's two (a Canvas
|
|
41
|
+
* 3D takes 2D and 3D); empty for a type that takes none. **Derived** from
|
|
42
|
+
* the class, as {@link dimension} is.
|
|
43
|
+
*/
|
|
44
|
+
holds?: readonly NodeDimension[];
|
|
39
45
|
/**
|
|
40
46
|
* Whether a host may copy this component's source.
|
|
41
47
|
*
|
|
@@ -47,16 +53,37 @@ export interface NodeTypeDescriptor {
|
|
|
47
53
|
/** What a freshly placed one's props are seeded with. */
|
|
48
54
|
seed?: Record<string, unknown>;
|
|
49
55
|
/**
|
|
50
|
-
* The
|
|
56
|
+
* The types this one goes inside: a plot in a coordinate system, a tangent
|
|
57
|
+
* in a plot. A name also stands for every type built on it ({@link parentKey}).
|
|
58
|
+
* Unsaid, it goes wherever its {@link dimension} allows.
|
|
59
|
+
*
|
|
60
|
+
* A statement about the class, not a rule the engine enforces: a node put
|
|
61
|
+
* elsewhere still builds and usually draws nothing, which is exactly what
|
|
62
|
+
* a host is told here so it can offer the type only where it works. See
|
|
63
|
+
* `placement.ts`.
|
|
64
|
+
*/
|
|
65
|
+
within?: readonly string[];
|
|
66
|
+
/**
|
|
67
|
+
* Types it needs at least one of beside it, under the same parent: an area
|
|
68
|
+
* between curves needs a curve. For a requirement that is not a parent,
|
|
69
|
+
* because the thing needed is shared or there may be several of it.
|
|
70
|
+
*/
|
|
71
|
+
beside?: readonly string[];
|
|
72
|
+
/** Takes only the children that name it in their {@link within}: a plot holds its marks, not a photograph. */
|
|
73
|
+
closed?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* The editable properties, by key — **derived from `property`**, never
|
|
51
76
|
* written here.
|
|
52
77
|
*
|
|
53
78
|
* A hand-written list of a class's properties, beside a class of
|
|
54
79
|
* properties, is exactly the restatement this whole descriptor exists to
|
|
55
80
|
* remove. What a host needs beyond the key — a range, an enum's choices, the
|
|
56
|
-
* controls inside an object-valued prop — is declared on the
|
|
81
|
+
* controls inside an object-valued prop — is declared on the `property`
|
|
57
82
|
* itself, which is the thing being edited.
|
|
58
83
|
*/
|
|
59
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>>;
|
|
60
87
|
}
|
|
61
88
|
/** One editable property, as a host draws it. */
|
|
62
89
|
export interface NodePropertyDescriptor extends PropertyEditor {
|
|
@@ -64,6 +91,8 @@ export interface NodePropertyDescriptor extends PropertyEditor {
|
|
|
64
91
|
kind: string;
|
|
65
92
|
/** What a freshly placed node holds, when the class declares one. */
|
|
66
93
|
default?: unknown;
|
|
94
|
+
/** Present when the component deprecated it: why, and what to use instead. A host stops offering it. */
|
|
95
|
+
deprecated?: string;
|
|
67
96
|
}
|
|
68
97
|
/** The layout answer a node type's children get from it. */
|
|
69
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,
|
|
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,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nE,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\";\nimport type { NodeDimension } from \"@/
|
|
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"]}
|