@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ticker.d.ts","sourceRoot":"","sources":["../../src/platform/ticker.ts"],"names":[],"mappings":"AAAA,0JAA0J;AAC1J,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAE3D,8IAA8I;AAC9I,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;AAEnF
|
|
1
|
+
{"version":3,"file":"ticker.d.ts","sourceRoot":"","sources":["../../src/platform/ticker.ts"],"names":[],"mappings":"AAAA,0JAA0J;AAC1J,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAE3D,8IAA8I;AAC9I,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;AAEnF,wNAAwN;AACxN,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;AAElD;;;;;;;;GAQG;AACH,8BAAsB,MAAM;IACxB,OAAO,CAAC,UAAU,CAAkB;IACpC,OAAO,CAAC,YAAY,CAAa;IACjC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAK;IAEhC,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAInC;;;;;OAKG;IACH,SAAS,CAAC,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,GAAE,OAAc,GAAG,IAAI;IAOjE,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAI5C,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;IAK3C,+GAA+G;cAC/F,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrC,KAAK,IAAI,IAAI;IAKb,gGAAgG;IAChG,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAE9B,SAAS,CAAC,aAAa,EAAE,YAAY,EAAE,CAAM;IAC7C,SAAS,CAAC,aAAa,EAAE,YAAY,EAAE,CAAM;IAC7C,SAAS,CAAC,cAAc,EAAE,CAAC,MAAM,IAAI,CAAC,EAAE,CAAM;IAC9C,SAAS,CAAC,aAAa,EAAE,YAAY,EAAE,CAAM;IAE7C,6FAA6F;IAC7F,OAAO;IAOP,MAAM,CAAC,QAAQ,EAAE,YAAY;IAI7B,MAAM,CAAC,QAAQ,EAAE,YAAY;IAI7B,OAAO,CAAC,QAAQ,EAAE,MAAM,IAAI;IAI5B,MAAM,CAAC,QAAQ,EAAE,YAAY;CAGhC"}
|
package/dist/platform/ticker.js
CHANGED
|
@@ -1,23 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Platform-agnostic base
|
|
2
|
+
* Platform-agnostic base for driving playback. Subclasses implement the frame loop (rAF in the browser, a setInterval
|
|
3
|
+
* in Node) and call `setCurrentTime` / `tick`; `Ticker` owns the subscriber lists and shared playback state. Register
|
|
4
|
+
* listeners via `onTick` / `onPlay` / `onPause` / `onTime`, set `setDuration`, and `dispose` when done.
|
|
3
5
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* so that renderers and UI controls can coordinate without knowing about each
|
|
8
|
-
* other.
|
|
9
|
-
*
|
|
10
|
-
* Lifecycle:
|
|
11
|
-
* 1. Set total duration with `setDuration`.
|
|
12
|
-
* 2. Register listeners via `onTick` / `onPlay` / `onPause` / `onTime`.
|
|
13
|
-
* 3. Call `play`, `pause`, or `seek` to control playback.
|
|
14
|
-
* 4. Call `dispose` when the clock is no longer needed to prevent leaks.
|
|
15
|
-
*
|
|
16
|
-
* `play`, `pause` and `seek` take effect before they return, so any order of them
|
|
17
|
-
* in one turn leaves the clock where the last one put it. A time listener or tick
|
|
18
|
-
* callback may `seek` (a host looping wraps to the start when it hears the end), and
|
|
19
|
-
* a subclass must read the end of a run again afterwards. At the end of a run it
|
|
20
|
-
* reports a final tick and pauses.
|
|
6
|
+
* `play`, `pause` and `seek` take effect before they return, so any order of them in one turn leaves the clock where
|
|
7
|
+
* the last one put it. A time listener or tick callback may `seek` (a host looping wraps to the start when it hears the
|
|
8
|
+
* end), so a subclass must read the end of a run again afterwards. At the end of a run it reports a final tick and pauses.
|
|
21
9
|
*/
|
|
22
10
|
export class Ticker {
|
|
23
11
|
_isPlaying = false;
|
|
@@ -26,11 +14,9 @@ export class Ticker {
|
|
|
26
14
|
get isPlaying() {
|
|
27
15
|
return this._isPlaying;
|
|
28
16
|
}
|
|
29
|
-
/** Current playhead position in seconds. */
|
|
30
17
|
get currentTime() {
|
|
31
18
|
return this._currentTime;
|
|
32
19
|
}
|
|
33
|
-
/** Total animation duration in seconds. */
|
|
34
20
|
get duration() {
|
|
35
21
|
return this._duration;
|
|
36
22
|
}
|
|
@@ -38,21 +24,10 @@ export class Ticker {
|
|
|
38
24
|
this._duration = duration;
|
|
39
25
|
}
|
|
40
26
|
/**
|
|
41
|
-
* Updates the playhead and notifies time listeners
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* rates. The playhead itself has to be exact — `pause` and `play` anchor
|
|
46
|
-
* their elapsed-time maths on it, so it is advanced on every frame of the
|
|
47
|
-
* subclass's loop — while a *listener* is a host drawing a timecode or
|
|
48
|
-
* seeking a renderer, and neither can do anything with a position that has
|
|
49
|
-
* not reached the next frame yet.
|
|
50
|
-
*
|
|
51
|
-
* Passing `false` therefore keeps the clock exact and the subscribers quiet.
|
|
52
|
-
* A subclass that knows its frame rate uses it to fire {@link onTime} once
|
|
53
|
-
* per frame rather than once per animation frame; on a 144Hz display those
|
|
54
|
-
* are not the same number, and the difference was landing on hosts as a React
|
|
55
|
-
* render per refresh to drive a 60fps render.
|
|
27
|
+
* Updates the playhead and notifies time listeners; no-ops if the time hasn't changed. `notify: false` keeps the
|
|
28
|
+
* clock exact (`pause`/`play` anchor their elapsed-time maths on it, so it advances every loop frame) while keeping
|
|
29
|
+
* subscribers quiet: a subclass that knows its frame rate fires {@link onTime} once per frame, not per animation
|
|
30
|
+
* frame (on a 144Hz display that was a React render per refresh to drive a 60fps render).
|
|
56
31
|
*/
|
|
57
32
|
setCurrentTime(t, notify = true) {
|
|
58
33
|
if (this._currentTime === t)
|
|
@@ -66,7 +41,6 @@ export class Ticker {
|
|
|
66
41
|
setPlaying(playing) {
|
|
67
42
|
this._isPlaying = playing;
|
|
68
43
|
}
|
|
69
|
-
/** Starts playback at the given speed and direction, notifying all play listeners. */
|
|
70
44
|
play(speed, reverse) {
|
|
71
45
|
this._isPlaying = true;
|
|
72
46
|
for (const cb of this.playCallbacks)
|
|
@@ -76,7 +50,6 @@ export class Ticker {
|
|
|
76
50
|
async tick() {
|
|
77
51
|
await Promise.all(this.tickCallbacks.map(c => c(this._currentTime)));
|
|
78
52
|
}
|
|
79
|
-
/** Pauses playback and notifies all pause listeners. */
|
|
80
53
|
pause() {
|
|
81
54
|
this._isPlaying = false;
|
|
82
55
|
for (const cb of this.pauseCallbacks)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ticker.js","sourceRoot":"","sources":["../../src/platform/ticker.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ticker.js","sourceRoot":"","sources":["../../src/platform/ticker.ts"],"names":[],"mappings":"AASA;;;;;;;;GAQG;AACH,MAAM,OAAgB,MAAM;IAChB,UAAU,GAAY,KAAK,CAAC;IAC5B,YAAY,GAAW,CAAC,CAAC;IACvB,SAAS,GAAW,CAAC,CAAC;IAEhC,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,WAAW,CAAC,QAAgB;QACxB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC9B,CAAC;IAED;;;;;OAKG;IACO,cAAc,CAAC,CAAS,EAAE,SAAkB,IAAI;QACtD,IAAI,IAAI,CAAC,YAAY,KAAK,CAAC;YAAE,OAAO;QACpC,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,IAAI,CAAC,MAAM;YAAE,OAAO;QACpB,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,aAAa;YAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC;IAES,UAAU,CAAC,OAAgB;QACjC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC;IAC9B,CAAC;IAED,IAAI,CAAC,KAAa,EAAE,OAAgB;QAChC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,aAAa;YAAE,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAC/E,CAAC;IAED,+GAA+G;IACrG,KAAK,CAAC,IAAI;QAChB,MAAM,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IACzE,CAAC;IAED,KAAK;QACD,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,cAAc;YAAE,EAAE,EAAE,CAAC;IAC/C,CAAC;IAKS,aAAa,GAAmB,EAAE,CAAC;IACnC,aAAa,GAAmB,EAAE,CAAC;IACnC,cAAc,GAAmB,EAAE,CAAC;IACpC,aAAa,GAAmB,EAAE,CAAC;IAE7C,6FAA6F;IAC7F,OAAO;QACH,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;QAC9B,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;QAC9B,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC;QAC/B,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IAClC,CAAC;IAED,MAAM,CAAC,QAAsB;QACzB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,CAAC,QAAsB;QACzB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;IAED,OAAO,CAAC,QAAoB;QACxB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,QAAsB;QACzB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;CACJ","sourcesContent":["/** Called every animation frame with the current playhead time (seconds). Must return a Promise so the clock can await all renderers before advancing. */\nexport type TickCallback = (time: number) => Promise<void>;\n\n/** Fired when playback starts. Receives the time at which playback began, the playback speed multiplier, and whether playback is reversed. */\nexport type PlayCallback = (time: number, speed: number, reverse: boolean) => void;\n\n/** Fired when the playhead reaches a new frame: once per frame, not per animation frame (see {@link Ticker.setCurrentTime}), so a rAF-driven subclass on a high-refresh display keeps the extra positions to itself. */\nexport type TimeCallback = (time: number) => void;\n\n/**\n * Platform-agnostic base for driving playback. Subclasses implement the frame loop (rAF in the browser, a setInterval\n * in Node) and call `setCurrentTime` / `tick`; `Ticker` owns the subscriber lists and shared playback state. Register\n * listeners via `onTick` / `onPlay` / `onPause` / `onTime`, set `setDuration`, and `dispose` when done.\n *\n * `play`, `pause` and `seek` take effect before they return, so any order of them in one turn leaves the clock where\n * the last one put it. A time listener or tick callback may `seek` (a host looping wraps to the start when it hears the\n * end), so a subclass must read the end of a run again afterwards. At the end of a run it reports a final tick and pauses.\n */\nexport abstract class Ticker {\n private _isPlaying: boolean = false;\n private _currentTime: number = 0;\n protected _duration: number = 0;\n\n get isPlaying(): boolean {\n return this._isPlaying;\n }\n\n get currentTime(): number {\n return this._currentTime;\n }\n\n get duration(): number {\n return this._duration;\n }\n\n setDuration(duration: number): void {\n this._duration = duration;\n }\n\n /**\n * Updates the playhead and notifies time listeners; no-ops if the time hasn't changed. `notify: false` keeps the\n * clock exact (`pause`/`play` anchor their elapsed-time maths on it, so it advances every loop frame) while keeping\n * subscribers quiet: a subclass that knows its frame rate fires {@link onTime} once per frame, not per animation\n * frame (on a 144Hz display that was a React render per refresh to drive a 60fps render).\n */\n protected setCurrentTime(t: number, notify: boolean = true): void {\n if (this._currentTime === t) return;\n this._currentTime = t;\n if (!notify) return;\n for (const cb of this.timeCallbacks) cb(t);\n }\n\n protected setPlaying(playing: boolean): void {\n this._isPlaying = playing;\n }\n\n play(speed: number, reverse: boolean): void {\n this._isPlaying = true;\n for (const cb of this.playCallbacks) cb(this._currentTime, speed, reverse);\n }\n\n /** Awaits all tick callbacks in parallel. Subclasses call this once per frame after updating `currentTime`. */\n protected async tick(): Promise<void> {\n await Promise.all(this.tickCallbacks.map(c => c(this._currentTime)));\n }\n\n pause(): void {\n this._isPlaying = false;\n for (const cb of this.pauseCallbacks) cb();\n }\n\n /** Moves the playhead to `t` (seconds). Subclasses decide whether this also triggers a tick. */\n abstract seek(t: number): void;\n\n protected tickCallbacks: TickCallback[] = [];\n protected playCallbacks: PlayCallback[] = [];\n protected pauseCallbacks: (() => void)[] = [];\n protected timeCallbacks: TimeCallback[] = [];\n\n /** Clears all registered callbacks. Call when tearing down a scene to avoid memory leaks. */\n dispose() {\n this.tickCallbacks.length = 0;\n this.playCallbacks.length = 0;\n this.pauseCallbacks.length = 0;\n this.timeCallbacks.length = 0;\n }\n\n onTick(callback: TickCallback) {\n this.tickCallbacks.push(callback);\n }\n\n onPlay(callback: PlayCallback) {\n this.playCallbacks.push(callback);\n }\n\n onPause(callback: () => void) {\n this.pauseCallbacks.push(callback);\n }\n\n onTime(callback: TimeCallback) {\n this.timeCallbacks.push(callback);\n }\n}\n"]}
|
package/dist/project/config.d.ts
CHANGED
|
@@ -1,25 +1,15 @@
|
|
|
1
1
|
import { Color } from "../attributes/shape/fill/color/parser.js";
|
|
2
2
|
import type { TextStyle } from "../attributes/text/types.js";
|
|
3
|
-
/** A color token: a resolvable {@link Color}, or a nested group
|
|
4
|
-
* flatten to dash-joined names — `{ brand: { 500: … } }` → `brand-500`. */
|
|
3
|
+
/** A color token: a resolvable {@link Color}, or a nested group flattened to dash-joined names (`{ brand: { 500: … } }` → `brand-500`). */
|
|
5
4
|
export type ColorToken = Color | ColorGroup;
|
|
6
5
|
export interface ColorGroup {
|
|
7
6
|
[key: string]: ColorToken;
|
|
8
7
|
}
|
|
9
|
-
/** Named color tokens, possibly nested
|
|
10
|
-
* (flattened) name in any `fill`/`stroke` string. */
|
|
8
|
+
/** Named color tokens, possibly nested, referenced by flattened name in any `fill`/`stroke` string. */
|
|
11
9
|
export type ColorTokens = Record<string, ColorToken>;
|
|
12
|
-
/** A named text-style preset
|
|
13
|
-
* Each field it sets supplies that style key to a variant'd node (unless the
|
|
14
|
-
* author set it explicitly). Same shape as the `<DefaultTextStyle>` defaults. */
|
|
10
|
+
/** A named text-style preset for a `Text`/`RichText` `variant`: each field it sets supplies that style key unless the author set it. Same shape as `<DefaultTextStyle>` defaults. */
|
|
15
11
|
export type TypographyPreset = TextStyle;
|
|
16
|
-
/**
|
|
17
|
-
* The `default` key is reserved: if present, it's applied to every `Text`/
|
|
18
|
-
* `RichText` as a project-wide base style — no `variant` prop or
|
|
19
|
-
* `<DefaultTextStyle>` wrapper needed — for any style key a more specific
|
|
20
|
-
* source (explicit prop, `variant`, inherited `<DefaultTextStyle>`) doesn't
|
|
21
|
-
* set. Declared as an explicit property (rather than folded into the index
|
|
22
|
-
* signature) so editors offer it in autocomplete. */
|
|
12
|
+
/** Typography presets keyed by variant name. `default` is reserved: applied to every `Text`/`RichText` as a project-wide base for any key a more specific source (explicit prop, `variant`, `<DefaultTextStyle>`) doesn't set. Declared explicitly (not folded into the index signature) so editors autocomplete it. */
|
|
23
13
|
export type Typography = {
|
|
24
14
|
default?: TypographyPreset;
|
|
25
15
|
} & Record<string, TypographyPreset>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/project/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/project/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,2IAA2I;AAC3I,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,UAAU,CAAC;AAC5C,MAAM,WAAW,UAAU;IAAG,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAC;CAAE;AAE1D,uGAAuG;AACvG,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAErD,qLAAqL;AACrL,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAEzC,wTAAwT;AACxT,MAAM,MAAM,UAAU,GAAG;IAAE,OAAO,CAAC,EAAE,gBAAgB,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AAE3F,sEAAsE;AACtE,MAAM,WAAW,KAAK;IAClB,yEAAyE;IACzE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,UAAU,CAAC;CAC3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/project/config.ts"],"names":[],"mappings":"","sourcesContent":["import { Color } from \"@/attributes/shape/fill/color/parser\";\nimport type { TextStyle } from \"@/attributes/text/types\";\n\n/** A color token: a resolvable {@link Color}, or a nested group
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/project/config.ts"],"names":[],"mappings":"","sourcesContent":["import { Color } from \"@/attributes/shape/fill/color/parser\";\nimport type { TextStyle } from \"@/attributes/text/types\";\n\n/** A color token: a resolvable {@link Color}, or a nested group flattened to dash-joined names (`{ brand: { 500: … } }` → `brand-500`). */\nexport type ColorToken = Color | ColorGroup;\nexport interface ColorGroup { [key: string]: ColorToken; }\n\n/** Named color tokens, possibly nested, referenced by flattened name in any `fill`/`stroke` string. */\nexport type ColorTokens = Record<string, ColorToken>;\n\n/** A named text-style preset for a `Text`/`RichText` `variant`: each field it sets supplies that style key unless the author set it. Same shape as `<DefaultTextStyle>` defaults. */\nexport type TypographyPreset = TextStyle;\n\n/** Typography presets keyed by variant name. `default` is reserved: applied to every `Text`/`RichText` as a project-wide base for any key a more specific source (explicit prop, `variant`, `<DefaultTextStyle>`) doesn't set. Declared explicitly (not folded into the index signature) so editors autocomplete it. */\nexport type Typography = { default?: TypographyPreset } & Record<string, TypographyPreset>;\n\n/** The visual design tokens — color tokens and typography presets. */\nexport interface Theme {\n /** Named color tokens (possibly grouped) for `fill`/`stroke` strings. */\n colors?: ColorTokens;\n /** Named text-style presets selected via a `Text`/`RichText` `variant`. */\n typography?: Typography;\n}\n"]}
|
package/dist/project/tree.d.ts
CHANGED
|
@@ -1,28 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Structural key for a node within its scene: the child-index path from the
|
|
3
|
-
* scene root, joined with ".". The root is "". Not every node has an authored id
|
|
4
|
-
* — the children a composite node builds for itself get a UUID apiece — so
|
|
5
|
-
* lifespan tracking keys on this instead, which every node has. The build is
|
|
6
|
-
* deterministic, so the same structural slot maps to the same path in both the
|
|
7
|
-
* precomp pass and playback.
|
|
8
|
-
*/
|
|
1
|
+
/** Structural key for a node within its scene: the child-index path from the scene root joined with "." (root is ""). Not every node has an authored id (children a composite builds get a UUID), so lifespan tracking keys on this; the build is deterministic, so a slot has the same path in precomp and playback. */
|
|
9
2
|
/** @internal */
|
|
10
3
|
export declare function nodePath(parentPath: string, childIndex: number): string;
|
|
11
4
|
/** @internal */
|
|
12
5
|
export interface NodeState {
|
|
13
6
|
id: string;
|
|
14
7
|
type: string;
|
|
15
|
-
/** Attribute overrides applied when this state is active. */
|
|
16
8
|
properties: Record<string, any>;
|
|
17
9
|
}
|
|
18
|
-
/**
|
|
19
|
-
* A single audio clip exposed by a node for timeline display. Times are in
|
|
20
|
-
* clip seconds; `src` is the (fetchable) audio source path. Nodes that own
|
|
21
|
-
* audio — e.g. a Scene with managed sounds — report one entry per play range.
|
|
22
|
-
*/
|
|
10
|
+
/** A single audio clip a node exposes for timeline display, in clip seconds; `src` is the fetchable source. */
|
|
23
11
|
/** @internal */
|
|
24
12
|
export interface WaveformInfo {
|
|
25
|
-
/** Fetchable audio source path / URL. */
|
|
26
13
|
src: string;
|
|
27
14
|
/** Clip timestamp (seconds) when the clip starts. */
|
|
28
15
|
startTime: number;
|
|
@@ -30,33 +17,17 @@ export interface WaveformInfo {
|
|
|
30
17
|
endTime: number | null;
|
|
31
18
|
}
|
|
32
19
|
export interface TreeState {
|
|
33
|
-
/**
|
|
34
|
-
* The node's `NodeSpec.id` when it came from a document row, otherwise a
|
|
35
|
-
* per-instance UUID — so it survives a rebuild for an authored node and
|
|
36
|
-
* changes for one a composite built for itself. {@link path} is the key that
|
|
37
|
-
* is stable for both.
|
|
38
|
-
*/
|
|
20
|
+
/** The node's `NodeSpec.id` for a document row, else a per-instance UUID (changes on rebuild for a composite-built node; {@link path} is stable for both). */
|
|
39
21
|
id: string;
|
|
40
|
-
/**
|
|
41
|
-
* Structural path from the scene root (`""` for the root, `"0.2"` for the
|
|
42
|
-
* third child of the first). Stable across rebuilds for every node, authored
|
|
43
|
-
* or not, so a host can key selection, expansion, and overrides on it. It is
|
|
44
|
-
* also what `getNodeBox` / `setNodeOverride` accept.
|
|
45
|
-
*/
|
|
22
|
+
/** Structural path from the scene root (`""` root, `"0.2"` third child of the first), stable across rebuilds for every node so a host can key selection and overrides on it; what `getNodeBox` / `setNodeOverride` accept. */
|
|
46
23
|
path: string;
|
|
47
24
|
type: string;
|
|
48
25
|
meta?: Record<string, unknown>;
|
|
49
26
|
/** Audio clips owned by this node, for waveform rendering in the timeline. */
|
|
50
27
|
waveform?: WaveformInfo[];
|
|
51
|
-
/**
|
|
52
|
-
* Absolute timeline frame (across the whole video) at which this node first
|
|
53
|
-
* appears. Undefined when its lifespan is unknown (e.g. no precomp data).
|
|
54
|
-
*/
|
|
28
|
+
/** Absolute timeline frame at which this node first appears; undefined when unknown (no precomp data). */
|
|
55
29
|
startFrame?: number;
|
|
56
|
-
/**
|
|
57
|
-
* Absolute timeline frame at which this node was last present. Together with
|
|
58
|
-
* startFrame this bounds the node's track bar to its true lifespan.
|
|
59
|
-
*/
|
|
30
|
+
/** Absolute timeline frame at which this node was last present; with startFrame bounds the track bar to its true lifespan. */
|
|
60
31
|
endFrame?: number;
|
|
61
32
|
children: TreeState[];
|
|
62
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../src/project/tree.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../src/project/tree.ts"],"names":[],"mappings":"AAAA,yTAAyT;AACzT,gBAAgB;AAChB,wBAAgB,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAEvE;AAED,gBAAgB;AAChB,MAAM,WAAW,SAAS;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAGnC;AAED,+GAA+G;AAC/G,gBAAgB;AAChB,MAAM,WAAW,YAAY;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,SAAS;IACtB,8JAA8J;IAC9J,EAAE,EAAE,MAAM,CAAC;IACX,8NAA8N;IAC9N,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B,0GAA0G;IAC1G,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8HAA8H;IAC9H,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,SAAS,EAAE,CAAC;CACzB"}
|
package/dist/project/tree.js
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Structural key for a node within its scene: the child-index path from the
|
|
3
|
-
* scene root, joined with ".". The root is "". Not every node has an authored id
|
|
4
|
-
* — the children a composite node builds for itself get a UUID apiece — so
|
|
5
|
-
* lifespan tracking keys on this instead, which every node has. The build is
|
|
6
|
-
* deterministic, so the same structural slot maps to the same path in both the
|
|
7
|
-
* precomp pass and playback.
|
|
8
|
-
*/
|
|
1
|
+
/** Structural key for a node within its scene: the child-index path from the scene root joined with "." (root is ""). Not every node has an authored id (children a composite builds get a UUID), so lifespan tracking keys on this; the build is deterministic, so a slot has the same path in precomp and playback. */
|
|
9
2
|
/** @internal */
|
|
10
3
|
export function nodePath(parentPath, childIndex) {
|
|
11
4
|
return parentPath === "" ? String(childIndex) : `${parentPath}.${childIndex}`;
|
package/dist/project/tree.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.js","sourceRoot":"","sources":["../../src/project/tree.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tree.js","sourceRoot":"","sources":["../../src/project/tree.ts"],"names":[],"mappings":"AAAA,yTAAyT;AACzT,gBAAgB;AAChB,MAAM,UAAU,QAAQ,CAAC,UAAkB,EAAE,UAAkB;IAC3D,OAAO,UAAU,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,IAAI,UAAU,EAAE,CAAC;AAClF,CAAC","sourcesContent":["/** Structural key for a node within its scene: the child-index path from the scene root joined with \".\" (root is \"\"). Not every node has an authored id (children a composite builds get a UUID), so lifespan tracking keys on this; the build is deterministic, so a slot has the same path in precomp and playback. */\n/** @internal */\nexport function nodePath(parentPath: string, childIndex: number): string {\n return parentPath === \"\" ? String(childIndex) : `${parentPath}.${childIndex}`;\n}\n\n/** @internal */\nexport interface NodeState {\n id: string;\n type: string;\n properties: Record<string, any>;\n\n\n}\n\n/** A single audio clip a node exposes for timeline display, in clip seconds; `src` is the fetchable source. */\n/** @internal */\nexport interface WaveformInfo {\n src: string;\n /** Clip timestamp (seconds) when the clip starts. */\n startTime: number;\n /** Clip timestamp (seconds) when the clip ends, or null if open-ended. */\n endTime: number | null;\n}\n\nexport interface TreeState {\n /** The node's `NodeSpec.id` for a document row, else a per-instance UUID (changes on rebuild for a composite-built node; {@link path} is stable for both). */\n id: string;\n /** Structural path from the scene root (`\"\"` root, `\"0.2\"` third child of the first), stable across rebuilds for every node so a host can key selection and overrides on it; what `getNodeBox` / `setNodeOverride` accept. */\n path: string;\n type: string;\n meta?: Record<string, unknown>;\n /** Audio clips owned by this node, for waveform rendering in the timeline. */\n waveform?: WaveformInfo[];\n /** Absolute timeline frame at which this node first appears; undefined when unknown (no precomp data). */\n startFrame?: number;\n /** Absolute timeline frame at which this node was last present; with startFrame bounds the track bar to its true lifespan. */\n endFrame?: number;\n children: TreeState[];\n}"]}
|
package/dist/props/host.d.ts
CHANGED
|
@@ -2,17 +2,7 @@ import { PropLayout } from "./layout.js";
|
|
|
2
2
|
import { PropSlot } from "./slot.js";
|
|
3
3
|
/** @internal */
|
|
4
4
|
export type TweenFn<T> = (from: T, to: T, t: number) => T;
|
|
5
|
-
/**
|
|
6
|
-
* The slots behind an object's `property`-declared fields, plus the per-field
|
|
7
|
-
* metadata `set()` and `to()` route through.
|
|
8
|
-
*
|
|
9
|
-
* One object rather than three loose maps on the host, because the host is a
|
|
10
|
-
* `Node` and every public field it carries is published API. Grouping them
|
|
11
|
-
* means a node exposes one internal name instead of three, and gives the thing
|
|
12
|
-
* a name a reader can look up.
|
|
13
|
-
*
|
|
14
|
-
* @internal
|
|
15
|
-
*/
|
|
5
|
+
/** The slots behind an object's `property`-declared fields plus the per-field metadata `set()` and `to()` route through. One object rather than three loose maps because every public field on the host (a `Node`) is published API. @internal */
|
|
16
6
|
export interface PropCells {
|
|
17
7
|
/** Field → its live slot. Present for every registered prop. */
|
|
18
8
|
slots: Map<string, PropSlot<any>>;
|
|
@@ -27,8 +17,7 @@ export interface PropCells {
|
|
|
27
17
|
}
|
|
28
18
|
/** @internal */
|
|
29
19
|
export interface PropHost {
|
|
30
|
-
/** See {@link PropCells}. Absent until the first prop is registered
|
|
31
|
-
* cleared by `dispose()`. */
|
|
20
|
+
/** See {@link PropCells}. Absent until the first prop is registered; cleared by `dispose()`. */
|
|
32
21
|
__cells?: PropCells;
|
|
33
22
|
}
|
|
34
23
|
/** @internal */
|
package/dist/props/host.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/props/host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAElC,gBAAgB;AAChB,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC,CAAC;AAE1D
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/props/host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAElC,gBAAgB;AAChB,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC,CAAC;AAE1D,kPAAkP;AAClP,MAAM,WAAW,SAAS;IACtB,gEAAgE;IAChE,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;IAClC,2EAA2E;IAC3E,MAAM,EAAE,UAAU,CAAC;IACnB,+EAA+E;IAC/E,IAAI,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC;IACpC,0EAA0E;IAC1E,MAAM,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;IACnC,mFAAmF;IACnF,OAAO,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,GAAG,CAAC,CAAC;CACxD;AAED,gBAAgB;AAChB,MAAM,WAAW,QAAQ;IACrB,gGAAgG;IAChG,OAAO,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,gBAAgB;AAChB,wBAAgB,WAAW,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,SAAS,CAElF;AAED,wDAAwD;AACxD,wBAAgB,WAAW,CAAC,GAAG,EAAE,QAAQ,GAAG,SAAS,CAGpD"}
|
package/dist/props/host.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.js","sourceRoot":"","sources":["../../src/props/host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"host.js","sourceRoot":"","sources":["../../src/props/host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AA0BtC,gBAAgB;AAChB,MAAM,UAAU,WAAW,CAAC,GAAa,EAAE,IAAY;IACnD,OAAO,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACxC,CAAC;AAED,wDAAwD;AACxD,MAAM,UAAU,WAAW,CAAC,GAAa;IACrC,mHAAmH;IACnH,OAAO,GAAG,CAAC,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,GAAG,EAAE,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,CAAW,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AAC9J,CAAC","sourcesContent":["import { PropLayout } from \"./layout\";\nimport { PropSlot } from \"./slot\";\n\n/** @internal */\nexport type TweenFn<T> = (from: T, to: T, t: number) => T;\n\n/** The slots behind an object's `property`-declared fields plus the per-field metadata `set()` and `to()` route through. One object rather than three loose maps because every public field on the host (a `Node`) is published API. @internal */\nexport interface PropCells {\n /** Field → its live slot. Present for every registered prop. */\n slots: Map<string, PropSlot<any>>;\n /** The host class's prop indices; {@link list} holds its slots by them. */\n layout: PropLayout;\n /** Field → its slot, by {@link layout} index: what the prop accessors read. */\n list: (PropSlot<any> | undefined)[];\n /** Field → how it interpolates, for props a numeric lerp cannot cover. */\n tweens?: Map<string, TweenFn<any>>;\n /** Field → external prop value to internal slot value, for fields that need it. */\n mappers?: Map<string, (ext: any, prev?: any) => any>;\n}\n\n/** @internal */\nexport interface PropHost {\n /** See {@link PropCells}. Absent until the first prop is registered; cleared by `dispose()`. */\n __cells?: PropCells;\n}\n\n/** @internal */\nexport function getPropSlot(obj: PropHost, name: string): PropSlot<any> | undefined {\n return obj.__cells?.slots.get(name);\n}\n\n/** The host's slots, created on first use. @internal */\nexport function ensureCells(obj: PropHost): PropCells {\n // Every field from the start, so all cells share one shape and the prop accessors' reads of them stay monomorphic.\n return obj.__cells ??= { slots: new Map(), layout: PropLayout.of(Object.getPrototypeOf(obj) as object), list: [], tweens: undefined, mappers: undefined };\n}\n"]}
|
package/dist/props/layout.d.ts
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Where each prop of one node class sits in its instances' slot lists, and the
|
|
3
|
-
* accessors that read it, defined once on the class's prototype.
|
|
4
|
-
*
|
|
5
|
-
* On the prototype rather than on each instance, so every node of a type shares
|
|
6
|
-
* one hidden class and a prop read in layout or render stays monomorphic. The
|
|
7
|
-
* accessors reach their slot by index: closures made at one site share their
|
|
8
|
-
* feedback, so a lookup by name inside one would see every prop of every class.
|
|
9
|
-
*
|
|
10
|
-
* An instance that has not registered a field, or a prototype that already
|
|
11
|
-
* defines one itself, reads and writes as if the accessor were not there.
|
|
12
|
-
*/
|
|
1
|
+
/** Where each prop of one node class sits in its instances' slot lists, and the accessors that read it, defined once on the class's prototype so every node of a type shares one hidden class and a prop read in layout or render stays monomorphic. Accessors reach their slot by index (closures made at one site share feedback, so a lookup by name would see every prop of every class). An instance that hasn't registered a field, or a prototype that already defines one, reads and writes as if the accessor were absent. */
|
|
13
2
|
export declare class PropLayout {
|
|
14
3
|
private readonly _proto;
|
|
15
4
|
static of(proto: object): PropLayout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/props/layout.ts"],"names":[],"mappings":"AAUA
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/props/layout.ts"],"names":[],"mappings":"AAUA,ugBAAugB;AACvgB,qBAAa,UAAU;IAmCC,OAAO,CAAC,QAAQ,CAAC,MAAM;IAlC3C,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU;IAMpC,iEAAiE;IACjE,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAI9B,oFAAoF;IACpF,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAiB5B,wEAAwE;IACxE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;IAI5C,OAAO;IAIP,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgB;IACxC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA6B;IACpD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAE9C,OAAO,CAAC,OAAO;IAWf,OAAO,CAAC,OAAO;CAclB"}
|
package/dist/props/layout.js
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
const LAYOUTS = new WeakMap();
|
|
2
|
-
/**
|
|
3
|
-
* Where each prop of one node class sits in its instances' slot lists, and the
|
|
4
|
-
* accessors that read it, defined once on the class's prototype.
|
|
5
|
-
*
|
|
6
|
-
* On the prototype rather than on each instance, so every node of a type shares
|
|
7
|
-
* one hidden class and a prop read in layout or render stays monomorphic. The
|
|
8
|
-
* accessors reach their slot by index: closures made at one site share their
|
|
9
|
-
* feedback, so a lookup by name inside one would see every prop of every class.
|
|
10
|
-
*
|
|
11
|
-
* An instance that has not registered a field, or a prototype that already
|
|
12
|
-
* defines one itself, reads and writes as if the accessor were not there.
|
|
13
|
-
*/
|
|
2
|
+
/** Where each prop of one node class sits in its instances' slot lists, and the accessors that read it, defined once on the class's prototype so every node of a type shares one hidden class and a prop read in layout or render stays monomorphic. Accessors reach their slot by index (closures made at one site share feedback, so a lookup by name would see every prop of every class). An instance that hasn't registered a field, or a prototype that already defines one, reads and writes as if the accessor were absent. */
|
|
14
3
|
export class PropLayout {
|
|
15
4
|
_proto;
|
|
16
5
|
static of(proto) {
|
package/dist/props/layout.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../src/props/layout.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,GAAG,IAAI,OAAO,EAAsB,CAAC;AAElD
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../src/props/layout.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,GAAG,IAAI,OAAO,EAAsB,CAAC;AAElD,ugBAAugB;AACvgB,MAAM,OAAO,UAAU;IAmCkB;IAlCrC,MAAM,CAAC,EAAE,CAAC,KAAa;QACnB,IAAI,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAChC,IAAI,CAAC,MAAM;YAAE,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,MAAM,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAClE,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,iEAAiE;IACjE,OAAO,CAAC,KAAa;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IACxC,CAAC;IAED,oFAAoF;IACpF,KAAK,CAAC,KAAa;QACf,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC/B,IAAI,CAAC,KAAK,SAAS;YAAE,OAAO,CAAC,CAAC;QAC9B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/C,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC;YAC3D,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC7B,CAAC;aAAM,CAAC;YACJ,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE;gBACtC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC;gBAC3B,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC;gBAC3B,UAAU,EAAE,IAAI;gBAChB,YAAY,EAAE,IAAI;aACrB,CAAC,CAAC;QACP,CAAC;QACD,OAAO,CAAC,CAAC;IACb,CAAC;IAED,wEAAwE;IACxE,MAAM,CAAC,IAAY,EAAE,KAAa;QAC9B,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC3F,CAAC;IAED,YAAqC,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QAC/C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,cAAc,CAAC,MAAM,CAAkB,CAAC;IAClE,CAAC;IAEgB,OAAO,CAAgB;IACvB,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC;IACnC,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;IAEtC,OAAO,CAAC,CAAS,EAAE,KAAa;QACpC,MAAM,MAAM,GAAG,IAAI,CAAC;QACpB,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,OAAO;YACH,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC;YAC3B,MAAM,IAAI,GAAG,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACxF,IAAI,IAAI,KAAK,SAAS;gBAAE,OAAO,IAAI,CAAC,GAAG,EAAE,CAAC;YAC1C,OAAO,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAC1E,CAAC,CAAC;IACN,CAAC;IAEO,OAAO,CAAC,CAAS,EAAE,KAAa;QACpC,MAAM,MAAM,GAAG,IAAI,CAAC;QACpB,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,OAAO,UAAU,KAAK;YAClB,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC;YAC3B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC;gBAChF,IAAI,CAAC,UAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YACnC,CAAC;iBAAM,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;gBACzB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;YAC5C,CAAC;iBAAM,CAAC;gBACJ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;YACxG,CAAC;QACL,CAAC,CAAC;IACN,CAAC;CACJ","sourcesContent":["import type { PropSlot } from \"./slot\";\n\n/** What a prop accessor reads its slots from and writes through. */\ninterface LaidOutHost {\n __cells?: { layout: PropLayout; list: readonly (PropSlot<unknown> | undefined)[] };\n _writeProp?(field: string, value: unknown): void;\n}\n\nconst LAYOUTS = new WeakMap<object, PropLayout>();\n\n/** Where each prop of one node class sits in its instances' slot lists, and the accessors that read it, defined once on the class's prototype so every node of a type shares one hidden class and a prop read in layout or render stays monomorphic. Accessors reach their slot by index (closures made at one site share feedback, so a lookup by name would see every prop of every class). An instance that hasn't registered a field, or a prototype that already defines one, reads and writes as if the accessor were absent. */\nexport class PropLayout {\n static of(proto: object): PropLayout {\n let layout = LAYOUTS.get(proto);\n if (!layout) LAYOUTS.set(proto, (layout = new PropLayout(proto)));\n return layout;\n }\n\n /** `field`'s index, or -1 when no instance has registered it. */\n indexOf(field: string): number {\n return this._index.get(field) ?? -1;\n }\n\n /** `field`'s index, given its accessor the first time any instance registers it. */\n place(field: string): number {\n let i = this._index.get(field);\n if (i !== undefined) return i;\n this._index.set(field, (i = this._index.size));\n if (Object.prototype.hasOwnProperty.call(this._proto, field)) {\n this._foreign.add(field);\n } else {\n Object.defineProperty(this._proto, field, {\n get: this._getter(i, field),\n set: this._setter(i, field),\n enumerable: true,\n configurable: true,\n });\n }\n return i;\n }\n\n /** Whether reading `field` on `host` reaches this layout's accessor. */\n serves(host: object, field: string): boolean {\n return !this._foreign.has(field) && !Object.prototype.hasOwnProperty.call(host, field);\n }\n\n private constructor(private readonly _proto: object) {\n this._parent = Object.getPrototypeOf(_proto) as object | null;\n }\n\n private readonly _parent: object | null;\n private readonly _index = new Map<string, number>();\n private readonly _foreign = new Set<string>();\n\n private _getter(i: number, field: string): (this: LaidOutHost) => unknown {\n const layout = this;\n const parent = this._parent;\n return function () {\n const cells = this.__cells;\n const slot = cells !== undefined && cells.layout === layout ? cells.list[i] : undefined;\n if (slot !== undefined) return slot.get();\n return parent === null ? undefined : Reflect.get(parent, field, this);\n };\n }\n\n private _setter(i: number, field: string): (this: LaidOutHost, value: unknown) => void {\n const layout = this;\n const parent = this._parent;\n return function (value) {\n const cells = this.__cells;\n if (cells !== undefined && cells.layout === layout && cells.list[i] !== undefined) {\n this._writeProp!(field, value);\n } else if (parent !== null) {\n Reflect.set(parent, field, value, this);\n } else {\n Object.defineProperty(this, field, { value, writable: true, enumerable: true, configurable: true });\n }\n };\n }\n}\n"]}
|
package/dist/props/observer.d.ts
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { type PropSlot } from "./slot.js";
|
|
2
|
-
/**
|
|
3
|
-
* What the slots touched inside {@link observeSlots} are reported to.
|
|
4
|
-
*
|
|
5
|
-
* Reads and writes are recorded rather than declared: a dependency is whatever a
|
|
6
|
-
* computation actually touched, bindings included, so nothing has to annotate a
|
|
7
|
-
* prop as mattering to anyone.
|
|
8
|
-
*/
|
|
2
|
+
/** What the slots touched inside {@link observeSlots} are reported to. Reads and writes are recorded rather than declared: a dependency is whatever a computation actually touched, bindings included, so nothing annotates a prop as mattering to anyone. */
|
|
9
3
|
export interface SlotObserver {
|
|
10
4
|
read(slot: PropSlot<unknown>): void;
|
|
11
5
|
write(slot: PropSlot<unknown>): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observer.d.ts","sourceRoot":"","sources":["../../src/props/observer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAErD
|
|
1
|
+
{"version":3,"file":"observer.d.ts","sourceRoot":"","sources":["../../src/props/observer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAErD,8PAA8P;AAC9P,MAAM,WAAW,YAAY;IACzB,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IACpC,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IACrC,8FAA8F;IAC9F,KAAK,CAAC,CAAC,IAAI,EAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CAC/C;AAED,6DAA6D;AAC7D,eAAO,MAAM,WAAW,iBAAiB,CAAC;AAC1C,qEAAqE;AACrE,eAAO,MAAM,UAAU,SAAS,CAAC;AACjC,6EAA6E;AAC7E,eAAO,MAAM,eAAe,cAAc,CAAC;AAC3C,0EAA0E;AAC1E,eAAO,MAAM,cAAc,cAAc,CAAC;AAE1C,2GAA2G;AAC3G,wBAAgB,YAAY,CAAC,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAOtE;AAED,+DAA+D;AAC/D,wBAAgB,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAO5C;AAED,mFAAmF;AACnF,wBAAgB,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,MAAM,CAEzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observer.js","sourceRoot":"","sources":["../../src/props/observer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAiB,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"observer.js","sourceRoot":"","sources":["../../src/props/observer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAiB,MAAM,QAAQ,CAAC;AAUrD,6DAA6D;AAC7D,MAAM,CAAC,MAAM,WAAW,GAAG,cAAc,CAAC;AAC1C,qEAAqE;AACrE,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC;AACjC,6EAA6E;AAC7E,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;AAC3C,0EAA0E;AAC1E,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAAC;AAE1C,2GAA2G;AAC3G,MAAM,UAAU,YAAY,CAAI,QAAsB,EAAE,EAAW;IAC/D,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;IACxC,IAAI,CAAC;QACD,OAAO,EAAE,EAAE,CAAC;IAChB,CAAC;YAAS,CAAC;QACP,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC;AACL,CAAC;AAED,+DAA+D;AAC/D,MAAM,UAAU,UAAU,CAAI,EAAW;IACrC,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACpC,IAAI,CAAC;QACD,OAAO,EAAE,EAAE,CAAC;IAChB,CAAC;YAAS,CAAC;QACP,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC;AACL,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,SAAS,CAAC,IAAuB;IAC7C,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;AACtE,CAAC","sourcesContent":["import { _setObserver, type PropSlot } from \"./slot\";\n\n/** What the slots touched inside {@link observeSlots} are reported to. Reads and writes are recorded rather than declared: a dependency is whatever a computation actually touched, bindings included, so nothing annotates a prop as mattering to anyone. */\nexport interface SlotObserver {\n read(slot: PropSlot<unknown>): void;\n write(slot: PropSlot<unknown>): void;\n /** A node's clock was read — a result that depends on it is not a function of slots alone. */\n clock?(host: { readonly id: string }): void;\n}\n\n/** The {@link PropSlot._name} of `Node2D`'s laid-out box. */\nexport const LAYOUT_SLOT = \"layoutBounds\";\n/** A document variable's slot is named this plus the variable id. */\nexport const VAR_PREFIX = \"var:\";\n/** A timeline node's presence pseudo-slot is named this plus the node id. */\nexport const PRESENCE_PREFIX = \"presence:\";\n/** A node's child list and parent link, as a pseudo-slot on that node. */\nexport const STRUCTURE_SLOT = \"structure\";\n\n/** Run `fn` with every slot read and write reported to `observer`. An inner scope shadows an outer one. */\nexport function observeSlots<T>(observer: SlotObserver, fn: () => T): T {\n const previous = _setObserver(observer);\n try {\n return fn();\n } finally {\n _setObserver(previous);\n }\n}\n\n/** Run `fn` with nothing observing, inside a scope that is. */\nexport function unobserved<T>(fn: () => T): T {\n const previous = _setObserver(null);\n try {\n return fn();\n } finally {\n _setObserver(previous);\n }\n}\n\n/** `\"card.x\"` for a node's prop, the bare name for a hostless slot (`\"var:g\"`). */\nexport function slotLabel(slot: PropSlot<unknown>): string {\n return slot._host ? `${slot._host.id}.${slot._name}` : slot._name;\n}\n"]}
|
package/dist/props/slot.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import type { SlotObserver } from "./observer.js";
|
|
2
|
-
/**
|
|
3
|
-
* A captured state of a {@link PropSlot}: the thunk it was bound to, or the
|
|
4
|
-
* plain value it held. Produced by {@link PropSlot.snapshot} and consumed by
|
|
5
|
-
* {@link PropSlot.restoreFrom}.
|
|
6
|
-
*/
|
|
2
|
+
/** A captured state of a {@link PropSlot} (the thunk it was bound to, or the plain value), from {@link PropSlot.snapshot} to {@link PropSlot.restoreFrom}. */
|
|
7
3
|
/** @internal */
|
|
8
4
|
export interface PropSnapshot<T> {
|
|
9
5
|
value: T;
|
|
@@ -18,20 +14,11 @@ export declare let _observer: SlotObserver | null;
|
|
|
18
14
|
/** @internal Only this module can reassign the binding. Returns the observer it replaced. */
|
|
19
15
|
export declare function _setObserver(observer: SlotObserver | null): SlotObserver | null;
|
|
20
16
|
/**
|
|
21
|
-
* The storage behind one `property`: a plain value, or a thunk evaluated on
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* (`"=4[g]+3"`), an author's `width={() => …}` and an alignment binding reading
|
|
27
|
-
* a box written mid-layout all correct without anything declaring an edge. The
|
|
28
|
-
* cache-and-invalidate version of this could only get the last one right by
|
|
29
|
-
* observing the write, and paid for it everywhere: a `peek()`/`get()` split at
|
|
30
|
-
* every write path, so a read taken inside whatever computation happened to be
|
|
31
|
-
* running did not register an edge with no business existing.
|
|
32
|
-
*
|
|
33
|
-
* The bet is that recomputing is cheaper than tracking. Bindings here are
|
|
34
|
-
* arithmetic over a handful of reads, and a frame's draw dwarfs all of them.
|
|
17
|
+
* The storage behind one `property`: a plain value, or a thunk evaluated on every read. There is no dependency graph and
|
|
18
|
+
* nothing to invalidate: a bound slot recomputes when asked, so a document expression (`"=4[g]+3"`), an author's
|
|
19
|
+
* `width={() => …}` and an alignment binding reading a box written mid-layout are all correct without declaring an
|
|
20
|
+
* edge. (A cache-and-invalidate version could only get the last one right by observing the write, and paid for it at
|
|
21
|
+
* every write path.) The bet is that recomputing is cheaper than tracking: bindings are arithmetic over a few reads.
|
|
35
22
|
*/
|
|
36
23
|
export declare class PropSlot<T> {
|
|
37
24
|
readonly _host: {
|
package/dist/props/slot.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slot.d.ts","sourceRoot":"","sources":["../../src/props/slot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C
|
|
1
|
+
{"version":3,"file":"slot.d.ts","sourceRoot":"","sources":["../../src/props/slot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,8JAA8J;AAC9J,gBAAgB;AAChB,MAAM,WAAW,YAAY,CAAC,CAAC;IAC3B,KAAK,EAAE,CAAC,CAAC;IACT,qFAAqF;IACrF,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;CAChB;AAED;;;GAGG;AACH,eAAO,IAAI,SAAS,EAAE,YAAY,GAAG,IAAW,CAAC;AAEjD,6FAA6F;AAC7F,wBAAgB,YAAY,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,YAAY,GAAG,IAAI,CAI/E;AAED;;;;;;GAMG;AACH,qBAAa,QAAQ,CAAC,CAAC;IAQf,QAAQ,CAAC,KAAK,EAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAC9C,QAAQ,CAAC,KAAK,EAAE,MAAM;IAR1B,OAAO,CAAC,MAAM,CAAI;IAClB,OAAO,CAAC,GAAG,CAA0B;IACrC,OAAO,CAAC,QAAQ,CAAS;IAEzB,iFAAiF;gBAE7E,OAAO,EAAE,CAAC,EACD,KAAK,GAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,IAAW,EAC5C,KAAK,GAAE,MAAW;IAK/B,GAAG,IAAI,CAAC;IAgBR,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;IAMnB,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,GAAG,IAAI;IAKvB,yDAAyD;IACzD,MAAM,IAAI,IAAI;IAOd,OAAO,IAAI,OAAO;IAIlB,QAAQ,IAAI,YAAY,CAAC,CAAC,CAAC;IAI3B,WAAW,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI;IAKxC,mFAAmF;IACnF,OAAO,IAAI,IAAI;CAIlB"}
|
package/dist/props/slot.js
CHANGED
|
@@ -10,20 +10,11 @@ export function _setObserver(observer) {
|
|
|
10
10
|
return previous;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* The storage behind one `property`: a plain value, or a thunk evaluated on
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* (`"=4[g]+3"`), an author's `width={() => …}` and an alignment binding reading
|
|
19
|
-
* a box written mid-layout all correct without anything declaring an edge. The
|
|
20
|
-
* cache-and-invalidate version of this could only get the last one right by
|
|
21
|
-
* observing the write, and paid for it everywhere: a `peek()`/`get()` split at
|
|
22
|
-
* every write path, so a read taken inside whatever computation happened to be
|
|
23
|
-
* running did not register an edge with no business existing.
|
|
24
|
-
*
|
|
25
|
-
* The bet is that recomputing is cheaper than tracking. Bindings here are
|
|
26
|
-
* arithmetic over a handful of reads, and a frame's draw dwarfs all of them.
|
|
13
|
+
* The storage behind one `property`: a plain value, or a thunk evaluated on every read. There is no dependency graph and
|
|
14
|
+
* nothing to invalidate: a bound slot recomputes when asked, so a document expression (`"=4[g]+3"`), an author's
|
|
15
|
+
* `width={() => …}` and an alignment binding reading a box written mid-layout are all correct without declaring an
|
|
16
|
+
* edge. (A cache-and-invalidate version could only get the last one right by observing the write, and paid for it at
|
|
17
|
+
* every write path.) The bet is that recomputing is cheaper than tracking: bindings are arithmetic over a few reads.
|
|
27
18
|
*/
|
|
28
19
|
export class PropSlot {
|
|
29
20
|
_host;
|
package/dist/props/slot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slot.js","sourceRoot":"","sources":["../../src/props/slot.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slot.js","sourceRoot":"","sources":["../../src/props/slot.ts"],"names":[],"mappings":"AAUA;;;GAGG;AACH,MAAM,CAAC,IAAI,SAAS,GAAwB,IAAI,CAAC;AAEjD,6FAA6F;AAC7F,MAAM,UAAU,YAAY,CAAC,QAA6B;IACtD,MAAM,QAAQ,GAAG,SAAS,CAAC;IAC3B,SAAS,GAAG,QAAQ,CAAC;IACrB,OAAO,QAAQ,CAAC;AACpB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,OAAO,QAAQ;IAQJ;IACA;IARL,MAAM,CAAI;IACV,GAAG,GAAqB,IAAI,CAAC;IAC7B,QAAQ,GAAG,KAAK,CAAC;IAEzB,iFAAiF;IACjF,YACI,OAAU,EACD,QAAwC,IAAI,EAC5C,QAAgB,EAAE;QADlB,UAAK,GAAL,KAAK,CAAuC;QAC5C,UAAK,GAAL,KAAK,CAAa;QAE3B,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC;IAC1B,CAAC;IAED,GAAG;QACC,sEAAsE;QACtE,0BAA0B;QAC1B,IAAI,SAAS,KAAK,IAAI;YAAE,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C,oEAAoE;QACpE,wEAAwE;QACxE,qEAAqE;QACrE,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO,IAAI,CAAC,MAAM,CAAC;QACnD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QACtC,CAAC;gBAAS,CAAC;YACP,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QAC1B,CAAC;IACL,CAAC;IAED,GAAG,CAAC,KAAQ;QACR,IAAI,SAAS,KAAK,IAAI;YAAE,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC9C,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;QAChB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,IAAI,CAAC,EAAW;QACZ,IAAI,SAAS,KAAK,IAAI;YAAE,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC9C,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;IAClB,CAAC;IAED,yDAAyD;IACzD,MAAM;QACF,IAAI,CAAC,IAAI,CAAC,GAAG;YAAE,OAAO;QACtB,IAAI,SAAS,KAAK,IAAI;YAAE,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC9C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;IACpB,CAAC;IAED,OAAO;QACH,OAAO,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC;IAC7B,CAAC;IAED,QAAQ;QACJ,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;IACnF,CAAC;IAED,WAAW,CAAC,IAAqB;QAC7B,IAAI,IAAI,CAAC,EAAE;YAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;;YAC3B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,mFAAmF;IACnF,OAAO;QACH,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;QAChB,IAAI,CAAC,MAAM,GAAG,SAAyB,CAAC;IAC5C,CAAC;CACJ","sourcesContent":["import type { SlotObserver } from \"./observer\";\n\n/** A captured state of a {@link PropSlot} (the thunk it was bound to, or the plain value), from {@link PropSlot.snapshot} to {@link PropSlot.restoreFrom}. */\n/** @internal */\nexport interface PropSnapshot<T> {\n value: T;\n /** Present only for a bound slot; restoring one re-binds rather than freezing it. */\n fn?: () => T;\n}\n\n/**\n * @internal The observer every slot reports to, or `null` — which is every frame of\n * playback, so the hot path pays one null check. Installed by `observeSlots`.\n */\nexport let _observer: SlotObserver | null = null;\n\n/** @internal Only this module can reassign the binding. Returns the observer it replaced. */\nexport function _setObserver(observer: SlotObserver | null): SlotObserver | null {\n const previous = _observer;\n _observer = observer;\n return previous;\n}\n\n/**\n * The storage behind one `property`: a plain value, or a thunk evaluated on every read. There is no dependency graph and\n * nothing to invalidate: a bound slot recomputes when asked, so a document expression (`\"=4[g]+3\"`), an author's\n * `width={() => …}` and an alignment binding reading a box written mid-layout are all correct without declaring an\n * edge. (A cache-and-invalidate version could only get the last one right by observing the write, and paid for it at\n * every write path.) The bet is that recomputing is cheaper than tracking: bindings are arithmetic over a few reads.\n */\nexport class PropSlot<T> {\n private _value: T;\n private _fn: (() => T) | null = null;\n private _running = false;\n\n /** `_host` and `_name` only label the slot for an observer — see `slotLabel`. */\n constructor(\n initial: T,\n readonly _host: { readonly id: string } | null = null,\n readonly _name: string = \"\",\n ) {\n this._value = initial;\n }\n\n get(): T {\n // Before the re-entrancy check, so a binding's own reads are recorded\n // under whatever read it.\n if (_observer !== null) _observer.read(this);\n // A binding that reads its own slot re-enters here mid-evaluation —\n // `bind(() => mapper(ext(), slot.get()))` is how a mapper is handed the\n // previous value. It gets the last settled one instead of recursing.\n if (!this._fn || this._running) return this._value;\n this._running = true;\n try {\n return (this._value = this._fn());\n } finally {\n this._running = false;\n }\n }\n\n set(value: T): void {\n if (_observer !== null) _observer.write(this);\n this._fn = null;\n this._value = value;\n }\n\n bind(fn: () => T): void {\n if (_observer !== null) _observer.write(this);\n this._fn = fn;\n }\n\n /** Freeze a bound slot at what it currently computes. */\n unbind(): void {\n if (!this._fn) return;\n if (_observer !== null) _observer.write(this);\n this._value = this.get();\n this._fn = null;\n }\n\n isBound(): boolean {\n return this._fn !== null;\n }\n\n snapshot(): PropSnapshot<T> {\n return this._fn ? { value: this.get(), fn: this._fn } : { value: this._value };\n }\n\n restoreFrom(snap: PropSnapshot<T>): void {\n if (snap.fn) this.bind(snap.fn);\n else this.set(snap.value);\n }\n\n /** Releases the bound closure and the value slot. The slot is inert after this. */\n dispose(): void {\n this._fn = null;\n this._value = undefined as unknown as T;\n }\n}\n"]}
|