@motionscript/core 0.1.0 → 0.1.1-alpha.0
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 +10 -0
- package/dist/assets/asset-index.d.ts +1 -8
- package/dist/assets/asset-index.d.ts.map +1 -1
- package/dist/assets/asset-index.js +1 -8
- package/dist/assets/asset-index.js.map +1 -1
- package/dist/assets/catalog.d.ts +10 -72
- package/dist/assets/catalog.d.ts.map +1 -1
- package/dist/assets/catalog.js +3 -29
- package/dist/assets/catalog.js.map +1 -1
- package/dist/assets/errors.d.ts +8 -20
- package/dist/assets/errors.d.ts.map +1 -1
- package/dist/assets/errors.js +8 -20
- package/dist/assets/errors.js.map +1 -1
- package/dist/assets/index.d.ts.map +1 -1
- package/dist/assets/index.js.map +1 -1
- package/dist/assets/manager.d.ts +9 -51
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/assets/manager.js +13 -78
- package/dist/assets/manager.js.map +1 -1
- package/dist/assets/record.d.ts +2 -18
- package/dist/assets/record.d.ts.map +1 -1
- package/dist/assets/record.js.map +1 -1
- package/dist/assets/scope.d.ts +3 -18
- package/dist/assets/scope.d.ts.map +1 -1
- package/dist/assets/scope.js +2 -11
- package/dist/assets/scope.js.map +1 -1
- package/dist/attributes/audio/effects/chain.d.ts +2 -12
- package/dist/attributes/audio/effects/chain.d.ts.map +1 -1
- package/dist/attributes/audio/effects/chain.js +1 -7
- package/dist/attributes/audio/effects/chain.js.map +1 -1
- package/dist/attributes/audio/effects/registry.d.ts +3 -18
- package/dist/attributes/audio/effects/registry.d.ts.map +1 -1
- package/dist/attributes/audio/effects/registry.js +4 -23
- package/dist/attributes/audio/effects/registry.js.map +1 -1
- package/dist/attributes/audio/ramp.d.ts +5 -38
- package/dist/attributes/audio/ramp.d.ts.map +1 -1
- package/dist/attributes/audio/ramp.js +3 -28
- package/dist/attributes/audio/ramp.js.map +1 -1
- package/dist/attributes/audio/request.d.ts +10 -80
- package/dist/attributes/audio/request.d.ts.map +1 -1
- package/dist/attributes/audio/request.js +1 -4
- package/dist/attributes/audio/request.js.map +1 -1
- package/dist/attributes/audio/schedule.d.ts +2 -12
- package/dist/attributes/audio/schedule.d.ts.map +1 -1
- package/dist/attributes/audio/schedule.js +2 -11
- package/dist/attributes/audio/schedule.js.map +1 -1
- package/dist/attributes/audio/sound.d.ts +2 -26
- package/dist/attributes/audio/sound.d.ts.map +1 -1
- package/dist/attributes/audio/sound.js +1 -9
- package/dist/attributes/audio/sound.js.map +1 -1
- package/dist/attributes/audio/transition.d.ts +1 -8
- package/dist/attributes/audio/transition.d.ts.map +1 -1
- package/dist/attributes/audio/transition.js.map +1 -1
- package/dist/attributes/layout/alignment.d.ts +6 -38
- package/dist/attributes/layout/alignment.d.ts.map +1 -1
- package/dist/attributes/layout/alignment.js.map +1 -1
- package/dist/attributes/layout/insets.d.ts +2 -27
- package/dist/attributes/layout/insets.d.ts.map +1 -1
- package/dist/attributes/layout/insets.js.map +1 -1
- package/dist/attributes/layout/matrix2d.d.ts +29 -114
- package/dist/attributes/layout/matrix2d.d.ts.map +1 -1
- package/dist/attributes/layout/matrix2d.js +26 -110
- package/dist/attributes/layout/matrix2d.js.map +1 -1
- package/dist/attributes/layout/size.d.ts +3 -25
- package/dist/attributes/layout/size.d.ts.map +1 -1
- package/dist/attributes/layout/size.js +2 -18
- package/dist/attributes/layout/size.js.map +1 -1
- package/dist/attributes/layout/space3d.d.ts +16 -79
- package/dist/attributes/layout/space3d.d.ts.map +1 -1
- package/dist/attributes/layout/space3d.js +17 -81
- package/dist/attributes/layout/space3d.js.map +1 -1
- package/dist/attributes/layout/transform3d.d.ts +2 -23
- package/dist/attributes/layout/transform3d.d.ts.map +1 -1
- package/dist/attributes/layout/transform3d.js +1 -7
- package/dist/attributes/layout/transform3d.js.map +1 -1
- package/dist/attributes/layout/world-transform.d.ts +2 -16
- package/dist/attributes/layout/world-transform.d.ts.map +1 -1
- package/dist/attributes/layout/world-transform.js.map +1 -1
- package/dist/attributes/properties/decorator.d.ts +13 -73
- package/dist/attributes/properties/decorator.d.ts.map +1 -1
- package/dist/attributes/properties/decorator.js +9 -40
- package/dist/attributes/properties/decorator.js.map +1 -1
- package/dist/attributes/properties/typed.d.ts +6 -45
- package/dist/attributes/properties/typed.d.ts.map +1 -1
- package/dist/attributes/properties/typed.js +6 -37
- package/dist/attributes/properties/typed.js.map +1 -1
- package/dist/attributes/render3d/orbit.d.ts +11 -83
- package/dist/attributes/render3d/orbit.d.ts.map +1 -1
- package/dist/attributes/render3d/orbit.js +10 -73
- package/dist/attributes/render3d/orbit.js.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.d.ts +1 -6
- package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
- package/dist/attributes/shape/corners/corner-style.d.ts +4 -25
- package/dist/attributes/shape/corners/corner-style.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-style.js +2 -12
- package/dist/attributes/shape/corners/corner-style.js.map +1 -1
- package/dist/attributes/shape/corners/corners.d.ts +2 -21
- package/dist/attributes/shape/corners/corners.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corners.js +2 -12
- package/dist/attributes/shape/corners/corners.js.map +1 -1
- package/dist/attributes/shape/effects/backdrop.d.ts +2 -18
- package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
- package/dist/attributes/shape/effects/backdrop.js +3 -26
- package/dist/attributes/shape/effects/backdrop.js.map +1 -1
- package/dist/attributes/shape/effects/chain.d.ts +36 -328
- package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/chain.js +24 -242
- package/dist/attributes/shape/effects/chain.js.map +1 -1
- package/dist/attributes/shape/effects/effect-data.d.ts +19 -127
- package/dist/attributes/shape/effects/effect-data.d.ts.map +1 -1
- package/dist/attributes/shape/effects/effect-data.js +6 -33
- package/dist/attributes/shape/effects/effect-data.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.d.ts +6 -26
- package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.js +0 -3
- package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +2 -21
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js +0 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js +0 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.js +0 -1
- package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.js +0 -1
- package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +0 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js +0 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -11
- package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.js +1 -6
- package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.d.ts +4 -35
- package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.js +1 -7
- package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +1 -22
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js +0 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.js +0 -1
- package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.d.ts +2 -15
- package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.js +0 -1
- package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.js +0 -1
- package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.d.ts +7 -47
- package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.js +1 -9
- package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.js +0 -1
- package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js +0 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.d.ts +5 -29
- package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.js +0 -1
- package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.d.ts +3 -12
- package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.js +0 -1
- package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +2 -19
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js +1 -5
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.d.ts +11 -36
- package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.js +2 -8
- package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.js +0 -1
- package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +3 -17
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.js +2 -11
- package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js +0 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.d.ts +2 -14
- package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.js +0 -1
- package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts +1 -15
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js +0 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.d.ts +1 -10
- package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.js +0 -1
- package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +3 -26
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.js +1 -2
- package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +2 -16
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +1 -13
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js +0 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts +1 -8
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js +0 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.js +0 -1
- package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.d.ts +10 -53
- package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.js +2 -9
- package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js +0 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.d.ts +1 -8
- package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.js +0 -1
- package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.js +0 -1
- package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.d.ts +1 -13
- package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.js +0 -1
- package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.js +0 -1
- package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.js +0 -1
- package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.d.ts +3 -24
- package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.js +1 -5
- package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
- package/dist/attributes/shape/effects/registry.d.ts +6 -41
- package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
- package/dist/attributes/shape/effects/registry.js +7 -45
- package/dist/attributes/shape/effects/registry.js.map +1 -1
- package/dist/attributes/shape/effects/spec.d.ts +6 -30
- package/dist/attributes/shape/effects/spec.d.ts.map +1 -1
- package/dist/attributes/shape/effects/spec.js +3 -9
- package/dist/attributes/shape/effects/spec.js.map +1 -1
- package/dist/attributes/shape/fill/blend.d.ts +1 -17
- package/dist/attributes/shape/fill/blend.d.ts.map +1 -1
- package/dist/attributes/shape/fill/blend.js +2 -15
- package/dist/attributes/shape/fill/blend.js.map +1 -1
- package/dist/attributes/shape/fill/chain.d.ts +17 -125
- package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
- package/dist/attributes/shape/fill/chain.js +22 -109
- package/dist/attributes/shape/fill/chain.js.map +1 -1
- package/dist/attributes/shape/fill/coerce.d.ts +10 -35
- package/dist/attributes/shape/fill/coerce.d.ts.map +1 -1
- package/dist/attributes/shape/fill/coerce.js +12 -47
- package/dist/attributes/shape/fill/coerce.js.map +1 -1
- package/dist/attributes/shape/fill/color/parser.d.ts +10 -44
- package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
- package/dist/attributes/shape/fill/color/parser.js +15 -91
- package/dist/attributes/shape/fill/color/parser.js.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.d.ts +1 -8
- package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.js +2 -13
- package/dist/attributes/shape/fill/gradient-stops.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -24
- package/dist/attributes/shape/fill/implementations/canvas3d.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/canvas3d.js +2 -9
- package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/dot-grid.d.ts +1 -14
- package/dist/attributes/shape/fill/implementations/dot-grid.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts +5 -28
- package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js +0 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/grid.d.ts +8 -21
- package/dist/attributes/shape/fill/implementations/grid.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/grid.js +2 -8
- package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.d.ts +13 -79
- package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.js +6 -23
- package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/noise.d.ts +2 -15
- package/dist/attributes/shape/fill/implementations/noise.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.d.ts +11 -45
- package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.js +5 -17
- package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.d.ts +12 -64
- package/dist/attributes/shape/fill/implementations/video.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.js +12 -50
- package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
- package/dist/attributes/shape/fill/lerp.d.ts +2 -13
- package/dist/attributes/shape/fill/lerp.d.ts.map +1 -1
- package/dist/attributes/shape/fill/lerp.js +2 -9
- package/dist/attributes/shape/fill/lerp.js.map +1 -1
- package/dist/attributes/shape/fill/media-preset.d.ts +8 -49
- package/dist/attributes/shape/fill/media-preset.d.ts.map +1 -1
- package/dist/attributes/shape/fill/media-preset.js +8 -35
- package/dist/attributes/shape/fill/media-preset.js.map +1 -1
- package/dist/attributes/shape/fill/registry.d.ts +2 -26
- package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
- package/dist/attributes/shape/fill/registry.js +5 -40
- package/dist/attributes/shape/fill/registry.js.map +1 -1
- package/dist/attributes/shape/fill/union.d.ts +6 -30
- package/dist/attributes/shape/fill/union.d.ts.map +1 -1
- package/dist/attributes/shape/fill/union.js +1 -9
- package/dist/attributes/shape/fill/union.js.map +1 -1
- package/dist/attributes/shape/filters/chain.d.ts +15 -168
- package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
- package/dist/attributes/shape/filters/chain.js +8 -132
- package/dist/attributes/shape/filters/chain.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +1 -7
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/curves.d.ts +1 -7
- package/dist/attributes/shape/filters/implementations/curves.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/echo.d.ts +1 -11
- package/dist/attributes/shape/filters/implementations/echo.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
- package/dist/attributes/shape/filters/index.d.ts +1 -6
- package/dist/attributes/shape/filters/index.d.ts.map +1 -1
- package/dist/attributes/shape/filters/index.js +0 -2
- package/dist/attributes/shape/filters/index.js.map +1 -1
- package/dist/attributes/shape/filters/registry.d.ts +5 -35
- package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
- package/dist/attributes/shape/filters/registry.js +7 -50
- package/dist/attributes/shape/filters/registry.js.map +1 -1
- package/dist/attributes/shape/filters/union.d.ts +10 -51
- package/dist/attributes/shape/filters/union.d.ts.map +1 -1
- package/dist/attributes/shape/filters/union.js.map +1 -1
- package/dist/attributes/shape/path/anchors.d.ts +18 -106
- package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
- package/dist/attributes/shape/path/anchors.js +15 -124
- package/dist/attributes/shape/path/anchors.js.map +1 -1
- package/dist/attributes/shape/path/bezier.d.ts +6 -54
- package/dist/attributes/shape/path/bezier.d.ts.map +1 -1
- package/dist/attributes/shape/path/bezier.js +10 -98
- package/dist/attributes/shape/path/bezier.js.map +1 -1
- package/dist/attributes/shape/path/index.d.ts +1 -11
- package/dist/attributes/shape/path/index.d.ts.map +1 -1
- package/dist/attributes/shape/path/index.js +1 -11
- package/dist/attributes/shape/path/index.js.map +1 -1
- package/dist/attributes/shape/path/measure.d.ts +5 -41
- package/dist/attributes/shape/path/measure.d.ts.map +1 -1
- package/dist/attributes/shape/path/measure.js +8 -57
- package/dist/attributes/shape/path/measure.js.map +1 -1
- package/dist/attributes/shape/path/morph.d.ts +4 -41
- package/dist/attributes/shape/path/morph.d.ts.map +1 -1
- package/dist/attributes/shape/path/morph.js +17 -117
- package/dist/attributes/shape/path/morph.js.map +1 -1
- package/dist/attributes/shape/path/ops.d.ts +5 -19
- package/dist/attributes/shape/path/ops.d.ts.map +1 -1
- package/dist/attributes/shape/path/ops.js.map +1 -1
- package/dist/attributes/shape/path/types.d.ts +10 -67
- package/dist/attributes/shape/path/types.d.ts.map +1 -1
- package/dist/attributes/shape/path/types.js +0 -1
- package/dist/attributes/shape/path/types.js.map +1 -1
- package/dist/attributes/shape/path/walk.d.ts +9 -63
- package/dist/attributes/shape/path/walk.d.ts.map +1 -1
- package/dist/attributes/shape/path/walk.js +21 -100
- package/dist/attributes/shape/path/walk.js.map +1 -1
- package/dist/attributes/shape/shaders/language.d.ts +2 -14
- package/dist/attributes/shape/shaders/language.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/language.js +1 -8
- package/dist/attributes/shape/shaders/language.js.map +1 -1
- package/dist/attributes/shape/shaders/pack.d.ts +13 -78
- package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/pack.js +1 -10
- package/dist/attributes/shape/shaders/pack.js.map +1 -1
- package/dist/attributes/shape/shaders/resolve.d.ts +1 -11
- package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/resolve.js +3 -28
- package/dist/attributes/shape/shaders/resolve.js.map +1 -1
- package/dist/attributes/shape/shaders/uniforms.d.ts +3 -24
- package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/uniforms.js +0 -0
- package/dist/attributes/shape/shaders/uniforms.js.map +1 -1
- package/dist/attributes/shape/shadow/shadow.d.ts +3 -20
- package/dist/attributes/shape/shadow/shadow.d.ts.map +1 -1
- package/dist/attributes/shape/shadow/shadow.js +0 -3
- package/dist/attributes/shape/shadow/shadow.js.map +1 -1
- package/dist/attributes/shape/stroke/stroke.d.ts +9 -58
- package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/stroke.js +0 -6
- package/dist/attributes/shape/stroke/stroke.js.map +1 -1
- package/dist/attributes/shared/operators.d.ts +1 -8
- package/dist/attributes/shared/operators.d.ts.map +1 -1
- package/dist/attributes/shared/operators.js.map +1 -1
- package/dist/attributes/text/index.d.ts +1 -11
- package/dist/attributes/text/index.d.ts.map +1 -1
- package/dist/attributes/text/index.js +1 -11
- package/dist/attributes/text/index.js.map +1 -1
- package/dist/attributes/text/ops.d.ts +4 -30
- package/dist/attributes/text/ops.d.ts.map +1 -1
- package/dist/attributes/text/ops.js +7 -23
- package/dist/attributes/text/ops.js.map +1 -1
- package/dist/attributes/text/types.d.ts +5 -28
- package/dist/attributes/text/types.d.ts.map +1 -1
- package/dist/attributes/text/types.js.map +1 -1
- package/dist/browser/chunks/chunk-3ZIUZZC7.js +13 -0
- package/dist/browser/chunks/chunk-3ZIUZZC7.js.map +7 -0
- package/dist/browser/chunks/{chunk-CCGVIR4F.js → chunk-5TDMGUXQ.js} +3 -3
- package/dist/browser/chunks/chunk-5TDMGUXQ.js.map +7 -0
- package/dist/browser/chunks/chunk-7YOYMMXK.js +6 -0
- package/dist/browser/chunks/chunk-7YOYMMXK.js.map +7 -0
- package/dist/browser/chunks/{chunk-4BDLFEOC.js → chunk-GEJEQQER.js} +1 -1
- package/dist/browser/chunks/chunk-GEJEQQER.js.map +7 -0
- package/dist/browser/component.js +1 -1
- package/dist/browser/experimental.js +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/browser/manifest.json +1 -1
- package/dist/browser/sdk.js +1 -1
- package/dist/component.d.ts +3 -10
- package/dist/component.d.ts.map +1 -1
- package/dist/component.js +3 -10
- package/dist/component.js.map +1 -1
- package/dist/components/builtins/geometry/geometry.d.ts +15 -62
- package/dist/components/builtins/geometry/geometry.d.ts.map +1 -1
- package/dist/components/builtins/geometry/geometry.js.map +1 -1
- package/dist/components/builtins/geometry/shape-outline.d.ts +12 -61
- package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -1
- package/dist/components/builtins/geometry/shape-outline.js +29 -168
- package/dist/components/builtins/geometry/shape-outline.js.map +1 -1
- package/dist/components/builtins/layout/layout.d.ts +1 -14
- package/dist/components/builtins/layout/layout.d.ts.map +1 -1
- package/dist/components/builtins/layout/layout.js.map +1 -1
- package/dist/components/builtins/media/media.d.ts +11 -51
- package/dist/components/builtins/media/media.d.ts.map +1 -1
- package/dist/components/builtins/media/media.js +3 -7
- package/dist/components/builtins/media/media.js.map +1 -1
- package/dist/components/builtins/text/number-format.d.ts +14 -47
- package/dist/components/builtins/text/number-format.d.ts.map +1 -1
- package/dist/components/builtins/text/number-format.js +19 -69
- package/dist/components/builtins/text/number-format.js.map +1 -1
- package/dist/components/builtins/text/number-pattern.d.ts +3 -37
- package/dist/components/builtins/text/number-pattern.d.ts.map +1 -1
- package/dist/components/builtins/text/number-pattern.js +6 -48
- package/dist/components/builtins/text/number-pattern.js.map +1 -1
- package/dist/components/builtins/text/text-defaults.d.ts +7 -25
- package/dist/components/builtins/text/text-defaults.d.ts.map +1 -1
- package/dist/components/builtins/text/text-defaults.js +7 -25
- package/dist/components/builtins/text/text-defaults.js.map +1 -1
- package/dist/components/builtins/text/text-layout.d.ts +2 -11
- package/dist/components/builtins/text/text-layout.d.ts.map +1 -1
- package/dist/components/builtins/text/text-layout.js +7 -22
- package/dist/components/builtins/text/text-layout.js.map +1 -1
- package/dist/components/builtins/text/text.d.ts +8 -46
- package/dist/components/builtins/text/text.d.ts.map +1 -1
- package/dist/components/builtins/text/text.js.map +1 -1
- package/dist/components/builtins/three/canvas3d.d.ts +6 -51
- package/dist/components/builtins/three/canvas3d.d.ts.map +1 -1
- package/dist/components/builtins/three/canvas3d.js.map +1 -1
- package/dist/components/builtins/three/grid-geometry3d.d.ts +3 -39
- package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -1
- package/dist/components/builtins/three/grid-geometry3d.js +8 -46
- package/dist/components/builtins/three/grid-geometry3d.js.map +1 -1
- package/dist/components/builtins/three/three.d.ts +22 -117
- package/dist/components/builtins/three/three.d.ts.map +1 -1
- package/dist/components/builtins/three/three.js +5 -17
- package/dist/components/builtins/three/three.js.map +1 -1
- package/dist/components/factory/api.d.ts.map +1 -1
- package/dist/components/factory/api.js.map +1 -1
- package/dist/components/factory/views.d.ts.map +1 -1
- package/dist/components/factory/views.js +0 -2
- package/dist/components/factory/views.js.map +1 -1
- package/dist/components/trees/2d/group-bounds.d.ts +12 -41
- package/dist/components/trees/2d/group-bounds.d.ts.map +1 -1
- package/dist/components/trees/2d/group-bounds.js +3 -22
- package/dist/components/trees/2d/group-bounds.js.map +1 -1
- package/dist/components/trees/2d/node-lifecycle.d.ts +8 -36
- package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -1
- package/dist/components/trees/2d/node-lifecycle.js +35 -127
- package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
- package/dist/components/trees/2d/node-motion.d.ts +4 -36
- package/dist/components/trees/2d/node-motion.d.ts.map +1 -1
- package/dist/components/trees/2d/node-motion.js +3 -31
- package/dist/components/trees/2d/node-motion.js.map +1 -1
- package/dist/components/trees/2d/node-render.d.ts +3 -20
- package/dist/components/trees/2d/node-render.d.ts.map +1 -1
- package/dist/components/trees/2d/node-render.js +4 -23
- package/dist/components/trees/2d/node-render.js.map +1 -1
- package/dist/components/trees/2d/node-space.d.ts +4 -23
- package/dist/components/trees/2d/node-space.d.ts.map +1 -1
- package/dist/components/trees/2d/node-space.js +3 -17
- package/dist/components/trees/2d/node-space.js.map +1 -1
- package/dist/components/trees/2d/node-transform.d.ts +4 -33
- package/dist/components/trees/2d/node-transform.d.ts.map +1 -1
- package/dist/components/trees/2d/node-transform.js +4 -33
- package/dist/components/trees/2d/node-transform.js.map +1 -1
- package/dist/components/trees/2d/node2d.d.ts +112 -622
- package/dist/components/trees/2d/node2d.d.ts.map +1 -1
- package/dist/components/trees/2d/node2d.js +131 -605
- package/dist/components/trees/2d/node2d.js.map +1 -1
- package/dist/components/trees/audio/node-audio.d.ts +17 -65
- package/dist/components/trees/audio/node-audio.d.ts.map +1 -1
- package/dist/components/trees/audio/node-audio.js +18 -68
- package/dist/components/trees/audio/node-audio.js.map +1 -1
- package/dist/components/trees/node/node-editor-state.d.ts +5 -45
- package/dist/components/trees/node/node-editor-state.d.ts.map +1 -1
- package/dist/components/trees/node/node-editor-state.js +1 -13
- package/dist/components/trees/node/node-editor-state.js.map +1 -1
- package/dist/components/trees/node/node-reactive.d.ts +6 -53
- package/dist/components/trees/node/node-reactive.d.ts.map +1 -1
- package/dist/components/trees/node/node-reactive.js +4 -33
- package/dist/components/trees/node/node-reactive.js.map +1 -1
- package/dist/components/trees/node/node-time.d.ts +2 -15
- package/dist/components/trees/node/node-time.d.ts.map +1 -1
- package/dist/components/trees/node/node-time.js.map +1 -1
- package/dist/components/trees/node/node-walk.d.ts +7 -32
- package/dist/components/trees/node/node-walk.d.ts.map +1 -1
- package/dist/components/trees/node/node-walk.js +7 -32
- package/dist/components/trees/node/node-walk.js.map +1 -1
- package/dist/components/trees/node/node.d.ts +43 -248
- package/dist/components/trees/node/node.d.ts.map +1 -1
- package/dist/components/trees/node/node.js +51 -229
- package/dist/components/trees/node/node.js.map +1 -1
- package/dist/components/trees/root/canvas2d-node.d.ts +7 -60
- package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -1
- package/dist/components/trees/root/canvas2d-node.js +7 -47
- package/dist/components/trees/root/canvas2d-node.js.map +1 -1
- package/dist/components/trees/three/node3d.d.ts +24 -112
- package/dist/components/trees/three/node3d.d.ts.map +1 -1
- package/dist/components/trees/three/node3d.js +22 -104
- package/dist/components/trees/three/node3d.js.map +1 -1
- package/dist/document/audio.d.ts +9 -21
- package/dist/document/audio.d.ts.map +1 -1
- package/dist/document/audio.js +13 -28
- package/dist/document/audio.js.map +1 -1
- package/dist/document/builtins.d.ts +3 -9
- package/dist/document/builtins.d.ts.map +1 -1
- package/dist/document/builtins.js +43 -89
- package/dist/document/builtins.js.map +1 -1
- package/dist/document/command-traits.d.ts +14 -37
- package/dist/document/command-traits.d.ts.map +1 -1
- package/dist/document/command-traits.js +22 -39
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/deny-globals.d.ts +9 -43
- package/dist/document/deny-globals.d.ts.map +1 -1
- package/dist/document/deny-globals.js +18 -58
- package/dist/document/deny-globals.js.map +1 -1
- package/dist/document/diff.d.ts +6 -16
- package/dist/document/diff.d.ts.map +1 -1
- package/dist/document/diff.js +5 -11
- package/dist/document/diff.js.map +1 -1
- package/dist/document/doc-index.d.ts +5 -13
- package/dist/document/doc-index.d.ts.map +1 -1
- package/dist/document/doc-index.js +0 -2
- package/dist/document/doc-index.js.map +1 -1
- package/dist/document/expression/compile.d.ts +2 -2
- package/dist/document/expression/compile.d.ts.map +1 -1
- package/dist/document/expression/compile.js +8 -18
- package/dist/document/expression/compile.js.map +1 -1
- package/dist/document/expression/index.d.ts +11 -41
- package/dist/document/expression/index.d.ts.map +1 -1
- package/dist/document/expression/index.js +11 -41
- package/dist/document/expression/index.js.map +1 -1
- package/dist/document/expression/ops.d.ts +3 -12
- package/dist/document/expression/ops.d.ts.map +1 -1
- package/dist/document/expression/ops.js +4 -20
- package/dist/document/expression/ops.js.map +1 -1
- package/dist/document/expression/parse.d.ts +4 -14
- package/dist/document/expression/parse.d.ts.map +1 -1
- package/dist/document/expression/parse.js +34 -55
- package/dist/document/expression/parse.js.map +1 -1
- package/dist/document/expression/refs.d.ts +2 -8
- package/dist/document/expression/refs.d.ts.map +1 -1
- package/dist/document/expression/refs.js +2 -6
- package/dist/document/expression/refs.js.map +1 -1
- package/dist/document/expression/types.d.ts +18 -63
- package/dist/document/expression/types.d.ts.map +1 -1
- package/dist/document/expression/types.js +4 -15
- package/dist/document/expression/types.js.map +1 -1
- package/dist/document/expression/walk.d.ts +6 -20
- package/dist/document/expression/walk.d.ts.map +1 -1
- package/dist/document/expression/walk.js +18 -44
- package/dist/document/expression/walk.js.map +1 -1
- package/dist/document/index.js +2 -3
- package/dist/document/index.js.map +1 -1
- package/dist/document/migrate.d.ts +7 -22
- package/dist/document/migrate.d.ts.map +1 -1
- package/dist/document/migrate.js +44 -15
- package/dist/document/migrate.js.map +1 -1
- package/dist/document/missing-node.d.ts +4 -11
- package/dist/document/missing-node.d.ts.map +1 -1
- package/dist/document/missing-node.js +2 -5
- package/dist/document/missing-node.js.map +1 -1
- package/dist/document/node-decorator.d.ts +12 -53
- package/dist/document/node-decorator.d.ts.map +1 -1
- package/dist/document/node-decorator.js +16 -57
- package/dist/document/node-decorator.js.map +1 -1
- package/dist/document/node-descriptor.d.ts +25 -62
- package/dist/document/node-descriptor.d.ts.map +1 -1
- package/dist/document/node-descriptor.js.map +1 -1
- package/dist/document/placement.d.ts +18 -41
- package/dist/document/placement.d.ts.map +1 -1
- package/dist/document/placement.js +4 -11
- package/dist/document/placement.js.map +1 -1
- package/dist/document/project.d.ts +19 -52
- package/dist/document/project.d.ts.map +1 -1
- package/dist/document/project.js +2 -6
- package/dist/document/project.js.map +1 -1
- package/dist/document/prop-evolution.d.ts +10 -20
- package/dist/document/prop-evolution.d.ts.map +1 -1
- package/dist/document/prop-evolution.js +3 -7
- package/dist/document/prop-evolution.js.map +1 -1
- package/dist/document/registry.d.ts +80 -318
- package/dist/document/registry.d.ts.map +1 -1
- package/dist/document/registry.js +43 -147
- package/dist/document/registry.js.map +1 -1
- package/dist/document/settled-index.d.ts +11 -23
- package/dist/document/settled-index.d.ts.map +1 -1
- package/dist/document/settled-index.js +15 -34
- package/dist/document/settled-index.js.map +1 -1
- package/dist/document/timeline-patch.d.ts +6 -15
- package/dist/document/timeline-patch.d.ts.map +1 -1
- package/dist/document/timeline-patch.js +12 -21
- package/dist/document/timeline-patch.js.map +1 -1
- package/dist/document/timeline.d.ts +56 -263
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +71 -275
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.d.ts +90 -264
- package/dist/document/types.d.ts.map +1 -1
- package/dist/document/types.js +13 -30
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.d.ts +10 -40
- package/dist/document/validate.d.ts.map +1 -1
- package/dist/document/validate.js +72 -137
- package/dist/document/validate.js.map +1 -1
- package/dist/document/vocabulary.d.ts +4 -7
- package/dist/document/vocabulary.d.ts.map +1 -1
- package/dist/document/vocabulary.js +0 -1
- package/dist/document/vocabulary.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/layout/bounds.d.ts +1 -11
- package/dist/layout/bounds.d.ts.map +1 -1
- package/dist/layout/bounds.js.map +1 -1
- package/dist/layout/flex.d.ts +6 -20
- package/dist/layout/flex.d.ts.map +1 -1
- package/dist/layout/flex.js +7 -28
- package/dist/layout/flex.js.map +1 -1
- package/dist/layout/ops.d.ts +2 -11
- package/dist/layout/ops.d.ts.map +1 -1
- package/dist/layout/ops.js +2 -22
- package/dist/layout/ops.js.map +1 -1
- package/dist/layout/types.d.ts +11 -55
- package/dist/layout/types.d.ts.map +1 -1
- package/dist/layout/types.js.map +1 -1
- package/dist/platform/audio-sink.d.ts +7 -43
- package/dist/platform/audio-sink.d.ts.map +1 -1
- package/dist/platform/audio-sink.js +4 -29
- package/dist/platform/audio-sink.js.map +1 -1
- package/dist/platform/exporter.d.ts +5 -31
- package/dist/platform/exporter.d.ts.map +1 -1
- package/dist/platform/exporter.js.map +1 -1
- package/dist/platform/stepped-clock.d.ts +1 -16
- package/dist/platform/stepped-clock.d.ts.map +1 -1
- package/dist/platform/stepped-clock.js +1 -16
- package/dist/platform/stepped-clock.js.map +1 -1
- package/dist/platform/storage-adapter.d.ts +8 -68
- package/dist/platform/storage-adapter.d.ts.map +1 -1
- package/dist/platform/storage-adapter.js +8 -60
- package/dist/platform/storage-adapter.js.map +1 -1
- package/dist/platform/ticker.d.ts +11 -45
- package/dist/platform/ticker.d.ts.map +1 -1
- package/dist/platform/ticker.js +10 -37
- package/dist/platform/ticker.js.map +1 -1
- package/dist/project/config.d.ts +4 -14
- package/dist/project/config.d.ts.map +1 -1
- package/dist/project/config.js.map +1 -1
- package/dist/project/tree.d.ts +6 -35
- package/dist/project/tree.d.ts.map +1 -1
- package/dist/project/tree.js +1 -8
- package/dist/project/tree.js.map +1 -1
- package/dist/props/host.d.ts +2 -13
- package/dist/props/host.d.ts.map +1 -1
- package/dist/props/host.js.map +1 -1
- package/dist/props/layout.d.ts +1 -12
- package/dist/props/layout.d.ts.map +1 -1
- package/dist/props/layout.js +1 -12
- package/dist/props/layout.js.map +1 -1
- package/dist/props/observer.d.ts +1 -7
- package/dist/props/observer.d.ts.map +1 -1
- package/dist/props/observer.js.map +1 -1
- package/dist/props/slot.d.ts +6 -19
- package/dist/props/slot.d.ts.map +1 -1
- package/dist/props/slot.js +5 -14
- package/dist/props/slot.js.map +1 -1
- package/dist/render/canvas-render-context2d.d.ts +8 -68
- package/dist/render/canvas-render-context2d.d.ts.map +1 -1
- package/dist/render/canvas-render-context2d.js +8 -69
- package/dist/render/canvas-render-context2d.js.map +1 -1
- package/dist/render/clip-contains.d.ts +2 -16
- package/dist/render/clip-contains.d.ts.map +1 -1
- package/dist/render/clip-contains.js +21 -82
- package/dist/render/clip-contains.js.map +1 -1
- package/dist/render/clip.d.ts +7 -25
- package/dist/render/clip.d.ts.map +1 -1
- package/dist/render/clip.js +5 -17
- package/dist/render/clip.js.map +1 -1
- package/dist/render/descriptors/ellipse.d.ts.map +1 -1
- package/dist/render/descriptors/ellipse.js +0 -1
- package/dist/render/descriptors/ellipse.js.map +1 -1
- package/dist/render/descriptors/line.d.ts.map +1 -1
- package/dist/render/descriptors/line.js +0 -1
- package/dist/render/descriptors/line.js.map +1 -1
- package/dist/render/descriptors/path-builder.d.ts +4 -32
- package/dist/render/descriptors/path-builder.d.ts.map +1 -1
- package/dist/render/descriptors/path-builder.js +3 -25
- package/dist/render/descriptors/path-builder.js.map +1 -1
- package/dist/render/descriptors/path.d.ts +1 -11
- package/dist/render/descriptors/path.d.ts.map +1 -1
- package/dist/render/descriptors/path.js +0 -1
- package/dist/render/descriptors/path.js.map +1 -1
- package/dist/render/descriptors/polygon.d.ts.map +1 -1
- package/dist/render/descriptors/polygon.js +0 -1
- package/dist/render/descriptors/polygon.js.map +1 -1
- package/dist/render/descriptors/polygram.d.ts.map +1 -1
- package/dist/render/descriptors/polygram.js +0 -1
- package/dist/render/descriptors/polygram.js.map +1 -1
- package/dist/render/descriptors/rect.d.ts.map +1 -1
- package/dist/render/descriptors/rect.js +0 -1
- package/dist/render/descriptors/rect.js.map +1 -1
- package/dist/render/descriptors/richtext.d.ts.map +1 -1
- package/dist/render/descriptors/richtext.js +0 -1
- package/dist/render/descriptors/richtext.js.map +1 -1
- package/dist/render/descriptors/shape.d.ts +17 -77
- package/dist/render/descriptors/shape.d.ts.map +1 -1
- package/dist/render/descriptors/shape.js +13 -47
- package/dist/render/descriptors/shape.js.map +1 -1
- package/dist/render/descriptors/text.d.ts +15 -94
- package/dist/render/descriptors/text.d.ts.map +1 -1
- package/dist/render/descriptors/text.js +8 -50
- package/dist/render/descriptors/text.js.map +1 -1
- package/dist/render/descriptors/transform.d.ts +5 -16
- package/dist/render/descriptors/transform.d.ts.map +1 -1
- package/dist/render/descriptors/transform.js +1 -17
- package/dist/render/descriptors/transform.js.map +1 -1
- package/dist/render/graphics2d.d.ts +24 -116
- package/dist/render/graphics2d.d.ts.map +1 -1
- package/dist/render/graphics2d.js +23 -108
- package/dist/render/graphics2d.js.map +1 -1
- package/dist/render/measure-context.d.ts +5 -29
- package/dist/render/measure-context.d.ts.map +1 -1
- package/dist/render/measure-context.js.map +1 -1
- package/dist/render/null-render-context.d.ts +2 -20
- package/dist/render/null-render-context.d.ts.map +1 -1
- package/dist/render/null-render-context.js +2 -20
- package/dist/render/null-render-context.js.map +1 -1
- package/dist/render/render-context2d.d.ts +52 -208
- package/dist/render/render-context2d.d.ts.map +1 -1
- package/dist/render/render-context2d.js.map +1 -1
- package/dist/render/surface.d.ts +2 -19
- package/dist/render/surface.d.ts.map +1 -1
- package/dist/render/surface.js.map +1 -1
- package/dist/render/text-defaults.d.ts +1 -17
- package/dist/render/text-defaults.d.ts.map +1 -1
- package/dist/render/text-defaults.js +6 -40
- package/dist/render/text-defaults.js.map +1 -1
- package/dist/render/text-layout.d.ts +12 -55
- package/dist/render/text-layout.d.ts.map +1 -1
- package/dist/render/text-layout.js +2 -16
- package/dist/render/text-layout.js.map +1 -1
- package/dist/render3d/bounds3d.d.ts +10 -32
- package/dist/render3d/bounds3d.d.ts.map +1 -1
- package/dist/render3d/bounds3d.js +2 -12
- package/dist/render3d/bounds3d.js.map +1 -1
- package/dist/render3d/builders.d.ts +8 -35
- package/dist/render3d/builders.d.ts.map +1 -1
- package/dist/render3d/builders.js +8 -35
- package/dist/render3d/builders.js.map +1 -1
- package/dist/render3d/camera.d.ts +10 -57
- package/dist/render3d/camera.d.ts.map +1 -1
- package/dist/render3d/camera.js +4 -26
- package/dist/render3d/camera.js.map +1 -1
- package/dist/render3d/fill3d.d.ts +7 -45
- package/dist/render3d/fill3d.d.ts.map +1 -1
- package/dist/render3d/fill3d.js +15 -85
- package/dist/render3d/fill3d.js.map +1 -1
- package/dist/render3d/geometry.d.ts +18 -106
- package/dist/render3d/geometry.d.ts.map +1 -1
- package/dist/render3d/geometry.js +2 -20
- package/dist/render3d/geometry.js.map +1 -1
- package/dist/render3d/graphics3d.d.ts +29 -133
- package/dist/render3d/graphics3d.d.ts.map +1 -1
- package/dist/render3d/graphics3d.js +23 -110
- package/dist/render3d/graphics3d.js.map +1 -1
- package/dist/render3d/index.d.ts +1 -16
- package/dist/render3d/index.d.ts.map +1 -1
- package/dist/render3d/index.js +1 -16
- package/dist/render3d/index.js.map +1 -1
- package/dist/render3d/inert.d.ts.map +1 -1
- package/dist/render3d/inert.js +1 -14
- package/dist/render3d/inert.js.map +1 -1
- package/dist/render3d/light.d.ts +3 -26
- package/dist/render3d/light.d.ts.map +1 -1
- package/dist/render3d/light.js.map +1 -1
- package/dist/render3d/material.d.ts +13 -87
- package/dist/render3d/material.d.ts.map +1 -1
- package/dist/render3d/material.js +2 -16
- package/dist/render3d/material.js.map +1 -1
- package/dist/render3d/matrix4.d.ts +14 -68
- package/dist/render3d/matrix4.d.ts.map +1 -1
- package/dist/render3d/matrix4.js +11 -60
- package/dist/render3d/matrix4.js.map +1 -1
- package/dist/render3d/render-context3d.d.ts +13 -51
- package/dist/render3d/render-context3d.d.ts.map +1 -1
- package/dist/render3d/render-context3d.js +9 -21
- package/dist/render3d/render-context3d.js.map +1 -1
- package/dist/render3d/resources.d.ts +9 -53
- package/dist/render3d/resources.d.ts.map +1 -1
- package/dist/render3d/resources.js +8 -48
- package/dist/render3d/resources.js.map +1 -1
- package/dist/render3d/rounded-box.d.ts +7 -21
- package/dist/render3d/rounded-box.d.ts.map +1 -1
- package/dist/render3d/rounded-box.js +7 -46
- package/dist/render3d/rounded-box.js.map +1 -1
- package/dist/render3d/scene-settings.d.ts +20 -78
- package/dist/render3d/scene-settings.d.ts.map +1 -1
- package/dist/render3d/scene-settings.js.map +1 -1
- package/dist/render3d/scene3d.d.ts +11 -53
- package/dist/render3d/scene3d.d.ts.map +1 -1
- package/dist/render3d/scene3d.js +12 -59
- package/dist/render3d/scene3d.js.map +1 -1
- package/dist/render3d/segments.d.ts +2 -25
- package/dist/render3d/segments.d.ts.map +1 -1
- package/dist/render3d/segments.js +1 -11
- package/dist/render3d/segments.js.map +1 -1
- package/dist/render3d/texture.d.ts +25 -112
- package/dist/render3d/texture.d.ts.map +1 -1
- package/dist/render3d/texture.js +3 -27
- package/dist/render3d/texture.js.map +1 -1
- package/dist/render3d/tracking.d.ts +2 -19
- package/dist/render3d/tracking.d.ts.map +1 -1
- package/dist/render3d/tracking.js +2 -19
- package/dist/render3d/tracking.js.map +1 -1
- package/dist/render3d/transform.d.ts +14 -60
- package/dist/render3d/transform.d.ts.map +1 -1
- package/dist/render3d/transform.js +0 -2
- package/dist/render3d/transform.js.map +1 -1
- package/dist/render3d/vector3.d.ts +6 -48
- package/dist/render3d/vector3.d.ts.map +1 -1
- package/dist/render3d/vector3.js +4 -38
- package/dist/render3d/vector3.js.map +1 -1
- package/dist/render3d/walk.d.ts +3 -27
- package/dist/render3d/walk.d.ts.map +1 -1
- package/dist/render3d/walk.js +5 -33
- package/dist/render3d/walk.js.map +1 -1
- package/dist/runtime/asset-refine.d.ts +34 -20
- package/dist/runtime/asset-refine.d.ts.map +1 -1
- package/dist/runtime/asset-refine.js +127 -31
- package/dist/runtime/asset-refine.js.map +1 -1
- package/dist/runtime/asset-timeline.d.ts +14 -53
- package/dist/runtime/asset-timeline.d.ts.map +1 -1
- package/dist/runtime/asset-timeline.js +6 -27
- package/dist/runtime/asset-timeline.js.map +1 -1
- package/dist/runtime/asset-update.d.ts +7 -26
- package/dist/runtime/asset-update.d.ts.map +1 -1
- package/dist/runtime/asset-update.js +6 -18
- package/dist/runtime/asset-update.js.map +1 -1
- package/dist/runtime/audio-index.d.ts +0 -2
- package/dist/runtime/audio-index.d.ts.map +1 -1
- package/dist/runtime/audio-index.js +0 -2
- package/dist/runtime/audio-index.js.map +1 -1
- package/dist/runtime/builtin-context.d.ts +3 -9
- package/dist/runtime/builtin-context.d.ts.map +1 -1
- package/dist/runtime/builtin-context.js +3 -9
- package/dist/runtime/builtin-context.js.map +1 -1
- package/dist/runtime/clip-instance.d.ts +12 -39
- package/dist/runtime/clip-instance.d.ts.map +1 -1
- package/dist/runtime/clip-instance.js +21 -45
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.d.ts +26 -68
- package/dist/runtime/clip-store.d.ts.map +1 -1
- package/dist/runtime/clip-store.js +47 -81
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.d.ts +31 -85
- package/dist/runtime/engine.d.ts.map +1 -1
- package/dist/runtime/engine.js +16 -49
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/frame-time.d.ts +4 -15
- package/dist/runtime/frame-time.d.ts.map +1 -1
- package/dist/runtime/frame-time.js +5 -12
- package/dist/runtime/frame-time.js.map +1 -1
- package/dist/runtime/index.d.ts +0 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +0 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/node-picking.d.ts +59 -139
- package/dist/runtime/node-picking.d.ts.map +1 -1
- package/dist/runtime/node-picking.js +87 -157
- package/dist/runtime/node-picking.js.map +1 -1
- package/dist/runtime/node-picking3d.d.ts +39 -96
- package/dist/runtime/node-picking3d.d.ts.map +1 -1
- package/dist/runtime/node-picking3d.js +98 -141
- package/dist/runtime/node-picking3d.js.map +1 -1
- package/dist/runtime/placement.d.ts +8 -17
- package/dist/runtime/placement.d.ts.map +1 -1
- package/dist/runtime/placement.js +7 -16
- package/dist/runtime/placement.js.map +1 -1
- package/dist/runtime/playback-controller.d.ts +78 -207
- package/dist/runtime/playback-controller.d.ts.map +1 -1
- package/dist/runtime/playback-controller.js +111 -226
- package/dist/runtime/playback-controller.js.map +1 -1
- package/dist/runtime/playback.d.ts +6 -14
- package/dist/runtime/playback.d.ts.map +1 -1
- package/dist/runtime/playback.js +6 -14
- package/dist/runtime/playback.js.map +1 -1
- package/dist/runtime/project-assets.d.ts +6 -14
- package/dist/runtime/project-assets.d.ts.map +1 -1
- package/dist/runtime/project-assets.js +7 -16
- package/dist/runtime/project-assets.js.map +1 -1
- package/dist/runtime/session.d.ts +22 -45
- package/dist/runtime/session.d.ts.map +1 -1
- package/dist/runtime/session.js +26 -46
- package/dist/runtime/session.js.map +1 -1
- package/dist/runtime/settle.d.ts +4 -10
- package/dist/runtime/settle.d.ts.map +1 -1
- package/dist/runtime/settle.js +4 -10
- package/dist/runtime/settle.js.map +1 -1
- package/dist/runtime/state-evaluator.d.ts +15 -37
- package/dist/runtime/state-evaluator.d.ts.map +1 -1
- package/dist/runtime/state-evaluator.js +27 -44
- package/dist/runtime/state-evaluator.js.map +1 -1
- package/dist/runtime/text-geometry.d.ts +18 -47
- package/dist/runtime/text-geometry.d.ts.map +1 -1
- package/dist/runtime/text-geometry.js +13 -27
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.d.ts +1 -7
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +30 -138
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command-decorator.d.ts +6 -26
- package/dist/tween/command-decorator.d.ts.map +1 -1
- package/dist/tween/command-decorator.js +1 -6
- package/dist/tween/command-decorator.js.map +1 -1
- package/dist/tween/command.d.ts +6 -53
- package/dist/tween/command.d.ts.map +1 -1
- package/dist/tween/command.js +5 -40
- package/dist/tween/command.js.map +1 -1
- package/dist/tween/ease/curve.d.ts +2 -17
- package/dist/tween/ease/curve.d.ts.map +1 -1
- package/dist/tween/ease/curve.js +1 -6
- package/dist/tween/ease/curve.js.map +1 -1
- package/dist/tween/ease/describe.d.ts +0 -11
- package/dist/tween/ease/describe.d.ts.map +1 -1
- package/dist/tween/ease/describe.js +0 -23
- package/dist/tween/ease/describe.js.map +1 -1
- package/dist/tween/ease/spec.d.ts +2 -18
- package/dist/tween/ease/spec.d.ts.map +1 -1
- package/dist/tween/ease/spec.js.map +1 -1
- package/dist/tween/inert.d.ts +1 -14
- package/dist/tween/inert.d.ts.map +1 -1
- package/dist/tween/inert.js +1 -14
- package/dist/tween/inert.js.map +1 -1
- package/dist/tween/lerp.d.ts +2 -26
- package/dist/tween/lerp.d.ts.map +1 -1
- package/dist/tween/lerp.js +2 -26
- package/dist/tween/lerp.js.map +1 -1
- package/dist/tween/loop.d.ts +9 -50
- package/dist/tween/loop.d.ts.map +1 -1
- package/dist/tween/loop.js +6 -31
- package/dist/tween/loop.js.map +1 -1
- package/dist/tween/prepare.d.ts +2 -30
- package/dist/tween/prepare.d.ts.map +1 -1
- package/dist/tween/prepare.js +2 -30
- package/dist/tween/prepare.js.map +1 -1
- package/dist/tween/stepper.d.ts +4 -25
- package/dist/tween/stepper.d.ts.map +1 -1
- package/dist/tween/stepper.js.map +1 -1
- package/dist/tween/to-command.d.ts +1 -8
- package/dist/tween/to-command.d.ts.map +1 -1
- package/dist/tween/to-command.js +2 -25
- package/dist/tween/to-command.js.map +1 -1
- package/dist/util/context.d.ts +4 -29
- package/dist/util/context.d.ts.map +1 -1
- package/dist/util/context.js +3 -15
- package/dist/util/context.js.map +1 -1
- package/dist/util/csv.d.ts +4 -29
- package/dist/util/csv.d.ts.map +1 -1
- package/dist/util/csv.js +3 -22
- package/dist/util/csv.js.map +1 -1
- package/dist/util/metrics.d.ts +2 -26
- package/dist/util/metrics.d.ts.map +1 -1
- package/dist/util/metrics.js +2 -26
- package/dist/util/metrics.js.map +1 -1
- package/dist/util/random.d.ts +20 -87
- package/dist/util/random.d.ts.map +1 -1
- package/dist/util/random.js +20 -87
- package/dist/util/random.js.map +1 -1
- package/dist/util/reference.d.ts +6 -35
- package/dist/util/reference.d.ts.map +1 -1
- package/dist/util/reference.js +1 -4
- package/dist/util/reference.js.map +1 -1
- package/dist/util/scheduler.d.ts +6 -27
- package/dist/util/scheduler.d.ts.map +1 -1
- package/dist/util/scheduler.js +8 -35
- package/dist/util/scheduler.js.map +1 -1
- package/package.json +1 -1
- package/dist/browser/chunks/chunk-4BDLFEOC.js.map +0 -7
- package/dist/browser/chunks/chunk-CCGVIR4F.js.map +0 -7
- package/dist/browser/chunks/chunk-N4WSN5WY.js +0 -13
- package/dist/browser/chunks/chunk-N4WSN5WY.js.map +0 -7
- package/dist/browser/chunks/chunk-WZSI3GSK.js +0 -6
- package/dist/browser/chunks/chunk-WZSI3GSK.js.map +0 -7
- package/dist/renamed-scene-names.d.ts +0 -17
- package/dist/renamed-scene-names.d.ts.map +0 -1
- package/dist/renamed-scene-names.js +0 -9
- package/dist/renamed-scene-names.js.map +0 -1
- package/dist/runtime/precompisition.d.ts +0 -24
- package/dist/runtime/precompisition.d.ts.map +0 -1
- package/dist/runtime/precompisition.js +0 -7
- package/dist/runtime/precompisition.js.map +0 -1
|
@@ -10,7 +10,6 @@ import { type NodeEditorStates } from "../components/trees/node/node-editor-stat
|
|
|
10
10
|
import { Canvas2D } from "../components/trees/root/canvas2d-node.js";
|
|
11
11
|
import type { MeasureContext2D } from "../render/measure-context.js";
|
|
12
12
|
import type { RenderPass2D } from "../render/render-context2d.js";
|
|
13
|
-
/** What a clip is built and measured against — the same for every track in a session. */
|
|
14
13
|
export interface RuntimeScope {
|
|
15
14
|
registry: Registry;
|
|
16
15
|
viewport: Size2D;
|
|
@@ -19,41 +18,29 @@ export interface RuntimeScope {
|
|
|
19
18
|
measurer: MeasureContext2D;
|
|
20
19
|
}
|
|
21
20
|
/**
|
|
22
|
-
* One track's clip, live: the viewport-sized {@link Canvas2D} it builds into and
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* Built once, then asked for a time. Nothing resets one — a caller that needs a
|
|
26
|
-
* fresh tree builds a new instance — which is what lets the measuring pass and
|
|
27
|
-
* the evaluator each hold their own instead of taking turns with one.
|
|
21
|
+
* One track's clip, live: the viewport-sized {@link Canvas2D} it builds into and the timeline compiled over
|
|
22
|
+
* it. Built once, then asked for a time. Nothing resets one (a caller needing a fresh tree builds a new
|
|
23
|
+
* instance), so the measuring pass and the evaluator each hold their own instead of taking turns.
|
|
28
24
|
*/
|
|
29
25
|
export declare class ClipInstance {
|
|
30
26
|
private readonly _scope;
|
|
31
27
|
readonly canvas: Canvas2D;
|
|
32
28
|
constructor(clip: ClipDocument, duration: number, _scope: RuntimeScope);
|
|
33
29
|
get duration(): number;
|
|
34
|
-
/** The clip document this instance plays, as handed in — before audio lowering. */
|
|
35
30
|
get clip(): ClipDocument;
|
|
36
|
-
/**
|
|
37
|
-
* Build the tree, then fix every command against it laid out — see `ClipTimeline.compile`.
|
|
38
|
-
* `measurer` stands in for the scope's during the build only.
|
|
39
|
-
*/
|
|
31
|
+
/** See `ClipTimeline.compile`. `measurer` stands in for the scope's during the build only. */
|
|
40
32
|
build(measurer?: MeasureContext2D): void;
|
|
41
33
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* (see `planTimelinePatch`); the tree is untouched then. A throw leaves the tree
|
|
45
|
-
* unusable — the caller disposes it and builds fresh.
|
|
34
|
+
* `false` means the change needs a fresh instance (see `planTimelinePatch`); the tree is untouched then. A
|
|
35
|
+
* throw leaves the tree unusable: dispose it and build fresh.
|
|
46
36
|
*/
|
|
47
37
|
update(next: ClipDocument, duration: number): boolean;
|
|
48
|
-
/** {@link update}'s plan, for a caller that has to look at the tree before it changes. */
|
|
49
38
|
planUpdate(next: ClipDocument): TimelinePatch | null;
|
|
50
39
|
applyUpdate(patch: TimelinePatch, next: ClipDocument, duration: number, measurer?: MeasureContext2D): void;
|
|
51
|
-
/** Every command as compiled, with what each writes — see `ClipTimeline.placedCommands`. */
|
|
52
40
|
placedCommands(): readonly PlacedCommandInfo[];
|
|
53
|
-
/** What the build stepped around instead of failing — see `ClipTimeline.issues`. */
|
|
54
41
|
issues(): TimelineIssue[];
|
|
55
42
|
commandSounds(): PlacedSound[];
|
|
56
|
-
/**
|
|
43
|
+
/** The presence is put back after. */
|
|
57
44
|
atPresence<T>(seconds: number, read: () => T): T;
|
|
58
45
|
evaluateAt(seconds: number, onWrite?: (index: number, slot: PropSlot<unknown>) => void): void;
|
|
59
46
|
attach(seconds: number, editor?: NodeEditorStates): void;
|
|
@@ -61,30 +48,17 @@ export declare class ClipInstance {
|
|
|
61
48
|
render(pass: RenderPass2D): void;
|
|
62
49
|
sample(): void;
|
|
63
50
|
primeMotion(at: number): void;
|
|
64
|
-
/** The node a document row built, mounted or not; the canvas for the root. */
|
|
65
51
|
node(rowId: string): Node | undefined;
|
|
66
|
-
/** What a document row holds before any command acts on it — see `ClipTimeline.baselineProps`. */
|
|
67
52
|
baselineProps(rowId: string): Record<string, unknown> | undefined;
|
|
68
|
-
/** Every document row's effective span, the root's excepted. */
|
|
69
53
|
rowSpans(): NodeSpan[];
|
|
70
|
-
/** One row's effective span — `undefined` for the root, which spans the clip, and for an id no row has. */
|
|
71
54
|
rowSpan(id: string): NodeSpan | undefined;
|
|
72
|
-
/**
|
|
73
|
-
* `node`'s owner key as {@link forEachOwner} spells it, mounted or not —
|
|
74
|
-
* `undefined` for a node no row built.
|
|
75
|
-
*/
|
|
76
55
|
ownerKeyOf(node: Node): string | undefined;
|
|
77
|
-
/**
|
|
78
|
-
* When `node` is in the tree, in clip seconds: its document row's effective
|
|
79
|
-
* span, or the nearest row ancestor's for a node a composite built. The canvas
|
|
80
|
-
* spans the clip. `undefined` for a node outside this tree.
|
|
81
|
-
*/
|
|
56
|
+
/** A composite-built node takes the nearest row ancestor's span. The canvas spans the clip. */
|
|
82
57
|
spanOf(node: Node): NodeSpan | undefined;
|
|
83
58
|
/**
|
|
84
|
-
* Visit every mounted node, parents first, with its span,
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
* root changes whenever an earlier sibling enters or leaves; this does neither.
|
|
59
|
+
* Visit every mounted node, parents first, with its span, structural path and owner key: the nearest row's id
|
|
60
|
+
* plus the path below that row for a composite-built node. A UUID changes on every build and a root path
|
|
61
|
+
* whenever an earlier sibling enters or leaves; this does neither.
|
|
88
62
|
*/
|
|
89
63
|
forEachOwner(visit: (node: Node, ownerKey: string, span: NodeSpan, path: string) => void): void;
|
|
90
64
|
dispose(): void;
|
|
@@ -95,8 +69,7 @@ export declare class ClipInstance {
|
|
|
95
69
|
private readonly _rows;
|
|
96
70
|
private _indexRows;
|
|
97
71
|
/**
|
|
98
|
-
*
|
|
99
|
-
* as the id, because a composite can hand its own id down to a child it builds.
|
|
72
|
+
* The parent is checked as well as the id, because a composite can hand its own id down to a child it builds.
|
|
100
73
|
*/
|
|
101
74
|
private _rowSpan;
|
|
102
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clip-instance.d.ts","sourceRoot":"","sources":["../../src/runtime/clip-instance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,KAAK,EAAE,QAAQ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@ -7,12 +7,9 @@ import { Canvas2D } from "../components/trees/root/canvas2d-node.js";
|
|
|
7
7
|
import { nodePath } from "../project/tree.js";
|
|
8
8
|
import { ContextMap } from "../util/context.js";
|
|
9
9
|
/**
|
|
10
|
-
* One track's clip, live: the viewport-sized {@link Canvas2D} it builds into and
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* Built once, then asked for a time. Nothing resets one — a caller that needs a
|
|
14
|
-
* fresh tree builds a new instance — which is what lets the measuring pass and
|
|
15
|
-
* the evaluator each hold their own instead of taking turns with one.
|
|
10
|
+
* One track's clip, live: the viewport-sized {@link Canvas2D} it builds into and the timeline compiled over
|
|
11
|
+
* it. Built once, then asked for a time. Nothing resets one (a caller needing a fresh tree builds a new
|
|
12
|
+
* instance), so the measuring pass and the evaluator each hold their own instead of taking turns.
|
|
16
13
|
*/
|
|
17
14
|
export class ClipInstance {
|
|
18
15
|
_scope;
|
|
@@ -23,10 +20,11 @@ export class ClipInstance {
|
|
|
23
20
|
this._duration = duration;
|
|
24
21
|
this._doc = lowered(clip);
|
|
25
22
|
const { width, height } = _scope.viewport;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Seeded here because this canvas is the document's root row yet the one node no `Registry.instantiate` makes:
|
|
25
|
+
* `ClipTimeline` applies that row's props with `set()`, which writes property fields only, so an unseeded root
|
|
26
|
+
* would report a UUID no document row mentions.
|
|
27
|
+
*/
|
|
30
28
|
this.canvas = new Canvas2D({ id: ROOT_NODE_ID, width, height, flow: "freeform" });
|
|
31
29
|
this._timeline = new ClipTimeline(this._doc, _scope.registry, this.canvas);
|
|
32
30
|
this._indexRows();
|
|
@@ -34,14 +32,10 @@ export class ClipInstance {
|
|
|
34
32
|
get duration() {
|
|
35
33
|
return this._duration;
|
|
36
34
|
}
|
|
37
|
-
/** The clip document this instance plays, as handed in — before audio lowering. */
|
|
38
35
|
get clip() {
|
|
39
36
|
return this._clip;
|
|
40
37
|
}
|
|
41
|
-
/**
|
|
42
|
-
* Build the tree, then fix every command against it laid out — see `ClipTimeline.compile`.
|
|
43
|
-
* `measurer` stands in for the scope's during the build only.
|
|
44
|
-
*/
|
|
38
|
+
/** See `ClipTimeline.compile`. `measurer` stands in for the scope's during the build only. */
|
|
45
39
|
build(measurer = this._scope.measurer) {
|
|
46
40
|
this.attach(0);
|
|
47
41
|
this._timeline.build();
|
|
@@ -54,10 +48,8 @@ export class ClipInstance {
|
|
|
54
48
|
this.layout(measurer);
|
|
55
49
|
}
|
|
56
50
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* (see `planTimelinePatch`); the tree is untouched then. A throw leaves the tree
|
|
60
|
-
* unusable — the caller disposes it and builds fresh.
|
|
51
|
+
* `false` means the change needs a fresh instance (see `planTimelinePatch`); the tree is untouched then. A
|
|
52
|
+
* throw leaves the tree unusable: dispose it and build fresh.
|
|
61
53
|
*/
|
|
62
54
|
update(next, duration) {
|
|
63
55
|
if (next === this._clip) {
|
|
@@ -70,7 +62,6 @@ export class ClipInstance {
|
|
|
70
62
|
this.applyUpdate(patch, next, duration);
|
|
71
63
|
return true;
|
|
72
64
|
}
|
|
73
|
-
/** {@link update}'s plan, for a caller that has to look at the tree before it changes. */
|
|
74
65
|
planUpdate(next) {
|
|
75
66
|
return this._timeline.planUpdate(lowered(next));
|
|
76
67
|
}
|
|
@@ -87,18 +78,16 @@ export class ClipInstance {
|
|
|
87
78
|
this._duration = duration;
|
|
88
79
|
this._indexRows();
|
|
89
80
|
}
|
|
90
|
-
/** Every command as compiled, with what each writes — see `ClipTimeline.placedCommands`. */
|
|
91
81
|
placedCommands() {
|
|
92
82
|
return this._timeline.placedCommands();
|
|
93
83
|
}
|
|
94
|
-
/** What the build stepped around instead of failing — see `ClipTimeline.issues`. */
|
|
95
84
|
issues() {
|
|
96
85
|
return this._timeline.issues();
|
|
97
86
|
}
|
|
98
87
|
commandSounds() {
|
|
99
88
|
return this._timeline.commandSounds();
|
|
100
89
|
}
|
|
101
|
-
/**
|
|
90
|
+
/** The presence is put back after. */
|
|
102
91
|
atPresence(seconds, read) {
|
|
103
92
|
const was = this._timeline.presenceTime;
|
|
104
93
|
this._timeline.syncPresence(seconds);
|
|
@@ -115,9 +104,10 @@ export class ClipInstance {
|
|
|
115
104
|
}
|
|
116
105
|
attach(seconds, editor) {
|
|
117
106
|
this.canvas.attach({ assets: this._scope.assets, context: ContextMap.EMPTY, time: seconds });
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
107
|
+
/**
|
|
108
|
+
* Before layout, so a node that appeared this frame gets its editor state on that frame, and a hidden one is
|
|
109
|
+
* out of the flow before it is measured.
|
|
110
|
+
*/
|
|
121
111
|
applyEditorStates(this.canvas, editor);
|
|
122
112
|
}
|
|
123
113
|
layout(measurer = this._scope.measurer) {
|
|
@@ -133,26 +123,18 @@ export class ClipInstance {
|
|
|
133
123
|
primeMotion(at) {
|
|
134
124
|
primeMotionTree(this.canvas, at);
|
|
135
125
|
}
|
|
136
|
-
/** The node a document row built, mounted or not; the canvas for the root. */
|
|
137
126
|
node(rowId) {
|
|
138
127
|
return this._timeline.liveNode(rowId);
|
|
139
128
|
}
|
|
140
|
-
/** What a document row holds before any command acts on it — see `ClipTimeline.baselineProps`. */
|
|
141
129
|
baselineProps(rowId) {
|
|
142
130
|
return this._timeline.baselineProps(rowId);
|
|
143
131
|
}
|
|
144
|
-
/** Every document row's effective span, the root's excepted. */
|
|
145
132
|
rowSpans() {
|
|
146
133
|
return [...this._rows.values()].map((row) => row.span);
|
|
147
134
|
}
|
|
148
|
-
/** One row's effective span — `undefined` for the root, which spans the clip, and for an id no row has. */
|
|
149
135
|
rowSpan(id) {
|
|
150
136
|
return this._rows.get(id)?.span;
|
|
151
137
|
}
|
|
152
|
-
/**
|
|
153
|
-
* `node`'s owner key as {@link forEachOwner} spells it, mounted or not —
|
|
154
|
-
* `undefined` for a node no row built.
|
|
155
|
-
*/
|
|
156
138
|
ownerKeyOf(node) {
|
|
157
139
|
let below = "";
|
|
158
140
|
for (let current = node;;) {
|
|
@@ -168,11 +150,7 @@ export class ClipInstance {
|
|
|
168
150
|
current = parent;
|
|
169
151
|
}
|
|
170
152
|
}
|
|
171
|
-
/**
|
|
172
|
-
* When `node` is in the tree, in clip seconds: its document row's effective
|
|
173
|
-
* span, or the nearest row ancestor's for a node a composite built. The canvas
|
|
174
|
-
* spans the clip. `undefined` for a node outside this tree.
|
|
175
|
-
*/
|
|
153
|
+
/** A composite-built node takes the nearest row ancestor's span. The canvas spans the clip. */
|
|
176
154
|
spanOf(node) {
|
|
177
155
|
for (let current = node; current; current = current.parent) {
|
|
178
156
|
if (current === this.canvas)
|
|
@@ -184,10 +162,9 @@ export class ClipInstance {
|
|
|
184
162
|
return undefined;
|
|
185
163
|
}
|
|
186
164
|
/**
|
|
187
|
-
* Visit every mounted node, parents first, with its span,
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
* root changes whenever an earlier sibling enters or leaves; this does neither.
|
|
165
|
+
* Visit every mounted node, parents first, with its span, structural path and owner key: the nearest row's id
|
|
166
|
+
* plus the path below that row for a composite-built node. A UUID changes on every build and a root path
|
|
167
|
+
* whenever an earlier sibling enters or leaves; this does neither.
|
|
191
168
|
*/
|
|
192
169
|
forEachOwner(visit) {
|
|
193
170
|
const walk = (node, row, below, span, path) => {
|
|
@@ -227,8 +204,7 @@ export class ClipInstance {
|
|
|
227
204
|
}
|
|
228
205
|
}
|
|
229
206
|
/**
|
|
230
|
-
*
|
|
231
|
-
* as the id, because a composite can hand its own id down to a child it builds.
|
|
207
|
+
* The parent is checked as well as the id, because a composite can hand its own id down to a child it builds.
|
|
232
208
|
*/
|
|
233
209
|
_rowSpan(node) {
|
|
234
210
|
const row = this._rows.get(node.id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clip-instance.js","sourceRoot":"","sources":["../../src/runtime/clip-instance.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE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AAG,IAAI,CAAC,MAAM,CAAC;QAC3B,MAAM,MAAM,GAAG,GAAG,CAAC,QAAQ,KAAK,IAAI,IAAI,GAAG,CAAC,QAAQ,KAAK,YAAY;YACjE,CAAC,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM;YACxB,CAAC,CAAC,MAAM,KAAK,IAAI,IAAI,MAAM,CAAC,EAAE,KAAK,GAAG,CAAC,QAAQ,CAAC;QACpD,OAAO,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IACzC,CAAC;CACJ;AAED,SAAS,OAAO,CAAC,IAAkB;IAC/B,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["import type { AssetCatalog } from \"@/assets/catalog\";\nimport type { Size2D } from \"@/attributes/layout/size\";\nimport { clipDocument } from \"@/document/audio\";\nimport type { Registry } from \"@/document/registry\";\nimport { ClipTimeline, type PlacedCommandInfo, type PlacedSound, type TimelineIssue } from \"@/document/timeline\";\nimport type { TimelinePatch } from \"@/document/timeline-patch\";\nimport type { PropSlot } from \"@/props/slot\";\nimport {\n effectiveSpans,\n ROOT_NODE_ID,\n type ClipDocument,\n type NodeSpan,\n type VisualDocument,\n} from \"@/document/types\";\nimport type { Node } from \"@/components/trees/node/node\";\nimport { applyEditorStates, type NodeEditorStates } from \"@/components/trees/node/node-editor-state\";\nimport { primeMotionTree, sampleTree } from \"@/components/trees/node/node-walk\";\nimport { Canvas2D } from \"@/components/trees/root/canvas2d-node\";\nimport { nodePath } from \"@/project/tree\";\nimport type { MeasureContext2D } from \"@/render/measure-context\";\nimport type { RenderPass2D } from \"@/render/render-context2d\";\nimport { ContextMap } from \"@/util/context\";\n\n/** What a clip is built and measured against — the same for every track in a session. */\nexport interface RuntimeScope {\n registry: Registry;\n viewport: Size2D;\n fps: number;\n assets: AssetCatalog;\n measurer: MeasureContext2D;\n}\n\n/**\n * One track's clip, live: the viewport-sized {@link Canvas2D} it builds into and\n * the timeline compiled over it.\n *\n * Built once, then asked for a time. Nothing resets one — a caller that needs a\n * fresh tree builds a new instance — which is what lets the measuring pass and\n * the evaluator each hold their own instead of taking turns with one.\n */\nexport class ClipInstance {\n readonly canvas: Canvas2D;\n\n constructor(clip: ClipDocument, duration: number, private readonly _scope: RuntimeScope) {\n this._clip = clip;\n this._duration = duration;\n this._doc = lowered(clip);\n const { width, height } = _scope.viewport;\n // Seeded here because this canvas *is* the document's root row, yet it is\n // the one node no `Registry.instantiate` makes: `ClipTimeline` applies\n // that row's props with `set()`, which writes property fields only, so\n // an unseeded root would report a UUID no document row mentions.\n this.canvas = new Canvas2D({ id: ROOT_NODE_ID, width, height, flow: \"freeform\" });\n this._timeline = new ClipTimeline(this._doc, _scope.registry, this.canvas);\n this._indexRows();\n }\n\n get duration(): number {\n return this._duration;\n }\n\n /** The clip document this instance plays, as handed in — before audio lowering. */\n get clip(): ClipDocument {\n return this._clip;\n }\n\n /**\n * Build the tree, then fix every command against it laid out — see `ClipTimeline.compile`.\n * `measurer` stands in for the scope's during the build only.\n */\n build(measurer: MeasureContext2D = this._scope.measurer): void {\n this.attach(0);\n this._timeline.build();\n this.sample();\n this.layout(measurer);\n this._timeline.compile(() => {\n this.sample();\n this.layout(measurer);\n });\n this.layout(measurer);\n }\n\n /**\n * Patch the built tree to play `next`, re-instantiating and recompiling only\n * what the difference touches. `false` means the change needs a fresh instance\n * (see `planTimelinePatch`); the tree is untouched then. A throw leaves the tree\n * unusable — the caller disposes it and builds fresh.\n */\n update(next: ClipDocument, duration: number): boolean {\n if (next === this._clip) {\n this._duration = duration;\n return true;\n }\n const patch = this.planUpdate(next);\n if (!patch) return false;\n this.applyUpdate(patch, next, duration);\n return true;\n }\n\n /** {@link update}'s plan, for a caller that has to look at the tree before it changes. */\n planUpdate(next: ClipDocument): TimelinePatch | null {\n return this._timeline.planUpdate(lowered(next));\n }\n\n applyUpdate(\n patch: TimelinePatch,\n next: ClipDocument,\n duration: number,\n measurer: MeasureContext2D = this._scope.measurer,\n ): void {\n this.attach(0);\n const relayout = () => {\n this.sample();\n this.layout(measurer);\n };\n this._timeline.applyUpdate(patch, relayout, relayout);\n this.layout(measurer);\n this._clip = next;\n this._doc = patch.next.doc;\n this._duration = duration;\n this._indexRows();\n }\n\n /** Every command as compiled, with what each writes — see `ClipTimeline.placedCommands`. */\n placedCommands(): readonly PlacedCommandInfo[] {\n return this._timeline.placedCommands();\n }\n\n /** What the build stepped around instead of failing — see `ClipTimeline.issues`. */\n issues(): TimelineIssue[] {\n return this._timeline.issues();\n }\n\n commandSounds(): PlacedSound[] {\n return this._timeline.commandSounds();\n }\n\n /** `read`, with the tree's presence as it stands at `seconds`; the presence is put back after. */\n atPresence<T>(seconds: number, read: () => T): T {\n const was = this._timeline.presenceTime;\n this._timeline.syncPresence(seconds);\n try {\n return read();\n } finally {\n this._timeline.syncPresence(was);\n }\n }\n\n evaluateAt(seconds: number, onWrite?: (index: number, slot: PropSlot<unknown>) => void): void {\n this._timeline.syncPresence(seconds);\n this._timeline.evaluateAt(seconds, onWrite);\n }\n\n attach(seconds: number, editor?: NodeEditorStates): void {\n this.canvas.attach({ assets: this._scope.assets, context: ContextMap.EMPTY, time: seconds });\n // Before layout, so a node that appeared this frame gets its editor state\n // on the frame it appears — and a hidden one is out of the flow before it\n // is measured.\n applyEditorStates(this.canvas, editor);\n }\n\n layout(measurer: MeasureContext2D = this._scope.measurer): void {\n const { width, height } = this._scope.viewport;\n this.canvas.layout({ x: 0, y: 0, width, height }, measurer);\n }\n\n render(pass: RenderPass2D): void {\n this.canvas.render(pass);\n }\n\n sample(): void {\n sampleTree(this.canvas);\n }\n\n primeMotion(at: number): void {\n primeMotionTree(this.canvas, at);\n }\n\n /** The node a document row built, mounted or not; the canvas for the root. */\n node(rowId: string): Node | undefined {\n return this._timeline.liveNode(rowId);\n }\n\n /** What a document row holds before any command acts on it — see `ClipTimeline.baselineProps`. */\n baselineProps(rowId: string): Record<string, unknown> | undefined {\n return this._timeline.baselineProps(rowId);\n }\n\n /** Every document row's effective span, the root's excepted. */\n rowSpans(): NodeSpan[] {\n return [...this._rows.values()].map((row) => row.span);\n }\n\n /** One row's effective span — `undefined` for the root, which spans the clip, and for an id no row has. */\n rowSpan(id: string): NodeSpan | undefined {\n return this._rows.get(id)?.span;\n }\n\n /**\n * `node`'s owner key as {@link forEachOwner} spells it, mounted or not —\n * `undefined` for a node no row built.\n */\n ownerKeyOf(node: Node): string | undefined {\n let below = \"\";\n for (let current: Node = node; ;) {\n if (current === this.canvas || this._timeline.liveNode(current.id) === current) {\n const row = current === this.canvas ? ROOT_NODE_ID : current.id;\n return below === \"\" ? row : `${row}/${below}`;\n }\n const parent = current.parent;\n if (!parent) return undefined;\n const index = parent._allChildren.indexOf(current);\n below = below === \"\" ? String(index) : `${index}.${below}`;\n current = parent;\n }\n }\n\n /**\n * When `node` is in the tree, in clip seconds: its document row's effective\n * span, or the nearest row ancestor's for a node a composite built. The canvas\n * spans the clip. `undefined` for a node outside this tree.\n */\n spanOf(node: Node): NodeSpan | undefined {\n for (let current: Node | null = node; current; current = current.parent) {\n if (current === this.canvas) return { start: 0, end: this.duration };\n const span = this._rowSpan(current);\n if (span) return { ...span };\n }\n return undefined;\n }\n\n /**\n * Visit every mounted node, parents first, with its span, its structural path\n * and its **owner key** — the nearest row's id, plus the path below that row for\n * a node a composite built. A UUID changes on every build and a path from the\n * root changes whenever an earlier sibling enters or leaves; this does neither.\n */\n forEachOwner(visit: (node: Node, ownerKey: string, span: NodeSpan, path: string) => void): void {\n const walk = (node: Node, row: string, below: string, span: NodeSpan, path: string): void => {\n if (!node.mounted) return;\n const own = node === this.canvas ? undefined : this._rowSpan(node);\n if (own) {\n row = node.id;\n below = \"\";\n span = own;\n }\n visit(node, below === \"\" ? row : `${row}/${below}`, span, path);\n const children = node._allChildren;\n for (let i = 0; i < children.length; i++) {\n walk(children[i], row, below === \"\" ? String(i) : `${below}.${i}`, span, nodePath(path, i));\n }\n };\n walk(this.canvas, ROOT_NODE_ID, \"\", { start: 0, end: this.duration }, \"\");\n }\n\n dispose(): void {\n for (const child of this.canvas.children) child.dispose();\n this.canvas.dispose();\n }\n\n private _clip: ClipDocument;\n private _doc: VisualDocument;\n private _duration: number;\n private readonly _timeline: ClipTimeline;\n private readonly _rows = new Map<string, { parentId: string | null; span: NodeSpan }>();\n\n private _indexRows(): void {\n this._rows.clear();\n const spans = effectiveSpans(this._doc.nodes);\n for (const spec of this._doc.nodes) {\n if (spec.id === ROOT_NODE_ID) continue;\n this._rows.set(spec.id, { parentId: spec.parentId, span: spans.get(spec.id)! });\n }\n }\n\n /**\n * `node`'s row span when a document row built it. The parent is checked as well\n * as the id, because a composite can hand its own id down to a child it builds.\n */\n private _rowSpan(node: Node): NodeSpan | undefined {\n const row = this._rows.get(node.id);\n if (!row) return undefined;\n const parent = node.parent;\n const placed = row.parentId === null || row.parentId === ROOT_NODE_ID\n ? parent === this.canvas\n : parent !== null && parent.id === row.parentId;\n return placed ? row.span : undefined;\n }\n}\n\nfunction lowered(clip: ClipDocument): VisualDocument {\n return clipDocument(clip);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"clip-instance.js","sourceRoot":"","sources":["../../src/runtime/clip-instance.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAgE,MAAM,qBAAqB,CAAC;AAGjH,OAAO,EACH,cAAc,EACd,YAAY,GAIf,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,iBAAiB,EAAyB,MAAM,2CAA2C,CAAC;AACrG,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAU5C;;;;GAIG;AACH,M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AAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9C,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;YACjC,IAAI,IAAI,CAAC,EAAE,KAAK,YAAY;gBAAE,SAAS;YACvC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAE,EAAE,CAAC,CAAC;QACpF,CAAC;IACL,CAAC;IAED;;OAEG;IACK,QAAQ,CAAC,IAAU;QACvB,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACpC,IAAI,CAAC,GAAG;YAAE,OAAO,SAAS,CAAC;QAC3B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,MAAM,MAAM,GAAG,GAAG,CAAC,QAAQ,KAAK,IAAI,IAAI,GAAG,CAAC,QAAQ,KAAK,YAAY;YACjE,CAAC,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM;YACxB,CAAC,CAAC,MAAM,KAAK,IAAI,IAAI,MAAM,CAAC,EAAE,KAAK,GAAG,CAAC,QAAQ,CAAC;QACpD,OAAO,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IACzC,CAAC;CACJ;AAED,SAAS,OAAO,CAAC,IAAkB;IAC/B,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["import type { AssetCatalog } from \"@/assets/catalog\";\nimport type { Size2D } from \"@/attributes/layout/size\";\nimport { clipDocument } from \"@/document/audio\";\nimport type { Registry } from \"@/document/registry\";\nimport { ClipTimeline, type PlacedCommandInfo, type PlacedSound, type TimelineIssue } from \"@/document/timeline\";\nimport type { TimelinePatch } from \"@/document/timeline-patch\";\nimport type { PropSlot } from \"@/props/slot\";\nimport {\n effectiveSpans,\n ROOT_NODE_ID,\n type ClipDocument,\n type NodeSpan,\n type VisualDocument,\n} from \"@/document/types\";\nimport type { Node } from \"@/components/trees/node/node\";\nimport { applyEditorStates, type NodeEditorStates } from \"@/components/trees/node/node-editor-state\";\nimport { primeMotionTree, sampleTree } from \"@/components/trees/node/node-walk\";\nimport { Canvas2D } from \"@/components/trees/root/canvas2d-node\";\nimport { nodePath } from \"@/project/tree\";\nimport type { MeasureContext2D } from \"@/render/measure-context\";\nimport type { RenderPass2D } from \"@/render/render-context2d\";\nimport { ContextMap } from \"@/util/context\";\n\nexport interface RuntimeScope {\n registry: Registry;\n viewport: Size2D;\n fps: number;\n assets: AssetCatalog;\n measurer: MeasureContext2D;\n}\n\n/**\n * One track's clip, live: the viewport-sized {@link Canvas2D} it builds into and the timeline compiled over\n * it. Built once, then asked for a time. Nothing resets one (a caller needing a fresh tree builds a new\n * instance), so the measuring pass and the evaluator each hold their own instead of taking turns.\n */\nexport class ClipInstance {\n readonly canvas: Canvas2D;\n\n constructor(clip: ClipDocument, duration: number, private readonly _scope: RuntimeScope) {\n this._clip = clip;\n this._duration = duration;\n this._doc = lowered(clip);\n const { width, height } = _scope.viewport;\n /**\n * Seeded here because this canvas is the document's root row yet the one node no `Registry.instantiate` makes:\n * `ClipTimeline` applies that row's props with `set()`, which writes property fields only, so an unseeded root\n * would report a UUID no document row mentions.\n */\n this.canvas = new Canvas2D({ id: ROOT_NODE_ID, width, height, flow: \"freeform\" });\n this._timeline = new ClipTimeline(this._doc, _scope.registry, this.canvas);\n this._indexRows();\n }\n\n get duration(): number {\n return this._duration;\n }\n\n get clip(): ClipDocument {\n return this._clip;\n }\n\n /** See `ClipTimeline.compile`. `measurer` stands in for the scope's during the build only. */\n build(measurer: MeasureContext2D = this._scope.measurer): void {\n this.attach(0);\n this._timeline.build();\n this.sample();\n this.layout(measurer);\n this._timeline.compile(() => {\n this.sample();\n this.layout(measurer);\n });\n this.layout(measurer);\n }\n\n /**\n * `false` means the change needs a fresh instance (see `planTimelinePatch`); the tree is untouched then. A\n * throw leaves the tree unusable: dispose it and build fresh.\n */\n update(next: ClipDocument, duration: number): boolean {\n if (next === this._clip) {\n this._duration = duration;\n return true;\n }\n const patch = this.planUpdate(next);\n if (!patch) return false;\n this.applyUpdate(patch, next, duration);\n return true;\n }\n\n planUpdate(next: ClipDocument): TimelinePatch | null {\n return this._timeline.planUpdate(lowered(next));\n }\n\n applyUpdate(\n patch: TimelinePatch,\n next: ClipDocument,\n duration: number,\n measurer: MeasureContext2D = this._scope.measurer,\n ): void {\n this.attach(0);\n const relayout = () => {\n this.sample();\n this.layout(measurer);\n };\n this._timeline.applyUpdate(patch, relayout, relayout);\n this.layout(measurer);\n this._clip = next;\n this._doc = patch.next.doc;\n this._duration = duration;\n this._indexRows();\n }\n\n placedCommands(): readonly PlacedCommandInfo[] {\n return this._timeline.placedCommands();\n }\n\n issues(): TimelineIssue[] {\n return this._timeline.issues();\n }\n\n commandSounds(): PlacedSound[] {\n return this._timeline.commandSounds();\n }\n\n /** The presence is put back after. */\n atPresence<T>(seconds: number, read: () => T): T {\n const was = this._timeline.presenceTime;\n this._timeline.syncPresence(seconds);\n try {\n return read();\n } finally {\n this._timeline.syncPresence(was);\n }\n }\n\n evaluateAt(seconds: number, onWrite?: (index: number, slot: PropSlot<unknown>) => void): void {\n this._timeline.syncPresence(seconds);\n this._timeline.evaluateAt(seconds, onWrite);\n }\n\n attach(seconds: number, editor?: NodeEditorStates): void {\n this.canvas.attach({ assets: this._scope.assets, context: ContextMap.EMPTY, time: seconds });\n /**\n * Before layout, so a node that appeared this frame gets its editor state on that frame, and a hidden one is\n * out of the flow before it is measured.\n */\n applyEditorStates(this.canvas, editor);\n }\n\n layout(measurer: MeasureContext2D = this._scope.measurer): void {\n const { width, height } = this._scope.viewport;\n this.canvas.layout({ x: 0, y: 0, width, height }, measurer);\n }\n\n render(pass: RenderPass2D): void {\n this.canvas.render(pass);\n }\n\n sample(): void {\n sampleTree(this.canvas);\n }\n\n primeMotion(at: number): void {\n primeMotionTree(this.canvas, at);\n }\n\n node(rowId: string): Node | undefined {\n return this._timeline.liveNode(rowId);\n }\n\n baselineProps(rowId: string): Record<string, unknown> | undefined {\n return this._timeline.baselineProps(rowId);\n }\n\n rowSpans(): NodeSpan[] {\n return [...this._rows.values()].map((row) => row.span);\n }\n\n rowSpan(id: string): NodeSpan | undefined {\n return this._rows.get(id)?.span;\n }\n\n ownerKeyOf(node: Node): string | undefined {\n let below = \"\";\n for (let current: Node = node; ;) {\n if (current === this.canvas || this._timeline.liveNode(current.id) === current) {\n const row = current === this.canvas ? ROOT_NODE_ID : current.id;\n return below === \"\" ? row : `${row}/${below}`;\n }\n const parent = current.parent;\n if (!parent) return undefined;\n const index = parent._allChildren.indexOf(current);\n below = below === \"\" ? String(index) : `${index}.${below}`;\n current = parent;\n }\n }\n\n /** A composite-built node takes the nearest row ancestor's span. The canvas spans the clip. */\n spanOf(node: Node): NodeSpan | undefined {\n for (let current: Node | null = node; current; current = current.parent) {\n if (current === this.canvas) return { start: 0, end: this.duration };\n const span = this._rowSpan(current);\n if (span) return { ...span };\n }\n return undefined;\n }\n\n /**\n * Visit every mounted node, parents first, with its span, structural path and owner key: the nearest row's id\n * plus the path below that row for a composite-built node. A UUID changes on every build and a root path\n * whenever an earlier sibling enters or leaves; this does neither.\n */\n forEachOwner(visit: (node: Node, ownerKey: string, span: NodeSpan, path: string) => void): void {\n const walk = (node: Node, row: string, below: string, span: NodeSpan, path: string): void => {\n if (!node.mounted) return;\n const own = node === this.canvas ? undefined : this._rowSpan(node);\n if (own) {\n row = node.id;\n below = \"\";\n span = own;\n }\n visit(node, below === \"\" ? row : `${row}/${below}`, span, path);\n const children = node._allChildren;\n for (let i = 0; i < children.length; i++) {\n walk(children[i], row, below === \"\" ? String(i) : `${below}.${i}`, span, nodePath(path, i));\n }\n };\n walk(this.canvas, ROOT_NODE_ID, \"\", { start: 0, end: this.duration }, \"\");\n }\n\n dispose(): void {\n for (const child of this.canvas.children) child.dispose();\n this.canvas.dispose();\n }\n\n private _clip: ClipDocument;\n private _doc: VisualDocument;\n private _duration: number;\n private readonly _timeline: ClipTimeline;\n private readonly _rows = new Map<string, { parentId: string | null; span: NodeSpan }>();\n\n private _indexRows(): void {\n this._rows.clear();\n const spans = effectiveSpans(this._doc.nodes);\n for (const spec of this._doc.nodes) {\n if (spec.id === ROOT_NODE_ID) continue;\n this._rows.set(spec.id, { parentId: spec.parentId, span: spans.get(spec.id)! });\n }\n }\n\n /**\n * The parent is checked as well as the id, because a composite can hand its own id down to a child it builds.\n */\n private _rowSpan(node: Node): NodeSpan | undefined {\n const row = this._rows.get(node.id);\n if (!row) return undefined;\n const parent = node.parent;\n const placed = row.parentId === null || row.parentId === ROOT_NODE_ID\n ? parent === this.canvas\n : parent !== null && parent.id === row.parentId;\n return placed ? row.span : undefined;\n }\n}\n\nfunction lowered(clip: ClipDocument): VisualDocument {\n return clipDocument(clip);\n}\n"]}
|
|
@@ -4,7 +4,7 @@ import type { ProjectDocument, Track } from "../document/project.js";
|
|
|
4
4
|
import { ClipInstance, type RuntimeScope } from "./clip-instance.js";
|
|
5
5
|
import { type TrackSpan } from "./placement.js";
|
|
6
6
|
import type { BuildError, AssetTimelineProfile, TrackAssets } from "./asset-timeline.js";
|
|
7
|
-
/** Half a 60 Hz frame, leaving the other half for input
|
|
7
|
+
/** Half a 60 Hz frame, leaving the other half for input and paint. */
|
|
8
8
|
export declare const DEFAULT_PRECOMP_BUDGET_MS = 8;
|
|
9
9
|
export interface ClipStoreOptions {
|
|
10
10
|
profile?: AssetTimelineProfile;
|
|
@@ -14,7 +14,7 @@ export interface ClipStoreOptions {
|
|
|
14
14
|
audio?: boolean;
|
|
15
15
|
/** False disposes an instance as soon as its refinement lands, for a caller that never draws. */
|
|
16
16
|
keepInstances?: boolean;
|
|
17
|
-
/**
|
|
17
|
+
/** Absent takes every gate as resident. */
|
|
18
18
|
isReady?: (key: string) => boolean;
|
|
19
19
|
}
|
|
20
20
|
export interface StoreRunOptions {
|
|
@@ -22,10 +22,8 @@ export interface StoreRunOptions {
|
|
|
22
22
|
budgetMs?: number;
|
|
23
23
|
/** Polled after every yield; true leaves the build parked where it is. */
|
|
24
24
|
isCancelled?: () => boolean;
|
|
25
|
-
/** Called each time a track's refinement lands. */
|
|
26
25
|
onProgress?: () => void;
|
|
27
26
|
}
|
|
28
|
-
/** What one {@link ClipStore.setProject} did to the tracks it kept. */
|
|
29
27
|
export interface StoreUpdate {
|
|
30
28
|
/** Asset keys whose clip-local record changed, per track refined in place. */
|
|
31
29
|
deltas: Map<string, ReadonlySet<string>>;
|
|
@@ -33,14 +31,10 @@ export interface StoreUpdate {
|
|
|
33
31
|
rebuilt: string[];
|
|
34
32
|
}
|
|
35
33
|
/**
|
|
36
|
-
* One build per track
|
|
37
|
-
* its
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* A build runs as a generator so a background driver can park it between slices;
|
|
41
|
-
* whoever needs the track sooner drains the parked build instead of starting
|
|
42
|
-
* another. Dependencies are kept by {@link SlotId}, which a rebuild reproduces,
|
|
43
|
-
* so an instance can be thrown away and built again without refining.
|
|
34
|
+
* One build per track, shared by whoever needs it, so the evaluator draws the tree discovery refined rather
|
|
35
|
+
* than building its own. A build runs as a generator so a background driver can park it between slices;
|
|
36
|
+
* whoever needs the track sooner drains the parked build. Dependencies are kept by {@link SlotId}, which a
|
|
37
|
+
* rebuild reproduces, so an instance can be rebuilt without refining.
|
|
44
38
|
*/
|
|
45
39
|
export declare class ClipStore {
|
|
46
40
|
private readonly _scope;
|
|
@@ -48,68 +42,49 @@ export declare class ClipStore {
|
|
|
48
42
|
get project(): ProjectDocument;
|
|
49
43
|
get tracks(): readonly Track[];
|
|
50
44
|
get spans(): readonly TrackSpan[];
|
|
51
|
-
/** Bumped by every change a published result could show. */
|
|
52
45
|
get version(): number;
|
|
53
46
|
get profile(): AssetTimelineProfile | undefined;
|
|
54
47
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* track again, since colours resolve against it as props are written.
|
|
48
|
+
* A track holding the same clip keeps everything; a changed clip whose tree patches in place re-declares only
|
|
49
|
+
* the owners the patch can have changed; anything else starts again. A theme change starts every track again,
|
|
50
|
+
* since colours resolve against it as props are written.
|
|
59
51
|
*/
|
|
60
52
|
setProject(next: ProjectDocument): StoreUpdate;
|
|
61
53
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* against gained an entry, so a track that failed for want of it, or measured
|
|
66
|
-
* against the old size, has to be built again. {@link setProject} cannot say
|
|
67
|
-
* so, since it compares documents and this one has not changed.
|
|
54
|
+
* For a change the document does not carry: the catalog gained an entry, so a track that failed for want of
|
|
55
|
+
* it, or measured against the old size, must be rebuilt. {@link setProject} cannot tell, since it compares
|
|
56
|
+
* documents.
|
|
68
57
|
*/
|
|
69
58
|
reset(): void;
|
|
70
|
-
/** `trackId`'s built tree, building it — or draining its parked build — first. `null` when building throws. */
|
|
71
59
|
ensureBuilt(trackId: string): ClipInstance | null;
|
|
72
|
-
/** Build and refine `trackId` now, unless it already has been. */
|
|
73
60
|
discover(trackId: string): void;
|
|
74
61
|
/**
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* cancelled one stays parked for whoever needs the track next.
|
|
62
|
+
* A build whose track changed while parked is dropped; a cancelled one stays parked for whoever needs the
|
|
63
|
+
* track next.
|
|
78
64
|
*/
|
|
79
65
|
runAsync(options?: StoreRunOptions): Promise<void>;
|
|
80
|
-
/** The built tree, if there is one that is not mid-build. */
|
|
81
66
|
instanceOf(trackId: string): ClipInstance | null;
|
|
82
67
|
generationOf(trackId: string): number;
|
|
83
68
|
failed(trackId: string): boolean;
|
|
84
69
|
isDiscovered(trackId: string): boolean;
|
|
85
|
-
/** What refinement found, in clip-local frames; `undefined` until it has. */
|
|
86
70
|
trackAssets(trackId: string): TrackAssets | undefined;
|
|
87
71
|
errorsOf(trackId: string): readonly BuildError[];
|
|
88
|
-
/** Owners whose segments hold `key`. */
|
|
89
72
|
ownersOf(trackId: string, key: string): ReadonlySet<string>;
|
|
90
|
-
/** Records that must be resident before `trackId` measures. */
|
|
91
73
|
layoutGates(trackId: string): readonly AssetRecord[];
|
|
92
|
-
/** Record a segment the draw found missing. Whether that changed the track's records. */
|
|
93
74
|
learn(trackId: string, ownerKey: string, decl: AssetDecl, localFrame: number): boolean;
|
|
94
75
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
* Every such track, not only one with a layout-reading command: a node may keep
|
|
100
|
-
* what it measured (`code` caches its token advances and layouts), and nothing
|
|
101
|
-
* but a fresh tree drops metrics taken against the fallback face.
|
|
76
|
+
* A gate becomes resident once, so a track rebuilds at most once per gate. Every such track is rebuilt, not
|
|
77
|
+
* only one with a layout-reading command: a node may keep what it measured (`code` caches token advances), and
|
|
78
|
+
* only a fresh tree drops metrics taken against the fallback face.
|
|
102
79
|
*/
|
|
103
80
|
settleGates(trackIds: Iterable<string>): boolean;
|
|
104
81
|
/**
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
* a live prop, which the timeline would never restore.
|
|
82
|
+
* Keeps what refinement found. For an editor override written straight onto a live prop, which the timeline
|
|
83
|
+
* would never restore.
|
|
108
84
|
*/
|
|
109
85
|
rebuild(trackId: string): void;
|
|
110
86
|
/** Dispose `trackId`'s tree, keeping its index and audio; a later {@link ensureBuilt} builds it without refining. */
|
|
111
87
|
release(trackId: string): void;
|
|
112
|
-
/** Release every track further than `horizon` frames from `frame`. */
|
|
113
88
|
trim(frame: number, horizon: number): void;
|
|
114
89
|
dispose(): void;
|
|
115
90
|
private readonly _options;
|
|
@@ -121,53 +96,36 @@ export declare class ClipStore {
|
|
|
121
96
|
private _disposed;
|
|
122
97
|
private _fresh;
|
|
123
98
|
private _reconcile;
|
|
124
|
-
/**
|
|
99
|
+
/** A shorter clip clips the index; a longer one was never swept past its old end. */
|
|
125
100
|
private _resize;
|
|
126
101
|
private _undiscover;
|
|
127
102
|
private _discard;
|
|
128
103
|
private _nextUndiscovered;
|
|
129
104
|
private _start;
|
|
130
105
|
private _drain;
|
|
131
|
-
/** One slice. True once the build has finished or been abandoned. */
|
|
132
106
|
private _step;
|
|
133
|
-
/**
|
|
134
|
-
* Build one track's clip, then refine what its nodes declare over the frames
|
|
135
|
-
* that can change it. Yields only between frames, where the tree is consistent.
|
|
136
|
-
*/
|
|
107
|
+
/** Yields only between frames, where the tree is consistent. */
|
|
137
108
|
private _steps;
|
|
138
109
|
private _resetAssets;
|
|
139
110
|
private _commit;
|
|
140
|
-
/** Re-declare what a patch can have changed, splicing each owner's new segments onto what it kept. */
|
|
141
111
|
private _applyDirty;
|
|
142
112
|
private _drop;
|
|
143
113
|
private _link;
|
|
144
|
-
/**
|
|
145
|
-
* Declare an arriving owner's audio: the sounds its placed commands play.
|
|
146
|
-
* It reads no slots, but is linked for audio like every arrival.
|
|
147
|
-
*/
|
|
114
|
+
/** Reads no slots, but is linked for audio like every arrival. */
|
|
148
115
|
private _declareAudio;
|
|
149
116
|
/**
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
* the track's audio is published, so a moved or edited command moves its sound.
|
|
117
|
+
* A sound is scheduled ahead of time from where its command sits, not written per frame. Rebuilt whenever the
|
|
118
|
+
* track's audio is published, so an edited command moves its sound.
|
|
153
119
|
*/
|
|
154
120
|
private _declareCommandAudio;
|
|
155
121
|
/** The placed commands' sounds, under the row that plays each, so a request keeps its id and its waveform its row. */
|
|
156
122
|
private _commandSoundsOf;
|
|
157
123
|
private _setCommandAudio;
|
|
158
124
|
private _ownerError;
|
|
159
|
-
/**
|
|
160
|
-
* Republish what the track's indices hold. A snapshot, so a result already
|
|
161
|
-
* handed out does not change; the prior one is kept, and nothing bumps, when
|
|
162
|
-
* nothing in it would differ. Whether it changed.
|
|
163
|
-
*/
|
|
125
|
+
/** A snapshot, so a result already handed out does not change; nothing bumps when nothing would differ. */
|
|
164
126
|
private _refresh;
|
|
165
|
-
/** Placed commands by their recorded write sets, named once per set. */
|
|
166
127
|
private _placedWrites;
|
|
167
|
-
/**
|
|
168
|
-
* Run a compile, noting every face it measured that was not resident: a
|
|
169
|
-
* layout-reading command built then captured the fallback's metrics.
|
|
170
|
-
*/
|
|
128
|
+
/** A layout-reading command built against a non-resident face captured the fallback's metrics. */
|
|
171
129
|
private _compile;
|
|
172
130
|
private _rebuildInstance;
|
|
173
131
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clip-store.d.ts","sourceRoot":"","sources":["../../src/runtime/clip-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAIhD,OAAO,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"clip-store.d.ts","sourceRoot":"","sources":["../../src/runtime/clip-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAIhD,OAAO,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAejE,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAElE,OAAO,EAA4C,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,WAAW,EAAsB,MAAM,kBAAkB,CAAC;AAE1G,sEAAsE;AACtE,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C,MAAM,WAAW,gBAAgB;IAC7B,OAAO,CAAC,EAAE,oBA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