@motionscript/core 0.1.0 → 0.1.1-alpha.1
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 +16 -0
- package/dist/assets/asset-index.d.ts +1 -8
- package/dist/assets/asset-index.d.ts.map +1 -1
- package/dist/assets/asset-index.js +1 -8
- package/dist/assets/asset-index.js.map +1 -1
- package/dist/assets/catalog.d.ts +10 -72
- package/dist/assets/catalog.d.ts.map +1 -1
- package/dist/assets/catalog.js +3 -29
- package/dist/assets/catalog.js.map +1 -1
- package/dist/assets/errors.d.ts +8 -20
- package/dist/assets/errors.d.ts.map +1 -1
- package/dist/assets/errors.js +8 -20
- package/dist/assets/errors.js.map +1 -1
- package/dist/assets/index.d.ts.map +1 -1
- package/dist/assets/index.js.map +1 -1
- package/dist/assets/manager.d.ts +9 -51
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/assets/manager.js +13 -78
- package/dist/assets/manager.js.map +1 -1
- package/dist/assets/record.d.ts +2 -18
- package/dist/assets/record.d.ts.map +1 -1
- package/dist/assets/record.js.map +1 -1
- package/dist/assets/scope.d.ts +3 -18
- package/dist/assets/scope.d.ts.map +1 -1
- package/dist/assets/scope.js +2 -11
- package/dist/assets/scope.js.map +1 -1
- package/dist/attributes/audio/effects/chain.d.ts +2 -12
- package/dist/attributes/audio/effects/chain.d.ts.map +1 -1
- package/dist/attributes/audio/effects/chain.js +1 -7
- package/dist/attributes/audio/effects/chain.js.map +1 -1
- package/dist/attributes/audio/effects/registry.d.ts +3 -18
- package/dist/attributes/audio/effects/registry.d.ts.map +1 -1
- package/dist/attributes/audio/effects/registry.js +4 -23
- package/dist/attributes/audio/effects/registry.js.map +1 -1
- package/dist/attributes/audio/ramp.d.ts +5 -38
- package/dist/attributes/audio/ramp.d.ts.map +1 -1
- package/dist/attributes/audio/ramp.js +3 -28
- package/dist/attributes/audio/ramp.js.map +1 -1
- package/dist/attributes/audio/request.d.ts +10 -80
- package/dist/attributes/audio/request.d.ts.map +1 -1
- package/dist/attributes/audio/request.js +1 -4
- package/dist/attributes/audio/request.js.map +1 -1
- package/dist/attributes/audio/schedule.d.ts +2 -12
- package/dist/attributes/audio/schedule.d.ts.map +1 -1
- package/dist/attributes/audio/schedule.js +2 -11
- package/dist/attributes/audio/schedule.js.map +1 -1
- package/dist/attributes/audio/sound.d.ts +2 -26
- package/dist/attributes/audio/sound.d.ts.map +1 -1
- package/dist/attributes/audio/sound.js +1 -9
- package/dist/attributes/audio/sound.js.map +1 -1
- package/dist/attributes/audio/transition.d.ts +1 -8
- package/dist/attributes/audio/transition.d.ts.map +1 -1
- package/dist/attributes/audio/transition.js.map +1 -1
- package/dist/attributes/layout/alignment.d.ts +6 -38
- package/dist/attributes/layout/alignment.d.ts.map +1 -1
- package/dist/attributes/layout/alignment.js.map +1 -1
- package/dist/attributes/layout/insets.d.ts +2 -27
- package/dist/attributes/layout/insets.d.ts.map +1 -1
- package/dist/attributes/layout/insets.js.map +1 -1
- package/dist/attributes/layout/matrix2d.d.ts +29 -114
- package/dist/attributes/layout/matrix2d.d.ts.map +1 -1
- package/dist/attributes/layout/matrix2d.js +26 -110
- package/dist/attributes/layout/matrix2d.js.map +1 -1
- package/dist/attributes/layout/size.d.ts +3 -25
- package/dist/attributes/layout/size.d.ts.map +1 -1
- package/dist/attributes/layout/size.js +2 -18
- package/dist/attributes/layout/size.js.map +1 -1
- package/dist/attributes/layout/space3d.d.ts +16 -79
- package/dist/attributes/layout/space3d.d.ts.map +1 -1
- package/dist/attributes/layout/space3d.js +17 -81
- package/dist/attributes/layout/space3d.js.map +1 -1
- package/dist/attributes/layout/transform3d.d.ts +2 -23
- package/dist/attributes/layout/transform3d.d.ts.map +1 -1
- package/dist/attributes/layout/transform3d.js +1 -7
- package/dist/attributes/layout/transform3d.js.map +1 -1
- package/dist/attributes/layout/world-transform.d.ts +2 -16
- package/dist/attributes/layout/world-transform.d.ts.map +1 -1
- package/dist/attributes/layout/world-transform.js.map +1 -1
- package/dist/attributes/properties/decorator.d.ts +13 -73
- package/dist/attributes/properties/decorator.d.ts.map +1 -1
- package/dist/attributes/properties/decorator.js +9 -40
- package/dist/attributes/properties/decorator.js.map +1 -1
- package/dist/attributes/properties/typed.d.ts +6 -45
- package/dist/attributes/properties/typed.d.ts.map +1 -1
- package/dist/attributes/properties/typed.js +6 -37
- package/dist/attributes/properties/typed.js.map +1 -1
- package/dist/attributes/render3d/orbit.d.ts +11 -83
- package/dist/attributes/render3d/orbit.d.ts.map +1 -1
- package/dist/attributes/render3d/orbit.js +10 -73
- package/dist/attributes/render3d/orbit.js.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.d.ts +1 -6
- package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
- package/dist/attributes/shape/corners/corner-style.d.ts +4 -25
- package/dist/attributes/shape/corners/corner-style.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-style.js +2 -12
- package/dist/attributes/shape/corners/corner-style.js.map +1 -1
- package/dist/attributes/shape/corners/corners.d.ts +2 -21
- package/dist/attributes/shape/corners/corners.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corners.js +2 -12
- package/dist/attributes/shape/corners/corners.js.map +1 -1
- package/dist/attributes/shape/effects/backdrop.d.ts +2 -18
- package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
- package/dist/attributes/shape/effects/backdrop.js +3 -26
- package/dist/attributes/shape/effects/backdrop.js.map +1 -1
- package/dist/attributes/shape/effects/chain.d.ts +36 -328
- package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/chain.js +24 -242
- package/dist/attributes/shape/effects/chain.js.map +1 -1
- package/dist/attributes/shape/effects/effect-data.d.ts +19 -127
- package/dist/attributes/shape/effects/effect-data.d.ts.map +1 -1
- package/dist/attributes/shape/effects/effect-data.js +6 -33
- package/dist/attributes/shape/effects/effect-data.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.d.ts +6 -26
- package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.js +0 -3
- package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +2 -21
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js +0 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js +0 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.js +0 -1
- package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.js +0 -1
- package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +0 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js +0 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -11
- package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.js +1 -6
- package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.d.ts +4 -35
- package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.js +1 -7
- package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +1 -22
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js +0 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.js +0 -1
- package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.d.ts +2 -15
- package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.js +0 -1
- package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.js +0 -1
- package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.d.ts +7 -47
- package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.js +1 -9
- package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.js +0 -1
- package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js +0 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.d.ts +5 -29
- package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.js +0 -1
- package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.d.ts +3 -12
- package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.js +0 -1
- package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +2 -19
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js +1 -5
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.d.ts +11 -36
- package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.js +2 -8
- package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.js +0 -1
- package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +3 -17
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.js +2 -11
- package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js +0 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.d.ts +2 -14
- package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.js +0 -1
- package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts +1 -15
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js +0 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.d.ts +1 -10
- package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.js +0 -1
- package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +3 -26
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.js +1 -2
- package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +2 -16
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +1 -13
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js +0 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts +1 -8
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js +0 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.js +0 -1
- package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.d.ts +10 -53
- package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.js +2 -9
- package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js +0 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.d.ts +1 -8
- package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.js +0 -1
- package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.js +0 -1
- package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.d.ts +1 -13
- package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.js +0 -1
- package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.js +0 -1
- package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.js +0 -1
- package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.d.ts +3 -24
- package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.js +1 -5
- package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
- package/dist/attributes/shape/effects/registry.d.ts +6 -41
- package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
- package/dist/attributes/shape/effects/registry.js +7 -45
- package/dist/attributes/shape/effects/registry.js.map +1 -1
- package/dist/attributes/shape/effects/spec.d.ts +6 -30
- package/dist/attributes/shape/effects/spec.d.ts.map +1 -1
- package/dist/attributes/shape/effects/spec.js +3 -9
- package/dist/attributes/shape/effects/spec.js.map +1 -1
- package/dist/attributes/shape/fill/blend.d.ts +1 -17
- package/dist/attributes/shape/fill/blend.d.ts.map +1 -1
- package/dist/attributes/shape/fill/blend.js +2 -15
- package/dist/attributes/shape/fill/blend.js.map +1 -1
- package/dist/attributes/shape/fill/chain.d.ts +17 -125
- package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
- package/dist/attributes/shape/fill/chain.js +22 -109
- package/dist/attributes/shape/fill/chain.js.map +1 -1
- package/dist/attributes/shape/fill/coerce.d.ts +10 -35
- package/dist/attributes/shape/fill/coerce.d.ts.map +1 -1
- package/dist/attributes/shape/fill/coerce.js +12 -47
- package/dist/attributes/shape/fill/coerce.js.map +1 -1
- package/dist/attributes/shape/fill/color/parser.d.ts +10 -44
- package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
- package/dist/attributes/shape/fill/color/parser.js +15 -91
- package/dist/attributes/shape/fill/color/parser.js.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.d.ts +1 -8
- package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.js +2 -13
- package/dist/attributes/shape/fill/gradient-stops.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -24
- package/dist/attributes/shape/fill/implementations/canvas3d.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/canvas3d.js +2 -9
- package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/dot-grid.d.ts +1 -14
- package/dist/attributes/shape/fill/implementations/dot-grid.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts +5 -28
- package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js +0 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/grid.d.ts +8 -21
- package/dist/attributes/shape/fill/implementations/grid.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/grid.js +2 -8
- package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.d.ts +13 -79
- package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.js +6 -23
- package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/noise.d.ts +2 -15
- package/dist/attributes/shape/fill/implementations/noise.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.d.ts +11 -45
- package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.js +5 -17
- package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.d.ts +12 -64
- package/dist/attributes/shape/fill/implementations/video.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.js +12 -50
- package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
- package/dist/attributes/shape/fill/lerp.d.ts +2 -13
- package/dist/attributes/shape/fill/lerp.d.ts.map +1 -1
- package/dist/attributes/shape/fill/lerp.js +2 -9
- package/dist/attributes/shape/fill/lerp.js.map +1 -1
- package/dist/attributes/shape/fill/media-preset.d.ts +8 -49
- package/dist/attributes/shape/fill/media-preset.d.ts.map +1 -1
- package/dist/attributes/shape/fill/media-preset.js +8 -35
- package/dist/attributes/shape/fill/media-preset.js.map +1 -1
- package/dist/attributes/shape/fill/registry.d.ts +2 -26
- package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
- package/dist/attributes/shape/fill/registry.js +5 -40
- package/dist/attributes/shape/fill/registry.js.map +1 -1
- package/dist/attributes/shape/fill/union.d.ts +6 -30
- package/dist/attributes/shape/fill/union.d.ts.map +1 -1
- package/dist/attributes/shape/fill/union.js +1 -9
- package/dist/attributes/shape/fill/union.js.map +1 -1
- package/dist/attributes/shape/filters/chain.d.ts +15 -168
- package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
- package/dist/attributes/shape/filters/chain.js +8 -132
- package/dist/attributes/shape/filters/chain.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +1 -7
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/curves.d.ts +1 -7
- package/dist/attributes/shape/filters/implementations/curves.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/echo.d.ts +1 -11
- package/dist/attributes/shape/filters/implementations/echo.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
- package/dist/attributes/shape/filters/index.d.ts +1 -6
- package/dist/attributes/shape/filters/index.d.ts.map +1 -1
- package/dist/attributes/shape/filters/index.js +0 -2
- package/dist/attributes/shape/filters/index.js.map +1 -1
- package/dist/attributes/shape/filters/registry.d.ts +5 -35
- package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
- package/dist/attributes/shape/filters/registry.js +7 -50
- package/dist/attributes/shape/filters/registry.js.map +1 -1
- package/dist/attributes/shape/filters/union.d.ts +10 -51
- 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 +18 -106
- package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
- package/dist/attributes/shape/path/anchors.js +15 -124
- package/dist/attributes/shape/path/anchors.js.map +1 -1
- package/dist/attributes/shape/path/bezier.d.ts +6 -54
- package/dist/attributes/shape/path/bezier.d.ts.map +1 -1
- package/dist/attributes/shape/path/bezier.js +10 -98
- package/dist/attributes/shape/path/bezier.js.map +1 -1
- package/dist/attributes/shape/path/index.d.ts +1 -11
- package/dist/attributes/shape/path/index.d.ts.map +1 -1
- package/dist/attributes/shape/path/index.js +1 -11
- package/dist/attributes/shape/path/index.js.map +1 -1
- package/dist/attributes/shape/path/measure.d.ts +5 -41
- package/dist/attributes/shape/path/measure.d.ts.map +1 -1
- package/dist/attributes/shape/path/measure.js +8 -57
- package/dist/attributes/shape/path/measure.js.map +1 -1
- package/dist/attributes/shape/path/morph.d.ts +4 -41
- package/dist/attributes/shape/path/morph.d.ts.map +1 -1
- package/dist/attributes/shape/path/morph.js +17 -117
- package/dist/attributes/shape/path/morph.js.map +1 -1
- package/dist/attributes/shape/path/ops.d.ts +5 -19
- 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/path/types.d.ts +10 -67
- package/dist/attributes/shape/path/types.d.ts.map +1 -1
- package/dist/attributes/shape/path/types.js +0 -1
- package/dist/attributes/shape/path/types.js.map +1 -1
- package/dist/attributes/shape/path/walk.d.ts +9 -63
- package/dist/attributes/shape/path/walk.d.ts.map +1 -1
- package/dist/attributes/shape/path/walk.js +21 -100
- package/dist/attributes/shape/path/walk.js.map +1 -1
- package/dist/attributes/shape/shaders/language.d.ts +2 -14
- package/dist/attributes/shape/shaders/language.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/language.js +1 -8
- package/dist/attributes/shape/shaders/language.js.map +1 -1
- package/dist/attributes/shape/shaders/pack.d.ts +13 -78
- package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/pack.js +1 -10
- package/dist/attributes/shape/shaders/pack.js.map +1 -1
- package/dist/attributes/shape/shaders/resolve.d.ts +1 -11
- package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/resolve.js +3 -28
- package/dist/attributes/shape/shaders/resolve.js.map +1 -1
- package/dist/attributes/shape/shaders/uniforms.d.ts +3 -24
- package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/uniforms.js +0 -0
- package/dist/attributes/shape/shaders/uniforms.js.map +1 -1
- package/dist/attributes/shape/shadow/shadow.d.ts +3 -20
- package/dist/attributes/shape/shadow/shadow.d.ts.map +1 -1
- package/dist/attributes/shape/shadow/shadow.js +0 -3
- package/dist/attributes/shape/shadow/shadow.js.map +1 -1
- package/dist/attributes/shape/stroke/stroke.d.ts +9 -58
- package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/stroke.js +0 -6
- package/dist/attributes/shape/stroke/stroke.js.map +1 -1
- package/dist/attributes/shared/operators.d.ts +1 -8
- package/dist/attributes/shared/operators.d.ts.map +1 -1
- package/dist/attributes/shared/operators.js.map +1 -1
- package/dist/attributes/text/index.d.ts +1 -11
- package/dist/attributes/text/index.d.ts.map +1 -1
- package/dist/attributes/text/index.js +1 -11
- package/dist/attributes/text/index.js.map +1 -1
- package/dist/attributes/text/ops.d.ts +4 -30
- package/dist/attributes/text/ops.d.ts.map +1 -1
- package/dist/attributes/text/ops.js +7 -23
- package/dist/attributes/text/ops.js.map +1 -1
- package/dist/attributes/text/types.d.ts +5 -28
- package/dist/attributes/text/types.d.ts.map +1 -1
- package/dist/attributes/text/types.js.map +1 -1
- package/dist/browser/chunks/chunk-5GLXFSCC.js +13 -0
- package/dist/browser/chunks/chunk-5GLXFSCC.js.map +7 -0
- package/dist/browser/chunks/{chunk-CCGVIR4F.js → chunk-5TDMGUXQ.js} +3 -3
- package/dist/browser/chunks/chunk-5TDMGUXQ.js.map +7 -0
- package/dist/browser/chunks/{chunk-4BDLFEOC.js → chunk-GEJEQQER.js} +1 -1
- package/dist/browser/chunks/chunk-GEJEQQER.js.map +7 -0
- package/dist/browser/chunks/chunk-MNMIIGNE.js +6 -0
- package/dist/browser/chunks/chunk-MNMIIGNE.js.map +7 -0
- package/dist/browser/component.js +1 -1
- package/dist/browser/experimental.js +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/browser/manifest.json +1 -1
- package/dist/browser/sdk.js +1 -1
- package/dist/component.d.ts +3 -10
- package/dist/component.d.ts.map +1 -1
- package/dist/component.js +3 -10
- package/dist/component.js.map +1 -1
- package/dist/components/builtins/geometry/geometry.d.ts +15 -62
- package/dist/components/builtins/geometry/geometry.d.ts.map +1 -1
- package/dist/components/builtins/geometry/geometry.js.map +1 -1
- package/dist/components/builtins/geometry/shape-outline.d.ts +12 -61
- package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -1
- package/dist/components/builtins/geometry/shape-outline.js +29 -168
- package/dist/components/builtins/geometry/shape-outline.js.map +1 -1
- package/dist/components/builtins/layout/layout.d.ts +1 -14
- package/dist/components/builtins/layout/layout.d.ts.map +1 -1
- package/dist/components/builtins/layout/layout.js.map +1 -1
- package/dist/components/builtins/media/media.d.ts +11 -51
- package/dist/components/builtins/media/media.d.ts.map +1 -1
- package/dist/components/builtins/media/media.js +3 -7
- package/dist/components/builtins/media/media.js.map +1 -1
- package/dist/components/builtins/text/number-format.d.ts +14 -47
- package/dist/components/builtins/text/number-format.d.ts.map +1 -1
- package/dist/components/builtins/text/number-format.js +19 -69
- package/dist/components/builtins/text/number-format.js.map +1 -1
- package/dist/components/builtins/text/number-pattern.d.ts +3 -37
- package/dist/components/builtins/text/number-pattern.d.ts.map +1 -1
- package/dist/components/builtins/text/number-pattern.js +6 -48
- package/dist/components/builtins/text/number-pattern.js.map +1 -1
- package/dist/components/builtins/text/text-defaults.d.ts +7 -25
- package/dist/components/builtins/text/text-defaults.d.ts.map +1 -1
- package/dist/components/builtins/text/text-defaults.js +7 -25
- package/dist/components/builtins/text/text-defaults.js.map +1 -1
- package/dist/components/builtins/text/text-layout.d.ts +2 -11
- package/dist/components/builtins/text/text-layout.d.ts.map +1 -1
- package/dist/components/builtins/text/text-layout.js +7 -22
- package/dist/components/builtins/text/text-layout.js.map +1 -1
- package/dist/components/builtins/text/text.d.ts +8 -46
- package/dist/components/builtins/text/text.d.ts.map +1 -1
- package/dist/components/builtins/text/text.js.map +1 -1
- package/dist/components/builtins/three/canvas3d.d.ts +6 -51
- package/dist/components/builtins/three/canvas3d.d.ts.map +1 -1
- package/dist/components/builtins/three/canvas3d.js.map +1 -1
- package/dist/components/builtins/three/grid-geometry3d.d.ts +3 -39
- package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -1
- package/dist/components/builtins/three/grid-geometry3d.js +8 -46
- package/dist/components/builtins/three/grid-geometry3d.js.map +1 -1
- package/dist/components/builtins/three/three.d.ts +22 -117
- package/dist/components/builtins/three/three.d.ts.map +1 -1
- package/dist/components/builtins/three/three.js +5 -17
- package/dist/components/builtins/three/three.js.map +1 -1
- package/dist/components/factory/api.d.ts.map +1 -1
- package/dist/components/factory/api.js.map +1 -1
- package/dist/components/factory/style.d.ts +38 -0
- package/dist/components/factory/style.d.ts.map +1 -0
- package/dist/components/factory/style.js +104 -0
- package/dist/components/factory/style.js.map +1 -0
- package/dist/components/factory/types.d.ts +9 -0
- package/dist/components/factory/types.d.ts.map +1 -1
- package/dist/components/factory/types.js +11 -0
- package/dist/components/factory/types.js.map +1 -1
- package/dist/components/factory/views.d.ts.map +1 -1
- package/dist/components/factory/views.js +0 -2
- package/dist/components/factory/views.js.map +1 -1
- package/dist/components/trees/2d/group-bounds.d.ts +12 -41
- package/dist/components/trees/2d/group-bounds.d.ts.map +1 -1
- package/dist/components/trees/2d/group-bounds.js +3 -22
- package/dist/components/trees/2d/group-bounds.js.map +1 -1
- package/dist/components/trees/2d/node-lifecycle.d.ts +8 -36
- package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -1
- package/dist/components/trees/2d/node-lifecycle.js +35 -127
- package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
- package/dist/components/trees/2d/node-motion.d.ts +4 -36
- package/dist/components/trees/2d/node-motion.d.ts.map +1 -1
- package/dist/components/trees/2d/node-motion.js +3 -31
- package/dist/components/trees/2d/node-motion.js.map +1 -1
- package/dist/components/trees/2d/node-render.d.ts +3 -20
- package/dist/components/trees/2d/node-render.d.ts.map +1 -1
- package/dist/components/trees/2d/node-render.js +4 -23
- package/dist/components/trees/2d/node-render.js.map +1 -1
- package/dist/components/trees/2d/node-space.d.ts +4 -23
- package/dist/components/trees/2d/node-space.d.ts.map +1 -1
- package/dist/components/trees/2d/node-space.js +3 -17
- package/dist/components/trees/2d/node-space.js.map +1 -1
- package/dist/components/trees/2d/node-transform.d.ts +4 -33
- package/dist/components/trees/2d/node-transform.d.ts.map +1 -1
- package/dist/components/trees/2d/node-transform.js +4 -33
- package/dist/components/trees/2d/node-transform.js.map +1 -1
- package/dist/components/trees/2d/node2d.d.ts +112 -622
- package/dist/components/trees/2d/node2d.d.ts.map +1 -1
- package/dist/components/trees/2d/node2d.js +131 -605
- package/dist/components/trees/2d/node2d.js.map +1 -1
- package/dist/components/trees/audio/node-audio.d.ts +17 -65
- package/dist/components/trees/audio/node-audio.d.ts.map +1 -1
- package/dist/components/trees/audio/node-audio.js +18 -68
- package/dist/components/trees/audio/node-audio.js.map +1 -1
- package/dist/components/trees/node/node-editor-state.d.ts +5 -45
- package/dist/components/trees/node/node-editor-state.d.ts.map +1 -1
- package/dist/components/trees/node/node-editor-state.js +1 -13
- package/dist/components/trees/node/node-editor-state.js.map +1 -1
- package/dist/components/trees/node/node-reactive.d.ts +6 -53
- package/dist/components/trees/node/node-reactive.d.ts.map +1 -1
- package/dist/components/trees/node/node-reactive.js +4 -33
- package/dist/components/trees/node/node-reactive.js.map +1 -1
- package/dist/components/trees/node/node-time.d.ts +2 -15
- package/dist/components/trees/node/node-time.d.ts.map +1 -1
- package/dist/components/trees/node/node-time.js.map +1 -1
- package/dist/components/trees/node/node-walk.d.ts +7 -32
- package/dist/components/trees/node/node-walk.d.ts.map +1 -1
- package/dist/components/trees/node/node-walk.js +7 -32
- package/dist/components/trees/node/node-walk.js.map +1 -1
- package/dist/components/trees/node/node.d.ts +43 -248
- package/dist/components/trees/node/node.d.ts.map +1 -1
- package/dist/components/trees/node/node.js +51 -229
- package/dist/components/trees/node/node.js.map +1 -1
- package/dist/components/trees/root/canvas2d-node.d.ts +7 -60
- package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -1
- package/dist/components/trees/root/canvas2d-node.js +7 -47
- package/dist/components/trees/root/canvas2d-node.js.map +1 -1
- package/dist/components/trees/three/node3d.d.ts +24 -112
- package/dist/components/trees/three/node3d.d.ts.map +1 -1
- package/dist/components/trees/three/node3d.js +22 -104
- package/dist/components/trees/three/node3d.js.map +1 -1
- package/dist/document/audio.d.ts +9 -21
- package/dist/document/audio.d.ts.map +1 -1
- package/dist/document/audio.js +13 -28
- package/dist/document/audio.js.map +1 -1
- package/dist/document/builtins.d.ts +3 -9
- package/dist/document/builtins.d.ts.map +1 -1
- package/dist/document/builtins.js +43 -89
- package/dist/document/builtins.js.map +1 -1
- package/dist/document/command-traits.d.ts +14 -37
- package/dist/document/command-traits.d.ts.map +1 -1
- package/dist/document/command-traits.js +22 -39
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/deny-globals.d.ts +9 -43
- package/dist/document/deny-globals.d.ts.map +1 -1
- package/dist/document/deny-globals.js +18 -58
- package/dist/document/deny-globals.js.map +1 -1
- package/dist/document/diff.d.ts +6 -16
- package/dist/document/diff.d.ts.map +1 -1
- package/dist/document/diff.js +5 -11
- package/dist/document/diff.js.map +1 -1
- package/dist/document/doc-index.d.ts +5 -13
- package/dist/document/doc-index.d.ts.map +1 -1
- package/dist/document/doc-index.js +0 -2
- package/dist/document/doc-index.js.map +1 -1
- package/dist/document/expression/compile.d.ts +2 -2
- package/dist/document/expression/compile.d.ts.map +1 -1
- package/dist/document/expression/compile.js +8 -18
- package/dist/document/expression/compile.js.map +1 -1
- package/dist/document/expression/index.d.ts +11 -41
- package/dist/document/expression/index.d.ts.map +1 -1
- package/dist/document/expression/index.js +11 -41
- package/dist/document/expression/index.js.map +1 -1
- package/dist/document/expression/ops.d.ts +3 -12
- package/dist/document/expression/ops.d.ts.map +1 -1
- package/dist/document/expression/ops.js +4 -20
- package/dist/document/expression/ops.js.map +1 -1
- package/dist/document/expression/parse.d.ts +4 -14
- package/dist/document/expression/parse.d.ts.map +1 -1
- package/dist/document/expression/parse.js +34 -55
- package/dist/document/expression/parse.js.map +1 -1
- package/dist/document/expression/refs.d.ts +2 -8
- package/dist/document/expression/refs.d.ts.map +1 -1
- package/dist/document/expression/refs.js +2 -6
- package/dist/document/expression/refs.js.map +1 -1
- package/dist/document/expression/types.d.ts +18 -63
- package/dist/document/expression/types.d.ts.map +1 -1
- package/dist/document/expression/types.js +4 -15
- package/dist/document/expression/types.js.map +1 -1
- package/dist/document/expression/walk.d.ts +6 -20
- package/dist/document/expression/walk.d.ts.map +1 -1
- package/dist/document/expression/walk.js +18 -44
- package/dist/document/expression/walk.js.map +1 -1
- package/dist/document/index.js +2 -3
- package/dist/document/index.js.map +1 -1
- package/dist/document/migrate.d.ts +7 -22
- package/dist/document/migrate.d.ts.map +1 -1
- package/dist/document/migrate.js +44 -15
- package/dist/document/migrate.js.map +1 -1
- package/dist/document/missing-node.d.ts +4 -11
- package/dist/document/missing-node.d.ts.map +1 -1
- package/dist/document/missing-node.js +2 -5
- package/dist/document/missing-node.js.map +1 -1
- package/dist/document/node-decorator.d.ts +12 -53
- package/dist/document/node-decorator.d.ts.map +1 -1
- package/dist/document/node-decorator.js +16 -57
- package/dist/document/node-decorator.js.map +1 -1
- package/dist/document/node-descriptor.d.ts +25 -62
- 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 +18 -41
- package/dist/document/placement.d.ts.map +1 -1
- package/dist/document/placement.js +4 -11
- package/dist/document/placement.js.map +1 -1
- package/dist/document/project.d.ts +19 -52
- package/dist/document/project.d.ts.map +1 -1
- package/dist/document/project.js +2 -6
- package/dist/document/project.js.map +1 -1
- package/dist/document/prop-evolution.d.ts +10 -20
- package/dist/document/prop-evolution.d.ts.map +1 -1
- package/dist/document/prop-evolution.js +3 -7
- package/dist/document/prop-evolution.js.map +1 -1
- package/dist/document/registry.d.ts +80 -318
- package/dist/document/registry.d.ts.map +1 -1
- package/dist/document/registry.js +43 -147
- package/dist/document/registry.js.map +1 -1
- package/dist/document/settled-index.d.ts +11 -23
- package/dist/document/settled-index.d.ts.map +1 -1
- package/dist/document/settled-index.js +15 -34
- package/dist/document/settled-index.js.map +1 -1
- package/dist/document/timeline-patch.d.ts +6 -15
- package/dist/document/timeline-patch.d.ts.map +1 -1
- package/dist/document/timeline-patch.js +12 -21
- package/dist/document/timeline-patch.js.map +1 -1
- package/dist/document/timeline.d.ts +56 -263
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +71 -275
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.d.ts +90 -264
- package/dist/document/types.d.ts.map +1 -1
- package/dist/document/types.js +13 -30
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.d.ts +10 -40
- package/dist/document/validate.d.ts.map +1 -1
- package/dist/document/validate.js +72 -137
- package/dist/document/validate.js.map +1 -1
- package/dist/document/vocabulary.d.ts +4 -7
- package/dist/document/vocabulary.d.ts.map +1 -1
- package/dist/document/vocabulary.js +0 -1
- package/dist/document/vocabulary.js.map +1 -1
- package/dist/experimental.d.ts +2 -0
- package/dist/experimental.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/layout/bounds.d.ts +1 -11
- package/dist/layout/bounds.d.ts.map +1 -1
- package/dist/layout/bounds.js.map +1 -1
- package/dist/layout/flex.d.ts +6 -20
- package/dist/layout/flex.d.ts.map +1 -1
- package/dist/layout/flex.js +7 -28
- package/dist/layout/flex.js.map +1 -1
- package/dist/layout/ops.d.ts +2 -11
- package/dist/layout/ops.d.ts.map +1 -1
- package/dist/layout/ops.js +2 -22
- package/dist/layout/ops.js.map +1 -1
- package/dist/layout/types.d.ts +11 -55
- package/dist/layout/types.d.ts.map +1 -1
- package/dist/layout/types.js.map +1 -1
- package/dist/platform/audio-sink.d.ts +7 -43
- package/dist/platform/audio-sink.d.ts.map +1 -1
- package/dist/platform/audio-sink.js +4 -29
- package/dist/platform/audio-sink.js.map +1 -1
- package/dist/platform/exporter.d.ts +5 -31
- package/dist/platform/exporter.d.ts.map +1 -1
- package/dist/platform/exporter.js.map +1 -1
- package/dist/platform/stepped-clock.d.ts +1 -16
- package/dist/platform/stepped-clock.d.ts.map +1 -1
- package/dist/platform/stepped-clock.js +1 -16
- package/dist/platform/stepped-clock.js.map +1 -1
- package/dist/platform/storage-adapter.d.ts +8 -68
- package/dist/platform/storage-adapter.d.ts.map +1 -1
- package/dist/platform/storage-adapter.js +8 -60
- package/dist/platform/storage-adapter.js.map +1 -1
- package/dist/platform/ticker.d.ts +11 -45
- package/dist/platform/ticker.d.ts.map +1 -1
- package/dist/platform/ticker.js +10 -37
- package/dist/platform/ticker.js.map +1 -1
- package/dist/project/config.d.ts +4 -14
- package/dist/project/config.d.ts.map +1 -1
- package/dist/project/config.js.map +1 -1
- package/dist/project/tree.d.ts +6 -35
- package/dist/project/tree.d.ts.map +1 -1
- package/dist/project/tree.js +1 -8
- package/dist/project/tree.js.map +1 -1
- package/dist/props/host.d.ts +2 -13
- package/dist/props/host.d.ts.map +1 -1
- package/dist/props/host.js.map +1 -1
- package/dist/props/layout.d.ts +1 -12
- package/dist/props/layout.d.ts.map +1 -1
- package/dist/props/layout.js +1 -12
- package/dist/props/layout.js.map +1 -1
- package/dist/props/observer.d.ts +1 -7
- package/dist/props/observer.d.ts.map +1 -1
- package/dist/props/observer.js.map +1 -1
- package/dist/props/slot.d.ts +6 -19
- package/dist/props/slot.d.ts.map +1 -1
- package/dist/props/slot.js +5 -14
- package/dist/props/slot.js.map +1 -1
- package/dist/render/canvas-render-context2d.d.ts +8 -68
- package/dist/render/canvas-render-context2d.d.ts.map +1 -1
- package/dist/render/canvas-render-context2d.js +8 -69
- package/dist/render/canvas-render-context2d.js.map +1 -1
- package/dist/render/clip-contains.d.ts +2 -16
- package/dist/render/clip-contains.d.ts.map +1 -1
- package/dist/render/clip-contains.js +21 -82
- package/dist/render/clip-contains.js.map +1 -1
- package/dist/render/clip.d.ts +7 -25
- package/dist/render/clip.d.ts.map +1 -1
- package/dist/render/clip.js +5 -17
- package/dist/render/clip.js.map +1 -1
- package/dist/render/descriptors/ellipse.d.ts.map +1 -1
- package/dist/render/descriptors/ellipse.js +0 -1
- package/dist/render/descriptors/ellipse.js.map +1 -1
- package/dist/render/descriptors/line.d.ts.map +1 -1
- package/dist/render/descriptors/line.js +0 -1
- package/dist/render/descriptors/line.js.map +1 -1
- package/dist/render/descriptors/path-builder.d.ts +4 -32
- package/dist/render/descriptors/path-builder.d.ts.map +1 -1
- package/dist/render/descriptors/path-builder.js +3 -25
- package/dist/render/descriptors/path-builder.js.map +1 -1
- package/dist/render/descriptors/path.d.ts +1 -11
- package/dist/render/descriptors/path.d.ts.map +1 -1
- package/dist/render/descriptors/path.js +0 -1
- package/dist/render/descriptors/path.js.map +1 -1
- package/dist/render/descriptors/polygon.d.ts.map +1 -1
- package/dist/render/descriptors/polygon.js +0 -1
- package/dist/render/descriptors/polygon.js.map +1 -1
- package/dist/render/descriptors/polygram.d.ts.map +1 -1
- package/dist/render/descriptors/polygram.js +0 -1
- package/dist/render/descriptors/polygram.js.map +1 -1
- package/dist/render/descriptors/rect.d.ts.map +1 -1
- package/dist/render/descriptors/rect.js +0 -1
- package/dist/render/descriptors/rect.js.map +1 -1
- package/dist/render/descriptors/richtext.d.ts.map +1 -1
- package/dist/render/descriptors/richtext.js +0 -1
- package/dist/render/descriptors/richtext.js.map +1 -1
- package/dist/render/descriptors/shape.d.ts +17 -77
- package/dist/render/descriptors/shape.d.ts.map +1 -1
- package/dist/render/descriptors/shape.js +13 -47
- package/dist/render/descriptors/shape.js.map +1 -1
- package/dist/render/descriptors/text.d.ts +15 -94
- package/dist/render/descriptors/text.d.ts.map +1 -1
- package/dist/render/descriptors/text.js +8 -50
- package/dist/render/descriptors/text.js.map +1 -1
- package/dist/render/descriptors/transform.d.ts +5 -16
- package/dist/render/descriptors/transform.d.ts.map +1 -1
- package/dist/render/descriptors/transform.js +1 -17
- package/dist/render/descriptors/transform.js.map +1 -1
- package/dist/render/graphics2d.d.ts +24 -116
- package/dist/render/graphics2d.d.ts.map +1 -1
- package/dist/render/graphics2d.js +23 -108
- package/dist/render/graphics2d.js.map +1 -1
- package/dist/render/measure-context.d.ts +5 -29
- package/dist/render/measure-context.d.ts.map +1 -1
- package/dist/render/measure-context.js.map +1 -1
- package/dist/render/null-render-context.d.ts +2 -20
- package/dist/render/null-render-context.d.ts.map +1 -1
- package/dist/render/null-render-context.js +2 -20
- package/dist/render/null-render-context.js.map +1 -1
- package/dist/render/render-context2d.d.ts +52 -208
- package/dist/render/render-context2d.d.ts.map +1 -1
- package/dist/render/render-context2d.js.map +1 -1
- package/dist/render/surface.d.ts +2 -19
- package/dist/render/surface.d.ts.map +1 -1
- package/dist/render/surface.js.map +1 -1
- package/dist/render/text-defaults.d.ts +1 -17
- package/dist/render/text-defaults.d.ts.map +1 -1
- package/dist/render/text-defaults.js +6 -40
- package/dist/render/text-defaults.js.map +1 -1
- package/dist/render/text-layout.d.ts +12 -55
- package/dist/render/text-layout.d.ts.map +1 -1
- package/dist/render/text-layout.js +2 -16
- package/dist/render/text-layout.js.map +1 -1
- package/dist/render3d/bounds3d.d.ts +10 -32
- package/dist/render3d/bounds3d.d.ts.map +1 -1
- package/dist/render3d/bounds3d.js +2 -12
- package/dist/render3d/bounds3d.js.map +1 -1
- package/dist/render3d/builders.d.ts +8 -35
- package/dist/render3d/builders.d.ts.map +1 -1
- package/dist/render3d/builders.js +8 -35
- package/dist/render3d/builders.js.map +1 -1
- package/dist/render3d/camera.d.ts +10 -57
- package/dist/render3d/camera.d.ts.map +1 -1
- package/dist/render3d/camera.js +4 -26
- package/dist/render3d/camera.js.map +1 -1
- package/dist/render3d/fill3d.d.ts +7 -45
- package/dist/render3d/fill3d.d.ts.map +1 -1
- package/dist/render3d/fill3d.js +15 -85
- package/dist/render3d/fill3d.js.map +1 -1
- package/dist/render3d/geometry.d.ts +18 -106
- package/dist/render3d/geometry.d.ts.map +1 -1
- package/dist/render3d/geometry.js +2 -20
- package/dist/render3d/geometry.js.map +1 -1
- package/dist/render3d/graphics3d.d.ts +29 -133
- package/dist/render3d/graphics3d.d.ts.map +1 -1
- package/dist/render3d/graphics3d.js +23 -110
- package/dist/render3d/graphics3d.js.map +1 -1
- package/dist/render3d/index.d.ts +1 -16
- package/dist/render3d/index.d.ts.map +1 -1
- package/dist/render3d/index.js +1 -16
- package/dist/render3d/index.js.map +1 -1
- package/dist/render3d/inert.d.ts.map +1 -1
- package/dist/render3d/inert.js +1 -14
- package/dist/render3d/inert.js.map +1 -1
- package/dist/render3d/light.d.ts +3 -26
- package/dist/render3d/light.d.ts.map +1 -1
- package/dist/render3d/light.js.map +1 -1
- package/dist/render3d/material.d.ts +13 -87
- package/dist/render3d/material.d.ts.map +1 -1
- package/dist/render3d/material.js +2 -16
- package/dist/render3d/material.js.map +1 -1
- package/dist/render3d/matrix4.d.ts +14 -68
- package/dist/render3d/matrix4.d.ts.map +1 -1
- package/dist/render3d/matrix4.js +11 -60
- package/dist/render3d/matrix4.js.map +1 -1
- package/dist/render3d/render-context3d.d.ts +13 -51
- package/dist/render3d/render-context3d.d.ts.map +1 -1
- package/dist/render3d/render-context3d.js +9 -21
- package/dist/render3d/render-context3d.js.map +1 -1
- package/dist/render3d/resources.d.ts +9 -53
- package/dist/render3d/resources.d.ts.map +1 -1
- package/dist/render3d/resources.js +8 -48
- package/dist/render3d/resources.js.map +1 -1
- package/dist/render3d/rounded-box.d.ts +7 -21
- package/dist/render3d/rounded-box.d.ts.map +1 -1
- package/dist/render3d/rounded-box.js +7 -46
- package/dist/render3d/rounded-box.js.map +1 -1
- package/dist/render3d/scene-settings.d.ts +20 -78
- package/dist/render3d/scene-settings.d.ts.map +1 -1
- package/dist/render3d/scene-settings.js.map +1 -1
- package/dist/render3d/scene3d.d.ts +11 -53
- package/dist/render3d/scene3d.d.ts.map +1 -1
- package/dist/render3d/scene3d.js +12 -59
- package/dist/render3d/scene3d.js.map +1 -1
- package/dist/render3d/segments.d.ts +2 -25
- package/dist/render3d/segments.d.ts.map +1 -1
- package/dist/render3d/segments.js +1 -11
- package/dist/render3d/segments.js.map +1 -1
- package/dist/render3d/texture.d.ts +25 -112
- package/dist/render3d/texture.d.ts.map +1 -1
- package/dist/render3d/texture.js +3 -27
- package/dist/render3d/texture.js.map +1 -1
- package/dist/render3d/tracking.d.ts +2 -19
- package/dist/render3d/tracking.d.ts.map +1 -1
- package/dist/render3d/tracking.js +2 -19
- package/dist/render3d/tracking.js.map +1 -1
- package/dist/render3d/transform.d.ts +14 -60
- package/dist/render3d/transform.d.ts.map +1 -1
- package/dist/render3d/transform.js +0 -2
- package/dist/render3d/transform.js.map +1 -1
- package/dist/render3d/vector3.d.ts +6 -48
- package/dist/render3d/vector3.d.ts.map +1 -1
- package/dist/render3d/vector3.js +4 -38
- package/dist/render3d/vector3.js.map +1 -1
- package/dist/render3d/walk.d.ts +3 -27
- package/dist/render3d/walk.d.ts.map +1 -1
- package/dist/render3d/walk.js +5 -33
- package/dist/render3d/walk.js.map +1 -1
- package/dist/runtime/asset-refine.d.ts +34 -20
- package/dist/runtime/asset-refine.d.ts.map +1 -1
- package/dist/runtime/asset-refine.js +127 -31
- package/dist/runtime/asset-refine.js.map +1 -1
- package/dist/runtime/asset-timeline.d.ts +14 -53
- package/dist/runtime/asset-timeline.d.ts.map +1 -1
- package/dist/runtime/asset-timeline.js +6 -27
- package/dist/runtime/asset-timeline.js.map +1 -1
- package/dist/runtime/asset-update.d.ts +7 -26
- package/dist/runtime/asset-update.d.ts.map +1 -1
- package/dist/runtime/asset-update.js +6 -18
- package/dist/runtime/asset-update.js.map +1 -1
- package/dist/runtime/audio-index.d.ts +0 -2
- package/dist/runtime/audio-index.d.ts.map +1 -1
- package/dist/runtime/audio-index.js +0 -2
- package/dist/runtime/audio-index.js.map +1 -1
- package/dist/runtime/builtin-context.d.ts +3 -9
- package/dist/runtime/builtin-context.d.ts.map +1 -1
- package/dist/runtime/builtin-context.js +3 -9
- package/dist/runtime/builtin-context.js.map +1 -1
- package/dist/runtime/clip-instance.d.ts +12 -39
- package/dist/runtime/clip-instance.d.ts.map +1 -1
- package/dist/runtime/clip-instance.js +21 -45
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.d.ts +26 -68
- package/dist/runtime/clip-store.d.ts.map +1 -1
- package/dist/runtime/clip-store.js +47 -81
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.d.ts +31 -85
- package/dist/runtime/engine.d.ts.map +1 -1
- package/dist/runtime/engine.js +16 -49
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/frame-time.d.ts +4 -15
- package/dist/runtime/frame-time.d.ts.map +1 -1
- package/dist/runtime/frame-time.js +5 -12
- package/dist/runtime/frame-time.js.map +1 -1
- package/dist/runtime/index.d.ts +0 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +0 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/node-picking.d.ts +59 -139
- package/dist/runtime/node-picking.d.ts.map +1 -1
- package/dist/runtime/node-picking.js +87 -157
- package/dist/runtime/node-picking.js.map +1 -1
- package/dist/runtime/node-picking3d.d.ts +39 -96
- package/dist/runtime/node-picking3d.d.ts.map +1 -1
- package/dist/runtime/node-picking3d.js +98 -141
- package/dist/runtime/node-picking3d.js.map +1 -1
- package/dist/runtime/placement.d.ts +8 -17
- package/dist/runtime/placement.d.ts.map +1 -1
- package/dist/runtime/placement.js +7 -16
- package/dist/runtime/placement.js.map +1 -1
- package/dist/runtime/playback-controller.d.ts +78 -207
- package/dist/runtime/playback-controller.d.ts.map +1 -1
- package/dist/runtime/playback-controller.js +111 -226
- package/dist/runtime/playback-controller.js.map +1 -1
- package/dist/runtime/playback.d.ts +6 -14
- package/dist/runtime/playback.d.ts.map +1 -1
- package/dist/runtime/playback.js +6 -14
- package/dist/runtime/playback.js.map +1 -1
- package/dist/runtime/project-assets.d.ts +6 -14
- package/dist/runtime/project-assets.d.ts.map +1 -1
- package/dist/runtime/project-assets.js +7 -16
- package/dist/runtime/project-assets.js.map +1 -1
- package/dist/runtime/session.d.ts +22 -45
- package/dist/runtime/session.d.ts.map +1 -1
- package/dist/runtime/session.js +26 -46
- package/dist/runtime/session.js.map +1 -1
- package/dist/runtime/settle.d.ts +4 -10
- package/dist/runtime/settle.d.ts.map +1 -1
- package/dist/runtime/settle.js +4 -10
- package/dist/runtime/settle.js.map +1 -1
- package/dist/runtime/state-evaluator.d.ts +15 -37
- package/dist/runtime/state-evaluator.d.ts.map +1 -1
- package/dist/runtime/state-evaluator.js +27 -44
- package/dist/runtime/state-evaluator.js.map +1 -1
- package/dist/runtime/text-geometry.d.ts +18 -47
- package/dist/runtime/text-geometry.d.ts.map +1 -1
- package/dist/runtime/text-geometry.js +13 -27
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.d.ts +2 -7
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +30 -138
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command-decorator.d.ts +6 -26
- package/dist/tween/command-decorator.d.ts.map +1 -1
- package/dist/tween/command-decorator.js +1 -6
- package/dist/tween/command-decorator.js.map +1 -1
- package/dist/tween/command.d.ts +6 -53
- package/dist/tween/command.d.ts.map +1 -1
- package/dist/tween/command.js +5 -40
- package/dist/tween/command.js.map +1 -1
- package/dist/tween/ease/curve.d.ts +2 -17
- package/dist/tween/ease/curve.d.ts.map +1 -1
- package/dist/tween/ease/curve.js +1 -6
- package/dist/tween/ease/curve.js.map +1 -1
- package/dist/tween/ease/describe.d.ts +0 -11
- package/dist/tween/ease/describe.d.ts.map +1 -1
- package/dist/tween/ease/describe.js +0 -23
- package/dist/tween/ease/describe.js.map +1 -1
- package/dist/tween/ease/spec.d.ts +2 -18
- package/dist/tween/ease/spec.d.ts.map +1 -1
- package/dist/tween/ease/spec.js.map +1 -1
- package/dist/tween/inert.d.ts +1 -14
- package/dist/tween/inert.d.ts.map +1 -1
- package/dist/tween/inert.js +1 -14
- package/dist/tween/inert.js.map +1 -1
- package/dist/tween/lerp.d.ts +2 -26
- package/dist/tween/lerp.d.ts.map +1 -1
- package/dist/tween/lerp.js +2 -26
- package/dist/tween/lerp.js.map +1 -1
- package/dist/tween/loop.d.ts +9 -50
- package/dist/tween/loop.d.ts.map +1 -1
- package/dist/tween/loop.js +6 -31
- package/dist/tween/loop.js.map +1 -1
- package/dist/tween/prepare.d.ts +2 -30
- package/dist/tween/prepare.d.ts.map +1 -1
- package/dist/tween/prepare.js +2 -30
- package/dist/tween/prepare.js.map +1 -1
- package/dist/tween/stepper.d.ts +4 -25
- package/dist/tween/stepper.d.ts.map +1 -1
- package/dist/tween/stepper.js.map +1 -1
- package/dist/tween/to-command.d.ts +1 -8
- package/dist/tween/to-command.d.ts.map +1 -1
- package/dist/tween/to-command.js +2 -25
- package/dist/tween/to-command.js.map +1 -1
- package/dist/util/context.d.ts +4 -29
- package/dist/util/context.d.ts.map +1 -1
- package/dist/util/context.js +3 -15
- package/dist/util/context.js.map +1 -1
- package/dist/util/csv.d.ts +4 -29
- package/dist/util/csv.d.ts.map +1 -1
- package/dist/util/csv.js +3 -22
- package/dist/util/csv.js.map +1 -1
- package/dist/util/metrics.d.ts +2 -26
- package/dist/util/metrics.d.ts.map +1 -1
- package/dist/util/metrics.js +2 -26
- package/dist/util/metrics.js.map +1 -1
- package/dist/util/random.d.ts +20 -87
- package/dist/util/random.d.ts.map +1 -1
- package/dist/util/random.js +20 -87
- package/dist/util/random.js.map +1 -1
- package/dist/util/reference.d.ts +6 -35
- package/dist/util/reference.d.ts.map +1 -1
- package/dist/util/reference.js +1 -4
- package/dist/util/reference.js.map +1 -1
- package/dist/util/scheduler.d.ts +6 -27
- package/dist/util/scheduler.d.ts.map +1 -1
- package/dist/util/scheduler.js +8 -35
- package/dist/util/scheduler.js.map +1 -1
- package/package.json +1 -1
- package/dist/browser/chunks/chunk-4BDLFEOC.js.map +0 -7
- package/dist/browser/chunks/chunk-CCGVIR4F.js.map +0 -7
- package/dist/browser/chunks/chunk-N4WSN5WY.js +0 -13
- package/dist/browser/chunks/chunk-N4WSN5WY.js.map +0 -7
- package/dist/browser/chunks/chunk-WZSI3GSK.js +0 -6
- package/dist/browser/chunks/chunk-WZSI3GSK.js.map +0 -7
- package/dist/renamed-scene-names.d.ts +0 -17
- package/dist/renamed-scene-names.d.ts.map +0 -1
- package/dist/renamed-scene-names.js +0 -9
- package/dist/renamed-scene-names.js.map +0 -1
- package/dist/runtime/precompisition.d.ts +0 -24
- package/dist/runtime/precompisition.d.ts.map +0 -1
- package/dist/runtime/precompisition.js +0 -7
- package/dist/runtime/precompisition.js.map +0 -1
package/dist/document/audio.js
CHANGED
|
@@ -1,33 +1,21 @@
|
|
|
1
1
|
import { isAudioDocument, isStillDocument, nodeSpan } from "./types.js";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Namespaced like every other synthesized id in the document layer, so it can
|
|
6
|
-
* never collide with one a document authored itself.
|
|
3
|
+
* Namespaced like every other synthesized id in the document layer, so it can never collide with an authored
|
|
4
|
+
* one.
|
|
7
5
|
*/
|
|
8
6
|
const AUDIO_ROOT_ID = "@bus";
|
|
9
|
-
/** The root bus when an audio document doesn't author one explicitly. */
|
|
10
7
|
function defaultRootBus() {
|
|
11
8
|
return { id: AUDIO_ROOT_ID, type: "audioBus", parentId: null, layerOrder: 0, props: {} };
|
|
12
9
|
}
|
|
13
|
-
/** The root a lowered audio clip hangs from. Draws nothing; lays out once. */
|
|
14
10
|
function clipRoot() {
|
|
15
11
|
return { id: "", type: "canvas2d", parentId: null, layerOrder: 0, props: {} };
|
|
16
12
|
}
|
|
17
13
|
/**
|
|
18
|
-
* An audio document, as the composition it already is
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* one machine running them.
|
|
24
|
-
*
|
|
25
|
-
* The only thing that has to be arranged is the root. An audio document's own
|
|
26
|
-
* root is a bus, but a clip's root is always a `Canvas2D` — so the bus
|
|
27
|
-
* becomes that canvas's single audio child under {@link AUDIO_ROOT_ID}, and
|
|
28
|
-
* every `targetId: null` / `parentId: null` is rewritten to name it. The canvas
|
|
29
|
-
* draws nothing and lays out an empty box once, which is the whole cost of a
|
|
30
|
-
* clip that is only sound.
|
|
14
|
+
* An audio document, as the composition it already is: one evaluator runs sound, so a bus fade and a
|
|
15
|
+
* rectangle's fade cannot drift. Only the root needs arranging. A clip's root is always a `Canvas2D`, so the
|
|
16
|
+
* bus becomes its single audio child under {@link AUDIO_ROOT_ID} and every `targetId: null` / `parentId: null`
|
|
17
|
+
* is rewritten to name it. The canvas draws nothing and lays out an empty box once, the whole cost of a clip
|
|
18
|
+
* that is only sound.
|
|
31
19
|
*/
|
|
32
20
|
export function loweredAudioDocument(doc) {
|
|
33
21
|
const nodes = [clipRoot()];
|
|
@@ -43,21 +31,20 @@ export function loweredAudioDocument(doc) {
|
|
|
43
31
|
commands: doc.commands.map(retarget),
|
|
44
32
|
};
|
|
45
33
|
}
|
|
46
|
-
/** The row an audio document means as its root bus. */
|
|
47
34
|
function isRootBus(spec) {
|
|
48
35
|
return spec.id === "" && spec.type === "audioBus";
|
|
49
36
|
}
|
|
50
|
-
/** A node spec with the implicit root resolved to {@link AUDIO_ROOT_ID}. */
|
|
51
37
|
function reparent(spec) {
|
|
52
38
|
if (isRootBus(spec))
|
|
53
39
|
return { ...spec, id: AUDIO_ROOT_ID, parentId: null };
|
|
54
|
-
|
|
55
|
-
|
|
40
|
+
/**
|
|
41
|
+
* `null` is the document's convention for "the root"; `""` is the same row named by id, which `checkTree` also
|
|
42
|
+
* resolves.
|
|
43
|
+
*/
|
|
56
44
|
if (spec.parentId === null || spec.parentId === "")
|
|
57
45
|
return { ...spec, parentId: AUDIO_ROOT_ID };
|
|
58
46
|
return spec;
|
|
59
47
|
}
|
|
60
|
-
/** A command with the implicit root resolved to {@link AUDIO_ROOT_ID}. */
|
|
61
48
|
function retarget(command) {
|
|
62
49
|
if (command.targetId === null || command.targetId === "") {
|
|
63
50
|
return { ...command, targetId: AUDIO_ROOT_ID };
|
|
@@ -66,9 +53,8 @@ function retarget(command) {
|
|
|
66
53
|
}
|
|
67
54
|
export { AUDIO_ROOT_ID };
|
|
68
55
|
/**
|
|
69
|
-
* A `sound` or `video` row with no `play` command of its own
|
|
70
|
-
*
|
|
71
|
-
* its own end), a video once per segment, or over its span while it plays.
|
|
56
|
+
* A `sound` or `video` row with no `play` command of its own gets one: a sound over its span (open-ended, to
|
|
57
|
+
* its own end), a video once per segment or over its span while it plays.
|
|
72
58
|
*/
|
|
73
59
|
export function withPlayedSounds(doc) {
|
|
74
60
|
const played = new Set(doc.commands.filter((c) => c.type === "play").map((c) => c.targetId));
|
|
@@ -100,7 +86,6 @@ export function withPlayedSounds(doc) {
|
|
|
100
86
|
}
|
|
101
87
|
return added.length === 0 ? doc : { ...doc, commands: [...doc.commands, ...added] };
|
|
102
88
|
}
|
|
103
|
-
/** A clip as its timeline builds it: an audio document lowered to the composition it is, its sounds played. */
|
|
104
89
|
export function clipDocument(doc) {
|
|
105
90
|
const lowered = isAudioDocument(doc) ? loweredAudioDocument(doc) : doc;
|
|
106
91
|
return isStillDocument(lowered) ? lowered : withPlayedSounds(lowered);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audio.js","sourceRoot":"","sources":["../../src/document/audio.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAErE
|
|
1
|
+
{"version":3,"file":"audio.js","sourceRoot":"","sources":["../../src/document/audio.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAErE;;;GAGG;AACH,MAAM,aAAa,GAAG,MAAM,CAAC;AAE7B,SAAS,cAAc;IACnB,OAAO,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;AAC7F,CAAC;AAED,SAAS,QAAQ;IACb,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,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,CAAC,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;AAC1E,CAAC","sourcesContent":["import type { AudioDocument, ClipDocument, CommandSpec, CompositionDocument, NodeSpec, TimedNodeSpec, VisualDocument } from \"./types\";\nimport { isAudioDocument, isStillDocument, nodeSpan } from \"./types\";\n\n/**\n * Namespaced like every other synthesized id in the document layer, so it can never collide with an authored\n * one.\n */\nconst AUDIO_ROOT_ID = \"@bus\";\n\nfunction defaultRootBus(): NodeSpec {\n return { id: AUDIO_ROOT_ID, type: \"audioBus\", parentId: null, layerOrder: 0, props: {} };\n}\n\nfunction clipRoot(): NodeSpec {\n return { id: \"\", type: \"canvas2d\", parentId: null, layerOrder: 0, props: {} };\n}\n\n/**\n * An audio document, as the composition it already is: one evaluator runs sound, so a bus fade and a\n * rectangle's fade cannot drift. Only the root needs arranging. A clip's root is always a `Canvas2D`, so the\n * bus becomes its single audio child under {@link AUDIO_ROOT_ID} and every `targetId: null` / `parentId: null`\n * is rewritten to name it. The canvas draws nothing and lays out an empty box once, the whole cost of a clip\n * that is only sound.\n */\nexport function loweredAudioDocument(doc: AudioDocument): CompositionDocument {\n const nodes: TimedNodeSpec[] = [clipRoot()];\n if (!doc.nodes.some(isRootBus)) nodes.push(defaultRootBus());\n for (const spec of doc.nodes) nodes.push(reparent(spec));\n\n return {\n kind: \"composition\",\n duration: doc.duration,\n variables: doc.variables,\n nodes,\n commands: doc.commands.map(retarget),\n };\n}\n\nfunction isRootBus(spec: NodeSpec): boolean {\n return spec.id === \"\" && spec.type === \"audioBus\";\n}\n\nfunction reparent(spec: TimedNodeSpec): TimedNodeSpec {\n if (isRootBus(spec)) return { ...spec, id: AUDIO_ROOT_ID, parentId: null };\n /**\n * `null` is the document's convention for \"the root\"; `\"\"` is the same row named by id, which `checkTree` also\n * resolves.\n */\n if (spec.parentId === null || spec.parentId === \"\") return { ...spec, parentId: AUDIO_ROOT_ID };\n return spec;\n}\n\nfunction retarget(command: CommandSpec): CommandSpec {\n if (command.targetId === null || command.targetId === \"\") {\n return { ...command, targetId: AUDIO_ROOT_ID };\n }\n return command;\n}\n\nexport { AUDIO_ROOT_ID };\n\n/**\n * A `sound` or `video` row with no `play` command of its own gets one: a sound over its span (open-ended, to\n * its own end), a video once per segment or over its span while it plays.\n */\nexport function withPlayedSounds(doc: CompositionDocument): CompositionDocument {\n const played = new Set(doc.commands.filter((c) => c.type === \"play\").map((c) => c.targetId));\n const added: CommandSpec[] = [];\n for (const spec of doc.nodes) {\n if ((spec.type !== \"sound\" && spec.type !== \"video\") || played.has(spec.id)) continue;\n const { start, end } = nodeSpan(spec);\n const segments = spec.type === \"video\" ? (spec.props as { segments?: unknown }).segments : undefined;\n if (Array.isArray(segments) && segments.length > 0) {\n (segments as { at: number; from: number; duration: number; speed?: number; volume?: number }[]).forEach((segment, i) => {\n added.push({\n // An endless segment plays to the source's end: a command has no endless length.\n id: `@play:${spec.id}:${i}`, type: \"play\", targetId: spec.id, at: start + segment.at,\n duration: Number.isFinite(segment.duration) ? segment.duration : 0,\n args: {\n from: segment.from,\n ...(segment.speed !== undefined && { speed: segment.speed }),\n ...(segment.volume !== undefined && { volume: segment.volume }),\n },\n });\n });\n continue;\n }\n added.push({\n id: `@play:${spec.id}`, type: \"play\", targetId: spec.id, at: start,\n duration: Number.isFinite(end) ? end - start : 0, args: {},\n });\n }\n return added.length === 0 ? doc : { ...doc, commands: [...doc.commands, ...added] };\n}\n\nexport function clipDocument(doc: ClipDocument): VisualDocument {\n const lowered = isAudioDocument(doc) ? loweredAudioDocument(doc) : doc;\n return isStillDocument(lowered) ? lowered : withPlayedSounds(lowered);\n}\n"]}
|
|
@@ -4,18 +4,12 @@ import type { Stroke } from "../attributes/shape/stroke/stroke.js";
|
|
|
4
4
|
import type { Vector2 } from "../attributes/layout/vector2.js";
|
|
5
5
|
import type { Registry } from "./registry.js";
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* public and every host had to call it at module scope before compiling
|
|
11
|
-
* anything — which `sideEffects: false` is entitled to delete, with a failure
|
|
12
|
-
* mode ("unknown node type rect") that points nowhere near the cause. A registry
|
|
13
|
-
* that seeds itself makes the vocabulary a value dependency of the engine
|
|
14
|
-
* instead, so there is nothing left to tree-shake and nothing to remember.
|
|
7
|
+
* Called from `Registry`'s own constructor, so the vocabulary is a value dependency of the engine: a public
|
|
8
|
+
* call at module scope could be deleted by `sideEffects: false`, with an "unknown node type rect" failure
|
|
9
|
+
* pointing nowhere near the cause.
|
|
15
10
|
*
|
|
16
11
|
* @internal
|
|
17
12
|
*/
|
|
18
13
|
export declare function installBuiltins(registry: Registry): void;
|
|
19
|
-
/** Type-only re-exports, so a caller writing args gets the same shapes. */
|
|
20
14
|
export type { Fill, Shadow, Stroke, Vector2 };
|
|
21
15
|
//# sourceMappingURL=builtins.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtins.d.ts","sourceRoot":"","sources":["../../src/document/builtins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AA2B3D,OAAO,KAAK,EAAmB,QAAQ,EAAgB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"builtins.d.ts","sourceRoot":"","sources":["../../src/document/builtins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AA2B3D,OAAO,KAAK,EAAmB,QAAQ,EAAgB,MAAM,YAAY,CAAC;AAuH1E;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAoFxD;AAED,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -15,51 +15,38 @@ import { parseColor } from "../attributes/shape/fill/color/parser.js";
|
|
|
15
15
|
import { lerpVector3 } from "../render3d/vector3.js";
|
|
16
16
|
import { lerpNumber } from "../tween/lerp.js";
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* animations with these strings, so renaming one silently breaks every document
|
|
22
|
-
* that used it — they are as much a public contract as an exported symbol, and
|
|
23
|
-
* are deliberately spelled out rather than derived from `constructor.name`
|
|
24
|
-
* (which a minifier is free to mangle).
|
|
18
|
+
* The keys here are document API: a stored scene names its nodes and animations with these strings, so
|
|
19
|
+
* renaming one silently breaks every document that used it. Spelled out rather than derived from
|
|
20
|
+
* `constructor.name`, which a minifier may mangle.
|
|
25
21
|
*/
|
|
26
|
-
/** Every built-in node type, keyed as a document names it. */
|
|
27
22
|
const NODE_TYPES = {
|
|
28
|
-
// Clip root and structural
|
|
29
23
|
canvas2d: Canvas2D,
|
|
30
24
|
provider: Provider,
|
|
31
25
|
"theme-provider": ThemeProvider,
|
|
32
26
|
"default-text-style": DefaultTextStyle,
|
|
33
|
-
// Geometry
|
|
34
27
|
rect: Rect,
|
|
35
28
|
ellipse: Ellipse,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
// class rather than by naming a type in a document.
|
|
29
|
+
/**
|
|
30
|
+
* The unit-box path, not `path-node.ts`'s face-value `Path`: a stored `data` is a fraction of the node's own
|
|
31
|
+
* box, so a resize is an ordinary `width`/`height` write and every editor gizmo works unchanged
|
|
32
|
+
* (`box-path-node.ts` has the argument). `Path` draws its `d` at face value, for geometry written in code, and
|
|
33
|
+
* is reached by importing the class, not by naming a type in a document.
|
|
34
|
+
*/
|
|
43
35
|
path: PathShape,
|
|
44
36
|
polygon: Polygon,
|
|
45
37
|
polygram: Polygram,
|
|
46
38
|
boolean: BooleanGroup,
|
|
47
39
|
mask: MaskGroup,
|
|
48
|
-
// Layout
|
|
49
40
|
camera: Camera,
|
|
50
41
|
orbitCamera: OrbitCamera,
|
|
51
42
|
"rotated-box": RotatedBox,
|
|
52
|
-
// Text
|
|
53
43
|
text: Text,
|
|
54
44
|
richtext: RichText,
|
|
55
45
|
number: NumberNode,
|
|
56
|
-
// Media
|
|
57
46
|
video: Video,
|
|
58
|
-
|
|
59
|
-
// AudioDocument, the way `canvas2d` is the root of a scene.
|
|
47
|
+
/** `audioBus` is also the root of an AudioDocument, as `canvas2d` is of a scene. */
|
|
60
48
|
audioBus: AudioBus,
|
|
61
49
|
sound: SoundNode,
|
|
62
|
-
// 3D — the viewport, then the tree that lives inside it
|
|
63
50
|
canvas3d: Canvas3D,
|
|
64
51
|
group3d: Group3D,
|
|
65
52
|
mesh3d: Mesh3D,
|
|
@@ -92,7 +79,6 @@ const NODE_TYPES = {
|
|
|
92
79
|
fog3d: Fog3D,
|
|
93
80
|
environment3d: Environment3D,
|
|
94
81
|
};
|
|
95
|
-
/** Call a paint command (`fillTo`/`overlayTo`/`strokeTo`/`shadowTo`). */
|
|
96
82
|
function paintCommand(method, argKey) {
|
|
97
83
|
return (target, args, duration, easing) => {
|
|
98
84
|
const fn = target[method];
|
|
@@ -103,13 +89,8 @@ function paintCommand(method, argKey) {
|
|
|
103
89
|
};
|
|
104
90
|
}
|
|
105
91
|
/**
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
* Deliberately the small set a variable actually holds — a number, a point, a
|
|
109
|
-
* colour — rather than one entry per attribute in the library. A variable drives
|
|
110
|
-
* props *through* an expression, so it only has to carry the quantity that
|
|
111
|
-
* varies: a gradient that shifts is one `stop` number bound into a fill, not a
|
|
112
|
-
* whole fill being interpolated a second time. Anything else is a
|
|
92
|
+
* Deliberately the small set a variable holds (a number, a point, a colour), not one per attribute: a variable
|
|
93
|
+
* drives props through an expression, so it only carries the quantity that varies. Anything else is a
|
|
113
94
|
* `registry.addLerp` away.
|
|
114
95
|
*/
|
|
115
96
|
const VARIABLE_LERPS = {
|
|
@@ -117,12 +98,8 @@ const VARIABLE_LERPS = {
|
|
|
117
98
|
vector2: lerpVector2,
|
|
118
99
|
vector3: lerpVector3,
|
|
119
100
|
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
* A string rather than the parsed tuple because that is what the prop on the
|
|
123
|
-
* far side of the expression takes — every fill, stroke and shadow resolves
|
|
124
|
-
* a colour from CSS text, and `parseColor` reads theme tokens and the
|
|
125
|
-
* `"white/10"` opacity suffix too, so a variable can hold either.
|
|
101
|
+
* Returns a CSS string because that is what the prop on the far side of the expression takes; `parseColor`
|
|
102
|
+
* also reads theme tokens and the `"white/10"` opacity suffix.
|
|
126
103
|
*/
|
|
127
104
|
color: ((from, to, t) => {
|
|
128
105
|
const [r, g, b, a] = lerpColor(parseColor(String(from)), parseColor(String(to)), t);
|
|
@@ -130,23 +107,15 @@ const VARIABLE_LERPS = {
|
|
|
130
107
|
return `rgba(${channel(r)}, ${channel(g)}, ${channel(b)}, ${Number(a.toFixed(4))})`;
|
|
131
108
|
}),
|
|
132
109
|
/**
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
* The default for a non-numeric variable: a discrete value (a string of
|
|
136
|
-
* text, an enum, a boolean) has no midpoint, and inventing one produces a
|
|
137
|
-
* frame that is neither state.
|
|
110
|
+
* Hold `from` until the tween lands, then take `to`. The default for a non-numeric variable: a discrete value
|
|
111
|
+
* has no midpoint, and inventing one produces a frame that is neither state.
|
|
138
112
|
*/
|
|
139
113
|
step: ((from, to, t) => (t >= 1 ? to : from)),
|
|
140
114
|
};
|
|
141
115
|
/**
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
* public and every host had to call it at module scope before compiling
|
|
146
|
-
* anything — which `sideEffects: false` is entitled to delete, with a failure
|
|
147
|
-
* mode ("unknown node type rect") that points nowhere near the cause. A registry
|
|
148
|
-
* that seeds itself makes the vocabulary a value dependency of the engine
|
|
149
|
-
* instead, so there is nothing left to tree-shake and nothing to remember.
|
|
116
|
+
* Called from `Registry`'s own constructor, so the vocabulary is a value dependency of the engine: a public
|
|
117
|
+
* call at module scope could be deleted by `sideEffects: false`, with an "unknown node type rect" failure
|
|
118
|
+
* pointing nowhere near the cause.
|
|
150
119
|
*
|
|
151
120
|
* @internal
|
|
152
121
|
*/
|
|
@@ -157,49 +126,39 @@ export function installBuiltins(registry) {
|
|
|
157
126
|
for (const [key, lerp] of Object.entries(VARIABLE_LERPS)) {
|
|
158
127
|
registry.addLerp(key, lerp);
|
|
159
128
|
}
|
|
160
|
-
//
|
|
161
|
-
//
|
|
162
|
-
// exactly one argument and a node's own props are already a fixed,
|
|
163
|
-
// known-shape bag (not something a second command parameter could collide
|
|
164
|
-
// with the way `to`/`set` never gained one).
|
|
129
|
+
// `args` is the props diff, with no wrapper key: `to`/`set` carry exactly one argument and a node's props are
|
|
130
|
+
// already a known-shape bag.
|
|
165
131
|
registry.addCommand("to", (target, args, duration, easing) => target.to({
|
|
166
|
-
|
|
167
|
-
|
|
132
|
+
/**
|
|
133
|
+
* Copied: `_prepareStep` expands sugar into its target in place, which would rewrite the document row a diff
|
|
134
|
+
* compares by identity.
|
|
135
|
+
*/
|
|
168
136
|
data: { ...args },
|
|
169
137
|
duration,
|
|
170
138
|
easing,
|
|
171
139
|
}));
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
// through a scene rather than from the moment its node is authored.
|
|
140
|
+
/**
|
|
141
|
+
* A stamp: `duration` is ignored, which is what a keyframe editor's "set this here" needs. `binds` because its
|
|
142
|
+
* args reach `set()` verbatim, so an expression among them is a binding: this is how a prop starts following a
|
|
143
|
+
* variable partway through a scene.
|
|
144
|
+
*/
|
|
178
145
|
registry.addCommand("set", (target, args) => {
|
|
179
146
|
const props = args;
|
|
180
147
|
return driveCommand(0, () => {
|
|
181
148
|
target.set(props);
|
|
182
149
|
});
|
|
183
150
|
}, { binds: true });
|
|
184
|
-
//
|
|
185
|
-
//
|
|
186
|
-
//
|
|
187
|
-
//
|
|
188
|
-
// that knows that convention rather than the uniform one a node type's own
|
|
189
|
-
// table dispatches through.
|
|
190
|
-
// Each declares the one key it reads, in the kind its property uses, so a
|
|
191
|
-
// host draws the same paint stack for the command as for the prop.
|
|
151
|
+
// Node-less rather than per-type, like `to` and `set`: generic over every painted node, and they take a
|
|
152
|
+
// `TweenOptions` bag where an ordinary command takes a bare easing function, so they need their own factory.
|
|
153
|
+
// Each declares the one key it reads, in the kind its property uses, so a host draws the same paint stack for
|
|
154
|
+
// the command as for the prop.
|
|
192
155
|
registry.addCommand("fillTo", paintCommand("fillTo", "fill"), { args: [{ key: "fill", kind: "fills" }], method: "fillTo" });
|
|
193
156
|
registry.addCommand("overlayTo", paintCommand("overlayTo", "overlay"), { args: [{ key: "overlay", kind: "fills" }], method: "overlayTo" });
|
|
194
157
|
registry.addCommand("strokeTo", paintCommand("strokeTo", "stroke"), { args: [{ key: "stroke", kind: "strokes" }], method: "strokeTo" });
|
|
195
158
|
registry.addCommand("shadowTo", paintCommand("shadowTo", "shadow"), { args: [{ key: "shadow", kind: "shadows" }], method: "shadowTo" });
|
|
196
|
-
// Transform, camera, text and `restore` commands are
|
|
197
|
-
//
|
|
198
|
-
//
|
|
199
|
-
// ── Variables ────────────────────────────────────────────────────────────
|
|
200
|
-
// Tween a variable. The one command that drives many nodes at once: every
|
|
201
|
-
// prop bound to `"=[id]"` follows what this writes, with no command of its
|
|
202
|
-
// own and nothing to keep in sync.
|
|
159
|
+
// Transform, camera, text and `restore` commands are `command()` methods that `Registry.addNode` publishes off
|
|
160
|
+
// the classes; see `document/registry.ts`.
|
|
161
|
+
// The one command that drives many nodes at once: every prop bound to `"=[id]"` follows what this writes.
|
|
203
162
|
registry.addVariableCommand("variableTo", (target, args, duration, easing) => {
|
|
204
163
|
const to = args.value;
|
|
205
164
|
const lerpKey = args.lerp;
|
|
@@ -209,10 +168,9 @@ export function installBuiltins(registry) {
|
|
|
209
168
|
`got ${JSON.stringify(lerpKey)}. Registered: ${registry.lerpKeys().join(", ")}.`);
|
|
210
169
|
}
|
|
211
170
|
const lerp = override ?? target.lerp;
|
|
212
|
-
// `from` is captured on the command's first evaluation
|
|
213
|
-
//
|
|
214
|
-
//
|
|
215
|
-
// predecessors left. Captured once, it is then a pure function of `t`.
|
|
171
|
+
// `from` is captured on the command's first evaluation, as a node's `to()` does: the timeline builds commands
|
|
172
|
+
// in order and runs each to `at(1)`, so the capture sees the state its predecessors left. Captured once, it is
|
|
173
|
+
// a pure function of `t`.
|
|
216
174
|
let from;
|
|
217
175
|
let captured = false;
|
|
218
176
|
return driveCommand(duration, (t) => {
|
|
@@ -223,16 +181,12 @@ export function installBuiltins(registry) {
|
|
|
223
181
|
target.set(lerp(from, to, t));
|
|
224
182
|
}, easing);
|
|
225
183
|
});
|
|
226
|
-
// A stamp, matching `set`: write the value with no tween, ignoring duration.
|
|
227
184
|
registry.addVariableCommand("variableSet", (target, args) => driveCommand(0, () => {
|
|
228
185
|
target.set(args.value);
|
|
229
186
|
}));
|
|
230
|
-
//
|
|
231
|
-
//
|
|
232
|
-
//
|
|
233
|
-
// commands so the pair is placed on the timeline like anything else, and a
|
|
234
|
-
// seek past the save still produces the same frame: the value is computed
|
|
235
|
-
// from the chain rather than accumulated as the playhead moves.
|
|
187
|
+
// `restore` pops the layer a `save` pushed and is published off `Node`'s own `command()`; `save` is not one,
|
|
188
|
+
// so it is registered here. Both are commands so the pair sits on the timeline, and a seek past the save
|
|
189
|
+
// computes the value from the chain rather than accumulating it.
|
|
236
190
|
registry.addCommand("save", (target) => driveCommand(0, () => {
|
|
237
191
|
target.save();
|
|
238
192
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtins.js","sourceRoot":"","sources":["../../src/document/builtins.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAkC,MAAM,iBAAiB,CAAC;AAK/E,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AACnF,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,yCAAyC,CAAC;AACtG,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACtF,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAC;AAC/F,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAChE,OAAO,EACH,cAAc,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,kBAAkB,EACzG,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAC1G,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,GACvH,MAAM,mCAAm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,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CACnF,CAAC;QACN,CAAC;QACD,MAAM,IAAI,GAAG,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC;QAErC,yEAAyE;QACzE,yEAAyE;QACzE,8DAA8D;QAC9D,uEAAuE;QACvE,IAAI,IAAa,CAAC;QAClB,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,OAAO,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;YAChC,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACZ,IAAI,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC;gBACpB,QAAQ,GAAG,IAAI,CAAC;YACpB,CAAC;YACD,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;QAClC,CAAC,EAAE,MAAM,CAAgD,CAAC;IAC9D,CAAC,CAAC,CAAC;IAEH,6EAA6E;IAC7E,QAAQ,CAAC,kBAAkB,CAAC,aAAa,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CACxD,YAAY,CAAC,CAAC,EAAE,GAAG,EAAE;QACjB,MAAM,CAAC,GAAG,CAAE,IAA4B,CAAC,KAAK,CAAC,CAAC;IACpD,CAAC,CAAgD,CAAC,CAAC;IAEvD,4EAA4E;IAC5E,8EAA8E;IAC9E,sEAAsE;IACtE,2EAA2E;IAC3E,0EAA0E;IAC1E,gEAAgE;IAChE,QAAQ,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CACnC,YAAY,CAAC,CAAC,EAAE,GAAG,EAAE;QAChB,MAAiB,CAAC,IAAI,EAAE,CAAC;IAC9B,CAAC,CAAgD,CAAC,CAAC;AAC3D,CAAC","sourcesContent":["import type { Fill } from \"@/attributes/shape/fill/chain\";\nimport type { Shadow } from \"@/attributes/shape/shadow/shadow\";\nimport type { Stroke } from \"@/attributes/shape/stroke/stroke\";\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\nimport { driveCommand, type Command, type CommandArgs } from \"@/tween/command\";\nimport type { EasingFunction } from \"@/tween/ease/type\";\nimport type { Node } from \"@/components/trees/node/node\";\nimport type { Node2D } from \"@/components/trees/2d/node2d\";\n\nimport { BooleanGroup, MaskGroup } from \"@/components/builtins/geometry/composite\";\nimport { Ellipse, PathShape, Polygon, Polygram, Rect } from \"@/components/builtins/geometry/geometry\";\nimport { Camera, OrbitCamera, RotatedBox } from \"@/components/builtins/layout/layout\";\nimport { Video } from \"@/components/builtins/media/media\";\nimport { AudioBus, SoundNode } from \"@/components/builtins/audio/audio\";\nimport { Canvas2D } from \"@/components/trees/root/canvas2d-node\";\nimport { Provider, ThemeProvider } from \"@/components/builtins/providers/providers\";\nimport { DefaultTextStyle, NumberNode, RichText, Text } from \"@/components/builtins/text/text\";\nimport { Canvas3D } from \"@/components/builtins/three/canvas3d\";\nimport {\n AmbientLight3D, AreaLight3D, Box3D, Camera3D, Capsule3D, Circle3D, Cone3D, Cylinder3D, DirectionalLight3D,\n Environment3D, Extrude3D, Fog3D, Group3D, HemisphereLight3D, Instances3D, Lathe3D, Line3D, Mesh3D, Model3D,\n Plane3D, PointLight3D, Points3D, Polyhedron3D, Ring3D, Sphere3D, SpotLight3D, Sprite3D, Torus3D, TorusKnot3D, Tube3D,\n} from \"@/components/builtins/three/three\";\n\nimport { lerpVector2 } from \"@/attributes/layout/vector2\";\nimport { lerpColor } from \"@/attributes/shape/fill/lerp\";\nimport { parseColor } from \"@/attributes/shape/fill/color/parser\";\nimport { lerpVector3 } from \"@/render3d/vector3\";\nimport { lerpNumber } from \"@/tween/lerp\";\n\nimport type { NodeConstructor, Registry, VariableLerp } from \"./registry\";\n\n/**\n * Registration of everything `@motionscript/core` itself ships.\n *\n * The keys here are **document API**. A stored scene names its nodes and its\n * animations with these strings, so renaming one silently breaks every document\n * that used it — they are as much a public contract as an exported symbol, and\n * are deliberately spelled out rather than derived from `constructor.name`\n * (which a minifier is free to mangle).\n */\n\n/** Every built-in node type, keyed as a document names it. */\nconst NODE_TYPES: Record<string, NodeConstructor> = {\n // Clip root and structural\n canvas2d: Canvas2D as unknown as NodeConstructor,\n provider: Provider as unknown as NodeConstructor,\n \"theme-provider\": ThemeProvider as unknown as NodeConstructor,\n \"default-text-style\": DefaultTextStyle as unknown as NodeConstructor,\n\n // Geometry\n rect: Rect as unknown as NodeConstructor,\n ellipse: Ellipse as unknown as NodeConstructor,\n // The **unit-box** path, not `path-node.ts`'s face-value `Path`. A stored\n // document's `data` is a fraction of the node's own box, so a resize is an\n // ordinary `width`/`height` write and every editor gizmo works on it\n // unchanged (`box-path-node.ts` has the whole argument). `Path` draws its\n // `d` at face value and hugs it, which is right for geometry somebody wrote\n // in code — it stays exported for that, and is reached by importing the\n // class rather than by naming a type in a document.\n path: PathShape as unknown as NodeConstructor,\n polygon: Polygon as unknown as NodeConstructor,\n polygram: Polygram as unknown as NodeConstructor,\n boolean: BooleanGroup as unknown as NodeConstructor,\n mask: MaskGroup as unknown as NodeConstructor,\n\n // Layout\n camera: Camera as unknown as NodeConstructor,\n orbitCamera: OrbitCamera as unknown as NodeConstructor,\n \"rotated-box\": RotatedBox as unknown as NodeConstructor,\n\n // Text\n text: Text as unknown as NodeConstructor,\n richtext: RichText as unknown as NodeConstructor,\n number: NumberNode as unknown as NodeConstructor,\n\n // Media\n video: Video as unknown as NodeConstructor,\n\n // Audio — a bus groups, a sound plays. `audioBus` is also the root of an\n // AudioDocument, the way `canvas2d` is the root of a scene.\n audioBus: AudioBus as unknown as NodeConstructor,\n sound: SoundNode as unknown as NodeConstructor,\n\n // 3D — the viewport, then the tree that lives inside it\n canvas3d: Canvas3D as unknown as NodeConstructor,\n group3d: Group3D as unknown as NodeConstructor,\n mesh3d: Mesh3D as unknown as NodeConstructor,\n box3d: Box3D as unknown as NodeConstructor,\n sphere3d: Sphere3D as unknown as NodeConstructor,\n plane3d: Plane3D as unknown as NodeConstructor,\n circle3d: Circle3D as unknown as NodeConstructor,\n cylinder3d: Cylinder3D as unknown as NodeConstructor,\n cone3d: Cone3D as unknown as NodeConstructor,\n capsule3d: Capsule3D as unknown as NodeConstructor,\n torus3d: Torus3D as unknown as NodeConstructor,\n \"torus-knot3d\": TorusKnot3D as unknown as NodeConstructor,\n tube3d: Tube3D as unknown as NodeConstructor,\n lathe3d: Lathe3D as unknown as NodeConstructor,\n extrude3d: Extrude3D as unknown as NodeConstructor,\n ring3d: Ring3D as unknown as NodeConstructor,\n polyhedron3d: Polyhedron3D as unknown as NodeConstructor,\n points3d: Points3D as unknown as NodeConstructor,\n line3d: Line3D as unknown as NodeConstructor,\n sprite3d: Sprite3D as unknown as NodeConstructor,\n instances3d: Instances3D as unknown as NodeConstructor,\n model3d: Model3D as unknown as NodeConstructor,\n camera3d: Camera3D as unknown as NodeConstructor,\n \"ambient-light3d\": AmbientLight3D as unknown as NodeConstructor,\n \"directional-light3d\": DirectionalLight3D as unknown as NodeConstructor,\n \"point-light3d\": PointLight3D as unknown as NodeConstructor,\n \"spot-light3d\": SpotLight3D as unknown as NodeConstructor,\n \"hemisphere-light3d\": HemisphereLight3D as unknown as NodeConstructor,\n \"area-light3d\": AreaLight3D as unknown as NodeConstructor,\n fog3d: Fog3D as unknown as NodeConstructor,\n environment3d: Environment3D as unknown as NodeConstructor,\n};\n\n/** A node method taking one {@link CommandArgs}. */\ntype EasedMethod = (args: CommandArgs) => Command<Record<string, unknown>>;\n\n/** Call a paint command (`fillTo`/`overlayTo`/`strokeTo`/`shadowTo`). */\nfunction paintCommand(method: string, argKey: string) {\n return (\n target: Node,\n args: Record<string, unknown>,\n duration: number,\n easing?: EasingFunction,\n ): Command<Record<string, unknown>> => {\n const fn = (target as unknown as Record<string, unknown>)[method];\n if (typeof fn !== \"function\") {\n throw new Error(\n `Command \"${method}\" is not available on ${target.constructor.name}.`,\n );\n }\n return (fn as EasedMethod).call(target, { data: args[argKey] as Record<string, unknown>, duration, easing });\n };\n}\n\n/**\n * The interpolations a document can name in `VariableSpec.lerp`.\n *\n * Deliberately the small set a variable actually holds — a number, a point, a\n * colour — rather than one entry per attribute in the library. A variable drives\n * props *through* an expression, so it only has to carry the quantity that\n * varies: a gradient that shifts is one `stop` number bound into a fill, not a\n * whole fill being interpolated a second time. Anything else is a\n * `registry.addLerp` away.\n */\nconst VARIABLE_LERPS: Record<string, VariableLerp> = {\n number: lerpNumber as VariableLerp,\n vector2: lerpVector2 as VariableLerp,\n vector3: lerpVector3 as VariableLerp,\n /**\n * Parse both ends, blend per channel, hand back a CSS string.\n *\n * A string rather than the parsed tuple because that is what the prop on the\n * far side of the expression takes — every fill, stroke and shadow resolves\n * a colour from CSS text, and `parseColor` reads theme tokens and the\n * `\"white/10\"` opacity suffix too, so a variable can hold either.\n */\n color: ((from, to, t) => {\n const [r, g, b, a] = lerpColor(parseColor(String(from)), parseColor(String(to)), t);\n const channel = (v: number) => Math.round(Math.min(Math.max(v, 0), 1) * 255);\n return `rgba(${channel(r)}, ${channel(g)}, ${channel(b)}, ${Number(a.toFixed(4))})`;\n }) as VariableLerp,\n /**\n * No interpolation: hold `from` until the tween lands, then take `to`.\n *\n * The default for a non-numeric variable: a discrete value (a string of\n * text, an enum, a boolean) has no midpoint, and inventing one produces a\n * frame that is neither state.\n */\n step: ((from, to, t) => (t >= 1 ? to : from)) as VariableLerp,\n};\n\n/**\n * Seed a {@link Registry} with everything `@motionscript/core` itself ships.\n *\n * **Internal, and called from `Registry`'s own constructor.** It used to be\n * public and every host had to call it at module scope before compiling\n * anything — which `sideEffects: false` is entitled to delete, with a failure\n * mode (\"unknown node type rect\") that points nowhere near the cause. A registry\n * that seeds itself makes the vocabulary a value dependency of the engine\n * instead, so there is nothing left to tree-shake and nothing to remember.\n *\n * @internal\n */\nexport function installBuiltins(registry: Registry): void {\n for (const [key, ctor] of Object.entries(NODE_TYPES)) {\n registry.addNode(key, ctor);\n }\n for (const [key, lerp] of Object.entries(VARIABLE_LERPS)) {\n registry.addLerp(key, lerp);\n }\n\n // ── Props ────────────────────────────────────────────────────────────────\n // `args` *is* the props diff — no wrapper key, since `to`/`set` each carry\n // exactly one argument and a node's own props are already a fixed,\n // known-shape bag (not something a second command parameter could collide\n // with the way `to`/`set` never gained one).\n registry.addCommand(\"to\", (target, args, duration, easing) =>\n (target as Node2D).to({\n // Copied: `_prepareStep` expands sugar into its target in place, which\n // would rewrite the document row a diff compares by identity.\n data: { ...args } as Record<string, never>,\n duration,\n easing,\n }) as unknown as Command<Record<string, unknown>>);\n\n // A stamp: write props with no tween. `duration` is ignored, which is what\n // makes it usable as the \"set this here\" a keyframe editor needs.\n //\n // `binds` because its args reach `set()` verbatim, so an expression among\n // them is a binding — this is how a prop starts following a variable partway\n // through a scene rather than from the moment its node is authored.\n registry.addCommand(\"set\", (target, args) => {\n const props = args as Record<string, never>;\n return driveCommand(0, () => {\n (target as Node2D).set(props);\n }) as unknown as Command<Record<string, unknown>>;\n }, { binds: true });\n\n // ── Paint (shapes, text, Canvas2D) ─────────────────────────────────────\n // Node-less rather than per-type, like `to` and `set` above: these are\n // generic over every painted node, and they take a `TweenOptions` bag where\n // an ordinary command takes a bare easing function — so they need a factory\n // that knows that convention rather than the uniform one a node type's own\n // table dispatches through.\n // Each declares the one key it reads, in the kind its property uses, so a\n // host draws the same paint stack for the command as for the prop.\n registry.addCommand(\"fillTo\", paintCommand(\"fillTo\", \"fill\"), { args: [{ key: \"fill\", kind: \"fills\" }], method: \"fillTo\" });\n registry.addCommand(\"overlayTo\", paintCommand(\"overlayTo\", \"overlay\"), { args: [{ key: \"overlay\", kind: \"fills\" }], method: \"overlayTo\" });\n registry.addCommand(\"strokeTo\", paintCommand(\"strokeTo\", \"stroke\"), { args: [{ key: \"stroke\", kind: \"strokes\" }], method: \"strokeTo\" });\n registry.addCommand(\"shadowTo\", paintCommand(\"shadowTo\", \"shadow\"), { args: [{ key: \"shadow\", kind: \"shadows\" }], method: \"shadowTo\" });\n\n // Transform, camera, text and `restore` commands are not registered here:\n // they are `command()` methods, and `Registry.addNode` publishes them off\n // the classes above. See `document/registry.ts`.\n\n // ── Variables ────────────────────────────────────────────────────────────\n // Tween a variable. The one command that drives many nodes at once: every\n // prop bound to `\"=[id]\"` follows what this writes, with no command of its\n // own and nothing to keep in sync.\n registry.addVariableCommand(\"variableTo\", (target, args, duration, easing) => {\n const to = (args as { value?: unknown }).value;\n const lerpKey = (args as { lerp?: unknown }).lerp;\n const override = typeof lerpKey === \"string\" ? registry.lerp(lerpKey) : undefined;\n if (lerpKey !== undefined && !override) {\n throw new Error(\n `A \"lerp\" param must name a registered lerp (variable \"${target.id}\"), ` +\n `got ${JSON.stringify(lerpKey)}. Registered: ${registry.lerpKeys().join(\", \")}.`,\n );\n }\n const lerp = override ?? target.lerp;\n\n // `from` is captured on the command's first evaluation rather than here,\n // exactly as a node's `to()` does: the timeline builds commands in order\n // and runs each to `at(1)`, so the capture sees the state its\n // predecessors left. Captured once, it is then a pure function of `t`.\n let from: unknown;\n let captured = false;\n return driveCommand(duration, (t) => {\n if (!captured) {\n from = target.get();\n captured = true;\n }\n target.set(lerp(from, to, t));\n }, easing) as unknown as Command<Record<string, unknown>>;\n });\n\n // A stamp, matching `set`: write the value with no tween, ignoring duration.\n registry.addVariableCommand(\"variableSet\", (target, args) =>\n driveCommand(0, () => {\n target.set((args as { value?: unknown }).value);\n }) as unknown as Command<Record<string, unknown>>);\n\n // ── State ────────────────────────────────────────────────────────────────\n // `restore` pops the layer a `save` pushed, and is published off `Node`'s own\n // `command()`. `save` is not one, so it is registered here — both are\n // commands so the pair is placed on the timeline like anything else, and a\n // seek past the save still produces the same frame: the value is computed\n // from the chain rather than accumulated as the playhead moves.\n registry.addCommand(\"save\", (target) =>\n driveCommand(0, () => {\n (target as Node2D).save();\n }) as unknown as Command<Record<string, unknown>>);\n}\n\n/** Type-only re-exports, so a caller writing args gets the same shapes. */\nexport type { Fill, Shadow, Stroke, Vector2 };\n"]}
|
|
1
|
+
{"version":3,"file":"builtins.js","sourceRoot":"","s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CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CACxD,YAAY,CAAC,CAAC,EAAE,GAAG,EAAE;QACjB,MAAM,CAAC,GAAG,CAAE,IAA4B,CAAC,KAAK,CAAC,CAAC;IACpD,CAAC,CAAgD,CAAC,CAAC;IAEvD,6GAA6G;IAC7G,yGAAyG;IACzG,iEAAiE;IACjE,QAAQ,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CACnC,YAAY,CAAC,CAAC,EAAE,GAAG,EAAE;QAChB,MAAiB,CAAC,IAAI,EAAE,CAAC;IAC9B,CAAC,CAAgD,CAAC,CAAC;AAC3D,CAAC","sourcesContent":["import type { Fill } from \"@/attributes/shape/fill/chain\";\nimport type { Shadow } from \"@/attributes/shape/shadow/shadow\";\nimport type { Stroke } from \"@/attributes/shape/stroke/stroke\";\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\nimport { driveCommand, type Command, type CommandArgs } from \"@/tween/command\";\nimport type { EasingFunction } from \"@/tween/ease/type\";\nimport type { Node } from \"@/components/trees/node/node\";\nimport type { Node2D } from \"@/components/trees/2d/node2d\";\n\nimport { BooleanGroup, MaskGroup } from \"@/components/builtins/geometry/composite\";\nimport { Ellipse, PathShape, Polygon, Polygram, Rect } from \"@/components/builtins/geometry/geometry\";\nimport { Camera, OrbitCamera, RotatedBox } from \"@/components/builtins/layout/layout\";\nimport { Video } from \"@/components/builtins/media/media\";\nimport { AudioBus, SoundNode } from \"@/components/builtins/audio/audio\";\nimport { Canvas2D } from \"@/components/trees/root/canvas2d-node\";\nimport { Provider, ThemeProvider } from \"@/components/builtins/providers/providers\";\nimport { DefaultTextStyle, NumberNode, RichText, Text } from \"@/components/builtins/text/text\";\nimport { Canvas3D } from \"@/components/builtins/three/canvas3d\";\nimport {\n AmbientLight3D, AreaLight3D, Box3D, Camera3D, Capsule3D, Circle3D, Cone3D, Cylinder3D, DirectionalLight3D,\n Environment3D, Extrude3D, Fog3D, Group3D, HemisphereLight3D, Instances3D, Lathe3D, Line3D, Mesh3D, Model3D,\n Plane3D, PointLight3D, Points3D, Polyhedron3D, Ring3D, Sphere3D, SpotLight3D, Sprite3D, Torus3D, TorusKnot3D, Tube3D,\n} from \"@/components/builtins/three/three\";\n\nimport { lerpVector2 } from \"@/attributes/layout/vector2\";\nimport { lerpColor } from \"@/attributes/shape/fill/lerp\";\nimport { parseColor } from \"@/attributes/shape/fill/color/parser\";\nimport { lerpVector3 } from \"@/render3d/vector3\";\nimport { lerpNumber } from \"@/tween/lerp\";\n\nimport type { NodeConstructor, Registry, VariableLerp } from \"./registry\";\n\n/**\n * The keys here are document API: a stored scene names its nodes and animations with these strings, so\n * renaming one silently breaks every document that used it. Spelled out rather than derived from\n * `constructor.name`, which a minifier may mangle.\n */\n\nconst NODE_TYPES: Record<string, NodeConstructor> = {\n canvas2d: Canvas2D as unknown as NodeConstructor,\n provider: Provider as unknown as NodeConstructor,\n \"theme-provider\": ThemeProvider as unknown as NodeConstructor,\n \"default-text-style\": DefaultTextStyle as unknown as NodeConstructor,\n\n rect: Rect as unknown as NodeConstructor,\n ellipse: Ellipse as unknown as NodeConstructor,\n /**\n * The unit-box path, not `path-node.ts`'s face-value `Path`: a stored `data` is a fraction of the node's own\n * box, so a resize is an ordinary `width`/`height` write and every editor gizmo works unchanged\n * (`box-path-node.ts` has the argument). `Path` draws its `d` at face value, for geometry written in code, and\n * is reached by importing the class, not by naming a type in a document.\n */\n path: PathShape as unknown as NodeConstructor,\n polygon: Polygon as unknown as NodeConstructor,\n polygram: Polygram as unknown as NodeConstructor,\n boolean: BooleanGroup as unknown as NodeConstructor,\n mask: MaskGroup as unknown as NodeConstructor,\n\n camera: Camera as unknown as NodeConstructor,\n orbitCamera: OrbitCamera as unknown as NodeConstructor,\n \"rotated-box\": RotatedBox as unknown as NodeConstructor,\n\n text: Text as unknown as NodeConstructor,\n richtext: RichText as unknown as NodeConstructor,\n number: NumberNode as unknown as NodeConstructor,\n\n video: Video as unknown as NodeConstructor,\n\n /** `audioBus` is also the root of an AudioDocument, as `canvas2d` is of a scene. */\n audioBus: AudioBus as unknown as NodeConstructor,\n sound: SoundNode as unknown as NodeConstructor,\n\n canvas3d: Canvas3D as unknown as NodeConstructor,\n group3d: Group3D as unknown as NodeConstructor,\n mesh3d: Mesh3D as unknown as NodeConstructor,\n box3d: Box3D as unknown as NodeConstructor,\n sphere3d: Sphere3D as unknown as NodeConstructor,\n plane3d: Plane3D as unknown as NodeConstructor,\n circle3d: Circle3D as unknown as NodeConstructor,\n cylinder3d: Cylinder3D as unknown as NodeConstructor,\n cone3d: Cone3D as unknown as NodeConstructor,\n capsule3d: Capsule3D as unknown as NodeConstructor,\n torus3d: Torus3D as unknown as NodeConstructor,\n \"torus-knot3d\": TorusKnot3D as unknown as NodeConstructor,\n tube3d: Tube3D as unknown as NodeConstructor,\n lathe3d: Lathe3D as unknown as NodeConstructor,\n extrude3d: Extrude3D as unknown as NodeConstructor,\n ring3d: Ring3D as unknown as NodeConstructor,\n polyhedron3d: Polyhedron3D as unknown as NodeConstructor,\n points3d: Points3D as unknown as NodeConstructor,\n line3d: Line3D as unknown as NodeConstructor,\n sprite3d: Sprite3D as unknown as NodeConstructor,\n instances3d: Instances3D as unknown as NodeConstructor,\n model3d: Model3D as unknown as NodeConstructor,\n camera3d: Camera3D as unknown as NodeConstructor,\n \"ambient-light3d\": AmbientLight3D as unknown as NodeConstructor,\n \"directional-light3d\": DirectionalLight3D as unknown as NodeConstructor,\n \"point-light3d\": PointLight3D as unknown as NodeConstructor,\n \"spot-light3d\": SpotLight3D as unknown as NodeConstructor,\n \"hemisphere-light3d\": HemisphereLight3D as unknown as NodeConstructor,\n \"area-light3d\": AreaLight3D as unknown as NodeConstructor,\n fog3d: Fog3D as unknown as NodeConstructor,\n environment3d: Environment3D as unknown as NodeConstructor,\n};\n\ntype EasedMethod = (args: CommandArgs) => Command<Record<string, unknown>>;\n\nfunction paintCommand(method: string, argKey: string) {\n return (\n target: Node,\n args: Record<string, unknown>,\n duration: number,\n easing?: EasingFunction,\n ): Command<Record<string, unknown>> => {\n const fn = (target as unknown as Record<string, unknown>)[method];\n if (typeof fn !== \"function\") {\n throw new Error(\n `Command \"${method}\" is not available on ${target.constructor.name}.`,\n );\n }\n return (fn as EasedMethod).call(target, { data: args[argKey] as Record<string, unknown>, duration, easing });\n };\n}\n\n/**\n * Deliberately the small set a variable holds (a number, a point, a colour), not one per attribute: a variable\n * drives props through an expression, so it only carries the quantity that varies. Anything else is a\n * `registry.addLerp` away.\n */\nconst VARIABLE_LERPS: Record<string, VariableLerp> = {\n number: lerpNumber as VariableLerp,\n vector2: lerpVector2 as VariableLerp,\n vector3: lerpVector3 as VariableLerp,\n /**\n * Returns a CSS string because that is what the prop on the far side of the expression takes; `parseColor`\n * also reads theme tokens and the `\"white/10\"` opacity suffix.\n */\n color: ((from, to, t) => {\n const [r, g, b, a] = lerpColor(parseColor(String(from)), parseColor(String(to)), t);\n const channel = (v: number) => Math.round(Math.min(Math.max(v, 0), 1) * 255);\n return `rgba(${channel(r)}, ${channel(g)}, ${channel(b)}, ${Number(a.toFixed(4))})`;\n }) as VariableLerp,\n /**\n * Hold `from` until the tween lands, then take `to`. The default for a non-numeric variable: a discrete value\n * has no midpoint, and inventing one produces a frame that is neither state.\n */\n step: ((from, to, t) => (t >= 1 ? to : from)) as VariableLerp,\n};\n\n/**\n * Called from `Registry`'s own constructor, so the vocabulary is a value dependency of the engine: a public\n * call at module scope could be deleted by `sideEffects: false`, with an \"unknown node type rect\" failure\n * pointing nowhere near the cause.\n *\n * @internal\n */\nexport function installBuiltins(registry: Registry): void {\n for (const [key, ctor] of Object.entries(NODE_TYPES)) {\n registry.addNode(key, ctor);\n }\n for (const [key, lerp] of Object.entries(VARIABLE_LERPS)) {\n registry.addLerp(key, lerp);\n }\n\n // `args` is the props diff, with no wrapper key: `to`/`set` carry exactly one argument and a node's props are\n // already a known-shape bag.\n registry.addCommand(\"to\", (target, args, duration, easing) =>\n (target as Node2D).to({\n /**\n * Copied: `_prepareStep` expands sugar into its target in place, which would rewrite the document row a diff\n * compares by identity.\n */\n data: { ...args } as Record<string, never>,\n duration,\n easing,\n }) as unknown as Command<Record<string, unknown>>);\n\n /**\n * A stamp: `duration` is ignored, which is what a keyframe editor's \"set this here\" needs. `binds` because its\n * args reach `set()` verbatim, so an expression among them is a binding: this is how a prop starts following a\n * variable partway through a scene.\n */\n registry.addCommand(\"set\", (target, args) => {\n const props = args as Record<string, never>;\n return driveCommand(0, () => {\n (target as Node2D).set(props);\n }) as unknown as Command<Record<string, unknown>>;\n }, { binds: true });\n\n // Node-less rather than per-type, like `to` and `set`: generic over every painted node, and they take a\n // `TweenOptions` bag where an ordinary command takes a bare easing function, so they need their own factory.\n // Each declares the one key it reads, in the kind its property uses, so a host draws the same paint stack for\n // the command as for the prop.\n registry.addCommand(\"fillTo\", paintCommand(\"fillTo\", \"fill\"), { args: [{ key: \"fill\", kind: \"fills\" }], method: \"fillTo\" });\n registry.addCommand(\"overlayTo\", paintCommand(\"overlayTo\", \"overlay\"), { args: [{ key: \"overlay\", kind: \"fills\" }], method: \"overlayTo\" });\n registry.addCommand(\"strokeTo\", paintCommand(\"strokeTo\", \"stroke\"), { args: [{ key: \"stroke\", kind: \"strokes\" }], method: \"strokeTo\" });\n registry.addCommand(\"shadowTo\", paintCommand(\"shadowTo\", \"shadow\"), { args: [{ key: \"shadow\", kind: \"shadows\" }], method: \"shadowTo\" });\n\n // Transform, camera, text and `restore` commands are `command()` methods that `Registry.addNode` publishes off\n // the classes; see `document/registry.ts`.\n\n // The one command that drives many nodes at once: every prop bound to `\"=[id]\"` follows what this writes.\n registry.addVariableCommand(\"variableTo\", (target, args, duration, easing) => {\n const to = (args as { value?: unknown }).value;\n const lerpKey = (args as { lerp?: unknown }).lerp;\n const override = typeof lerpKey === \"string\" ? registry.lerp(lerpKey) : undefined;\n if (lerpKey !== undefined && !override) {\n throw new Error(\n `A \"lerp\" param must name a registered lerp (variable \"${target.id}\"), ` +\n `got ${JSON.stringify(lerpKey)}. Registered: ${registry.lerpKeys().join(\", \")}.`,\n );\n }\n const lerp = override ?? target.lerp;\n\n // `from` is captured on the command's first evaluation, as a node's `to()` does: the timeline builds commands\n // in order and runs each to `at(1)`, so the capture sees the state its predecessors left. Captured once, it is\n // a pure function of `t`.\n let from: unknown;\n let captured = false;\n return driveCommand(duration, (t) => {\n if (!captured) {\n from = target.get();\n captured = true;\n }\n target.set(lerp(from, to, t));\n }, easing) as unknown as Command<Record<string, unknown>>;\n });\n\n registry.addVariableCommand(\"variableSet\", (target, args) =>\n driveCommand(0, () => {\n target.set((args as { value?: unknown }).value);\n }) as unknown as Command<Record<string, unknown>>);\n\n // `restore` pops the layer a `save` pushed and is published off `Node`'s own `command()`; `save` is not one,\n // so it is registered here. Both are commands so the pair sits on the timeline, and a seek past the save\n // computes the value from the chain rather than accumulating it.\n registry.addCommand(\"save\", (target) =>\n driveCommand(0, () => {\n (target as Node2D).save();\n }) as unknown as Command<Record<string, unknown>>);\n}\n\nexport type { Fill, Shadow, Stroke, Vector2 };\n"]}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { Registry } from "./registry.js";
|
|
2
2
|
import type { CommandSpec, NodeSpec } from "./types.js";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* Only the library's own implementations are described: a command resolving to a
|
|
8
|
-
* component's method could do anything, so it is `known: false` and assumed to
|
|
9
|
-
* read and write layout.
|
|
4
|
+
* Read off the document and the registry without building anything. Only the library's own implementations are
|
|
5
|
+
* described: a command resolving to a component's method could do anything, so it is `known: false` and
|
|
6
|
+
* assumed to read and write layout.
|
|
10
7
|
*/
|
|
11
8
|
export interface CommandTraits {
|
|
12
9
|
scope: "node" | "variable";
|
|
@@ -15,53 +12,33 @@ export interface CommandTraits {
|
|
|
15
12
|
lifecycle: boolean;
|
|
16
13
|
/** Building it can read a laid-out box, so it must be built against a settled tree. */
|
|
17
14
|
readsLayout: boolean;
|
|
18
|
-
/** Running it can change what layout computes. */
|
|
19
15
|
writesLayout: boolean;
|
|
20
16
|
}
|
|
21
|
-
/** The nine named alignment props, which position a node against its own laid-out box. */
|
|
22
17
|
export declare const ALIGNMENT_KEYS: readonly string[];
|
|
23
18
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* type — writes nothing, which is known.
|
|
28
|
-
* `target` is the command's target row; for `targetId: null` a document with no
|
|
29
|
-
* explicit root row may pass `undefined`.
|
|
19
|
+
* `null` when it resolves to nothing (compiling it throws). One the build skips (aimed at a placeholder, or
|
|
20
|
+
* unpublished by its target's type) writes nothing, which is known. For `targetId: null` a document with no
|
|
21
|
+
* explicit root row may pass `undefined` as `target`. Resolves as `ClipTimeline._buildPlaced` does.
|
|
30
22
|
*/
|
|
31
23
|
export declare function commandTraits(registry: Registry, spec: CommandSpec, target: NodeSpec | undefined): CommandTraits | null;
|
|
32
24
|
/**
|
|
33
|
-
* Whether
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* bind live values, so they keep it running. A component's own commands are
|
|
37
|
-
* marked by the factory instead, from their pieces.
|
|
25
|
+
* Whether it may be held at its end values once finished instead of run (`settled-index.ts`): the library's
|
|
26
|
+
* own implementation of a command whose `at` reads only what it captured when built. Expression args bind live
|
|
27
|
+
* values, so they keep it running. A component's own commands are marked by the factory.
|
|
38
28
|
*/
|
|
39
29
|
export declare function holdsWhenFinished(traits: CommandTraits | null, spec: CommandSpec): boolean;
|
|
40
|
-
/**
|
|
41
|
-
* The node ids a command's args name through a `nodeRef` argument — the nodes
|
|
42
|
-
* whose boxes it may read when it is built, beside its own target.
|
|
43
|
-
*/
|
|
30
|
+
/** The nodes whose boxes it may read when built, beside its own target. */
|
|
44
31
|
export declare function commandNodeRefs(registry: Registry, spec: CommandSpec, target: NodeSpec | undefined): string[];
|
|
45
|
-
/** Whether `type` hands its descendants a context of its own. */
|
|
46
32
|
export declare function isContextProvider(registry: Registry, type: string): boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Whether an authored value holds an expression reading another node's prop
|
|
49
|
-
* (`[card.x]`), at any depth. An unparsable one counts: it fails the build anyway.
|
|
50
|
-
*/
|
|
33
|
+
/** An unparsable expression counts: it fails the build anyway. */
|
|
51
34
|
export declare function hasNodeRef(value: unknown): boolean;
|
|
52
35
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* Every node's placement is applied after layout; past that, answered only for
|
|
56
|
-
* the library's own classes, since a custom node may lay itself out from anything.
|
|
36
|
+
* Every node's placement is applied after layout; past that, answered only for the library's own classes,
|
|
37
|
+
* since a custom node may lay itself out from anything.
|
|
57
38
|
*/
|
|
58
39
|
export declare function isLayoutNeutralProp(registry: Registry, type: string, key: string): boolean;
|
|
59
40
|
/** Whether `key` is placement every node of `type` holds as a plain slot, read only once a frame is drawn. */
|
|
60
41
|
export declare function isPlacementProp(registry: Registry, type: string, key: string): boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Whether a new `key` on `row` can be written onto its live node as a fresh
|
|
63
|
-
* build would set it: placement, on a row with no prop its node turns into
|
|
64
|
-
* placement when built (`topLeft` binds `x` and `y`).
|
|
65
|
-
*/
|
|
42
|
+
/** Placement, on a row with no prop its node turns into placement when built (`topLeft` binds `x` and `y`). */
|
|
66
43
|
export declare function writesPlacementInPlace(registry: Registry, row: NodeSpec, key: string): boolean;
|
|
67
44
|
//# sourceMappingURL=command-traits.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-traits.d.ts","sourceRoot":"","sources":["../../src/document/command-traits.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAwB,MAAM,YAAY,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGrD
|
|
1
|
+
{"version":3,"file":"command-traits.d.ts","sourceRoot":"","sources":["../../src/document/command-traits.ts"],"names":[],"mappings":"AAE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