@motionscript/core 0.1.0 → 0.1.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/assets/asset-index.d.ts +1 -8
- package/dist/assets/asset-index.d.ts.map +1 -1
- package/dist/assets/asset-index.js +1 -8
- package/dist/assets/asset-index.js.map +1 -1
- package/dist/assets/catalog.d.ts +10 -72
- package/dist/assets/catalog.d.ts.map +1 -1
- package/dist/assets/catalog.js +3 -29
- package/dist/assets/catalog.js.map +1 -1
- package/dist/assets/errors.d.ts +8 -20
- package/dist/assets/errors.d.ts.map +1 -1
- package/dist/assets/errors.js +8 -20
- package/dist/assets/errors.js.map +1 -1
- package/dist/assets/index.d.ts.map +1 -1
- package/dist/assets/index.js.map +1 -1
- package/dist/assets/manager.d.ts +9 -51
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/assets/manager.js +13 -78
- package/dist/assets/manager.js.map +1 -1
- package/dist/assets/record.d.ts +2 -18
- package/dist/assets/record.d.ts.map +1 -1
- package/dist/assets/record.js.map +1 -1
- package/dist/assets/scope.d.ts +3 -18
- package/dist/assets/scope.d.ts.map +1 -1
- package/dist/assets/scope.js +2 -11
- package/dist/assets/scope.js.map +1 -1
- package/dist/attributes/audio/effects/chain.d.ts +2 -12
- package/dist/attributes/audio/effects/chain.d.ts.map +1 -1
- package/dist/attributes/audio/effects/chain.js +1 -7
- package/dist/attributes/audio/effects/chain.js.map +1 -1
- package/dist/attributes/audio/effects/registry.d.ts +3 -18
- package/dist/attributes/audio/effects/registry.d.ts.map +1 -1
- package/dist/attributes/audio/effects/registry.js +4 -23
- package/dist/attributes/audio/effects/registry.js.map +1 -1
- package/dist/attributes/audio/ramp.d.ts +5 -38
- package/dist/attributes/audio/ramp.d.ts.map +1 -1
- package/dist/attributes/audio/ramp.js +3 -28
- package/dist/attributes/audio/ramp.js.map +1 -1
- package/dist/attributes/audio/request.d.ts +10 -80
- package/dist/attributes/audio/request.d.ts.map +1 -1
- package/dist/attributes/audio/request.js +1 -4
- package/dist/attributes/audio/request.js.map +1 -1
- package/dist/attributes/audio/schedule.d.ts +2 -12
- package/dist/attributes/audio/schedule.d.ts.map +1 -1
- package/dist/attributes/audio/schedule.js +2 -11
- package/dist/attributes/audio/schedule.js.map +1 -1
- package/dist/attributes/audio/sound.d.ts +2 -26
- package/dist/attributes/audio/sound.d.ts.map +1 -1
- package/dist/attributes/audio/sound.js +1 -9
- package/dist/attributes/audio/sound.js.map +1 -1
- package/dist/attributes/audio/transition.d.ts +1 -8
- package/dist/attributes/audio/transition.d.ts.map +1 -1
- package/dist/attributes/audio/transition.js.map +1 -1
- package/dist/attributes/layout/alignment.d.ts +6 -38
- package/dist/attributes/layout/alignment.d.ts.map +1 -1
- package/dist/attributes/layout/alignment.js.map +1 -1
- package/dist/attributes/layout/insets.d.ts +2 -27
- package/dist/attributes/layout/insets.d.ts.map +1 -1
- package/dist/attributes/layout/insets.js.map +1 -1
- package/dist/attributes/layout/matrix2d.d.ts +29 -114
- package/dist/attributes/layout/matrix2d.d.ts.map +1 -1
- package/dist/attributes/layout/matrix2d.js +26 -110
- package/dist/attributes/layout/matrix2d.js.map +1 -1
- package/dist/attributes/layout/size.d.ts +3 -25
- package/dist/attributes/layout/size.d.ts.map +1 -1
- package/dist/attributes/layout/size.js +2 -18
- package/dist/attributes/layout/size.js.map +1 -1
- package/dist/attributes/layout/space3d.d.ts +16 -79
- package/dist/attributes/layout/space3d.d.ts.map +1 -1
- package/dist/attributes/layout/space3d.js +17 -81
- package/dist/attributes/layout/space3d.js.map +1 -1
- package/dist/attributes/layout/transform3d.d.ts +2 -23
- package/dist/attributes/layout/transform3d.d.ts.map +1 -1
- package/dist/attributes/layout/transform3d.js +1 -7
- package/dist/attributes/layout/transform3d.js.map +1 -1
- package/dist/attributes/layout/world-transform.d.ts +2 -16
- package/dist/attributes/layout/world-transform.d.ts.map +1 -1
- package/dist/attributes/layout/world-transform.js.map +1 -1
- package/dist/attributes/properties/decorator.d.ts +13 -73
- package/dist/attributes/properties/decorator.d.ts.map +1 -1
- package/dist/attributes/properties/decorator.js +9 -40
- package/dist/attributes/properties/decorator.js.map +1 -1
- package/dist/attributes/properties/typed.d.ts +6 -45
- package/dist/attributes/properties/typed.d.ts.map +1 -1
- package/dist/attributes/properties/typed.js +6 -37
- package/dist/attributes/properties/typed.js.map +1 -1
- package/dist/attributes/render3d/orbit.d.ts +11 -83
- package/dist/attributes/render3d/orbit.d.ts.map +1 -1
- package/dist/attributes/render3d/orbit.js +10 -73
- package/dist/attributes/render3d/orbit.js.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.d.ts +1 -6
- package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
- package/dist/attributes/shape/corners/corner-style.d.ts +4 -25
- package/dist/attributes/shape/corners/corner-style.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corner-style.js +2 -12
- package/dist/attributes/shape/corners/corner-style.js.map +1 -1
- package/dist/attributes/shape/corners/corners.d.ts +2 -21
- package/dist/attributes/shape/corners/corners.d.ts.map +1 -1
- package/dist/attributes/shape/corners/corners.js +2 -12
- package/dist/attributes/shape/corners/corners.js.map +1 -1
- package/dist/attributes/shape/effects/backdrop.d.ts +2 -18
- package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
- package/dist/attributes/shape/effects/backdrop.js +3 -26
- package/dist/attributes/shape/effects/backdrop.js.map +1 -1
- package/dist/attributes/shape/effects/chain.d.ts +36 -328
- package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/chain.js +24 -242
- package/dist/attributes/shape/effects/chain.js.map +1 -1
- package/dist/attributes/shape/effects/effect-data.d.ts +19 -127
- package/dist/attributes/shape/effects/effect-data.d.ts.map +1 -1
- package/dist/attributes/shape/effects/effect-data.js +6 -33
- package/dist/attributes/shape/effects/effect-data.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.d.ts +6 -26
- package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.js +0 -3
- package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +2 -21
- package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js +0 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js +0 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.js +0 -1
- package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.js +0 -1
- package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +0 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js +0 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -11
- package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.js +1 -6
- package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.d.ts +4 -35
- package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.js +1 -7
- package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +1 -22
- package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js +0 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.js +0 -1
- package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.d.ts +2 -15
- package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.js +0 -1
- package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.js +0 -1
- package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.d.ts +7 -47
- package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.js +1 -9
- package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.d.ts +1 -14
- package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.js +0 -1
- package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js +0 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.d.ts +5 -29
- package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.js +0 -1
- package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.d.ts +3 -12
- package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.js +0 -1
- package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +2 -19
- package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js +1 -5
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.d.ts +11 -36
- package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.js +2 -8
- package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.js +0 -1
- package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +3 -17
- package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.js +2 -11
- package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js +0 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.d.ts +2 -14
- package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.js +0 -1
- package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts +1 -15
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js +0 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.d.ts +1 -10
- package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.js +0 -1
- package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +3 -26
- package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.js +1 -2
- package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +2 -16
- package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js +0 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +1 -13
- package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js +0 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts +1 -8
- package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js +0 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.js +0 -1
- package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.d.ts +10 -53
- package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.js +2 -9
- package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts +1 -12
- package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js +0 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.d.ts +1 -8
- package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.js +0 -1
- package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.js +0 -1
- package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.d.ts +1 -13
- package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.js +0 -1
- package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.d.ts +1 -9
- package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.js +0 -1
- package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.d.ts +0 -1
- package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.js +0 -1
- package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.d.ts +3 -24
- package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.js +1 -5
- package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
- package/dist/attributes/shape/effects/registry.d.ts +6 -41
- package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
- package/dist/attributes/shape/effects/registry.js +7 -45
- package/dist/attributes/shape/effects/registry.js.map +1 -1
- package/dist/attributes/shape/effects/spec.d.ts +6 -30
- package/dist/attributes/shape/effects/spec.d.ts.map +1 -1
- package/dist/attributes/shape/effects/spec.js +3 -9
- package/dist/attributes/shape/effects/spec.js.map +1 -1
- package/dist/attributes/shape/fill/blend.d.ts +1 -17
- package/dist/attributes/shape/fill/blend.d.ts.map +1 -1
- package/dist/attributes/shape/fill/blend.js +2 -15
- package/dist/attributes/shape/fill/blend.js.map +1 -1
- package/dist/attributes/shape/fill/chain.d.ts +17 -125
- package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
- package/dist/attributes/shape/fill/chain.js +22 -109
- package/dist/attributes/shape/fill/chain.js.map +1 -1
- package/dist/attributes/shape/fill/coerce.d.ts +10 -35
- package/dist/attributes/shape/fill/coerce.d.ts.map +1 -1
- package/dist/attributes/shape/fill/coerce.js +12 -47
- package/dist/attributes/shape/fill/coerce.js.map +1 -1
- package/dist/attributes/shape/fill/color/parser.d.ts +10 -44
- package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
- package/dist/attributes/shape/fill/color/parser.js +15 -91
- package/dist/attributes/shape/fill/color/parser.js.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.d.ts +1 -8
- package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.js +2 -13
- package/dist/attributes/shape/fill/gradient-stops.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -24
- package/dist/attributes/shape/fill/implementations/canvas3d.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/canvas3d.js +2 -9
- package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/dot-grid.d.ts +1 -14
- package/dist/attributes/shape/fill/implementations/dot-grid.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts +5 -28
- package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js +0 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/grid.d.ts +8 -21
- package/dist/attributes/shape/fill/implementations/grid.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/grid.js +2 -8
- package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.d.ts +13 -79
- package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.js +6 -23
- package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/noise.d.ts +2 -15
- package/dist/attributes/shape/fill/implementations/noise.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.d.ts +11 -45
- package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.js +5 -17
- package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.d.ts +12 -64
- package/dist/attributes/shape/fill/implementations/video.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.js +12 -50
- package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
- package/dist/attributes/shape/fill/lerp.d.ts +2 -13
- package/dist/attributes/shape/fill/lerp.d.ts.map +1 -1
- package/dist/attributes/shape/fill/lerp.js +2 -9
- package/dist/attributes/shape/fill/lerp.js.map +1 -1
- package/dist/attributes/shape/fill/media-preset.d.ts +8 -49
- package/dist/attributes/shape/fill/media-preset.d.ts.map +1 -1
- package/dist/attributes/shape/fill/media-preset.js +8 -35
- package/dist/attributes/shape/fill/media-preset.js.map +1 -1
- package/dist/attributes/shape/fill/registry.d.ts +2 -26
- package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
- package/dist/attributes/shape/fill/registry.js +5 -40
- package/dist/attributes/shape/fill/registry.js.map +1 -1
- package/dist/attributes/shape/fill/union.d.ts +6 -30
- package/dist/attributes/shape/fill/union.d.ts.map +1 -1
- package/dist/attributes/shape/fill/union.js +1 -9
- package/dist/attributes/shape/fill/union.js.map +1 -1
- package/dist/attributes/shape/filters/chain.d.ts +15 -168
- package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
- package/dist/attributes/shape/filters/chain.js +8 -132
- package/dist/attributes/shape/filters/chain.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +1 -7
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/curves.d.ts +1 -7
- package/dist/attributes/shape/filters/implementations/curves.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/echo.d.ts +1 -11
- package/dist/attributes/shape/filters/implementations/echo.d.ts.map +1 -1
- package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
- package/dist/attributes/shape/filters/index.d.ts +1 -6
- package/dist/attributes/shape/filters/index.d.ts.map +1 -1
- package/dist/attributes/shape/filters/index.js +0 -2
- package/dist/attributes/shape/filters/index.js.map +1 -1
- package/dist/attributes/shape/filters/registry.d.ts +5 -35
- package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
- package/dist/attributes/shape/filters/registry.js +7 -50
- package/dist/attributes/shape/filters/registry.js.map +1 -1
- package/dist/attributes/shape/filters/union.d.ts +10 -51
- package/dist/attributes/shape/filters/union.d.ts.map +1 -1
- package/dist/attributes/shape/filters/union.js.map +1 -1
- package/dist/attributes/shape/path/anchors.d.ts +18 -106
- package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
- package/dist/attributes/shape/path/anchors.js +15 -124
- package/dist/attributes/shape/path/anchors.js.map +1 -1
- package/dist/attributes/shape/path/bezier.d.ts +6 -54
- package/dist/attributes/shape/path/bezier.d.ts.map +1 -1
- package/dist/attributes/shape/path/bezier.js +10 -98
- package/dist/attributes/shape/path/bezier.js.map +1 -1
- package/dist/attributes/shape/path/index.d.ts +1 -11
- package/dist/attributes/shape/path/index.d.ts.map +1 -1
- package/dist/attributes/shape/path/index.js +1 -11
- package/dist/attributes/shape/path/index.js.map +1 -1
- package/dist/attributes/shape/path/measure.d.ts +5 -41
- package/dist/attributes/shape/path/measure.d.ts.map +1 -1
- package/dist/attributes/shape/path/measure.js +8 -57
- package/dist/attributes/shape/path/measure.js.map +1 -1
- package/dist/attributes/shape/path/morph.d.ts +4 -41
- package/dist/attributes/shape/path/morph.d.ts.map +1 -1
- package/dist/attributes/shape/path/morph.js +17 -117
- package/dist/attributes/shape/path/morph.js.map +1 -1
- package/dist/attributes/shape/path/ops.d.ts +5 -19
- package/dist/attributes/shape/path/ops.d.ts.map +1 -1
- package/dist/attributes/shape/path/ops.js.map +1 -1
- package/dist/attributes/shape/path/types.d.ts +10 -67
- package/dist/attributes/shape/path/types.d.ts.map +1 -1
- package/dist/attributes/shape/path/types.js +0 -1
- package/dist/attributes/shape/path/types.js.map +1 -1
- package/dist/attributes/shape/path/walk.d.ts +9 -63
- package/dist/attributes/shape/path/walk.d.ts.map +1 -1
- package/dist/attributes/shape/path/walk.js +21 -100
- package/dist/attributes/shape/path/walk.js.map +1 -1
- package/dist/attributes/shape/shaders/language.d.ts +2 -14
- package/dist/attributes/shape/shaders/language.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/language.js +1 -8
- package/dist/attributes/shape/shaders/language.js.map +1 -1
- package/dist/attributes/shape/shaders/pack.d.ts +13 -78
- package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/pack.js +1 -10
- package/dist/attributes/shape/shaders/pack.js.map +1 -1
- package/dist/attributes/shape/shaders/resolve.d.ts +1 -11
- package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/resolve.js +3 -28
- package/dist/attributes/shape/shaders/resolve.js.map +1 -1
- package/dist/attributes/shape/shaders/uniforms.d.ts +3 -24
- package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -1
- package/dist/attributes/shape/shaders/uniforms.js +0 -0
- package/dist/attributes/shape/shaders/uniforms.js.map +1 -1
- package/dist/attributes/shape/shadow/shadow.d.ts +3 -20
- package/dist/attributes/shape/shadow/shadow.d.ts.map +1 -1
- package/dist/attributes/shape/shadow/shadow.js +0 -3
- package/dist/attributes/shape/shadow/shadow.js.map +1 -1
- package/dist/attributes/shape/stroke/stroke.d.ts +9 -58
- package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/stroke.js +0 -6
- package/dist/attributes/shape/stroke/stroke.js.map +1 -1
- package/dist/attributes/shared/operators.d.ts +1 -8
- package/dist/attributes/shared/operators.d.ts.map +1 -1
- package/dist/attributes/shared/operators.js.map +1 -1
- package/dist/attributes/text/index.d.ts +1 -11
- package/dist/attributes/text/index.d.ts.map +1 -1
- package/dist/attributes/text/index.js +1 -11
- package/dist/attributes/text/index.js.map +1 -1
- package/dist/attributes/text/ops.d.ts +4 -30
- package/dist/attributes/text/ops.d.ts.map +1 -1
- package/dist/attributes/text/ops.js +7 -23
- package/dist/attributes/text/ops.js.map +1 -1
- package/dist/attributes/text/types.d.ts +5 -28
- package/dist/attributes/text/types.d.ts.map +1 -1
- package/dist/attributes/text/types.js.map +1 -1
- package/dist/browser/chunks/chunk-3ZIUZZC7.js +13 -0
- package/dist/browser/chunks/chunk-3ZIUZZC7.js.map +7 -0
- package/dist/browser/chunks/{chunk-CCGVIR4F.js → chunk-5TDMGUXQ.js} +3 -3
- package/dist/browser/chunks/chunk-5TDMGUXQ.js.map +7 -0
- package/dist/browser/chunks/chunk-7YOYMMXK.js +6 -0
- package/dist/browser/chunks/chunk-7YOYMMXK.js.map +7 -0
- package/dist/browser/chunks/{chunk-4BDLFEOC.js → chunk-GEJEQQER.js} +1 -1
- package/dist/browser/chunks/chunk-GEJEQQER.js.map +7 -0
- package/dist/browser/component.js +1 -1
- package/dist/browser/experimental.js +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/browser/manifest.json +1 -1
- package/dist/browser/sdk.js +1 -1
- package/dist/component.d.ts +3 -10
- package/dist/component.d.ts.map +1 -1
- package/dist/component.js +3 -10
- package/dist/component.js.map +1 -1
- package/dist/components/builtins/geometry/geometry.d.ts +15 -62
- package/dist/components/builtins/geometry/geometry.d.ts.map +1 -1
- package/dist/components/builtins/geometry/geometry.js.map +1 -1
- package/dist/components/builtins/geometry/shape-outline.d.ts +12 -61
- package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -1
- package/dist/components/builtins/geometry/shape-outline.js +29 -168
- package/dist/components/builtins/geometry/shape-outline.js.map +1 -1
- package/dist/components/builtins/layout/layout.d.ts +1 -14
- package/dist/components/builtins/layout/layout.d.ts.map +1 -1
- package/dist/components/builtins/layout/layout.js.map +1 -1
- package/dist/components/builtins/media/media.d.ts +11 -51
- package/dist/components/builtins/media/media.d.ts.map +1 -1
- package/dist/components/builtins/media/media.js +3 -7
- package/dist/components/builtins/media/media.js.map +1 -1
- package/dist/components/builtins/text/number-format.d.ts +14 -47
- package/dist/components/builtins/text/number-format.d.ts.map +1 -1
- package/dist/components/builtins/text/number-format.js +19 -69
- package/dist/components/builtins/text/number-format.js.map +1 -1
- package/dist/components/builtins/text/number-pattern.d.ts +3 -37
- package/dist/components/builtins/text/number-pattern.d.ts.map +1 -1
- package/dist/components/builtins/text/number-pattern.js +6 -48
- package/dist/components/builtins/text/number-pattern.js.map +1 -1
- package/dist/components/builtins/text/text-defaults.d.ts +7 -25
- package/dist/components/builtins/text/text-defaults.d.ts.map +1 -1
- package/dist/components/builtins/text/text-defaults.js +7 -25
- package/dist/components/builtins/text/text-defaults.js.map +1 -1
- package/dist/components/builtins/text/text-layout.d.ts +2 -11
- package/dist/components/builtins/text/text-layout.d.ts.map +1 -1
- package/dist/components/builtins/text/text-layout.js +7 -22
- package/dist/components/builtins/text/text-layout.js.map +1 -1
- package/dist/components/builtins/text/text.d.ts +8 -46
- package/dist/components/builtins/text/text.d.ts.map +1 -1
- package/dist/components/builtins/text/text.js.map +1 -1
- package/dist/components/builtins/three/canvas3d.d.ts +6 -51
- package/dist/components/builtins/three/canvas3d.d.ts.map +1 -1
- package/dist/components/builtins/three/canvas3d.js.map +1 -1
- package/dist/components/builtins/three/grid-geometry3d.d.ts +3 -39
- package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -1
- package/dist/components/builtins/three/grid-geometry3d.js +8 -46
- package/dist/components/builtins/three/grid-geometry3d.js.map +1 -1
- package/dist/components/builtins/three/three.d.ts +22 -117
- package/dist/components/builtins/three/three.d.ts.map +1 -1
- package/dist/components/builtins/three/three.js +5 -17
- package/dist/components/builtins/three/three.js.map +1 -1
- package/dist/components/factory/api.d.ts.map +1 -1
- package/dist/components/factory/api.js.map +1 -1
- package/dist/components/factory/views.d.ts.map +1 -1
- package/dist/components/factory/views.js +0 -2
- package/dist/components/factory/views.js.map +1 -1
- package/dist/components/trees/2d/group-bounds.d.ts +12 -41
- package/dist/components/trees/2d/group-bounds.d.ts.map +1 -1
- package/dist/components/trees/2d/group-bounds.js +3 -22
- package/dist/components/trees/2d/group-bounds.js.map +1 -1
- package/dist/components/trees/2d/node-lifecycle.d.ts +8 -36
- package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -1
- package/dist/components/trees/2d/node-lifecycle.js +35 -127
- package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
- package/dist/components/trees/2d/node-motion.d.ts +4 -36
- package/dist/components/trees/2d/node-motion.d.ts.map +1 -1
- package/dist/components/trees/2d/node-motion.js +3 -31
- package/dist/components/trees/2d/node-motion.js.map +1 -1
- package/dist/components/trees/2d/node-render.d.ts +3 -20
- package/dist/components/trees/2d/node-render.d.ts.map +1 -1
- package/dist/components/trees/2d/node-render.js +4 -23
- package/dist/components/trees/2d/node-render.js.map +1 -1
- package/dist/components/trees/2d/node-space.d.ts +4 -23
- package/dist/components/trees/2d/node-space.d.ts.map +1 -1
- package/dist/components/trees/2d/node-space.js +3 -17
- package/dist/components/trees/2d/node-space.js.map +1 -1
- package/dist/components/trees/2d/node-transform.d.ts +4 -33
- package/dist/components/trees/2d/node-transform.d.ts.map +1 -1
- package/dist/components/trees/2d/node-transform.js +4 -33
- package/dist/components/trees/2d/node-transform.js.map +1 -1
- package/dist/components/trees/2d/node2d.d.ts +112 -622
- package/dist/components/trees/2d/node2d.d.ts.map +1 -1
- package/dist/components/trees/2d/node2d.js +131 -605
- package/dist/components/trees/2d/node2d.js.map +1 -1
- package/dist/components/trees/audio/node-audio.d.ts +17 -65
- package/dist/components/trees/audio/node-audio.d.ts.map +1 -1
- package/dist/components/trees/audio/node-audio.js +18 -68
- package/dist/components/trees/audio/node-audio.js.map +1 -1
- package/dist/components/trees/node/node-editor-state.d.ts +5 -45
- package/dist/components/trees/node/node-editor-state.d.ts.map +1 -1
- package/dist/components/trees/node/node-editor-state.js +1 -13
- package/dist/components/trees/node/node-editor-state.js.map +1 -1
- package/dist/components/trees/node/node-reactive.d.ts +6 -53
- package/dist/components/trees/node/node-reactive.d.ts.map +1 -1
- package/dist/components/trees/node/node-reactive.js +4 -33
- package/dist/components/trees/node/node-reactive.js.map +1 -1
- package/dist/components/trees/node/node-time.d.ts +2 -15
- package/dist/components/trees/node/node-time.d.ts.map +1 -1
- package/dist/components/trees/node/node-time.js.map +1 -1
- package/dist/components/trees/node/node-walk.d.ts +7 -32
- package/dist/components/trees/node/node-walk.d.ts.map +1 -1
- package/dist/components/trees/node/node-walk.js +7 -32
- package/dist/components/trees/node/node-walk.js.map +1 -1
- package/dist/components/trees/node/node.d.ts +43 -248
- package/dist/components/trees/node/node.d.ts.map +1 -1
- package/dist/components/trees/node/node.js +51 -229
- package/dist/components/trees/node/node.js.map +1 -1
- package/dist/components/trees/root/canvas2d-node.d.ts +7 -60
- package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -1
- package/dist/components/trees/root/canvas2d-node.js +7 -47
- package/dist/components/trees/root/canvas2d-node.js.map +1 -1
- package/dist/components/trees/three/node3d.d.ts +24 -112
- package/dist/components/trees/three/node3d.d.ts.map +1 -1
- package/dist/components/trees/three/node3d.js +22 -104
- package/dist/components/trees/three/node3d.js.map +1 -1
- package/dist/document/audio.d.ts +9 -21
- package/dist/document/audio.d.ts.map +1 -1
- package/dist/document/audio.js +13 -28
- package/dist/document/audio.js.map +1 -1
- package/dist/document/builtins.d.ts +3 -9
- package/dist/document/builtins.d.ts.map +1 -1
- package/dist/document/builtins.js +43 -89
- package/dist/document/builtins.js.map +1 -1
- package/dist/document/command-traits.d.ts +14 -37
- package/dist/document/command-traits.d.ts.map +1 -1
- package/dist/document/command-traits.js +22 -39
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/deny-globals.d.ts +9 -43
- package/dist/document/deny-globals.d.ts.map +1 -1
- package/dist/document/deny-globals.js +18 -58
- package/dist/document/deny-globals.js.map +1 -1
- package/dist/document/diff.d.ts +6 -16
- package/dist/document/diff.d.ts.map +1 -1
- package/dist/document/diff.js +5 -11
- package/dist/document/diff.js.map +1 -1
- package/dist/document/doc-index.d.ts +5 -13
- package/dist/document/doc-index.d.ts.map +1 -1
- package/dist/document/doc-index.js +0 -2
- package/dist/document/doc-index.js.map +1 -1
- package/dist/document/expression/compile.d.ts +2 -2
- package/dist/document/expression/compile.d.ts.map +1 -1
- package/dist/document/expression/compile.js +8 -18
- package/dist/document/expression/compile.js.map +1 -1
- package/dist/document/expression/index.d.ts +11 -41
- package/dist/document/expression/index.d.ts.map +1 -1
- package/dist/document/expression/index.js +11 -41
- package/dist/document/expression/index.js.map +1 -1
- package/dist/document/expression/ops.d.ts +3 -12
- package/dist/document/expression/ops.d.ts.map +1 -1
- package/dist/document/expression/ops.js +4 -20
- package/dist/document/expression/ops.js.map +1 -1
- package/dist/document/expression/parse.d.ts +4 -14
- package/dist/document/expression/parse.d.ts.map +1 -1
- package/dist/document/expression/parse.js +34 -55
- package/dist/document/expression/parse.js.map +1 -1
- package/dist/document/expression/refs.d.ts +2 -8
- package/dist/document/expression/refs.d.ts.map +1 -1
- package/dist/document/expression/refs.js +2 -6
- package/dist/document/expression/refs.js.map +1 -1
- package/dist/document/expression/types.d.ts +18 -63
- package/dist/document/expression/types.d.ts.map +1 -1
- package/dist/document/expression/types.js +4 -15
- package/dist/document/expression/types.js.map +1 -1
- package/dist/document/expression/walk.d.ts +6 -20
- package/dist/document/expression/walk.d.ts.map +1 -1
- package/dist/document/expression/walk.js +18 -44
- package/dist/document/expression/walk.js.map +1 -1
- package/dist/document/index.js +2 -3
- package/dist/document/index.js.map +1 -1
- package/dist/document/migrate.d.ts +7 -22
- package/dist/document/migrate.d.ts.map +1 -1
- package/dist/document/migrate.js +44 -15
- package/dist/document/migrate.js.map +1 -1
- package/dist/document/missing-node.d.ts +4 -11
- package/dist/document/missing-node.d.ts.map +1 -1
- package/dist/document/missing-node.js +2 -5
- package/dist/document/missing-node.js.map +1 -1
- package/dist/document/node-decorator.d.ts +12 -53
- package/dist/document/node-decorator.d.ts.map +1 -1
- package/dist/document/node-decorator.js +16 -57
- package/dist/document/node-decorator.js.map +1 -1
- package/dist/document/node-descriptor.d.ts +25 -62
- package/dist/document/node-descriptor.d.ts.map +1 -1
- package/dist/document/node-descriptor.js.map +1 -1
- package/dist/document/placement.d.ts +18 -41
- package/dist/document/placement.d.ts.map +1 -1
- package/dist/document/placement.js +4 -11
- package/dist/document/placement.js.map +1 -1
- package/dist/document/project.d.ts +19 -52
- package/dist/document/project.d.ts.map +1 -1
- package/dist/document/project.js +2 -6
- package/dist/document/project.js.map +1 -1
- package/dist/document/prop-evolution.d.ts +10 -20
- package/dist/document/prop-evolution.d.ts.map +1 -1
- package/dist/document/prop-evolution.js +3 -7
- package/dist/document/prop-evolution.js.map +1 -1
- package/dist/document/registry.d.ts +80 -318
- package/dist/document/registry.d.ts.map +1 -1
- package/dist/document/registry.js +43 -147
- package/dist/document/registry.js.map +1 -1
- package/dist/document/settled-index.d.ts +11 -23
- package/dist/document/settled-index.d.ts.map +1 -1
- package/dist/document/settled-index.js +15 -34
- package/dist/document/settled-index.js.map +1 -1
- package/dist/document/timeline-patch.d.ts +6 -15
- package/dist/document/timeline-patch.d.ts.map +1 -1
- package/dist/document/timeline-patch.js +12 -21
- package/dist/document/timeline-patch.js.map +1 -1
- package/dist/document/timeline.d.ts +56 -263
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +71 -275
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.d.ts +90 -264
- package/dist/document/types.d.ts.map +1 -1
- package/dist/document/types.js +13 -30
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.d.ts +10 -40
- package/dist/document/validate.d.ts.map +1 -1
- package/dist/document/validate.js +72 -137
- package/dist/document/validate.js.map +1 -1
- package/dist/document/vocabulary.d.ts +4 -7
- package/dist/document/vocabulary.d.ts.map +1 -1
- package/dist/document/vocabulary.js +0 -1
- package/dist/document/vocabulary.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/layout/bounds.d.ts +1 -11
- package/dist/layout/bounds.d.ts.map +1 -1
- package/dist/layout/bounds.js.map +1 -1
- package/dist/layout/flex.d.ts +6 -20
- package/dist/layout/flex.d.ts.map +1 -1
- package/dist/layout/flex.js +7 -28
- package/dist/layout/flex.js.map +1 -1
- package/dist/layout/ops.d.ts +2 -11
- package/dist/layout/ops.d.ts.map +1 -1
- package/dist/layout/ops.js +2 -22
- package/dist/layout/ops.js.map +1 -1
- package/dist/layout/types.d.ts +11 -55
- package/dist/layout/types.d.ts.map +1 -1
- package/dist/layout/types.js.map +1 -1
- package/dist/platform/audio-sink.d.ts +7 -43
- package/dist/platform/audio-sink.d.ts.map +1 -1
- package/dist/platform/audio-sink.js +4 -29
- package/dist/platform/audio-sink.js.map +1 -1
- package/dist/platform/exporter.d.ts +5 -31
- package/dist/platform/exporter.d.ts.map +1 -1
- package/dist/platform/exporter.js.map +1 -1
- package/dist/platform/stepped-clock.d.ts +1 -16
- package/dist/platform/stepped-clock.d.ts.map +1 -1
- package/dist/platform/stepped-clock.js +1 -16
- package/dist/platform/stepped-clock.js.map +1 -1
- package/dist/platform/storage-adapter.d.ts +8 -68
- package/dist/platform/storage-adapter.d.ts.map +1 -1
- package/dist/platform/storage-adapter.js +8 -60
- package/dist/platform/storage-adapter.js.map +1 -1
- package/dist/platform/ticker.d.ts +11 -45
- package/dist/platform/ticker.d.ts.map +1 -1
- package/dist/platform/ticker.js +10 -37
- package/dist/platform/ticker.js.map +1 -1
- package/dist/project/config.d.ts +4 -14
- package/dist/project/config.d.ts.map +1 -1
- package/dist/project/config.js.map +1 -1
- package/dist/project/tree.d.ts +6 -35
- package/dist/project/tree.d.ts.map +1 -1
- package/dist/project/tree.js +1 -8
- package/dist/project/tree.js.map +1 -1
- package/dist/props/host.d.ts +2 -13
- package/dist/props/host.d.ts.map +1 -1
- package/dist/props/host.js.map +1 -1
- package/dist/props/layout.d.ts +1 -12
- package/dist/props/layout.d.ts.map +1 -1
- package/dist/props/layout.js +1 -12
- package/dist/props/layout.js.map +1 -1
- package/dist/props/observer.d.ts +1 -7
- package/dist/props/observer.d.ts.map +1 -1
- package/dist/props/observer.js.map +1 -1
- package/dist/props/slot.d.ts +6 -19
- package/dist/props/slot.d.ts.map +1 -1
- package/dist/props/slot.js +5 -14
- package/dist/props/slot.js.map +1 -1
- package/dist/render/canvas-render-context2d.d.ts +8 -68
- package/dist/render/canvas-render-context2d.d.ts.map +1 -1
- package/dist/render/canvas-render-context2d.js +8 -69
- package/dist/render/canvas-render-context2d.js.map +1 -1
- package/dist/render/clip-contains.d.ts +2 -16
- package/dist/render/clip-contains.d.ts.map +1 -1
- package/dist/render/clip-contains.js +21 -82
- package/dist/render/clip-contains.js.map +1 -1
- package/dist/render/clip.d.ts +7 -25
- package/dist/render/clip.d.ts.map +1 -1
- package/dist/render/clip.js +5 -17
- package/dist/render/clip.js.map +1 -1
- package/dist/render/descriptors/ellipse.d.ts.map +1 -1
- package/dist/render/descriptors/ellipse.js +0 -1
- package/dist/render/descriptors/ellipse.js.map +1 -1
- package/dist/render/descriptors/line.d.ts.map +1 -1
- package/dist/render/descriptors/line.js +0 -1
- package/dist/render/descriptors/line.js.map +1 -1
- package/dist/render/descriptors/path-builder.d.ts +4 -32
- package/dist/render/descriptors/path-builder.d.ts.map +1 -1
- package/dist/render/descriptors/path-builder.js +3 -25
- package/dist/render/descriptors/path-builder.js.map +1 -1
- package/dist/render/descriptors/path.d.ts +1 -11
- package/dist/render/descriptors/path.d.ts.map +1 -1
- package/dist/render/descriptors/path.js +0 -1
- package/dist/render/descriptors/path.js.map +1 -1
- package/dist/render/descriptors/polygon.d.ts.map +1 -1
- package/dist/render/descriptors/polygon.js +0 -1
- package/dist/render/descriptors/polygon.js.map +1 -1
- package/dist/render/descriptors/polygram.d.ts.map +1 -1
- package/dist/render/descriptors/polygram.js +0 -1
- package/dist/render/descriptors/polygram.js.map +1 -1
- package/dist/render/descriptors/rect.d.ts.map +1 -1
- package/dist/render/descriptors/rect.js +0 -1
- package/dist/render/descriptors/rect.js.map +1 -1
- package/dist/render/descriptors/richtext.d.ts.map +1 -1
- package/dist/render/descriptors/richtext.js +0 -1
- package/dist/render/descriptors/richtext.js.map +1 -1
- package/dist/render/descriptors/shape.d.ts +17 -77
- package/dist/render/descriptors/shape.d.ts.map +1 -1
- package/dist/render/descriptors/shape.js +13 -47
- package/dist/render/descriptors/shape.js.map +1 -1
- package/dist/render/descriptors/text.d.ts +15 -94
- package/dist/render/descriptors/text.d.ts.map +1 -1
- package/dist/render/descriptors/text.js +8 -50
- package/dist/render/descriptors/text.js.map +1 -1
- package/dist/render/descriptors/transform.d.ts +5 -16
- package/dist/render/descriptors/transform.d.ts.map +1 -1
- package/dist/render/descriptors/transform.js +1 -17
- package/dist/render/descriptors/transform.js.map +1 -1
- package/dist/render/graphics2d.d.ts +24 -116
- package/dist/render/graphics2d.d.ts.map +1 -1
- package/dist/render/graphics2d.js +23 -108
- package/dist/render/graphics2d.js.map +1 -1
- package/dist/render/measure-context.d.ts +5 -29
- package/dist/render/measure-context.d.ts.map +1 -1
- package/dist/render/measure-context.js.map +1 -1
- package/dist/render/null-render-context.d.ts +2 -20
- package/dist/render/null-render-context.d.ts.map +1 -1
- package/dist/render/null-render-context.js +2 -20
- package/dist/render/null-render-context.js.map +1 -1
- package/dist/render/render-context2d.d.ts +52 -208
- package/dist/render/render-context2d.d.ts.map +1 -1
- package/dist/render/render-context2d.js.map +1 -1
- package/dist/render/surface.d.ts +2 -19
- package/dist/render/surface.d.ts.map +1 -1
- package/dist/render/surface.js.map +1 -1
- package/dist/render/text-defaults.d.ts +1 -17
- package/dist/render/text-defaults.d.ts.map +1 -1
- package/dist/render/text-defaults.js +6 -40
- package/dist/render/text-defaults.js.map +1 -1
- package/dist/render/text-layout.d.ts +12 -55
- package/dist/render/text-layout.d.ts.map +1 -1
- package/dist/render/text-layout.js +2 -16
- package/dist/render/text-layout.js.map +1 -1
- package/dist/render3d/bounds3d.d.ts +10 -32
- package/dist/render3d/bounds3d.d.ts.map +1 -1
- package/dist/render3d/bounds3d.js +2 -12
- package/dist/render3d/bounds3d.js.map +1 -1
- package/dist/render3d/builders.d.ts +8 -35
- package/dist/render3d/builders.d.ts.map +1 -1
- package/dist/render3d/builders.js +8 -35
- package/dist/render3d/builders.js.map +1 -1
- package/dist/render3d/camera.d.ts +10 -57
- package/dist/render3d/camera.d.ts.map +1 -1
- package/dist/render3d/camera.js +4 -26
- package/dist/render3d/camera.js.map +1 -1
- package/dist/render3d/fill3d.d.ts +7 -45
- package/dist/render3d/fill3d.d.ts.map +1 -1
- package/dist/render3d/fill3d.js +15 -85
- package/dist/render3d/fill3d.js.map +1 -1
- package/dist/render3d/geometry.d.ts +18 -106
- package/dist/render3d/geometry.d.ts.map +1 -1
- package/dist/render3d/geometry.js +2 -20
- package/dist/render3d/geometry.js.map +1 -1
- package/dist/render3d/graphics3d.d.ts +29 -133
- package/dist/render3d/graphics3d.d.ts.map +1 -1
- package/dist/render3d/graphics3d.js +23 -110
- package/dist/render3d/graphics3d.js.map +1 -1
- package/dist/render3d/index.d.ts +1 -16
- package/dist/render3d/index.d.ts.map +1 -1
- package/dist/render3d/index.js +1 -16
- package/dist/render3d/index.js.map +1 -1
- package/dist/render3d/inert.d.ts.map +1 -1
- package/dist/render3d/inert.js +1 -14
- package/dist/render3d/inert.js.map +1 -1
- package/dist/render3d/light.d.ts +3 -26
- package/dist/render3d/light.d.ts.map +1 -1
- package/dist/render3d/light.js.map +1 -1
- package/dist/render3d/material.d.ts +13 -87
- package/dist/render3d/material.d.ts.map +1 -1
- package/dist/render3d/material.js +2 -16
- package/dist/render3d/material.js.map +1 -1
- package/dist/render3d/matrix4.d.ts +14 -68
- package/dist/render3d/matrix4.d.ts.map +1 -1
- package/dist/render3d/matrix4.js +11 -60
- package/dist/render3d/matrix4.js.map +1 -1
- package/dist/render3d/render-context3d.d.ts +13 -51
- package/dist/render3d/render-context3d.d.ts.map +1 -1
- package/dist/render3d/render-context3d.js +9 -21
- package/dist/render3d/render-context3d.js.map +1 -1
- package/dist/render3d/resources.d.ts +9 -53
- package/dist/render3d/resources.d.ts.map +1 -1
- package/dist/render3d/resources.js +8 -48
- package/dist/render3d/resources.js.map +1 -1
- package/dist/render3d/rounded-box.d.ts +7 -21
- package/dist/render3d/rounded-box.d.ts.map +1 -1
- package/dist/render3d/rounded-box.js +7 -46
- package/dist/render3d/rounded-box.js.map +1 -1
- package/dist/render3d/scene-settings.d.ts +20 -78
- package/dist/render3d/scene-settings.d.ts.map +1 -1
- package/dist/render3d/scene-settings.js.map +1 -1
- package/dist/render3d/scene3d.d.ts +11 -53
- package/dist/render3d/scene3d.d.ts.map +1 -1
- package/dist/render3d/scene3d.js +12 -59
- package/dist/render3d/scene3d.js.map +1 -1
- package/dist/render3d/segments.d.ts +2 -25
- package/dist/render3d/segments.d.ts.map +1 -1
- package/dist/render3d/segments.js +1 -11
- package/dist/render3d/segments.js.map +1 -1
- package/dist/render3d/texture.d.ts +25 -112
- package/dist/render3d/texture.d.ts.map +1 -1
- package/dist/render3d/texture.js +3 -27
- package/dist/render3d/texture.js.map +1 -1
- package/dist/render3d/tracking.d.ts +2 -19
- package/dist/render3d/tracking.d.ts.map +1 -1
- package/dist/render3d/tracking.js +2 -19
- package/dist/render3d/tracking.js.map +1 -1
- package/dist/render3d/transform.d.ts +14 -60
- package/dist/render3d/transform.d.ts.map +1 -1
- package/dist/render3d/transform.js +0 -2
- package/dist/render3d/transform.js.map +1 -1
- package/dist/render3d/vector3.d.ts +6 -48
- package/dist/render3d/vector3.d.ts.map +1 -1
- package/dist/render3d/vector3.js +4 -38
- package/dist/render3d/vector3.js.map +1 -1
- package/dist/render3d/walk.d.ts +3 -27
- package/dist/render3d/walk.d.ts.map +1 -1
- package/dist/render3d/walk.js +5 -33
- package/dist/render3d/walk.js.map +1 -1
- package/dist/runtime/asset-refine.d.ts +34 -20
- package/dist/runtime/asset-refine.d.ts.map +1 -1
- package/dist/runtime/asset-refine.js +127 -31
- package/dist/runtime/asset-refine.js.map +1 -1
- package/dist/runtime/asset-timeline.d.ts +14 -53
- package/dist/runtime/asset-timeline.d.ts.map +1 -1
- package/dist/runtime/asset-timeline.js +6 -27
- package/dist/runtime/asset-timeline.js.map +1 -1
- package/dist/runtime/asset-update.d.ts +7 -26
- package/dist/runtime/asset-update.d.ts.map +1 -1
- package/dist/runtime/asset-update.js +6 -18
- package/dist/runtime/asset-update.js.map +1 -1
- package/dist/runtime/audio-index.d.ts +0 -2
- package/dist/runtime/audio-index.d.ts.map +1 -1
- package/dist/runtime/audio-index.js +0 -2
- package/dist/runtime/audio-index.js.map +1 -1
- package/dist/runtime/builtin-context.d.ts +3 -9
- package/dist/runtime/builtin-context.d.ts.map +1 -1
- package/dist/runtime/builtin-context.js +3 -9
- package/dist/runtime/builtin-context.js.map +1 -1
- package/dist/runtime/clip-instance.d.ts +12 -39
- package/dist/runtime/clip-instance.d.ts.map +1 -1
- package/dist/runtime/clip-instance.js +21 -45
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.d.ts +26 -68
- package/dist/runtime/clip-store.d.ts.map +1 -1
- package/dist/runtime/clip-store.js +47 -81
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.d.ts +31 -85
- package/dist/runtime/engine.d.ts.map +1 -1
- package/dist/runtime/engine.js +16 -49
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/frame-time.d.ts +4 -15
- package/dist/runtime/frame-time.d.ts.map +1 -1
- package/dist/runtime/frame-time.js +5 -12
- package/dist/runtime/frame-time.js.map +1 -1
- package/dist/runtime/index.d.ts +0 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +0 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/node-picking.d.ts +59 -139
- package/dist/runtime/node-picking.d.ts.map +1 -1
- package/dist/runtime/node-picking.js +87 -157
- package/dist/runtime/node-picking.js.map +1 -1
- package/dist/runtime/node-picking3d.d.ts +39 -96
- package/dist/runtime/node-picking3d.d.ts.map +1 -1
- package/dist/runtime/node-picking3d.js +98 -141
- package/dist/runtime/node-picking3d.js.map +1 -1
- package/dist/runtime/placement.d.ts +8 -17
- package/dist/runtime/placement.d.ts.map +1 -1
- package/dist/runtime/placement.js +7 -16
- package/dist/runtime/placement.js.map +1 -1
- package/dist/runtime/playback-controller.d.ts +78 -207
- package/dist/runtime/playback-controller.d.ts.map +1 -1
- package/dist/runtime/playback-controller.js +111 -226
- package/dist/runtime/playback-controller.js.map +1 -1
- package/dist/runtime/playback.d.ts +6 -14
- package/dist/runtime/playback.d.ts.map +1 -1
- package/dist/runtime/playback.js +6 -14
- package/dist/runtime/playback.js.map +1 -1
- package/dist/runtime/project-assets.d.ts +6 -14
- package/dist/runtime/project-assets.d.ts.map +1 -1
- package/dist/runtime/project-assets.js +7 -16
- package/dist/runtime/project-assets.js.map +1 -1
- package/dist/runtime/session.d.ts +22 -45
- package/dist/runtime/session.d.ts.map +1 -1
- package/dist/runtime/session.js +26 -46
- package/dist/runtime/session.js.map +1 -1
- package/dist/runtime/settle.d.ts +4 -10
- package/dist/runtime/settle.d.ts.map +1 -1
- package/dist/runtime/settle.js +4 -10
- package/dist/runtime/settle.js.map +1 -1
- package/dist/runtime/state-evaluator.d.ts +15 -37
- package/dist/runtime/state-evaluator.d.ts.map +1 -1
- package/dist/runtime/state-evaluator.js +27 -44
- package/dist/runtime/state-evaluator.js.map +1 -1
- package/dist/runtime/text-geometry.d.ts +18 -47
- package/dist/runtime/text-geometry.d.ts.map +1 -1
- package/dist/runtime/text-geometry.js +13 -27
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.d.ts +1 -7
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +30 -138
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command-decorator.d.ts +6 -26
- package/dist/tween/command-decorator.d.ts.map +1 -1
- package/dist/tween/command-decorator.js +1 -6
- package/dist/tween/command-decorator.js.map +1 -1
- package/dist/tween/command.d.ts +6 -53
- package/dist/tween/command.d.ts.map +1 -1
- package/dist/tween/command.js +5 -40
- package/dist/tween/command.js.map +1 -1
- package/dist/tween/ease/curve.d.ts +2 -17
- package/dist/tween/ease/curve.d.ts.map +1 -1
- package/dist/tween/ease/curve.js +1 -6
- package/dist/tween/ease/curve.js.map +1 -1
- package/dist/tween/ease/describe.d.ts +0 -11
- package/dist/tween/ease/describe.d.ts.map +1 -1
- package/dist/tween/ease/describe.js +0 -23
- package/dist/tween/ease/describe.js.map +1 -1
- package/dist/tween/ease/spec.d.ts +2 -18
- package/dist/tween/ease/spec.d.ts.map +1 -1
- package/dist/tween/ease/spec.js.map +1 -1
- package/dist/tween/inert.d.ts +1 -14
- package/dist/tween/inert.d.ts.map +1 -1
- package/dist/tween/inert.js +1 -14
- package/dist/tween/inert.js.map +1 -1
- package/dist/tween/lerp.d.ts +2 -26
- package/dist/tween/lerp.d.ts.map +1 -1
- package/dist/tween/lerp.js +2 -26
- package/dist/tween/lerp.js.map +1 -1
- package/dist/tween/loop.d.ts +9 -50
- package/dist/tween/loop.d.ts.map +1 -1
- package/dist/tween/loop.js +6 -31
- package/dist/tween/loop.js.map +1 -1
- package/dist/tween/prepare.d.ts +2 -30
- package/dist/tween/prepare.d.ts.map +1 -1
- package/dist/tween/prepare.js +2 -30
- package/dist/tween/prepare.js.map +1 -1
- package/dist/tween/stepper.d.ts +4 -25
- package/dist/tween/stepper.d.ts.map +1 -1
- package/dist/tween/stepper.js.map +1 -1
- package/dist/tween/to-command.d.ts +1 -8
- package/dist/tween/to-command.d.ts.map +1 -1
- package/dist/tween/to-command.js +2 -25
- package/dist/tween/to-command.js.map +1 -1
- package/dist/util/context.d.ts +4 -29
- package/dist/util/context.d.ts.map +1 -1
- package/dist/util/context.js +3 -15
- package/dist/util/context.js.map +1 -1
- package/dist/util/csv.d.ts +4 -29
- package/dist/util/csv.d.ts.map +1 -1
- package/dist/util/csv.js +3 -22
- package/dist/util/csv.js.map +1 -1
- package/dist/util/metrics.d.ts +2 -26
- package/dist/util/metrics.d.ts.map +1 -1
- package/dist/util/metrics.js +2 -26
- package/dist/util/metrics.js.map +1 -1
- package/dist/util/random.d.ts +20 -87
- package/dist/util/random.d.ts.map +1 -1
- package/dist/util/random.js +20 -87
- package/dist/util/random.js.map +1 -1
- package/dist/util/reference.d.ts +6 -35
- package/dist/util/reference.d.ts.map +1 -1
- package/dist/util/reference.js +1 -4
- package/dist/util/reference.js.map +1 -1
- package/dist/util/scheduler.d.ts +6 -27
- package/dist/util/scheduler.d.ts.map +1 -1
- package/dist/util/scheduler.js +8 -35
- package/dist/util/scheduler.js.map +1 -1
- package/package.json +1 -1
- package/dist/browser/chunks/chunk-4BDLFEOC.js.map +0 -7
- package/dist/browser/chunks/chunk-CCGVIR4F.js.map +0 -7
- package/dist/browser/chunks/chunk-N4WSN5WY.js +0 -13
- package/dist/browser/chunks/chunk-N4WSN5WY.js.map +0 -7
- package/dist/browser/chunks/chunk-WZSI3GSK.js +0 -6
- package/dist/browser/chunks/chunk-WZSI3GSK.js.map +0 -7
- package/dist/renamed-scene-names.d.ts +0 -17
- package/dist/renamed-scene-names.d.ts.map +0 -1
- package/dist/renamed-scene-names.js +0 -9
- package/dist/renamed-scene-names.js.map +0 -1
- package/dist/runtime/precompisition.d.ts +0 -24
- package/dist/runtime/precompisition.d.ts.map +0 -1
- package/dist/runtime/precompisition.js +0 -7
- package/dist/runtime/precompisition.js.map +0 -1
|
@@ -1,20 +1,5 @@
|
|
|
1
1
|
import { Alignment } from "../../attributes/layout/alignment.js";
|
|
2
|
-
/**
|
|
3
|
-
* The out-of-plane transform as one bag — the shorthand form of the individual
|
|
4
|
-
* `rotationX` / `rotationY` / `depth` / `perspective` / `backfaceVisible` /
|
|
5
|
-
* `flipHorizontal` / `flipVertical` / `transformOrigin` props on {@link Node2D}.
|
|
6
|
-
*
|
|
7
|
-
* Sugar, and only sugar: {@link expandTransform3D} writes each field onto the
|
|
8
|
-
* prop it names before anything reads either, the same way `size` becomes
|
|
9
|
-
* `width`/`height`. That keeps one storage location per value — so a tween of
|
|
10
|
-
* `transform3D.rotationY` and a tween of `rotationY` are the same tween, and a
|
|
11
|
-
* scene can mix the two forms without either shadowing the other.
|
|
12
|
-
*
|
|
13
|
-
* Named `NodeTransform3D` rather than `Transform3D`, which `render3d` already
|
|
14
|
-
* uses for the placement of an object in a *real* 3D scene. These are two
|
|
15
|
-
* different things and the names had to say so: this one tilts a flat node the
|
|
16
|
-
* way a browser tilts a `<div>`, that one puts a mesh in a world with lights in it.
|
|
17
|
-
*/
|
|
2
|
+
/** The out-of-plane transform as one bag, shorthand for the individual `rotationX` / `rotationY` / `depth` / `perspective` / `backfaceVisible` / `flipHorizontal` / `flipVertical` / `transformOrigin` props on {@link Node2D}. Only sugar: {@link expandTransform3D} writes each field onto the prop it names before anything reads either, so a tween of `transform3D.rotationY` and of `rotationY` are the same tween. Named `NodeTransform3D` because `Transform3D` in `render3d` places a mesh in a real 3D scene; this tilts a flat node as a browser tilts a `<div>`. */
|
|
18
3
|
export interface NodeTransform3D {
|
|
19
4
|
/** Tilt about the horizontal axis, degrees. Positive tips the top away. */
|
|
20
5
|
rotationX?: number;
|
|
@@ -35,13 +20,7 @@ export interface NodeTransform3D {
|
|
|
35
20
|
/** The point the whole transform turns about — CSS `transform-origin`. Defaults to the node's `pivot`. */
|
|
36
21
|
origin?: Alignment;
|
|
37
22
|
}
|
|
38
|
-
/**
|
|
39
|
-
* Expand the `transform3D` shorthand onto the individual props, in place. An
|
|
40
|
-
* explicitly-named prop in the same object wins over the bag's field, matching
|
|
41
|
-
* `size`-vs-`width` and `padding`-vs-`paddingLeft`; a `transform3D` given as a
|
|
42
|
-
* whole-bag callback is left alone, since there is no per-field value to
|
|
43
|
-
* distribute. No-op when the key is absent, which is nearly always.
|
|
44
|
-
*/
|
|
23
|
+
/** Expands the `transform3D` shorthand onto the individual props in place. An explicitly named prop in the same object wins over the bag's field (as `size` vs `width`); a whole-bag callback is left alone, having no per-field value to distribute. */
|
|
45
24
|
/** @internal */
|
|
46
25
|
export declare function expandTransform3D(props: Record<string, unknown>): void;
|
|
47
26
|
//# sourceMappingURL=transform3d.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform3d.d.ts","sourceRoot":"","sources":["../../../src/attributes/layout/transform3d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE1D
|
|
1
|
+
{"version":3,"file":"transform3d.d.ts","sourceRoot":"","sources":["../../../src/attributes/layout/transform3d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE1D,gjBAAgjB;AAChjB,MAAM,WAAW,eAAe;IAC5B,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kFAAkF;IAClF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qGAAqG;IACrG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sFAAsF;IACtF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sFAAsF;IACtF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qFAAqF;IACrF,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iEAAiE;IACjE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mEAAmE;IACnE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,0GAA0G;IAC1G,MAAM,CAAC,EAAE,SAAS,CAAC;CACtB;AAeD,yPAAyP;AACzP,gBAAgB;AAChB,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAQtE"}
|
|
@@ -10,13 +10,7 @@ const TRANSFORM_3D_KEYS = [
|
|
|
10
10
|
["flipVertical", "flipVertical"],
|
|
11
11
|
["origin", "transformOrigin"],
|
|
12
12
|
];
|
|
13
|
-
/**
|
|
14
|
-
* Expand the `transform3D` shorthand onto the individual props, in place. An
|
|
15
|
-
* explicitly-named prop in the same object wins over the bag's field, matching
|
|
16
|
-
* `size`-vs-`width` and `padding`-vs-`paddingLeft`; a `transform3D` given as a
|
|
17
|
-
* whole-bag callback is left alone, since there is no per-field value to
|
|
18
|
-
* distribute. No-op when the key is absent, which is nearly always.
|
|
19
|
-
*/
|
|
13
|
+
/** Expands the `transform3D` shorthand onto the individual props in place. An explicitly named prop in the same object wins over the bag's field (as `size` vs `width`); a whole-bag callback is left alone, having no per-field value to distribute. */
|
|
20
14
|
/** @internal */
|
|
21
15
|
export function expandTransform3D(props) {
|
|
22
16
|
const bag = props.transform3D;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform3d.js","sourceRoot":"","sources":["../../../src/attributes/layout/transform3d.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transform3d.js","sourceRoot":"","sources":["../../../src/attributes/layout/transform3d.ts"],"names":[],"mappings":"AAwBA,0FAA0F;AAC1F,MAAM,iBAAiB,GAAmD;IACtE,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,OAAO,EAAE,OAAO,CAAC;IAClB,CAAC,aAAa,EAAE,aAAa,CAAC;IAC9B,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IACtC,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IACpC,CAAC,cAAc,EAAE,cAAc,CAAC;IAChC,CAAC,QAAQ,EAAE,iBAAiB,CAAC;CAChC,CAAC;AAEF,yPAAyP;AACzP,gBAAgB;AAChB,MAAM,UAAU,iBAAiB,CAAC,KAA8B;IAC5D,MAAM,GAAG,GAAG,KAAK,CAAC,WAAW,CAAC;IAC9B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO;IACzE,MAAM,MAAM,GAAG,GAA8B,CAAC;IAC9C,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,iBAAiB,EAAE,CAAC;QAC5C,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,SAAS;YAAE,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;IAC9E,CAAC;AACL,CAAC","sourcesContent":["import { Alignment } from \"@/attributes/layout/alignment\";\n\n/** The out-of-plane transform as one bag, shorthand for the individual `rotationX` / `rotationY` / `depth` / `perspective` / `backfaceVisible` / `flipHorizontal` / `flipVertical` / `transformOrigin` props on {@link Node2D}. Only sugar: {@link expandTransform3D} writes each field onto the prop it names before anything reads either, so a tween of `transform3D.rotationY` and of `rotationY` are the same tween. Named `NodeTransform3D` because `Transform3D` in `render3d` places a mesh in a real 3D scene; this tilts a flat node as a browser tilts a `<div>`. */\nexport interface NodeTransform3D {\n /** Tilt about the horizontal axis, degrees. Positive tips the top away. */\n rotationX?: number;\n /** Tilt about the vertical axis, degrees. Positive swings the right edge away. */\n rotationY?: number;\n /** In-plane rotation belonging to the 3D block, degrees. Separate from the node's own `rotation`. */\n rotationZ?: number;\n /** Push along the view axis in px (CSS `translateZ`). Inert without `perspective`. */\n depth?: number;\n /** Viewer distance in px. `0` (default) is a parallel projection — no perspective. */\n perspective?: number;\n /** Whether the node still paints once it has turned past edge-on. Default `true`. */\n backfaceVisible?: boolean;\n /** Mirror across the vertical centre line (CSS `scaleX(-1)`). */\n flipHorizontal?: boolean;\n /** Mirror across the horizontal centre line (CSS `scaleY(-1)`). */\n flipVertical?: boolean;\n /** The point the whole transform turns about — CSS `transform-origin`. Defaults to the node's `pivot`. */\n origin?: Alignment;\n}\n\n/** The prop each {@link NodeTransform3D} field expands to. `origin` is the one rename. */\nconst TRANSFORM_3D_KEYS: ReadonlyArray<[keyof NodeTransform3D, string]> = [\n [\"rotationX\", \"rotationX\"],\n [\"rotationY\", \"rotationY\"],\n [\"rotationZ\", \"rotationZ\"],\n [\"depth\", \"depth\"],\n [\"perspective\", \"perspective\"],\n [\"backfaceVisible\", \"backfaceVisible\"],\n [\"flipHorizontal\", \"flipHorizontal\"],\n [\"flipVertical\", \"flipVertical\"],\n [\"origin\", \"transformOrigin\"],\n];\n\n/** Expands the `transform3D` shorthand onto the individual props in place. An explicitly named prop in the same object wins over the bag's field (as `size` vs `width`); a whole-bag callback is left alone, having no per-field value to distribute. */\n/** @internal */\nexport function expandTransform3D(props: Record<string, unknown>): void {\n const bag = props.transform3D;\n if (bag === undefined || bag === null || typeof bag !== \"object\") return;\n const source = bag as Record<string, unknown>;\n for (const [field, prop] of TRANSFORM_3D_KEYS) {\n const value = source[field];\n if (value !== undefined && props[prop] === undefined) props[prop] = value;\n }\n}\n"]}
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
import { Vector2 } from "./vector2.js";
|
|
2
|
-
/**
|
|
3
|
-
* A node's resolved transform in global (world / scene-root) space. Unlike the
|
|
4
|
-
* per-node `x`/`y` and anchor getters — which are relative to the node's parent
|
|
5
|
-
* — every field here is folded through the full ancestor chain, so two nodes
|
|
6
|
-
* under different parents can be compared or aligned directly.
|
|
7
|
-
*
|
|
8
|
-
* Positions use the same y-up convention as `x`/`y` (positive y is up). Read
|
|
9
|
-
* inside a reactive callback (`x: () => other().global.topRight.x`) they track
|
|
10
|
-
* changes to this node's *and* every ancestor's layout/transform.
|
|
11
|
-
*/
|
|
2
|
+
/** A node's resolved transform in global (scene-root) space: every field is folded through the full ancestor chain (unlike the parent-relative `x`/`y`), so nodes under different parents compare directly. Positions are y-up like `x`/`y`; read in a reactive callback (`x: () => other().global.topRight.x`) they track this node's and every ancestor's layout/transform. */
|
|
12
3
|
/** @internal */
|
|
13
4
|
export interface WorldTransform {
|
|
14
|
-
/** World position of the node's center (its `x`/`y` origin). */
|
|
15
5
|
readonly x: number;
|
|
16
6
|
readonly y: number;
|
|
17
7
|
readonly center: Vector2;
|
|
@@ -27,11 +17,7 @@ export interface WorldTransform {
|
|
|
27
17
|
readonly rotation: number;
|
|
28
18
|
/** Product of this node's and all ancestors' scale factors. */
|
|
29
19
|
readonly scale: number;
|
|
30
|
-
/**
|
|
31
|
-
* Product of this node's and all ancestors' opacities, in `[0, 1]` — the
|
|
32
|
-
* effective alpha the node renders at. Matches the renderer's pass-through
|
|
33
|
-
* fold: an ancestor at half opacity halves everything beneath it.
|
|
34
|
-
*/
|
|
20
|
+
/** Product of this node's and all ancestors' opacities in `[0, 1]`: the effective alpha, matching the renderer's pass-through fold. */
|
|
35
21
|
readonly opacity: number;
|
|
36
22
|
}
|
|
37
23
|
//# sourceMappingURL=world-transform.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"world-transform.d.ts","sourceRoot":"","sources":["../../../src/attributes/layout/world-transform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC
|
|
1
|
+
{"version":3,"file":"world-transform.d.ts","sourceRoot":"","sources":["../../../src/attributes/layout/world-transform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,iXAAiX;AACjX,gBAAgB;AAChB,MAAM,WAAW,cAAc;IAC3B,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,6EAA6E;IAC7E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,uIAAuI;IACvI,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"world-transform.js","sourceRoot":"","sources":["../../../src/attributes/layout/world-transform.ts"],"names":[],"mappings":"","sourcesContent":["import { Vector2 } from \"./vector2\";\n\n
|
|
1
|
+
{"version":3,"file":"world-transform.js","sourceRoot":"","sources":["../../../src/attributes/layout/world-transform.ts"],"names":[],"mappings":"","sourcesContent":["import { Vector2 } from \"./vector2\";\n\n/** A node's resolved transform in global (scene-root) space: every field is folded through the full ancestor chain (unlike the parent-relative `x`/`y`), so nodes under different parents compare directly. Positions are y-up like `x`/`y`; read in a reactive callback (`x: () => other().global.topRight.x`) they track this node's and every ancestor's layout/transform. */\n/** @internal */\nexport interface WorldTransform {\n readonly x: number;\n readonly y: number;\n readonly center: Vector2;\n readonly topLeft: Vector2;\n readonly topRight: Vector2;\n readonly bottomLeft: Vector2;\n readonly bottomRight: Vector2;\n readonly topCenter: Vector2;\n readonly bottomCenter: Vector2;\n readonly centerLeft: Vector2;\n readonly centerRight: Vector2;\n /** Sum of this node's and all ancestors' rotations, in degrees clockwise. */\n readonly rotation: number;\n /** Product of this node's and all ancestors' scale factors. */\n readonly scale: number;\n /** Product of this node's and all ancestors' opacities in `[0, 1]`: the effective alpha, matching the renderer's pass-through fold. */\n readonly opacity: number;\n}\n"]}
|
|
@@ -11,27 +11,10 @@ export interface PropertyMeta {
|
|
|
11
11
|
options?: PropOptions<any, any>;
|
|
12
12
|
/** How a host edits this prop — see {@link PropertyEditor}. */
|
|
13
13
|
editor?: PropertyEditor;
|
|
14
|
-
/** @deprecated Nothing sets it: the engine withdraws no property. Kept so a host that tests it still compiles. */
|
|
15
|
-
withdrawn?: boolean;
|
|
16
14
|
}
|
|
17
|
-
/**
|
|
18
|
-
* What a host needs to draw a control for a property.
|
|
19
|
-
*
|
|
20
|
-
* Declared **on the property**, because that is the thing it edits. A node type
|
|
21
|
-
* used to describe its controls in a separate list — a `fields` array beside the
|
|
22
|
-
* class, or a manifest beside the package — and a list of props next to a class
|
|
23
|
-
* of props is the shape that drifts: rename one and nothing says the other is
|
|
24
|
-
* now describing something that no longer exists.
|
|
25
|
-
*
|
|
26
|
-
* Nothing here is read while rendering. A frame is identical whether a prop
|
|
27
|
-
* declares a range or not; this exists so an editor has one place to ask.
|
|
28
|
-
*/
|
|
15
|
+
/** What a host needs to draw a control for a property. Declared **on the property**, not in a separate `fields` list beside the class, which drifts when one is renamed. Nothing here is read while rendering. */
|
|
29
16
|
export interface PropertyEditor {
|
|
30
|
-
/**
|
|
31
|
-
* The control to draw. Inferred when absent — a typed entry knows its
|
|
32
|
-
* own (`Types.color` is a colour), and a plain `property` reads it off
|
|
33
|
-
* the default's type.
|
|
34
|
-
*/
|
|
17
|
+
/** The control to draw; inferred when absent (a typed entry knows its own, a plain `property` reads the default's type). */
|
|
35
18
|
kind?: string;
|
|
36
19
|
/** Bounds and granularity for a numeric control. */
|
|
37
20
|
min?: number;
|
|
@@ -39,87 +22,44 @@ export interface PropertyEditor {
|
|
|
39
22
|
step?: number;
|
|
40
23
|
/** What the number means, for a host that labels it — `"°"`, `"s"`, `"×"`. */
|
|
41
24
|
unit?: string;
|
|
42
|
-
/** The choices, for an enum. */
|
|
43
25
|
options?: readonly string[];
|
|
44
26
|
/** Whether a document may tween it. Defaults to true. */
|
|
45
27
|
animatable?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* The controls *inside* an object-valued prop.
|
|
48
|
-
*
|
|
49
|
-
* An axis config or a theme is one property holding several editable values,
|
|
50
|
-
* and a host draws them as a group. Declaring them here keeps them attached
|
|
51
|
-
* to the prop they belong to rather than flattened into a list that has to
|
|
52
|
-
* name its own parent.
|
|
53
|
-
*/
|
|
28
|
+
/** The controls *inside* an object-valued prop (an axis config, a theme), drawn as a group and kept attached to their parent prop. */
|
|
54
29
|
properties?: Record<string, PropertyEditor>;
|
|
55
30
|
/** Whatever a control needs that this vocabulary does not name. */
|
|
56
31
|
[option: string]: unknown;
|
|
57
32
|
}
|
|
58
|
-
/** Symbol used to store property metadata on class prototypes. */
|
|
59
33
|
export declare const PROPERTY_META: unique symbol;
|
|
60
|
-
/**
|
|
61
|
-
* Every `property` on an instance's class, inherited included, ordered base →
|
|
62
|
-
* subclass so `initProps` applies them in declaration order. A subclass that
|
|
63
|
-
* redeclares a key replaces the inherited declaration whole — default, mapper,
|
|
64
|
-
* tween and editor — at the position the base gave it.
|
|
65
|
-
*/
|
|
34
|
+
/** Every `property` on an instance's class, inherited included, ordered base -> subclass so `initProps` applies them in declaration order. A subclass redeclaring a key replaces the inherited declaration whole, at the position the base gave it. */
|
|
66
35
|
export declare function getPropertyMeta(instance: object): PropertyMeta[];
|
|
67
|
-
/**
|
|
68
|
-
* The per-key declarations stored under `symbol` along `instance`'s prototype
|
|
69
|
-
* chain: base first, one entry per key, the most-derived declaration of each.
|
|
70
|
-
*/
|
|
36
|
+
/** The per-key declarations stored under `symbol` along the prototype chain: base first, one entry per key, the most-derived of each. */
|
|
71
37
|
export declare function mostDerived<M extends {
|
|
72
38
|
key: string;
|
|
73
39
|
}>(instance: object, symbol: symbol): M[];
|
|
74
|
-
/**
|
|
75
|
-
* A registration for one member of a node class: what `property(...)` and
|
|
76
|
-
* `command(...)` return, applied to the class's prototype under the member's
|
|
77
|
-
* key by {@link declareMembers}.
|
|
78
|
-
*/
|
|
40
|
+
/** A registration for one member of a node class, applied to the prototype under the member's key by {@link declareMembers}. */
|
|
79
41
|
export type MemberRegistration = (target: object, key: string) => void;
|
|
80
42
|
/**
|
|
81
|
-
* Registers properties and commands on a node class, in the order given.
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
* Order is meaningful: {@link getPropertyMeta} lists properties in
|
|
86
|
-
* registration order, which is the order `Registry.describe` hands a host's
|
|
87
|
-
* inspector, so a new entry goes where it should appear.
|
|
43
|
+
* Registers properties and commands on a node class, in the order given. Core's own base classes declare their props
|
|
44
|
+
* as `declare` fields and register them here, right after the class body. Order is meaningful: {@link getPropertyMeta}
|
|
45
|
+
* lists properties in registration order, which is the order `Registry.describe` hands a host's inspector. Node types
|
|
46
|
+
* outside core are components (`component2d`), which do this themselves.
|
|
88
47
|
*
|
|
89
48
|
* @example
|
|
90
49
|
* ```ts
|
|
91
|
-
* class Dial extends Node2D<DialProps> {
|
|
92
|
-
* declare level: number;
|
|
93
|
-
* turn(args: CommandArgs<{ by: number }>) { … }
|
|
94
|
-
* }
|
|
95
50
|
* declareMembers(Dial, {
|
|
96
51
|
* level: property({ default: 0 }),
|
|
97
52
|
* turn: command({ args: ["by"] }),
|
|
98
53
|
* });
|
|
99
54
|
* ```
|
|
100
|
-
*
|
|
101
|
-
* Node types outside core are components (`component2d`), which do this for
|
|
102
|
-
* their `props` and `commands` themselves.
|
|
103
55
|
*/
|
|
104
56
|
export declare function declareMembers<C extends abstract new (...args: never[]) => object>(ctor: C, members: {
|
|
105
57
|
[K in keyof InstanceType<C> & string]?: MemberRegistration;
|
|
106
58
|
}): void;
|
|
107
59
|
/**
|
|
108
|
-
* Declares a property on a `Node` subclass
|
|
109
|
-
*
|
|
110
|
-
* inherited key overrides it; see {@link getPropertyMeta}.
|
|
111
|
-
*
|
|
112
|
-
* @example
|
|
113
|
-
* ```ts
|
|
114
|
-
* declareMembers(Glow, {
|
|
115
|
-
* radius: property({ default: 0 }),
|
|
116
|
-
* fill: property({ mapper: fillOps.resolve, tween: fillOps.lerp }),
|
|
117
|
-
* });
|
|
118
|
-
* ```
|
|
119
|
-
*
|
|
120
|
-
* The `default` value is used when the corresponding key is absent from the
|
|
121
|
-
* constructor `props` object. The `mapper` / `tween` options are forwarded
|
|
122
|
-
* directly to `applyProp()`.
|
|
60
|
+
* Declares a property on a `Node` subclass, applied to the prototype under the property's key (directly or through
|
|
61
|
+
* {@link declareMembers}). `default` is used when the key is absent from the constructor `props`; `mapper` / `tween`
|
|
62
|
+
* are forwarded to `applyProp()`. Redeclaring an inherited key overrides it; see {@link getPropertyMeta}.
|
|
123
63
|
*/
|
|
124
64
|
export declare function property<Ext = any, Int = Ext>(opts?: {
|
|
125
65
|
default?: Ext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorator.d.ts","sourceRoot":"","sources":["../../../src/attributes/properties/decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,WAAW,WAAW,CAAC,GAAG,EAAE,GAAG;IACjC,+LAA+L;IAC/L,KAAK,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IACrB,yIAAyI;IACzI,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,GAAG,CAAC;CAC1C;AAGD,MAAM,WAAW,YAAY;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAChC,+DAA+D;IAC/D,MAAM,CAAC,EAAE,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"decorator.d.ts","sourceRoot":"","sources":["../../../src/attributes/properties/decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,WAAW,WAAW,CAAC,GAAG,EAAE,GAAG;IACjC,+LAA+L;IAC/L,KAAK,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IACrB,yIAAyI;IACzI,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,GAAG,CAAC;CAC1C;AAGD,MAAM,WAAW,YAAY;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAChC,+DAA+D;IAC/D,MAAM,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED,kNAAkN;AAClN,MAAM,WAAW,cAAc;IAC3B,4HAA4H;IAC5H,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,yDAAyD;IACzD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sIAAsI;IACtI,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC5C,mEAAmE;IACnE,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;CAC7B;AAED,eAAO,MAAM,aAAa,eAAyB,CAAC;AAEpD,uPAAuP;AACvP,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,EAAE,CAEhE;AAED,yIAAyI;AACzI,wBAAgB,WAAW,CAAC,CAAC,SAAS;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC,EAAE,CAsB5F;AAED,gIAAgI;AAChI,MAAM,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;AAEvE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,QAAQ,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,MAAM,EAC9E,IAAI,EAAE,CAAC,EACP,OAAO,EAAE;KAAG,CAAC,IAAI,MAAM,YAAY,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,kBAAkB;CAAE,GACxE,IAAI,CAIN;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,EAAE,IAAI,CAAC,EAAE;IAClD,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,GAAG,CAAC;IACvC,KAAK,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;CACxB,GAAG,cAAc,IACG,QAAQ,MAAM,EAAE,aAAa,MAAM,GAAG,MAAM,KAAG,IAAI,CAwBvE"}
|
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
/** Symbol used to store property metadata on class prototypes. */
|
|
2
1
|
export const PROPERTY_META = Symbol("propertyMeta");
|
|
3
|
-
/**
|
|
4
|
-
* Every `property` on an instance's class, inherited included, ordered base →
|
|
5
|
-
* subclass so `initProps` applies them in declaration order. A subclass that
|
|
6
|
-
* redeclares a key replaces the inherited declaration whole — default, mapper,
|
|
7
|
-
* tween and editor — at the position the base gave it.
|
|
8
|
-
*/
|
|
2
|
+
/** Every `property` on an instance's class, inherited included, ordered base -> subclass so `initProps` applies them in declaration order. A subclass redeclaring a key replaces the inherited declaration whole, at the position the base gave it. */
|
|
9
3
|
export function getPropertyMeta(instance) {
|
|
10
4
|
return mostDerived(instance, PROPERTY_META);
|
|
11
5
|
}
|
|
12
|
-
/**
|
|
13
|
-
* The per-key declarations stored under `symbol` along `instance`'s prototype
|
|
14
|
-
* chain: base first, one entry per key, the most-derived declaration of each.
|
|
15
|
-
*/
|
|
6
|
+
/** The per-key declarations stored under `symbol` along the prototype chain: base first, one entry per key, the most-derived of each. */
|
|
16
7
|
export function mostDerived(instance, symbol) {
|
|
17
8
|
const chain = [];
|
|
18
9
|
let proto = Object.getPrototypeOf(instance);
|
|
@@ -39,28 +30,18 @@ export function mostDerived(instance, symbol) {
|
|
|
39
30
|
return result;
|
|
40
31
|
}
|
|
41
32
|
/**
|
|
42
|
-
* Registers properties and commands on a node class, in the order given.
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* Order is meaningful: {@link getPropertyMeta} lists properties in
|
|
47
|
-
* registration order, which is the order `Registry.describe` hands a host's
|
|
48
|
-
* inspector, so a new entry goes where it should appear.
|
|
33
|
+
* Registers properties and commands on a node class, in the order given. Core's own base classes declare their props
|
|
34
|
+
* as `declare` fields and register them here, right after the class body. Order is meaningful: {@link getPropertyMeta}
|
|
35
|
+
* lists properties in registration order, which is the order `Registry.describe` hands a host's inspector. Node types
|
|
36
|
+
* outside core are components (`component2d`), which do this themselves.
|
|
49
37
|
*
|
|
50
38
|
* @example
|
|
51
39
|
* ```ts
|
|
52
|
-
* class Dial extends Node2D<DialProps> {
|
|
53
|
-
* declare level: number;
|
|
54
|
-
* turn(args: CommandArgs<{ by: number }>) { … }
|
|
55
|
-
* }
|
|
56
40
|
* declareMembers(Dial, {
|
|
57
41
|
* level: property({ default: 0 }),
|
|
58
42
|
* turn: command({ args: ["by"] }),
|
|
59
43
|
* });
|
|
60
44
|
* ```
|
|
61
|
-
*
|
|
62
|
-
* Node types outside core are components (`component2d`), which do this for
|
|
63
|
-
* their `props` and `commands` themselves.
|
|
64
45
|
*/
|
|
65
46
|
export function declareMembers(ctor, members) {
|
|
66
47
|
for (const [key, register] of Object.entries(members)) {
|
|
@@ -68,21 +49,9 @@ export function declareMembers(ctor, members) {
|
|
|
68
49
|
}
|
|
69
50
|
}
|
|
70
51
|
/**
|
|
71
|
-
* Declares a property on a `Node` subclass
|
|
72
|
-
*
|
|
73
|
-
* inherited key overrides it; see {@link getPropertyMeta}.
|
|
74
|
-
*
|
|
75
|
-
* @example
|
|
76
|
-
* ```ts
|
|
77
|
-
* declareMembers(Glow, {
|
|
78
|
-
* radius: property({ default: 0 }),
|
|
79
|
-
* fill: property({ mapper: fillOps.resolve, tween: fillOps.lerp }),
|
|
80
|
-
* });
|
|
81
|
-
* ```
|
|
82
|
-
*
|
|
83
|
-
* The `default` value is used when the corresponding key is absent from the
|
|
84
|
-
* constructor `props` object. The `mapper` / `tween` options are forwarded
|
|
85
|
-
* directly to `applyProp()`.
|
|
52
|
+
* Declares a property on a `Node` subclass, applied to the prototype under the property's key (directly or through
|
|
53
|
+
* {@link declareMembers}). `default` is used when the key is absent from the constructor `props`; `mapper` / `tween`
|
|
54
|
+
* are forwarded to `applyProp()`. Redeclaring an inherited key overrides it; see {@link getPropertyMeta}.
|
|
86
55
|
*/
|
|
87
56
|
export function property(opts) {
|
|
88
57
|
return function (target, propertyKey) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorator.js","sourceRoot":"","sources":["../../../src/attributes/properties/decorator.ts"],"names":[],"mappings":"AA8DA,kEAAkE;AAClE,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC5C,OAAO,WAAW,CAAe,QAAQ,EAAE,aAAa,CAAC,CAAC;AAC9D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAA4B,QAAgB,EAAE,MAAc;IACnF,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAC5C,OAAO,KAAK,IAAI,KAAK,KAAK,MAAM,CAAC,SAAS,EAAE,CAAC;QACzC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACrB,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;IACD,MAAM,MAAM,GAAQ,EAAE,CAAC;IACvB,MAAM,EAAE,GAAG,IAAI,GAAG,EAAkB,CAAC;IACrC,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;QACpB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC;YAAE,SAAS;QAC/D,KAAK,MAAM,CAAC,IAAK,CAAyB,CAAC,MAAM,CAAC,EAAE,CAAC;YACjD,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;YACxB,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;gBAClB,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;gBAC7B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACnB,CAAC;iBAAM,CAAC;gBACJ,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;YAClB,CAAC;QACL,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AASD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,cAAc,CAC1B,IAAO,EACP,OAAuE;IAEvE,KAAK,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAmC,EAAE,CAAC;QACtF,QAAQ,CAAC,IAAI,CAAC,SAAmB,EAAE,GAAG,CAAC,CAAC;IAC5C,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,QAAQ,CAAuB,IAI7B;IACd,OAAO,UAAU,MAAc,EAAE,WAA4B;QACzD,MAAM,GAAG,GAAG,WAAqB,CAAC;QAClC,0EAA0E;QAC1E,wDAAwD;QACxD,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC;QACnE,MAAM,IAAI,GAAiB;YACvB,GAAG;YACH,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,CAAC,MAAM,IAAI,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC;gBACtC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAyC,EAAE,KAAK,EAAE,KAAiC,EAAE;gBACjG,CAAC,CAAC,SAAS;YACf,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAwB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAClF,CAAC;QAEF,yEAAyE;QACzE,iEAAiE;QACjE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,aAAa,CAAC,EAAE,CAAC;YAC9D,MAAc,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC;QACxC,CAAC;QACD,MAAM,IAAI,GAAoB,MAAc,CAAC,aAAa,CAAC,CAAC;QAC5D,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC;YACjC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;IACL,CAAC,CAAC;AACN,CAAC","sourcesContent":["import { TweenFn } from \"@/props/host\";\n\nexport interface PropOptions<Ext, Int> {\n /** Lerp the *internal* (post-mapper) value during `to()`. Each step is stored as it returns, not mapped again, so a prop that must hold a range under an overshooting ease clamps here too. */\n tween?: TweenFn<Int>;\n /** Converts the external input into the internal stored value. Receives the previous internal value as the second arg when available. */\n mapper?: (ext: Ext, prev?: Int) => Int;\n}\n\n\nexport interface PropertyMeta {\n key: string;\n default?: unknown;\n options?: PropOptions<any, any>;\n /** How a host edits this prop — see {@link PropertyEditor}. */\n editor?: PropertyEditor;\n /** @deprecated Nothing sets it: the engine withdraws no property. Kept so a host that tests it still compiles. */\n withdrawn?: boolean;\n}\n\n/**\n * What a host needs to draw a control for a property.\n *\n * Declared **on the property**, because that is the thing it edits. A node type\n * used to describe its controls in a separate list — a `fields` array beside the\n * class, or a manifest beside the package — and a list of props next to a class\n * of props is the shape that drifts: rename one and nothing says the other is\n * now describing something that no longer exists.\n *\n * Nothing here is read while rendering. A frame is identical whether a prop\n * declares a range or not; this exists so an editor has one place to ask.\n */\nexport interface PropertyEditor {\n /**\n * The control to draw. Inferred when absent — a typed entry knows its\n * own (`Types.color` is a colour), and a plain `property` reads it off\n * the default's type.\n */\n kind?: string;\n /** Bounds and granularity for a numeric control. */\n min?: number;\n max?: number;\n step?: number;\n /** What the number means, for a host that labels it — `\"°\"`, `\"s\"`, `\"×\"`. */\n unit?: string;\n /** The choices, for an enum. */\n options?: readonly string[];\n /** Whether a document may tween it. Defaults to true. */\n animatable?: boolean;\n /**\n * The controls *inside* an object-valued prop.\n *\n * An axis config or a theme is one property holding several editable values,\n * and a host draws them as a group. Declaring them here keeps them attached\n * to the prop they belong to rather than flattened into a list that has to\n * name its own parent.\n */\n properties?: Record<string, PropertyEditor>;\n /** Whatever a control needs that this vocabulary does not name. */\n [option: string]: unknown;\n}\n\n/** Symbol used to store property metadata on class prototypes. */\nexport const PROPERTY_META = Symbol(\"propertyMeta\");\n\n/**\n * Every `property` on an instance's class, inherited included, ordered base →\n * subclass so `initProps` applies them in declaration order. A subclass that\n * redeclares a key replaces the inherited declaration whole — default, mapper,\n * tween and editor — at the position the base gave it.\n */\nexport function getPropertyMeta(instance: object): PropertyMeta[] {\n return mostDerived<PropertyMeta>(instance, PROPERTY_META);\n}\n\n/**\n * The per-key declarations stored under `symbol` along `instance`'s prototype\n * chain: base first, one entry per key, the most-derived declaration of each.\n */\nexport function mostDerived<M extends { key: string }>(instance: object, symbol: symbol): M[] {\n const chain: object[] = [];\n let proto = Object.getPrototypeOf(instance);\n while (proto && proto !== Object.prototype) {\n chain.unshift(proto);\n proto = Object.getPrototypeOf(proto);\n }\n const result: M[] = [];\n const at = new Map<string, number>();\n for (const p of chain) {\n if (!Object.prototype.hasOwnProperty.call(p, symbol)) continue;\n for (const m of (p as Record<symbol, M[]>)[symbol]) {\n const i = at.get(m.key);\n if (i === undefined) {\n at.set(m.key, result.length);\n result.push(m);\n } else {\n result[i] = m;\n }\n }\n }\n return result;\n}\n\n/**\n * A registration for one member of a node class: what `property(...)` and\n * `command(...)` return, applied to the class's prototype under the member's\n * key by {@link declareMembers}.\n */\nexport type MemberRegistration = (target: object, key: string) => void;\n\n/**\n * Registers properties and commands on a node class, in the order given.\n *\n * Core's own base classes (`Node`, `Node2D`, `Node3D`, …) declare their props\n * as `declare` fields and register them here, right after the class body.\n * Order is meaningful: {@link getPropertyMeta} lists properties in\n * registration order, which is the order `Registry.describe` hands a host's\n * inspector, so a new entry goes where it should appear.\n *\n * @example\n * ```ts\n * class Dial extends Node2D<DialProps> {\n * declare level: number;\n * turn(args: CommandArgs<{ by: number }>) { … }\n * }\n * declareMembers(Dial, {\n * level: property({ default: 0 }),\n * turn: command({ args: [\"by\"] }),\n * });\n * ```\n *\n * Node types outside core are components (`component2d`), which do this for\n * their `props` and `commands` themselves.\n */\nexport function declareMembers<C extends abstract new (...args: never[]) => object>(\n ctor: C,\n members: { [K in keyof InstanceType<C> & string]?: MemberRegistration },\n): void {\n for (const [key, register] of Object.entries(members) as [string, MemberRegistration][]) {\n register(ctor.prototype as object, key);\n }\n}\n\n/**\n * Declares a property on a `Node` subclass: applied to the prototype under the\n * property's key, directly or through {@link declareMembers}. Redeclaring an\n * inherited key overrides it; see {@link getPropertyMeta}.\n *\n * @example\n * ```ts\n * declareMembers(Glow, {\n * radius: property({ default: 0 }),\n * fill: property({ mapper: fillOps.resolve, tween: fillOps.lerp }),\n * });\n * ```\n *\n * The `default` value is used when the corresponding key is absent from the\n * constructor `props` object. The `mapper` / `tween` options are forwarded\n * directly to `applyProp()`.\n */\nexport function property<Ext = any, Int = Ext>(opts?: {\n default?: Ext;\n mapper?: (ext: Ext, prev?: Int) => Int;\n tween?: TweenFn<Int>;\n} & PropertyEditor) {\n return function (target: object, propertyKey: string | symbol): void {\n const key = propertyKey as string;\n // `default`, `mapper` and `tween` drive the prop slot; everything else is\n // the editor's, and is carried rather than interpreted.\n const { default: fallback, mapper, tween, ...editor } = opts ?? {};\n const meta: PropertyMeta = {\n key,\n default: fallback,\n options: (mapper != null || tween != null)\n ? { mapper: mapper as ((ext: any) => any) | undefined, tween: tween as TweenFn<any> | undefined }\n : undefined,\n ...(Object.keys(editor).length > 0 ? { editor: editor as PropertyEditor } : {}),\n };\n\n // Store metadata on the class prototype (own property so getPropertyMeta\n // can distinguish each class's own entries from inherited ones).\n if (!Object.prototype.hasOwnProperty.call(target, PROPERTY_META)) {\n (target as any)[PROPERTY_META] = [];\n }\n const list: PropertyMeta[] = (target as any)[PROPERTY_META];\n if (!list.some(m => m.key === key)) {\n list.push(meta);\n }\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"decorator.js","sourceRoot":"","sources":["../../../src/attributes/properties/decorator.ts"],"names":[],"mappings":"AAqCA,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AAEpD,uPAAuP;AACvP,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC5C,OAAO,WAAW,CAAe,QAAQ,EAAE,aAAa,CAAC,CAAC;AAC9D,CAAC;AAED,yIAAyI;AACzI,MAAM,UAAU,WAAW,CAA4B,QAAgB,EAAE,MAAc;IACnF,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAC5C,OAAO,KAAK,IAAI,KAAK,KAAK,MAAM,CAAC,SAAS,EAAE,CAAC;QACzC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACrB,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;IACD,MAAM,MAAM,GAAQ,EAAE,CAAC;IACvB,MAAM,EAAE,GAAG,IAAI,GAAG,EAAkB,CAAC;IACrC,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;QACpB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC;YAAE,SAAS;QAC/D,KAAK,MAAM,CAAC,IAAK,CAAyB,CAAC,MAAM,CAAC,EAAE,CAAC;YACjD,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;YACxB,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;gBAClB,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;gBAC7B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACnB,CAAC;iBAAM,CAAC;gBACJ,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;YAClB,CAAC;QACL,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAKD;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,cAAc,CAC1B,IAAO,EACP,OAAuE;IAEvE,KAAK,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAmC,EAAE,CAAC;QACtF,QAAQ,CAAC,IAAI,CAAC,SAAmB,EAAE,GAAG,CAAC,CAAC;IAC5C,CAAC;AACL,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAuB,IAI7B;IACd,OAAO,UAAU,MAAc,EAAE,WAA4B;QACzD,MAAM,GAAG,GAAG,WAAqB,CAAC;QAClC,0EAA0E;QAC1E,wDAAwD;QACxD,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC;QACnE,MAAM,IAAI,GAAiB;YACvB,GAAG;YACH,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,CAAC,MAAM,IAAI,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC;gBACtC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAyC,EAAE,KAAK,EAAE,KAAiC,EAAE;gBACjG,CAAC,CAAC,SAAS;YACf,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAwB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAClF,CAAC;QAEF,yEAAyE;QACzE,iEAAiE;QACjE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,aAAa,CAAC,EAAE,CAAC;YAC9D,MAAc,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC;QACxC,CAAC;QACD,MAAM,IAAI,GAAoB,MAAc,CAAC,aAAa,CAAC,CAAC;QAC5D,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC;YACjC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;IACL,CAAC,CAAC;AACN,CAAC","sourcesContent":["import { TweenFn } from \"@/props/host\";\n\nexport interface PropOptions<Ext, Int> {\n /** Lerp the *internal* (post-mapper) value during `to()`. Each step is stored as it returns, not mapped again, so a prop that must hold a range under an overshooting ease clamps here too. */\n tween?: TweenFn<Int>;\n /** Converts the external input into the internal stored value. Receives the previous internal value as the second arg when available. */\n mapper?: (ext: Ext, prev?: Int) => Int;\n}\n\n\nexport interface PropertyMeta {\n key: string;\n default?: unknown;\n options?: PropOptions<any, any>;\n /** How a host edits this prop — see {@link PropertyEditor}. */\n editor?: PropertyEditor;\n}\n\n/** What a host needs to draw a control for a property. Declared **on the property**, not in a separate `fields` list beside the class, which drifts when one is renamed. Nothing here is read while rendering. */\nexport interface PropertyEditor {\n /** The control to draw; inferred when absent (a typed entry knows its own, a plain `property` reads the default's type). */\n kind?: string;\n /** Bounds and granularity for a numeric control. */\n min?: number;\n max?: number;\n step?: number;\n /** What the number means, for a host that labels it — `\"°\"`, `\"s\"`, `\"×\"`. */\n unit?: string;\n options?: readonly string[];\n /** Whether a document may tween it. Defaults to true. */\n animatable?: boolean;\n /** The controls *inside* an object-valued prop (an axis config, a theme), drawn as a group and kept attached to their parent prop. */\n properties?: Record<string, PropertyEditor>;\n /** Whatever a control needs that this vocabulary does not name. */\n [option: string]: unknown;\n}\n\nexport const PROPERTY_META = Symbol(\"propertyMeta\");\n\n/** Every `property` on an instance's class, inherited included, ordered base -> subclass so `initProps` applies them in declaration order. A subclass redeclaring a key replaces the inherited declaration whole, at the position the base gave it. */\nexport function getPropertyMeta(instance: object): PropertyMeta[] {\n return mostDerived<PropertyMeta>(instance, PROPERTY_META);\n}\n\n/** The per-key declarations stored under `symbol` along the prototype chain: base first, one entry per key, the most-derived of each. */\nexport function mostDerived<M extends { key: string }>(instance: object, symbol: symbol): M[] {\n const chain: object[] = [];\n let proto = Object.getPrototypeOf(instance);\n while (proto && proto !== Object.prototype) {\n chain.unshift(proto);\n proto = Object.getPrototypeOf(proto);\n }\n const result: M[] = [];\n const at = new Map<string, number>();\n for (const p of chain) {\n if (!Object.prototype.hasOwnProperty.call(p, symbol)) continue;\n for (const m of (p as Record<symbol, M[]>)[symbol]) {\n const i = at.get(m.key);\n if (i === undefined) {\n at.set(m.key, result.length);\n result.push(m);\n } else {\n result[i] = m;\n }\n }\n }\n return result;\n}\n\n/** A registration for one member of a node class, applied to the prototype under the member's key by {@link declareMembers}. */\nexport type MemberRegistration = (target: object, key: string) => void;\n\n/**\n * Registers properties and commands on a node class, in the order given. Core's own base classes declare their props\n * as `declare` fields and register them here, right after the class body. Order is meaningful: {@link getPropertyMeta}\n * lists properties in registration order, which is the order `Registry.describe` hands a host's inspector. Node types\n * outside core are components (`component2d`), which do this themselves.\n *\n * @example\n * ```ts\n * declareMembers(Dial, {\n * level: property({ default: 0 }),\n * turn: command({ args: [\"by\"] }),\n * });\n * ```\n */\nexport function declareMembers<C extends abstract new (...args: never[]) => object>(\n ctor: C,\n members: { [K in keyof InstanceType<C> & string]?: MemberRegistration },\n): void {\n for (const [key, register] of Object.entries(members) as [string, MemberRegistration][]) {\n register(ctor.prototype as object, key);\n }\n}\n\n/**\n * Declares a property on a `Node` subclass, applied to the prototype under the property's key (directly or through\n * {@link declareMembers}). `default` is used when the key is absent from the constructor `props`; `mapper` / `tween`\n * are forwarded to `applyProp()`. Redeclaring an inherited key overrides it; see {@link getPropertyMeta}.\n */\nexport function property<Ext = any, Int = Ext>(opts?: {\n default?: Ext;\n mapper?: (ext: Ext, prev?: Int) => Int;\n tween?: TweenFn<Int>;\n} & PropertyEditor) {\n return function (target: object, propertyKey: string | symbol): void {\n const key = propertyKey as string;\n // `default`, `mapper` and `tween` drive the prop slot; everything else is\n // the editor's, and is carried rather than interpreted.\n const { default: fallback, mapper, tween, ...editor } = opts ?? {};\n const meta: PropertyMeta = {\n key,\n default: fallback,\n options: (mapper != null || tween != null)\n ? { mapper: mapper as ((ext: any) => any) | undefined, tween: tween as TweenFn<any> | undefined }\n : undefined,\n ...(Object.keys(editor).length > 0 ? { editor: editor as PropertyEditor } : {}),\n };\n\n // Store metadata on the class prototype (own property so getPropertyMeta\n // can distinguish each class's own entries from inherited ones).\n if (!Object.prototype.hasOwnProperty.call(target, PROPERTY_META)) {\n (target as any)[PROPERTY_META] = [];\n }\n const list: PropertyMeta[] = (target as any)[PROPERTY_META];\n if (!list.some(m => m.key === key)) {\n list.push(meta);\n }\n };\n}\n"]}
|
|
@@ -11,80 +11,41 @@ import { type AudioEffectsInput } from "../../attributes/audio/effects/chain.js"
|
|
|
11
11
|
import { AudioEffect } from "../../attributes/audio/effects/union.js";
|
|
12
12
|
import { type Param } from "../../attributes/audio/ramp.js";
|
|
13
13
|
import { type Quaternion } from "../../render3d/vector3.js";
|
|
14
|
-
/**
|
|
15
|
-
* Attribute-typed variants of `property`, for the props the tree bases declare
|
|
16
|
-
* themselves (`Node2D`, `Node3D`, `NodeAudio`, the root `Canvas2D`).
|
|
17
|
-
*
|
|
18
|
-
* A rich attribute (a fill, an effect chain, an inset) is only declarative and
|
|
19
|
-
* tweenable because its `property` carries the matching *mapper* (loose author
|
|
20
|
-
* input → resolved value) and *tween* (how the resolved value interpolates) —
|
|
21
|
-
* together, an `AttributeOps` (`attributes/shared/operators.ts`). These pre-bake
|
|
22
|
-
* each pair: `fillProperty()` is exactly
|
|
23
|
-
* `property({ default: [], mapper: fillOps.resolve, tween: fillOps.lerp, kind: "fills" })`.
|
|
24
|
-
* A component declares the same pairs as state entries (`Types.fill`, …).
|
|
25
|
-
*/
|
|
14
|
+
/** Attribute-typed variants of `property` for the props the tree bases declare themselves. A rich attribute is only declarative and tweenable because its `property` carries the matching *mapper* (loose input → resolved) and *tween*, together an `AttributeOps`; these pre-bake each pair (`fillProperty()` is `property({ default: [], mapper: fillOps.resolve, tween: fillOps.lerp, kind: "fills" })`). */
|
|
26
15
|
interface AttributePropOptions<Ext, Int> {
|
|
27
|
-
/** Initial value, used when the constructor `props` object omits the key. */
|
|
28
16
|
default?: Ext;
|
|
29
|
-
/** Override the attribute's built-in external → internal mapper. */
|
|
30
17
|
mapper?: (ext: Ext, prev?: Int) => Int;
|
|
31
|
-
/** Override the attribute's built-in lerp for `to()`. */
|
|
32
18
|
tween?: TweenFn<Int>;
|
|
33
19
|
}
|
|
34
20
|
/** A fill-layer property: a CSS string, a fill prop object, a `Fills` chain, or an array of them, lerped layer by layer. */
|
|
35
21
|
export declare const fillProperty: (opts?: (AttributePropOptions<Fill, FillResolved[]> & {
|
|
36
22
|
kind?: string;
|
|
37
23
|
}) | undefined) => (target: object, propertyKey: string | symbol) => void;
|
|
38
|
-
/** An effect-chain property — the `effects` prop's op set. */
|
|
39
24
|
export declare const effectsProperty: (opts?: (AttributePropOptions<Effect, NodeEffect[]> & {
|
|
40
25
|
kind?: string;
|
|
41
26
|
}) | undefined) => (target: object, propertyKey: string | symbol) => void;
|
|
42
|
-
/** An edge-inset property: scalar, symmetric or per-edge, tweened per edge. */
|
|
43
27
|
export declare const insetsProperty: (opts?: (AttributePropOptions<Insets, InsetsResolved> & {
|
|
44
28
|
kind?: string;
|
|
45
29
|
}) | undefined) => (target: object, propertyKey: string | symbol) => void;
|
|
46
|
-
/**
|
|
47
|
-
* An alignment property: a named position (`'center'`, `'topLeft'`, …) resolved
|
|
48
|
-
* to a per-axis {@link Vector2} in `[-1, 1]`, tweened as a vector so
|
|
49
|
-
* `'centerLeft' → 'centerRight'` slides.
|
|
50
|
-
*/
|
|
30
|
+
/** A named position (`'center'`, …) resolved to a {@link Vector2} in `[-1, 1]` and tweened as a vector, so `'centerLeft' → 'centerRight'` slides. */
|
|
51
31
|
export declare const alignmentProperty: (opts?: (AttributePropOptions<Alignment, Vector2> & {
|
|
52
32
|
kind?: string;
|
|
53
33
|
}) | undefined) => (target: object, propertyKey: string | symbol) => void;
|
|
54
|
-
/**
|
|
55
|
-
* A layout-mode property. Mid-tween it holds both modes and how far along, so
|
|
56
|
-
* restoring the prop — which is what a seek does — restores the blend with it.
|
|
57
|
-
*/
|
|
34
|
+
/** Mid-tween it holds both modes and how far along, so a seek restoring the prop restores the blend. */
|
|
58
35
|
export declare const flowProperty: (opts?: (AttributePropOptions<FlowMode, FlowResolved> & {
|
|
59
36
|
kind?: string;
|
|
60
37
|
}) | undefined) => (target: object, propertyKey: string | symbol) => void;
|
|
61
|
-
/**
|
|
62
|
-
* A 3D point that may be unset: a node's `lookAt`. It defaults to unset (not to
|
|
63
|
-
* the origin), stays unset when a binding returns `undefined`, and tweens with
|
|
64
|
-
* `to()` — from `unset`'s reading of an unset start (see {@link lerpOptionalVector3}).
|
|
65
|
-
*/
|
|
38
|
+
/** A 3D point that may be unset (a node's `lookAt`): defaults to unset rather than the origin, stays unset when a binding returns `undefined`, and tweens from `unset`'s reading of an unset start (see {@link lerpOptionalVector3}). */
|
|
66
39
|
export declare function optionalVector3Property(unset: "origin" | "snap"): (target: object, propertyKey: string | symbol) => void;
|
|
67
40
|
/** A rotation as a unit quaternion, interpolated with shortest-arc slerp. */
|
|
68
41
|
export declare const quaternionProperty: (opts?: (AttributePropOptions<Quaternion, Quaternion> & {
|
|
69
42
|
kind?: string;
|
|
70
43
|
}) | undefined) => (target: object, propertyKey: string | symbol) => void;
|
|
71
|
-
/**
|
|
72
|
-
* An audio level — a gain, a pan position, anything a clip or a bus schedules.
|
|
73
|
-
*
|
|
74
|
-
* `Param`, not `number`, because an `AudioRequest` is a schedule record built
|
|
75
|
-
* once during precomp: a per-frame prop write would be read on whichever frame
|
|
76
|
-
* happened to create the request and then never again. A `Ramp` *is* the
|
|
77
|
-
* automation lane, which is why the tween interpolates between whole ramps.
|
|
78
|
-
*/
|
|
44
|
+
/** An audio level (gain, pan). A `Param`, not a `number`, because an `AudioRequest` is a schedule record built once during precomp: a per-frame prop write would be read on one frame and never again. A `Ramp` *is* the automation lane, so the tween interpolates whole ramps. */
|
|
79
45
|
export declare const audioParamProperty: (opts?: (AttributePropOptions<Param, Param> & {
|
|
80
46
|
kind?: string;
|
|
81
47
|
}) | undefined) => (target: object, propertyKey: string | symbol) => void;
|
|
82
|
-
/**
|
|
83
|
-
* An audio effect chain — the `effects` prop's op set.
|
|
84
|
-
*
|
|
85
|
-
* Without it a chain is an object-valued prop, and `Node._prepareStep` drops
|
|
86
|
-
* those silently: the tween would run its duration and write nothing.
|
|
87
|
-
*/
|
|
48
|
+
/** An audio effect chain. Without it the chain is an object-valued prop and `Node._prepareStep` silently drops those: the tween would run its duration and write nothing. */
|
|
88
49
|
export declare const audioEffectsProperty: (opts?: (AttributePropOptions<AudioEffectsInput, AudioEffect[]> & {
|
|
89
50
|
kind?: string;
|
|
90
51
|
}) | undefined) => (target: object, propertyKey: string | symbol) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typed.d.ts","sourceRoot":"","sources":["../../../src/attributes/properties/typed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAG7D,OAAO,EAAE,KAAK,MAAM,EAAc,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D,OAAO,EAAE,MAAM,EAAE,cAAc,EAAa,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAgB,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEtD,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE7D,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE1E,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,KAAK,KAAK,EAAiB,MAAM,yBAAyB,CAAC;AAEpE,OAAO,EAEH,KAAK,UAAU,EAClB,MAAM,oBAAoB,CAAC;AAE5B
|
|
1
|
+
{"version":3,"file":"typed.d.ts","sourceRoot":"","sources":["../../../src/attributes/properties/typed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAG7D,OAAO,EAAE,KAAK,MAAM,EAAc,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D,OAAO,EAAE,MAAM,EAAE,cAAc,EAAa,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAgB,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEtD,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE7D,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE1E,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,KAAK,KAAK,EAAiB,MAAM,yBAAyB,CAAC;AAEpE,OAAO,EAEH,KAAK,UAAU,EAClB,MAAM,oBAAoB,CAAC;AAE5B,iZAAiZ;AACjZ,UAAU,oBAAoB,CAAC,GAAG,EAAE,GAAG;IACnC,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,GAAG,CAAC;IACvC,KAAK,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;CACxB;AAmBD,4HAA4H;AAC5H,eAAO,MAAM,YAAY;WAVoC,MAAM;yEAUkD,CAAC;AAEtH,eAAO,MAAM,eAAe;WAZiC,MAAM;yEAY6D,CAAC;AAEjI,eAAO,MAAM,cAAc;WAdkC,MAAM;yEAc0D,CAAC;AAE9H,qJAAqJ;AACrJ,eAAO,MAAM,iBAAiB;WAjB+B,MAAM;yEAiByE,CAAC;AAE7I,wGAAwG;AACxG,eAAO,MAAM,YAAY;WApBoC,MAAM;yEAoB6C,CAAC;AAEjH,yOAAyO;AACzO,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,0DAO/D;AAED,6EAA6E;AAC7E,eAAO,MAAM,kBAAkB;WAjC8B,MAAM;yEAmClE,CAAC;AAEF,oRAAoR;AACpR,eAAO,MAAM,kBAAkB;WAtC8B,MAAM;yEAsCoD,CAAC;AAExH,6KAA6K;AAC7K,eAAO,MAAM,oBAAoB;WAzC4B,MAAM;yEA2ClE,CAAC"}
|
|
@@ -7,13 +7,7 @@ import { flowOps } from "../../layout/ops.js";
|
|
|
7
7
|
import { audioEffectsOps } from "../../attributes/audio/effects/registry.js";
|
|
8
8
|
import { audioParamOps } from "../../attributes/audio/ramp.js";
|
|
9
9
|
import { quaternionOps, lerpOptionalVector3, resolveOptionalVector3, } from "../../render3d/vector3.js";
|
|
10
|
-
/**
|
|
11
|
-
* Build one attribute-typed `property` from its canonical {@link AttributeOps}.
|
|
12
|
-
*
|
|
13
|
-
* `fallback` is a factory rather than a value so array/object defaults aren't a
|
|
14
|
-
* single instance shared by every property declared through it. An **explicit**
|
|
15
|
-
* `default: undefined` means "this prop has no default" and is honoured as such.
|
|
16
|
-
*/
|
|
10
|
+
/** Builds one attribute-typed `property` from its {@link AttributeOps}. `fallback` is a factory so array/object defaults aren't one instance shared by every property; an **explicit** `default: undefined` means "no default" and is honoured. */
|
|
17
11
|
function attributeProperty(fallback, mapper, tween,
|
|
18
12
|
/** The control a host draws for this attribute, when it is not the default. */
|
|
19
13
|
kind) {
|
|
@@ -26,26 +20,13 @@ kind) {
|
|
|
26
20
|
}
|
|
27
21
|
/** A fill-layer property: a CSS string, a fill prop object, a `Fills` chain, or an array of them, lerped layer by layer. */
|
|
28
22
|
export const fillProperty = attributeProperty(() => [], fillOps.resolve, fillOps.lerp, "fills");
|
|
29
|
-
/** An effect-chain property — the `effects` prop's op set. */
|
|
30
23
|
export const effectsProperty = attributeProperty(() => [], effectsOps.resolve, effectsOps.lerp, "effects");
|
|
31
|
-
/** An edge-inset property: scalar, symmetric or per-edge, tweened per edge. */
|
|
32
24
|
export const insetsProperty = attributeProperty(() => 0, insetsOps.resolve, insetsOps.lerp, "insets");
|
|
33
|
-
/**
|
|
34
|
-
* An alignment property: a named position (`'center'`, `'topLeft'`, …) resolved
|
|
35
|
-
* to a per-axis {@link Vector2} in `[-1, 1]`, tweened as a vector so
|
|
36
|
-
* `'centerLeft' → 'centerRight'` slides.
|
|
37
|
-
*/
|
|
25
|
+
/** A named position (`'center'`, …) resolved to a {@link Vector2} in `[-1, 1]` and tweened as a vector, so `'centerLeft' → 'centerRight'` slides. */
|
|
38
26
|
export const alignmentProperty = attributeProperty(() => "center", alignmentOps.resolve, alignmentOps.lerp, "alignment");
|
|
39
|
-
/**
|
|
40
|
-
* A layout-mode property. Mid-tween it holds both modes and how far along, so
|
|
41
|
-
* restoring the prop — which is what a seek does — restores the blend with it.
|
|
42
|
-
*/
|
|
27
|
+
/** Mid-tween it holds both modes and how far along, so a seek restoring the prop restores the blend. */
|
|
43
28
|
export const flowProperty = attributeProperty(() => "freeform", undefined, flowOps.lerp);
|
|
44
|
-
/**
|
|
45
|
-
* A 3D point that may be unset: a node's `lookAt`. It defaults to unset (not to
|
|
46
|
-
* the origin), stays unset when a binding returns `undefined`, and tweens with
|
|
47
|
-
* `to()` — from `unset`'s reading of an unset start (see {@link lerpOptionalVector3}).
|
|
48
|
-
*/
|
|
29
|
+
/** A 3D point that may be unset (a node's `lookAt`): defaults to unset rather than the origin, stays unset when a binding returns `undefined`, and tweens from `unset`'s reading of an unset start (see {@link lerpOptionalVector3}). */
|
|
49
30
|
export function optionalVector3Property(unset) {
|
|
50
31
|
return property({
|
|
51
32
|
default: undefined,
|
|
@@ -56,20 +37,8 @@ export function optionalVector3Property(unset) {
|
|
|
56
37
|
}
|
|
57
38
|
/** A rotation as a unit quaternion, interpolated with shortest-arc slerp. */
|
|
58
39
|
export const quaternionProperty = attributeProperty(() => ({ x: 0, y: 0, z: 0, w: 1 }), undefined, quaternionOps.lerp, "quaternion");
|
|
59
|
-
/**
|
|
60
|
-
* An audio level — a gain, a pan position, anything a clip or a bus schedules.
|
|
61
|
-
*
|
|
62
|
-
* `Param`, not `number`, because an `AudioRequest` is a schedule record built
|
|
63
|
-
* once during precomp: a per-frame prop write would be read on whichever frame
|
|
64
|
-
* happened to create the request and then never again. A `Ramp` *is* the
|
|
65
|
-
* automation lane, which is why the tween interpolates between whole ramps.
|
|
66
|
-
*/
|
|
40
|
+
/** An audio level (gain, pan). A `Param`, not a `number`, because an `AudioRequest` is a schedule record built once during precomp: a per-frame prop write would be read on one frame and never again. A `Ramp` *is* the automation lane, so the tween interpolates whole ramps. */
|
|
67
41
|
export const audioParamProperty = attributeProperty(() => 0, undefined, audioParamOps.lerp, "audioParam");
|
|
68
|
-
/**
|
|
69
|
-
* An audio effect chain — the `effects` prop's op set.
|
|
70
|
-
*
|
|
71
|
-
* Without it a chain is an object-valued prop, and `Node._prepareStep` drops
|
|
72
|
-
* those silently: the tween would run its duration and write nothing.
|
|
73
|
-
*/
|
|
42
|
+
/** An audio effect chain. Without it the chain is an object-valued prop and `Node._prepareStep` silently drops those: the tween would run its duration and write nothing. */
|
|
74
43
|
export const audioEffectsProperty = attributeProperty(() => [], audioEffectsOps.resolve, audioEffectsOps.lerp, "audioEffects");
|
|
75
44
|
//# sourceMappingURL=typed.js.map
|