@motionscript/core 0.1.0-alpha.0 → 0.1.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +356 -0
- package/NOTICE +49 -0
- package/README.md +29 -10
- package/dist/assets/catalog.d.ts +9 -0
- package/dist/assets/catalog.d.ts.map +1 -1
- package/dist/assets/catalog.js +11 -0
- package/dist/assets/catalog.js.map +1 -1
- package/dist/assets/errors.d.ts.map +1 -1
- package/dist/assets/errors.js +7 -3
- package/dist/assets/errors.js.map +1 -1
- package/dist/assets/manager.d.ts +26 -1
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/assets/manager.js +99 -15
- package/dist/assets/manager.js.map +1 -1
- package/dist/assets/scope.d.ts +4 -4
- package/dist/assets/scope.d.ts.map +1 -1
- package/dist/assets/scope.js +1 -1
- package/dist/assets/scope.js.map +1 -1
- package/dist/attributes/audio/effects/chain.d.ts +73 -0
- package/dist/attributes/audio/effects/chain.d.ts.map +1 -0
- package/dist/attributes/audio/effects/chain.js +67 -0
- package/dist/attributes/audio/effects/chain.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/echo.d.ts +14 -0
- package/dist/attributes/audio/effects/implementations/echo.d.ts.map +1 -0
- package/dist/attributes/audio/{filters → effects}/implementations/echo.js +2 -2
- package/dist/attributes/audio/effects/implementations/echo.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/gain.d.ts +10 -0
- package/dist/attributes/audio/effects/implementations/gain.d.ts.map +1 -0
- package/dist/attributes/audio/{filters → effects}/implementations/gain.js +2 -2
- package/dist/attributes/audio/effects/implementations/gain.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/highpass.d.ts +12 -0
- package/dist/attributes/audio/effects/implementations/highpass.d.ts.map +1 -0
- package/dist/attributes/audio/{filters → effects}/implementations/highpass.js +2 -2
- package/dist/attributes/audio/effects/implementations/highpass.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/lowpass.d.ts +12 -0
- package/dist/attributes/audio/effects/implementations/lowpass.d.ts.map +1 -0
- package/dist/attributes/audio/{filters → effects}/implementations/lowpass.js +2 -2
- package/dist/attributes/audio/effects/implementations/lowpass.js.map +1 -0
- package/dist/attributes/audio/effects/implementations/tremolo.d.ts +12 -0
- package/dist/attributes/audio/effects/implementations/tremolo.d.ts.map +1 -0
- package/dist/attributes/audio/{filters → effects}/implementations/tremolo.js +2 -2
- package/dist/attributes/audio/effects/implementations/tremolo.js.map +1 -0
- package/dist/attributes/audio/effects/index.d.ts +12 -0
- package/dist/attributes/audio/effects/index.d.ts.map +1 -0
- package/dist/attributes/audio/effects/index.js +4 -0
- package/dist/attributes/audio/effects/index.js.map +1 -0
- package/dist/attributes/audio/effects/registry.d.ts +36 -0
- package/dist/attributes/audio/effects/registry.d.ts.map +1 -0
- package/dist/attributes/audio/effects/registry.js +80 -0
- package/dist/attributes/audio/effects/registry.js.map +1 -0
- package/dist/attributes/audio/effects/union.d.ts +14 -0
- package/dist/attributes/audio/effects/union.d.ts.map +1 -0
- package/dist/attributes/audio/effects/union.js +24 -0
- package/dist/attributes/audio/effects/union.js.map +1 -0
- package/dist/attributes/audio/ramp.d.ts +103 -0
- package/dist/attributes/audio/ramp.d.ts.map +1 -0
- package/dist/attributes/audio/ramp.js +246 -0
- package/dist/attributes/audio/ramp.js.map +1 -0
- package/dist/attributes/audio/request.d.ts +52 -13
- package/dist/attributes/audio/request.d.ts.map +1 -1
- package/dist/attributes/audio/request.js +10 -1
- package/dist/attributes/audio/request.js.map +1 -1
- package/dist/attributes/audio/schedule.d.ts +26 -24
- package/dist/attributes/audio/schedule.d.ts.map +1 -1
- package/dist/attributes/audio/schedule.js +51 -30
- package/dist/attributes/audio/schedule.js.map +1 -1
- package/dist/attributes/audio/sound.d.ts +18 -13
- package/dist/attributes/audio/sound.d.ts.map +1 -1
- package/dist/attributes/audio/sound.js +13 -11
- package/dist/attributes/audio/sound.js.map +1 -1
- package/dist/attributes/audio/transition.d.ts +33 -0
- package/dist/attributes/audio/transition.d.ts.map +1 -0
- package/dist/attributes/audio/transition.js +48 -0
- package/dist/attributes/audio/transition.js.map +1 -0
- package/dist/attributes/index.d.ts +8 -8
- package/dist/attributes/index.d.ts.map +1 -1
- package/dist/attributes/index.js +7 -9
- package/dist/attributes/index.js.map +1 -1
- package/dist/attributes/layout/alignment.js +1 -1
- package/dist/attributes/layout/alignment.js.map +1 -1
- package/dist/attributes/layout/insets.d.ts +1 -1
- package/dist/attributes/layout/insets.js.map +1 -1
- package/dist/attributes/layout/matrix2d.d.ts +2 -2
- package/dist/attributes/layout/matrix2d.js.map +1 -1
- package/dist/attributes/layout/size.d.ts +1 -1
- package/dist/attributes/layout/size.js +1 -1
- package/dist/attributes/layout/size.js.map +1 -1
- package/dist/attributes/layout/space3d.js +1 -1
- package/dist/attributes/layout/space3d.js.map +1 -1
- package/dist/attributes/properties/decorator.d.ts +56 -12
- package/dist/attributes/properties/decorator.d.ts.map +1 -1
- package/dist/attributes/properties/decorator.js +59 -19
- package/dist/attributes/properties/decorator.js.map +1 -1
- package/dist/attributes/properties/inputs.d.ts +1 -1
- package/dist/attributes/properties/inputs.js +1 -1
- package/dist/attributes/properties/inputs.js.map +1 -1
- package/dist/attributes/properties/typed.d.ts +27 -141
- package/dist/attributes/properties/typed.d.ts.map +1 -1
- package/dist/attributes/properties/typed.js +24 -106
- package/dist/attributes/properties/typed.js.map +1 -1
- package/dist/attributes/render3d/orbit.d.ts +8 -8
- package/dist/attributes/render3d/orbit.js +7 -7
- package/dist/attributes/render3d/orbit.js.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.d.ts +2 -3
- package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.js +2 -3
- package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
- package/dist/attributes/shape/effects/backdrop.d.ts +4 -4
- package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
- package/dist/attributes/shape/effects/backdrop.js.map +1 -1
- package/dist/attributes/shape/effects/chain.d.ts +117 -522
- package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/chain.js +102 -364
- package/dist/attributes/shape/effects/chain.js.map +1 -1
- package/dist/attributes/shape/effects/effect-data.d.ts +1 -1
- package/dist/attributes/shape/effects/effect-data.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.d.ts +45 -13
- package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.js +29 -23
- package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +32 -7
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js +17 -15
- package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts +46 -10
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js +21 -19
- package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.d.ts +32 -7
- package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.js +17 -11
- package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.d.ts +16 -3
- package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.js +13 -5
- package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.d.ts +28 -9
- package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.js +15 -14
- package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +21 -5
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +15 -10
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +98 -28
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js +29 -26
- package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.d.ts +21 -7
- package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.js +26 -23
- package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +26 -5
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js +15 -10
- package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.d.ts +58 -11
- package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.js +26 -20
- package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +47 -15
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js +24 -29
- package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.d.ts +26 -7
- package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.js +17 -16
- package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.d.ts +29 -7
- package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.js +17 -14
- package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.d.ts +82 -34
- package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.js +28 -22
- package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.d.ts +149 -42
- package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.js +74 -72
- package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.d.ts +43 -11
- package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.js +21 -18
- package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts +17 -3
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js +13 -5
- package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.d.ts +40 -9
- package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.js +20 -16
- package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.d.ts +23 -5
- package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.js +15 -10
- package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +57 -18
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js +25 -22
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.d.ts +35 -8
- package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.js +20 -16
- package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.d.ts +27 -9
- package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.js +17 -14
- package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +54 -19
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.js +42 -20
- package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +17 -3
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js +13 -9
- package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.d.ts +28 -8
- package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.js +18 -17
- package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts +25 -6
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js +16 -14
- package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.d.ts +14 -3
- package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.js +13 -9
- package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +91 -26
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.js +27 -28
- package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +49 -10
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js +19 -20
- package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +36 -6
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js +16 -15
- package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts +52 -11
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js +21 -18
- package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.d.ts +23 -9
- package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.js +15 -12
- package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.d.ts +90 -34
- package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.js +57 -34
- package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts +23 -5
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js +16 -11
- package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.d.ts +40 -9
- package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.js +19 -16
- package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.d.ts +24 -5
- package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.js +17 -11
- package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.d.ts +35 -8
- package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.js +17 -16
- package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.d.ts +37 -7
- package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.js +19 -18
- package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.d.ts +24 -5
- package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.js +15 -10
- package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.d.ts +61 -14
- package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.js +26 -23
- package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
- package/dist/attributes/shape/effects/index.d.ts +6 -8
- package/dist/attributes/shape/effects/index.d.ts.map +1 -1
- package/dist/attributes/shape/effects/index.js +1 -1
- package/dist/attributes/shape/effects/index.js.map +1 -1
- package/dist/attributes/shape/effects/registry.d.ts +34 -6
- package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
- package/dist/attributes/shape/effects/registry.js +157 -112
- package/dist/attributes/shape/effects/registry.js.map +1 -1
- package/dist/attributes/shape/effects/spec.d.ts +229 -0
- package/dist/attributes/shape/effects/spec.d.ts.map +1 -0
- package/dist/attributes/shape/effects/spec.js +178 -0
- package/dist/attributes/shape/effects/spec.js.map +1 -0
- package/dist/attributes/shape/effects/union.d.ts +2 -6
- package/dist/attributes/shape/effects/union.d.ts.map +1 -1
- package/dist/attributes/shape/effects/union.js.map +1 -1
- package/dist/attributes/shape/fill/chain.d.ts +7 -9
- package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
- package/dist/attributes/shape/fill/chain.js +9 -11
- package/dist/attributes/shape/fill/chain.js.map +1 -1
- package/dist/attributes/shape/fill/color/parser.d.ts +1 -1
- package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
- package/dist/attributes/shape/fill/color/parser.js +102 -50
- package/dist/attributes/shape/fill/color/parser.js.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.d.ts +16 -0
- package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -0
- package/dist/attributes/shape/fill/gradient-stops.js +65 -0
- package/dist/attributes/shape/fill/gradient-stops.js.map +1 -0
- package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -2
- package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/conic-gradient.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/conic-gradient.js +2 -5
- package/dist/attributes/shape/fill/implementations/conic-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js +2 -10
- package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.js +5 -4
- package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/linear-gradient.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/linear-gradient.js +2 -6
- package/dist/attributes/shape/fill/implementations/linear-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/radial-gradient.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/radial-gradient.js +2 -5
- package/dist/attributes/shape/fill/implementations/radial-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.d.ts +28 -27
- package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.js +20 -14
- package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.d.ts +1 -1
- package/dist/attributes/shape/fill/implementations/video.js +2 -2
- package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
- package/dist/attributes/shape/fill/index.d.ts +1 -1
- package/dist/attributes/shape/fill/index.d.ts.map +1 -1
- package/dist/attributes/shape/fill/index.js.map +1 -1
- package/dist/attributes/shape/fill/lerp.d.ts +9 -1
- package/dist/attributes/shape/fill/lerp.d.ts.map +1 -1
- package/dist/attributes/shape/fill/lerp.js +12 -1
- package/dist/attributes/shape/fill/lerp.js.map +1 -1
- package/dist/attributes/shape/fill/registry.d.ts +1 -2
- package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
- package/dist/attributes/shape/fill/registry.js +1 -2
- package/dist/attributes/shape/fill/registry.js.map +1 -1
- package/dist/attributes/shape/filters/chain.d.ts +7 -17
- package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
- package/dist/attributes/shape/filters/chain.js +3 -19
- package/dist/attributes/shape/filters/chain.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +2 -2
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
- package/dist/attributes/shape/filters/index.d.ts +1 -1
- package/dist/attributes/shape/filters/index.js.map +1 -1
- package/dist/attributes/shape/filters/registry.d.ts +3 -3
- package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
- package/dist/attributes/shape/filters/registry.js +6 -6
- package/dist/attributes/shape/filters/registry.js.map +1 -1
- package/dist/attributes/shape/filters/union.d.ts +12 -13
- package/dist/attributes/shape/filters/union.d.ts.map +1 -1
- package/dist/attributes/shape/filters/union.js.map +1 -1
- package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
- package/dist/attributes/shape/path/anchors.js +12 -5
- package/dist/attributes/shape/path/anchors.js.map +1 -1
- package/dist/attributes/shape/path/morph.d.ts.map +1 -1
- package/dist/attributes/shape/path/morph.js +16 -4
- package/dist/attributes/shape/path/morph.js.map +1 -1
- package/dist/attributes/shape/path/ops.d.ts +1 -2
- package/dist/attributes/shape/path/ops.d.ts.map +1 -1
- package/dist/attributes/shape/path/ops.js.map +1 -1
- package/dist/attributes/shape/shaders/index.d.ts +2 -0
- package/dist/attributes/shape/shaders/index.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/index.js +2 -0
- package/dist/attributes/shape/shaders/index.js.map +1 -1
- package/dist/attributes/shape/shaders/language.d.ts +26 -0
- package/dist/attributes/shape/shaders/language.d.ts.map +1 -0
- package/dist/attributes/shape/shaders/language.js +20 -0
- package/dist/attributes/shape/shaders/language.js.map +1 -0
- package/dist/attributes/shape/shaders/pack.d.ts +25 -11
- package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/pack.js +9 -4
- package/dist/attributes/shape/shaders/pack.js.map +1 -1
- package/dist/attributes/shape/shaders/resolve.d.ts +4 -5
- package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/resolve.js +3 -6
- package/dist/attributes/shape/shaders/resolve.js.map +1 -1
- package/dist/attributes/shape/shaders/uniforms.d.ts +41 -0
- package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -0
- package/dist/attributes/shape/shaders/uniforms.js +0 -0
- package/dist/attributes/shape/shaders/uniforms.js.map +1 -0
- package/dist/attributes/shape/stroke/index.d.ts +2 -2
- package/dist/attributes/shape/stroke/index.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/index.js +1 -1
- package/dist/attributes/shape/stroke/index.js.map +1 -1
- package/dist/attributes/shape/stroke/stroke.d.ts +27 -6
- package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/stroke.js +22 -2
- package/dist/attributes/shape/stroke/stroke.js.map +1 -1
- package/dist/attributes/shared/operators.d.ts +2 -2
- package/dist/attributes/shared/operators.js.map +1 -1
- package/dist/attributes/text/ops.d.ts +6 -0
- package/dist/attributes/text/ops.d.ts.map +1 -1
- package/dist/attributes/text/ops.js +1 -0
- package/dist/attributes/text/ops.js.map +1 -1
- package/dist/attributes/text/types.d.ts +2 -3
- package/dist/attributes/text/types.d.ts.map +1 -1
- package/dist/attributes/text/types.js.map +1 -1
- package/dist/browser/chunks/chunk-4BDLFEOC.js +2 -0
- package/dist/browser/chunks/chunk-4BDLFEOC.js.map +7 -0
- package/dist/browser/chunks/chunk-CCGVIR4F.js +3 -0
- package/dist/browser/chunks/chunk-CCGVIR4F.js.map +7 -0
- package/dist/browser/chunks/chunk-N4WSN5WY.js +13 -0
- package/dist/browser/chunks/chunk-N4WSN5WY.js.map +7 -0
- package/dist/browser/chunks/chunk-WZSI3GSK.js +6 -0
- package/dist/browser/chunks/chunk-WZSI3GSK.js.map +7 -0
- package/dist/browser/component.js +1 -1
- package/dist/browser/component.js.map +4 -4
- package/dist/browser/experimental.js +2 -0
- package/dist/browser/experimental.js.map +7 -0
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/browser/manifest.json +5 -5
- package/dist/browser/sdk.js +1 -1
- package/dist/component.d.ts +10 -19
- package/dist/component.d.ts.map +1 -1
- package/dist/component.js +10 -19
- package/dist/component.js.map +1 -1
- package/dist/components/builtins/audio/audio.d.ts +62 -0
- package/dist/components/builtins/audio/audio.d.ts.map +1 -0
- package/dist/components/builtins/audio/audio.js +38 -0
- package/dist/components/builtins/audio/audio.js.map +1 -0
- package/dist/components/builtins/geometry/composite.d.ts +93 -0
- package/dist/components/builtins/geometry/composite.d.ts.map +1 -0
- package/dist/components/builtins/geometry/composite.js +25 -0
- package/dist/components/builtins/geometry/composite.js.map +1 -0
- package/dist/components/builtins/geometry/geometry.d.ts +921 -0
- package/dist/components/builtins/geometry/geometry.d.ts.map +1 -0
- package/dist/components/builtins/geometry/geometry.js +107 -0
- package/dist/components/builtins/geometry/geometry.js.map +1 -0
- package/dist/{nodes → components/builtins}/geometry/shape-outline.d.ts +5 -5
- package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -0
- package/dist/{nodes → components/builtins}/geometry/shape-outline.js +4 -15
- package/dist/components/builtins/geometry/shape-outline.js.map +1 -0
- package/dist/components/builtins/layout/layout.d.ts +186 -0
- package/dist/components/builtins/layout/layout.d.ts.map +1 -0
- package/dist/components/builtins/layout/layout.js +84 -0
- package/dist/components/builtins/layout/layout.js.map +1 -0
- package/dist/components/builtins/media/media.d.ts +240 -0
- package/dist/components/builtins/media/media.d.ts.map +1 -0
- package/dist/components/builtins/media/media.js +143 -0
- package/dist/components/builtins/media/media.js.map +1 -0
- package/dist/components/builtins/providers/providers.d.ts +47 -0
- package/dist/components/builtins/providers/providers.d.ts.map +1 -0
- package/dist/components/builtins/providers/providers.js +30 -0
- package/dist/components/builtins/providers/providers.js.map +1 -0
- package/dist/{nodes → components/builtins}/text/number-format.d.ts +1 -1
- package/dist/components/builtins/text/number-format.d.ts.map +1 -0
- package/dist/{nodes → components/builtins}/text/number-format.js +1 -1
- package/dist/components/builtins/text/number-format.js.map +1 -0
- package/dist/components/builtins/text/number-pattern.d.ts.map +1 -0
- package/dist/components/builtins/text/number-pattern.js.map +1 -0
- package/dist/{nodes/node → components/builtins/text}/text-defaults.d.ts +10 -12
- package/dist/components/builtins/text/text-defaults.d.ts.map +1 -0
- package/dist/{nodes/node → components/builtins/text}/text-defaults.js +10 -12
- package/dist/components/builtins/text/text-defaults.js.map +1 -0
- package/dist/components/builtins/text/text-layout.d.ts +82 -0
- package/dist/components/builtins/text/text-layout.d.ts.map +1 -0
- package/dist/components/builtins/text/text-layout.js +331 -0
- package/dist/components/builtins/text/text-layout.js.map +1 -0
- package/dist/components/builtins/text/text.d.ts +409 -0
- package/dist/components/builtins/text/text.d.ts.map +1 -0
- package/dist/components/builtins/text/text.js +116 -0
- package/dist/components/builtins/text/text.js.map +1 -0
- package/dist/components/builtins/three/canvas3d.d.ts +245 -0
- package/dist/components/builtins/three/canvas3d.d.ts.map +1 -0
- package/dist/components/builtins/three/canvas3d.js +21 -0
- package/dist/components/builtins/three/canvas3d.js.map +1 -0
- package/dist/{nodes → components/builtins}/three/grid-geometry3d.d.ts +2 -2
- package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -0
- package/dist/{nodes → components/builtins}/three/grid-geometry3d.js +1 -1
- package/dist/components/builtins/three/grid-geometry3d.js.map +1 -0
- package/dist/components/builtins/three/three.d.ts +1889 -0
- package/dist/components/builtins/three/three.d.ts.map +1 -0
- package/dist/components/builtins/three/three.js +305 -0
- package/dist/components/builtins/three/three.js.map +1 -0
- package/dist/components/factory/api.d.ts +543 -0
- package/dist/components/factory/api.d.ts.map +1 -0
- package/dist/components/factory/api.js +4 -0
- package/dist/components/factory/api.js.map +1 -0
- package/dist/components/factory/clip-of.d.ts +5 -0
- package/dist/components/factory/clip-of.d.ts.map +1 -0
- package/dist/components/factory/clip-of.js +33 -0
- package/dist/components/factory/clip-of.js.map +1 -0
- package/dist/components/factory/commands-for.d.ts +19 -0
- package/dist/components/factory/commands-for.d.ts.map +1 -0
- package/dist/components/factory/commands-for.js +5 -0
- package/dist/components/factory/commands-for.js.map +1 -0
- package/dist/components/factory/component-audio.d.ts +9 -0
- package/dist/components/factory/component-audio.d.ts.map +1 -0
- package/dist/components/factory/component-audio.js +18 -0
- package/dist/components/factory/component-audio.js.map +1 -0
- package/dist/components/factory/component2d.d.ts +8 -0
- package/dist/components/factory/component2d.d.ts.map +1 -0
- package/dist/components/factory/component2d.js +240 -0
- package/dist/components/factory/component2d.js.map +1 -0
- package/dist/components/factory/component3d.d.ts +9 -0
- package/dist/components/factory/component3d.d.ts.map +1 -0
- package/dist/components/factory/component3d.js +107 -0
- package/dist/components/factory/component3d.js.map +1 -0
- package/dist/components/factory/factory.d.ts +66 -0
- package/dist/components/factory/factory.d.ts.map +1 -0
- package/dist/components/factory/factory.js +347 -0
- package/dist/components/factory/factory.js.map +1 -0
- package/dist/components/factory/timeline.d.ts +22 -0
- package/dist/components/factory/timeline.d.ts.map +1 -0
- package/dist/components/factory/timeline.js +128 -0
- package/dist/components/factory/timeline.js.map +1 -0
- package/dist/components/factory/type-def.d.ts +26 -0
- package/dist/components/factory/type-def.d.ts.map +1 -0
- package/dist/components/factory/type-def.js +16 -0
- package/dist/components/factory/type-def.js.map +1 -0
- package/dist/components/factory/types.d.ts +91 -0
- package/dist/components/factory/types.d.ts.map +1 -0
- package/dist/components/factory/types.js +88 -0
- package/dist/components/factory/types.js.map +1 -0
- package/dist/components/factory/views.d.ts +121 -0
- package/dist/components/factory/views.d.ts.map +1 -0
- package/dist/components/factory/views.js +453 -0
- package/dist/components/factory/views.js.map +1 -0
- package/dist/components/modules/aim.d.ts +30 -0
- package/dist/components/modules/aim.d.ts.map +1 -0
- package/dist/components/modules/aim.js +39 -0
- package/dist/components/modules/aim.js.map +1 -0
- package/dist/components/modules/corners.d.ts +13 -0
- package/dist/components/modules/corners.d.ts.map +1 -0
- package/dist/components/modules/corners.js +12 -0
- package/dist/components/modules/corners.js.map +1 -0
- package/dist/components/modules/flow.d.ts +26 -0
- package/dist/components/modules/flow.d.ts.map +1 -0
- package/dist/components/modules/flow.js +57 -0
- package/dist/components/modules/flow.js.map +1 -0
- package/dist/components/modules/material.d.ts +40 -0
- package/dist/components/modules/material.d.ts.map +1 -0
- package/dist/components/modules/material.js +75 -0
- package/dist/components/modules/material.js.map +1 -0
- package/dist/components/modules/paint.d.ts +71 -0
- package/dist/components/modules/paint.d.ts.map +1 -0
- package/dist/components/modules/paint.js +106 -0
- package/dist/components/modules/paint.js.map +1 -0
- package/dist/components/modules/shapes.d.ts +31 -0
- package/dist/components/modules/shapes.d.ts.map +1 -0
- package/dist/components/modules/shapes.js +43 -0
- package/dist/components/modules/shapes.js.map +1 -0
- package/dist/components/modules/text-layout.d.ts +26 -0
- package/dist/components/modules/text-layout.d.ts.map +1 -0
- package/dist/components/modules/text-layout.js +57 -0
- package/dist/components/modules/text-layout.js.map +1 -0
- package/dist/components/modules/text-style.d.ts +48 -0
- package/dist/components/modules/text-style.d.ts.map +1 -0
- package/dist/components/modules/text-style.js +63 -0
- package/dist/components/modules/text-style.js.map +1 -0
- package/dist/components/modules/three-entries.d.ts +23 -0
- package/dist/components/modules/three-entries.d.ts.map +1 -0
- package/dist/components/modules/three-entries.js +41 -0
- package/dist/components/modules/three-entries.js.map +1 -0
- package/dist/components/modules/view3d.d.ts +59 -0
- package/dist/components/modules/view3d.d.ts.map +1 -0
- package/dist/components/modules/view3d.js +171 -0
- package/dist/components/modules/view3d.js.map +1 -0
- package/dist/{nodes/geometry → components/trees/2d}/group-bounds.d.ts +4 -4
- package/dist/components/trees/2d/group-bounds.d.ts.map +1 -0
- package/dist/{nodes/geometry → components/trees/2d}/group-bounds.js +3 -4
- package/dist/components/trees/2d/group-bounds.js.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-lifecycle.d.ts +2 -2
- package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-lifecycle.js +1 -1
- package/dist/components/trees/2d/node-lifecycle.js.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-motion.d.ts +3 -3
- package/dist/components/trees/2d/node-motion.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-motion.js +1 -1
- package/dist/components/trees/2d/node-motion.js.map +1 -0
- package/dist/components/trees/2d/node-render.d.ts +36 -0
- package/dist/components/trees/2d/node-render.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-render.js +10 -23
- package/dist/components/trees/2d/node-render.js.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-space.d.ts +3 -3
- package/dist/components/trees/2d/node-space.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-space.js +4 -4
- package/dist/components/trees/2d/node-space.js.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-transform.d.ts +2 -2
- package/dist/components/trees/2d/node-transform.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node-transform.js +1 -1
- package/dist/components/trees/2d/node-transform.js.map +1 -0
- package/dist/{nodes → components/trees}/2d/node2d.d.ts +206 -185
- package/dist/components/trees/2d/node2d.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/2d/node2d.js +296 -324
- package/dist/components/trees/2d/node2d.js.map +1 -0
- package/dist/components/trees/audio/index.d.ts +2 -0
- package/dist/components/trees/audio/index.d.ts.map +1 -0
- package/dist/components/trees/audio/index.js +2 -0
- package/dist/components/trees/audio/index.js.map +1 -0
- package/dist/{nodes → components/trees}/audio/node-audio.d.ts +25 -15
- package/dist/components/trees/audio/node-audio.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/audio/node-audio.js +30 -35
- package/dist/components/trees/audio/node-audio.js.map +1 -0
- package/dist/components/trees/index.d.ts +10 -0
- package/dist/components/trees/index.d.ts.map +1 -0
- package/dist/components/trees/index.js +14 -0
- package/dist/components/trees/index.js.map +1 -0
- package/dist/components/trees/node/node-editor-state.d.ts.map +1 -0
- package/dist/components/trees/node/node-editor-state.js.map +1 -0
- package/dist/{nodes → components/trees}/node/node-reactive.d.ts +9 -10
- package/dist/components/trees/node/node-reactive.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/node/node-reactive.js +16 -13
- package/dist/components/trees/node/node-reactive.js.map +1 -0
- package/dist/{nodes → components/trees}/node/node-time.d.ts +3 -3
- package/dist/components/trees/node/node-time.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/node/node-time.js +1 -1
- package/dist/components/trees/node/node-time.js.map +1 -0
- package/dist/{nodes → components/trees}/node/node-walk.d.ts +1 -1
- package/dist/components/trees/node/node-walk.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/node/node-walk.js +1 -1
- package/dist/components/trees/node/node-walk.js.map +1 -0
- package/dist/{nodes → components/trees}/node/node.d.ts +46 -82
- package/dist/components/trees/node/node.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/node/node.js +89 -114
- package/dist/components/trees/node/node.js.map +1 -0
- package/dist/{nodes/scene → components/trees/root}/canvas2d-node.d.ts +16 -15
- package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -0
- package/dist/{nodes/scene → components/trees/root}/canvas2d-node.js +40 -85
- package/dist/components/trees/root/canvas2d-node.js.map +1 -0
- package/dist/{nodes → components/trees}/three/node3d.d.ts +65 -25
- package/dist/components/trees/three/node3d.d.ts.map +1 -0
- package/dist/{nodes → components/trees}/three/node3d.js +78 -76
- package/dist/components/trees/three/node3d.js.map +1 -0
- package/dist/document/audio.d.ts +10 -2
- package/dist/document/audio.d.ts.map +1 -1
- package/dist/document/audio.js +45 -4
- package/dist/document/audio.js.map +1 -1
- package/dist/document/builtins.d.ts.map +1 -1
- package/dist/document/builtins.js +18 -42
- package/dist/document/builtins.js.map +1 -1
- package/dist/document/command-traits.d.ts +23 -5
- package/dist/document/command-traits.d.ts.map +1 -1
- package/dist/document/command-traits.js +72 -10
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/deny-globals.d.ts +2 -2
- package/dist/document/deny-globals.js +2 -2
- package/dist/document/deny-globals.js.map +1 -1
- package/dist/document/diff.d.ts.map +1 -1
- package/dist/document/diff.js +3 -3
- package/dist/document/diff.js.map +1 -1
- package/dist/document/doc-index.d.ts +2 -2
- package/dist/document/doc-index.d.ts.map +1 -1
- package/dist/document/doc-index.js +3 -3
- package/dist/document/doc-index.js.map +1 -1
- package/dist/document/expression/compile.d.ts.map +1 -1
- package/dist/document/expression/compile.js +8 -5
- package/dist/document/expression/compile.js.map +1 -1
- package/dist/document/expression/index.d.ts +1 -1
- package/dist/document/expression/index.js +1 -1
- package/dist/document/expression/index.js.map +1 -1
- package/dist/document/expression/ops.js +2 -2
- package/dist/document/expression/ops.js.map +1 -1
- package/dist/document/expression/parse.d.ts.map +1 -1
- package/dist/document/expression/parse.js +15 -6
- package/dist/document/expression/parse.js.map +1 -1
- package/dist/document/expression/refs.d.ts +1 -1
- package/dist/document/expression/refs.js +1 -1
- package/dist/document/expression/refs.js.map +1 -1
- package/dist/document/expression/walk.d.ts.map +1 -1
- package/dist/document/expression/walk.js +2 -1
- package/dist/document/expression/walk.js.map +1 -1
- package/dist/document/index.d.ts +10 -1
- package/dist/document/index.d.ts.map +1 -1
- package/dist/document/index.js +6 -1
- package/dist/document/index.js.map +1 -1
- package/dist/document/migrate.d.ts +70 -0
- package/dist/document/migrate.d.ts.map +1 -0
- package/dist/document/migrate.js +202 -0
- package/dist/document/migrate.js.map +1 -0
- package/dist/document/missing-node.d.ts +27 -0
- package/dist/document/missing-node.d.ts.map +1 -0
- package/dist/document/missing-node.js +48 -0
- package/dist/document/missing-node.js.map +1 -0
- package/dist/document/node-decorator.d.ts +14 -10
- package/dist/document/node-decorator.d.ts.map +1 -1
- package/dist/document/node-decorator.js +14 -10
- package/dist/document/node-decorator.js.map +1 -1
- package/dist/document/node-descriptor.d.ts +32 -3
- package/dist/document/node-descriptor.d.ts.map +1 -1
- package/dist/document/node-descriptor.js.map +1 -1
- package/dist/document/placement.d.ts +71 -0
- package/dist/document/placement.d.ts.map +1 -0
- package/dist/document/placement.js +83 -0
- package/dist/document/placement.js.map +1 -0
- package/dist/document/project.d.ts +4 -2
- package/dist/document/project.d.ts.map +1 -1
- package/dist/document/project.js +1 -0
- package/dist/document/project.js.map +1 -1
- package/dist/document/prop-evolution.d.ts +51 -0
- package/dist/document/prop-evolution.d.ts.map +1 -0
- package/dist/document/prop-evolution.js +83 -0
- package/dist/document/prop-evolution.js.map +1 -0
- package/dist/document/registry.d.ts +71 -44
- package/dist/document/registry.d.ts.map +1 -1
- package/dist/document/registry.js +94 -35
- package/dist/document/registry.js.map +1 -1
- package/dist/document/settled-index.d.ts +57 -0
- package/dist/document/settled-index.d.ts.map +1 -0
- package/dist/document/settled-index.js +264 -0
- package/dist/document/settled-index.js.map +1 -0
- package/dist/document/timeline-patch.d.ts +4 -0
- package/dist/document/timeline-patch.d.ts.map +1 -1
- package/dist/document/timeline-patch.js +28 -3
- package/dist/document/timeline-patch.js.map +1 -1
- package/dist/document/timeline.d.ts +145 -20
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +478 -80
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.d.ts +30 -44
- package/dist/document/types.d.ts.map +1 -1
- package/dist/document/types.js +2 -2
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.d.ts +20 -8
- package/dist/document/validate.d.ts.map +1 -1
- package/dist/document/validate.js +195 -52
- package/dist/document/validate.js.map +1 -1
- package/dist/document/vocabulary.d.ts +28 -0
- package/dist/document/vocabulary.d.ts.map +1 -0
- package/dist/document/vocabulary.js +42 -0
- package/dist/document/vocabulary.js.map +1 -0
- package/dist/experimental.d.ts +82 -0
- package/dist/experimental.d.ts.map +1 -0
- package/dist/experimental.js +34 -0
- package/dist/experimental.js.map +1 -0
- package/dist/index.d.ts +11 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/layout/bounds.d.ts +0 -1
- package/dist/layout/bounds.d.ts.map +1 -1
- package/dist/layout/bounds.js.map +1 -1
- package/dist/layout/flex.d.ts +4 -2
- package/dist/layout/flex.d.ts.map +1 -1
- package/dist/layout/flex.js +27 -11
- package/dist/layout/flex.js.map +1 -1
- package/dist/layout/ops.d.ts +6 -0
- package/dist/layout/ops.d.ts.map +1 -1
- package/dist/layout/ops.js +6 -0
- package/dist/layout/ops.js.map +1 -1
- package/dist/layout/types.d.ts +1 -1
- package/dist/layout/types.js.map +1 -1
- package/dist/platform/audio-sink.d.ts +2 -2
- package/dist/platform/audio-sink.d.ts.map +1 -1
- package/dist/platform/audio-sink.js.map +1 -1
- package/dist/platform/exporter.d.ts +26 -8
- package/dist/platform/exporter.d.ts.map +1 -1
- package/dist/platform/exporter.js.map +1 -1
- package/dist/platform/index.d.ts +1 -1
- package/dist/platform/index.d.ts.map +1 -1
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/storage-adapter.d.ts +12 -6
- package/dist/platform/storage-adapter.d.ts.map +1 -1
- package/dist/platform/storage-adapter.js +4 -0
- package/dist/platform/storage-adapter.js.map +1 -1
- package/dist/platform/ticker.d.ts +6 -0
- package/dist/platform/ticker.d.ts.map +1 -1
- package/dist/platform/ticker.js +6 -0
- package/dist/platform/ticker.js.map +1 -1
- package/dist/project/tree.d.ts +3 -3
- package/dist/project/tree.d.ts.map +1 -1
- package/dist/project/tree.js.map +1 -1
- package/dist/props/host.d.ts +6 -1
- package/dist/props/host.d.ts.map +1 -1
- package/dist/props/host.js +3 -1
- package/dist/props/host.js.map +1 -1
- package/dist/props/layout.d.ts +29 -0
- package/dist/props/layout.d.ts.map +1 -0
- package/dist/props/layout.js +84 -0
- package/dist/props/layout.js.map +1 -0
- package/dist/props/slot.d.ts +1 -1
- package/dist/props/slot.js +1 -1
- package/dist/props/slot.js.map +1 -1
- package/dist/renamed-scene-names.d.ts +17 -0
- package/dist/renamed-scene-names.d.ts.map +1 -0
- package/dist/renamed-scene-names.js +9 -0
- package/dist/renamed-scene-names.js.map +1 -0
- package/dist/render/canvas-render-context2d.d.ts +19 -3
- package/dist/render/canvas-render-context2d.d.ts.map +1 -1
- package/dist/render/canvas-render-context2d.js +20 -0
- package/dist/render/canvas-render-context2d.js.map +1 -1
- package/dist/render/clip-contains.js +1 -1
- package/dist/render/clip-contains.js.map +1 -1
- package/dist/render/clip.d.ts +1 -1
- package/dist/render/clip.js +1 -1
- package/dist/render/clip.js.map +1 -1
- package/dist/render/descriptors/rect.js.map +1 -1
- package/dist/render/descriptors/shape.d.ts +12 -0
- package/dist/render/descriptors/shape.d.ts.map +1 -1
- package/dist/render/descriptors/shape.js.map +1 -1
- package/dist/render/descriptors/text.d.ts +15 -9
- package/dist/render/descriptors/text.d.ts.map +1 -1
- package/dist/render/descriptors/text.js +11 -5
- package/dist/render/descriptors/text.js.map +1 -1
- package/dist/render/descriptors/transform.d.ts +2 -2
- package/dist/render/descriptors/transform.d.ts.map +1 -1
- package/dist/render/descriptors/transform.js.map +1 -1
- package/dist/render/graphics2d.d.ts +3 -3
- package/dist/render/graphics2d.d.ts.map +1 -1
- package/dist/render/graphics2d.js +1 -1
- package/dist/render/graphics2d.js.map +1 -1
- package/dist/render/index.d.ts +2 -0
- package/dist/render/index.d.ts.map +1 -1
- package/dist/render/index.js +1 -0
- package/dist/render/index.js.map +1 -1
- package/dist/render/render-context2d.d.ts +8 -8
- package/dist/render/render-context2d.d.ts.map +1 -1
- package/dist/render/render-context2d.js.map +1 -1
- package/dist/render/render-issue.d.ts +39 -0
- package/dist/render/render-issue.d.ts.map +1 -0
- package/dist/render/render-issue.js +29 -0
- package/dist/render/render-issue.js.map +1 -0
- package/dist/render/surface.d.ts +2 -2
- package/dist/render/surface.js.map +1 -1
- package/dist/render3d/bounds3d.d.ts.map +1 -1
- package/dist/render3d/bounds3d.js +4 -2
- package/dist/render3d/bounds3d.js.map +1 -1
- package/dist/render3d/builders.d.ts +1 -1
- package/dist/render3d/builders.js +1 -1
- package/dist/render3d/builders.js.map +1 -1
- package/dist/render3d/camera.d.ts +6 -0
- package/dist/render3d/camera.d.ts.map +1 -1
- package/dist/render3d/camera.js +5 -3
- package/dist/render3d/camera.js.map +1 -1
- package/dist/render3d/fill3d.d.ts +2 -9
- package/dist/render3d/fill3d.d.ts.map +1 -1
- package/dist/render3d/fill3d.js +2 -13
- package/dist/render3d/fill3d.js.map +1 -1
- package/dist/render3d/geometry.d.ts +8 -1
- package/dist/render3d/geometry.d.ts.map +1 -1
- package/dist/render3d/geometry.js.map +1 -1
- package/dist/render3d/graphics3d.d.ts +21 -23
- package/dist/render3d/graphics3d.d.ts.map +1 -1
- package/dist/render3d/graphics3d.js +85 -34
- package/dist/render3d/graphics3d.js.map +1 -1
- package/dist/render3d/index.d.ts +1 -1
- package/dist/render3d/index.js +1 -1
- package/dist/render3d/index.js.map +1 -1
- package/dist/render3d/inert.d.ts +14 -0
- package/dist/render3d/inert.d.ts.map +1 -0
- package/dist/render3d/inert.js +62 -0
- package/dist/render3d/inert.js.map +1 -0
- package/dist/render3d/material.d.ts +10 -5
- package/dist/render3d/material.d.ts.map +1 -1
- package/dist/render3d/material.js.map +1 -1
- package/dist/render3d/resources.d.ts +2 -2
- package/dist/render3d/resources.js +2 -2
- package/dist/render3d/resources.js.map +1 -1
- package/dist/render3d/scene-settings.d.ts +23 -4
- package/dist/render3d/scene-settings.d.ts.map +1 -1
- package/dist/render3d/scene-settings.js.map +1 -1
- package/dist/render3d/scene3d.d.ts +12 -1
- package/dist/render3d/scene3d.d.ts.map +1 -1
- package/dist/render3d/scene3d.js +40 -7
- package/dist/render3d/scene3d.js.map +1 -1
- package/dist/render3d/texture.d.ts +11 -2
- package/dist/render3d/texture.d.ts.map +1 -1
- package/dist/render3d/texture.js +13 -0
- package/dist/render3d/texture.js.map +1 -1
- package/dist/render3d/transform.d.ts +1 -1
- package/dist/render3d/transform.js.map +1 -1
- package/dist/render3d/vector3.d.ts +20 -3
- package/dist/render3d/vector3.d.ts.map +1 -1
- package/dist/render3d/vector3.js +29 -2
- package/dist/render3d/vector3.js.map +1 -1
- package/dist/render3d/walk.d.ts +1 -1
- package/dist/render3d/walk.d.ts.map +1 -1
- package/dist/render3d/walk.js +5 -1
- package/dist/render3d/walk.js.map +1 -1
- package/dist/runtime/asset-refine.d.ts +1 -1
- package/dist/runtime/asset-refine.d.ts.map +1 -1
- package/dist/runtime/asset-refine.js +3 -2
- package/dist/runtime/asset-refine.js.map +1 -1
- package/dist/runtime/asset-timeline.d.ts +10 -0
- package/dist/runtime/asset-timeline.d.ts.map +1 -1
- package/dist/runtime/asset-timeline.js.map +1 -1
- package/dist/runtime/asset-update.d.ts.map +1 -1
- package/dist/runtime/asset-update.js +8 -1
- package/dist/runtime/asset-update.js.map +1 -1
- package/dist/runtime/audio-index.d.ts +0 -11
- package/dist/runtime/audio-index.d.ts.map +1 -1
- package/dist/runtime/audio-index.js +0 -19
- package/dist/runtime/audio-index.js.map +1 -1
- package/dist/runtime/clip-instance.d.ts +13 -6
- package/dist/runtime/clip-instance.d.ts.map +1 -1
- package/dist/runtime/clip-instance.js +34 -12
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.d.ts +20 -3
- package/dist/runtime/clip-store.d.ts.map +1 -1
- package/dist/runtime/clip-store.js +132 -27
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.d.ts +13 -6
- package/dist/runtime/engine.d.ts.map +1 -1
- package/dist/runtime/engine.js +6 -3
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/frame-time.d.ts +31 -0
- package/dist/runtime/frame-time.d.ts.map +1 -0
- package/dist/runtime/frame-time.js +29 -0
- package/dist/runtime/frame-time.js.map +1 -0
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +1 -0
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/node-picking.d.ts +45 -4
- package/dist/runtime/node-picking.d.ts.map +1 -1
- package/dist/runtime/node-picking.js +127 -13
- package/dist/runtime/node-picking.js.map +1 -1
- package/dist/runtime/node-picking3d.d.ts +14 -6
- package/dist/runtime/node-picking3d.d.ts.map +1 -1
- package/dist/runtime/node-picking3d.js +10 -2
- package/dist/runtime/node-picking3d.js.map +1 -1
- package/dist/runtime/placement.d.ts.map +1 -1
- package/dist/runtime/placement.js +4 -5
- package/dist/runtime/placement.js.map +1 -1
- package/dist/runtime/playback-controller.d.ts +32 -3
- package/dist/runtime/playback-controller.d.ts.map +1 -1
- package/dist/runtime/playback-controller.js +78 -11
- package/dist/runtime/playback-controller.js.map +1 -1
- package/dist/runtime/session.d.ts +16 -10
- package/dist/runtime/session.d.ts.map +1 -1
- package/dist/runtime/session.js +23 -8
- package/dist/runtime/session.js.map +1 -1
- package/dist/runtime/state-evaluator.d.ts +2 -2
- package/dist/runtime/state-evaluator.d.ts.map +1 -1
- package/dist/runtime/state-evaluator.js +4 -3
- package/dist/runtime/state-evaluator.js.map +1 -1
- package/dist/runtime/text-geometry.d.ts +2 -2
- package/dist/runtime/text-geometry.d.ts.map +1 -1
- package/dist/runtime/text-geometry.js +6 -3
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.d.ts +70 -38
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +71 -46
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command-decorator.d.ts +21 -8
- package/dist/tween/command-decorator.d.ts.map +1 -1
- package/dist/tween/command-decorator.js +12 -23
- package/dist/tween/command-decorator.js.map +1 -1
- package/dist/tween/command.d.ts +13 -1
- package/dist/tween/command.d.ts.map +1 -1
- package/dist/tween/command.js +14 -0
- package/dist/tween/command.js.map +1 -1
- package/dist/tween/ease/constants.d.ts.map +1 -1
- package/dist/tween/ease/constants.js +8 -5
- package/dist/tween/ease/constants.js.map +1 -1
- package/dist/tween/ease/curve.d.ts.map +1 -1
- package/dist/tween/ease/curve.js +4 -3
- package/dist/tween/ease/curve.js.map +1 -1
- package/dist/tween/ease/describe.d.ts +17 -0
- package/dist/tween/ease/describe.d.ts.map +1 -0
- package/dist/tween/ease/describe.js +41 -0
- package/dist/tween/ease/describe.js.map +1 -0
- package/dist/tween/ease/spec.d.ts +31 -0
- package/dist/tween/ease/spec.d.ts.map +1 -0
- package/dist/tween/ease/spec.js +51 -0
- package/dist/tween/ease/spec.js.map +1 -0
- package/dist/tween/index.d.ts +3 -1
- package/dist/tween/index.d.ts.map +1 -1
- package/dist/tween/index.js +2 -1
- package/dist/tween/index.js.map +1 -1
- package/dist/tween/loop.d.ts +1 -1
- package/dist/tween/loop.js +1 -1
- package/dist/tween/loop.js.map +1 -1
- package/dist/tween/prepare.d.ts +3 -3
- package/dist/tween/prepare.js +3 -3
- package/dist/tween/prepare.js.map +1 -1
- package/dist/util/metrics.d.ts +1 -1
- package/dist/util/metrics.js +1 -1
- package/dist/util/metrics.js.map +1 -1
- package/dist/util/reference.d.ts +6 -6
- package/dist/util/reference.js.map +1 -1
- package/package.json +8 -10
- package/dist/attributes/audio/filters/chain.d.ts +0 -113
- package/dist/attributes/audio/filters/chain.d.ts.map +0 -1
- package/dist/attributes/audio/filters/chain.js +0 -104
- package/dist/attributes/audio/filters/chain.js.map +0 -1
- package/dist/attributes/audio/filters/curve.d.ts +0 -152
- package/dist/attributes/audio/filters/curve.d.ts.map +0 -1
- package/dist/attributes/audio/filters/curve.js +0 -249
- package/dist/attributes/audio/filters/curve.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/echo.d.ts +0 -14
- package/dist/attributes/audio/filters/implementations/echo.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/echo.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/gain.d.ts +0 -10
- package/dist/attributes/audio/filters/implementations/gain.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/gain.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/highpass.d.ts +0 -12
- package/dist/attributes/audio/filters/implementations/highpass.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/highpass.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/lowpass.d.ts +0 -12
- package/dist/attributes/audio/filters/implementations/lowpass.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/lowpass.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/speed.d.ts +0 -18
- package/dist/attributes/audio/filters/implementations/speed.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/speed.js +0 -6
- package/dist/attributes/audio/filters/implementations/speed.js.map +0 -1
- package/dist/attributes/audio/filters/implementations/tremolo.d.ts +0 -12
- package/dist/attributes/audio/filters/implementations/tremolo.d.ts.map +0 -1
- package/dist/attributes/audio/filters/implementations/tremolo.js.map +0 -1
- package/dist/attributes/audio/filters/index.d.ts +0 -22
- package/dist/attributes/audio/filters/index.d.ts.map +0 -1
- package/dist/attributes/audio/filters/index.js +0 -8
- package/dist/attributes/audio/filters/index.js.map +0 -1
- package/dist/attributes/audio/filters/registry.d.ts +0 -36
- package/dist/attributes/audio/filters/registry.d.ts.map +0 -1
- package/dist/attributes/audio/filters/registry.js +0 -82
- package/dist/attributes/audio/filters/registry.js.map +0 -1
- package/dist/attributes/audio/filters/union.d.ts +0 -18
- package/dist/attributes/audio/filters/union.d.ts.map +0 -1
- package/dist/attributes/audio/filters/union.js +0 -28
- package/dist/attributes/audio/filters/union.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/displace.d.ts +0 -48
- package/dist/attributes/shape/effects/implementations/displace.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/displace.js +0 -30
- package/dist/attributes/shape/effects/implementations/displace.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/god-rays.d.ts +0 -28
- package/dist/attributes/shape/effects/implementations/god-rays.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/god-rays.js +0 -26
- package/dist/attributes/shape/effects/implementations/god-rays.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/texture.d.ts +0 -28
- package/dist/attributes/shape/effects/implementations/texture.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/texture.js +0 -25
- package/dist/attributes/shape/effects/implementations/texture.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/trails.d.ts +0 -41
- package/dist/attributes/shape/effects/implementations/trails.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/trails.js +0 -22
- package/dist/attributes/shape/effects/implementations/trails.js.map +0 -1
- package/dist/attributes/shape/sksl-uniforms.d.ts +0 -146
- package/dist/attributes/shape/sksl-uniforms.d.ts.map +0 -1
- package/dist/attributes/shape/sksl-uniforms.js +0 -0
- package/dist/attributes/shape/sksl-uniforms.js.map +0 -1
- package/dist/browser/chunks/chunk-2T3HXSC2.js +0 -2
- package/dist/browser/chunks/chunk-2T3HXSC2.js.map +0 -7
- package/dist/browser/chunks/chunk-P3XQCHDW.js +0 -16
- package/dist/browser/chunks/chunk-P3XQCHDW.js.map +0 -7
- package/dist/browser/chunks/chunk-VJQMKHGQ.js +0 -3
- package/dist/browser/chunks/chunk-VJQMKHGQ.js.map +0 -7
- package/dist/browser/jsx-jsx-dev-runtime.js +0 -2
- package/dist/browser/jsx-jsx-dev-runtime.js.map +0 -7
- package/dist/browser/jsx-jsx-runtime.js +0 -2
- package/dist/browser/jsx-jsx-runtime.js.map +0 -7
- package/dist/jsx/jsx-dev-runtime.d.ts +0 -3
- package/dist/jsx/jsx-dev-runtime.d.ts.map +0 -1
- package/dist/jsx/jsx-dev-runtime.js +0 -3
- package/dist/jsx/jsx-dev-runtime.js.map +0 -1
- package/dist/jsx/jsx-runtime.d.ts +0 -19
- package/dist/jsx/jsx-runtime.d.ts.map +0 -1
- package/dist/jsx/jsx-runtime.js +0 -16
- package/dist/jsx/jsx-runtime.js.map +0 -1
- package/dist/nodes/2d/node-lifecycle.d.ts.map +0 -1
- package/dist/nodes/2d/node-lifecycle.js.map +0 -1
- package/dist/nodes/2d/node-motion.d.ts.map +0 -1
- package/dist/nodes/2d/node-motion.js.map +0 -1
- package/dist/nodes/2d/node-render.d.ts +0 -44
- package/dist/nodes/2d/node-render.d.ts.map +0 -1
- package/dist/nodes/2d/node-render.js.map +0 -1
- package/dist/nodes/2d/node-space.d.ts.map +0 -1
- package/dist/nodes/2d/node-space.js.map +0 -1
- package/dist/nodes/2d/node-transform.d.ts.map +0 -1
- package/dist/nodes/2d/node-transform.js.map +0 -1
- package/dist/nodes/2d/node2d.d.ts.map +0 -1
- package/dist/nodes/2d/node2d.js.map +0 -1
- package/dist/nodes/2d/paint-node.d.ts +0 -115
- package/dist/nodes/2d/paint-node.d.ts.map +0 -1
- package/dist/nodes/2d/paint-node.js +0 -190
- package/dist/nodes/2d/paint-node.js.map +0 -1
- package/dist/nodes/audio/audio-bus.d.ts +0 -28
- package/dist/nodes/audio/audio-bus.d.ts.map +0 -1
- package/dist/nodes/audio/audio-bus.js +0 -33
- package/dist/nodes/audio/audio-bus.js.map +0 -1
- package/dist/nodes/audio/index.d.ts +0 -4
- package/dist/nodes/audio/index.d.ts.map +0 -1
- package/dist/nodes/audio/index.js +0 -4
- package/dist/nodes/audio/index.js.map +0 -1
- package/dist/nodes/audio/node-audio.d.ts.map +0 -1
- package/dist/nodes/audio/node-audio.js.map +0 -1
- package/dist/nodes/audio/sound-node.d.ts +0 -40
- package/dist/nodes/audio/sound-node.d.ts.map +0 -1
- package/dist/nodes/audio/sound-node.js +0 -68
- package/dist/nodes/audio/sound-node.js.map +0 -1
- package/dist/nodes/geometry/boolean-node.d.ts +0 -28
- package/dist/nodes/geometry/boolean-node.d.ts.map +0 -1
- package/dist/nodes/geometry/boolean-node.js +0 -81
- package/dist/nodes/geometry/boolean-node.js.map +0 -1
- package/dist/nodes/geometry/bounds-shape-node.d.ts +0 -149
- package/dist/nodes/geometry/bounds-shape-node.d.ts.map +0 -1
- package/dist/nodes/geometry/bounds-shape-node.js +0 -181
- package/dist/nodes/geometry/bounds-shape-node.js.map +0 -1
- package/dist/nodes/geometry/box-path-node.d.ts +0 -89
- package/dist/nodes/geometry/box-path-node.d.ts.map +0 -1
- package/dist/nodes/geometry/box-path-node.js +0 -116
- package/dist/nodes/geometry/box-path-node.js.map +0 -1
- package/dist/nodes/geometry/dot-grid-node.d.ts +0 -105
- package/dist/nodes/geometry/dot-grid-node.d.ts.map +0 -1
- package/dist/nodes/geometry/dot-grid-node.js +0 -142
- package/dist/nodes/geometry/dot-grid-node.js.map +0 -1
- package/dist/nodes/geometry/ellipse-node.d.ts +0 -18
- package/dist/nodes/geometry/ellipse-node.d.ts.map +0 -1
- package/dist/nodes/geometry/ellipse-node.js +0 -45
- package/dist/nodes/geometry/ellipse-node.js.map +0 -1
- package/dist/nodes/geometry/grid-lines.d.ts +0 -101
- package/dist/nodes/geometry/grid-lines.d.ts.map +0 -1
- package/dist/nodes/geometry/grid-lines.js +0 -128
- package/dist/nodes/geometry/grid-lines.js.map +0 -1
- package/dist/nodes/geometry/grid-pattern-node.d.ts +0 -58
- package/dist/nodes/geometry/grid-pattern-node.d.ts.map +0 -1
- package/dist/nodes/geometry/grid-pattern-node.js +0 -172
- package/dist/nodes/geometry/grid-pattern-node.js.map +0 -1
- package/dist/nodes/geometry/group-bounds.d.ts.map +0 -1
- package/dist/nodes/geometry/group-bounds.js.map +0 -1
- package/dist/nodes/geometry/line-grid-node.d.ts +0 -62
- package/dist/nodes/geometry/line-grid-node.d.ts.map +0 -1
- package/dist/nodes/geometry/line-grid-node.js +0 -127
- package/dist/nodes/geometry/line-grid-node.js.map +0 -1
- package/dist/nodes/geometry/line-node.d.ts +0 -58
- package/dist/nodes/geometry/line-node.d.ts.map +0 -1
- package/dist/nodes/geometry/line-node.js +0 -123
- package/dist/nodes/geometry/line-node.js.map +0 -1
- package/dist/nodes/geometry/mask-node.d.ts +0 -33
- package/dist/nodes/geometry/mask-node.d.ts.map +0 -1
- package/dist/nodes/geometry/mask-node.js +0 -66
- package/dist/nodes/geometry/mask-node.js.map +0 -1
- package/dist/nodes/geometry/path-node.d.ts +0 -26
- package/dist/nodes/geometry/path-node.d.ts.map +0 -1
- package/dist/nodes/geometry/path-node.js +0 -52
- package/dist/nodes/geometry/path-node.js.map +0 -1
- package/dist/nodes/geometry/polygon-node.d.ts +0 -26
- package/dist/nodes/geometry/polygon-node.d.ts.map +0 -1
- package/dist/nodes/geometry/polygon-node.js +0 -47
- package/dist/nodes/geometry/polygon-node.js.map +0 -1
- package/dist/nodes/geometry/polygram-node.d.ts +0 -33
- package/dist/nodes/geometry/polygram-node.d.ts.map +0 -1
- package/dist/nodes/geometry/polygram-node.js +0 -52
- package/dist/nodes/geometry/polygram-node.js.map +0 -1
- package/dist/nodes/geometry/rect-node.d.ts +0 -38
- package/dist/nodes/geometry/rect-node.d.ts.map +0 -1
- package/dist/nodes/geometry/rect-node.js +0 -56
- package/dist/nodes/geometry/rect-node.js.map +0 -1
- package/dist/nodes/geometry/shape-node.d.ts +0 -71
- package/dist/nodes/geometry/shape-node.d.ts.map +0 -1
- package/dist/nodes/geometry/shape-node.js +0 -140
- package/dist/nodes/geometry/shape-node.js.map +0 -1
- package/dist/nodes/geometry/shape-outline.d.ts.map +0 -1
- package/dist/nodes/geometry/shape-outline.js.map +0 -1
- package/dist/nodes/geometry/viewport-pattern-node.d.ts +0 -39
- package/dist/nodes/geometry/viewport-pattern-node.d.ts.map +0 -1
- package/dist/nodes/geometry/viewport-pattern-node.js +0 -79
- package/dist/nodes/geometry/viewport-pattern-node.js.map +0 -1
- package/dist/nodes/index.d.ts +0 -46
- package/dist/nodes/index.d.ts.map +0 -1
- package/dist/nodes/index.js +0 -54
- package/dist/nodes/index.js.map +0 -1
- package/dist/nodes/layout/camera-node.d.ts +0 -71
- package/dist/nodes/layout/camera-node.d.ts.map +0 -1
- package/dist/nodes/layout/camera-node.js +0 -118
- package/dist/nodes/layout/camera-node.js.map +0 -1
- package/dist/nodes/layout/orbit-camera-node.d.ts +0 -80
- package/dist/nodes/layout/orbit-camera-node.d.ts.map +0 -1
- package/dist/nodes/layout/orbit-camera-node.js +0 -118
- package/dist/nodes/layout/orbit-camera-node.js.map +0 -1
- package/dist/nodes/layout/rotated-box.d.ts +0 -20
- package/dist/nodes/layout/rotated-box.d.ts.map +0 -1
- package/dist/nodes/layout/rotated-box.js +0 -76
- package/dist/nodes/layout/rotated-box.js.map +0 -1
- package/dist/nodes/media/video-node.d.ts +0 -229
- package/dist/nodes/media/video-node.d.ts.map +0 -1
- package/dist/nodes/media/video-node.js +0 -348
- package/dist/nodes/media/video-node.js.map +0 -1
- package/dist/nodes/node/declare-paints.d.ts +0 -19
- package/dist/nodes/node/declare-paints.d.ts.map +0 -1
- package/dist/nodes/node/declare-paints.js +0 -27
- package/dist/nodes/node/declare-paints.js.map +0 -1
- package/dist/nodes/node/node-editor-state.d.ts.map +0 -1
- package/dist/nodes/node/node-editor-state.js.map +0 -1
- package/dist/nodes/node/node-reactive.d.ts.map +0 -1
- package/dist/nodes/node/node-reactive.js.map +0 -1
- package/dist/nodes/node/node-time.d.ts.map +0 -1
- package/dist/nodes/node/node-time.js.map +0 -1
- package/dist/nodes/node/node-walk.d.ts.map +0 -1
- package/dist/nodes/node/node-walk.js.map +0 -1
- package/dist/nodes/node/node.d.ts.map +0 -1
- package/dist/nodes/node/node.js.map +0 -1
- package/dist/nodes/node/text-defaults.d.ts.map +0 -1
- package/dist/nodes/node/text-defaults.js.map +0 -1
- package/dist/nodes/scene/canvas2d-node.d.ts.map +0 -1
- package/dist/nodes/scene/canvas2d-node.js.map +0 -1
- package/dist/nodes/scene/provider-node.d.ts +0 -47
- package/dist/nodes/scene/provider-node.d.ts.map +0 -1
- package/dist/nodes/scene/provider-node.js +0 -63
- package/dist/nodes/scene/provider-node.js.map +0 -1
- package/dist/nodes/scene/theme-provider-node.d.ts +0 -29
- package/dist/nodes/scene/theme-provider-node.d.ts.map +0 -1
- package/dist/nodes/scene/theme-provider-node.js +0 -43
- package/dist/nodes/scene/theme-provider-node.js.map +0 -1
- package/dist/nodes/text/default-text-style-node.d.ts +0 -100
- package/dist/nodes/text/default-text-style-node.d.ts.map +0 -1
- package/dist/nodes/text/default-text-style-node.js +0 -140
- package/dist/nodes/text/default-text-style-node.js.map +0 -1
- package/dist/nodes/text/number-format.d.ts.map +0 -1
- package/dist/nodes/text/number-format.js.map +0 -1
- package/dist/nodes/text/number-node.d.ts +0 -94
- package/dist/nodes/text/number-node.d.ts.map +0 -1
- package/dist/nodes/text/number-node.js +0 -86
- package/dist/nodes/text/number-node.js.map +0 -1
- package/dist/nodes/text/number-pattern.d.ts.map +0 -1
- package/dist/nodes/text/number-pattern.js.map +0 -1
- package/dist/nodes/text/richtext-node.d.ts +0 -73
- package/dist/nodes/text/richtext-node.d.ts.map +0 -1
- package/dist/nodes/text/richtext-node.js +0 -144
- package/dist/nodes/text/richtext-node.js.map +0 -1
- package/dist/nodes/text/text-base.d.ts +0 -135
- package/dist/nodes/text/text-base.d.ts.map +0 -1
- package/dist/nodes/text/text-base.js +0 -504
- package/dist/nodes/text/text-base.js.map +0 -1
- package/dist/nodes/text/text-node.d.ts +0 -84
- package/dist/nodes/text/text-node.d.ts.map +0 -1
- package/dist/nodes/text/text-node.js +0 -188
- package/dist/nodes/text/text-node.js.map +0 -1
- package/dist/nodes/text/text-selection.d.ts +0 -125
- package/dist/nodes/text/text-selection.d.ts.map +0 -1
- package/dist/nodes/text/text-selection.js +0 -209
- package/dist/nodes/text/text-selection.js.map +0 -1
- package/dist/nodes/three/camera-nodes.d.ts +0 -91
- package/dist/nodes/three/camera-nodes.d.ts.map +0 -1
- package/dist/nodes/three/camera-nodes.js +0 -71
- package/dist/nodes/three/camera-nodes.js.map +0 -1
- package/dist/nodes/three/canvas3d-node.d.ts +0 -270
- package/dist/nodes/three/canvas3d-node.d.ts.map +0 -1
- package/dist/nodes/three/canvas3d-node.js +0 -438
- package/dist/nodes/three/canvas3d-node.js.map +0 -1
- package/dist/nodes/three/drawable-nodes.d.ts +0 -159
- package/dist/nodes/three/drawable-nodes.d.ts.map +0 -1
- package/dist/nodes/three/drawable-nodes.js +0 -254
- package/dist/nodes/three/drawable-nodes.js.map +0 -1
- package/dist/nodes/three/environment-nodes.d.ts +0 -100
- package/dist/nodes/three/environment-nodes.d.ts.map +0 -1
- package/dist/nodes/three/environment-nodes.js +0 -134
- package/dist/nodes/three/environment-nodes.js.map +0 -1
- package/dist/nodes/three/geometry-nodes.d.ts +0 -197
- package/dist/nodes/three/geometry-nodes.d.ts.map +0 -1
- package/dist/nodes/three/geometry-nodes.js +0 -322
- package/dist/nodes/three/geometry-nodes.js.map +0 -1
- package/dist/nodes/three/grid-geometry3d.d.ts.map +0 -1
- package/dist/nodes/three/grid-geometry3d.js.map +0 -1
- package/dist/nodes/three/group3d.d.ts +0 -23
- package/dist/nodes/three/group3d.d.ts.map +0 -1
- package/dist/nodes/three/group3d.js +0 -21
- package/dist/nodes/three/group3d.js.map +0 -1
- package/dist/nodes/three/light-nodes.d.ts +0 -120
- package/dist/nodes/three/light-nodes.d.ts.map +0 -1
- package/dist/nodes/three/light-nodes.js +0 -173
- package/dist/nodes/three/light-nodes.js.map +0 -1
- package/dist/nodes/three/mesh3d.d.ts +0 -117
- package/dist/nodes/three/mesh3d.d.ts.map +0 -1
- package/dist/nodes/three/mesh3d.js +0 -147
- package/dist/nodes/three/mesh3d.js.map +0 -1
- package/dist/nodes/three/node3d.d.ts.map +0 -1
- package/dist/nodes/three/node3d.js.map +0 -1
- package/dist/render/descriptors/latex.d.ts +0 -6
- package/dist/render/descriptors/latex.d.ts.map +0 -1
- package/dist/render/descriptors/latex.js +0 -2
- package/dist/render/descriptors/latex.js.map +0 -1
- package/dist/tween/seekable.d.ts +0 -70
- package/dist/tween/seekable.d.ts.map +0 -1
- package/dist/tween/seekable.js +0 -122
- package/dist/tween/seekable.js.map +0 -1
- /package/dist/{nodes → components/builtins}/text/number-pattern.d.ts +0 -0
- /package/dist/{nodes → components/builtins}/text/number-pattern.js +0 -0
- /package/dist/{nodes → components/trees}/node/node-editor-state.d.ts +0 -0
- /package/dist/{nodes → components/trees}/node/node-editor-state.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/components/factory/api.ts"],"names":[],"mappings":"AA+QA,MAAM,UAAU,QAAQ,CAAI,OAAmB,EAAE,KAAQ;IACrD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AAC9B,CAAC","sourcesContent":["/** The types of the component factories. */\nimport type { Alignment } from \"@/attributes/layout/alignment\";\nimport type { InsetsProps, InsetsResolved } from \"@/attributes/layout/insets\";\nimport type { Size2D, SizeInput } from \"@/attributes/layout/size\";\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\nimport type { Effect } from \"@/attributes/shape/effects/chain\";\nimport type { NodeEffect } from \"@/attributes/shape/effects/union\";\nimport type { NodeBlendMode } from \"@/attributes/shape/fill/blend\";\nimport type { BoxBounds } from \"@/layout/bounds\";\nimport type { PropInputs } from \"@/attributes/properties/inputs\";\nimport type { CameraScope, ChildPlane, Node2D, Node2DProps } from \"@/components/trees/2d/node2d\";\nimport type { Node } from \"@/components/trees/node/node\";\nimport type { SpaceCamera } from \"@/attributes/layout/space3d\";\nimport type { TextStyle } from \"@/attributes/text/types\";\nimport type { AudioEffectsInput } from \"@/attributes/audio/effects/chain\";\nimport type { Param } from \"@/attributes/audio/ramp\";\nimport type { AudioTransition } from \"@/attributes/audio/transition\";\nimport type { AudioEffect } from \"@/attributes/audio/effects/union\";\nimport type { Context } from \"@/util/context\";\nimport type { RefTarget } from \"@/util/reference\";\nimport type { Command } from \"@/tween/command\";\nimport type { Graphics2D } from \"@/render/graphics2d\";\nimport type { BooleanOperation } from \"@/attributes/mask/boolean\";\nimport type { MaskOptions } from \"@/attributes/mask/mask\";\nimport type { FillResolved } from \"@/attributes/shape/fill/union\";\nimport type { ShadowResolved } from \"@/attributes/shape/shadow/shadow\";\nimport type { StrokeResolved } from \"@/attributes/shape/stroke/stroke\";\nimport type { EasingFunction } from \"@/tween/ease/type\";\nimport type { TypeDef } from \"@/components/factory/type-def\";\nimport type { Color } from \"@/attributes/shape/fill/color/parser\";\nimport type { ChildSpace3D, Node3D } from \"@/components/trees/three/node3d\";\nimport type { CameraData3D } from \"@/render3d/camera\";\nimport type { Graphics3D } from \"@/render3d/graphics3d\";\nimport type { Scene3D } from \"@/render3d/scene3d\";\nimport type { LightData3D } from \"@/render3d/light\";\nimport type { EnvironmentData3D, FogData3D } from \"@/render3d/scene-settings\";\nimport type { Shadow3D, Transform3D } from \"@/render3d/transform\";\nimport type { Euler3, EulerOrder, Quaternion, Vector3, Vector3Input } from \"@/render3d/vector3\";\n\n// =============================================================\n// State entries\n// =============================================================\n\ndeclare const typeBrand: unique symbol;\n\n/** A state entry's whole definition: what it accepts, what it resolves to, whether it is private. */\nexport interface Type<In, Out = In, Private extends boolean = false> {\n readonly [typeBrand]?: { readonly in: In; readonly out: Out; readonly private: Private };\n /** @internal The runtime half: default, mapper, tween, meaning. */\n readonly _def: TypeDef;\n}\n\nexport type AnyType = Type<any, any, boolean>;\n/** What a `state` field may hold: a Type, or a plain number, string or boolean default. */\nexport type Entry = AnyType | number | string | boolean;\nexport type StateSpec = { readonly [key: string]: Entry };\n\ntype TypeOf<E> =\n E extends AnyType ? E\n : E extends number ? Type<number>\n : E extends string ? Type<string>\n : E extends boolean ? Type<boolean>\n : never;\nexport type InOf<E> = TypeOf<E> extends Type<infer I, any, any> ? I : never;\nexport type OutOf<E> = TypeOf<E> extends Type<any, infer O, any> ? O : never;\ntype IsPrivate<E> = TypeOf<E> extends Type<any, any, infer P> ? P : false;\ntype IsReadOnly<E> = [InOf<E>] extends [never] ? true : false;\n\n/** The resolved, typed values a field reads. */\nexport type Values<S> = { readonly [K in keyof S]: OutOf<S[K]> };\n/** What a call or document may set: public entries, loose form, or a binding. */\nexport type Inputs<S> = {\n [K in keyof S as IsPrivate<S[K]> extends true ? never : IsReadOnly<S[K]> extends true ? never : K]?:\n InOf<S[K]> | (() => InOf<S[K]>);\n};\n/** What a command may write: any entry, public or private, loose form. */\nexport type Writes<S> = {\n [K in keyof S as IsReadOnly<S[K]> extends true ? never : K]?: InOf<S[K]>;\n};\n\n// =============================================================\n// Built-in 2D placement\n// =============================================================\n\nexport interface Box2DState {\n readonly x: Type<number>;\n readonly y: Type<number>;\n readonly width: Type<SizeInput>;\n readonly height: Type<SizeInput>;\n readonly rotation: Type<number>;\n readonly scale: Type<number>;\n readonly opacity: Type<number>;\n readonly pivot: Type<Alignment, Vector2>;\n readonly padding: Type<InsetsProps, InsetsResolved>;\n readonly effects: Type<Effect, NodeEffect[]>;\n readonly blend: Type<NodeBlendMode>;\n readonly clip: Type<boolean>;\n readonly flex: Type<number>;\n readonly rotationX: Type<number>;\n readonly rotationY: Type<number>;\n readonly depth: Type<number>;\n readonly perspective: Type<number>;\n}\n\n/** What every audio component has: its level, its place in the stereo field, and its own effects. */\nexport interface BoxAudioState {\n readonly volume: Type<Param>;\n readonly pan: Type<Param>;\n readonly mute: Type<boolean>;\n readonly effects: Type<AudioEffectsInput, AudioEffect[]>;\n readonly transitionIn: Type<AudioTransition | undefined>;\n readonly transitionOut: Type<AudioTransition | undefined>;\n}\n\ntype BuiltIn2DCommand = \"moveTo\" | \"fadeTo\" | \"rotateTo\" | \"scaleTo\" | \"layoutTo\" | \"effectTo\" | \"pulse\" | \"wiggle\" | \"to\" | \"set\";\n\ntype Merge<P, S> = Omit<P, keyof S> & S;\n\n// =============================================================\n// Elements, components and child views\n// =============================================================\n\ndeclare const elementBrand: unique symbol;\n\n/** What calling a component returns. In this slice, the built node itself. */\nexport interface Element<out K extends string = string, out S = unknown, out C = unknown> {\n readonly [elementBrand]?: { readonly key: K; readonly state: S; readonly commands: C };\n}\n\ntype AnyComponent = Component<string, any, any, any, any, any>;\n/** A whole tree, in `allowedChildren`: any component of it. */\ntype TreeName = \"2d\" | \"3d\" | \"audio\";\ntype Allowed = readonly (AnyComponent | TreeName)[] | null;\n\ntype ElementOf<A> =\n A extends null | undefined ? Element<string, Box2DState, {}>\n : A extends readonly [] ? never\n : A extends readonly (infer M)[] ? (M extends Component<infer K, infer S, infer C, any, any, any> ? Element<K, S, C> : M extends TreeName ? Element : never)\n : never;\n\n/** Any node, in the nested and falsy forms a class's `children` took: what a component allowing whole trees accepts. */\ntype ChildrenOfTrees = Element | Node | false | null | undefined | readonly ChildrenOfTrees[];\n\n/** Any 2D node, in the nested and falsy forms a class's `children` took: what a component allowing anything accepts. */\nexport type Children2D = Element | Node2D | false | null | undefined | readonly Children2D[];\n\ntype ChildrenProp<A> = [ElementOf<A>] extends [never]\n ? { readonly children?: never }\n : A extends null | undefined ? { readonly children?: Children2D }\n : A extends readonly TreeName[] ? { readonly children?: ChildrenOfTrees }\n : { readonly children?: readonly ElementOf<A>[] };\n\n/** Built-in placement a 2D node takes beyond its entries: alignment keys (`center`, `topLeft`…), `transform3D`, `flex`. */\ntype Placement2DProps<S> = PropInputs<Omit<Node2DProps, keyof S | \"children\">>;\n\n/**\n * What every call takes beside its entries: an id, a document key, and a\n * `ref` the node `R` is handed to while it is built, before its props apply.\n * A ref of a supertype of `R` is taken too (see {@link RefTarget}).\n */\ninterface CallMetadata<R> {\n readonly id?: string;\n readonly key?: string;\n readonly ref?: RefTarget<R>;\n}\n\nexport type CallProps<S, A, R = Node2D> = Inputs<S> & Placement2DProps<S> & ChildrenProp<A> & CallMetadata<R>;\n\n/** The node class generated from a spec: what a registry or an engine is handed. */\nexport type NodeClass<S, A, N extends Node = Node2D, P = CallProps<S, A>> = new (props?: P) => N;\n\n/** What a component of a non-2D tree is called with: its entries, children of its tree, an id. */\nexport type TreeCallProps<S, R = Node> = Inputs<S> & CallMetadata<R> & {\n readonly children?: readonly (Element | Node)[];\n};\n\n/** The node a component of state `S` and commands `C` builds on `N`: what `new` returns and a `ref` is handed. */\nexport type BuiltNode<S, C, N extends Node = Node2D> = NodeValues<S, N> & CommandMethods<C, N>;\n\nexport interface Component<K extends string, S, C, A, N extends Node = Node2D, P = CallProps<S, A, BuiltNode<S, C, N>>> {\n (props?: P): Element<K, S, C>;\n /** Builds the same node as a call, typed as the node: for engine code written against a class. */\n new (props?: P): BuiltNode<S, C, N>;\n readonly key: K;\n /** The generated node class: hand it to an engine (`nodes: [Gauge.node]`) or a registry. */\n readonly node: NodeClass<S, A, N, P>;\n /** Narrows a child view: `children.filter(BarSeries.is)`. */\n is(child: ChildView<any>): child is ChildView<Element<K, S, C>>;\n}\n\n/**\n * The node a component builds, as engine code and tests holding one see it: the\n * node, and each entry's resolved value. Authoring code works with `Element`.\n */\nexport type NodeOf<C> = C extends Component<any, infer S, infer M, any, infer N, any> ? BuiltNode<S, M, N> : never;\n/** A command, called on the node as a class's `command` method is. */\nexport type CommandMethods<C, N extends Node = Node2D> = {\n [K in Exclude<keyof C, keyof N>]: (args?: { readonly data?: unknown; readonly duration?: number; readonly easing?: EasingFunction }) => Command<Record<string, unknown>>;\n};\nexport type NodeValues<S, N extends Node = Node2D> =\n (N extends Node2D ? Node2D<Node2DProps & EntryProps<S>> : N) & { -readonly [E in Exclude<keyof S, keyof N>]: OutOf<S[E]> };\n/** Each entry's loose form, as `set` and `to` take it. */\ntype EntryProps<S> = { [E in Exclude<keyof S, keyof Node2DProps>]: InOf<S[E]> };\n\ntype StateOfElement<E> = E extends Element<any, infer S, any> ? S : never;\ntype CommandsOfElement<E> = E extends Element<any, any, infer C>\n ? unknown extends C ? string : (keyof C & string) | BuiltIn2DCommand\n : never;\n\n/** A child, as a parent's fields see it. */\nexport interface ChildView<out E extends Element = Element> {\n readonly id: string;\n readonly key: E extends Element<infer K> ? K : string;\n readonly state: Values<StateOfElement<E>>;\n /** Its size, measured against the room this pass gives it; outside a pass (in a command), the size it was last laid out at. */\n readonly size: Size2D;\n /** Its own children, as it hands them to its fields: how a command reaches parts nested inside a child. */\n readonly children: readonly ChildView[];\n measure(max: Max): Size2D;\n to(targets: Writes<StateOfElement<E>>): Piece;\n run(name: CommandsOfElement<E>, args?: object): Piece;\n}\n\n// =============================================================\n// What the engine hands each field\n// =============================================================\n\nexport interface Max {\n readonly width?: number;\n readonly height?: number;\n}\n\nexport interface FontSpec {\n readonly fontFamily: string;\n readonly fontSize: number;\n readonly fontWeight?: number;\n readonly letterSpacing?: number;\n}\n\nexport interface Measurer {\n readonly max: Max;\n /** The node's clock: a size that changes with time (a spin, a flow) reads it here. */\n readonly time: Clock;\n text(text: string, font: FontSpec): Size2D;\n}\n\nexport interface Clock {\n readonly total: number;\n readonly elapsed: number;\n}\n\n/** What `load` declares: everything that must be in before the node is measured or drawn. */\nexport interface Loader {\n font(family: string, weight?: number | string): void;\n image(src: string): void;\n video(src: string, trim?: { readonly start?: number; readonly end?: number }): void;\n /**\n * Async setup. `before: \"layout\"` holds measuring too (a font engine, MathJax); the default holds only the frame.\n * A function `load` resolves to frees what it loaded when the asset's window is evicted.\n */\n task(key: string, load: () => Promise<unknown>, options?: { readonly before?: \"layout\" | \"render\" }): void;\n /** A paint the component works out itself (a run's fill); paint entries load themselves. */\n fill(fills: FillResolved | readonly FillResolved[]): void;\n}\n\n/** A value a component hands its subtree under a context, which `Types.*({ inherit })` entries read. */\nexport interface Provided<T = unknown> {\n readonly context: Context<T>;\n readonly value: T;\n}\n\nexport function provides<T>(context: Context<T>, value: T): Provided<T> {\n return { context, value };\n}\n\nexport interface RenderContext2D {\n readonly size: Size2D;\n readonly time: Clock;\n draw(graphics: Graphics2D | readonly Graphics2D[] | null | undefined): void;\n /** Draws your children here. */\n children(): void;\n /** Your first child is the stencil; the rest draw through it. */\n mask(options: MaskOptions): void;\n /** Your children become one shape by `op`, painted with `paint`. */\n merge(op: BooleanOperation, paint: MergePaint): void;\n /** Your children through a camera viewing your box. */\n camera(scope: CameraScope): void;\n /** Your children standing in one 2.5D space seen by `camera`, drawn far to near. */\n space(camera: SpaceCamera): void;\n /**\n * Your 3D children rendered into a new scene, for a fill (`Fills.canvas3D`) or\n * more drawing. Picking projects through the same scene.\n */\n scene3D(): Scene3D;\n /** Run `body` with `style` the default for text drawn in it; `null` refuses the inherited style. */\n textStyle(style: TextStyle | null, body: () => void): void;\n /** Run `body` with what it draws confined to `shape`'s outline. */\n clip(shape: Graphics2D, body: () => void): void;\n /**\n * Run `body` as your own paint: standing in a 2.5D space, only what lies in\n * front of the lens shows, as a class's own paint does. `Paint.draw` does this\n * for the paint it draws; a component drawing with `draw` wraps it here.\n */\n inFront(body: () => void): void;\n /** Whether an ancestor already stands you in a 2.5D space, so a space of your own would nest in it. */\n readonly inSpace: boolean;\n /** Your nearest ancestor that `component` built, read-only, or `null` when none is above you. */\n ancestor<K extends string, S, C>(component: Component<K, S, C, any, any, any>): NodeView<Element<K, S, C>> | null;\n}\n\n/** Another node as a component reads it: its id, its resolved state and the size it was laid out at. */\nexport interface NodeView<out E extends Element = Element> {\n readonly id: string;\n readonly key: E extends Element<infer K> ? K : string;\n /** As its own fields read it: a reference entry of its own is a view of that node from where it stands. */\n readonly state: Values<StateOfElement<E>>;\n readonly size: Size2D;\n /** Where it stands in the reader's own frame (y up from the reader's centre): offset, turn and scale. */\n readonly frame: NodeFrame;\n}\n\nexport interface NodeFrame {\n readonly x: number;\n readonly y: number;\n readonly rotation: number;\n readonly scale: number;\n}\n\n/** What a merged shape is painted with: a shape's resolved paint entries. */\nexport interface MergePaint {\n readonly fill: FillResolved[];\n readonly stroke: StrokeResolved[];\n readonly shadow: ShadowResolved[];\n readonly overlay?: FillResolved[];\n}\n\n/** Where a 2D child goes: a box centred on (x, y) from your centre, y up, plus an optional slot transform. */\nexport interface Placement2D {\n readonly x: number;\n readonly y: number;\n readonly width: number;\n readonly height: number;\n readonly rotation?: number;\n readonly scale?: number;\n readonly opacity?: number;\n readonly depth?: number;\n readonly rotationX?: number;\n readonly rotationY?: number;\n /** What the child's own `x`/`y` mean in your units (a graph's): read wherever its position is, by paint, picking and a host's drag. */\n readonly plane?: ChildPlane;\n}\n\n/** Your content box, as `layout` is handed it, and the node's clock for a layout that moves with time. */\nexport interface LayoutBox extends BoxBounds {\n readonly time: Clock;\n}\n\n/** A point an editor can drag to set an entry: where it sits in your frame (y up from your centre), and the value dropping it there gives. */\nexport interface Handle<V> {\n at(state: V, size: Size2D): Vector2 | null;\n /** Where it was dropped, as the entry's value; by default the point itself. */\n value?(at: Vector2, state: V, size: Size2D): Vector2;\n}\n\n// =============================================================\n// Commands\n// =============================================================\n\ndeclare const pieceBrand: unique symbol;\n/** A timed piece of a command. */\nexport interface Piece {\n readonly [pieceBrand]?: true;\n /** @internal */\n readonly _piece: PieceData;\n}\n\n/** @internal */\nexport type PieceData =\n | { readonly kind: \"tween\"; readonly targets: Record<string, unknown> }\n | { readonly kind: \"animate\"; readonly frame: (t: number) => Record<string, unknown>; readonly eased: boolean }\n | { readonly kind: \"wait\"; readonly seconds: number }\n | { readonly kind: \"sound\"; readonly src: string; readonly options: SoundOptions }\n | { readonly kind: \"together\" | \"sequence\"; readonly pieces: readonly Piece[] }\n | { readonly kind: \"stagger\"; readonly pieces: readonly Piece[]; readonly overlap: number }\n | { readonly kind: \"child\"; readonly node: object; readonly targets: Record<string, unknown> }\n | { readonly kind: \"run\"; readonly node: object; readonly name: string; readonly args: object | undefined };\n\n/** How a sound plays: today's `AudioClip` fields, and the bus it feeds when its node isn't one. */\nexport interface SoundOptions {\n readonly trimStart?: number;\n readonly trimEnd?: number;\n readonly loop?: boolean;\n readonly volume?: Param;\n readonly speed?: Param;\n readonly effects?: AudioEffectsInput;\n readonly transitionIn?: AudioTransition;\n readonly transitionOut?: AudioTransition;\n /** Missing from the catalog, it is skipped rather than an error. */\n readonly optional?: boolean;\n /** The id of the bus it feeds. A sound node feeds the buses it sits in. */\n readonly bus?: string;\n /** Ends with its source rather than staying open: a picture's sound, which stops when the picture does. */\n readonly closed?: boolean;\n}\n\nexport interface Timeline<A = {}, S = {}> {\n readonly args: A;\n readonly duration: number;\n readonly easing: EasingFunction | undefined;\n /** The node this command acts on, read-only: its id (a seed), its size. */\n readonly node: NodeView;\n tween(targets: Writes<S>): Piece;\n /** `frame` at each point of the command; `eased: false` hands it linear progress, to ease per part with `ease`. */\n animate(frame: (t: number) => Writes<S>, options?: { readonly eased?: boolean }): Piece;\n /** The command's easing at `t`. */\n ease(t: number): number;\n /** `src` plays from here: cut when the command ends, or to its own end when the command has no length. */\n sound(src: string, options?: SoundOptions): Piece;\n wait(seconds: number): Piece;\n together(pieces: readonly Piece[]): Piece;\n sequence(pieces: readonly Piece[]): Piece;\n stagger(pieces: readonly Piece[], options?: { readonly overlap?: number }): Piece;\n}\n\ntype Kids = readonly ChildView<any>[];\n\nexport type CommandEntry<A, S, V, K> =\n // The names as written, so a module's command fits any state holding those entries.\n | (A extends readonly unknown[] ? { readonly args: A & readonly (keyof Writes<S> & string)[]; readonly run?: undefined; readonly easing?: EasingFunction; readonly entrance?: boolean } : never)\n | ((timeline: Timeline<{}, S>, state: V, children: K) => Piece)\n // `easing`: what the command eases by when its row gives none. `entrance`:\n // the timeline holds its first frame ahead of it (`CommandMeta.entrance`).\n | (A extends readonly unknown[] ? never : { readonly args: A; run(timeline: Timeline<Values<A>, S>, state: V, children: K): Piece; readonly easing?: EasingFunction; readonly entrance?: boolean });\n\nexport type CommandsSpec<C, S, V, K> = { [N in keyof C]: CommandEntry<C[N], S, V, K> };\n\n// =============================================================\n// The 2D factory's fields\n// =============================================================\n\nexport type FieldState<All, A> = Values<All> & { readonly children: readonly ChildView<ElementOf<A>>[] };\nexport type BuilderState<All, A> = Values<All> & { readonly children: readonly ElementOf<A>[] };\ntype OwnKids<A, B> = readonly ChildView<[B] extends [never] ? ElementOf<A> : Extract<B, Element>>[];\n\n/**\n * New defaults for entries, own or built in. A function is a binding: handed the\n * live state, and `given`, what the call or document row set when the node was\n * built (which never changes), for a default derived from those.\n */\nexport type Defaults<All, A> = {\n readonly [E in keyof All]?: InOf<All[E]> | ((state: FieldState<All, A>, given: Readonly<Record<string, unknown>>) => InOf<All[E]>);\n};\n\nexport interface Spec2D<K extends string, All, S, C, A, B> {\n readonly key: K;\n readonly state?: S;\n readonly defaults?: Defaults<All, A>;\n /** Old prop keys a stored row may still carry → the entry each became. */\n readonly renamed?: Readonly<Record<string, string>>;\n /** Entries that still work but should no longer be set: why, and what to use instead. */\n readonly deprecated?: Readonly<Record<string, string>>;\n /** Value hooks by entry, or by an old key in `renamed` to convert only what was stored under it (`migrateNodeProps`). */\n readonly migrate?: Readonly<Record<string, (value: unknown) => unknown>>;\n readonly allowedChildren?: A;\n /** The components it goes only inside; unsaid, wherever its tree allows. A row elsewhere fails its build. */\n readonly allowedParents?: readonly AnyComponent[];\n readonly children?: (state: BuilderState<All, A>) => readonly B[];\n readonly commands?: CommandsSpec<C, All, FieldState<All, A>, OwnKids<A, B>>;\n readonly load?: (loader: Loader, state: FieldState<All, A>) => void;\n /** What the subtree inherits: the nearest provider's value for each context, `inherited` reading what's above. */\n readonly provide?: (state: FieldState<All, A>, inherited: <T>(context: Context<T>) => T) => readonly Provided[];\n readonly measure?: (measurer: Measurer, state: FieldState<All, A>, children: OwnKids<A, B>) => Size2D;\n readonly layout?: (box: LayoutBox, state: FieldState<All, A>, children: OwnKids<A, B>) => readonly Placement2D[];\n /** What a child not added yet would take its `x`/`y` in: where a host drops or pastes one. Layout's `plane` answers for the rest. */\n readonly plane?: (box: LayoutBox, state: FieldState<All, A>) => ChildPlane | null;\n /** Points an editor can drag, by the entry each sets. */\n readonly handles?: { readonly [entry: string]: Handle<FieldState<All, A>> };\n /** Your bounds when they are not your box (a mark's ink): what selection and picking take. */\n readonly bounds?: (size: Size2D, state: FieldState<All, A>) => BoxBounds;\n readonly render?: (ctx: RenderContext2D, state: FieldState<All, A>) => void;\n /** The coordinates your 3D children's `x`, `y`, `z` are in (a graph's units), for a viewport over them. */\n readonly space?: (state: FieldState<All, A>) => ChildSpace3D | null;\n}\n\n/** A sound, or a bus mixing what is in it. It has no box and draws nothing: sound comes from its commands. */\nexport interface SpecAudio<K extends string, All, S, C, A, B> {\n readonly key: K;\n readonly state?: S;\n readonly defaults?: Defaults<All, A>;\n /** Old prop keys a stored row may still carry → the entry each became. */\n readonly renamed?: Readonly<Record<string, string>>;\n /** Entries that still work but should no longer be set: why, and what to use instead. */\n readonly deprecated?: Readonly<Record<string, string>>;\n /** Value hooks by entry, or by an old key in `renamed` to convert only what was stored under it (`migrateNodeProps`). */\n readonly migrate?: Readonly<Record<string, (value: unknown) => unknown>>;\n readonly allowedChildren?: A;\n /** The components it goes only inside; unsaid, wherever its tree allows. A row elsewhere fails its build. */\n readonly allowedParents?: readonly AnyComponent[];\n readonly children?: (state: BuilderState<All, A>) => readonly B[];\n readonly commands?: CommandsSpec<C, All, FieldState<All, A>, Kids>;\n readonly load?: (loader: Loader, state: FieldState<All, A>) => void;\n readonly provide?: (state: FieldState<All, A>, inherited: <T>(context: Context<T>) => T) => readonly Provided[];\n}\n\n// =============================================================\n// The 3D tree\n// =============================================================\n\n/** What every 3D component has: its place, turn and scale, and how the scene shows it. */\nexport interface Transform3DState {\n readonly x: Type<number>;\n readonly y: Type<number>;\n readonly z: Type<number>;\n readonly rotationX: Type<number>;\n readonly rotationY: Type<number>;\n readonly rotationZ: Type<number>;\n readonly rotationOrder: Type<EulerOrder>;\n readonly quaternion: Type<Quaternion>;\n readonly scaleX: Type<number>;\n readonly scaleY: Type<number>;\n readonly scaleZ: Type<number>;\n readonly lookAt: Type<Vector3Input | undefined, Vector3 | undefined>;\n readonly visible: Type<boolean>;\n readonly shadow: Type<Shadow3D>;\n readonly renderOrder: Type<number>;\n}\n\n/** A 3D call's vector forms of the axes: `position: [x, y, z]`, `rotation`, `scale` (one number scales all three). */\nexport interface Placement3DProps {\n readonly position?: Vector3Input | (() => Vector3Input);\n readonly rotation?: Vector3Input | Euler3 | (() => Vector3Input | Euler3);\n readonly scale?: Vector3Input | (() => Vector3Input);\n}\n\nexport type CallProps3D<S, R = Node3D> = TreeCallProps<S, R> & Placement3DProps;\n\n/** What a 3D `render` draws into: today's scene calls, with a camera standing where its node stands. */\nexport interface RenderContext3D {\n readonly time: Clock;\n /**\n * `render` runs only so what it draws loads, and nothing is shown: only the\n * materials, models and environment count, so geometry built from data may be skipped.\n */\n readonly declaring: boolean;\n draw(graphics: Graphics3D | null | undefined): void;\n light(light: LightData3D, transform?: Transform3D): void;\n /** The scene's camera, placed by this node's transform. A node that stands one is no group: its children stay in its parent's space. */\n camera(camera: CameraData3D): void;\n fog(fog: FogData3D | Color | null): void;\n environment(environment: EnvironmentData3D | null): void;\n}\n\nexport interface Spec3D<K extends string, All, S, C, A, B> {\n readonly key: K;\n readonly state?: S;\n readonly defaults?: Defaults<All, A>;\n /** Old prop keys a stored row may still carry → the entry each became. */\n readonly renamed?: Readonly<Record<string, string>>;\n /** Entries that still work but should no longer be set: why, and what to use instead. */\n readonly deprecated?: Readonly<Record<string, string>>;\n /** Value hooks by entry, or by an old key in `renamed` to convert only what was stored under it (`migrateNodeProps`). */\n readonly migrate?: Readonly<Record<string, (value: unknown) => unknown>>;\n readonly allowedChildren?: A;\n /** The components it goes only inside; unsaid, wherever its tree allows. A row elsewhere fails its build. */\n readonly allowedParents?: readonly AnyComponent[];\n readonly children?: (state: BuilderState<All, A>) => readonly B[];\n readonly commands?: CommandsSpec<C, All, FieldState<All, A>, Kids>;\n readonly load?: (loader: Loader, state: FieldState<All, A>) => void;\n readonly provide?: (state: FieldState<All, A>, inherited: <T>(context: Context<T>) => T) => readonly Provided[];\n readonly render?: (ctx: RenderContext3D, state: FieldState<All, A>) => void;\n /** The coordinates your 3D children's `x`, `y`, `z` are in (a graph's units): where each lands in yours. */\n readonly space?: (state: FieldState<All, A>) => ChildSpace3D | null;\n}\n\nexport type { Merge, Kids, Allowed, AnyComponent };\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Clip } from "../../render/clip.js";
|
|
2
|
+
import type { Graphics2D } from "../../render/graphics2d.js";
|
|
3
|
+
/** The outline a shape's ops describe, as a clip: what `clip: true` cuts children to and picking tests against. */
|
|
4
|
+
export declare function clipOf(shape: Graphics2D): Clip;
|
|
5
|
+
//# sourceMappingURL=clip-of.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clip-of.d.ts","sourceRoot":"","sources":["../../../src/components/factory/clip-of.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,mHAAmH;AACnH,wBAAgB,MAAM,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAe9C"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Clip } from "../../render/clip.js";
|
|
2
|
+
/** The outline a shape's ops describe, as a clip: what `clip: true` cuts children to and picking tests against. */
|
|
3
|
+
export function clipOf(shape) {
|
|
4
|
+
const clip = new Clip();
|
|
5
|
+
for (const op of shape.ops()) {
|
|
6
|
+
switch (op.kind) {
|
|
7
|
+
case "rect":
|
|
8
|
+
clip.rect(op.state);
|
|
9
|
+
break;
|
|
10
|
+
case "ellipse":
|
|
11
|
+
clip.ellipse(op.state);
|
|
12
|
+
break;
|
|
13
|
+
case "path":
|
|
14
|
+
clip.path(op.state);
|
|
15
|
+
break;
|
|
16
|
+
case "line":
|
|
17
|
+
clip.line(op.state);
|
|
18
|
+
break;
|
|
19
|
+
case "polygon":
|
|
20
|
+
clip.polygon(op.state);
|
|
21
|
+
break;
|
|
22
|
+
case "polygram":
|
|
23
|
+
clip.polygram(op.state);
|
|
24
|
+
break;
|
|
25
|
+
case "cut":
|
|
26
|
+
clip.cut();
|
|
27
|
+
break;
|
|
28
|
+
default: break;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return clip;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=clip-of.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clip-of.js","sourceRoot":"","sources":["../../../src/components/factory/clip-of.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAGrC,mHAAmH;AACnH,MAAM,UAAU,MAAM,CAAC,KAAiB;IACpC,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IACxB,KAAK,MAAM,EAAE,IAAI,KAAK,CAAC,GAAG,EAAE,EAAE,CAAC;QAC3B,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC;YACd,KAAK,MAAM;gBAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;gBAAC,MAAM;YACxC,KAAK,SAAS;gBAAE,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;gBAAC,MAAM;YAC9C,KAAK,MAAM;gBAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;gBAAC,MAAM;YACxC,KAAK,MAAM;gBAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;gBAAC,MAAM;YACxC,KAAK,SAAS;gBAAE,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;gBAAC,MAAM;YAC9C,KAAK,UAAU;gBAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;gBAAC,MAAM;YAChD,KAAK,KAAK;gBAAE,IAAI,CAAC,GAAG,EAAE,CAAC;gBAAC,MAAM;YAC9B,OAAO,CAAC,CAAC,MAAM;QACnB,CAAC;IACL,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC","sourcesContent":["import { Clip } from \"@/render/clip\";\nimport type { Graphics2D } from \"@/render/graphics2d\";\n\n/** The outline a shape's ops describe, as a clip: what `clip: true` cuts children to and picking tests against. */\nexport function clipOf(shape: Graphics2D): Clip {\n const clip = new Clip();\n for (const op of shape.ops()) {\n switch (op.kind) {\n case \"rect\": clip.rect(op.state); break;\n case \"ellipse\": clip.ellipse(op.state); break;\n case \"path\": clip.path(op.state); break;\n case \"line\": clip.line(op.state); break;\n case \"polygon\": clip.polygon(op.state); break;\n case \"polygram\": clip.polygram(op.state); break;\n case \"cut\": clip.cut(); break;\n default: break;\n }\n }\n return clip;\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { CommandsSpec, Kids, Piece, StateSpec, Values } from "../../components/factory/api.js";
|
|
2
|
+
/**
|
|
3
|
+
* A command as a module exports it: checked against the module's own state
|
|
4
|
+
* where it is written, then loose about the state it is run with, so it fits
|
|
5
|
+
* any component that spreads the module's state in.
|
|
6
|
+
*/
|
|
7
|
+
type Portable<A> = A extends readonly unknown[] ? {
|
|
8
|
+
readonly args: A;
|
|
9
|
+
readonly run?: undefined;
|
|
10
|
+
} : unknown extends A ? (timeline: any, state: any, children: any) => Piece : {
|
|
11
|
+
readonly args: A;
|
|
12
|
+
run(timeline: any, state: any, children: any): Piece;
|
|
13
|
+
};
|
|
14
|
+
/** A module's commands, typed against the state it exports. */
|
|
15
|
+
export declare function commandsFor<const S extends StateSpec, const C>(state: S, commands: CommandsSpec<C, S, Values<S>, Kids>): {
|
|
16
|
+
readonly [N in keyof C]: Portable<C[N]>;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=commands-for.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands-for.d.ts","sourceRoot":"","sources":["../../../src/components/factory/commands-for.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAE7F;;;;GAIG;AACH,KAAK,QAAQ,CAAC,CAAC,IACX,CAAC,SAAS,SAAS,OAAO,EAAE,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,SAAS,CAAA;CAAE,GAC3E,OAAO,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,KAAK,KAAK,GACvE;IAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,GAAG,KAAK,CAAA;CAAE,CAAC;AAEjF,+DAA+D;AAC/D,wBAAgB,WAAW,CAAC,KAAK,CAAC,CAAC,SAAS,SAAS,EAAE,KAAK,CAAC,CAAC,EAC1D,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAC9C;IAAE,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAE7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands-for.js","sourceRoot":"","sources":["../../../src/components/factory/commands-for.ts"],"names":[],"mappings":"AAYA,+DAA+D;AAC/D,MAAM,UAAU,WAAW,CACvB,KAAQ,EACR,QAA6C;IAE7C,OAAO,QAAiB,CAAC;AAC7B,CAAC","sourcesContent":["import type { CommandsSpec, Kids, Piece, StateSpec, Values } from \"@/components/factory/api\";\n\n/**\n * A command as a module exports it: checked against the module's own state\n * where it is written, then loose about the state it is run with, so it fits\n * any component that spreads the module's state in.\n */\ntype Portable<A> =\n A extends readonly unknown[] ? { readonly args: A; readonly run?: undefined }\n : unknown extends A ? (timeline: any, state: any, children: any) => Piece\n : { readonly args: A; run(timeline: any, state: any, children: any): Piece };\n\n/** A module's commands, typed against the state it exports. */\nexport function commandsFor<const S extends StateSpec, const C>(\n state: S,\n commands: CommandsSpec<C, S, Values<S>, Kids>,\n): { readonly [N in keyof C]: Portable<C[N]> } {\n return commands as never;\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NodeAudio } from "../../components/trees/audio/node-audio.js";
|
|
2
|
+
import type { Allowed, BoxAudioState, BuiltNode, Component, Element, Merge, SpecAudio, StateSpec, TreeCallProps } from "../../components/factory/api.js";
|
|
3
|
+
/**
|
|
4
|
+
* An audio component: a sound, or a bus mixing the sounds in it. Lowers onto a
|
|
5
|
+
* generated `NodeAudio` subclass. It has no audio field: what it plays comes
|
|
6
|
+
* from its commands' `timeline.sound`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function componentAudio<const K extends string, const S extends StateSpec = {}, const C = {}, const A extends Allowed = null, const B extends Element = never>(spec: SpecAudio<K, Merge<BoxAudioState, S>, S, C, A, B>): Component<K, Merge<BoxAudioState, S>, C, A, NodeAudio, TreeCallProps<Merge<BoxAudioState, S>, BuiltNode<Merge<BoxAudioState, S>, C, NodeAudio>>>;
|
|
9
|
+
//# sourceMappingURL=component-audio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-audio.d.ts","sourceRoot":"","sources":["../../../src/components/factory/component-audio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAa,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAI7J;;;;GAIG;AACH,wBAAgB,cAAc,CAC1B,KAAK,CAAC,CAAC,SAAS,MAAM,EACtB,KAAK,CAAC,CAAC,SAAS,SAAS,GAAG,EAAE,EAC9B,KAAK,CAAC,CAAC,GAAG,EAAE,EACZ,KAAK,CAAC,CAAC,SAAS,OAAO,GAAG,IAAI,EAC9B,KAAK,CAAC,CAAC,SAAS,OAAO,GAAG,KAAK,EACjC,IAAI,EAAE,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,aAAa,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAU3M"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { NodeAudio } from "../../components/trees/audio/node-audio.js";
|
|
2
|
+
import { componentBase, finishComponent, lowering } from "../../components/factory/factory.js";
|
|
3
|
+
import { childView } from "../../components/factory/views.js";
|
|
4
|
+
/**
|
|
5
|
+
* An audio component: a sound, or a bus mixing the sounds in it. Lowers onto a
|
|
6
|
+
* generated `NodeAudio` subclass. It has no audio field: what it plays comes
|
|
7
|
+
* from its commands' `timeline.sound`.
|
|
8
|
+
*/
|
|
9
|
+
export function componentAudio(spec) {
|
|
10
|
+
const l = lowering(spec, NodeAudio);
|
|
11
|
+
class Generated extends componentBase(NodeAudio, l) {
|
|
12
|
+
_commandChildren() {
|
|
13
|
+
return this.childrenAudio.map(childView);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return finishComponent(Generated, l);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=component-audio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-audio.js","sourceRoot":"","sources":["../../../src/components/factory/component-audio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAEhE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,QAAQ,EAAiB,MAAM,8BAA8B,CAAC;AACvG,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAM5B,IAAuD;IACrD,MAAM,CAAC,GAAG,QAAQ,CAAC,IAA2B,EAAE,SAAS,CAAC,CAAC;IAE3D,MAAM,SAAU,SAAQ,aAAa,CAAC,SAAS,EAAE,CAAC,CAAC;QACtC,gBAAgB;YACrB,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC7C,CAAC;KACJ;IAED,OAAO,eAAe,CAAC,SAAS,EAAE,CAAC,CAAU,CAAC;AAClD,CAAC","sourcesContent":["import { NodeAudio } from \"@/components/trees/audio/node-audio\";\nimport type { Allowed, BoxAudioState, BuiltNode, ChildView, Component, Element, Merge, SpecAudio, StateSpec, TreeCallProps } from \"@/components/factory/api\";\nimport { componentBase, finishComponent, lowering, type CoreSpec } from \"@/components/factory/factory\";\nimport { childView } from \"@/components/factory/views\";\n\n/**\n * An audio component: a sound, or a bus mixing the sounds in it. Lowers onto a\n * generated `NodeAudio` subclass. It has no audio field: what it plays comes\n * from its commands' `timeline.sound`.\n */\nexport function componentAudio<\n const K extends string,\n const S extends StateSpec = {},\n const C = {},\n const A extends Allowed = null,\n const B extends Element = never,\n>(spec: SpecAudio<K, Merge<BoxAudioState, S>, S, C, A, B>): Component<K, Merge<BoxAudioState, S>, C, A, NodeAudio, TreeCallProps<Merge<BoxAudioState, S>, BuiltNode<Merge<BoxAudioState, S>, C, NodeAudio>>> {\n const l = lowering(spec as unknown as CoreSpec, NodeAudio);\n\n class Generated extends componentBase(NodeAudio, l) {\n override _commandChildren(): readonly ChildView[] {\n return this.childrenAudio.map(childView);\n }\n }\n\n return finishComponent(Generated, l) as never;\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Allowed, Box2DState, Component, Element, Merge, Spec2D, StateSpec } from "../../components/factory/api.js";
|
|
2
|
+
/**
|
|
3
|
+
* A 2D component: laid out in a box, drawn with `Graphics2D`. Lowers the spec
|
|
4
|
+
* onto a generated `Node2D` subclass, so a registry, a document and a host see
|
|
5
|
+
* an ordinary node type.
|
|
6
|
+
*/
|
|
7
|
+
export declare function component2d<const K extends string, const S extends StateSpec = {}, const C = {}, const A extends Allowed = null, const B extends Element = never>(spec: Spec2D<K, Merge<Box2DState, S>, S, C, A, B>): Component<K, Merge<Box2DState, S>, C, A>;
|
|
8
|
+
//# sourceMappingURL=component2d.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component2d.d.ts","sourceRoot":"","sources":["../../../src/components/factory/component2d.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAa,SAAS,EAAE,OAAO,EAAa,KAAK,EAAe,MAAM,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AA6BrJ;;;;GAIG;AACH,wBAAgB,WAAW,CACvB,KAAK,CAAC,CAAC,SAAS,MAAM,EACtB,KAAK,CAAC,CAAC,SAAS,SAAS,GAAG,EAAE,EAC9B,KAAK,CAAC,CAAC,GAAG,EAAE,EACZ,KAAK,CAAC,CAAC,SAAS,OAAO,GAAG,IAAI,EAC9B,KAAK,CAAC,CAAC,SAAS,OAAO,GAAG,KAAK,EACjC,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAmO7F"}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { sizeInputOps } from "../../attributes/layout/size.js";
|
|
2
|
+
import { getNodeDescriptor } from "../../document/node-decorator.js";
|
|
3
|
+
import { flowOps } from "../../layout/ops.js";
|
|
4
|
+
import { Node2D } from "../../components/trees/2d/node2d.js";
|
|
5
|
+
import { containsClip } from "../../render/clip-contains.js";
|
|
6
|
+
import { clipOf } from "../../components/factory/clip-of.js";
|
|
7
|
+
import { componentBase, finishComponent, lowering } from "../../components/factory/factory.js";
|
|
8
|
+
import { childView, MeasurerImpl, RenderContextImpl, setKeyLookup, withPass, takeDecided, } from "../../components/factory/views.js";
|
|
9
|
+
import { childInkBounds } from "../../components/trees/2d/group-bounds.js";
|
|
10
|
+
import { NO_PROJECTION_3D } from "../../attributes/layout/matrix2d.js";
|
|
11
|
+
const NO_INSETS = { left: 0, right: 0, top: 0, bottom: 0 };
|
|
12
|
+
const SIZE_KEYS = new Set(["width", "height"]);
|
|
13
|
+
setKeyLookup((n) => getNodeDescriptor(n.constructor)?.key);
|
|
14
|
+
function slotOf(p) {
|
|
15
|
+
if (p.rotation === undefined && p.scale === undefined && p.opacity === undefined
|
|
16
|
+
&& p.depth === undefined && p.rotationX === undefined && p.rotationY === undefined)
|
|
17
|
+
return null;
|
|
18
|
+
return {
|
|
19
|
+
rotation: p.rotation ?? 0, scale: p.scale ?? 1, opacity: p.opacity ?? 1,
|
|
20
|
+
depth: p.depth ?? 0, rotationX: p.rotationX ?? 0, rotationY: p.rotationY ?? 0,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A 2D component: laid out in a box, drawn with `Graphics2D`. Lowers the spec
|
|
25
|
+
* onto a generated `Node2D` subclass, so a registry, a document and a host see
|
|
26
|
+
* an ordinary node type.
|
|
27
|
+
*/
|
|
28
|
+
export function component2d(spec) {
|
|
29
|
+
const s = spec;
|
|
30
|
+
const l = lowering(s, Node2D, SIZE_KEYS);
|
|
31
|
+
const { defaults } = l;
|
|
32
|
+
const flows = l.entries.has("flow");
|
|
33
|
+
class Generated extends componentBase(Node2D, l) {
|
|
34
|
+
_lastShape = null;
|
|
35
|
+
constructor(props) {
|
|
36
|
+
super(props);
|
|
37
|
+
this._measurer = new MeasurerImpl(this);
|
|
38
|
+
this._ctx = new RenderContextImpl(this);
|
|
39
|
+
this._slots = null;
|
|
40
|
+
this._planes = null;
|
|
41
|
+
this._box = null;
|
|
42
|
+
// A node made of other nodes hugs them, unless told otherwise; `flex` already said fill.
|
|
43
|
+
if (this._built > 0 && props?.flex === undefined) {
|
|
44
|
+
for (const axis of SIZE_KEYS) {
|
|
45
|
+
if (props?.[axis] === undefined && defaults[axis] === undefined)
|
|
46
|
+
this.applyProp(axis, "hug", { tween: sizeInputOps.lerp });
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Hug what it was given, fill when given nothing, and fill a main axis a
|
|
52
|
+
* child fills, so a hugging parent doesn't leave that child no room: the
|
|
53
|
+
* rule shapes have today. A `defaults` size replaces it.
|
|
54
|
+
*/
|
|
55
|
+
applyDefaultSize(props) {
|
|
56
|
+
const given = Node2D.flowChildrenProp(props);
|
|
57
|
+
const flow = props?.flow ?? "freeform";
|
|
58
|
+
// A flow container fills where a child fills, as shapes do; anything else hugs or fills, as `Node2D` does.
|
|
59
|
+
const main = flows
|
|
60
|
+
? { width: flow !== "vertical", height: flow === "vertical" || flow === "freeform" }
|
|
61
|
+
: { width: false, height: false };
|
|
62
|
+
for (const axis of ["width", "height"]) {
|
|
63
|
+
if (props?.[axis] !== undefined)
|
|
64
|
+
continue;
|
|
65
|
+
const declared = defaults[axis];
|
|
66
|
+
const value = declared !== undefined && typeof declared !== "function" ? declared
|
|
67
|
+
: given.length === 0 || (main[axis] && Node2D.hasFillChild(given, axis)) ? "fill" : "hug";
|
|
68
|
+
this.applyProp(axis, value, { tween: sizeInputOps.lerp });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
measure(constraints, scope) {
|
|
72
|
+
if (!s.measure)
|
|
73
|
+
return super.measure(constraints, scope);
|
|
74
|
+
this.lastMeasure = { constraints, measurer: scope };
|
|
75
|
+
const m = this._measurer;
|
|
76
|
+
m.max = { width: constraints.maxWidth, height: constraints.maxHeight };
|
|
77
|
+
m.scope = scope;
|
|
78
|
+
const natural = withPass(this, scope, m.max, () => s.measure(m, this._view, this.flowChildren().map(childView)));
|
|
79
|
+
// An engine module may have sized the node itself (text reports its own height even when it fills).
|
|
80
|
+
if (takeDecided(this))
|
|
81
|
+
return natural;
|
|
82
|
+
// The engine applies width and height: `hug` keeps the natural size, a number or `fill` replaces it.
|
|
83
|
+
return flowOps.size(this, constraints, NO_INSETS, natural);
|
|
84
|
+
}
|
|
85
|
+
layoutChildren(rect, scope) {
|
|
86
|
+
if (!s.layout)
|
|
87
|
+
return super.layoutChildren(rect, scope);
|
|
88
|
+
const children = this.flowChildren();
|
|
89
|
+
const box = { x: 0, y: 0, width: rect.width, height: rect.height, time: this.time };
|
|
90
|
+
this._box = box;
|
|
91
|
+
// A layout that places children by `Flow` records where a new one would go; any other leaves none.
|
|
92
|
+
this._childSpace = null;
|
|
93
|
+
const placements = withPass(this, scope, { width: rect.width, height: rect.height }, () => s.layout(box, this._view, children.map(childView)));
|
|
94
|
+
let slots = null;
|
|
95
|
+
let planes = null;
|
|
96
|
+
placements.forEach((p, i) => {
|
|
97
|
+
const child = children[i];
|
|
98
|
+
if (!child)
|
|
99
|
+
return;
|
|
100
|
+
child.layout({ x: p.x, y: 0 - p.y, width: p.width, height: p.height }, scope);
|
|
101
|
+
const slot = slotOf(p);
|
|
102
|
+
if (slot)
|
|
103
|
+
(slots ??= new Map()).set(child, slot);
|
|
104
|
+
if (p.plane)
|
|
105
|
+
(planes ??= new Map()).set(child, p.plane);
|
|
106
|
+
});
|
|
107
|
+
this._slots = slots;
|
|
108
|
+
this._planes = planes;
|
|
109
|
+
}
|
|
110
|
+
_placementOf(child) {
|
|
111
|
+
return this._slots?.get(child) ?? super._placementOf(child);
|
|
112
|
+
}
|
|
113
|
+
_planeOf(child) {
|
|
114
|
+
if (child)
|
|
115
|
+
return this._planes?.get(child) ?? null;
|
|
116
|
+
const box = this._box ?? { x: 0, y: 0, width: this.layoutBounds?.width ?? 0, height: this.layoutBounds?.height ?? 0, time: this.time };
|
|
117
|
+
return s.plane ? s.plane(box, this._view) : null;
|
|
118
|
+
}
|
|
119
|
+
renderContent(pass) {
|
|
120
|
+
if (!s.render)
|
|
121
|
+
return super.renderContent(pass);
|
|
122
|
+
this.applyTransform(pass);
|
|
123
|
+
const frame = this._spaceFrame;
|
|
124
|
+
// Edge-on or behind the lens: nothing of its own to draw, but its children have frames of their own.
|
|
125
|
+
if (frame && !frame.paints) {
|
|
126
|
+
this.renderChildren(pass);
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
const ctx = this._ctx;
|
|
130
|
+
ctx.pass = pass;
|
|
131
|
+
ctx.cut = frame?.nearCut ?? null;
|
|
132
|
+
ctx.composite = null;
|
|
133
|
+
try {
|
|
134
|
+
this.renderContentWithEffects(pass, () => s.render(ctx, this._view));
|
|
135
|
+
}
|
|
136
|
+
finally {
|
|
137
|
+
ctx.pass = null;
|
|
138
|
+
ctx.cut = null;
|
|
139
|
+
// A render that stopped compositing clears the record; one that composites set it as it went.
|
|
140
|
+
this._record = ctx.composite;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
/** The outline `render` paints now, found by running it with nothing drawn: picking and backdrop effects read it. */
|
|
144
|
+
clipSelf() {
|
|
145
|
+
this._probeRender();
|
|
146
|
+
return this._lastShape ? clipOf(this._lastShape) : null;
|
|
147
|
+
}
|
|
148
|
+
// What `render` does with the children, read from its last run: these are asked every frame,
|
|
149
|
+
// so they never re-run it. Before its first frame, one probe answers.
|
|
150
|
+
/** A composite, or a camera, paints its children into its own plane: none of them stands in a space. */
|
|
151
|
+
_rendersChildrenInSpace() {
|
|
152
|
+
const r = this._observed();
|
|
153
|
+
return !(r?.bounds || r?.camera) && super._rendersChildrenInSpace();
|
|
154
|
+
}
|
|
155
|
+
_localBounds() {
|
|
156
|
+
const bounds = this._observed()?.bounds;
|
|
157
|
+
return (bounds && childInkBounds(this, bounds)) ?? super._localBounds();
|
|
158
|
+
}
|
|
159
|
+
_cameraScope() {
|
|
160
|
+
return this._observed()?.camera ?? super._cameraScope();
|
|
161
|
+
}
|
|
162
|
+
_spaceCamera() {
|
|
163
|
+
return this._observed()?.space ?? super._spaceCamera();
|
|
164
|
+
}
|
|
165
|
+
/** A space's root is the space's frame, not a plane tilted in it. */
|
|
166
|
+
_projection() {
|
|
167
|
+
return this._observed()?.space ? NO_PROJECTION_3D : super._projection();
|
|
168
|
+
}
|
|
169
|
+
/** A render that builds a 3D scene views one: picking projects its 3D children through it. */
|
|
170
|
+
_isViewport3D() {
|
|
171
|
+
return this._observed()?.scene !== undefined;
|
|
172
|
+
}
|
|
173
|
+
/** The scene `render` builds now, built afresh. */
|
|
174
|
+
_scene3D() {
|
|
175
|
+
return this._probeRender()?.scene ?? null;
|
|
176
|
+
}
|
|
177
|
+
_observed() {
|
|
178
|
+
if (this._record === undefined)
|
|
179
|
+
this._probeRender();
|
|
180
|
+
return this._record ?? null;
|
|
181
|
+
}
|
|
182
|
+
/** Run `render` drawing nothing: the outline it paints, and what it does with the children. */
|
|
183
|
+
_probeRender() {
|
|
184
|
+
if (!s.render)
|
|
185
|
+
return (this._record = null);
|
|
186
|
+
const probe = (this._probe ??= new RenderContextImpl(this, true));
|
|
187
|
+
this._lastShape = null;
|
|
188
|
+
probe.composite = null;
|
|
189
|
+
s.render(probe, this._view);
|
|
190
|
+
return (this._record = probe.composite);
|
|
191
|
+
}
|
|
192
|
+
hitTestSelf(local, tolerance) {
|
|
193
|
+
const clip = this.clipSelf();
|
|
194
|
+
if (!clip || clip.isEmpty())
|
|
195
|
+
return super.hitTestSelf(local, tolerance);
|
|
196
|
+
return containsClip(clip, local, tolerance);
|
|
197
|
+
}
|
|
198
|
+
_renderOwnChildren(pass) {
|
|
199
|
+
this.renderChildren(pass);
|
|
200
|
+
}
|
|
201
|
+
_commandChildren() {
|
|
202
|
+
return this.flowChildren().map(childView);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
const proto = Generated.prototype;
|
|
206
|
+
if (s.handles) {
|
|
207
|
+
const handles = Object.entries(s.handles);
|
|
208
|
+
const sizeOf = (node) => ({ width: node.layoutBounds?.width ?? 0, height: node.layoutBounds?.height ?? 0 });
|
|
209
|
+
proto._handles = function () {
|
|
210
|
+
const out = [];
|
|
211
|
+
for (const [prop, handle] of handles) {
|
|
212
|
+
const at = handle.at(this._view, sizeOf(this));
|
|
213
|
+
if (at)
|
|
214
|
+
out.push({ prop, at });
|
|
215
|
+
}
|
|
216
|
+
return out;
|
|
217
|
+
};
|
|
218
|
+
proto._handleValue = function (prop, at) {
|
|
219
|
+
const handle = s.handles[prop];
|
|
220
|
+
if (!handle)
|
|
221
|
+
return null;
|
|
222
|
+
return handle.value ? handle.value(at, this._view, sizeOf(this)) : { x: at.x, y: at.y };
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
if (s.bounds) {
|
|
226
|
+
const bounds = s.bounds;
|
|
227
|
+
proto._localBounds = function () {
|
|
228
|
+
return bounds({ width: this.layoutBounds?.width ?? 0, height: this.layoutBounds?.height ?? 0 }, this._view);
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
if (s.space) {
|
|
232
|
+
const space = s.space;
|
|
233
|
+
// The coordinates its 3D children stand in: read where each child places itself, and by picking.
|
|
234
|
+
Generated.prototype._spaceOf = function () {
|
|
235
|
+
return space(this._view);
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
return finishComponent(Generated, l);
|
|
239
|
+
}
|
|
240
|
+
//# sourceMappingURL=component2d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component2d.js","sourceRoot":"","sources":["../../../src/components/factory/component2d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAA2E,MAAM,8BAA8B,CAAC;AAE/H,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAKtD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,QAAQ,EAAiB,MAAM,8BAA8B,CAAC;AACvG,OAAO,EACH,SAAS,EAAE,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,GAClF,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEpE,OAAO,EAAE,gBAAgB,EAAqB,MAAM,8BAA8B,CAAC;AAKnF,MAAM,SAAS,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;AAC3D,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;AAE/C,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iBAAi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,SAAS,EAAE,CAAC,CAAwD,CAAC;AAChG,CAAC","sourcesContent":["import { sizeInputOps } from \"@/attributes/layout/size\";\nimport type { FlowMode } from \"@/layout/types\";\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\nimport { getNodeDescriptor } from \"@/document/node-decorator\";\nimport type { BoxBounds } from \"@/layout/bounds\";\nimport type { SizeConstraints } from \"@/layout/constraints\";\nimport { flowOps } from \"@/layout/ops\";\nimport { Node2D, type ChildPlacement, type ChildPlane, type CameraScope, type NodeHandle } from \"@/components/trees/2d/node2d\";\nimport type { Clip } from \"@/render/clip\";\nimport { containsClip } from \"@/render/clip-contains\";\nimport type { Graphics2D } from \"@/render/graphics2d\";\nimport type { MeasureContext2D } from \"@/render/measure-context\";\nimport type { RenderPass2D } from \"@/render/render-context2d\";\nimport type { Allowed, Box2DState, ChildView, Component, Element, LayoutBox, Merge, Placement2D, Spec2D, StateSpec } from \"@/components/factory/api\";\nimport { clipOf } from \"@/components/factory/clip-of\";\nimport { componentBase, finishComponent, lowering, type CoreSpec } from \"@/components/factory/factory\";\nimport {\n childView, MeasurerImpl, RenderContextImpl, setKeyLookup, withPass, takeDecided, type ComponentHost, type Composite,\n} from \"@/components/factory/views\";\nimport { childInkBounds } from \"@/components/trees/2d/group-bounds\";\nimport type { SpaceCamera } from \"@/attributes/layout/space3d\";\nimport { NO_PROJECTION_3D, type Projection3D } from \"@/attributes/layout/matrix2d\";\nimport type { ChildSpace3D } from \"@/components/trees/three/node3d\";\nimport type { Scene3D } from \"@/render3d/scene3d\";\n\n\nconst NO_INSETS = { left: 0, right: 0, top: 0, bottom: 0 };\nconst SIZE_KEYS = new Set([\"width\", \"height\"]);\n\nsetKeyLookup((n) => getNodeDescriptor(n.constructor as new () => object)?.key);\n\ntype AnySpec = Spec2D<string, any, any, any, any, any>;\n\nfunction slotOf(p: Placement2D): ChildPlacement | null {\n if (p.rotation === undefined && p.scale === undefined && p.opacity === undefined\n && p.depth === undefined && p.rotationX === undefined && p.rotationY === undefined) return null;\n return {\n rotation: p.rotation ?? 0, scale: p.scale ?? 1, opacity: p.opacity ?? 1,\n depth: p.depth ?? 0, rotationX: p.rotationX ?? 0, rotationY: p.rotationY ?? 0,\n };\n}\n\n/**\n * A 2D component: laid out in a box, drawn with `Graphics2D`. Lowers the spec\n * onto a generated `Node2D` subclass, so a registry, a document and a host see\n * an ordinary node type.\n */\nexport function component2d<\n const K extends string,\n const S extends StateSpec = {},\n const C = {},\n const A extends Allowed = null,\n const B extends Element = never,\n>(spec: Spec2D<K, Merge<Box2DState, S>, S, C, A, B>): Component<K, Merge<Box2DState, S>, C, A> {\n const s = spec as unknown as AnySpec;\n const l = lowering(s as unknown as CoreSpec, Node2D, SIZE_KEYS);\n const { defaults } = l;\n const flows = l.entries.has(\"flow\");\n\n class Generated extends componentBase(Node2D, l) implements ComponentHost {\n _lastShape: Graphics2D | null = null;\n declare _measurer: MeasurerImpl;\n declare _ctx: RenderContextImpl;\n declare _probe: RenderContextImpl | undefined;\n declare _record: Composite | null | undefined;\n declare _slots: Map<Node2D, ChildPlacement> | null;\n declare _planes: Map<Node2D, ChildPlane> | null;\n declare _box: LayoutBox | null;\n\n constructor(props?: Record<string, unknown>) {\n super(props);\n this._measurer = new MeasurerImpl(this);\n this._ctx = new RenderContextImpl(this);\n this._slots = null;\n this._planes = null;\n this._box = null;\n // A node made of other nodes hugs them, unless told otherwise; `flex` already said fill.\n if (this._built > 0 && props?.flex === undefined) {\n for (const axis of SIZE_KEYS) {\n if (props?.[axis] === undefined && defaults[axis] === undefined) this.applyProp(axis, \"hug\", { tween: sizeInputOps.lerp });\n }\n }\n }\n\n /**\n * Hug what it was given, fill when given nothing, and fill a main axis a\n * child fills, so a hugging parent doesn't leave that child no room: the\n * rule shapes have today. A `defaults` size replaces it.\n */\n protected override applyDefaultSize(props?: Record<string, unknown>): void {\n const given = Node2D.flowChildrenProp(props);\n const flow = (props?.flow as FlowMode | undefined) ?? \"freeform\";\n // A flow container fills where a child fills, as shapes do; anything else hugs or fills, as `Node2D` does.\n const main = flows\n ? { width: flow !== \"vertical\", height: flow === \"vertical\" || flow === \"freeform\" }\n : { width: false, height: false };\n for (const axis of [\"width\", \"height\"] as const) {\n if (props?.[axis] !== undefined) continue;\n const declared = defaults[axis];\n const value = declared !== undefined && typeof declared !== \"function\" ? declared\n : given.length === 0 || (main[axis] && Node2D.hasFillChild(given, axis)) ? \"fill\" : \"hug\";\n this.applyProp(axis, value, { tween: sizeInputOps.lerp });\n }\n }\n\n override measure(constraints: SizeConstraints, scope: MeasureContext2D) {\n if (!s.measure) return super.measure(constraints, scope);\n this.lastMeasure = { constraints, measurer: scope };\n const m = this._measurer;\n m.max = { width: constraints.maxWidth, height: constraints.maxHeight };\n m.scope = scope;\n const natural = withPass(this, scope, m.max, () => s.measure!(m, this._view as never, this.flowChildren().map(childView) as never));\n // An engine module may have sized the node itself (text reports its own height even when it fills).\n if (takeDecided(this)) return natural;\n // The engine applies width and height: `hug` keeps the natural size, a number or `fill` replaces it.\n return flowOps.size(this, constraints, NO_INSETS, natural);\n }\n\n protected override layoutChildren(rect: BoxBounds, scope: MeasureContext2D): void {\n if (!s.layout) return super.layoutChildren(rect, scope);\n const children = this.flowChildren();\n const box: LayoutBox = { x: 0, y: 0, width: rect.width, height: rect.height, time: this.time };\n this._box = box;\n // A layout that places children by `Flow` records where a new one would go; any other leaves none.\n this._childSpace = null;\n const placements = withPass(this, scope, { width: rect.width, height: rect.height },\n () => s.layout!(box, this._view as never, children.map(childView) as never));\n let slots: Map<Node2D, ChildPlacement> | null = null;\n let planes: Map<Node2D, ChildPlane> | null = null;\n placements.forEach((p, i) => {\n const child = children[i];\n if (!child) return;\n child.layout({ x: p.x, y: 0 - p.y, width: p.width, height: p.height }, scope);\n const slot = slotOf(p);\n if (slot) (slots ??= new Map()).set(child, slot);\n if (p.plane) (planes ??= new Map()).set(child, p.plane);\n });\n this._slots = slots;\n this._planes = planes;\n }\n\n override _placementOf(child: Node2D): ChildPlacement | null {\n return this._slots?.get(child) ?? super._placementOf(child);\n }\n\n override _planeOf(child: Node2D | null): ChildPlane | null {\n if (child) return this._planes?.get(child) ?? null;\n const box = this._box ?? { x: 0, y: 0, width: this.layoutBounds?.width ?? 0, height: this.layoutBounds?.height ?? 0, time: this.time };\n return s.plane ? s.plane(box, this._view as never) : null;\n }\n\n protected override renderContent(pass: RenderPass2D): void {\n if (!s.render) return super.renderContent(pass);\n this.applyTransform(pass);\n const frame = this._spaceFrame;\n // Edge-on or behind the lens: nothing of its own to draw, but its children have frames of their own.\n if (frame && !frame.paints) {\n this.renderChildren(pass);\n return;\n }\n const ctx = this._ctx;\n ctx.pass = pass;\n ctx.cut = frame?.nearCut ?? null;\n ctx.composite = null;\n try {\n this.renderContentWithEffects(pass, () => s.render!(ctx, this._view as never));\n } finally {\n ctx.pass = null;\n ctx.cut = null;\n // A render that stopped compositing clears the record; one that composites set it as it went.\n this._record = ctx.composite;\n }\n }\n\n /** The outline `render` paints now, found by running it with nothing drawn: picking and backdrop effects read it. */\n protected override clipSelf(): Clip | null {\n this._probeRender();\n return this._lastShape ? clipOf(this._lastShape) : null;\n }\n\n // What `render` does with the children, read from its last run: these are asked every frame,\n // so they never re-run it. Before its first frame, one probe answers.\n\n /** A composite, or a camera, paints its children into its own plane: none of them stands in a space. */\n override _rendersChildrenInSpace(): boolean {\n const r = this._observed();\n return !(r?.bounds || r?.camera) && super._rendersChildrenInSpace();\n }\n\n override _localBounds(): BoxBounds {\n const bounds = this._observed()?.bounds;\n return (bounds && childInkBounds(this, bounds)) ?? super._localBounds();\n }\n\n override _cameraScope(): CameraScope | null {\n return this._observed()?.camera ?? super._cameraScope();\n }\n\n override _spaceCamera(): SpaceCamera | null {\n return this._observed()?.space ?? super._spaceCamera();\n }\n\n /** A space's root is the space's frame, not a plane tilted in it. */\n protected override _projection(): Projection3D {\n return this._observed()?.space ? NO_PROJECTION_3D : super._projection();\n }\n\n /** A render that builds a 3D scene views one: picking projects its 3D children through it. */\n _isViewport3D(): boolean {\n return this._observed()?.scene !== undefined;\n }\n\n /** The scene `render` builds now, built afresh. */\n _scene3D(): Scene3D | null {\n return this._probeRender()?.scene ?? null;\n }\n\n _observed(): Composite | null {\n if (this._record === undefined) this._probeRender();\n return this._record ?? null;\n }\n\n /** Run `render` drawing nothing: the outline it paints, and what it does with the children. */\n _probeRender(): Composite | null {\n if (!s.render) return (this._record = null);\n const probe = (this._probe ??= new RenderContextImpl(this, true));\n this._lastShape = null;\n probe.composite = null;\n s.render(probe, this._view as never);\n return (this._record = probe.composite);\n }\n\n protected override hitTestSelf(local: Vector2, tolerance: number): boolean {\n const clip = this.clipSelf();\n if (!clip || clip.isEmpty()) return super.hitTestSelf(local, tolerance);\n return containsClip(clip, local, tolerance);\n }\n\n _renderOwnChildren(pass: RenderPass2D): void {\n this.renderChildren(pass);\n }\n\n override _commandChildren(): readonly ChildView[] {\n return this.flowChildren().map(childView);\n }\n }\n\n const proto = Generated.prototype as unknown as Record<string, unknown>;\n if (s.handles) {\n const handles = Object.entries(s.handles);\n const sizeOf = (node: Node2D) => ({ width: node.layoutBounds?.width ?? 0, height: node.layoutBounds?.height ?? 0 });\n proto._handles = function (this: Generated): readonly NodeHandle[] {\n const out: NodeHandle[] = [];\n for (const [prop, handle] of handles) {\n const at = handle.at(this._view as never, sizeOf(this));\n if (at) out.push({ prop, at });\n }\n return out;\n };\n proto._handleValue = function (this: Generated, prop: string, at: Vector2): Vector2 | null {\n const handle = s.handles![prop];\n if (!handle) return null;\n return handle.value ? handle.value(at, this._view as never, sizeOf(this)) : { x: at.x, y: at.y };\n };\n }\n if (s.bounds) {\n const bounds = s.bounds;\n proto._localBounds = function (this: Generated): BoxBounds {\n return bounds({ width: this.layoutBounds?.width ?? 0, height: this.layoutBounds?.height ?? 0 }, this._view as never);\n };\n }\n if (s.space) {\n const space = s.space;\n // The coordinates its 3D children stand in: read where each child places itself, and by picking.\n (Generated.prototype as unknown as { _spaceOf: () => ChildSpace3D | null })._spaceOf = function (this: Generated) {\n return space(this._view as never);\n };\n }\n\n return finishComponent(Generated, l) as unknown as Component<K, Merge<Box2DState, S>, C, A>;\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Node3D } from "../../components/trees/three/node3d.js";
|
|
2
|
+
import type { Allowed, BuiltNode, CallProps3D, Component, Element, Merge, Spec3D, StateSpec, Transform3DState } from "../../components/factory/api.js";
|
|
3
|
+
/**
|
|
4
|
+
* A 3D component: placed by its transform, drawn with `Graphics3D`, lights and
|
|
5
|
+
* cameras. Lowers onto a generated `Node3D` subclass; its children render
|
|
6
|
+
* after it, in its space.
|
|
7
|
+
*/
|
|
8
|
+
export declare function component3d<const K extends string, const S extends StateSpec = {}, const C = {}, const A extends Allowed = null, const B extends Element = never>(spec: Spec3D<K, Merge<Transform3DState, S>, S, C, A, B>): Component<K, Merge<Transform3DState, S>, C, A, Node3D, CallProps3D<Merge<Transform3DState, S>, BuiltNode<Merge<Transform3DState, S>, C, Node3D>>>;
|
|
9
|
+
//# sourceMappingURL=component3d.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component3d.d.ts","sourceRoot":"","sources":["../../../src/components/factory/component3d.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAqB,MAAM,iCAAiC,CAAC;AAQ5E,OAAO,KAAK,EACR,OAAO,EAAE,SAAS,EAAE,WAAW,EAAoB,SAAS,EAAE,OAAO,EAAE,KAAK,EAAmB,MAAM,EAAE,SAAS,EAAE,gBAAgB,EACrI,MAAM,0BAA0B,CAAC;AAiDlC;;;;GAIG;AACH,wBAAgB,WAAW,CACvB,KAAK,CAAC,CAAC,SAAS,MAAM,EACtB,KAAK,CAAC,CAAC,SAAS,SAAS,GAAG,EAAE,EAC9B,KAAK,CAAC,CAAC,GAAG,EAAE,EACZ,KAAK,CAAC,CAAC,SAAS,OAAO,GAAG,IAAI,EAC9B,KAAK,CAAC,CAAC,SAAS,OAAO,GAAG,KAAK,EACjC,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAqE5M"}
|