@motionscript/core 0.1.0-alpha.6 → 0.1.0-alpha.8
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 +34 -0
- package/NOTICE +15 -14
- package/README.md +5 -7
- package/dist/assets/errors.js +4 -5
- package/dist/assets/errors.js.map +1 -1
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/assets/manager.js +7 -5
- package/dist/assets/manager.js.map +1 -1
- package/dist/assets/scope.d.ts +1 -1
- package/dist/assets/scope.d.ts.map +1 -1
- package/dist/assets/scope.js +1 -1
- package/dist/assets/scope.js.map +1 -1
- package/dist/attributes/audio/effects/chain.d.ts +73 -0
- package/dist/attributes/audio/effects/chain.d.ts.map +1 -0
- package/dist/attributes/audio/effects/chain.js +67 -0
- package/dist/attributes/audio/effects/chain.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/echo.d.ts +14 -0
- package/dist/attributes/audio/effects/implementations/echo.d.ts.map +1 -0
- package/dist/attributes/audio/effects/implementations/echo.js +11 -0
- package/dist/attributes/audio/effects/implementations/echo.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/gain.d.ts +10 -0
- package/dist/attributes/audio/effects/implementations/gain.d.ts.map +1 -0
- package/dist/attributes/audio/effects/implementations/gain.js +6 -0
- package/dist/attributes/audio/effects/implementations/gain.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/highpass.d.ts +12 -0
- package/dist/attributes/audio/effects/implementations/highpass.d.ts.map +1 -0
- package/dist/attributes/audio/effects/implementations/highpass.js +10 -0
- package/dist/attributes/audio/effects/implementations/highpass.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/lowpass.d.ts +12 -0
- package/dist/attributes/audio/effects/implementations/lowpass.d.ts.map +1 -0
- package/dist/attributes/audio/effects/implementations/lowpass.js +10 -0
- package/dist/attributes/audio/effects/implementations/lowpass.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/tremolo.d.ts +12 -0
- package/dist/attributes/audio/effects/implementations/tremolo.d.ts.map +1 -0
- package/dist/attributes/audio/effects/implementations/tremolo.js +10 -0
- package/dist/attributes/audio/effects/implementations/tremolo.js.map +1 -0
- package/dist/attributes/audio/effects/index.d.ts +12 -0
- package/dist/attributes/audio/effects/index.d.ts.map +1 -0
- package/dist/attributes/audio/effects/index.js +4 -0
- package/dist/attributes/audio/effects/index.js.map +1 -0
- package/dist/attributes/audio/effects/registry.d.ts +36 -0
- package/dist/attributes/audio/effects/registry.d.ts.map +1 -0
- package/dist/attributes/audio/effects/registry.js +80 -0
- package/dist/attributes/audio/effects/registry.js.map +1 -0
- package/dist/attributes/audio/effects/union.d.ts +14 -0
- package/dist/attributes/audio/effects/union.d.ts.map +1 -0
- package/dist/attributes/audio/effects/union.js +24 -0
- package/dist/attributes/audio/effects/union.js.map +1 -0
- package/dist/attributes/audio/ramp.d.ts +103 -0
- package/dist/attributes/audio/ramp.d.ts.map +1 -0
- package/dist/attributes/audio/ramp.js +246 -0
- package/dist/attributes/audio/ramp.js.map +1 -0
- package/dist/attributes/audio/request.d.ts +24 -13
- package/dist/attributes/audio/request.d.ts.map +1 -1
- package/dist/attributes/audio/request.js +4 -3
- package/dist/attributes/audio/request.js.map +1 -1
- package/dist/attributes/audio/schedule.d.ts +24 -31
- package/dist/attributes/audio/schedule.d.ts.map +1 -1
- package/dist/attributes/audio/schedule.js +42 -28
- package/dist/attributes/audio/schedule.js.map +1 -1
- package/dist/attributes/audio/sound.d.ts +15 -12
- package/dist/attributes/audio/sound.d.ts.map +1 -1
- package/dist/attributes/audio/sound.js +8 -10
- package/dist/attributes/audio/sound.js.map +1 -1
- package/dist/attributes/audio/transition.d.ts +33 -0
- package/dist/attributes/audio/transition.d.ts.map +1 -0
- package/dist/attributes/audio/transition.js +48 -0
- package/dist/attributes/audio/transition.js.map +1 -0
- package/dist/attributes/index.d.ts +7 -8
- package/dist/attributes/index.d.ts.map +1 -1
- package/dist/attributes/index.js +6 -9
- package/dist/attributes/index.js.map +1 -1
- package/dist/attributes/layout/insets.d.ts +1 -1
- package/dist/attributes/layout/insets.js.map +1 -1
- package/dist/attributes/layout/matrix2d.d.ts +2 -2
- package/dist/attributes/layout/matrix2d.js.map +1 -1
- package/dist/attributes/layout/size.d.ts +1 -1
- package/dist/attributes/layout/size.js +1 -1
- package/dist/attributes/layout/size.js.map +1 -1
- package/dist/attributes/layout/space3d.js +1 -1
- package/dist/attributes/layout/space3d.js.map +1 -1
- package/dist/attributes/properties/decorator.d.ts +44 -11
- package/dist/attributes/properties/decorator.d.ts.map +1 -1
- package/dist/attributes/properties/decorator.js +37 -9
- package/dist/attributes/properties/decorator.js.map +1 -1
- package/dist/attributes/properties/inputs.d.ts +1 -1
- package/dist/attributes/properties/inputs.js +1 -1
- package/dist/attributes/properties/inputs.js.map +1 -1
- package/dist/attributes/properties/typed.d.ts +24 -145
- package/dist/attributes/properties/typed.d.ts.map +1 -1
- package/dist/attributes/properties/typed.js +16 -112
- package/dist/attributes/properties/typed.js.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.d.ts +2 -3
- package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.js +2 -3
- package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
- package/dist/attributes/shape/effects/chain.d.ts +96 -409
- package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/chain.js +93 -283
- package/dist/attributes/shape/effects/chain.js.map +1 -1
- package/dist/attributes/shape/effects/effect-data.d.ts +1 -1
- package/dist/attributes/shape/effects/effect-data.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.d.ts +45 -13
- package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.js +29 -23
- package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +32 -7
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js +17 -15
- package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts +46 -10
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js +21 -19
- package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.d.ts +32 -7
- package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.js +17 -11
- package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.d.ts +16 -3
- package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.js +13 -5
- package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.d.ts +28 -9
- package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.js +15 -14
- package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +21 -5
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +15 -10
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +96 -26
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js +29 -26
- package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.d.ts +20 -6
- package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.js +26 -23
- package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +26 -5
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js +15 -10
- package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.d.ts +58 -11
- package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.js +26 -20
- package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +47 -15
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js +24 -29
- package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.d.ts +26 -7
- package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.js +17 -16
- package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.d.ts +29 -7
- package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.js +17 -14
- package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.d.ts +76 -19
- package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.js +28 -22
- package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.d.ts +149 -42
- package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.js +74 -72
- package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.d.ts +43 -11
- package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.js +21 -18
- package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts +17 -3
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js +13 -5
- package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.d.ts +40 -9
- package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.js +20 -16
- package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.d.ts +23 -5
- package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.js +15 -10
- package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +57 -18
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js +25 -22
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.d.ts +34 -7
- package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.js +20 -16
- package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.d.ts +27 -9
- package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.js +17 -14
- package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +54 -19
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.js +42 -20
- package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +17 -3
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js +13 -9
- package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.d.ts +28 -8
- package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.js +18 -17
- package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts +25 -6
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js +16 -14
- package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.d.ts +14 -3
- package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.js +13 -9
- package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +91 -26
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.js +27 -28
- package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +49 -10
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js +19 -20
- package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +36 -6
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js +16 -15
- package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts +52 -11
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js +21 -18
- package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.d.ts +23 -9
- package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.js +15 -12
- package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.d.ts +90 -34
- package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.js +42 -26
- package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts +23 -5
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js +16 -11
- package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.d.ts +40 -9
- package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.js +19 -16
- package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.d.ts +24 -5
- package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.js +17 -11
- package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.d.ts +35 -8
- package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.js +17 -16
- package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.d.ts +37 -7
- package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.js +19 -18
- package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.d.ts +24 -5
- package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.js +15 -10
- package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.d.ts +61 -14
- package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.js +26 -23
- package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
- package/dist/attributes/shape/effects/index.d.ts +4 -2
- package/dist/attributes/shape/effects/index.d.ts.map +1 -1
- package/dist/attributes/shape/effects/index.js +1 -1
- package/dist/attributes/shape/effects/index.js.map +1 -1
- package/dist/attributes/shape/effects/registry.d.ts +11 -0
- package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
- package/dist/attributes/shape/effects/registry.js +113 -102
- package/dist/attributes/shape/effects/registry.js.map +1 -1
- package/dist/attributes/shape/effects/spec.d.ts +229 -0
- package/dist/attributes/shape/effects/spec.d.ts.map +1 -0
- package/dist/attributes/shape/effects/spec.js +178 -0
- package/dist/attributes/shape/effects/spec.js.map +1 -0
- package/dist/attributes/shape/fill/chain.d.ts +7 -9
- package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
- package/dist/attributes/shape/fill/chain.js +9 -11
- package/dist/attributes/shape/fill/chain.js.map +1 -1
- package/dist/attributes/shape/fill/color/parser.d.ts +1 -1
- package/dist/attributes/shape/fill/color/parser.js +1 -1
- package/dist/attributes/shape/fill/color/parser.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -2
- package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.d.ts +28 -27
- package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.js +20 -14
- package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.d.ts +1 -1
- package/dist/attributes/shape/fill/implementations/video.js +1 -1
- package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
- package/dist/attributes/shape/fill/index.d.ts +1 -1
- package/dist/attributes/shape/fill/index.d.ts.map +1 -1
- package/dist/attributes/shape/fill/index.js.map +1 -1
- package/dist/attributes/shape/fill/lerp.d.ts +1 -1
- package/dist/attributes/shape/fill/lerp.js.map +1 -1
- package/dist/attributes/shape/fill/registry.d.ts +1 -2
- package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
- package/dist/attributes/shape/fill/registry.js +1 -2
- package/dist/attributes/shape/fill/registry.js.map +1 -1
- package/dist/attributes/shape/filters/chain.d.ts +3 -7
- package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
- package/dist/attributes/shape/filters/chain.js +2 -6
- package/dist/attributes/shape/filters/chain.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +2 -2
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
- package/dist/attributes/shape/filters/registry.d.ts +1 -1
- package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
- package/dist/attributes/shape/filters/registry.js +3 -3
- package/dist/attributes/shape/filters/registry.js.map +1 -1
- package/dist/attributes/shape/filters/union.d.ts +6 -6
- 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/ops.d.ts +1 -2
- package/dist/attributes/shape/path/ops.d.ts.map +1 -1
- package/dist/attributes/shape/path/ops.js.map +1 -1
- package/dist/attributes/shape/shaders/index.d.ts +2 -0
- package/dist/attributes/shape/shaders/index.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/index.js +2 -0
- package/dist/attributes/shape/shaders/index.js.map +1 -1
- package/dist/attributes/shape/shaders/language.d.ts +26 -0
- package/dist/attributes/shape/shaders/language.d.ts.map +1 -0
- package/dist/attributes/shape/shaders/language.js +20 -0
- package/dist/attributes/shape/shaders/language.js.map +1 -0
- package/dist/attributes/shape/shaders/pack.d.ts +25 -11
- package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/pack.js +9 -4
- package/dist/attributes/shape/shaders/pack.js.map +1 -1
- package/dist/attributes/shape/shaders/resolve.d.ts +4 -5
- package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/resolve.js +3 -6
- package/dist/attributes/shape/shaders/resolve.js.map +1 -1
- package/dist/attributes/shape/shaders/uniforms.d.ts +41 -0
- package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -0
- package/dist/attributes/shape/shaders/uniforms.js +0 -0
- package/dist/attributes/shape/shaders/uniforms.js.map +1 -0
- package/dist/attributes/shared/operators.d.ts +2 -2
- package/dist/attributes/shared/operators.js.map +1 -1
- package/dist/attributes/text/types.d.ts +2 -3
- package/dist/attributes/text/types.d.ts.map +1 -1
- package/dist/attributes/text/types.js.map +1 -1
- package/dist/browser/chunks/chunk-AOT33LMS.js +13 -0
- package/dist/browser/chunks/chunk-AOT33LMS.js.map +7 -0
- package/dist/browser/chunks/chunk-GKM6UZJR.js +6 -0
- package/dist/browser/chunks/chunk-GKM6UZJR.js.map +7 -0
- package/dist/browser/chunks/chunk-LKUYVFU3.js +2 -0
- package/dist/browser/chunks/{chunk-DHB4COFY.js.map → chunk-LKUYVFU3.js.map} +4 -4
- package/dist/browser/chunks/chunk-ZRPZPWZU.js +3 -0
- package/dist/browser/chunks/chunk-ZRPZPWZU.js.map +7 -0
- package/dist/browser/component.js +1 -1
- package/dist/browser/component.js.map +4 -4
- package/dist/browser/experimental.js +1 -1
- package/dist/browser/experimental.js.map +4 -4
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/browser/manifest.json +2 -4
- package/dist/browser/sdk.js +1 -1
- package/dist/component.d.ts +10 -18
- package/dist/component.d.ts.map +1 -1
- package/dist/component.js +10 -17
- package/dist/component.js.map +1 -1
- package/dist/components/builtins/audio/audio.d.ts +62 -0
- package/dist/components/builtins/audio/audio.d.ts.map +1 -0
- package/dist/components/builtins/audio/audio.js +38 -0
- package/dist/components/builtins/audio/audio.js.map +1 -0
- package/dist/components/builtins/geometry/composite.d.ts +93 -0
- package/dist/components/builtins/geometry/composite.d.ts.map +1 -0
- package/dist/components/builtins/geometry/composite.js +25 -0
- package/dist/components/builtins/geometry/composite.js.map +1 -0
- package/dist/components/builtins/geometry/geometry.d.ts +921 -0
- package/dist/components/builtins/geometry/geometry.d.ts.map +1 -0
- package/dist/components/builtins/geometry/geometry.js +107 -0
- package/dist/components/builtins/geometry/geometry.js.map +1 -0
- package/dist/components/builtins/geometry/shape-outline.d.ts +93 -0
- package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -0
- package/dist/components/builtins/geometry/shape-outline.js +470 -0
- package/dist/components/builtins/geometry/shape-outline.js.map +1 -0
- package/dist/components/builtins/layout/layout.d.ts +186 -0
- package/dist/components/builtins/layout/layout.d.ts.map +1 -0
- package/dist/components/builtins/layout/layout.js +84 -0
- package/dist/components/builtins/layout/layout.js.map +1 -0
- package/dist/components/builtins/media/media.d.ts +240 -0
- package/dist/components/builtins/media/media.d.ts.map +1 -0
- package/dist/components/builtins/media/media.js +143 -0
- package/dist/components/builtins/media/media.js.map +1 -0
- package/dist/components/builtins/providers/providers.d.ts +47 -0
- package/dist/components/builtins/providers/providers.d.ts.map +1 -0
- package/dist/components/builtins/providers/providers.js +30 -0
- package/dist/components/builtins/providers/providers.js.map +1 -0
- package/dist/components/builtins/text/number-format.d.ts +66 -0
- package/dist/components/builtins/text/number-format.d.ts.map +1 -0
- package/dist/components/builtins/text/number-format.js +227 -0
- package/dist/components/builtins/text/number-format.js.map +1 -0
- package/dist/components/builtins/text/number-pattern.d.ts +51 -0
- package/dist/components/builtins/text/number-pattern.d.ts.map +1 -0
- package/dist/components/builtins/text/number-pattern.js +77 -0
- package/dist/components/builtins/text/number-pattern.js.map +1 -0
- package/dist/components/builtins/text/text-defaults.d.ts +32 -0
- package/dist/components/builtins/text/text-defaults.d.ts.map +1 -0
- package/dist/components/builtins/text/text-defaults.js +37 -0
- package/dist/components/builtins/text/text-defaults.js.map +1 -0
- package/dist/components/builtins/text/text-layout.d.ts +82 -0
- package/dist/components/builtins/text/text-layout.d.ts.map +1 -0
- package/dist/components/builtins/text/text-layout.js +331 -0
- package/dist/components/builtins/text/text-layout.js.map +1 -0
- package/dist/components/builtins/text/text.d.ts +409 -0
- package/dist/components/builtins/text/text.d.ts.map +1 -0
- package/dist/components/builtins/text/text.js +116 -0
- package/dist/components/builtins/text/text.js.map +1 -0
- package/dist/components/builtins/three/canvas3d.d.ts +245 -0
- package/dist/components/builtins/three/canvas3d.d.ts.map +1 -0
- package/dist/components/builtins/three/canvas3d.js +21 -0
- package/dist/components/builtins/three/canvas3d.js.map +1 -0
- package/dist/components/builtins/three/grid-geometry3d.d.ts +62 -0
- package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -0
- package/dist/components/builtins/three/grid-geometry3d.js +114 -0
- package/dist/components/builtins/three/grid-geometry3d.js.map +1 -0
- package/dist/components/builtins/three/three.d.ts +1889 -0
- package/dist/components/builtins/three/three.d.ts.map +1 -0
- package/dist/components/builtins/three/three.js +305 -0
- package/dist/components/builtins/three/three.js.map +1 -0
- package/dist/components/factory/api.d.ts +543 -0
- package/dist/components/factory/api.d.ts.map +1 -0
- package/dist/components/factory/api.js +4 -0
- package/dist/components/factory/api.js.map +1 -0
- package/dist/components/factory/clip-of.d.ts +5 -0
- package/dist/components/factory/clip-of.d.ts.map +1 -0
- package/dist/components/factory/clip-of.js +33 -0
- package/dist/components/factory/clip-of.js.map +1 -0
- package/dist/components/factory/commands-for.d.ts +19 -0
- package/dist/components/factory/commands-for.d.ts.map +1 -0
- package/dist/components/factory/commands-for.js +5 -0
- package/dist/components/factory/commands-for.js.map +1 -0
- package/dist/components/factory/component-audio.d.ts +9 -0
- package/dist/components/factory/component-audio.d.ts.map +1 -0
- package/dist/components/factory/component-audio.js +18 -0
- package/dist/components/factory/component-audio.js.map +1 -0
- package/dist/components/factory/component2d.d.ts +8 -0
- package/dist/components/factory/component2d.d.ts.map +1 -0
- package/dist/components/factory/component2d.js +240 -0
- package/dist/components/factory/component2d.js.map +1 -0
- package/dist/components/factory/component3d.d.ts +9 -0
- package/dist/components/factory/component3d.d.ts.map +1 -0
- package/dist/components/factory/component3d.js +107 -0
- package/dist/components/factory/component3d.js.map +1 -0
- package/dist/components/factory/factory.d.ts +66 -0
- package/dist/components/factory/factory.d.ts.map +1 -0
- package/dist/components/factory/factory.js +347 -0
- package/dist/components/factory/factory.js.map +1 -0
- package/dist/components/factory/timeline.d.ts +22 -0
- package/dist/components/factory/timeline.d.ts.map +1 -0
- package/dist/components/factory/timeline.js +128 -0
- package/dist/components/factory/timeline.js.map +1 -0
- package/dist/components/factory/type-def.d.ts +26 -0
- package/dist/components/factory/type-def.d.ts.map +1 -0
- package/dist/components/factory/type-def.js +16 -0
- package/dist/components/factory/type-def.js.map +1 -0
- package/dist/components/factory/types.d.ts +91 -0
- package/dist/components/factory/types.d.ts.map +1 -0
- package/dist/components/factory/types.js +88 -0
- package/dist/components/factory/types.js.map +1 -0
- package/dist/components/factory/views.d.ts +121 -0
- package/dist/components/factory/views.d.ts.map +1 -0
- package/dist/components/factory/views.js +413 -0
- package/dist/components/factory/views.js.map +1 -0
- package/dist/components/modules/aim.d.ts +30 -0
- package/dist/components/modules/aim.d.ts.map +1 -0
- package/dist/components/modules/aim.js +39 -0
- package/dist/components/modules/aim.js.map +1 -0
- package/dist/components/modules/corners.d.ts +13 -0
- package/dist/components/modules/corners.d.ts.map +1 -0
- package/dist/components/modules/corners.js +12 -0
- package/dist/components/modules/corners.js.map +1 -0
- package/dist/components/modules/flow.d.ts +26 -0
- package/dist/components/modules/flow.d.ts.map +1 -0
- package/dist/components/modules/flow.js +57 -0
- package/dist/components/modules/flow.js.map +1 -0
- package/dist/components/modules/material.d.ts +40 -0
- package/dist/components/modules/material.d.ts.map +1 -0
- package/dist/components/modules/material.js +75 -0
- package/dist/components/modules/material.js.map +1 -0
- package/dist/components/modules/paint.d.ts +71 -0
- package/dist/components/modules/paint.d.ts.map +1 -0
- package/dist/components/modules/paint.js +106 -0
- package/dist/components/modules/paint.js.map +1 -0
- package/dist/components/modules/shapes.d.ts +31 -0
- package/dist/components/modules/shapes.d.ts.map +1 -0
- package/dist/components/modules/shapes.js +43 -0
- package/dist/components/modules/shapes.js.map +1 -0
- package/dist/components/modules/text-layout.d.ts +26 -0
- package/dist/components/modules/text-layout.d.ts.map +1 -0
- package/dist/components/modules/text-layout.js +57 -0
- package/dist/components/modules/text-layout.js.map +1 -0
- package/dist/components/modules/text-style.d.ts +48 -0
- package/dist/components/modules/text-style.d.ts.map +1 -0
- package/dist/components/modules/text-style.js +63 -0
- package/dist/components/modules/text-style.js.map +1 -0
- package/dist/components/modules/three-entries.d.ts +23 -0
- package/dist/components/modules/three-entries.d.ts.map +1 -0
- package/dist/components/modules/three-entries.js +41 -0
- package/dist/components/modules/three-entries.js.map +1 -0
- package/dist/components/modules/view3d.d.ts +59 -0
- package/dist/components/modules/view3d.d.ts.map +1 -0
- package/dist/components/modules/view3d.js +171 -0
- package/dist/components/modules/view3d.js.map +1 -0
- package/dist/components/trees/2d/group-bounds.d.ts +56 -0
- package/dist/components/trees/2d/group-bounds.d.ts.map +1 -0
- package/dist/components/trees/2d/group-bounds.js +87 -0
- package/dist/components/trees/2d/group-bounds.js.map +1 -0
- package/dist/components/trees/2d/node-lifecycle.d.ts +46 -0
- package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -0
- package/dist/components/trees/2d/node-lifecycle.js +264 -0
- package/dist/components/trees/2d/node-lifecycle.js.map +1 -0
- package/dist/components/trees/2d/node-motion.d.ts +56 -0
- package/dist/components/trees/2d/node-motion.d.ts.map +1 -0
- package/dist/components/trees/2d/node-motion.js +86 -0
- package/dist/components/trees/2d/node-motion.js.map +1 -0
- package/dist/components/trees/2d/node-render.d.ts +36 -0
- package/dist/components/trees/2d/node-render.d.ts.map +1 -0
- package/dist/components/trees/2d/node-render.js +67 -0
- package/dist/components/trees/2d/node-render.js.map +1 -0
- package/dist/components/trees/2d/node-space.d.ts +63 -0
- package/dist/components/trees/2d/node-space.d.ts.map +1 -0
- package/dist/components/trees/2d/node-space.js +131 -0
- package/dist/components/trees/2d/node-space.js.map +1 -0
- package/dist/components/trees/2d/node-transform.d.ts +55 -0
- package/dist/components/trees/2d/node-transform.d.ts.map +1 -0
- package/dist/components/trees/2d/node-transform.js +73 -0
- package/dist/components/trees/2d/node-transform.js.map +1 -0
- package/dist/components/trees/2d/node2d.d.ts +1020 -0
- package/dist/components/trees/2d/node2d.d.ts.map +1 -0
- package/dist/components/trees/2d/node2d.js +1481 -0
- package/dist/components/trees/2d/node2d.js.map +1 -0
- package/dist/components/trees/audio/index.d.ts +2 -0
- package/dist/components/trees/audio/index.d.ts.map +1 -0
- package/dist/components/trees/audio/index.js +2 -0
- package/dist/components/trees/audio/index.js.map +1 -0
- package/dist/components/trees/audio/node-audio.d.ts +116 -0
- package/dist/components/trees/audio/node-audio.d.ts.map +1 -0
- package/dist/components/trees/audio/node-audio.js +171 -0
- package/dist/components/trees/audio/node-audio.js.map +1 -0
- package/dist/components/trees/index.d.ts +10 -0
- package/dist/components/trees/index.d.ts.map +1 -0
- package/dist/components/trees/index.js +14 -0
- package/dist/components/trees/index.js.map +1 -0
- package/dist/components/trees/node/node-editor-state.d.ts +53 -0
- package/dist/components/trees/node/node-editor-state.d.ts.map +1 -0
- package/dist/components/trees/node/node-editor-state.js +23 -0
- package/dist/components/trees/node/node-editor-state.js.map +1 -0
- package/dist/components/trees/node/node-reactive.d.ts +89 -0
- package/dist/components/trees/node/node-reactive.d.ts.map +1 -0
- package/dist/components/trees/node/node-reactive.js +135 -0
- package/dist/components/trees/node/node-reactive.js.map +1 -0
- package/dist/components/trees/node/node-time.d.ts +39 -0
- package/dist/components/trees/node/node-time.d.ts.map +1 -0
- package/dist/components/trees/node/node-time.js +14 -0
- package/dist/components/trees/node/node-time.js.map +1 -0
- package/dist/components/trees/node/node-walk.d.ts +46 -0
- package/dist/components/trees/node/node-walk.d.ts.map +1 -0
- package/dist/components/trees/node/node-walk.js +74 -0
- package/dist/components/trees/node/node-walk.js.map +1 -0
- package/dist/components/trees/node/node.d.ts +401 -0
- package/dist/components/trees/node/node.d.ts.map +1 -0
- package/dist/components/trees/node/node.js +680 -0
- package/dist/components/trees/node/node.js.map +1 -0
- package/dist/components/trees/root/canvas2d-node.d.ts +163 -0
- package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -0
- package/dist/components/trees/root/canvas2d-node.js +216 -0
- package/dist/components/trees/root/canvas2d-node.js.map +1 -0
- package/dist/components/trees/three/node3d.d.ts +222 -0
- package/dist/components/trees/three/node3d.d.ts.map +1 -0
- package/dist/components/trees/three/node3d.js +289 -0
- package/dist/components/trees/three/node3d.js.map +1 -0
- package/dist/document/builtins.js +13 -13
- package/dist/document/builtins.js.map +1 -1
- package/dist/document/command-traits.d.ts +14 -4
- package/dist/document/command-traits.d.ts.map +1 -1
- package/dist/document/command-traits.js +35 -7
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/deny-globals.d.ts +2 -2
- package/dist/document/deny-globals.js +2 -2
- package/dist/document/deny-globals.js.map +1 -1
- package/dist/document/expression/index.d.ts +1 -1
- package/dist/document/expression/index.js +1 -1
- package/dist/document/expression/index.js.map +1 -1
- package/dist/document/expression/ops.js +1 -1
- package/dist/document/expression/ops.js.map +1 -1
- package/dist/document/index.d.ts +9 -2
- package/dist/document/index.d.ts.map +1 -1
- package/dist/document/index.js +5 -2
- package/dist/document/index.js.map +1 -1
- package/dist/document/migrate.d.ts +70 -0
- package/dist/document/migrate.d.ts.map +1 -0
- package/dist/document/migrate.js +202 -0
- package/dist/document/migrate.js.map +1 -0
- package/dist/document/missing-node.d.ts +27 -0
- package/dist/document/missing-node.d.ts.map +1 -0
- package/dist/document/missing-node.js +48 -0
- package/dist/document/missing-node.js.map +1 -0
- package/dist/document/node-decorator.d.ts +14 -10
- package/dist/document/node-decorator.d.ts.map +1 -1
- package/dist/document/node-decorator.js +14 -10
- package/dist/document/node-decorator.js.map +1 -1
- package/dist/document/node-descriptor.d.ts +7 -3
- package/dist/document/node-descriptor.d.ts.map +1 -1
- package/dist/document/node-descriptor.js.map +1 -1
- package/dist/document/placement.d.ts +2 -1
- package/dist/document/placement.d.ts.map +1 -1
- package/dist/document/placement.js.map +1 -1
- package/dist/document/project.d.ts +2 -0
- package/dist/document/project.d.ts.map +1 -1
- package/dist/document/project.js +1 -0
- package/dist/document/project.js.map +1 -1
- package/dist/document/prop-evolution.d.ts +51 -0
- package/dist/document/prop-evolution.d.ts.map +1 -0
- package/dist/document/prop-evolution.js +83 -0
- package/dist/document/prop-evolution.js.map +1 -0
- package/dist/document/registry.d.ts +39 -25
- package/dist/document/registry.d.ts.map +1 -1
- package/dist/document/registry.js +41 -21
- package/dist/document/registry.js.map +1 -1
- package/dist/document/settled-index.d.ts +2 -0
- package/dist/document/settled-index.d.ts.map +1 -1
- package/dist/document/settled-index.js +5 -5
- package/dist/document/settled-index.js.map +1 -1
- package/dist/document/timeline-patch.d.ts +4 -0
- package/dist/document/timeline-patch.d.ts.map +1 -1
- package/dist/document/timeline-patch.js +28 -3
- package/dist/document/timeline-patch.js.map +1 -1
- package/dist/document/timeline.d.ts +48 -4
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +174 -44
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.d.ts +18 -32
- package/dist/document/types.d.ts.map +1 -1
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.d.ts +18 -6
- package/dist/document/validate.d.ts.map +1 -1
- package/dist/document/validate.js +158 -21
- package/dist/document/validate.js.map +1 -1
- package/dist/document/vocabulary.d.ts +28 -0
- package/dist/document/vocabulary.d.ts.map +1 -0
- package/dist/document/vocabulary.js +42 -0
- package/dist/document/vocabulary.js.map +1 -0
- package/dist/experimental.d.ts +79 -19
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js +31 -17
- package/dist/experimental.js.map +1 -1
- package/dist/index.d.ts +10 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -11
- package/dist/index.js.map +1 -1
- package/dist/layout/types.d.ts +1 -1
- package/dist/layout/types.js.map +1 -1
- package/dist/platform/exporter.d.ts +13 -0
- package/dist/platform/exporter.d.ts.map +1 -1
- package/dist/platform/exporter.js.map +1 -1
- package/dist/props/host.d.ts +1 -1
- package/dist/props/host.js.map +1 -1
- package/dist/props/slot.d.ts +1 -1
- package/dist/props/slot.js +1 -1
- package/dist/props/slot.js.map +1 -1
- package/dist/renamed-scene-names.d.ts +1 -1
- package/dist/renamed-scene-names.d.ts.map +1 -1
- package/dist/renamed-scene-names.js +1 -1
- package/dist/renamed-scene-names.js.map +1 -1
- package/dist/render/canvas-render-context2d.d.ts +9 -0
- package/dist/render/canvas-render-context2d.d.ts.map +1 -1
- package/dist/render/canvas-render-context2d.js +10 -0
- package/dist/render/canvas-render-context2d.js.map +1 -1
- package/dist/render/clip-contains.js +1 -1
- package/dist/render/clip-contains.js.map +1 -1
- package/dist/render/clip.d.ts +1 -1
- package/dist/render/clip.js +1 -1
- package/dist/render/clip.js.map +1 -1
- package/dist/render/descriptors/rect.js.map +1 -1
- package/dist/render/descriptors/text.d.ts +13 -7
- package/dist/render/descriptors/text.d.ts.map +1 -1
- package/dist/render/descriptors/text.js +9 -3
- package/dist/render/descriptors/text.js.map +1 -1
- package/dist/render/index.d.ts +2 -0
- package/dist/render/index.d.ts.map +1 -1
- package/dist/render/index.js +1 -0
- package/dist/render/index.js.map +1 -1
- package/dist/render/render-context2d.d.ts +3 -3
- package/dist/render/render-context2d.js.map +1 -1
- package/dist/render/render-issue.d.ts +39 -0
- package/dist/render/render-issue.d.ts.map +1 -0
- package/dist/render/render-issue.js +29 -0
- package/dist/render/render-issue.js.map +1 -0
- package/dist/render/surface.d.ts +2 -2
- package/dist/render/surface.js.map +1 -1
- package/dist/render3d/builders.d.ts +1 -1
- package/dist/render3d/builders.js +1 -1
- package/dist/render3d/builders.js.map +1 -1
- package/dist/render3d/graphics3d.d.ts +13 -19
- package/dist/render3d/graphics3d.d.ts.map +1 -1
- package/dist/render3d/graphics3d.js +67 -24
- package/dist/render3d/graphics3d.js.map +1 -1
- package/dist/render3d/scene3d.d.ts +1 -1
- package/dist/render3d/scene3d.js +1 -1
- package/dist/render3d/scene3d.js.map +1 -1
- package/dist/render3d/texture.d.ts +2 -2
- package/dist/render3d/texture.d.ts.map +1 -1
- package/dist/render3d/texture.js.map +1 -1
- package/dist/render3d/vector3.d.ts +2 -2
- package/dist/render3d/vector3.js +2 -2
- package/dist/render3d/vector3.js.map +1 -1
- package/dist/runtime/asset-refine.d.ts +1 -1
- package/dist/runtime/asset-refine.d.ts.map +1 -1
- package/dist/runtime/asset-refine.js +3 -2
- package/dist/runtime/asset-refine.js.map +1 -1
- package/dist/runtime/asset-timeline.d.ts +10 -0
- package/dist/runtime/asset-timeline.d.ts.map +1 -1
- package/dist/runtime/asset-timeline.js.map +1 -1
- package/dist/runtime/asset-update.d.ts.map +1 -1
- package/dist/runtime/asset-update.js +8 -1
- package/dist/runtime/asset-update.js.map +1 -1
- package/dist/runtime/audio-index.d.ts +0 -11
- package/dist/runtime/audio-index.d.ts.map +1 -1
- package/dist/runtime/audio-index.js +0 -25
- package/dist/runtime/audio-index.js.map +1 -1
- package/dist/runtime/clip-instance.d.ts +6 -4
- package/dist/runtime/clip-instance.d.ts.map +1 -1
- package/dist/runtime/clip-instance.js +8 -4
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.d.ts +2 -3
- package/dist/runtime/clip-store.d.ts.map +1 -1
- package/dist/runtime/clip-store.js +34 -37
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.d.ts +8 -6
- package/dist/runtime/engine.d.ts.map +1 -1
- package/dist/runtime/engine.js +4 -3
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/node-picking.d.ts +2 -2
- package/dist/runtime/node-picking.d.ts.map +1 -1
- package/dist/runtime/node-picking.js +3 -3
- package/dist/runtime/node-picking.js.map +1 -1
- package/dist/runtime/node-picking3d.d.ts +2 -2
- package/dist/runtime/node-picking3d.d.ts.map +1 -1
- package/dist/runtime/node-picking3d.js +1 -1
- package/dist/runtime/node-picking3d.js.map +1 -1
- package/dist/runtime/playback-controller.d.ts +2 -2
- package/dist/runtime/playback-controller.d.ts.map +1 -1
- package/dist/runtime/playback-controller.js +15 -5
- package/dist/runtime/playback-controller.js.map +1 -1
- package/dist/runtime/session.d.ts +7 -3
- package/dist/runtime/session.d.ts.map +1 -1
- package/dist/runtime/session.js +11 -4
- package/dist/runtime/session.js.map +1 -1
- package/dist/runtime/state-evaluator.d.ts +2 -2
- package/dist/runtime/state-evaluator.d.ts.map +1 -1
- package/dist/runtime/state-evaluator.js.map +1 -1
- package/dist/runtime/text-geometry.d.ts +2 -2
- package/dist/runtime/text-geometry.d.ts.map +1 -1
- package/dist/runtime/text-geometry.js +4 -5
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.d.ts +50 -44
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +35 -29
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command-decorator.d.ts +14 -9
- package/dist/tween/command-decorator.d.ts.map +1 -1
- package/dist/tween/command-decorator.js +3 -2
- package/dist/tween/command-decorator.js.map +1 -1
- package/dist/tween/command.d.ts +1 -1
- package/dist/tween/command.js.map +1 -1
- package/dist/tween/ease/describe.d.ts +2 -0
- package/dist/tween/ease/describe.d.ts.map +1 -1
- package/dist/tween/ease/describe.js +4 -0
- package/dist/tween/ease/describe.js.map +1 -1
- package/dist/tween/ease/spec.d.ts +31 -0
- package/dist/tween/ease/spec.d.ts.map +1 -0
- package/dist/tween/ease/spec.js +51 -0
- package/dist/tween/ease/spec.js.map +1 -0
- package/dist/tween/index.d.ts +3 -1
- package/dist/tween/index.d.ts.map +1 -1
- package/dist/tween/index.js +2 -1
- package/dist/tween/index.js.map +1 -1
- package/dist/tween/loop.d.ts +1 -1
- package/dist/tween/loop.js +1 -1
- package/dist/tween/loop.js.map +1 -1
- package/dist/util/reference.d.ts +6 -6
- package/dist/util/reference.js.map +1 -1
- package/package.json +3 -11
- package/dist/browser/chunks/chunk-2RIYH36X.js +0 -3
- package/dist/browser/chunks/chunk-2RIYH36X.js.map +0 -7
- package/dist/browser/chunks/chunk-DDJN3QII.js +0 -15
- package/dist/browser/chunks/chunk-DDJN3QII.js.map +0 -7
- package/dist/browser/chunks/chunk-DHB4COFY.js +0 -2
- package/dist/browser/chunks/chunk-EJDPYDQI.js +0 -5
- package/dist/browser/chunks/chunk-EJDPYDQI.js.map +0 -7
- package/dist/browser/chunks/chunk-SFNJRPBV.js +0 -2
- package/dist/browser/chunks/chunk-SFNJRPBV.js.map +0 -7
- package/dist/browser/chunks/chunk-XAWE4EAK.js +0 -2
- package/dist/browser/chunks/chunk-XAWE4EAK.js.map +0 -7
- package/dist/browser/jsx-jsx-dev-runtime.js +0 -2
- package/dist/browser/jsx-jsx-dev-runtime.js.map +0 -7
- package/dist/browser/jsx-jsx-runtime.js +0 -2
- package/dist/browser/jsx-jsx-runtime.js.map +0 -7
package/dist/experimental.js
CHANGED
|
@@ -1,20 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* @deprecated A duplicate of the stable authoring surface, kept until the next
|
|
3
|
+
* major: import from `@motionscript/sdk` (or `@motionscript/core/sdk`), where
|
|
4
|
+
* `TextStyle` is `Typeface` and `Corners` is `Shapes.corners` / `Shapes.rect`.
|
|
4
5
|
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
export
|
|
6
|
+
import { component2d as _component2d } from "./components/factory/component2d.js";
|
|
7
|
+
import { componentAudio as _componentAudio } from "./components/factory/component-audio.js";
|
|
8
|
+
import { component3d as _component3d } from "./components/factory/component3d.js";
|
|
9
|
+
import { commandsFor as _commandsFor } from "./components/factory/commands-for.js";
|
|
10
|
+
import { Types as _Types } from "./components/factory/types.js";
|
|
11
|
+
import { provides as _provides } from "./components/factory/api.js";
|
|
12
|
+
// Re-export statements cannot carry `@deprecated`, so the values are re-declared.
|
|
13
|
+
/** @deprecated Import `component2d` from `@motionscript/sdk`. */
|
|
14
|
+
export const component2d = _component2d;
|
|
15
|
+
/** @deprecated Import `componentAudio` from `@motionscript/sdk`. */
|
|
16
|
+
export const componentAudio = _componentAudio;
|
|
17
|
+
/** @deprecated Import `component3d` from `@motionscript/sdk`. */
|
|
18
|
+
export const component3d = _component3d;
|
|
19
|
+
/** @deprecated Import `commandsFor` from `@motionscript/sdk`. */
|
|
20
|
+
export const commandsFor = _commandsFor;
|
|
21
|
+
/** @deprecated Import `Types` from `@motionscript/sdk`. */
|
|
22
|
+
export const Types = _Types;
|
|
23
|
+
/** @deprecated Import `provides` from `@motionscript/sdk`. */
|
|
24
|
+
export const provides = _provides;
|
|
25
|
+
export * as Paint from "./components/modules/paint.js";
|
|
26
|
+
export * as Flow from "./components/modules/flow.js";
|
|
27
|
+
export * as Corners from "./components/modules/corners.js";
|
|
28
|
+
export * as Shapes from "./components/modules/shapes.js";
|
|
29
|
+
export * as Aim from "./components/modules/aim.js";
|
|
30
|
+
export * as TextStyle from "./components/modules/text-style.js";
|
|
31
|
+
export * as TextLayout from "./components/modules/text-layout.js";
|
|
32
|
+
export * as Material from "./components/modules/material.js";
|
|
33
|
+
export * as View3D from "./components/modules/view3d.js";
|
|
20
34
|
//# sourceMappingURL=experimental.js.map
|
package/dist/experimental.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experimental.js","sourceRoot":"","sources":["../src/experimental.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"experimental.js","sourceRoot":"","sources":["../src/experimental.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,WAAW,IAAI,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,cAAc,IAAI,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACzF,OAAO,EAAE,WAAW,IAAI,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,WAAW,IAAI,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAEjE,kFAAkF;AAClF,iEAAiE;AACjE,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC;AACxC,oEAAoE;AACpE,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,CAAC;AAC9C,iEAAiE;AACjE,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC;AACxC,iEAAiE;AACjE,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC;AACxC,2DAA2D;AAC3D,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC;AAC5B,8DAA8D;AAC9D,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC;AAQlC,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AACpD,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAC;AACxD,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,GAAG,MAAM,0BAA0B,CAAC;AAChD,OAAO,KAAK,SAAS,MAAM,iCAAiC,CAAC;AAC7D,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,KAAK,QAAQ,MAAM,+BAA+B,CAAC;AAC1D,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC","sourcesContent":["/**\r\n * @deprecated A duplicate of the stable authoring surface, kept until the next\r\n * major: import from `@motionscript/sdk` (or `@motionscript/core/sdk`), where\r\n * `TextStyle` is `Typeface` and `Corners` is `Shapes.corners` / `Shapes.rect`.\r\n */\r\nimport { component2d as _component2d } from \"@/components/factory/component2d\";\r\nimport { componentAudio as _componentAudio } from \"@/components/factory/component-audio\";\r\nimport { component3d as _component3d } from \"@/components/factory/component3d\";\r\nimport { commandsFor as _commandsFor } from \"@/components/factory/commands-for\";\r\nimport { Types as _Types } from \"@/components/factory/types\";\r\nimport { provides as _provides } from \"@/components/factory/api\";\r\n\r\n// Re-export statements cannot carry `@deprecated`, so the values are re-declared.\r\n/** @deprecated Import `component2d` from `@motionscript/sdk`. */\r\nexport const component2d = _component2d;\r\n/** @deprecated Import `componentAudio` from `@motionscript/sdk`. */\r\nexport const componentAudio = _componentAudio;\r\n/** @deprecated Import `component3d` from `@motionscript/sdk`. */\r\nexport const component3d = _component3d;\r\n/** @deprecated Import `commandsFor` from `@motionscript/sdk`. */\r\nexport const commandsFor = _commandsFor;\r\n/** @deprecated Import `Types` from `@motionscript/sdk`. */\r\nexport const Types = _Types;\r\n/** @deprecated Import `provides` from `@motionscript/sdk`. */\r\nexport const provides = _provides;\r\n\r\nexport type { Attribute, EntryOptions, NumberOptions, TextOptions } from \"@/components/factory/types\";\r\nexport type {\r\n Box2DState, BoxAudioState, CallProps, ChildView, Children2D, Component, Element, Entry, InOf, Inputs, Loader,\r\n Measurer, MergePaint, NodeOf, NodeView, OutOf, Piece, Placement2D, Provided, RenderContext2D, SoundOptions, StateSpec,\r\n Timeline, Type, Values, Writes, Merge, BuiltNode, CallProps3D, Placement3DProps, RenderContext3D, Transform3DState, Handle, LayoutBox, NodeFrame,\r\n} from \"@/components/factory/api\";\r\nexport * as Paint from \"@/components/modules/paint\";\r\nexport * as Flow from \"@/components/modules/flow\";\r\nexport * as Corners from \"@/components/modules/corners\";\r\nexport * as Shapes from \"@/components/modules/shapes\";\r\nexport * as Aim from \"@/components/modules/aim\";\r\nexport * as TextStyle from \"@/components/modules/text-style\";\r\nexport * as TextLayout from \"@/components/modules/text-layout\";\r\nexport * as Material from \"@/components/modules/material\";\r\nexport * as View3D from \"@/components/modules/view3d\";\r\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export * from './attributes/index.js';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
2
|
+
export * from './components/trees/index.js';
|
|
3
|
+
export * from './components/builtins/geometry/geometry.js';
|
|
4
|
+
export * from './components/builtins/geometry/composite.js';
|
|
5
|
+
export * from './components/builtins/layout/layout.js';
|
|
6
|
+
export * from './components/builtins/text/text.js';
|
|
7
|
+
export * from './components/builtins/providers/providers.js';
|
|
8
|
+
export * from './components/builtins/audio/audio.js';
|
|
9
|
+
export * from './components/builtins/media/media.js';
|
|
10
|
+
export * from './components/builtins/three/three.js';
|
|
11
|
+
export * from './components/builtins/three/canvas3d.js';
|
|
12
12
|
export * from './project/index.js';
|
|
13
13
|
export * from './document/index.js';
|
|
14
14
|
export * from './render/index.js';
|
|
@@ -20,6 +20,5 @@ export * from './util/index.js';
|
|
|
20
20
|
export * from './tween/index.js';
|
|
21
21
|
export * from './props/index.js';
|
|
22
22
|
export * from './layout/index.js';
|
|
23
|
-
export * from './jsx/jsx-runtime.js';
|
|
24
23
|
export * from './renamed-scene-names.js';
|
|
25
24
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AAEzB,cAAc,uBAAuB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export * from './attributes/index.js';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
2
|
+
export * from './components/trees/index.js';
|
|
3
|
+
export * from './components/builtins/geometry/geometry.js';
|
|
4
|
+
export * from './components/builtins/geometry/composite.js';
|
|
5
|
+
export * from './components/builtins/layout/layout.js';
|
|
6
|
+
export * from './components/builtins/text/text.js';
|
|
7
|
+
export * from './components/builtins/providers/providers.js';
|
|
8
|
+
export * from './components/builtins/audio/audio.js';
|
|
9
|
+
export * from './components/builtins/media/media.js';
|
|
10
|
+
export * from './components/builtins/three/three.js';
|
|
11
|
+
export * from './components/builtins/three/canvas3d.js';
|
|
12
12
|
export * from './project/index.js';
|
|
13
13
|
export * from './document/index.js';
|
|
14
14
|
export * from './render/index.js';
|
|
@@ -20,6 +20,5 @@ export * from './util/index.js';
|
|
|
20
20
|
export * from './tween/index.js';
|
|
21
21
|
export * from './props/index.js';
|
|
22
22
|
export * from './layout/index.js';
|
|
23
|
-
export * from './jsx/jsx-runtime.js';
|
|
24
23
|
export * from './renamed-scene-names.js';
|
|
25
24
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AAEzB,cAAc,uBAAuB,CAAC","sourcesContent":["export * from './attributes';\r\nexport * from './components/trees';\r\nexport * from './components/builtins/geometry/geometry';\r\nexport * from './components/builtins/geometry/composite';\r\nexport * from './components/builtins/layout/layout';\r\nexport * from './components/builtins/text/text';\r\nexport * from './components/builtins/providers/providers';\r\nexport * from './components/builtins/audio/audio';\r\nexport * from './components/builtins/media/media';\r\nexport * from './components/builtins/three/three';\r\nexport * from './components/builtins/three/canvas3d';\r\nexport * from './project';\r\nexport * from './document';\r\nexport * from './render';\r\nexport * from './render3d';\r\nexport * from './runtime';\r\nexport * from './platform';\r\nexport * from './assets';\r\nexport * from './util'\r\nexport * from './tween';\r\nexport * from './props';\r\nexport * from './layout';\r\n\r\nexport * from './renamed-scene-names';\r\n"]}
|
package/dist/layout/types.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ export interface FlowProps {
|
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
65
|
* What `flowOps` arranges by: the {@link FlowProps} vocabulary, every field
|
|
66
|
-
* optional and defaulting as the prop does. A
|
|
66
|
+
* optional and defaulting as the prop does. A shape's state or a `Canvas2D` is one
|
|
67
67
|
* as it stands.
|
|
68
68
|
*/
|
|
69
69
|
export interface FlowSettings {
|
package/dist/layout/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/layout/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Alignment } from \"@/attributes/layout/alignment\";\r\nimport type { Insets } from \"@/attributes/layout/insets\";\r\nimport type { Size2D, SizeInput } from \"@/attributes/layout/size\";\r\nimport type { MeasureContext2D } from \"@/render/measure-context\";\r\nimport type { BoxBounds } from \"./bounds\";\r\nimport type { SizeConstraints } from \"./constraints\";\r\n\r\n/**\r\n * How a container arranges the items that take part in its layout:\r\n *\r\n * - `'freeform'` — items overlap, each aligned in the padded content box by\r\n * `align` and offset from there by its own `x`/`y`.\r\n * - `'horizontal'` — a run left-to-right.\r\n * - `'vertical'` — a run top-to-bottom.\r\n * - `'grid'` — N equal columns, rows sized to their content (or divided equally\r\n * when the container's height is bounded). Items place themselves with\r\n * `column`/`row` and span with `colSpan`/`rowSpan`; anything unplaced is\r\n * auto-flowed left-to-right.\r\n *\r\n * A run also answers `wrap` — \"and break onto a new line when you run out of\r\n * room\" — which is a property of the run rather than a fourth direction.\r\n */\r\nexport type FlowMode = \"horizontal\" | \"vertical\" | \"freeform\" | \"grid\";\r\n\r\n/** Spacing between items, or `\"auto\"` to spread the free space evenly between them. */\r\nexport type GapSize = number | \"auto\";\r\n\r\n/**\r\n * What a `flow` prop holds: a mode, or — mid-tween between two — both and how far\r\n * along. The blend lives in the value so that restoring the prop restores it.\r\n */\r\nexport type FlowResolved = FlowMode | { from: FlowMode; to: FlowMode; t: number };\r\n\r\n/** A container's author-facing layout props. */\r\nexport interface FlowProps {\r\n /**\r\n * Layout mode for children: a run (`horizontal` / `vertical`), overlapping\r\n * `freeform`, or a `grid` of N equal columns.\r\n */\r\n flow: FlowMode;\r\n /** Spacing between children along the layout's main axis. */\r\n gap: GapSize;\r\n /**\r\n * Break a `horizontal`/`vertical` run onto new lines once it runs out of\r\n * main-axis room. It needs a bounded main axis to break against, so an axis\r\n * set to `'hug'` stays one line.\r\n */\r\n wrap: boolean;\r\n /**\r\n * Spacing on the **cross** axis: between wrapped lines, and between a grid's\r\n * rows. Omitted, it follows `gap` — \"wrap this row\" almost never means \"and\r\n * stack the lines flush against each other\".\r\n */\r\n crossGap: number;\r\n /** Number of equal columns when `flow` is `'grid'`. At least 1. */\r\n columns: number;\r\n /**\r\n * Where children sit in the content box: a named position (`'center'`,\r\n * `'topLeft'`, …) or a per-axis `Vector2` (x: -1 left … +1 right, y: -1\r\n * bottom … +1 top).\r\n */\r\n align: Alignment;\r\n}\r\n\r\n/**\r\n * What `flowOps` arranges by: the {@link FlowProps} vocabulary, every field\r\n * optional and defaulting as the prop does. A
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/layout/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Alignment } from \"@/attributes/layout/alignment\";\r\nimport type { Insets } from \"@/attributes/layout/insets\";\r\nimport type { Size2D, SizeInput } from \"@/attributes/layout/size\";\r\nimport type { MeasureContext2D } from \"@/render/measure-context\";\r\nimport type { BoxBounds } from \"./bounds\";\r\nimport type { SizeConstraints } from \"./constraints\";\r\n\r\n/**\r\n * How a container arranges the items that take part in its layout:\r\n *\r\n * - `'freeform'` — items overlap, each aligned in the padded content box by\r\n * `align` and offset from there by its own `x`/`y`.\r\n * - `'horizontal'` — a run left-to-right.\r\n * - `'vertical'` — a run top-to-bottom.\r\n * - `'grid'` — N equal columns, rows sized to their content (or divided equally\r\n * when the container's height is bounded). Items place themselves with\r\n * `column`/`row` and span with `colSpan`/`rowSpan`; anything unplaced is\r\n * auto-flowed left-to-right.\r\n *\r\n * A run also answers `wrap` — \"and break onto a new line when you run out of\r\n * room\" — which is a property of the run rather than a fourth direction.\r\n */\r\nexport type FlowMode = \"horizontal\" | \"vertical\" | \"freeform\" | \"grid\";\r\n\r\n/** Spacing between items, or `\"auto\"` to spread the free space evenly between them. */\r\nexport type GapSize = number | \"auto\";\r\n\r\n/**\r\n * What a `flow` prop holds: a mode, or — mid-tween between two — both and how far\r\n * along. The blend lives in the value so that restoring the prop restores it.\r\n */\r\nexport type FlowResolved = FlowMode | { from: FlowMode; to: FlowMode; t: number };\r\n\r\n/** A container's author-facing layout props. */\r\nexport interface FlowProps {\r\n /**\r\n * Layout mode for children: a run (`horizontal` / `vertical`), overlapping\r\n * `freeform`, or a `grid` of N equal columns.\r\n */\r\n flow: FlowMode;\r\n /** Spacing between children along the layout's main axis. */\r\n gap: GapSize;\r\n /**\r\n * Break a `horizontal`/`vertical` run onto new lines once it runs out of\r\n * main-axis room. It needs a bounded main axis to break against, so an axis\r\n * set to `'hug'` stays one line.\r\n */\r\n wrap: boolean;\r\n /**\r\n * Spacing on the **cross** axis: between wrapped lines, and between a grid's\r\n * rows. Omitted, it follows `gap` — \"wrap this row\" almost never means \"and\r\n * stack the lines flush against each other\".\r\n */\r\n crossGap: number;\r\n /** Number of equal columns when `flow` is `'grid'`. At least 1. */\r\n columns: number;\r\n /**\r\n * Where children sit in the content box: a named position (`'center'`,\r\n * `'topLeft'`, …) or a per-axis `Vector2` (x: -1 left … +1 right, y: -1\r\n * bottom … +1 top).\r\n */\r\n align: Alignment;\r\n}\r\n\r\n/**\r\n * What `flowOps` arranges by: the {@link FlowProps} vocabulary, every field\r\n * optional and defaulting as the prop does. A shape's state or a `Canvas2D` is one\r\n * as it stands.\r\n */\r\nexport interface FlowSettings {\r\n readonly flow?: FlowResolved;\r\n readonly gap?: GapSize;\r\n readonly wrap?: boolean;\r\n readonly crossGap?: number;\r\n readonly columns?: number;\r\n readonly align?: Alignment;\r\n /** Read by `flowOps.arrange` only; a node insets its own content box. */\r\n readonly padding?: Insets;\r\n}\r\n\r\n/** One thing a flow arranges — a `Node2D` as it stands, or a plain `{ width, height }`. */\r\nexport interface LayoutItem {\r\n readonly width: SizeInput;\r\n readonly height: SizeInput;\r\n /** Share of a run's free space among its `fill` items. Default 1. */\r\n readonly flex?: number;\r\n /** Fraction of a full gap this item opens on each side, `[0, 1]`. Default 1. */\r\n readonly gapScale?: number;\r\n /** 1-based grid column; with `row`, places the item explicitly. */\r\n readonly column?: number;\r\n readonly row?: number;\r\n readonly colSpan?: number;\r\n readonly rowSpan?: number;\r\n /**\r\n * The item's own size under `constraints`. Without one, a number is the size,\r\n * `'fill'` takes what is offered and `'hug'` is 0.\r\n */\r\n measure?(constraints: SizeConstraints, measurer?: MeasureContext2D): Partial<Size2D>;\r\n}\r\n\r\n/** The content box a flow measures in, and which of its axes hug their content. */\r\nexport interface FlowSpace {\r\n readonly width: number;\r\n readonly height: number;\r\n readonly hugWidth?: boolean;\r\n readonly hugHeight?: boolean;\r\n}\r\n\r\n/** One line of a `horizontal`/`vertical` run: items `[start, end)`. */\r\nexport interface FlowLine {\r\n readonly start: number;\r\n readonly end: number;\r\n /** The line's thickness — its deepest item — on the cross axis. */\r\n readonly cross: number;\r\n}\r\n\r\n/**\r\n * One measure pass: what `flowOps.place` needs to position the items, and the\r\n * extent a hugging container wraps.\r\n */\r\nexport interface FlowMeasure<I extends LayoutItem = LayoutItem> {\r\n readonly mode: FlowMode;\r\n readonly items: readonly I[];\r\n readonly sizes: readonly Size2D[];\r\n readonly hug: Size2D;\r\n /** The content box this was measured in — see `flowOps.reusable`. */\r\n readonly space: FlowSpace;\r\n /** Runs: the lines, and each item's clamped `gapScale` (all 1 when wrapped). */\r\n readonly lines?: readonly FlowLine[];\r\n readonly gapScales?: readonly number[];\r\n /** Grid: each item's cell, from the content box's top-left, y-down. */\r\n readonly cells?: readonly BoxBounds[];\r\n /** A blend between two modes: the measure of the mode being left, and how far along. */\r\n readonly from?: FlowMeasure<I>;\r\n readonly t?: number;\r\n}\r\n"]}
|
|
@@ -2,6 +2,7 @@ import { AssetManifest } from "../assets/manifest.js";
|
|
|
2
2
|
import type { ProjectDocument } from "../document/project.js";
|
|
3
3
|
import type { Registry } from "../document/registry.js";
|
|
4
4
|
import type { FrameSpec } from "../runtime/frame-time.js";
|
|
5
|
+
import type { RenderIssue } from "../render/render-issue.js";
|
|
5
6
|
/**
|
|
6
7
|
* Encoding settings, passed through to whatever the platform's exporter uses.
|
|
7
8
|
*
|
|
@@ -33,6 +34,12 @@ export interface ExportVideoRequest {
|
|
|
33
34
|
/** Progress through the export, in `[0, 1]`. */
|
|
34
35
|
onProgress?: (progress: number) => void;
|
|
35
36
|
signal?: AbortSignal;
|
|
37
|
+
/**
|
|
38
|
+
* What the renderer drew but not as the document says, once per kind,
|
|
39
|
+
* feature and node. A lost GPU device fails the export with a
|
|
40
|
+
* `RenderBackendError` instead.
|
|
41
|
+
*/
|
|
42
|
+
onIssue?: (issue: RenderIssue) => void;
|
|
36
43
|
encode?: EncodeOptions;
|
|
37
44
|
}
|
|
38
45
|
/** What an {@link Exporter} needs to encode one frame. */
|
|
@@ -45,6 +52,12 @@ export interface ExportStillRequest {
|
|
|
45
52
|
format?: "png" | "jpeg";
|
|
46
53
|
quality?: number;
|
|
47
54
|
signal?: AbortSignal;
|
|
55
|
+
/**
|
|
56
|
+
* What the renderer drew but not as the document says, once per kind,
|
|
57
|
+
* feature and node. A lost GPU device fails the export with a
|
|
58
|
+
* `RenderBackendError` instead.
|
|
59
|
+
*/
|
|
60
|
+
onIssue?: (issue: RenderIssue) => void;
|
|
48
61
|
}
|
|
49
62
|
export interface ExportedStill {
|
|
50
63
|
bytes: Uint8Array;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exporter.d.ts","sourceRoot":"","sources":["../../src/platform/exporter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"exporter.d.ts","sourceRoot":"","sources":["../../src/platform/exporter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEpD,4DAA4D;AAC5D,MAAM,WAAW,UAAU;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,GAA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,IAAI,CAAC,CAAC;IACrE,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;CACpE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exporter.js","sourceRoot":"","sources":["../../src/platform/exporter.ts"],"names":[],"mappings":"","sourcesContent":["import { AssetManifest } from \"@/assets/manifest\";\r\nimport type { ProjectDocument } from \"@/document/project\";\r\nimport type { Registry } from \"@/document/registry\";\r\nimport type { FrameSpec } from \"@/runtime/frame-time\";\r\n\r\n/**\r\n * Encoding settings, passed through to whatever the platform's exporter uses.\r\n *\r\n * Deliberately `unknown`-shaped rather than a union of every codec option each\r\n * backend might take: `core` has no opinion about encoders.\r\n */\r\nexport type EncodeOptions = Record<string, unknown>;\r\n\r\n/** A run of project frames: `start` included, `end` not. */\r\nexport interface FrameRange {\r\n start: number;\r\n end: number;\r\n}\r\n\r\n/** What an {@link Exporter} needs to encode a timeline. */\r\nexport interface ExportVideoRequest {\r\n /** The project, its fps and viewport resolved — see `Session.document`. Carries its theme. */\r\n project: ProjectDocument;\r\n /** The vocabulary its clips compile against: the opening engine's. */\r\n registry: Registry;\r\n /** Resolution multiplier on the viewport. Default 1. */\r\n scale?: number;\r\n manifest?: AssetManifest;\r\n includeAudio?: boolean;\r\n /**\r\n * Encode only these frames, as a file of their own that starts at 0. It is\r\n * always silent: a range is one segment of a split export, whose audio is\r\n * mixed once over the whole timeline.\r\n */\r\n frames?: FrameRange;\r\n /** Progress through the export, in `[0, 1]`. */\r\n onProgress?: (progress: number) => void;\r\n signal?: AbortSignal;\r\n encode?: EncodeOptions;\r\n}\r\n\r\n/** What an {@link Exporter} needs to encode one frame. */\r\nexport interface ExportStillRequest {\r\n project: ProjectDocument;\r\n registry: Registry;\r\n frame: FrameSpec;\r\n scale?: number;\r\n manifest?: AssetManifest;\r\n format?: \"png\" | \"jpeg\";\r\n quality?: number;\r\n signal?: AbortSignal;\r\n}\r\n\r\nexport interface ExportedStill {\r\n bytes: Uint8Array;\r\n /** The frame actually captured — the request clamped into range. */\r\n frame: number;\r\n totalFrames: number;\r\n}\r\n\r\n/**\r\n * How a `Session` turns itself into bytes.\r\n *\r\n * A **port**: `core` declares it, a platform implements it, and the dependency\r\n * runs platform → core like every other seam here — which is what lets\r\n * `Session.export()` exist in `core` without importing anything that encodes.\r\n */\r\nexport interface Exporter {\r\n exportVideo(request: ExportVideoRequest): Promise<Uint8Array | void>;\r\n exportStill(request: ExportStillRequest): Promise<ExportedStill>;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"exporter.js","sourceRoot":"","sources":["../../src/platform/exporter.ts"],"names":[],"mappings":"","sourcesContent":["import { AssetManifest } from \"@/assets/manifest\";\r\nimport type { ProjectDocument } from \"@/document/project\";\r\nimport type { Registry } from \"@/document/registry\";\r\nimport type { FrameSpec } from \"@/runtime/frame-time\";\r\nimport type { RenderIssue } from \"@/render/render-issue\";\r\n\r\n/**\r\n * Encoding settings, passed through to whatever the platform's exporter uses.\r\n *\r\n * Deliberately `unknown`-shaped rather than a union of every codec option each\r\n * backend might take: `core` has no opinion about encoders.\r\n */\r\nexport type EncodeOptions = Record<string, unknown>;\r\n\r\n/** A run of project frames: `start` included, `end` not. */\r\nexport interface FrameRange {\r\n start: number;\r\n end: number;\r\n}\r\n\r\n/** What an {@link Exporter} needs to encode a timeline. */\r\nexport interface ExportVideoRequest {\r\n /** The project, its fps and viewport resolved — see `Session.document`. Carries its theme. */\r\n project: ProjectDocument;\r\n /** The vocabulary its clips compile against: the opening engine's. */\r\n registry: Registry;\r\n /** Resolution multiplier on the viewport. Default 1. */\r\n scale?: number;\r\n manifest?: AssetManifest;\r\n includeAudio?: boolean;\r\n /**\r\n * Encode only these frames, as a file of their own that starts at 0. It is\r\n * always silent: a range is one segment of a split export, whose audio is\r\n * mixed once over the whole timeline.\r\n */\r\n frames?: FrameRange;\r\n /** Progress through the export, in `[0, 1]`. */\r\n onProgress?: (progress: number) => void;\r\n signal?: AbortSignal;\r\n /**\r\n * What the renderer drew but not as the document says, once per kind,\r\n * feature and node. A lost GPU device fails the export with a\r\n * `RenderBackendError` instead.\r\n */\r\n onIssue?: (issue: RenderIssue) => void;\r\n encode?: EncodeOptions;\r\n}\r\n\r\n/** What an {@link Exporter} needs to encode one frame. */\r\nexport interface ExportStillRequest {\r\n project: ProjectDocument;\r\n registry: Registry;\r\n frame: FrameSpec;\r\n scale?: number;\r\n manifest?: AssetManifest;\r\n format?: \"png\" | \"jpeg\";\r\n quality?: number;\r\n signal?: AbortSignal;\r\n /**\r\n * What the renderer drew but not as the document says, once per kind,\r\n * feature and node. A lost GPU device fails the export with a\r\n * `RenderBackendError` instead.\r\n */\r\n onIssue?: (issue: RenderIssue) => void;\r\n}\r\n\r\nexport interface ExportedStill {\r\n bytes: Uint8Array;\r\n /** The frame actually captured — the request clamped into range. */\r\n frame: number;\r\n totalFrames: number;\r\n}\r\n\r\n/**\r\n * How a `Session` turns itself into bytes.\r\n *\r\n * A **port**: `core` declares it, a platform implements it, and the dependency\r\n * runs platform → core like every other seam here — which is what lets\r\n * `Session.export()` exist in `core` without importing anything that encodes.\r\n */\r\nexport interface Exporter {\r\n exportVideo(request: ExportVideoRequest): Promise<Uint8Array | void>;\r\n exportStill(request: ExportStillRequest): Promise<ExportedStill>;\r\n}\r\n"]}
|
package/dist/props/host.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { PropSlot } from "./slot.js";
|
|
|
2
2
|
/** @internal */
|
|
3
3
|
export type TweenFn<T> = (from: T, to: T, t: number) => T;
|
|
4
4
|
/**
|
|
5
|
-
* The slots behind an object's
|
|
5
|
+
* The slots behind an object's `property`-declared fields, plus the per-field
|
|
6
6
|
* metadata `set()` and `to()` route through.
|
|
7
7
|
*
|
|
8
8
|
* One object rather than three loose maps on the host, because the host is a
|
package/dist/props/host.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.js","sourceRoot":"","sources":["../../src/props/host.ts"],"names":[],"mappings":"AAgCA,gBAAgB;AAChB,MAAM,UAAU,WAAW,CAAC,GAAa,EAAE,IAAY;IACnD,OAAO,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACxC,CAAC;AAED,wDAAwD;AACxD,MAAM,UAAU,WAAW,CAAC,GAAa;IACrC,OAAO,GAAG,CAAC,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC;AAChD,CAAC","sourcesContent":["import { PropSlot } from \"./slot\";\r\n\r\n/** @internal */\r\nexport type TweenFn<T> = (from: T, to: T, t: number) => T;\r\n\r\n/**\r\n * The slots behind an object's
|
|
1
|
+
{"version":3,"file":"host.js","sourceRoot":"","sources":["../../src/props/host.ts"],"names":[],"mappings":"AAgCA,gBAAgB;AAChB,MAAM,UAAU,WAAW,CAAC,GAAa,EAAE,IAAY;IACnD,OAAO,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACxC,CAAC;AAED,wDAAwD;AACxD,MAAM,UAAU,WAAW,CAAC,GAAa;IACrC,OAAO,GAAG,CAAC,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC;AAChD,CAAC","sourcesContent":["import { PropSlot } from \"./slot\";\r\n\r\n/** @internal */\r\nexport type TweenFn<T> = (from: T, to: T, t: number) => T;\r\n\r\n/**\r\n * The slots behind an object's `property`-declared fields, plus the per-field\r\n * metadata `set()` and `to()` route through.\r\n *\r\n * One object rather than three loose maps on the host, because the host is a\r\n * `Node` and every public field it carries is published API. Grouping them\r\n * means a node exposes one internal name instead of three, and gives the thing\r\n * a name a reader can look up.\r\n *\r\n * @internal\r\n */\r\nexport interface PropCells {\r\n /** Field → its live slot. Present for every registered prop. */\r\n slots: Map<string, PropSlot<any>>;\r\n /** Field → how it interpolates, for props a numeric lerp cannot cover. */\r\n tweens?: Map<string, TweenFn<any>>;\r\n /** Field → external prop value to internal slot value, for fields that need it. */\r\n mappers?: Map<string, (ext: any, prev?: any) => any>;\r\n}\r\n\r\n/** @internal */\r\nexport interface PropHost {\r\n /** See {@link PropCells}. Absent until the first prop is registered, and\r\n * cleared by `dispose()`. */\r\n __cells?: PropCells;\r\n}\r\n\r\n/** @internal */\r\nexport function getPropSlot(obj: PropHost, name: string): PropSlot<any> | undefined {\r\n return obj.__cells?.slots.get(name);\r\n}\r\n\r\n/** The host's slots, created on first use. @internal */\r\nexport function ensureCells(obj: PropHost): PropCells {\r\n return obj.__cells ??= { slots: new Map() };\r\n}\r\n"]}
|
package/dist/props/slot.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export declare let _observer: SlotObserver | null;
|
|
|
18
18
|
/** @internal Only this module can reassign the binding. Returns the observer it replaced. */
|
|
19
19
|
export declare function _setObserver(observer: SlotObserver | null): SlotObserver | null;
|
|
20
20
|
/**
|
|
21
|
-
* The storage behind one
|
|
21
|
+
* The storage behind one `property`: a plain value, or a thunk evaluated on
|
|
22
22
|
* every read.
|
|
23
23
|
*
|
|
24
24
|
* There is no dependency graph and nothing to invalidate. A bound slot
|
package/dist/props/slot.js
CHANGED
|
@@ -10,7 +10,7 @@ export function _setObserver(observer) {
|
|
|
10
10
|
return previous;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* The storage behind one
|
|
13
|
+
* The storage behind one `property`: a plain value, or a thunk evaluated on
|
|
14
14
|
* every read.
|
|
15
15
|
*
|
|
16
16
|
* There is no dependency graph and nothing to invalidate. A bound slot
|
package/dist/props/slot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slot.js","sourceRoot":"","sources":["../../src/props/slot.ts"],"names":[],"mappings":"AAcA;;;GAGG;AACH,MAAM,CAAC,IAAI,SAAS,GAAwB,IAAI,CAAC;AAEjD,6FAA6F;AAC7F,MAAM,UAAU,YAAY,CAAC,QAA6B;IACtD,MAAM,QAAQ,GAAG,SAAS,CAA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CAAC;IAClB,CAAC;IAED,yDAAyD;IACzD,MAAM;QACF,IAAI,CAAC,IAAI,CAAC,GAAG;YAAE,OAAO;QACtB,IAAI,SAAS,KAAK,IAAI;YAAE,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC9C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;IACpB,CAAC;IAED,OAAO;QACH,OAAO,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC;IAC7B,CAAC;IAED,QAAQ;QACJ,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;IACnF,CAAC;IAED,WAAW,CAAC,IAAqB;QAC7B,IAAI,IAAI,CAAC,EAAE;YAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;;YAC3B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,mFAAmF;IACnF,OAAO;QACH,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;QAChB,IAAI,CAAC,MAAM,GAAG,SAAyB,CAAC;IAC5C,CAAC;CACJ","sourcesContent":["import type { SlotObserver } from \"./observer\";\r\n\r\n/**\r\n * A captured state of a {@link PropSlot}: the thunk it was bound to, or the\r\n * plain value it held. Produced by {@link PropSlot.snapshot} and consumed by\r\n * {@link PropSlot.restoreFrom}.\r\n */\r\n/** @internal */\r\nexport interface PropSnapshot<T> {\r\n value: T;\r\n /** Present only for a bound slot; restoring one re-binds rather than freezing it. */\r\n fn?: () => T;\r\n}\r\n\r\n/**\r\n * @internal The observer every slot reports to, or `null` — which is every frame of\r\n * playback, so the hot path pays one null check. Installed by `observeSlots`.\r\n */\r\nexport let _observer: SlotObserver | null = null;\r\n\r\n/** @internal Only this module can reassign the binding. Returns the observer it replaced. */\r\nexport function _setObserver(observer: SlotObserver | null): SlotObserver | null {\r\n const previous = _observer;\r\n _observer = observer;\r\n return previous;\r\n}\r\n\r\n/**\r\n * The storage behind one
|
|
1
|
+
{"version":3,"file":"slot.js","sourceRoot":"","sources":["../../src/props/slot.ts"],"names":[],"mappings":"AAcA;;;GAGG;AACH,MAAM,CAAC,IAAI,SAAS,GAAwB,IAAI,CAAC;AAEjD,6FAA6F;AAC7F,MAAM,UAAU,YAAY,CAAC,QAA6B;IACtD,MAAM,QAAQ,GAAG,SAAS,CAAC;IAC3B,SAAS,GAAG,QAAQ,CAAC;IACrB,OAAO,QAAQ,CAAC;AACpB,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAO,QAAQ;IAQJ;IACA;IARL,MAAM,CAAI;IACV,GAAG,GAAqB,IAAI,CAAC;IAC7B,QAAQ,GAAG,KAAK,CAAC;IAEzB,iFAAiF;IACjF,YACI,OAAU,EACD,QAAwC,IAAI,EAC5C,QAAgB,EAAE;QADlB,UAAK,GAAL,KAAK,CAAuC;QAC5C,UAAK,GAAL,KAAK,CAAa;QAE3B,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC;IAC1B,CAAC;IAED,GAAG;QACC,sEAAsE;QACtE,0BAA0B;QAC1B,IAAI,SAAS,KAAK,IAAI;YAAE,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C,oEAAoE;QACpE,wEAAwE;QACxE,qEAAqE;QACrE,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO,IAAI,CAAC,MAAM,CAAC;QACnD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QACt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AC,GAAG,GAAG,IAAI,CAAC;QAChB,IAAI,CAAC,MAAM,GAAG,SAAyB,CAAC;IAC5C,CAAC;CACJ","sourcesContent":["import type { SlotObserver } from \"./observer\";\r\n\r\n/**\r\n * A captured state of a {@link PropSlot}: the thunk it was bound to, or the\r\n * plain value it held. Produced by {@link PropSlot.snapshot} and consumed by\r\n * {@link PropSlot.restoreFrom}.\r\n */\r\n/** @internal */\r\nexport interface PropSnapshot<T> {\r\n value: T;\r\n /** Present only for a bound slot; restoring one re-binds rather than freezing it. */\r\n fn?: () => T;\r\n}\r\n\r\n/**\r\n * @internal The observer every slot reports to, or `null` — which is every frame of\r\n * playback, so the hot path pays one null check. Installed by `observeSlots`.\r\n */\r\nexport let _observer: SlotObserver | null = null;\r\n\r\n/** @internal Only this module can reassign the binding. Returns the observer it replaced. */\r\nexport function _setObserver(observer: SlotObserver | null): SlotObserver | null {\r\n const previous = _observer;\r\n _observer = observer;\r\n return previous;\r\n}\r\n\r\n/**\r\n * The storage behind one `property`: a plain value, or a thunk evaluated on\r\n * every read.\r\n *\r\n * There is no dependency graph and nothing to invalidate. A bound slot\r\n * recomputes when it is asked, which is what makes a document expression\r\n * (`\"=4[g]+3\"`), an author's `width={() => …}` and an alignment binding reading\r\n * a box written mid-layout all correct without anything declaring an edge. The\r\n * cache-and-invalidate version of this could only get the last one right by\r\n * observing the write, and paid for it everywhere: a `peek()`/`get()` split at\r\n * every write path, so a read taken inside whatever computation happened to be\r\n * running did not register an edge with no business existing.\r\n *\r\n * The bet is that recomputing is cheaper than tracking. Bindings here are\r\n * arithmetic over a handful of reads, and a frame's draw dwarfs all of them.\r\n */\r\nexport class PropSlot<T> {\r\n private _value: T;\r\n private _fn: (() => T) | null = null;\r\n private _running = false;\r\n\r\n /** `_host` and `_name` only label the slot for an observer — see `slotLabel`. */\r\n constructor(\r\n initial: T,\r\n readonly _host: { readonly id: string } | null = null,\r\n readonly _name: string = \"\",\r\n ) {\r\n this._value = initial;\r\n }\r\n\r\n get(): T {\r\n // Before the re-entrancy check, so a binding's own reads are recorded\r\n // under whatever read it.\r\n if (_observer !== null) _observer.read(this);\r\n // A binding that reads its own slot re-enters here mid-evaluation —\r\n // `bind(() => mapper(ext(), slot.get()))` is how a mapper is handed the\r\n // previous value. It gets the last settled one instead of recursing.\r\n if (!this._fn || this._running) return this._value;\r\n this._running = true;\r\n try {\r\n return (this._value = this._fn());\r\n } finally {\r\n this._running = false;\r\n }\r\n }\r\n\r\n set(value: T): void {\r\n if (_observer !== null) _observer.write(this);\r\n this._fn = null;\r\n this._value = value;\r\n }\r\n\r\n bind(fn: () => T): void {\r\n if (_observer !== null) _observer.write(this);\r\n this._fn = fn;\r\n }\r\n\r\n /** Freeze a bound slot at what it currently computes. */\r\n unbind(): void {\r\n if (!this._fn) return;\r\n if (_observer !== null) _observer.write(this);\r\n this._value = this.get();\r\n this._fn = null;\r\n }\r\n\r\n isBound(): boolean {\r\n return this._fn !== null;\r\n }\r\n\r\n snapshot(): PropSnapshot<T> {\r\n return this._fn ? { value: this.get(), fn: this._fn } : { value: this._value };\r\n }\r\n\r\n restoreFrom(snap: PropSnapshot<T>): void {\r\n if (snap.fn) this.bind(snap.fn);\r\n else this.set(snap.value);\r\n }\r\n\r\n /** Releases the bound closure and the value slot. The slot is inert after this. */\r\n dispose(): void {\r\n this._fn = null;\r\n this._value = undefined as unknown as T;\r\n }\r\n}\r\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { integrateSpeedToClipTime, sourceTimeAtClipElapsed } from './attributes/audio/
|
|
1
|
+
import { integrateSpeedToClipTime, sourceTimeAtClipElapsed } from './attributes/audio/ramp.js';
|
|
2
2
|
import type { NodeEffect } from './attributes/shape/effects/union.js';
|
|
3
3
|
import { ClipTimeline } from './document/timeline.js';
|
|
4
4
|
import type { VisualDocument } from './document/types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renamed-scene-names.d.ts","sourceRoot":"","sources":["../src/renamed-scene-names.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"renamed-scene-names.d.ts","sourceRoot":"","sources":["../src/renamed-scene-names.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAC5F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIvD,qDAAqD;AACrD,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC;AAC3C,mDAAmD;AACnD,eAAO,MAAM,aAAa,qBAAe,CAAC;AAC1C,mDAAmD;AACnD,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC;AACzC,iDAAiD;AACjD,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC;AACrC,+DAA+D;AAC/D,eAAO,MAAM,yBAAyB,iCAA2B,CAAC;AAClE,8DAA8D;AAC9D,eAAO,MAAM,wBAAwB,gCAA0B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { integrateSpeedToClipTime, sourceTimeAtClipElapsed } from './attributes/audio/
|
|
1
|
+
import { integrateSpeedToClipTime, sourceTimeAtClipElapsed } from './attributes/audio/ramp.js';
|
|
2
2
|
import { ClipTimeline } from './document/timeline.js';
|
|
3
3
|
/** @deprecated Renamed to {@link ClipTimeline}. */
|
|
4
4
|
export const SceneTimeline = ClipTimeline;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renamed-scene-names.js","sourceRoot":"","sources":["../src/renamed-scene-names.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"renamed-scene-names.js","sourceRoot":"","sources":["../src/renamed-scene-names.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAE5F,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAOnD,mDAAmD;AACnD,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC;AAK1C,+DAA+D;AAC/D,MAAM,CAAC,MAAM,yBAAyB,GAAG,wBAAwB,CAAC;AAClE,8DAA8D;AAC9D,MAAM,CAAC,MAAM,wBAAwB,GAAG,uBAAuB,CAAC","sourcesContent":["import { integrateSpeedToClipTime, sourceTimeAtClipElapsed } from './attributes/audio/ramp';\r\nimport type { NodeEffect } from './attributes/shape/effects/union';\r\nimport { ClipTimeline } from './document/timeline';\r\nimport type { VisualDocument } from './document/types';\r\n\r\n// The names the document API had before \"scene\" became \"clip\", kept until 1.0.\r\n\r\n/** @deprecated Renamed to {@link VisualDocument}. */\r\nexport type SceneDocument = VisualDocument;\r\n/** @deprecated Renamed to {@link ClipTimeline}. */\r\nexport const SceneTimeline = ClipTimeline;\r\n/** @deprecated Renamed to {@link ClipTimeline}. */\r\nexport type SceneTimeline = ClipTimeline;\r\n/** @deprecated Renamed to {@link NodeEffect}. */\r\nexport type SceneEffect = NodeEffect;\r\n/** @deprecated Renamed to {@link integrateSpeedToClipTime}. */\r\nexport const integrateSpeedToSceneTime = integrateSpeedToClipTime;\r\n/** @deprecated Renamed to {@link sourceTimeAtClipElapsed}. */\r\nexport const sourceTimeAtSceneElapsed = sourceTimeAtClipElapsed;\r\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Graphics2D } from "./graphics2d.js";
|
|
2
2
|
import type { Clip } from "./clip.js";
|
|
3
|
+
import type { RenderIssue } from "./render-issue.js";
|
|
3
4
|
import type { TransformState } from "./descriptors/transform.js";
|
|
4
5
|
import type { FontStyle, TextStyle } from "../attributes/text/types.js";
|
|
5
6
|
import type { Size2D } from "../attributes/layout/size.js";
|
|
@@ -77,6 +78,14 @@ export declare abstract class CanvasRenderContext2D implements RenderPass2D {
|
|
|
77
78
|
* that throws still throws, and the next pass starts from a clean context.
|
|
78
79
|
*/
|
|
79
80
|
abstract execute(callback: () => void): void;
|
|
81
|
+
/**
|
|
82
|
+
* What the frames since the last call drew without failing but not as the
|
|
83
|
+
* document says (a blend mode the backend lacks, a shader that does not
|
|
84
|
+
* compile, a lost GPU device), once per kind, feature and node. The
|
|
85
|
+
* playback controller reports them as render errors; an export hands them
|
|
86
|
+
* to its `onIssue`. A bare string is a `shader` issue.
|
|
87
|
+
*/
|
|
88
|
+
takeRenderIssues(): Array<RenderIssue | string>;
|
|
80
89
|
/** Capture the current frame as a base-64 PNG data URL, or `undefined` if unsupported. */
|
|
81
90
|
abstract screenshot(): string | undefined;
|
|
82
91
|
abstract transform(state: Partial<TransformState>): RenderContext2D;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas-render-context2d.d.ts","sourceRoot":"","sources":["../../src/render/canvas-render-context2d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGhD,OAAO,KAAK,EAAE,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;IACpD,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAQ;IAE1C,sCAAsC;IACtC,KAAK,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;IAKnC,+DAA+D;IAC/D,GAAG,IAAI,IAAI;IAKX,8EAA8E;IAC9E,SAAS,CAAC,iBAAiB,IAAI,UAAU;IAIzC,qFAAqF;IACrF,SAAS,CAAC,kBAAkB,IAAI,eAAe,GAAG,SAAS;IAI3D;;;;OAIG;IACH,SAAS,CAAC,YAAY,IAAI,IAAI;CAKjC"}
|
|
@@ -80,6 +80,16 @@ export class CanvasRenderContext2D {
|
|
|
80
80
|
dispose() {
|
|
81
81
|
this._disposed = true;
|
|
82
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* What the frames since the last call drew without failing but not as the
|
|
85
|
+
* document says (a blend mode the backend lacks, a shader that does not
|
|
86
|
+
* compile, a lost GPU device), once per kind, feature and node. The
|
|
87
|
+
* playback controller reports them as render errors; an export hands them
|
|
88
|
+
* to its `onIssue`. A bare string is a `shader` issue.
|
|
89
|
+
*/
|
|
90
|
+
takeRenderIssues() {
|
|
91
|
+
return [];
|
|
92
|
+
}
|
|
83
93
|
/** See {@link RenderContext2D.beginEffects}. No-op by default. */
|
|
84
94
|
beginEffects(effects, target, width, height) { }
|
|
85
95
|
endEffects() { }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas-render-context2d.js","sourceRoot":"","sources":["../../src/render/canvas-render-context2d.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAI5D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAgB,qBAAqB;IAGvC,0EAA0E;IAC1E,4EAA4E;IAC5E,2EAA2E;IAC3E,wEAAwE;IACxE,qEAAqE;IACrE,0EAA0E;IAE1E;;;;OAIG;IACc,cAAc,GAAgB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\nimport type { Clip } from \"./clip\";\r\nimport type { TransformState } from \"./descriptors/transform\";\r\nimport type { FontStyle, TextStyle } from \"@/attributes/text/types\";\r\nimport type { Size2D } from \"@/attributes/layout/size\";\r\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\r\nimport type { MaskOptions } from \"@/attributes/mask/mask\";\r\nimport type { BooleanOperation } from \"@/attributes/mask/boolean\";\r\nimport { TextState } from \"./descriptors/text\";\r\nimport { TextBlockLayout } from \"./text-layout\";\r\nimport { EMPTY_TEXT_STYLE, textOps } from \"@/attributes/text/ops\";\r\nimport { applyGraphicsTextDefaults } from \"./text-defaults\";\r\nimport type { NodeRenderState, RasterizedSurface, RenderContext2D, RenderPass2D, SpaceRects, EffectTarget } from \"./render-context2d\";\r\nimport type { NodeEffect } from \"@/attributes/shape/effects/union\";\r\n\r\n/**\r\n * The base every {@link RenderContext2D} backend extends.\r\n *\r\n * It owns the parts of a render context that are the *same* whatever is being\r\n * rasterized — the text-default stack, the node scope stack, disposal — plus\r\n * the host-facing half of the surface (`execute`, `screenshot`, `unmount`),\r\n * which the {@link RenderContext2D} interface deliberately leaves out because a\r\n * node has no business driving a render pass from inside one.\r\n *\r\n * **`draw` is final by convention.** It resolves the ambient text defaults onto\r\n * the op list and hands the result to {@link drawGraphics}, which is where a\r\n * backend does its actual drawing. Owning that step here rather than in each\r\n * backend is what keeps the real renderer and the precomp asset walk agreeing\r\n * on which font an under-specified `text` op shapes with: a family that one\r\n * resolves and the other does not is a font that never loads and glyphs that\r\n * never paint.\r\n */\r\nexport abstract class CanvasRenderContext2D implements RenderPass2D {\r\n abstract measureText(text: string, fontSize: number, fontFamily: string, fontWeight?: number, letterSpacing?: number, fontStyle?: FontStyle): Size2D;\r\n\r\n // ---- Inherited text-style defaults ------------------------------------\r\n // `<DefaultTextStyle>` reaches a `Text`/`RichText` node through the context\r\n // map, applied once when the node binds. A raw `Graphics2D` has no node to\r\n // bind, so it inherits the same defaults here instead — pushed around a\r\n // subtree's draw scope, and folded into each `text`/`richText` op by\r\n // `draw()`. Same vocabulary (`TextStyle`), same precedence, two channels.\r\n\r\n /**\r\n * Defaults in effect for the current draw scope, innermost last. Each entry\r\n * is **already merged** onto the one below it (see {@link pushTextStyle}), so\r\n * the top of the stack is the effective style and reading it costs nothing.\r\n */\r\n private readonly textStyleStack: TextStyle[] = [];\r\n\r\n /** See {@link RenderContext2D.pushTextStyle}. */\r\n pushTextStyle(style: TextStyle | null): void {\r\n this.textStyleStack.push(style === null ? EMPTY_TEXT_STYLE : textOps.mergeStyle(this.defaultTextStyle, style));\r\n }\r\n\r\n /** Close the innermost scope opened by {@link pushTextStyle}. */\r\n popTextStyle(): void {\r\n this.textStyleStack.pop();\r\n }\r\n\r\n /**\r\n * The text-style defaults in effect right now — the innermost\r\n * {@link pushTextStyle} scope, or the project's `theme.typography.default`\r\n * when no scope is open.\r\n *\r\n * Carries all ten {@link TEXT_STYLE_KEYS}, but only the shaping ones reach a\r\n * `Graphics2D` op; see `TEXT_SHAPING_KEYS` for why `fill`/`stroke`/`shadow`\r\n * stay a node-level concern.\r\n */\r\n get defaultTextStyle(): TextStyle {\r\n return this.textStyleStack[this.textStyleStack.length - 1] ?? textOps.preset(\"default\");\r\n }\r\n\r\n /** See {@link RenderContext2D.draw}. Final by convention — override {@link drawGraphics}. */\r\n draw(graphics: Graphics2D): void {\r\n this.drawGraphics(applyGraphicsTextDefaults(graphics, this.defaultTextStyle));\r\n }\r\n\r\n /** Paint a `Graphics2D` whose text ops have already been resolved against the\r\n * ambient defaults. Backends implement this instead of {@link draw}. */\r\n protected abstract drawGraphics(graphics: Graphics2D): void;\r\n\r\n /**\r\n * See {@link RenderContext2D.layoutTextBlock}. Concrete rather than abstract,\r\n * and `null` by default, so a backend that has no need to report glyph\r\n * positions is unaffected — the only thing it gives up is on-canvas text\r\n * editing in a host built on it.\r\n */\r\n layoutTextBlock(state: Partial<TextState>): TextBlockLayout | null {\r\n return null;\r\n }\r\n\r\n /** Stack of node ids currently being drawn, innermost last. */\r\n protected currentNodeStack: string[] = [];\r\n\r\n /** Returns the id of the innermost node currently being drawn. */\r\n protected currentNodeId(): string {\r\n if (this.currentNodeStack.length === 0) {\r\n throw new Error(\"No current node in context\");\r\n }\r\n\r\n return this.currentNodeStack[this.currentNodeStack.length - 1];\r\n }\r\n\r\n /** Remove all renderer-side resources for the current node (called on unmount). */\r\n abstract unmount(): void;\r\n\r\n private _disposed = false;\r\n /** `true` after `dispose()` — the context must not be used after this point. */\r\n isDisposed(): boolean {\r\n return this._disposed;\r\n }\r\n dispose(): void {\r\n this._disposed = true;\r\n }\r\n\r\n /**\r\n * Execute `callback`, which issues shape/paint calls, and flush the result\r\n * to the underlying render target (canvas, SVG document, etc.). A callback\r\n * that throws still throws, and the next pass starts from a clean context.\r\n */\r\n abstract execute(callback: () => void): void;\r\n /** Capture the current frame as a base-64 PNG data URL, or `undefined` if unsupported. */\r\n abstract screenshot(): string | undefined;\r\n\r\n abstract transform(state: Partial<TransformState>): RenderContext2D;\r\n\r\n abstract beginBoolean(op: BooleanOperation): void;\r\n abstract endBoolean(): void;\r\n\r\n abstract beginMask(options?: MaskOptions): void;\r\n abstract applyMask(): void;\r\n abstract endMask(): void;\r\n\r\n abstract beginClip(clip: Clip): void;\r\n abstract endClip(): void;\r\n\r\n /** See {@link RenderContext2D.beginEffects}. No-op by default. */\r\n beginEffects(effects: NodeEffect[], target: EffectTarget, width: number, height: number): void { }\r\n endEffects(): void { }\r\n\r\n /** See {@link RenderContext2D.rasterize}. Returns `null` by default. */\r\n rasterize(\r\n width: number,\r\n height: number,\r\n draw: () => void,\r\n pixelRatio?: number,\r\n ): RasterizedSurface | null {\r\n return null;\r\n }\r\n\r\n abstract beginCamera(viewport: { x: number; y: number; width: number; height: number }, lookAt: Vector2, zoom: number, heading: number): void;\r\n abstract endCamera(): void;\r\n\r\n /**\r\n * Per-node render state for each node on the draw stack, in push order\r\n * (innermost last). Kept parallel to `currentNodeStack` so fills with\r\n * `space: 'parent'` can resolve their reference rect and so\r\n * motion-driven effects can read the current node's velocity.\r\n */\r\n protected renderStateStack: NodeRenderState[] = [];\r\n\r\n /** See {@link RenderContext2D.readsSpaceRects}. */\r\n readonly readsSpaceRects: boolean = true;\r\n\r\n /** See {@link RenderContext2D.drawsVisibleOnly}. */\r\n readonly drawsVisibleOnly: boolean = true;\r\n\r\n /** See {@link RenderPass2D.begin}. */\r\n begin(state: NodeRenderState): void {\r\n this.currentNodeStack.push(state.id);\r\n this.renderStateStack.push(state);\r\n }\r\n\r\n /** Close the innermost node draw scope opened by `begin()`. */\r\n end(): void {\r\n this.currentNodeStack.pop();\r\n this.renderStateStack.pop();\r\n }\r\n\r\n /** Reference rects for the node currently being drawn (parent / viewport). */\r\n protected currentSpaceRects(): SpaceRects {\r\n return this.renderStateStack[this.renderStateStack.length - 1]?.rects ?? {};\r\n }\r\n\r\n /** Full render state (incl. velocity) for the node currently being drawn, if any. */\r\n protected currentRenderState(): NodeRenderState | undefined {\r\n return this.renderStateStack[this.renderStateStack.length - 1];\r\n }\r\n\r\n /**\r\n * Close every node and text-style scope still open. A backend calls this\r\n * when a pass ends, so a pass that threw cannot leave the next one inside\r\n * its scopes.\r\n */\r\n protected _resetScopes(): void {\r\n this.textStyleStack.length = 0;\r\n this.currentNodeStack.length = 0;\r\n this.renderStateStack.length = 0;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"canvas-render-context2d.js","sourceRoot":"","sources":["../../src/render/canvas-render-context2d.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAI5D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAgB,qBAAqB;IAGvC,0EAA0E;IAC1E,4EAA4E;IAC5E,2EAA2E;IAC3E,wEAAwE;IACxE,qEAAqE;IACrE,0EAA0E;IAE1E;;;;OAIG;IACc,cAAc,GA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AG,CAAC,CAAC;IACrC,CAAC;CACJ","sourcesContent":["import { Graphics2D } from \"./graphics2d\";\r\nimport type { Clip } from \"./clip\";\r\nimport type { RenderIssue } from \"./render-issue\";\r\nimport type { TransformState } from \"./descriptors/transform\";\r\nimport type { FontStyle, TextStyle } from \"@/attributes/text/types\";\r\nimport type { Size2D } from \"@/attributes/layout/size\";\r\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\r\nimport type { MaskOptions } from \"@/attributes/mask/mask\";\r\nimport type { BooleanOperation } from \"@/attributes/mask/boolean\";\r\nimport { TextState } from \"./descriptors/text\";\r\nimport { TextBlockLayout } from \"./text-layout\";\r\nimport { EMPTY_TEXT_STYLE, textOps } from \"@/attributes/text/ops\";\r\nimport { applyGraphicsTextDefaults } from \"./text-defaults\";\r\nimport type { NodeRenderState, RasterizedSurface, RenderContext2D, RenderPass2D, SpaceRects, EffectTarget } from \"./render-context2d\";\r\nimport type { NodeEffect } from \"@/attributes/shape/effects/union\";\r\n\r\n/**\r\n * The base every {@link RenderContext2D} backend extends.\r\n *\r\n * It owns the parts of a render context that are the *same* whatever is being\r\n * rasterized — the text-default stack, the node scope stack, disposal — plus\r\n * the host-facing half of the surface (`execute`, `screenshot`, `unmount`),\r\n * which the {@link RenderContext2D} interface deliberately leaves out because a\r\n * node has no business driving a render pass from inside one.\r\n *\r\n * **`draw` is final by convention.** It resolves the ambient text defaults onto\r\n * the op list and hands the result to {@link drawGraphics}, which is where a\r\n * backend does its actual drawing. Owning that step here rather than in each\r\n * backend is what keeps the real renderer and the precomp asset walk agreeing\r\n * on which font an under-specified `text` op shapes with: a family that one\r\n * resolves and the other does not is a font that never loads and glyphs that\r\n * never paint.\r\n */\r\nexport abstract class CanvasRenderContext2D implements RenderPass2D {\r\n abstract measureText(text: string, fontSize: number, fontFamily: string, fontWeight?: number, letterSpacing?: number, fontStyle?: FontStyle): Size2D;\r\n\r\n // ---- Inherited text-style defaults ------------------------------------\r\n // `<DefaultTextStyle>` reaches a `Text`/`RichText` node through the context\r\n // map, applied once when the node binds. A raw `Graphics2D` has no node to\r\n // bind, so it inherits the same defaults here instead — pushed around a\r\n // subtree's draw scope, and folded into each `text`/`richText` op by\r\n // `draw()`. Same vocabulary (`TextStyle`), same precedence, two channels.\r\n\r\n /**\r\n * Defaults in effect for the current draw scope, innermost last. Each entry\r\n * is **already merged** onto the one below it (see {@link pushTextStyle}), so\r\n * the top of the stack is the effective style and reading it costs nothing.\r\n */\r\n private readonly textStyleStack: TextStyle[] = [];\r\n\r\n /** See {@link RenderContext2D.pushTextStyle}. */\r\n pushTextStyle(style: TextStyle | null): void {\r\n this.textStyleStack.push(style === null ? EMPTY_TEXT_STYLE : textOps.mergeStyle(this.defaultTextStyle, style));\r\n }\r\n\r\n /** Close the innermost scope opened by {@link pushTextStyle}. */\r\n popTextStyle(): void {\r\n this.textStyleStack.pop();\r\n }\r\n\r\n /**\r\n * The text-style defaults in effect right now — the innermost\r\n * {@link pushTextStyle} scope, or the project's `theme.typography.default`\r\n * when no scope is open.\r\n *\r\n * Carries all ten {@link TEXT_STYLE_KEYS}, but only the shaping ones reach a\r\n * `Graphics2D` op; see `TEXT_SHAPING_KEYS` for why `fill`/`stroke`/`shadow`\r\n * stay a node-level concern.\r\n */\r\n get defaultTextStyle(): TextStyle {\r\n return this.textStyleStack[this.textStyleStack.length - 1] ?? textOps.preset(\"default\");\r\n }\r\n\r\n /** See {@link RenderContext2D.draw}. Final by convention — override {@link drawGraphics}. */\r\n draw(graphics: Graphics2D): void {\r\n this.drawGraphics(applyGraphicsTextDefaults(graphics, this.defaultTextStyle));\r\n }\r\n\r\n /** Paint a `Graphics2D` whose text ops have already been resolved against the\r\n * ambient defaults. Backends implement this instead of {@link draw}. */\r\n protected abstract drawGraphics(graphics: Graphics2D): void;\r\n\r\n /**\r\n * See {@link RenderContext2D.layoutTextBlock}. Concrete rather than abstract,\r\n * and `null` by default, so a backend that has no need to report glyph\r\n * positions is unaffected — the only thing it gives up is on-canvas text\r\n * editing in a host built on it.\r\n */\r\n layoutTextBlock(state: Partial<TextState>): TextBlockLayout | null {\r\n return null;\r\n }\r\n\r\n /** Stack of node ids currently being drawn, innermost last. */\r\n protected currentNodeStack: string[] = [];\r\n\r\n /** Returns the id of the innermost node currently being drawn. */\r\n protected currentNodeId(): string {\r\n if (this.currentNodeStack.length === 0) {\r\n throw new Error(\"No current node in context\");\r\n }\r\n\r\n return this.currentNodeStack[this.currentNodeStack.length - 1];\r\n }\r\n\r\n /** Remove all renderer-side resources for the current node (called on unmount). */\r\n abstract unmount(): void;\r\n\r\n private _disposed = false;\r\n /** `true` after `dispose()` — the context must not be used after this point. */\r\n isDisposed(): boolean {\r\n return this._disposed;\r\n }\r\n dispose(): void {\r\n this._disposed = true;\r\n }\r\n\r\n /**\r\n * Execute `callback`, which issues shape/paint calls, and flush the result\r\n * to the underlying render target (canvas, SVG document, etc.). A callback\r\n * that throws still throws, and the next pass starts from a clean context.\r\n */\r\n abstract execute(callback: () => void): void;\r\n /**\r\n * What the frames since the last call drew without failing but not as the\r\n * document says (a blend mode the backend lacks, a shader that does not\r\n * compile, a lost GPU device), once per kind, feature and node. The\r\n * playback controller reports them as render errors; an export hands them\r\n * to its `onIssue`. A bare string is a `shader` issue.\r\n */\r\n takeRenderIssues(): Array<RenderIssue | string> {\r\n return [];\r\n }\r\n /** Capture the current frame as a base-64 PNG data URL, or `undefined` if unsupported. */\r\n abstract screenshot(): string | undefined;\r\n\r\n abstract transform(state: Partial<TransformState>): RenderContext2D;\r\n\r\n abstract beginBoolean(op: BooleanOperation): void;\r\n abstract endBoolean(): void;\r\n\r\n abstract beginMask(options?: MaskOptions): void;\r\n abstract applyMask(): void;\r\n abstract endMask(): void;\r\n\r\n abstract beginClip(clip: Clip): void;\r\n abstract endClip(): void;\r\n\r\n /** See {@link RenderContext2D.beginEffects}. No-op by default. */\r\n beginEffects(effects: NodeEffect[], target: EffectTarget, width: number, height: number): void { }\r\n endEffects(): void { }\r\n\r\n /** See {@link RenderContext2D.rasterize}. Returns `null` by default. */\r\n rasterize(\r\n width: number,\r\n height: number,\r\n draw: () => void,\r\n pixelRatio?: number,\r\n ): RasterizedSurface | null {\r\n return null;\r\n }\r\n\r\n abstract beginCamera(viewport: { x: number; y: number; width: number; height: number }, lookAt: Vector2, zoom: number, heading: number): void;\r\n abstract endCamera(): void;\r\n\r\n /**\r\n * Per-node render state for each node on the draw stack, in push order\r\n * (innermost last). Kept parallel to `currentNodeStack` so fills with\r\n * `space: 'parent'` can resolve their reference rect and so\r\n * motion-driven effects can read the current node's velocity.\r\n */\r\n protected renderStateStack: NodeRenderState[] = [];\r\n\r\n /** See {@link RenderContext2D.readsSpaceRects}. */\r\n readonly readsSpaceRects: boolean = true;\r\n\r\n /** See {@link RenderContext2D.drawsVisibleOnly}. */\r\n readonly drawsVisibleOnly: boolean = true;\r\n\r\n /** See {@link RenderPass2D.begin}. */\r\n begin(state: NodeRenderState): void {\r\n this.currentNodeStack.push(state.id);\r\n this.renderStateStack.push(state);\r\n }\r\n\r\n /** Close the innermost node draw scope opened by `begin()`. */\r\n end(): void {\r\n this.currentNodeStack.pop();\r\n this.renderStateStack.pop();\r\n }\r\n\r\n /** Reference rects for the node currently being drawn (parent / viewport). */\r\n protected currentSpaceRects(): SpaceRects {\r\n return this.renderStateStack[this.renderStateStack.length - 1]?.rects ?? {};\r\n }\r\n\r\n /** Full render state (incl. velocity) for the node currently being drawn, if any. */\r\n protected currentRenderState(): NodeRenderState | undefined {\r\n return this.renderStateStack[this.renderStateStack.length - 1];\r\n }\r\n\r\n /**\r\n * Close every node and text-style scope still open. A backend calls this\r\n * when a pass ends, so a pass that threw cannot leave the next one inside\r\n * its scopes.\r\n */\r\n protected _resetScopes(): void {\r\n this.textStyleStack.length = 0;\r\n this.currentNodeStack.length = 0;\r\n this.renderStateStack.length = 0;\r\n }\r\n}\r\n"]}
|
|
@@ -8,7 +8,7 @@ import { cornerRadiusOps } from "../attributes/shape/corners/corner-radius.js";
|
|
|
8
8
|
* Point-in-region tests for {@link Clip}, used by node hit testing so a click
|
|
9
9
|
* follows a shape's silhouette rather than its bounding box.
|
|
10
10
|
*
|
|
11
|
-
* Geometry only — no renderer
|
|
11
|
+
* Geometry only — no renderer — because a `Clip` is a declarative
|
|
12
12
|
* record of primitives rather than a built path. That is what lets hit testing
|
|
13
13
|
* live in `core` and share one outline definition with clipping and backdrop
|
|
14
14
|
* effects: a shape declares its outline once, in `clipSelf()`, and both the
|