@motionscript/core 0.1.0-alpha.9 → 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 +29 -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 +35 -96
- 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-5TDMGUXQ.js +3 -0
- 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 +41 -3
- 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 -54
- package/dist/components/trees/node/node-reactive.d.ts.map +1 -1
- package/dist/components/trees/node/node-reactive.js +13 -39
- 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 +15 -30
- package/dist/document/command-traits.d.ts.map +1 -1
- package/dist/document/command-traits.js +31 -31
- 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 +12 -18
- package/dist/document/settled-index.d.ts.map +1 -1
- package/dist/document/settled-index.js +29 -31
- 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 +97 -281
- 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 +7 -13
- package/dist/props/host.d.ts.map +1 -1
- package/dist/props/host.js +3 -1
- package/dist/props/host.js.map +1 -1
- package/dist/props/layout.d.ts +18 -0
- package/dist/props/layout.d.ts.map +1 -0
- package/dist/props/layout.js +73 -0
- package/dist/props/layout.js.map +1 -0
- 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-7DB6BI27.js +0 -6
- package/dist/browser/chunks/chunk-7DB6BI27.js.map +0 -7
- package/dist/browser/chunks/chunk-IX53IFBD.js +0 -13
- package/dist/browser/chunks/chunk-IX53IFBD.js.map +0 -7
- package/dist/browser/chunks/chunk-Q55UPA3E.js +0 -3
- package/dist/browser/chunks/chunk-Q55UPA3E.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":"timeline.js","sourceRo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,GAAG,GAAG,CAAC,CAAC;;gBAC/C,EAAE,GAAG,GAAG,CAAC;QAClB,CAAC;QACD,OAAO,EAAE,CAAC;IACd,CAAC;CACJ;AAED,MAAM,OAAO,GAA2B,EAAE,CAAC","sourcesContent":["import { clamp01 } from \"@/util/clamp\";\nimport { applySnapshotLayer, captureLayer, type PropLayer, type ReactiveHost } from \"@/components/trees/node/node-reactive\";\nimport type { Node, NodeDimension } from \"@/components/trees/node/node\";\nimport type { Canvas2D } from \"@/components/trees/root/canvas2d-node\";\nimport { _observer, PropSlot, type PropSnapshot } from \"@/props/slot\";\nimport { LAYOUT_SLOT, observeSlots, PRESENCE_PREFIX, unobserved, VAR_PREFIX, type SlotObserver } from \"@/props/observer\";\nimport { driveCommand, loopCommand, type Command } from \"@/tween/command\";\nimport { loopRepeats } from \"@/tween/loop\";\nimport type { EasingFunction } from \"@/tween/ease/type\";\nimport { easeOfSpec } from \"@/tween/ease/spec\";\nimport { commandNodeRefs, commandTraits, hasNodeRef, isContextProvider, isLayoutNeutralProp, writesPlacementInPlace } from \"./command-traits\";\nimport { diffClip, jsonEqual } from \"./diff\";\nimport { indexDocument, type DocIndex } from \"./doc-index\";\nimport { expressionOps } from \"./expression/ops\";\nimport { MISSING_TYPE, missingNode, missingNodeOf, placeholderProps } from \"./missing-node\";\nimport { migrateNodeProps } from \"./prop-evolution\";\nimport type { VariableResolver } from \"./expression/types\";\nimport type { Registry, VariableTarget } from \"./registry\";\nimport { SettledIndex } from \"./settled-index\";\nimport { commandSoundsOf } from \"@/components/factory/timeline\";\nimport type { SoundOptions } from \"@/components/factory/api\";\nimport { planTimelinePatch, type PatchEnvironment, type TimelinePatch } from \"./timeline-patch\";\nimport type { CommandSpec, EaseSpec, NodeSpec, NodeSpan, VisualDocument, VariableSpec } from \"./types\";\nimport { documentDuration, effectiveSpanIn, isStillDocument, nodeSpan, ROOT_NODE_ID } from \"./types\";\n\n/**\n * A compiled clip document: the thing that answers \"what does this look like\n * at `t`\" without having rendered `t - 1`.\n *\n * This is the whole reason the document model exists. A generator could\n * only be *advanced*, so a backward seek meant tearing the tree down and\n * replaying from frame 0, and a clip's duration was unknowable without running\n * it to the end. A timeline is built once and evaluated in any order, at any\n * time, as many times as you like — which is what makes scrubbing cheap, export\n * parallelizable, and a frame reproducible.\n *\n * ### The two phases, and why `from` needs both\n *\n * **Build** instantiates every node the document mentions and parents it.\n *\n * **Compile** then walks the commands in `at` order and asks each one's factory\n * for a {@link Command}. That order is load-bearing: a command's *start* value\n * is read from the node at the moment it is constructed (`node.to({x: 100})`\n * snapshots whatever `x` is now), so each command has to be built with the node\n * in the state its predecessors left. Compile therefore runs every command to\n * `at(1)` before building the next — see {@link compile}. Once built, a\n * `Command.at(t)` is pure, and the mutations compile caused are undone by\n * restoring the baseline.\n *\n * Building is O(commands) and happens once. Evaluating is what happens per\n * frame, and is O(commands) with no allocation, except that a command marked\n * settling is held at its end values once finished — see `settled-index.ts`.\n *\n * ### Variables and expressions\n *\n * A third thing gets built alongside the tree: one {@link PropSlot} per declared\n * {@link VariableSpec}, and a binding on every prop whose authored value is an\n * expression (`\"=4[g]+3\"` — see `document/expression.ts`). Those two together\n * are how one command drives many nodes.\n *\n * A binding is a thunk that reads the variable, and a bound prop recomputes on\n * every read — so `variableTo` writing the slot is visible to every prop that\n * names it, with nothing to invalidate and no edge to declare. A node driven\n * only by expressions is not in the animated list at all: there is no baseline\n * to restore, because nothing overwrote it.\n *\n * A reference spelled with a dot (`\"=[card.x]+20\"`) reads another node's prop\n * instead, through the same machinery — see `ClipTimeline._resolveVariable`\n * for why that one resolves at read time rather than at compile time.\n */\n\n/** A sound a placed command plays: from `at` to `until` in clip seconds, or to its own end. */\nexport interface PlacedSound {\n readonly node: Node;\n readonly at: number;\n readonly until: number | undefined;\n readonly src: string;\n readonly options: SoundOptions;\n}\n\n/**\n * Something a build stepped around instead of failing on: a row of a type the\n * registry lacks, built as a placeholder, or a command no one could run, left out.\n */\nexport interface TimelineIssue {\n code: \"unknown-node-type\" | \"unknown-command\";\n message: string;\n /** The row built as a placeholder, or the node a skipped command targets. */\n nodeId?: string;\n commandId?: string;\n /** The node type or command type that is unknown. */\n type: string;\n}\n\n/** A placed command as the runtime outside the timeline sees it. */\nexport interface PlacedCommandInfo {\n readonly spec: CommandSpec;\n /** Seconds from clip start. */\n readonly start: number;\n /** Seconds. Zero is a stamp — it applies in full from `start` onward. */\n readonly duration: number;\n /**\n * Seconds from which it writes: `start`, or for an entrance the earlier time\n * its first frame is held from (see {@link ClipTimeline._holdEntrances}).\n */\n readonly holdFrom: number;\n /** Every slot building it and running it to its end wrote. */\n readonly writes: ReadonlySet<PropSlot<unknown>>;\n readonly readsLayout: boolean;\n}\n\ninterface PlacedCommand extends PlacedCommandInfo {\n readonly command: Command<Record<string, unknown>>;\n readonly writes: Set<PropSlot<unknown>>;\n /** Its neighbours decide it, so it is worked out again after every compile and update. */\n holdFrom: number;\n readonly entrance: boolean;\n /** What it acts on, so the animated lists can be rebuilt without resolving it again. */\n readonly owner: LiveNode | LiveVariable;\n}\n\n/**\n * A live variable: a slot nothing draws, that props read through an expression.\n *\n * A plain {@link PropSlot} rather than a node, because that is all a variable\n * needs to be. A prop bound to `() => slot.get()` re-reads it every time it is\n * read, so a `variableTo` writing this slot is picked up by every prop naming it\n * — with nothing in the node layer, the layout pass or the renderer knowing\n * variables exist.\n */\ninterface LiveVariable {\n spec: VariableSpec;\n /** Kept across an update: every binding compiled against it captured {@link read}, which reads this. */\n cell: PropSlot<unknown>;\n /** What an expression calls. Stable across the life of the build. */\n read: () => unknown;\n /** Handed to a variable command's factory. */\n target: VariableTarget;\n /** The declared value, restored before every evaluation. */\n baseline: unknown;\n}\n\n/** What `build` records about one node so evaluation can find and reset it. */\ninterface LiveNode {\n spec: NodeSpec;\n node: Node;\n /** Every reactive cell as the build left it, before any command or arrival touched it. */\n initial: PropLayer;\n initialStackDepth: number;\n /** What evaluation restores: {@link initial}, or the node as it arrived when it enters later. */\n baseline: PropLayer;\n /** Depth of the node's save stack at the baseline — see {@link ClipTimeline._restoreBaselines}. */\n baseStackDepth: number;\n /**\n * Whether the row is in the tree, as a slot, so a `[key.prop]` read taken under\n * an observer depends on it — the node answering can come and go.\n */\n presence: PropSlot<boolean>;\n}\n\n/** One stop of an update's walk: a command to build or replay, or an arrival baseline to take. */\ninterface WalkStep {\n at: number;\n spec?: CommandSpec;\n capture?: string;\n}\n\n/** Resolve an {@link EaseSpec} to the function the tween actually calls. */\nfunction resolveEase(ease: EaseSpec | undefined, registry: Registry): EasingFunction | undefined {\n if (!ease) return undefined;\n return easeOfSpec(ease, (key) => registry.ease(key), () => registry.easeKeys());\n}\n\n/**\n * Order commands for compilation and evaluation.\n *\n * By `at`, then by the order they appear in the document. The tiebreak matters:\n * two commands sharing an `at` is how the model spells \"in parallel\", and when\n * both write the same prop the later one in the array wins — the same\n * last-writer rule `commandParallel` already uses, so the two compose\n * predictably.\n */\nfunction inTimelineOrder(commands: readonly CommandSpec[]): CommandSpec[] {\n return commands\n .map((spec, index) => ({ spec, index }))\n .sort((a, b) => (a.spec.at - b.spec.at) || (a.index - b.index))\n .map((e) => e.spec);\n}\n\n/** The scene root when a document doesn't author one explicitly. */\nfunction defaultRootSpec(): NodeSpec {\n return { id: ROOT_NODE_ID, type: \"canvas2d\", parentId: null, layerOrder: 0, props: {} };\n}\n\n/**\n * Split the scene root — the row with {@link ROOT_NODE_ID} and `type: \"canvas2d\"`\n * — out of the document's nodes.\n *\n * The root is an ordinary row, not a special field, but it is not an ordinary\n * *child*: it is the canvas itself, not something `build` instantiates or\n * `syncPresence` parents. Every other place that walks the nodes needs it removed\n * first; this is the one place that removal happens, synthesizing the default\n * when the document left it out.\n */\nfunction splitRoot(specs: NodeSpec[]): { root: NodeSpec; rest: NodeSpec[] } {\n const rest: NodeSpec[] = [];\n let root: NodeSpec | undefined;\n for (const spec of specs) {\n if (spec.id === ROOT_NODE_ID && spec.type === \"canvas2d\") {\n root = spec;\n continue;\n }\n rest.push(spec);\n }\n return { root: root ?? defaultRootSpec(), rest };\n}\n\n/**\n * When each node is in the tree.\n *\n * Read off the document rather than accumulated during playback: a span of\n * `[2, 5)` says the node is present at every seek in it, whether the playhead\n * arrived from 1s or from 9s. A still's nodes carry no span, so they are present\n * always.\n */\nfunction presenceOf(doc: VisualDocument): Map<string, NodeSpan> {\n const spans = new Map<string, NodeSpan>();\n for (const node of doc.nodes) spans.set(node.id, nodeSpan(node));\n // The root is always present; it is not synced like an ordinary child.\n spans.delete(ROOT_NODE_ID);\n return spans;\n}\n\n/**\n * The clip document, compiled and evaluable, over the one canvas it builds\n * into — its live nodes, presence and baselines all belong to that tree.\n */\nexport class ClipTimeline {\n constructor(doc: VisualDocument, registry: Registry, private readonly canvas: Canvas2D) {\n this._doc = doc;\n this._registry = registry;\n const { root, rest } = splitRoot(doc.nodes);\n this._rootSpec = root;\n this._specs = rest;\n this._varSpecs = doc.variables ?? [];\n // Built from the rows rather than from the tree: an expression resolves its\n // references the moment it compiles, which is before most nodes exist.\n this._keyed = new Map(\n [root, ...rest]\n .filter((spec): spec is NodeSpec & { key: string } => !!spec.key)\n .map((spec) => [spec.key, spec.id]),\n );\n this._spans = presenceOf(doc);\n // Declared, not measured, so it is known before anything is built.\n this._duration = documentDuration(doc);\n }\n\n /** How long the scene runs. Read by the runtime after {@link build}. */\n get duration(): number {\n return this._duration;\n }\n\n /** Instantiate the tree into the canvas. Once per timeline: the nodes it makes belong to that canvas. */\n build(): void {\n // Variables first: everything below may compile an expression, and an\n // expression resolves its `[id]`s the moment it is compiled.\n this._buildVariables();\n\n this._pristineRoot = captureLayer(this.canvas as unknown as ReactiveHost);\n this._applyRootProps();\n\n for (const spec of this._specs) {\n this._live.set(spec.id, {\n spec,\n node: this._instantiate(spec),\n initial: NO_LAYER,\n initialStackDepth: 0,\n baseline: NO_LAYER,\n baseStackDepth: 0,\n presence: new PropSlot<boolean>(false, null, PRESENCE_PREFIX + spec.id),\n });\n }\n\n // Record what each parent built for itself *before* any document child\n // lands, so a composite node's own children keep their indices. A\n // document child is always placed after them.\n this._baseChildCount.set(ROOT_NODE_ID, this.canvas._allChildren.length);\n for (const [id, entry] of this._live) {\n this._baseChildCount.set(id, entry.node._allChildren.length);\n }\n\n this.syncPresence(0);\n\n // The root's baseline is captured too: `targetId: null` commands animate\n // the camera and the scene fill, and those need resetting like anything\n // else.\n this._root = {\n spec: this._rootSpec,\n node: this.canvas,\n initial: NO_LAYER,\n initialStackDepth: 0,\n baseline: NO_LAYER,\n baseStackDepth: 0,\n presence: new PropSlot<boolean>(true, null, PRESENCE_PREFIX + ROOT_NODE_ID),\n };\n for (const entry of this._live.values()) captureInitial(entry);\n captureInitial(this._root);\n this._baselined = new Set(this._present);\n for (const id of this._present) {\n if (this._live.get(id)?.node.mounted === false) {\n this._baselined.delete(id);\n this._unmounted.add(id);\n }\n }\n }\n\n /**\n * Build every command against the laid-out tree, then put the tree back.\n *\n * Separate from {@link build} because a command may read post-layout state to\n * decide what it animates *from*: an animated `removeChildAt` pins the\n * departing child to its rendered width, which is zero until layout runs.\n *\n * `settle` re-lays the tree out. It runs whenever the walk brings a node in or\n * takes one out, so a command is built against the tree as it stands at its\n * own `at` — see {@link _compileCommands}.\n */\n compile(settle: () => void = () => { }): void {\n this._settled = null;\n this._compileCommands(settle);\n this._restoreBaselines();\n const moved = this.syncPresence(0);\n if (this._restoreDisplaced(this._collectDisplaced()) || moved) settle();\n this._holdEntrances();\n this._indexSettled();\n }\n\n /** What a variable holds at the last evaluated time. For a host's inspector. */\n variableValue(id: string): unknown {\n return this._vars.get(id)?.cell.get();\n }\n\n /** Every variable this document declares, in declaration order. */\n variables(): readonly VariableSpec[] {\n return this._varSpecs;\n }\n\n /** The time the tree's presence was last synced to. */\n get presenceTime(): number {\n return this._presenceIndex().time;\n }\n\n /** Every sound a placed command plays, in clip seconds, with the node that plays it. */\n commandSounds(): PlacedSound[] {\n const out: PlacedSound[] = [];\n for (const placed of this._placed) {\n const played = commandSoundsOf(placed.command);\n if (!played) continue;\n for (const sound of played.sounds) {\n out.push({\n node: played.host,\n at: placed.start + sound.at,\n until: sound.until === undefined ? undefined : placed.start + sound.until,\n src: sound.src,\n options: sound.options,\n });\n }\n }\n return out;\n }\n\n /** Every compiled command, in timeline order — the indices {@link evaluateAt} reports writes under. */\n placedCommands(): readonly PlacedCommandInfo[] {\n return this._placed;\n }\n\n /** What the build stepped around — see {@link TimelineIssue}. Placeholders first, in row order. */\n issues(): TimelineIssue[] {\n const out: TimelineIssue[] = [];\n for (const { spec, node } of this._live.values()) {\n const missing = missingNodeOf(node);\n if (!missing) continue;\n out.push({\n code: \"unknown-node-type\",\n nodeId: spec.id,\n type: missing.type,\n message: `Unknown node type \"${missing.type}\" (node ${spec.id}): it builds as an empty placeholder, keeping its children.`,\n });\n }\n out.push(...this._skipped.values());\n return out;\n }\n\n /**\n * Put every node into the state it holds at `seconds`.\n *\n * A pure function of `seconds`: called in any order, repeatedly, and with\n * time going backwards. Restoring the baseline first is what makes it so —\n * without it a prop written by a command that has *not started yet* would\n * keep whatever the last evaluation left, and the same frame would look\n * different depending on how the playhead reached it.\n *\n * `onWrite` reports each slot a command writes, with its index in\n * {@link placedCommands}; the baseline restore is not reported.\n */\n evaluateAt(seconds: number, onWrite?: (index: number, slot: PropSlot<unknown>) => void): void {\n if (onWrite) {\n // Unobserved: a baseline holds prop cells, never presence or structure, so\n // an observer watching for those learns nothing from a write per cell.\n unobserved(() => this._restoreBaselines());\n this._evaluateObserved(seconds, onWrite);\n return;\n }\n\n if (this._settled) {\n this._restoreBaselines(this._wholeRestore);\n for (const { slot, baseline } of this._slotRestore) slot.restoreFrom(baseline);\n this._settled.evaluate(this._placed, seconds);\n return;\n }\n this._restoreBaselines();\n for (const placed of this._placed) {\n if (seconds < placed.holdFrom) continue;\n const local = seconds < placed.start ? 0\n : placed.duration > 0 ? (seconds - placed.start) / placed.duration\n : 1;\n // A finished command is held at `at(1)` rather than dropped, so a prop\n // written early and never touched again keeps its value — the same\n // rule `commandSequence` uses.\n placed.command.at(clamp01(local));\n }\n }\n\n /**\n * Add and remove document nodes so the tree matches `seconds`. Returns whether\n * anything moved.\n *\n * Separate from {@link evaluateAt} because it is structural: it changes what\n * layout walks, not what a prop holds. Called ahead of the evaluation for\n * the same time.\n */\n syncPresence(seconds: number): boolean {\n const rows = this._presenceIndex().crossed(seconds);\n // Nothing to do on the overwhelming majority of frames.\n if (rows.length === 0) return false;\n\n const arrivals: PresenceRow[] = [];\n const departures: PresenceRow[] = [];\n for (const row of rows) {\n const wanted = within(row, seconds);\n if (wanted !== this._present.has(row.id)) (wanted ? arrivals : departures).push(row);\n }\n this._arrived = arrivals;\n if (arrivals.length === 0 && departures.length === 0) return false;\n\n // Detach first: `remove` unmounts the whole subtree, so a node moving\n // parents is never briefly in two places.\n departures.sort(byDocumentOrder);\n for (const row of departures) {\n this._present.delete(row.id);\n row.siblings.add(row.slot, -1);\n const entry = this._live.get(row.id);\n if (!entry) continue;\n entry.presence.set(false);\n this._parentNodeOf(entry.spec)?.remove(entry.node);\n }\n\n // Insert after whatever the parent built for itself, at the row's place\n // among the siblings present, so `layerOrder` really is sibling order and a\n // composite's own children keep their indices. Ascending per parent, so\n // every sibling before a row is already in place when it lands.\n arrivals.sort(byDocumentOrder);\n const byParent = new Map<SiblingCounts, PresenceRow[]>();\n for (const row of arrivals) {\n const group = byParent.get(row.siblings);\n if (group) group.push(row);\n else byParent.set(row.siblings, [row]);\n }\n for (const [siblings, group] of byParent) {\n group.sort((a, b) => a.slot - b.slot);\n const parent = siblings.parentId === ROOT_NODE_ID ? this.canvas : this._live.get(siblings.parentId)?.node;\n const base = this._baseChildCount.get(siblings.parentId) ?? 0;\n for (const row of group) {\n this._present.add(row.id);\n const index = base + siblings.before(row.slot);\n siblings.add(row.slot, 1);\n const child = this._live.get(row.id);\n if (!child) continue;\n child.presence.set(true);\n parent?.addChildAt({ data: { child: child.node, index } });\n }\n }\n return true;\n }\n\n /** The node a row built, mounted or not; the canvas for the root. */\n liveNode(id: string): Node | undefined {\n return id === ROOT_NODE_ID ? this.canvas : this._live.get(id)?.node;\n }\n\n /**\n * What a row holds before any command has acted on it: its props as it\n * arrived, or as built for one that has not arrived yet. The same at every\n * time, which is what tells it from the node's live props. A bound prop is\n * read through its binding, so it answers for the tree as it stands.\n */\n baselineProps(id: string): Record<string, unknown> | undefined {\n const entry = id === ROOT_NODE_ID ? this._root : this._live.get(id);\n if (!entry) return undefined;\n const layer = entry.baseline === NO_LAYER ? entry.initial : entry.baseline;\n const props: Record<string, unknown> = {};\n for (const [key, snap] of layer) props[key] = snap.fn ? snap.fn() : snap.value;\n return props;\n }\n\n presenceSlot(id: string): PropSlot<boolean> | undefined {\n return id === ROOT_NODE_ID ? this._root?.presence : this._live.get(id)?.presence;\n }\n\n variableSlot(id: string): PropSlot<unknown> | undefined {\n return this._vars.get(id)?.cell;\n }\n\n /**\n * How to bring this built timeline to `next` in place, or `null` when only a\n * fresh build is sound. An audio document must be lowered by the caller first.\n */\n planUpdate(next: VisualDocument): TimelinePatch | null {\n const prev = this._docIndex ??= indexDocument(this._doc);\n return planTimelinePatch(prev, indexDocument(next), diffClip(this._doc, next), this._patchEnvironment());\n }\n\n /**\n * Apply a {@link planUpdate} result. The canvas must be attached at time 0\n * first, as for {@link build}; `prepare` samples and lays out like the step\n * between build and compile, `settle` like compile's. A throw leaves the\n * timeline unusable — dispose it and build fresh.\n */\n applyUpdate(patch: TimelinePatch, settle: () => void, prepare: () => void): void {\n if (!this._root) throw new Error(\"ClipTimeline.applyUpdate needs a built timeline.\");\n if (patch.prev !== this._docIndex) {\n throw new Error(\"This patch was planned against a different version of the document.\");\n }\n\n this._settled = null;\n this._restoreBaselines();\n this.syncPresence(0);\n\n this._updateVariables(patch);\n this._keyed.clear();\n for (const [key, id] of patch.next.keyed) this._keyed.set(key, id);\n\n const fresh = this._updateStructure(patch);\n\n for (const entry of fresh) {\n captureInitial(entry);\n const id = entry.spec.id;\n if (!this._present.has(id)) continue;\n if (entry.node.mounted) this._baselined.add(id);\n else this._unmounted.add(id);\n }\n for (const id of patch.inPlace) {\n const entry = this._live.get(id);\n if (entry) this._writeInPlace(entry, patch.prev.nodes.get(id)!);\n }\n if (patch.diff.rootChanged) {\n const host = this.canvas as unknown as ReactiveHost;\n applySnapshotLayer(host, this._pristineRoot);\n host._stateStack.length = 0;\n this._applyRootProps();\n captureInitial(this._root);\n }\n for (const id of patch.dirtyNodes) {\n const entry = id === ROOT_NODE_ID ? this._root : this._live.get(id);\n if (entry && !fresh.has(entry)) resetToInitial(entry);\n }\n prepare();\n\n const previous = new Map<string, PlacedCommand>();\n for (const placed of this._placed) previous.set(placed.spec.id, placed);\n const rebuilt = this._walkPatch(patch, previous, settle);\n\n const dirty = (id: string) => patch.dirtyNodes.has(id) || patch.dirtyVariables.has(id);\n const placed: PlacedCommand[] = [];\n const touched = new Set<TouchedOwner>();\n this._animated = [];\n this._animatedVars = [];\n this._animatedParts = [];\n if (!isStillDocument(this._doc)) {\n for (const spec of patch.next.ordered) {\n let entry = rebuilt.get(spec.id);\n if (!entry && !dirty(patch.next.targetOf(spec))) {\n const old = previous.get(spec.id);\n if (old) entry = old.spec === spec ? old : { ...old, spec };\n }\n if (!entry) continue;\n placed.push(entry);\n this._touch(entry, touched);\n }\n }\n this._placed = placed;\n for (const id of this._skipped.keys()) if (!patch.next.commands.has(id)) this._skipped.delete(id);\n\n this._restoreBaselines();\n const moved = this.syncPresence(0);\n if (this._restoreDisplaced(this._collectDisplaced()) || moved) settle();\n this._holdEntrances();\n this._indexSettled();\n }\n\n private _doc: VisualDocument;\n /** The vocabulary this document is compiled against — see `document/registry.ts`. */\n private readonly _registry: Registry;\n /** The scene root row — see {@link splitRoot}. */\n private _rootSpec: NodeSpec;\n private _specs: NodeSpec[];\n private _varSpecs: readonly VariableSpec[];\n private _spans: Map<string, NodeSpan>;\n private _duration: number;\n /** The current document's index, built on the first {@link planUpdate}. */\n private _docIndex: DocIndex | null = null;\n /** The canvas's cells before the root row was applied — what a patched root row resets to. */\n private _pristineRoot: PropLayer = NO_LAYER;\n\n /** Live nodes by id, valid between {@link build} and the next rebuild. */\n private readonly _live = new Map<string, LiveNode>();\n /** Live variables by id, same lifetime as {@link _live}. */\n private readonly _vars = new Map<string, LiveVariable>();\n /** Node ids by {@link NodeSpec.key}. Read off the document, so it needs no build. */\n private readonly _keyed: Map<string, string>;\n private _placed: PlacedCommand[] = [];\n /** Commands left out of {@link _placed}, by id — see {@link issues}. */\n private readonly _skipped = new Map<string, TimelineIssue>();\n /** Built after every compile and update, when any placed command is marked settling (`tween/command`). */\n private _settled: SettledIndex | null = null;\n /** With {@link _settled}: the animated nodes an unmarked command writes, put back whole… */\n private _wholeRestore: LiveNode[] = [];\n /** …and, on every other animated node, the baseline of each slot a marked command writes. */\n private _slotRestore: SlotBaseline[] = [];\n /** The scene root (`targetId: null`), plus its baseline. */\n private _root: LiveNode | null = null;\n /**\n * Only the nodes some command writes to. Everything else keeps its authored\n * props for the life of the scene, so restoring it every frame would be pure\n * waste — and on a large static scene that waste is most of the frame.\n *\n * A prop bound to a variable needs no restoring at all, which falls out of\n * this for free: the binding *is* the per-frame recompute, so a node driven\n * only by expressions never enters this list.\n */\n private _animated: LiveNode[] = [];\n /** Only the variables some command writes to. Same reasoning. */\n private _animatedVars: LiveVariable[] = [];\n /**\n * Slots on a part a node built for itself that some command writes, restored\n * alongside {@link _animated}. A part is no document row, so its baseline is\n * the slot's state the first time a command wrote it — see {@link _notePartWrite}.\n */\n private _animatedParts: PropSlot<unknown>[] = [];\n private readonly _partBaselines = new WeakMap<PropSlot<unknown>, PropSnapshot<unknown>>();\n /** Children each parent built for itself, which the document must not disturb. */\n private readonly _baseChildCount = new Map<string, number>();\n /** Node ids currently in the tree, so presence only churns when it changes. */\n private readonly _present = new Set<string>();\n /** Node ids whose baseline was taken while mounted — see {@link _compileCommands}. */\n private _baselined = new Set<string>();\n /**\n * Rows present at time 0 that a lifecycle command (`removeChildAt`,\n * `reparent`) took out of the parent their row names, as compile left them.\n * Presence only moves a row across its own span, so nothing else would put\n * one back before its command starts.\n */\n private _displaced: LiveNode[] = [];\n /** Rows that arrived, or were built, while an ancestor was out of the tree and wait for it — see {@link _baselineArrival}. */\n private readonly _unmounted = new Set<string>();\n private _presence: PresenceIndex | null = null;\n /** The rows the last {@link syncPresence} brought in, in document order. */\n private _arrived: readonly PresenceRow[] = [];\n\n /**\n * What a compiled expression resolves a reference against: a variable, or —\n * spelled with a dot — another node's prop.\n *\n * The dot is the whole discriminator, and it has to be: a node is not a value,\n * so `[card]` could never mean one, while a variable reference never carries a\n * prop. `document/validate.ts` reads the same split.\n *\n * A node reference resolves **late**. Nothing about the node is looked up here:\n * `build` binds in document order, so the node named may not exist yet, and\n * `syncPresence` adds and removes nodes as time moves, so one that exists can\n * still be legitimately absent at *t*. The thunk therefore does the lookup on\n * every read and answers `undefined` for a node that is not there — which is\n * `NaN` through arithmetic, loud in the first frame, and an unset prop on its\n * own. Throwing instead would make an `add` at 2s a crash at 0s.\n */\n private readonly _resolveVariable: VariableResolver = (name) => {\n const dot = name.indexOf(\".\");\n if (dot > 0) {\n const id = this._keyed.get(name.slice(0, dot));\n if (id === undefined) return undefined;\n const prop = name.slice(dot + 1);\n return () => (this._nodeById(id) as unknown as Record<string, unknown> | undefined)?.[prop];\n }\n return this._vars.get(name)?.read;\n };\n\n /**\n * The live node `id` names, or `undefined` while it is unbuilt or out of the\n * tree.\n *\n * Gated on `mounted` rather than on {@link _present}, which is only settled at\n * the end of {@link syncPresence} — so a prop read *during* the insertion walk\n * would see an out-of-date answer.\n */\n private _nodeById(id: string): Node | undefined {\n if (id === ROOT_NODE_ID) return this.canvas;\n const entry = this._live.get(id);\n if (!entry) return undefined;\n if (_observer !== null) this._readPresence(entry);\n return entry.node.mounted ? entry.node : undefined;\n }\n\n /** The row's presence and every document ancestor's — an ancestor leaving unmounts it too. */\n private _readPresence(entry: LiveNode): void {\n let at: LiveNode | undefined = entry;\n for (let depth = 0; at && depth <= this._live.size; depth++) {\n at.presence.get();\n at = at.spec.parentId === null ? undefined : this._live.get(at.spec.parentId);\n }\n }\n\n private _applyRootProps(): void {\n const { literal, bindings } = expressionOps.bindProps(this._rootSpec.props, this._resolveVariable);\n this.canvas.set({ ...literal, ...bindings } as never);\n }\n\n /** A row's node with its literal props passed to the constructor and its expressions bound after. */\n private _instantiate(spec: NodeSpec, rows: readonly NodeSpec[] = this._specs): Node {\n const props = migrateNodeProps(this._registry, spec.type, spec.props).props;\n const { literal, bindings, hasBindings } = expressionOps.bindProps(props, this._resolveVariable);\n if (!this._registry.strict && !this._registry.hasNode(spec.type)) {\n const dimension = this._placeholderDimension(spec, rows);\n const node = missingNode(dimension, spec, literal);\n const bound = placeholderProps(dimension, bindings);\n if (Object.keys(bound).length > 0) node.set(bound as never);\n return node;\n }\n const node = this._registry.instantiate(spec, literal);\n // Applied after construction rather than through it: see `instantiate`.\n if (hasBindings) node.set(bindings as never);\n return node;\n }\n\n /**\n * Create a slot per declared variable.\n *\n * The slot is created once per build and lives for the whole scene: a\n * variable has no presence span (see {@link VariableSpec}), so there is\n * nothing to sync and nothing that can be missing when an expression\n * compiled against it runs.\n */\n private _buildVariables(): void {\n for (const spec of this._varSpecs) {\n if (this._vars.has(spec.id)) {\n throw new Error(\n `Duplicate variable id \"${spec.id}\". Ids must be unique — an expression ` +\n `writing \"[${spec.id}]\" would otherwise name whichever declaration was read last.`,\n );\n }\n this._vars.set(spec.id, this._liveVariable(spec));\n }\n }\n\n private _liveVariable(spec: VariableSpec): LiveVariable {\n const cell = new PropSlot<unknown>(spec.value, null, VAR_PREFIX + spec.id);\n return {\n spec,\n cell,\n read: () => cell.get(),\n target: this._variableTarget(spec, cell),\n baseline: spec.value,\n };\n }\n\n private _variableTarget(spec: VariableSpec, cell: PropSlot<unknown>): VariableTarget {\n const lerp = this._registry.requireLerp(spec.lerp, spec.value, `variable \"${spec.id}\"`);\n return { id: spec.id, get: () => cell.get(), set: (v) => cell.set(v), lerp };\n }\n\n /**\n * Put every animated node back to its authored state.\n *\n * The save stack is truncated alongside the props, and that is not\n * housekeeping. `save`/`restore` are commands, so a `save` re-runs on every\n * evaluation of a frame after it — without the truncation the stack would\n * grow by one layer per frame forever, and a later `restore` would pop a\n * layer pushed by some *other* seek instead of the one its own `save` made.\n * Truncating is what keeps the pair a function of the chain rather than of\n * how the playhead got here.\n */\n private _restoreBaselines(nodes: readonly LiveNode[] = this._animated): void {\n // Structure before props: a node put back is attached, and the baseline is\n // what it holds once attached.\n this._restoreDisplaced(this._displaced);\n\n // Variables first, so a prop bound to one recomputes against the restored\n // value rather than a stale one.\n for (const entry of this._animatedVars) entry.cell.set(entry.baseline);\n\n for (const entry of nodes) {\n const host = entry.node as unknown as ReactiveHost;\n applySnapshotLayer(host, entry.baseline);\n if (host._stateStack.length > entry.baseStackDepth) {\n host._stateStack.length = entry.baseStackDepth;\n }\n }\n\n for (const slot of this._animatedParts) slot.restoreFrom(this._partBaselines.get(slot)!);\n }\n\n /**\n * Build every command, in timeline order, against a node already holding\n * what its predecessors left.\n *\n * The tree is moved to each command's `at` before it is built: an unmounted\n * node hands back an inert stepper and the command caches it, so a tween on a\n * node that enters at 2s built against the t=0 tree would never move. A node\n * entering here is baselined on arrival, before anything has touched it.\n *\n * The tree is re-laid-out only where something reads it — see\n * {@link _settleWindows}.\n */\n private _compileCommands(settle: () => void): void {\n if (isStillDocument(this._doc)) return;\n\n const touched = new Set<TouchedOwner>();\n const ordered = inTimelineOrder(this._doc.commands);\n const refBound = this._refBound(ordered);\n const settles = this._settleWindows(ordered, (i) => this._readsLayout(ordered[i], refBound));\n\n for (let i = 0; i < ordered.length; i++) {\n const spec = ordered[i];\n if (this.syncPresence(spec.at)) {\n // Every node present but not yet baselined arrived in this sync:\n // one that left and came back was baselined the first time.\n for (const row of this._arrived) {\n if (!this._baselined.has(row.id)) this._baselineArrival(row.id);\n }\n this._baselineMounted();\n if (settles[i]) settle();\n }\n\n const placed = this._buildPlaced(spec);\n if (!placed) continue;\n this._placed.push(placed);\n this._touch(placed, touched);\n }\n }\n\n /**\n * Building runs every marked command to its end, which the restore then undoes.\n * A node only marked commands write keeps every other slot at its baseline from\n * here on, so an evaluation puts back only the slots they write.\n */\n private _indexSettled(): void {\n const index = (this._settled = SettledIndex.build(this._placed));\n if (!index) return;\n this._restoreBaselines();\n\n const whole = new Set<LiveNode | LiveVariable>();\n const written = new Map<LiveNode, Set<PropSlot<unknown>>>();\n this._placed.forEach((placed, i) => {\n const held = index.holds(i);\n if (!held) whole.add(placed.owner);\n for (const slot of placed.writes) {\n const host = slot._host;\n const entry = host === null ? undefined : host.id === ROOT_NODE_ID ? this._root! : this._live.get(host.id);\n if (!entry) continue;\n if (!held) whole.add(entry);\n else if (written.has(entry)) written.get(entry)!.add(slot);\n else written.set(entry, new Set([slot]));\n }\n });\n this._wholeRestore = [];\n this._slotRestore = [];\n for (const entry of this._animated) {\n const slots = whole.has(entry) ? null : slotBaselines(entry, written.get(entry));\n if (slots) this._slotRestore.push(...slots);\n else this._wholeRestore.push(entry);\n }\n }\n\n /** The present rows whose node is no longer under the parent its row names. */\n private _collectDisplaced(): LiveNode[] {\n const out: LiveNode[] = [];\n for (const id of this._present) {\n const entry = this._live.get(id);\n const parent = entry && this._declaredParent(id);\n if (entry && parent && entry.node.parent !== parent) out.push(entry);\n }\n out.sort((a, b) => this._presenceIndex().row(a.spec.id)!.slot - this._presenceIndex().row(b.spec.id)!.slot);\n return (this._displaced = out);\n }\n\n /**\n * Put displaced rows back where {@link syncPresence} would have inserted them.\n * Returns whether any moved.\n */\n private _restoreDisplaced(entries: readonly LiveNode[]): boolean {\n let moved = false;\n for (const entry of entries) {\n const id = entry.spec.id;\n const row = this._presenceIndex().row(id);\n const parent = this._declaredParent(id);\n if (!row || !parent || !this._present.has(id) || entry.node.parent === parent) continue;\n entry.node.parent?.remove(entry.node);\n const base = this._baseChildCount.get(row.siblings.parentId) ?? 0;\n parent.addChildAt({ data: { child: entry.node, index: base + row.siblings.before(row.slot) } });\n moved = true;\n }\n return moved;\n }\n\n /** The node a row's `parentId` names: the canvas for the root, `undefined` while that row is unbuilt. */\n private _declaredParent(id: string): Node | undefined {\n const parentId = this._presenceIndex().row(id)?.siblings.parentId;\n if (parentId === undefined) return undefined;\n return parentId === ROOT_NODE_ID ? this.canvas : this._live.get(parentId)?.node;\n }\n\n /**\n * Take the baseline of a row that has just arrived, if it is mounted.\n *\n * A baseline is the node as it stands once attached: an unmounted node's cells\n * hold pre-attach values, without what it inherits from its ancestors. A row\n * can arrive while an ancestor is still out of the tree (a child entering\n * before its parent), so its baseline waits in {@link _unmounted} until\n * {@link _baselineMounted} finds it mounted.\n */\n private _baselineArrival(id: string): void {\n const entry = this._live.get(id);\n if (entry && !entry.node.mounted) {\n this._unmounted.add(id);\n return;\n }\n if (entry) captureBaseline(entry);\n this._baselined.add(id);\n this._unmounted.delete(id);\n }\n\n /** Baseline the rows that arrived unmounted and have since been mounted by an ancestor arriving. */\n private _baselineMounted(): void {\n for (const id of this._unmounted) {\n const entry = this._live.get(id);\n if (!entry) {\n this._unmounted.delete(id);\n } else if (entry.node.mounted) {\n captureBaseline(entry);\n this._baselined.add(id);\n this._unmounted.delete(id);\n }\n }\n }\n\n /**\n * Build one command against the tree as it stands and run it to its end —\n * which is what leaves its target where the next command's `from` must start.\n * Undone wholesale by {@link _restoreBaselines}. Throws when its target names\n * no row, for a node-scoped command of any kind. A command its target's type\n * does not publish, or any aimed at a placeholder, is skipped and recorded\n * (`null`) unless the registry is strict.\n *\n * The running-to-`at(1)` cannot be skipped: `node.to({ x: 100 })` reads `x`\n * when the command is *constructed*, so a chain built against the untouched\n * tree would give every step the same `from` and each would jump back to the\n * start.\n */\n private _buildPlaced(spec: CommandSpec): PlacedCommand | null {\n // Resolved in two tiers. The global table holds only what must resolve\n // *without* a node — the variable-scoped commands, whose target is not a\n // node at all, and the generic prop writers. That is why it is consulted\n // first: `scope` is what decides whether there is a node to look anything\n // up on. Everything else is a method on the target's own type, where it\n // cannot collide with another type's command of the same name.\n let entry = this._registry.command(spec.type);\n if (entry?.scope !== \"variable\") {\n const missing = missingNodeOf(this._targetOrThrow(spec).node);\n if (missing) {\n return this._skip(spec, `Command ${spec.id} (\"${spec.type}\") targets \"${spec.targetId}\", a placeholder for unknown node type \"${missing.type}\"; it is skipped.`, spec.type);\n }\n }\n if (!entry) {\n const typeKey = this._targetOrThrow(spec).entry.spec.type;\n const factory = this._registry.nodeCommand(typeKey, spec.type);\n if (!factory) {\n const message = `Node type \"${typeKey}\" has no command \"${spec.type}\" ` +\n `(command ${spec.id}). It publishes: ` +\n `${this._registry.commandKeys(typeKey).join(\", \") || \"none\"}.` +\n (LEGACY_COMMAND_HINTS[spec.type] ? ` ${LEGACY_COMMAND_HINTS[spec.type]}` : \"\");\n if (this._registry.strict) throw new Error(message);\n return this._skip(spec, `${message} It is skipped.`, spec.type);\n }\n entry = { key: spec.type, scope: \"node\", factory };\n }\n this._skipped.delete(spec.id);\n\n const duration = spec.duration ?? 0;\n const easing = resolveEase(spec.easing, this._registry);\n const recorder = new WriteRecorder(this._notePartWrite);\n // Applied inside `buildToEnd`, so the `at(1)` that leaves the target where\n // the next command's `from` starts is the *loop's* end — which for an odd\n // number of `alternate` passes is back where it began. A looped command\n // then carries the span of every pass, which is what the placed duration\n // has to be for a seek into the fourth repetition to land in it.\n const loop = loopRepeats(spec.loop) ? spec.loop : undefined;\n const repeat = (made: Command<Record<string, unknown>> | void) =>\n (made && loop ? loopCommand(made, loop, this._unlimitedFill(spec.at)) : made);\n\n if (entry.scope === \"variable\") {\n const variable = spec.targetId === null ? undefined : this._vars.get(spec.targetId);\n if (!variable) {\n throw new Error(\n `Command ${spec.id} (\"${spec.type}\") targets variable \"${spec.targetId}\", ` +\n `which this document does not declare.`,\n );\n }\n this._assertNoExpressions(spec);\n const { factory } = entry;\n const command = observeSlots(recorder, () =>\n buildToEnd(() => repeat(factory(variable.target, spec.args, duration, easing))));\n return { spec, start: spec.at, holdFrom: spec.at, entrance: false, duration: loop ? command.duration : duration, command, writes: recorder.writes, readsLayout: recorder.readsLayout, owner: variable };\n }\n\n const target = this._targetOrThrow(spec);\n // `to` and `set` carry a props diff, so a renamed prop is renamed there too.\n const given = PROP_DIFF_COMMANDS.has(spec.type)\n ? migrateNodeProps(this._registry, target.entry.spec.type, spec.args).props\n : spec.args;\n const args = entry.binds ? this._bindArgs(given) : (this._assertNoExpressions(spec), given);\n const { factory } = entry;\n const command = observeSlots(recorder, () =>\n buildToEnd(() => repeat(factory(target.node, args, duration, easing))));\n const entrance = entry.scope === \"node\" && this._registry.node(target.entry.spec.type)?.commands.get(spec.type)?.entrance === true;\n return { spec, start: spec.at, holdFrom: spec.at, entrance, duration: loop ? command.duration : duration, command, writes: recorder.writes, readsLayout: recorder.readsLayout, owner: target.entry };\n }\n\n /**\n * Hold each entrance's first frame back from its `at`, so the node it brings in\n * never shows at rest ahead of it.\n *\n * Back to the later of the moment its target arrives and the latest end of an\n * earlier command writing any slot it writes. Stopping there keeps placement\n * order honest: a command the entrance would otherwise overwrite still shows,\n * and an entrance after an exit keeps the node gone in between. A command on\n * the same node that writes other slots (a `moveTo` while it waits) does not\n * stop it.\n */\n private _holdEntrances(): void {\n const ended = new Map<PropSlot<unknown>, number>();\n let byId: Map<string, NodeSpec> | undefined;\n for (const placed of this._placed) {\n placed.holdFrom = placed.start;\n if (placed.entrance) {\n const id = placed.owner.spec.id;\n byId ??= new Map(this._specs.map((s) => [s.id, s]));\n let from = id === ROOT_NODE_ID ? 0 : effectiveSpanIn(byId, id)?.start ?? placed.start;\n for (const slot of placed.writes) from = Math.max(from, ended.get(slot) ?? -Infinity);\n if (from < placed.start) placed.holdFrom = Math.max(0, from);\n }\n const end = placed.start + placed.duration;\n for (const slot of placed.writes) {\n if (!(end <= (ended.get(slot) ?? -Infinity))) ended.set(slot, end);\n }\n }\n }\n\n /**\n * Seconds an unlimited loop starting at `at` has to fill.\n *\n * The clip's own length, which `documentDuration` answers counting one pass\n * of every unlimited loop — so a scene made of nothing but a spinner is one\n * turn long, and that same spinner in a ten-second scene turns for ten\n * seconds rather than stretching the scene to forever.\n */\n private _unlimitedFill(at: number): number {\n return Math.max(0, this._duration - at);\n }\n\n /**\n * Put everything a command writes into the restore lists — its target, and\n * any *other* node it wrote.\n *\n * A command is not confined to its target: `Cursor.click` names a control and\n * throws it, the way the lifecycle commands tween the child they move. Only\n * the target used to be restored, which left the other node holding whatever\n * the last evaluation happened to leave — a frame that depends on how the\n * playhead reached it, which is the one thing the whole design forbids.\n *\n * `writes` is already recorded (see {@link WriteRecorder}) and a slot carries\n * its owner, so this needs no declaration from the command. A variable's slot\n * arrives as {@link PlacedCommand.owner}. A slot on a part a node built for\n * itself has no row to be restored through, so it is restored on its own, to\n * the state {@link _notePartWrite} saw before any command wrote it.\n */\n private _touch(placed: PlacedCommand, touched: Set<TouchedOwner>): void {\n this._touchOwner(placed.owner, touched);\n for (const slot of placed.writes) {\n const host = slot._host;\n if (host === null) continue;\n const entry = host.id === ROOT_NODE_ID ? this._root : this._live.get(host.id);\n if (entry) {\n this._touchOwner(entry, touched);\n } else if (this._partBaselines.has(slot) && !touched.has(slot)) {\n touched.add(slot);\n this._animatedParts.push(slot);\n }\n }\n }\n\n private _touchOwner(owner: LiveNode | LiveVariable, touched: Set<TouchedOwner>): void {\n if (touched.has(owner)) return;\n touched.add(owner);\n if (\"cell\" in owner) this._animatedVars.push(owner);\n else this._animated.push(owner);\n }\n\n /**\n * Save a part's slot the first time a command is about to write it.\n *\n * Called by the observer *before* the write lands, while a command is built:\n * every earlier command has run to its end by then, but none of them wrote\n * this slot, so what it holds is what the part was built with (plus whatever\n * the command's own factory primed, which is part of the command, not of the\n * part).\n */\n private readonly _notePartWrite = (slot: PropSlot<unknown>): void => {\n const host = slot._host;\n if (host === null || this._partBaselines.has(slot)) return;\n if (host.id === ROOT_NODE_ID || this._live.has(host.id)) return;\n this._partBaselines.set(slot, slot.snapshot());\n };\n\n /**\n * Compile the expressions in a binding command's args.\n *\n * A command declaring `binds` is saying its args *are* a props diff that\n * reaches `node.set()` — `set` is the only built-in that does — where a\n * function is a binding.\n */\n private _bindArgs(args: Record<string, unknown>): Record<string, unknown> {\n const { literal, bindings } = expressionOps.bindProps(args, this._resolveVariable, \"args\");\n return { ...literal, ...bindings };\n }\n\n /**\n * Refuse an expression in a command that cannot bind one.\n *\n * An expression is a *binding*: it says a prop follows a variable for as\n * long as it is set. A tween's destination is a **value** — `to` reads it\n * once, when the command compiles, to work out what it is interpolating\n * towards — so a formula there could only ever mean \"the value this happened\n * to have at build time\", which is never what anyone writing it meant.\n * Failing here rather than coercing is the same call `NodeSpec.type` makes:\n * a document that half-renders is worse than one that refuses to.\n */\n private _assertNoExpressions(spec: CommandSpec): void {\n const found = expressionOps.collect(spec.args, \"args\");\n if (found.length === 0) return;\n const { path, source } = found[0];\n throw new Error(\n `Command ${spec.id} (\"${spec.type}\") carries an expression at ${path}: ${JSON.stringify(source)}. ` +\n `Expressions bind a prop to a variable; they are not tween destinations. ` +\n `Bind the prop where the node is authored (or with a \"set\" command) and animate the variable ` +\n `with \"variableTo\" instead.`,\n );\n }\n\n private _skip(spec: CommandSpec, message: string, type: string): null {\n this._skipped.set(spec.id, {\n code: \"unknown-command\",\n commandId: spec.id,\n ...(spec.targetId !== null && { nodeId: spec.targetId }),\n type,\n message,\n });\n return null;\n }\n\n /**\n * The tree a placeholder for `spec` belongs to: its children's, else the one\n * its parent holds — a viewport holding two trees gives the one it adds.\n */\n private _placeholderDimension(spec: NodeSpec, rows: readonly NodeSpec[]): NodeDimension {\n const byId = new Map(rows.map((row) => [row.id, row]));\n const seen = new Set<string>();\n const of = (row: NodeSpec): NodeDimension => {\n seen.add(row.id);\n for (const child of rows) {\n if (child.parentId !== row.id) continue;\n const dimension = this._registry.describe(child.type)?.dimension;\n if (dimension) return dimension;\n }\n const parent = row.parentId === null ? undefined : byId.get(row.parentId);\n if (!parent) return \"2d\";\n const described = this._registry.describe(parent.type);\n if (!described) return seen.has(parent.id) ? \"2d\" : of(parent);\n const holds = (described.holds ?? []).filter((d) => d !== \"audio\");\n if (holds.length === 0) return described.holds?.includes(\"audio\") ? \"audio\" : described.dimension ?? \"2d\";\n return holds.find((d) => d !== described.dimension) ?? holds[0];\n };\n return of(spec);\n }\n\n /** The live node a node-scoped command targets; one error, naming the `targetId`, when no row has it. */\n private _targetOrThrow(spec: CommandSpec): { id: string; node: Node; entry: LiveNode } {\n const target = this._targetOf(spec);\n if (!target) {\n throw new Error(\n `Command ${spec.id} (\"${spec.type}\") targets node \"${spec.targetId}\", ` +\n `which this document does not declare.`,\n );\n }\n return target;\n }\n\n /** Resolve a command's `targetId` to a live node, or `null` if it names nothing. */\n private _targetOf(spec: CommandSpec): { id: string; node: Node; entry: LiveNode } | null {\n if (spec.targetId === null) {\n return this._root ? { id: ROOT_NODE_ID, node: this._root.node, entry: this._root } : null;\n }\n const entry = this._live.get(spec.targetId);\n return entry ? { id: spec.targetId, node: entry.node, entry } : null;\n }\n\n private _evaluateObserved(seconds: number, onWrite: (index: number, slot: PropSlot<unknown>) => void): void {\n let index = 0;\n const observer: SlotObserver = { read: () => { }, write: (slot) => onWrite(index, slot) };\n observeSlots(observer, () => {\n for (; index < this._placed.length; index++) {\n const placed = this._placed[index];\n if (seconds < placed.holdFrom) continue;\n const local = seconds < placed.start ? 0 : placed.duration > 0 ? (seconds - placed.start) / placed.duration : 1;\n placed.command.at(clamp01(local));\n }\n });\n }\n\n /**\n * Mark the steps that open a presence window needing a settle: a window is\n * the run of steps between two changes to the tree, and it needs one only\n * when a step in it reads layout.\n *\n * At the window's start rather than just before its first reader, because a\n * reader must see the boxes as they stood when the window opened — a size tween\n * built earlier in the same window has already run to its end by then, and a\n * settle after it would hand the reader that end state instead.\n */\n private _settleWindows(steps: readonly { at: number }[], reads: (index: number) => boolean): Uint8Array {\n const index = this._presenceIndex();\n const settles = new Uint8Array(steps.length);\n // -1 is the window the tree was already laid out for.\n let opener = -1;\n let previous = index.time;\n for (let i = 0; i < steps.length; i++) {\n const { at } = steps[i];\n if (index.differs(previous, at)) opener = i;\n previous = at;\n if (opener < 0 || settles[opener]) continue;\n if (reads(i)) settles[opener] = 1;\n }\n return settles;\n }\n\n private _readsLayout(spec: CommandSpec, refBound: ReadonlySet<string>): boolean {\n const id = spec.targetId ?? ROOT_NODE_ID;\n const target = spec.targetId === null ? this._rootSpec : this._live.get(spec.targetId)?.spec;\n const traits = commandTraits(this._registry, spec, target);\n return traits === null || traits.readsLayout || refBound.has(id);\n }\n\n /**\n * Targets of a binding command carrying a node reference: a binding a `set`\n * installs mid-scene can read another node's box, and a `from` taken over it\n * later evaluates it.\n */\n private _refBound(commands: readonly CommandSpec[]): Set<string> {\n const out = new Set<string>();\n for (const spec of commands) {\n const entry = this._registry.command(spec.type);\n if (entry?.scope === \"node\" && entry.binds && hasNodeRef(spec.args)) out.add(spec.targetId ?? ROOT_NODE_ID);\n }\n return out;\n }\n\n /** Built on first use, from the rows as they stand. */\n private _presenceIndex(): PresenceIndex {\n return this._presence ??= new PresenceIndex(this._specs, this._spans);\n }\n\n /** The live node a spec's `parentId` names, or the scene root. */\n private _parentNodeOf(spec: NodeSpec): Node | undefined {\n if (spec.parentId === null) return this.canvas;\n return this._live.get(spec.parentId)?.node;\n }\n\n private _patchEnvironment(): PatchEnvironment {\n const registry = this._registry;\n return {\n traits: (spec, target) => commandTraits(registry, spec, target),\n nodeRefs: (spec, target) => commandNodeRefs(registry, spec, target),\n isContextProvider: (type) => isContextProvider(registry, type),\n isLayoutNeutralProp: (type, key) => isLayoutNeutralProp(registry, type, key),\n writesInPlace: (row, key) => writesPlacementInPlace(registry, row, key),\n ctorOf: (id) => {\n const node = this._live.get(id)?.node;\n return node && missingNodeOf(node) ? MISSING_TYPE : node?.constructor;\n },\n registeredCtor: (type) => registry.node(type)?.ctor ?? (registry.strict ? undefined : MISSING_TYPE),\n dimensionOf: (type) => registry.node(type)?.descriptor.dimension,\n };\n }\n\n /** Write the props `entry`'s row changed since `was` as its new initial values. */\n private _writeInPlace(entry: LiveNode, was: NodeSpec): void {\n const changed: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(entry.spec.props)) {\n if (!jsonEqual(was.props[key], value)) changed[key] = value;\n }\n resetToInitial(entry);\n const { literal, bindings } = expressionOps.bindProps(changed, this._resolveVariable);\n entry.node.set({ ...literal, ...bindings } as never);\n captureInitial(entry);\n }\n\n private _updateVariables(patch: TimelinePatch): void {\n const { added, removed, changed } = patch.diff.variables;\n for (const id of removed) this._vars.delete(id);\n for (const id of added) this._vars.set(id, this._liveVariable(patch.next.variables.get(id)!));\n for (const id of changed) {\n const spec = patch.next.variables.get(id)!;\n const entry = this._vars.get(id);\n if (!entry) {\n this._vars.set(id, this._liveVariable(spec));\n continue;\n }\n entry.baseline = spec.value;\n entry.target = this._variableTarget(spec, entry.cell);\n }\n for (const spec of patch.next.variables.values()) {\n const entry = this._vars.get(spec.id);\n if (entry) entry.spec = spec;\n }\n // Restoring only resets animated variables, so a changed value nothing animates would never land.\n for (const id of patch.dirtyVariables) {\n const entry = this._vars.get(id);\n if (entry) entry.cell.set(entry.baseline);\n }\n }\n\n /**\n * Take detached rows out of the tree, replace and add instances, swap in the\n * next document's rows, and re-insert whatever is present at 0. Returns the\n * entries holding a new instance.\n */\n private _updateStructure(patch: TimelinePatch): Set<LiveNode> {\n const { next } = patch;\n\n for (const id of patch.detach) {\n const entry = this._live.get(id);\n if (!entry) continue;\n entry.node.parent?.remove(entry.node);\n entry.presence.set(false);\n this._present.delete(id);\n }\n\n const isDocumentNode = (node: Node) => this._live.get(node.id)?.node === node;\n for (const id of patch.removed) {\n const entry = this._live.get(id);\n if (!entry) continue;\n disposeBuilt(entry.node, isDocumentNode);\n this._live.delete(id);\n this._baseChildCount.delete(id);\n this._baselined.delete(id);\n this._unmounted.delete(id);\n }\n for (const id of patch.reinstantiate) {\n const entry = this._live.get(id);\n if (entry) disposeBuilt(entry.node, isDocumentNode);\n }\n\n const { root, rest } = splitRoot(next.doc.nodes);\n const fresh = new Set<LiveNode>();\n for (const spec of rest) {\n let entry = this._live.get(spec.id);\n if (entry && !patch.reinstantiate.has(spec.id)) {\n entry.spec = spec;\n continue;\n }\n const node = this._instantiate(spec, rest);\n if (entry) {\n entry.spec = spec;\n entry.node = node;\n this._baselined.delete(spec.id);\n this._unmounted.delete(spec.id);\n } else {\n entry = {\n spec,\n node,\n initial: NO_LAYER,\n initialStackDepth: 0,\n baseline: NO_LAYER,\n baseStackDepth: 0,\n presence: new PropSlot<boolean>(false, null, PRESENCE_PREFIX + spec.id),\n };\n this._live.set(spec.id, entry);\n }\n this._baseChildCount.set(spec.id, node._allChildren.length);\n fresh.add(entry);\n }\n\n this._doc = next.doc;\n this._docIndex = next;\n this._rootSpec = root;\n this._root!.spec = root;\n this._specs = rest;\n this._varSpecs = next.doc.variables ?? [];\n this._spans = presenceOf(next.doc);\n this._duration = documentDuration(next.doc);\n\n // A fresh index knows nothing is in the tree, so seed it with what still is.\n const index = this._presence = new PresenceIndex(this._specs, this._spans);\n for (const id of [...this._present]) {\n const row = index.row(id);\n if (row && within(row, 0)) {\n row.siblings.add(row.slot, 1);\n continue;\n }\n this._present.delete(id);\n const entry = this._live.get(id);\n if (!entry) continue;\n entry.presence.set(false);\n entry.node.parent?.remove(entry.node);\n }\n this.syncPresence(0);\n return fresh;\n }\n\n /**\n * Rebuild the dirty chains in the next document's timeline order, replaying the\n * clean chains they build against and taking arrival baselines where compile\n * would have. Returns the rebuilt commands by id.\n */\n private _walkPatch(\n patch: TimelinePatch,\n previous: ReadonlyMap<string, PlacedCommand>,\n settle: () => void,\n ): Map<string, PlacedCommand> {\n const rebuilt = new Map<string, PlacedCommand>();\n if (isStillDocument(this._doc)) return rebuilt;\n\n const { next } = patch;\n const dirty = (id: string) => patch.dirtyNodes.has(id) || patch.dirtyVariables.has(id);\n const refBound = this._refBound(next.ordered);\n let replay = patch.replay;\n // A settle for a binding over another node's box has to see every chain at its `at`.\n if (replay !== \"all\" && [...refBound].some(dirty)) replay = \"all\";\n\n const steps: WalkStep[] = [];\n const { captures } = patch;\n let c = 0;\n for (const spec of next.ordered) {\n while (c < captures.length && captures[c].at <= spec.at) steps.push({ at: captures[c].at, capture: captures[c++].id });\n const id = next.targetOf(spec);\n if (replay === \"all\" || dirty(id) || replay.has(id)) steps.push({ at: spec.at, spec });\n }\n for (; c < captures.length; c++) steps.push({ at: captures[c].at, capture: captures[c].id });\n\n const settles = this._settleWindows(steps, (i) => {\n const spec = steps[i].spec;\n return spec !== undefined && dirty(next.targetOf(spec)) && this._readsLayout(spec, refBound);\n });\n\n let pending = false;\n for (let i = 0; i < steps.length; i++) {\n const step = steps[i];\n if (settles[i]) pending = true;\n if (this.syncPresence(step.at)) this._baselineMounted();\n if (step.capture !== undefined) {\n this._baselined.delete(step.capture);\n this._baselineArrival(step.capture);\n continue;\n }\n // After this `at`'s captures, as compile baselines arrivals before it settles.\n if (pending) {\n settle();\n pending = false;\n }\n const spec = step.spec!;\n const old = previous.get(spec.id);\n if (old && !dirty(next.targetOf(spec))) {\n old.command.at(1);\n continue;\n }\n const placed = this._buildPlaced(spec);\n if (placed) rebuilt.set(spec.id, placed);\n }\n return rebuilt;\n }\n}\n\n/**\n * What to say when a command type the format no longer has fails to resolve.\n * A document written before nodes carried their own spans is otherwise a\n * \"no command\" error that names nothing it could be fixed with.\n */\nconst LEGACY_COMMAND_HINTS: Readonly<Record<string, string>> = {\n add: \"A node is a row in `nodes`, entering at its `startAt`.\",\n remove: \"A node leaves at its `endAt`.\",\n variable: \"A variable is declared in `variables`.\",\n};\n\nconst NO_LAYER: PropLayer = new Map();\n\nconst PROP_DIFF_COMMANDS: ReadonlySet<string> = new Set([\"to\", \"set\"]);\n\n/** What {@link ClipTimeline._touch} dedupes: an owner, or a part's slot. */\ntype TouchedOwner = LiveNode | LiveVariable | PropSlot<unknown>;\n\n/** Records what building one command wrote, and whether it read a laid-out box. */\nclass WriteRecorder implements SlotObserver {\n readonly writes = new Set<PropSlot<unknown>>();\n readsLayout = false;\n\n /** `firstWrite` runs the first time a slot is written, before the write lands. */\n constructor(private readonly firstWrite: (slot: PropSlot<unknown>) => void) { }\n\n read(slot: PropSlot<unknown>): void {\n if (slot._name === LAYOUT_SLOT) this.readsLayout = true;\n }\n\n write(slot: PropSlot<unknown>): void {\n if (this.writes.has(slot)) return;\n this.firstWrite(slot);\n this.writes.add(slot);\n }\n}\n\n/**\n * Build a command and run it to its end. A factory that acts at once and returns\n * nothing (`restore` with no duration) has already done this build's `at(1)`, so\n * it becomes a stamp that acts again on every later evaluation.\n */\nfunction buildToEnd(make: () => Command<Record<string, unknown>> | void): Command<Record<string, unknown>> {\n const made = make();\n if (made) {\n made.at(1);\n return made;\n }\n return driveCommand(0, () => {\n make();\n }) as unknown as Command<Record<string, unknown>>;\n}\n\n/**\n * Snapshot a node's prop slots at its authored state. Taken while it is mounted:\n * an unmounted node's cells hold pre-attach values.\n */\nfunction captureBaseline(entry: LiveNode): void {\n const host = entry.node as unknown as ReactiveHost;\n entry.baseline = captureLayer(host);\n entry.baseStackDepth = host._stateStack.length;\n}\n\ninterface SlotBaseline {\n slot: PropSlot<unknown>;\n baseline: PropSnapshot<unknown>;\n}\n\n/** The baseline of each of `slots`, or `null` when one isn't among the node's props. */\nfunction slotBaselines(entry: LiveNode, slots: ReadonlySet<PropSlot<unknown>> | undefined): SlotBaseline[] | null {\n if (!slots) return [];\n const cells = (entry.node as unknown as ReactiveHost).__cells?.slots;\n if (!cells) return null;\n const out: SlotBaseline[] = [];\n for (const [key, slot] of cells) {\n const baseline = slots.has(slot) ? entry.baseline.get(key) : undefined;\n if (baseline) out.push({ slot, baseline });\n }\n return out.length === slots.size ? out : null;\n}\n\nfunction captureInitial(entry: LiveNode): void {\n captureBaseline(entry);\n entry.initial = entry.baseline;\n entry.initialStackDepth = entry.baseStackDepth;\n}\n\nfunction resetToInitial(entry: LiveNode): void {\n const host = entry.node as unknown as ReactiveHost;\n applySnapshotLayer(host, entry.initial);\n if (host._stateStack.length > entry.initialStackDepth) host._stateStack.length = entry.initialStackDepth;\n entry.baseline = entry.initial;\n entry.baseStackDepth = entry.initialStackDepth;\n}\n\n/** Dispose `node` and whatever it built for itself; a document child it still holds is left alone. */\nfunction disposeBuilt(node: Node, isDocumentNode: (node: Node) => boolean): void {\n for (const child of node._allChildren) {\n if (!isDocumentNode(child)) disposeBuilt(child, isDocumentNode);\n }\n node.dispose();\n}\n\n/** One document row's place in a {@link PresenceIndex}. */\ninterface PresenceRow {\n id: string;\n start: number;\n end: number;\n /** Position in the document's rows. */\n order: number;\n /** Position among its parent's document children, in `layerOrder` order. */\n slot: number;\n siblings: SiblingCounts;\n /** The last {@link PresenceIndex.crossed} pass that collected this row. */\n pass: number;\n}\n\nfunction within(row: PresenceRow, seconds: number): boolean {\n return seconds >= row.start && seconds < row.end;\n}\n\nfunction byDocumentOrder(a: PresenceRow, b: PresenceRow): number {\n return a.order - b.order;\n}\n\n/**\n * How many of one parent's document children are present before a given slot — a\n * Fenwick tree, so an insert index costs O(log siblings) rather than a walk over\n * every sibling.\n */\nclass SiblingCounts {\n constructor(readonly parentId: string, size: number) {\n this._tree = new Int32Array(size + 1);\n }\n\n add(slot: number, delta: number): void {\n for (let i = slot + 1; i < this._tree.length; i += i & -i) this._tree[i] += delta;\n }\n\n before(slot: number): number {\n let count = 0;\n for (let i = slot; i > 0; i -= i & -i) count += this._tree[i];\n return count;\n }\n\n private readonly _tree: Int32Array;\n}\n\n/**\n * Every span boundary, sorted by time, and a cursor at the last time synced.\n *\n * Moving to another time visits only the rows with a boundary between the two, in\n * either direction and however far — which is what keeps a scrub, and a compile\n * walking its commands, from rescanning every node per step.\n */\nclass PresenceIndex {\n /** The last time {@link crossed} was asked for. Nothing is present before the first. */\n time = -Infinity;\n\n constructor(specs: readonly NodeSpec[], spans: ReadonlyMap<string, NodeSpan>) {\n const byParent = new Map<string, { spec: NodeSpec; order: number }[]>();\n specs.forEach((spec, order) => {\n if (!spans.has(spec.id)) return;\n const parentId = spec.parentId ?? ROOT_NODE_ID;\n const group = byParent.get(parentId);\n if (group) group.push({ spec, order });\n else byParent.set(parentId, [{ spec, order }]);\n });\n for (const [parentId, group] of byParent) {\n // Stable, so a `layerOrder` tie keeps document order.\n group.sort((a, b) => a.spec.layerOrder - b.spec.layerOrder);\n const siblings = new SiblingCounts(parentId, group.length);\n group.forEach(({ spec, order }, slot) => {\n const { start, end } = spans.get(spec.id)!;\n const row: PresenceRow = { id: spec.id, start, end, order, slot, siblings, pass: 0 };\n this._rows.set(spec.id, row);\n this._events.push({ time: start, row });\n if (Number.isFinite(end)) this._events.push({ time: end, row });\n });\n }\n this._events.sort((a, b) => a.time - b.time);\n }\n\n /** Each row with a boundary between the last time synced and `seconds`, once. Moves the cursor. */\n crossed(seconds: number): readonly PresenceRow[] {\n this.time = seconds;\n const target = this._upperBound(seconds);\n if (target === this._cursor) return NO_ROWS;\n const from = Math.min(target, this._cursor);\n const to = Math.max(target, this._cursor);\n this._cursor = target;\n const pass = ++this._pass;\n const rows: PresenceRow[] = [];\n for (let k = from; k < to; k++) {\n const { row } = this._events[k];\n if (row.pass === pass) continue;\n row.pass = pass;\n rows.push(row);\n }\n return rows;\n }\n\n /** Whether any row is present at one of `a`, `b` and not the other. Moves nothing. */\n differs(a: number, b: number): boolean {\n const from = this._upperBound(Math.min(a, b));\n const to = this._upperBound(Math.max(a, b));\n for (let k = from; k < to; k++) {\n const { row } = this._events[k];\n if (within(row, a) !== within(row, b)) return true;\n }\n return false;\n }\n\n row(id: string): PresenceRow | undefined {\n return this._rows.get(id);\n }\n\n private readonly _events: { time: number; row: PresenceRow }[] = [];\n private readonly _rows = new Map<string, PresenceRow>();\n /** How many events are at or before {@link time}. */\n private _cursor = 0;\n private _pass = 0;\n\n /** The first event after `seconds` — every event before it has happened by then. */\n private _upperBound(seconds: number): number {\n let lo = 0;\n let hi = this._events.length;\n while (lo < hi) {\n const mid = (lo + hi) >>> 1;\n if (this._events[mid].time <= seconds) lo = mid + 1;\n else hi = mid;\n }\n return lo;\n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K,GAAG,IAAI,GAAG,EAAuB,CAAC;IAChD,OAAO,GAAG,CAAC,CAAC;IACZ,KAAK,GAAG,CAAC,CAAC;IAEV,WAAW,CAAC,OAAe;QAC/B,IAAI,EAAE,GAAG,CAAC,CAAC;QACX,IAAI,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;QAC7B,OAAO,EAAE,GAAG,EAAE,EAAE,CAAC;YACb,MAAM,GAAG,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;YAC5B,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,OAAO;gBAAE,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;;gBAC/C,EAAE,GAAG,GAAG,CAAC;QAClB,CAAC;QACD,OAAO,EAAE,CAAC;IACd,CAAC;CACJ;AAED,MAAM,OAAO,GAA2B,EAAE,CAAC","sourcesContent":["import { clamp01 } from \"@/util/clamp\";\nimport { applySnapshotLayer, captureLayer, type PropLayer, type ReactiveHost } from \"@/components/trees/node/node-reactive\";\nimport type { Node, NodeDimension } from \"@/components/trees/node/node\";\nimport type { Canvas2D } from \"@/components/trees/root/canvas2d-node\";\nimport { _observer, PropSlot, type PropSnapshot } from \"@/props/slot\";\nimport { LAYOUT_SLOT, observeSlots, PRESENCE_PREFIX, unobserved, VAR_PREFIX, type SlotObserver } from \"@/props/observer\";\nimport { driveCommand, loopCommand, settles, settling, type Command } from \"@/tween/command\";\nimport { loopRepeats } from \"@/tween/loop\";\nimport type { EasingFunction } from \"@/tween/ease/type\";\nimport { easeOfSpec } from \"@/tween/ease/spec\";\nimport { commandNodeRefs, commandTraits, hasNodeRef, holdsWhenFinished, isContextProvider, isLayoutNeutralProp, writesPlacementInPlace } from \"./command-traits\";\nimport { diffClip, jsonEqual } from \"./diff\";\nimport { indexDocument, type DocIndex } from \"./doc-index\";\nimport { expressionOps } from \"./expression/ops\";\nimport { MISSING_TYPE, missingNode, missingNodeOf, placeholderProps } from \"./missing-node\";\nimport { migrateNodeProps } from \"./prop-evolution\";\nimport type { VariableResolver } from \"./expression/types\";\nimport type { Registry, VariableTarget } from \"./registry\";\nimport { SettledIndex } from \"./settled-index\";\nimport { commandSoundsOf } from \"@/components/factory/timeline\";\nimport type { SoundOptions } from \"@/components/factory/api\";\nimport { planTimelinePatch, type PatchEnvironment, type TimelinePatch } from \"./timeline-patch\";\nimport type { CommandSpec, EaseSpec, NodeSpec, NodeSpan, VisualDocument, VariableSpec } from \"./types\";\nimport { documentDuration, effectiveSpanIn, isStillDocument, nodeSpan, ROOT_NODE_ID } from \"./types\";\n\nexport interface PlacedSound {\n readonly node: Node;\n readonly at: number;\n readonly until: number | undefined;\n readonly src: string;\n readonly options: SoundOptions;\n}\n\nexport interface TimelineIssue {\n code: \"unknown-node-type\" | \"unknown-command\";\n message: string;\n nodeId?: string;\n commandId?: string;\n type: string;\n}\n\nexport interface PlacedCommandInfo {\n readonly spec: CommandSpec;\n readonly start: number;\n /** Zero is a stamp: it applies in full from `start` onward. */\n readonly duration: number;\n /** `start`, or for an entrance the earlier time its first frame is held from. */\n readonly holdFrom: number;\n readonly writes: ReadonlySet<PropSlot<unknown>>;\n readonly readsLayout: boolean;\n}\n\ninterface PlacedCommand extends PlacedCommandInfo {\n readonly command: Command<Record<string, unknown>>;\n readonly writes: Set<PropSlot<unknown>>;\n /** What an unmarked one may read while it runs: its owner's slots and what it read while built. Empty for a marked one. */\n readonly reads: ReadonlySet<PropSlot<unknown>>;\n /** Its neighbours decide it, so it is worked out again after every compile and update. */\n holdFrom: number;\n readonly entrance: boolean;\n readonly owner: LiveNode | LiveVariable;\n}\n\n/** A plain slot: a prop bound to `() => slot.get()` re-reads it, so nothing in the node layer knows variables exist. */\ninterface LiveVariable {\n spec: VariableSpec;\n /** Kept across an update: every binding compiled against it captured {@link read}, which reads this. */\n cell: PropSlot<unknown>;\n read: () => unknown;\n target: VariableTarget;\n baseline: unknown;\n}\n\ninterface LiveNode {\n spec: NodeSpec;\n node: Node;\n /** Every reactive cell as the build left it, before any command or arrival touched it. */\n initial: PropLayer;\n initialStackDepth: number;\n /** What evaluation restores: {@link initial}, or the node as it arrived when it enters later. */\n baseline: PropLayer;\n baseStackDepth: number;\n /** A slot, so a `[key.prop]` read under an observer depends on it: the node answering can come and go. */\n presence: PropSlot<boolean>;\n}\n\ninterface WalkStep {\n at: number;\n spec?: CommandSpec;\n capture?: string;\n}\n\nfunction resolveEase(ease: EaseSpec | undefined, registry: Registry): EasingFunction | undefined {\n if (!ease) return undefined;\n return easeOfSpec(ease, (key) => registry.ease(key), () => registry.easeKeys());\n}\n\n/** By `at`, then document order: commands sharing an `at` run in parallel and the later one wins a shared prop, as in `commandParallel`. */\nfunction inTimelineOrder(commands: readonly CommandSpec[]): CommandSpec[] {\n return commands\n .map((spec, index) => ({ spec, index }))\n .sort((a, b) => (a.spec.at - b.spec.at) || (a.index - b.index))\n .map((e) => e.spec);\n}\n\nconst NO_SLOTS: ReadonlySet<PropSlot<unknown>> = new Set();\n\n/**\n * Only an unmarked command can read live state while it runs, so only its reads are kept. A slot\n * snapshot (`save`) reads without reporting it, so everything it acts on counts as read.\n */\nfunction readsOf(command: Command<Record<string, unknown>>, recorder: WriteRecorder, owned: Iterable<PropSlot<unknown>>): ReadonlySet<PropSlot<unknown>> {\n if (settles(command)) return NO_SLOTS;\n for (const slot of owned) recorder.reads.add(slot);\n return recorder.reads;\n}\n\n/** Marks the command `settling` when `held`; a looped one is wrapped after, and runs. */\nfunction heldIf(held: boolean, made: Command<Record<string, unknown>> | void): Command<Record<string, unknown>> | void {\n return held && made ? settling(made) : made;\n}\n\nfunction defaultRootSpec(): NodeSpec {\n return { id: ROOT_NODE_ID, type: \"canvas2d\", parentId: null, layerOrder: 0, props: {} };\n}\n\n/**\n * Split out the scene root, which is the canvas itself: not something `build` instantiates or `syncPresence`\n * parents. Synthesizes the default when the document left it out.\n */\nfunction splitRoot(specs: NodeSpec[]): { root: NodeSpec; rest: NodeSpec[] } {\n const rest: NodeSpec[] = [];\n let root: NodeSpec | undefined;\n for (const spec of specs) {\n if (spec.id === ROOT_NODE_ID && spec.type === \"canvas2d\") {\n root = spec;\n continue;\n }\n rest.push(spec);\n }\n return { root: root ?? defaultRootSpec(), rest };\n}\n\n/** Read off the document, not accumulated in playback, so a seek lands the same from any direction. A still's nodes carry no span: always present. */\nfunction presenceOf(doc: VisualDocument): Map<string, NodeSpan> {\n const spans = new Map<string, NodeSpan>();\n for (const node of doc.nodes) spans.set(node.id, nodeSpan(node));\n spans.delete(ROOT_NODE_ID);\n return spans;\n}\n\n/**\n * A compiled clip document, evaluable at any time in any order. Commands are built in `at` order, each run to\n * `at(1)` before the next is built, because a command reads its start value from the node when constructed;\n * the restored baseline undoes that. Expressions bind props to variable slots and recompute on read, so a\n * node driven only by expressions is never restored.\n */\nexport class ClipTimeline {\n constructor(doc: VisualDocument, registry: Registry, private readonly canvas: Canvas2D) {\n this._doc = doc;\n this._registry = registry;\n const { root, rest } = splitRoot(doc.nodes);\n this._rootSpec = root;\n this._specs = rest;\n this._varSpecs = doc.variables ?? [];\n // Built from the rows rather than from the tree: an expression resolves its\n // references the moment it compiles, which is before most nodes exist.\n this._keyed = new Map(\n [root, ...rest]\n .filter((spec): spec is NodeSpec & { key: string } => !!spec.key)\n .map((spec) => [spec.key, spec.id]),\n );\n this._spans = presenceOf(doc);\n // Declared, not measured, so it is known before anything is built.\n this._duration = documentDuration(doc);\n }\n\n get duration(): number {\n return this._duration;\n }\n\n /** Once per timeline: the nodes it makes belong to that canvas. */\n build(): void {\n // Variables first: an expression resolves its `[id]`s the moment it compiles.\n this._buildVariables();\n\n this._pristineRoot = captureLayer(this.canvas as unknown as ReactiveHost);\n this._applyRootProps();\n\n for (const spec of this._specs) {\n this._live.set(spec.id, {\n spec,\n node: this._instantiate(spec),\n initial: NO_LAYER,\n initialStackDepth: 0,\n baseline: NO_LAYER,\n baseStackDepth: 0,\n presence: new PropSlot<boolean>(false, null, PRESENCE_PREFIX + spec.id),\n });\n }\n\n // Before any document child lands, so a composite's own children keep their indices.\n this._baseChildCount.set(ROOT_NODE_ID, this.canvas._allChildren.length);\n for (const [id, entry] of this._live) {\n this._baseChildCount.set(id, entry.node._allChildren.length);\n }\n\n this.syncPresence(0);\n\n // The root's baseline too: `targetId: null` commands animate the camera and scene fill.\n this._root = {\n spec: this._rootSpec,\n node: this.canvas,\n initial: NO_LAYER,\n initialStackDepth: 0,\n baseline: NO_LAYER,\n baseStackDepth: 0,\n presence: new PropSlot<boolean>(true, null, PRESENCE_PREFIX + ROOT_NODE_ID),\n };\n for (const entry of this._live.values()) captureInitial(entry);\n captureInitial(this._root);\n this._baselined = new Set(this._present);\n for (const id of this._present) {\n if (this._live.get(id)?.node.mounted === false) {\n this._baselined.delete(id);\n this._unmounted.add(id);\n }\n }\n }\n\n /**\n * Build every command against the laid-out tree, then put the tree back. Separate from {@link build} because a\n * command may read post-layout state (an animated `removeChildAt` pins the departing child to its rendered\n * width, zero until layout runs). `settle` re-lays out whenever the walk changes the tree.\n */\n compile(settle: () => void = () => { }): void {\n this._settled = null;\n this._compileCommands(settle);\n this._restoreBaselines();\n const moved = this.syncPresence(0);\n if (this._restoreDisplaced(this._collectDisplaced()) || moved) settle();\n this._holdEntrances();\n this._indexSettled();\n }\n\n variableValue(id: string): unknown {\n return this._vars.get(id)?.cell.get();\n }\n\n variables(): readonly VariableSpec[] {\n return this._varSpecs;\n }\n\n get presenceTime(): number {\n return this._presenceIndex().time;\n }\n\n commandSounds(): PlacedSound[] {\n const out: PlacedSound[] = [];\n for (const placed of this._placed) {\n const played = commandSoundsOf(placed.command);\n if (!played) continue;\n for (const sound of played.sounds) {\n out.push({\n node: played.host,\n at: placed.start + sound.at,\n until: sound.until === undefined ? undefined : placed.start + sound.until,\n src: sound.src,\n options: sound.options,\n });\n }\n }\n return out;\n }\n\n placedCommands(): readonly PlacedCommandInfo[] {\n return this._placed;\n }\n\n issues(): TimelineIssue[] {\n const out: TimelineIssue[] = [];\n for (const { spec, node } of this._live.values()) {\n const missing = missingNodeOf(node);\n if (!missing) continue;\n out.push({\n code: \"unknown-node-type\",\n nodeId: spec.id,\n type: missing.type,\n message: `Unknown node type \"${missing.type}\" (node ${spec.id}): it builds as an empty placeholder, keeping its children.`,\n });\n }\n out.push(...this._skipped.values());\n return out;\n }\n\n /**\n * Pure in `seconds`: any order, either direction. Restoring the baseline first is what makes it so, or a prop\n * written by a not-yet-started command would keep the last evaluation's value. `onWrite` reports each\n * command write (not the restore) with its index in {@link placedCommands}.\n */\n evaluateAt(seconds: number, onWrite?: (index: number, slot: PropSlot<unknown>) => void): void {\n if (onWrite) {\n // Unobserved: a baseline holds prop cells, never presence or structure, so\n // an observer watching for those learns nothing from a write per cell.\n unobserved(() => this._restoreBaselines());\n this._evaluateObserved(seconds, onWrite);\n return;\n }\n\n if (this._settled) {\n this._restoreBaselines(this._wholeRestore);\n for (const { slot, baseline } of this._slotRestore) slot.restoreFrom(baseline);\n this._settled.evaluate(this._placed, seconds);\n return;\n }\n this._restoreBaselines();\n for (const placed of this._placed) {\n if (seconds < placed.holdFrom) continue;\n const local = seconds < placed.start ? 0\n : placed.duration > 0 ? (seconds - placed.start) / placed.duration\n : 1;\n // Held at `at(1)` once finished, so an early write persists (as in `commandSequence`).\n placed.command.at(clamp01(local));\n }\n }\n\n /**\n * Add and remove document nodes so the tree matches `seconds`; returns whether anything moved. Structural, so\n * separate from {@link evaluateAt}: it changes what layout walks. Call it ahead of the evaluation.\n */\n syncPresence(seconds: number): boolean {\n const rows = this._presenceIndex().crossed(seconds);\n if (rows.length === 0) return false;\n\n const arrivals: PresenceRow[] = [];\n const departures: PresenceRow[] = [];\n for (const row of rows) {\n const wanted = within(row, seconds);\n if (wanted !== this._present.has(row.id)) (wanted ? arrivals : departures).push(row);\n }\n this._arrived = arrivals;\n if (arrivals.length === 0 && departures.length === 0) return false;\n\n // Detach first: `remove` unmounts the whole subtree, so a node moving\n // parents is never briefly in two places.\n departures.sort(byDocumentOrder);\n for (const row of departures) {\n this._present.delete(row.id);\n row.siblings.add(row.slot, -1);\n const entry = this._live.get(row.id);\n if (!entry) continue;\n entry.presence.set(false);\n this._parentNodeOf(entry.spec)?.remove(entry.node);\n }\n\n // After whatever the parent built for itself, at the row's place among present siblings. Ascending per\n // parent, so every earlier sibling is already in place.\n arrivals.sort(byDocumentOrder);\n const byParent = new Map<SiblingCounts, PresenceRow[]>();\n for (const row of arrivals) {\n const group = byParent.get(row.siblings);\n if (group) group.push(row);\n else byParent.set(row.siblings, [row]);\n }\n for (const [siblings, group] of byParent) {\n group.sort((a, b) => a.slot - b.slot);\n const parent = siblings.parentId === ROOT_NODE_ID ? this.canvas : this._live.get(siblings.parentId)?.node;\n const base = this._baseChildCount.get(siblings.parentId) ?? 0;\n for (const row of group) {\n this._present.add(row.id);\n const index = base + siblings.before(row.slot);\n siblings.add(row.slot, 1);\n const child = this._live.get(row.id);\n if (!child) continue;\n child.presence.set(true);\n parent?.addChildAt({ data: { child: child.node, index } });\n }\n }\n return true;\n }\n\n liveNode(id: string): Node | undefined {\n return id === ROOT_NODE_ID ? this.canvas : this._live.get(id)?.node;\n }\n\n /** A row's props before any command acted on it; the same at every time, unlike the live props. A bound prop answers through its binding. */\n baselineProps(id: string): Record<string, unknown> | undefined {\n const entry = id === ROOT_NODE_ID ? this._root : this._live.get(id);\n if (!entry) return undefined;\n const layer = entry.baseline === NO_LAYER ? entry.initial : entry.baseline;\n const props: Record<string, unknown> = {};\n for (const [key, snap] of layer) props[key] = snap.fn ? snap.fn() : snap.value;\n return props;\n }\n\n presenceSlot(id: string): PropSlot<boolean> | undefined {\n return id === ROOT_NODE_ID ? this._root?.presence : this._live.get(id)?.presence;\n }\n\n variableSlot(id: string): PropSlot<unknown> | undefined {\n return this._vars.get(id)?.cell;\n }\n\n /**\n * How to bring this built timeline to `next` in place, or `null` when only a\n * fresh build is sound. An audio document must be lowered by the caller first.\n */\n planUpdate(next: VisualDocument): TimelinePatch | null {\n const prev = this._docIndex ??= indexDocument(this._doc);\n return planTimelinePatch(prev, indexDocument(next), diffClip(this._doc, next), this._patchEnvironment());\n }\n\n /**\n * Apply a {@link planUpdate} result. The canvas must be attached at time 0\n * first, as for {@link build}; `prepare` samples and lays out like the step\n * between build and compile, `settle` like compile's. A throw leaves the\n * timeline unusable — dispose it and build fresh.\n */\n applyUpdate(patch: TimelinePatch, settle: () => void, prepare: () => void): void {\n if (!this._root) throw new Error(\"ClipTimeline.applyUpdate needs a built timeline.\");\n if (patch.prev !== this._docIndex) {\n throw new Error(\"This patch was planned against a different version of the document.\");\n }\n\n this._settled = null;\n this._restoreBaselines();\n this.syncPresence(0);\n\n this._updateVariables(patch);\n this._keyed.clear();\n for (const [key, id] of patch.next.keyed) this._keyed.set(key, id);\n\n const fresh = this._updateStructure(patch);\n\n for (const entry of fresh) {\n captureInitial(entry);\n const id = entry.spec.id;\n if (!this._present.has(id)) continue;\n if (entry.node.mounted) this._baselined.add(id);\n else this._unmounted.add(id);\n }\n for (const id of patch.inPlace) {\n const entry = this._live.get(id);\n if (entry) this._writeInPlace(entry, patch.prev.nodes.get(id)!);\n }\n if (patch.diff.rootChanged) {\n const host = this.canvas as unknown as ReactiveHost;\n applySnapshotLayer(host, this._pristineRoot);\n host._stateStack.length = 0;\n this._applyRootProps();\n captureInitial(this._root);\n }\n for (const id of patch.dirtyNodes) {\n const entry = id === ROOT_NODE_ID ? this._root : this._live.get(id);\n if (entry && !fresh.has(entry)) resetToInitial(entry);\n }\n prepare();\n\n const previous = new Map<string, PlacedCommand>();\n for (const placed of this._placed) previous.set(placed.spec.id, placed);\n const rebuilt = this._walkPatch(patch, previous, settle);\n\n const dirty = (id: string) => patch.dirtyNodes.has(id) || patch.dirtyVariables.has(id);\n const placed: PlacedCommand[] = [];\n const touched = new Set<TouchedOwner>();\n this._animated = [];\n this._animatedVars = [];\n this._animatedParts = [];\n if (!isStillDocument(this._doc)) {\n for (const spec of patch.next.ordered) {\n let entry = rebuilt.get(spec.id);\n if (!entry && !dirty(patch.next.targetOf(spec))) {\n const old = previous.get(spec.id);\n if (old) entry = old.spec === spec ? old : { ...old, spec };\n }\n if (!entry) continue;\n placed.push(entry);\n this._touch(entry, touched);\n }\n }\n this._placed = placed;\n for (const id of this._skipped.keys()) if (!patch.next.commands.has(id)) this._skipped.delete(id);\n\n this._restoreBaselines();\n const moved = this.syncPresence(0);\n if (this._restoreDisplaced(this._collectDisplaced()) || moved) settle();\n this._holdEntrances();\n this._indexSettled();\n }\n\n private _doc: VisualDocument;\n private readonly _registry: Registry;\n private _rootSpec: NodeSpec;\n private _specs: NodeSpec[];\n private _varSpecs: readonly VariableSpec[];\n private _spans: Map<string, NodeSpan>;\n private _duration: number;\n private _docIndex: DocIndex | null = null;\n /** The canvas's cells before the root row was applied — what a patched root row resets to. */\n private _pristineRoot: PropLayer = NO_LAYER;\n\n private readonly _live = new Map<string, LiveNode>();\n private readonly _vars = new Map<string, LiveVariable>();\n /** Node ids by {@link NodeSpec.key}. Read off the document, so it needs no build. */\n private readonly _keyed: Map<string, string>;\n private _placed: PlacedCommand[] = [];\n private readonly _skipped = new Map<string, TimelineIssue>();\n /** Built after every compile and update, when any placed command is marked settling (`tween/command`). */\n private _settled: SettledIndex | null = null;\n /** With {@link _settled}: the animated nodes an unmarked command writes, put back whole… */\n private _wholeRestore: LiveNode[] = [];\n /** …and, on every other animated node, the baseline of each slot a marked command writes. */\n private _slotRestore: SlotBaseline[] = [];\n private _root: LiveNode | null = null;\n /**\n * Only nodes some command writes: restoring static nodes every frame is most of the frame on a large scene. A\n * prop bound to a variable needs no restore (the binding is the recompute), so expression-only nodes never enter.\n */\n private _animated: LiveNode[] = [];\n private _animatedVars: LiveVariable[] = [];\n /** Slots on a part a node built for itself that a command writes. A part is no row; see {@link _notePartWrite}. */\n private _animatedParts: PropSlot<unknown>[] = [];\n private readonly _partBaselines = new WeakMap<PropSlot<unknown>, PropSnapshot<unknown>>();\n /** Children each parent built for itself, which the document must not disturb. */\n private readonly _baseChildCount = new Map<string, number>();\n private readonly _present = new Set<string>();\n private _baselined = new Set<string>();\n /** Rows present at 0 that a lifecycle command (`removeChildAt`, `reparent`) took out of their parent. Presence only moves a row across its own span. */\n private _displaced: LiveNode[] = [];\n /** Rows that arrived, or were built, while an ancestor was out of the tree and wait for it — see {@link _baselineArrival}. */\n private readonly _unmounted = new Set<string>();\n private _presence: PresenceIndex | null = null;\n private _arrived: readonly PresenceRow[] = [];\n\n /**\n * A reference with a dot (`[card.x]`) reads another node's prop; without one, a variable.\n *\n * A node reference resolves late, on every read: `build` binds in document order and presence changes with\n * time, so the node may not exist yet or be absent at *t*. It answers `undefined` (`NaN` through arithmetic,\n * loud in the first frame) rather than throwing, which would make an `add` at 2s a crash at 0s.\n */\n private readonly _resolveVariable: VariableResolver = (name) => {\n const dot = name.indexOf(\".\");\n if (dot > 0) {\n const id = this._keyed.get(name.slice(0, dot));\n if (id === undefined) return undefined;\n const prop = name.slice(dot + 1);\n return () => (this._nodeById(id) as unknown as Record<string, unknown> | undefined)?.[prop];\n }\n return this._vars.get(name)?.read;\n };\n\n /** Gated on `mounted`, not {@link _present}, which only settles at the end of {@link syncPresence}: a read mid-insertion would be stale. */\n private _nodeById(id: string): Node | undefined {\n if (id === ROOT_NODE_ID) return this.canvas;\n const entry = this._live.get(id);\n if (!entry) return undefined;\n if (_observer !== null) this._readPresence(entry);\n return entry.node.mounted ? entry.node : undefined;\n }\n\n /** The row's presence and every document ancestor's — an ancestor leaving unmounts it too. */\n private _readPresence(entry: LiveNode): void {\n let at: LiveNode | undefined = entry;\n for (let depth = 0; at && depth <= this._live.size; depth++) {\n at.presence.get();\n at = at.spec.parentId === null ? undefined : this._live.get(at.spec.parentId);\n }\n }\n\n private _applyRootProps(): void {\n const { literal, bindings } = expressionOps.bindProps(this._rootSpec.props, this._resolveVariable);\n this.canvas.set({ ...literal, ...bindings } as never);\n }\n\n private _instantiate(spec: NodeSpec, rows: readonly NodeSpec[] = this._specs): Node {\n const props = migrateNodeProps(this._registry, spec.type, spec.props).props;\n const { literal, bindings, hasBindings } = expressionOps.bindProps(props, this._resolveVariable);\n if (!this._registry.strict && !this._registry.hasNode(spec.type)) {\n const dimension = this._placeholderDimension(spec, rows);\n const node = missingNode(dimension, spec, literal);\n const bound = placeholderProps(dimension, bindings);\n if (Object.keys(bound).length > 0) node.set(bound as never);\n return node;\n }\n const node = this._registry.instantiate(spec, literal);\n // Applied after construction rather than through it: see `instantiate`.\n if (hasBindings) node.set(bindings as never);\n return node;\n }\n\n /** One slot per variable for the whole build: a variable has no presence span. */\n private _buildVariables(): void {\n for (const spec of this._varSpecs) {\n if (this._vars.has(spec.id)) {\n throw new Error(\n `Duplicate variable id \"${spec.id}\". Ids must be unique — an expression ` +\n `writing \"[${spec.id}]\" would otherwise name whichever declaration was read last.`,\n );\n }\n this._vars.set(spec.id, this._liveVariable(spec));\n }\n }\n\n private _liveVariable(spec: VariableSpec): LiveVariable {\n const cell = new PropSlot<unknown>(spec.value, null, VAR_PREFIX + spec.id);\n return {\n spec,\n cell,\n read: () => cell.get(),\n target: this._variableTarget(spec, cell),\n baseline: spec.value,\n };\n }\n\n private _variableTarget(spec: VariableSpec, cell: PropSlot<unknown>): VariableTarget {\n const lerp = this._registry.requireLerp(spec.lerp, spec.value, `variable \"${spec.id}\"`);\n return { id: spec.id, get: () => cell.get(), set: (v) => cell.set(v), lerp };\n }\n\n /**\n * Put every animated node back to its authored state. The save stack is truncated with the props: `save` and\n * `restore` are commands, so a `save` re-runs on every evaluation and the stack would grow per frame, and a\n * `restore` would pop another seek's layer.\n */\n private _restoreBaselines(nodes: readonly LiveNode[] = this._animated): void {\n // Structure before props: a node put back is attached, and the baseline is\n // what it holds once attached.\n this._restoreDisplaced(this._displaced);\n\n // Variables first, so a prop bound to one recomputes against the restored\n // value rather than a stale one.\n for (const entry of this._animatedVars) entry.cell.set(entry.baseline);\n\n for (const entry of nodes) {\n const host = entry.node as unknown as ReactiveHost;\n applySnapshotLayer(host, entry.baseline);\n if (host._stateStack.length > entry.baseStackDepth) {\n host._stateStack.length = entry.baseStackDepth;\n }\n }\n\n for (const slot of this._animatedParts) slot.restoreFrom(this._partBaselines.get(slot)!);\n }\n\n /**\n * Build every command, in timeline order, against a node holding what its predecessors left. The tree moves to\n * each command's `at` first: an unmounted node hands back an inert stepper the command caches, so a tween on a\n * node entering at 2s built against the t=0 tree would never move. Arrivals are baselined here, before\n * anything touches them. Re-layout only where something reads it ({@link _settleWindows}).\n */\n private _compileCommands(settle: () => void): void {\n if (isStillDocument(this._doc)) return;\n\n const touched = new Set<TouchedOwner>();\n const ordered = inTimelineOrder(this._doc.commands);\n const refBound = this._refBound(ordered);\n const settles = this._settleWindows(ordered, (i) => this._readsLayout(ordered[i], refBound));\n\n for (let i = 0; i < ordered.length; i++) {\n const spec = ordered[i];\n if (this.syncPresence(spec.at)) {\n // Every node present but not yet baselined arrived in this sync:\n // one that left and came back was baselined the first time.\n for (const row of this._arrived) {\n if (!this._baselined.has(row.id)) this._baselineArrival(row.id);\n }\n this._baselineMounted();\n if (settles[i]) settle();\n }\n\n const placed = this._buildPlaced(spec);\n if (!placed) continue;\n this._placed.push(placed);\n this._touch(placed, touched);\n }\n }\n\n /**\n * Building runs every marked command to its end, which the restore then undoes.\n * A node only marked commands write keeps every other slot at its baseline from\n * here on, so an evaluation puts back only the slots they write.\n */\n private _indexSettled(): void {\n const index = (this._settled = SettledIndex.build(this._placed));\n if (!index) return;\n this._restoreBaselines();\n\n const whole = new Set<LiveNode | LiveVariable>();\n const written = new Map<LiveNode, Set<PropSlot<unknown>>>();\n this._placed.forEach((placed, i) => {\n const held = index.holds(i);\n if (!held) whole.add(placed.owner);\n for (const slot of placed.writes) {\n const host = slot._host;\n const entry = host === null ? undefined : host.id === ROOT_NODE_ID ? this._root! : this._live.get(host.id);\n if (!entry) continue;\n if (!held) whole.add(entry);\n else if (written.has(entry)) written.get(entry)!.add(slot);\n else written.set(entry, new Set([slot]));\n }\n });\n this._wholeRestore = [];\n this._slotRestore = [];\n for (const entry of this._animated) {\n const slots = whole.has(entry) ? null : slotBaselines(entry, written.get(entry));\n if (slots) this._slotRestore.push(...slots);\n else this._wholeRestore.push(entry);\n }\n }\n\n private _collectDisplaced(): LiveNode[] {\n const out: LiveNode[] = [];\n for (const id of this._present) {\n const entry = this._live.get(id);\n const parent = entry && this._declaredParent(id);\n if (entry && parent && entry.node.parent !== parent) out.push(entry);\n }\n out.sort((a, b) => this._presenceIndex().row(a.spec.id)!.slot - this._presenceIndex().row(b.spec.id)!.slot);\n return (this._displaced = out);\n }\n\n /** Put displaced rows back where {@link syncPresence} would have inserted them. */\n private _restoreDisplaced(entries: readonly LiveNode[]): boolean {\n let moved = false;\n for (const entry of entries) {\n const id = entry.spec.id;\n const row = this._presenceIndex().row(id);\n const parent = this._declaredParent(id);\n if (!row || !parent || !this._present.has(id) || entry.node.parent === parent) continue;\n entry.node.parent?.remove(entry.node);\n const base = this._baseChildCount.get(row.siblings.parentId) ?? 0;\n parent.addChildAt({ data: { child: entry.node, index: base + row.siblings.before(row.slot) } });\n moved = true;\n }\n return moved;\n }\n\n private _declaredParent(id: string): Node | undefined {\n const parentId = this._presenceIndex().row(id)?.siblings.parentId;\n if (parentId === undefined) return undefined;\n return parentId === ROOT_NODE_ID ? this.canvas : this._live.get(parentId)?.node;\n }\n\n /**\n * A baseline is the node as attached: an unmounted node's cells hold pre-attach values, lacking what it inherits.\n * A row arriving while an ancestor is out of the tree (a child entering before its parent) waits in\n * {@link _unmounted} for {@link _baselineMounted}.\n */\n private _baselineArrival(id: string): void {\n const entry = this._live.get(id);\n if (entry && !entry.node.mounted) {\n this._unmounted.add(id);\n return;\n }\n if (entry) captureBaseline(entry);\n this._baselined.add(id);\n this._unmounted.delete(id);\n }\n\n private _baselineMounted(): void {\n for (const id of this._unmounted) {\n const entry = this._live.get(id);\n if (!entry) {\n this._unmounted.delete(id);\n } else if (entry.node.mounted) {\n captureBaseline(entry);\n this._baselined.add(id);\n this._unmounted.delete(id);\n }\n }\n }\n\n /**\n * Build one command against the current tree and run it to its end, leaving its target where the next\n * command's `from` must start: `node.to({ x: 100 })` reads `x` at construction, so skipping this would give\n * every chained step the same `from`. Undone by {@link _restoreBaselines}. Throws when the target names no\n * row; a command its target's type lacks, or any aimed at a placeholder, is skipped and recorded (`null`)\n * unless the registry is strict.\n */\n private _buildPlaced(spec: CommandSpec): PlacedCommand | null {\n // The global table is consulted first: it holds only what resolves without a node (variable-scoped\n // commands, generic prop writers), and `scope` decides whether there is a node to look up. Everything\n // else is a method on the target's own type.\n let entry = this._registry.command(spec.type);\n if (entry?.scope !== \"variable\") {\n const missing = missingNodeOf(this._targetOrThrow(spec).node);\n if (missing) {\n return this._skip(spec, `Command ${spec.id} (\"${spec.type}\") targets \"${spec.targetId}\", a placeholder for unknown node type \"${missing.type}\"; it is skipped.`, spec.type);\n }\n }\n if (!entry) {\n const typeKey = this._targetOrThrow(spec).entry.spec.type;\n const factory = this._registry.nodeCommand(typeKey, spec.type);\n if (!factory) {\n const message = `Node type \"${typeKey}\" has no command \"${spec.type}\" ` +\n `(command ${spec.id}). It publishes: ` +\n `${this._registry.commandKeys(typeKey).join(\", \") || \"none\"}.` +\n (LEGACY_COMMAND_HINTS[spec.type] ? ` ${LEGACY_COMMAND_HINTS[spec.type]}` : \"\");\n if (this._registry.strict) throw new Error(message);\n return this._skip(spec, `${message} It is skipped.`, spec.type);\n }\n entry = { key: spec.type, scope: \"node\", factory };\n }\n this._skipped.delete(spec.id);\n\n const duration = spec.duration ?? 0;\n const easing = resolveEase(spec.easing, this._registry);\n const recorder = new WriteRecorder(this._notePartWrite);\n // Applied inside `buildToEnd`, so `at(1)` is the loop's end (back at the start for an odd number of\n // `alternate` passes). A looped command carries every pass's span, so a seek into the fourth repetition lands in it.\n const loop = loopRepeats(spec.loop) ? spec.loop : undefined;\n const repeat = (made: Command<Record<string, unknown>> | void) =>\n (made && loop ? loopCommand(made, loop, this._unlimitedFill(spec.at)) : made);\n\n if (entry.scope === \"variable\") {\n const variable = spec.targetId === null ? undefined : this._vars.get(spec.targetId);\n if (!variable) {\n throw new Error(\n `Command ${spec.id} (\"${spec.type}\") targets variable \"${spec.targetId}\", ` +\n `which this document does not declare.`,\n );\n }\n this._assertNoExpressions(spec);\n const { factory } = entry;\n const held = holdsWhenFinished(commandTraits(this._registry, spec, undefined), spec);\n const command = observeSlots(recorder, () =>\n buildToEnd(() => repeat(heldIf(held, factory(variable.target, spec.args, duration, easing)))));\n return { spec, start: spec.at, holdFrom: spec.at, entrance: false, duration: loop ? command.duration : duration, command, writes: recorder.writes, reads: readsOf(command, recorder, [variable.cell]), readsLayout: recorder.readsLayout, owner: variable };\n }\n\n const target = this._targetOrThrow(spec);\n // `to` and `set` carry a props diff, so a renamed prop is renamed there too.\n const given = PROP_DIFF_COMMANDS.has(spec.type)\n ? migrateNodeProps(this._registry, target.entry.spec.type, spec.args).props\n : spec.args;\n const args = entry.binds ? this._bindArgs(given) : (this._assertNoExpressions(spec), given);\n const { factory } = entry;\n const held = holdsWhenFinished(commandTraits(this._registry, spec, target.entry.spec), spec);\n const command = observeSlots(recorder, () =>\n buildToEnd(() => repeat(heldIf(held, factory(target.node, args, duration, easing)))));\n const entrance = entry.scope === \"node\" && this._registry.node(target.entry.spec.type)?.commands.get(spec.type)?.entrance === true;\n return { spec, start: spec.at, holdFrom: spec.at, entrance, duration: loop ? command.duration : duration, command, writes: recorder.writes, reads: readsOf(command, recorder, (target.node as unknown as ReactiveHost).__cells?.slots.values() ?? []), readsLayout: recorder.readsLayout, owner: target.entry };\n }\n\n /**\n * Hold each entrance's first frame back from its `at` so its node never shows at rest ahead of it: back to the\n * later of the target's arrival and the latest end of an earlier command writing a slot it writes. A command\n * writing other slots on the same node (a `moveTo` while it waits) does not stop it.\n */\n private _holdEntrances(): void {\n const ended = new Map<PropSlot<unknown>, number>();\n let byId: Map<string, NodeSpec> | undefined;\n for (const placed of this._placed) {\n placed.holdFrom = placed.start;\n if (placed.entrance) {\n const id = placed.owner.spec.id;\n byId ??= new Map(this._specs.map((s) => [s.id, s]));\n let from = id === ROOT_NODE_ID ? 0 : effectiveSpanIn(byId, id)?.start ?? placed.start;\n for (const slot of placed.writes) from = Math.max(from, ended.get(slot) ?? -Infinity);\n if (from < placed.start) placed.holdFrom = Math.max(0, from);\n }\n const end = placed.start + placed.duration;\n for (const slot of placed.writes) {\n if (!(end <= (ended.get(slot) ?? -Infinity))) ended.set(slot, end);\n }\n }\n }\n\n /** `documentDuration` counts one pass of an unlimited loop: a lone spinner is one turn, in a ten-second scene it turns for ten. */\n private _unlimitedFill(at: number): number {\n return Math.max(0, this._duration - at);\n }\n\n /**\n * Put everything a command writes into the restore lists. A command is not confined to its target\n * (`Cursor.click` throws a control), and an unrestored node would hold the last evaluation's value, making a\n * frame depend on how the playhead got there. A slot on a part a node built has no row, so it is restored on\n * its own to the state {@link _notePartWrite} saw.\n */\n private _touch(placed: PlacedCommand, touched: Set<TouchedOwner>): void {\n this._touchOwner(placed.owner, touched);\n for (const slot of placed.writes) {\n const host = slot._host;\n if (host === null) continue;\n const entry = host.id === ROOT_NODE_ID ? this._root : this._live.get(host.id);\n if (entry) {\n this._touchOwner(entry, touched);\n } else if (this._partBaselines.has(slot) && !touched.has(slot)) {\n touched.add(slot);\n this._animatedParts.push(slot);\n }\n }\n }\n\n private _touchOwner(owner: LiveNode | LiveVariable, touched: Set<TouchedOwner>): void {\n if (touched.has(owner)) return;\n touched.add(owner);\n if (\"cell\" in owner) this._animatedVars.push(owner);\n else this._animated.push(owner);\n }\n\n /**\n * Save a part's slot the first time a command is about to write it. Called before the write lands, while a\n * command is built: earlier commands have run to their end but none wrote this slot, so it holds what the\n * part was built with.\n */\n private readonly _notePartWrite = (slot: PropSlot<unknown>): void => {\n const host = slot._host;\n if (host === null || this._partBaselines.has(slot)) return;\n if (host.id === ROOT_NODE_ID || this._live.has(host.id)) return;\n this._partBaselines.set(slot, slot.snapshot());\n };\n\n /** A command declaring `binds` has args that are a props diff reaching `node.set()`, where a function is a binding. */\n private _bindArgs(args: Record<string, unknown>): Record<string, unknown> {\n const { literal, bindings } = expressionOps.bindProps(args, this._resolveVariable, \"args\");\n return { ...literal, ...bindings };\n }\n\n /**\n * A tween's destination is a value read once at compile, so an expression there could only mean its build-time\n * value. Fail rather than coerce, as `NodeSpec.type` does.\n */\n private _assertNoExpressions(spec: CommandSpec): void {\n const found = expressionOps.collect(spec.args, \"args\");\n if (found.length === 0) return;\n const { path, source } = found[0];\n throw new Error(\n `Command ${spec.id} (\"${spec.type}\") carries an expression at ${path}: ${JSON.stringify(source)}. ` +\n `Expressions bind a prop to a variable; they are not tween destinations. ` +\n `Bind the prop where the node is authored (or with a \"set\" command) and animate the variable ` +\n `with \"variableTo\" instead.`,\n );\n }\n\n private _skip(spec: CommandSpec, message: string, type: string): null {\n this._skipped.set(spec.id, {\n code: \"unknown-command\",\n commandId: spec.id,\n ...(spec.targetId !== null && { nodeId: spec.targetId }),\n type,\n message,\n });\n return null;\n }\n\n /**\n * The tree a placeholder for `spec` belongs to: its children's, else the one\n * its parent holds — a viewport holding two trees gives the one it adds.\n */\n private _placeholderDimension(spec: NodeSpec, rows: readonly NodeSpec[]): NodeDimension {\n const byId = new Map(rows.map((row) => [row.id, row]));\n const seen = new Set<string>();\n const of = (row: NodeSpec): NodeDimension => {\n seen.add(row.id);\n for (const child of rows) {\n if (child.parentId !== row.id) continue;\n const dimension = this._registry.describe(child.type)?.dimension;\n if (dimension) return dimension;\n }\n const parent = row.parentId === null ? undefined : byId.get(row.parentId);\n if (!parent) return \"2d\";\n const described = this._registry.describe(parent.type);\n if (!described) return seen.has(parent.id) ? \"2d\" : of(parent);\n const holds = (described.holds ?? []).filter((d) => d !== \"audio\");\n if (holds.length === 0) return described.holds?.includes(\"audio\") ? \"audio\" : described.dimension ?? \"2d\";\n return holds.find((d) => d !== described.dimension) ?? holds[0];\n };\n return of(spec);\n }\n\n /** The live node a node-scoped command targets; one error, naming the `targetId`, when no row has it. */\n private _targetOrThrow(spec: CommandSpec): { id: string; node: Node; entry: LiveNode } {\n const target = this._targetOf(spec);\n if (!target) {\n throw new Error(\n `Command ${spec.id} (\"${spec.type}\") targets node \"${spec.targetId}\", ` +\n `which this document does not declare.`,\n );\n }\n return target;\n }\n\n private _targetOf(spec: CommandSpec): { id: string; node: Node; entry: LiveNode } | null {\n if (spec.targetId === null) {\n return this._root ? { id: ROOT_NODE_ID, node: this._root.node, entry: this._root } : null;\n }\n const entry = this._live.get(spec.targetId);\n return entry ? { id: spec.targetId, node: entry.node, entry } : null;\n }\n\n private _evaluateObserved(seconds: number, onWrite: (index: number, slot: PropSlot<unknown>) => void): void {\n let index = 0;\n const observer: SlotObserver = { read: () => { }, write: (slot) => onWrite(index, slot) };\n observeSlots(observer, () => {\n for (; index < this._placed.length; index++) {\n const placed = this._placed[index];\n if (seconds < placed.holdFrom) continue;\n const local = seconds < placed.start ? 0 : placed.duration > 0 ? (seconds - placed.start) / placed.duration : 1;\n placed.command.at(clamp01(local));\n }\n });\n }\n\n /**\n * Mark the steps that open a presence window needing a settle: a window is\n * the run of steps between two changes to the tree, and it needs one only\n * when a step in it reads layout.\n *\n * At the window's start rather than just before its first reader, because a\n * reader must see the boxes as they stood when the window opened — a size tween\n * built earlier in the same window has already run to its end by then, and a\n * settle after it would hand the reader that end state instead.\n */\n private _settleWindows(steps: readonly { at: number }[], reads: (index: number) => boolean): Uint8Array {\n const index = this._presenceIndex();\n const settles = new Uint8Array(steps.length);\n // -1 is the window the tree was already laid out for.\n let opener = -1;\n let previous = index.time;\n for (let i = 0; i < steps.length; i++) {\n const { at } = steps[i];\n if (index.differs(previous, at)) opener = i;\n previous = at;\n if (opener < 0 || settles[opener]) continue;\n if (reads(i)) settles[opener] = 1;\n }\n return settles;\n }\n\n private _readsLayout(spec: CommandSpec, refBound: ReadonlySet<string>): boolean {\n const id = spec.targetId ?? ROOT_NODE_ID;\n const target = spec.targetId === null ? this._rootSpec : this._live.get(spec.targetId)?.spec;\n const traits = commandTraits(this._registry, spec, target);\n return traits === null || traits.readsLayout || refBound.has(id);\n }\n\n /**\n * Targets of a binding command carrying a node reference: a binding a `set`\n * installs mid-scene can read another node's box, and a `from` taken over it\n * later evaluates it.\n */\n private _refBound(commands: readonly CommandSpec[]): Set<string> {\n const out = new Set<string>();\n for (const spec of commands) {\n const entry = this._registry.command(spec.type);\n if (entry?.scope === \"node\" && entry.binds && hasNodeRef(spec.args)) out.add(spec.targetId ?? ROOT_NODE_ID);\n }\n return out;\n }\n\n private _presenceIndex(): PresenceIndex {\n return this._presence ??= new PresenceIndex(this._specs, this._spans);\n }\n\n private _parentNodeOf(spec: NodeSpec): Node | undefined {\n if (spec.parentId === null) return this.canvas;\n return this._live.get(spec.parentId)?.node;\n }\n\n private _patchEnvironment(): PatchEnvironment {\n const registry = this._registry;\n return {\n traits: (spec, target) => commandTraits(registry, spec, target),\n nodeRefs: (spec, target) => commandNodeRefs(registry, spec, target),\n isContextProvider: (type) => isContextProvider(registry, type),\n isLayoutNeutralProp: (type, key) => isLayoutNeutralProp(registry, type, key),\n writesInPlace: (row, key) => writesPlacementInPlace(registry, row, key),\n ctorOf: (id) => {\n const node = this._live.get(id)?.node;\n return node && missingNodeOf(node) ? MISSING_TYPE : node?.constructor;\n },\n registeredCtor: (type) => registry.node(type)?.ctor ?? (registry.strict ? undefined : MISSING_TYPE),\n dimensionOf: (type) => registry.node(type)?.descriptor.dimension,\n };\n }\n\n private _writeInPlace(entry: LiveNode, was: NodeSpec): void {\n const changed: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(entry.spec.props)) {\n if (!jsonEqual(was.props[key], value)) changed[key] = value;\n }\n resetToInitial(entry);\n const { literal, bindings } = expressionOps.bindProps(changed, this._resolveVariable);\n entry.node.set({ ...literal, ...bindings } as never);\n captureInitial(entry);\n }\n\n private _updateVariables(patch: TimelinePatch): void {\n const { added, removed, changed } = patch.diff.variables;\n for (const id of removed) this._vars.delete(id);\n for (const id of added) this._vars.set(id, this._liveVariable(patch.next.variables.get(id)!));\n for (const id of changed) {\n const spec = patch.next.variables.get(id)!;\n const entry = this._vars.get(id);\n if (!entry) {\n this._vars.set(id, this._liveVariable(spec));\n continue;\n }\n entry.baseline = spec.value;\n entry.target = this._variableTarget(spec, entry.cell);\n }\n for (const spec of patch.next.variables.values()) {\n const entry = this._vars.get(spec.id);\n if (entry) entry.spec = spec;\n }\n // Restoring only resets animated variables, so a changed value nothing animates would never land.\n for (const id of patch.dirtyVariables) {\n const entry = this._vars.get(id);\n if (entry) entry.cell.set(entry.baseline);\n }\n }\n\n /**\n * Take detached rows out of the tree, replace and add instances, swap in the\n * next document's rows, and re-insert whatever is present at 0. Returns the\n * entries holding a new instance.\n */\n private _updateStructure(patch: TimelinePatch): Set<LiveNode> {\n const { next } = patch;\n\n for (const id of patch.detach) {\n const entry = this._live.get(id);\n if (!entry) continue;\n entry.node.parent?.remove(entry.node);\n entry.presence.set(false);\n this._present.delete(id);\n }\n\n const isDocumentNode = (node: Node) => this._live.get(node.id)?.node === node;\n for (const id of patch.removed) {\n const entry = this._live.get(id);\n if (!entry) continue;\n disposeBuilt(entry.node, isDocumentNode);\n this._live.delete(id);\n this._baseChildCount.delete(id);\n this._baselined.delete(id);\n this._unmounted.delete(id);\n }\n for (const id of patch.reinstantiate) {\n const entry = this._live.get(id);\n if (entry) disposeBuilt(entry.node, isDocumentNode);\n }\n\n const { root, rest } = splitRoot(next.doc.nodes);\n const fresh = new Set<LiveNode>();\n for (const spec of rest) {\n let entry = this._live.get(spec.id);\n if (entry && !patch.reinstantiate.has(spec.id)) {\n entry.spec = spec;\n continue;\n }\n const node = this._instantiate(spec, rest);\n if (entry) {\n entry.spec = spec;\n entry.node = node;\n this._baselined.delete(spec.id);\n this._unmounted.delete(spec.id);\n } else {\n entry = {\n spec,\n node,\n initial: NO_LAYER,\n initialStackDepth: 0,\n baseline: NO_LAYER,\n baseStackDepth: 0,\n presence: new PropSlot<boolean>(false, null, PRESENCE_PREFIX + spec.id),\n };\n this._live.set(spec.id, entry);\n }\n this._baseChildCount.set(spec.id, node._allChildren.length);\n fresh.add(entry);\n }\n\n this._doc = next.doc;\n this._docIndex = next;\n this._rootSpec = root;\n this._root!.spec = root;\n this._specs = rest;\n this._varSpecs = next.doc.variables ?? [];\n this._spans = presenceOf(next.doc);\n this._duration = documentDuration(next.doc);\n\n // A fresh index knows nothing is in the tree, so seed it with what still is.\n const index = this._presence = new PresenceIndex(this._specs, this._spans);\n for (const id of [...this._present]) {\n const row = index.row(id);\n if (row && within(row, 0)) {\n row.siblings.add(row.slot, 1);\n continue;\n }\n this._present.delete(id);\n const entry = this._live.get(id);\n if (!entry) continue;\n entry.presence.set(false);\n entry.node.parent?.remove(entry.node);\n }\n this.syncPresence(0);\n return fresh;\n }\n\n /**\n * Rebuild the dirty chains in the next document's timeline order, replaying the\n * clean chains they build against and taking arrival baselines where compile\n * would have. Returns the rebuilt commands by id.\n */\n private _walkPatch(\n patch: TimelinePatch,\n previous: ReadonlyMap<string, PlacedCommand>,\n settle: () => void,\n ): Map<string, PlacedCommand> {\n const rebuilt = new Map<string, PlacedCommand>();\n if (isStillDocument(this._doc)) return rebuilt;\n\n const { next } = patch;\n const dirty = (id: string) => patch.dirtyNodes.has(id) || patch.dirtyVariables.has(id);\n const refBound = this._refBound(next.ordered);\n let replay = patch.replay;\n // A settle for a binding over another node's box has to see every chain at its `at`.\n if (replay !== \"all\" && [...refBound].some(dirty)) replay = \"all\";\n\n const steps: WalkStep[] = [];\n const { captures } = patch;\n let c = 0;\n for (const spec of next.ordered) {\n while (c < captures.length && captures[c].at <= spec.at) steps.push({ at: captures[c].at, capture: captures[c++].id });\n const id = next.targetOf(spec);\n if (replay === \"all\" || dirty(id) || replay.has(id)) steps.push({ at: spec.at, spec });\n }\n for (; c < captures.length; c++) steps.push({ at: captures[c].at, capture: captures[c].id });\n\n const settles = this._settleWindows(steps, (i) => {\n const spec = steps[i].spec;\n return spec !== undefined && dirty(next.targetOf(spec)) && this._readsLayout(spec, refBound);\n });\n\n let pending = false;\n for (let i = 0; i < steps.length; i++) {\n const step = steps[i];\n if (settles[i]) pending = true;\n if (this.syncPresence(step.at)) this._baselineMounted();\n if (step.capture !== undefined) {\n this._baselined.delete(step.capture);\n this._baselineArrival(step.capture);\n continue;\n }\n // After this `at`'s captures, as compile baselines arrivals before it settles.\n if (pending) {\n settle();\n pending = false;\n }\n const spec = step.spec!;\n const old = previous.get(spec.id);\n if (old && !dirty(next.targetOf(spec))) {\n old.command.at(1);\n continue;\n }\n const placed = this._buildPlaced(spec);\n if (placed) rebuilt.set(spec.id, placed);\n }\n return rebuilt;\n }\n}\n\n/** A document written before nodes carried spans would otherwise get a \"no command\" error naming nothing fixable. */\nconst LEGACY_COMMAND_HINTS: Readonly<Record<string, string>> = {\n add: \"A node is a row in `nodes`, entering at its `startAt`.\",\n remove: \"A node leaves at its `endAt`.\",\n variable: \"A variable is declared in `variables`.\",\n};\n\nconst NO_LAYER: PropLayer = new Map();\n\nconst PROP_DIFF_COMMANDS: ReadonlySet<string> = new Set([\"to\", \"set\"]);\n\ntype TouchedOwner = LiveNode | LiveVariable | PropSlot<unknown>;\n\nclass WriteRecorder implements SlotObserver {\n readonly writes = new Set<PropSlot<unknown>>();\n readonly reads = new Set<PropSlot<unknown>>();\n readsLayout = false;\n\n /** `firstWrite` runs the first time a slot is written, before the write lands. */\n constructor(private readonly firstWrite: (slot: PropSlot<unknown>) => void) { }\n\n read(slot: PropSlot<unknown>): void {\n if (slot._name === LAYOUT_SLOT) this.readsLayout = true;\n this.reads.add(slot);\n }\n\n write(slot: PropSlot<unknown>): void {\n if (this.writes.has(slot)) return;\n this.firstWrite(slot);\n this.writes.add(slot);\n }\n}\n\n/**\n * Build a command and run it to its end. A factory that acts at once and returns\n * nothing (`restore` with no duration) has already done this build's `at(1)`, so\n * it becomes a stamp that acts again on every later evaluation.\n */\nfunction buildToEnd(make: () => Command<Record<string, unknown>> | void): Command<Record<string, unknown>> {\n const made = make();\n if (made) {\n made.at(1);\n return made;\n }\n return driveCommand(0, () => {\n make();\n }) as unknown as Command<Record<string, unknown>>;\n}\n\n/**\n * Snapshot a node's prop slots at its authored state. Taken while it is mounted:\n * an unmounted node's cells hold pre-attach values.\n */\nfunction captureBaseline(entry: LiveNode): void {\n const host = entry.node as unknown as ReactiveHost;\n entry.baseline = captureLayer(host);\n entry.baseStackDepth = host._stateStack.length;\n}\n\ninterface SlotBaseline {\n slot: PropSlot<unknown>;\n baseline: PropSnapshot<unknown>;\n}\n\nfunction slotBaselines(entry: LiveNode, slots: ReadonlySet<PropSlot<unknown>> | undefined): SlotBaseline[] | null {\n if (!slots) return [];\n const cells = (entry.node as unknown as ReactiveHost).__cells?.slots;\n if (!cells) return null;\n const out: SlotBaseline[] = [];\n for (const [key, slot] of cells) {\n const baseline = slots.has(slot) ? entry.baseline.get(key) : undefined;\n if (baseline) out.push({ slot, baseline });\n }\n return out.length === slots.size ? out : null;\n}\n\nfunction captureInitial(entry: LiveNode): void {\n captureBaseline(entry);\n entry.initial = entry.baseline;\n entry.initialStackDepth = entry.baseStackDepth;\n}\n\nfunction resetToInitial(entry: LiveNode): void {\n const host = entry.node as unknown as ReactiveHost;\n applySnapshotLayer(host, entry.initial);\n if (host._stateStack.length > entry.initialStackDepth) host._stateStack.length = entry.initialStackDepth;\n entry.baseline = entry.initial;\n entry.baseStackDepth = entry.initialStackDepth;\n}\n\n/** Dispose `node` and whatever it built for itself; a document child it still holds is left alone. */\nfunction disposeBuilt(node: Node, isDocumentNode: (node: Node) => boolean): void {\n for (const child of node._allChildren) {\n if (!isDocumentNode(child)) disposeBuilt(child, isDocumentNode);\n }\n node.dispose();\n}\n\ninterface PresenceRow {\n id: string;\n start: number;\n end: number;\n order: number;\n slot: number;\n siblings: SiblingCounts;\n pass: number;\n}\n\nfunction within(row: PresenceRow, seconds: number): boolean {\n return seconds >= row.start && seconds < row.end;\n}\n\nfunction byDocumentOrder(a: PresenceRow, b: PresenceRow): number {\n return a.order - b.order;\n}\n\n/**\n * How many of one parent's document children are present before a given slot — a\n * Fenwick tree, so an insert index costs O(log siblings) rather than a walk over\n * every sibling.\n */\nclass SiblingCounts {\n constructor(readonly parentId: string, size: number) {\n this._tree = new Int32Array(size + 1);\n }\n\n add(slot: number, delta: number): void {\n for (let i = slot + 1; i < this._tree.length; i += i & -i) this._tree[i] += delta;\n }\n\n before(slot: number): number {\n let count = 0;\n for (let i = slot; i > 0; i -= i & -i) count += this._tree[i];\n return count;\n }\n\n private readonly _tree: Int32Array;\n}\n\n/** Every span boundary sorted by time, with a cursor at the last time synced: a move visits only rows with a boundary between, however far. */\nclass PresenceIndex {\n time = -Infinity;\n\n constructor(specs: readonly NodeSpec[], spans: ReadonlyMap<string, NodeSpan>) {\n const byParent = new Map<string, { spec: NodeSpec; order: number }[]>();\n specs.forEach((spec, order) => {\n if (!spans.has(spec.id)) return;\n const parentId = spec.parentId ?? ROOT_NODE_ID;\n const group = byParent.get(parentId);\n if (group) group.push({ spec, order });\n else byParent.set(parentId, [{ spec, order }]);\n });\n for (const [parentId, group] of byParent) {\n // Stable, so a `layerOrder` tie keeps document order.\n group.sort((a, b) => a.spec.layerOrder - b.spec.layerOrder);\n const siblings = new SiblingCounts(parentId, group.length);\n group.forEach(({ spec, order }, slot) => {\n const { start, end } = spans.get(spec.id)!;\n const row: PresenceRow = { id: spec.id, start, end, order, slot, siblings, pass: 0 };\n this._rows.set(spec.id, row);\n this._events.push({ time: start, row });\n if (Number.isFinite(end)) this._events.push({ time: end, row });\n });\n }\n this._events.sort((a, b) => a.time - b.time);\n }\n\n /** Each row with a boundary between the last time synced and `seconds`, once. Moves the cursor. */\n crossed(seconds: number): readonly PresenceRow[] {\n this.time = seconds;\n const target = this._upperBound(seconds);\n if (target === this._cursor) return NO_ROWS;\n const from = Math.min(target, this._cursor);\n const to = Math.max(target, this._cursor);\n this._cursor = target;\n const pass = ++this._pass;\n const rows: PresenceRow[] = [];\n for (let k = from; k < to; k++) {\n const { row } = this._events[k];\n if (row.pass === pass) continue;\n row.pass = pass;\n rows.push(row);\n }\n return rows;\n }\n\n /** Whether any row is present at one of `a`, `b` and not the other. Moves nothing. */\n differs(a: number, b: number): boolean {\n const from = this._upperBound(Math.min(a, b));\n const to = this._upperBound(Math.max(a, b));\n for (let k = from; k < to; k++) {\n const { row } = this._events[k];\n if (within(row, a) !== within(row, b)) return true;\n }\n return false;\n }\n\n row(id: string): PresenceRow | undefined {\n return this._rows.get(id);\n }\n\n private readonly _events: { time: number; row: PresenceRow }[] = [];\n private readonly _rows = new Map<string, PresenceRow>();\n private _cursor = 0;\n private _pass = 0;\n\n private _upperBound(seconds: number): number {\n let lo = 0;\n let hi = this._events.length;\n while (lo < hi) {\n const mid = (lo + hi) >>> 1;\n if (this._events[mid].time <= seconds) lo = mid + 1;\n else hi = mid;\n }\n return lo;\n }\n}\n\nconst NO_ROWS: readonly PresenceRow[] = [];\n"]}
|