@motionscript/core 0.1.0-alpha.3 → 0.1.0-alpha.6
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 +247 -0
- package/LICENSE +201 -201
- package/NOTICE +48 -0
- package/README.md +93 -72
- package/dist/assets/asset-index.js.map +1 -1
- package/dist/assets/catalog.d.ts +9 -0
- package/dist/assets/catalog.d.ts.map +1 -1
- package/dist/assets/catalog.js +11 -0
- package/dist/assets/catalog.js.map +1 -1
- package/dist/assets/errors.d.ts.map +1 -1
- package/dist/assets/errors.js +8 -3
- package/dist/assets/errors.js.map +1 -1
- package/dist/assets/index.js.map +1 -1
- package/dist/assets/manager.d.ts +26 -1
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/assets/manager.js +79 -4
- package/dist/assets/manager.js.map +1 -1
- package/dist/assets/manifest.js.map +1 -1
- package/dist/assets/record.js.map +1 -1
- package/dist/assets/scope.d.ts +3 -3
- package/dist/assets/scope.d.ts.map +1 -1
- package/dist/assets/scope.js.map +1 -1
- package/dist/attributes/audio/filters/chain.d.ts +1 -1
- package/dist/attributes/audio/filters/chain.js.map +1 -1
- package/dist/attributes/audio/filters/curve.d.ts +8 -8
- package/dist/attributes/audio/filters/curve.d.ts.map +1 -1
- package/dist/attributes/audio/filters/curve.js +20 -19
- package/dist/attributes/audio/filters/curve.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/echo.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/gain.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/highpass.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/lowpass.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/speed.d.ts +2 -2
- package/dist/attributes/audio/filters/implementations/speed.js.map +1 -1
- package/dist/attributes/audio/filters/implementations/tremolo.js.map +1 -1
- package/dist/attributes/audio/filters/index.d.ts +1 -1
- package/dist/attributes/audio/filters/index.d.ts.map +1 -1
- package/dist/attributes/audio/filters/index.js +1 -1
- package/dist/attributes/audio/filters/index.js.map +1 -1
- package/dist/attributes/audio/filters/registry.js.map +1 -1
- package/dist/attributes/audio/filters/union.js.map +1 -1
- package/dist/attributes/audio/request.d.ts +17 -2
- package/dist/attributes/audio/request.d.ts.map +1 -1
- package/dist/attributes/audio/request.js.map +1 -1
- package/dist/attributes/audio/schedule.d.ts +4 -2
- package/dist/attributes/audio/schedule.d.ts.map +1 -1
- package/dist/attributes/audio/schedule.js +15 -8
- package/dist/attributes/audio/schedule.js.map +1 -1
- package/dist/attributes/audio/sound.d.ts +4 -2
- package/dist/attributes/audio/sound.d.ts.map +1 -1
- package/dist/attributes/audio/sound.js +8 -4
- package/dist/attributes/audio/sound.js.map +1 -1
- package/dist/attributes/index.js.map +1 -1
- package/dist/attributes/layout/alignment.js +1 -1
- package/dist/attributes/layout/alignment.js.map +1 -1
- package/dist/attributes/layout/index.js.map +1 -1
- package/dist/attributes/layout/insets.js.map +1 -1
- package/dist/attributes/layout/matrix2d.js.map +1 -1
- package/dist/attributes/layout/size.js.map +1 -1
- package/dist/attributes/layout/transform3d.js.map +1 -1
- package/dist/attributes/layout/vector2.js.map +1 -1
- package/dist/attributes/layout/world-transform.js.map +1 -1
- package/dist/attributes/mask/boolean.js.map +1 -1
- package/dist/attributes/mask/mask.js.map +1 -1
- package/dist/attributes/properties/decorator.d.ts +3 -1
- package/dist/attributes/properties/decorator.d.ts.map +1 -1
- package/dist/attributes/properties/decorator.js.map +1 -1
- package/dist/attributes/properties/inputs.js.map +1 -1
- package/dist/attributes/properties/typed.d.ts +9 -2
- package/dist/attributes/properties/typed.d.ts.map +1 -1
- package/dist/attributes/properties/typed.js +15 -1
- package/dist/attributes/properties/typed.js.map +1 -1
- package/dist/attributes/render3d/orbit.d.ts +8 -8
- package/dist/attributes/render3d/orbit.js +7 -7
- package/dist/attributes/render3d/orbit.js.map +1 -1
- package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
- package/dist/attributes/shape/corners/corner-style.js.map +1 -1
- package/dist/attributes/shape/corners/corners.js.map +1 -1
- package/dist/attributes/shape/corners/index.js.map +1 -1
- package/dist/attributes/shape/effects/backdrop.d.ts +4 -4
- package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
- package/dist/attributes/shape/effects/backdrop.js.map +1 -1
- package/dist/attributes/shape/effects/chain.d.ts +28 -120
- package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
- package/dist/attributes/shape/effects/chain.js +16 -88
- package/dist/attributes/shape/effects/chain.js.map +1 -1
- package/dist/attributes/shape/effects/effect-data.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +2 -2
- package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -1
- package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.d.ts +15 -24
- package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/lut.d.ts +1 -1
- package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
- package/dist/attributes/shape/effects/implementations/shader.js +15 -8
- package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
- package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
- package/dist/attributes/shape/effects/index.d.ts +2 -6
- package/dist/attributes/shape/effects/index.d.ts.map +1 -1
- package/dist/attributes/shape/effects/index.js.map +1 -1
- package/dist/attributes/shape/effects/registry.d.ts +23 -6
- package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
- package/dist/attributes/shape/effects/registry.js +44 -10
- package/dist/attributes/shape/effects/registry.js.map +1 -1
- package/dist/attributes/shape/effects/union.d.ts +2 -6
- package/dist/attributes/shape/effects/union.d.ts.map +1 -1
- package/dist/attributes/shape/effects/union.js.map +1 -1
- package/dist/attributes/shape/fill/blend.js.map +1 -1
- package/dist/attributes/shape/fill/chain.js.map +1 -1
- package/dist/attributes/shape/fill/coerce.js.map +1 -1
- package/dist/attributes/shape/fill/color/constants.js.map +1 -1
- package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
- package/dist/attributes/shape/fill/color/parser.js +81 -44
- package/dist/attributes/shape/fill/color/parser.js.map +1 -1
- package/dist/attributes/shape/fill/gradient-stops.d.ts +16 -0
- package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -0
- package/dist/attributes/shape/fill/gradient-stops.js +65 -0
- package/dist/attributes/shape/fill/gradient-stops.js.map +1 -0
- package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/color.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/conic-gradient.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/conic-gradient.js +2 -5
- package/dist/attributes/shape/fill/implementations/conic-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/fractal-noise.js +2 -10
- package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/image.js +5 -4
- package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/linear-gradient.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/linear-gradient.js +2 -6
- package/dist/attributes/shape/fill/implementations/linear-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/radial-gradient.d.ts.map +1 -1
- package/dist/attributes/shape/fill/implementations/radial-gradient.js +2 -5
- package/dist/attributes/shape/fill/implementations/radial-gradient.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/stripe.js.map +1 -1
- package/dist/attributes/shape/fill/implementations/video.js +1 -1
- package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
- package/dist/attributes/shape/fill/index.js.map +1 -1
- package/dist/attributes/shape/fill/lerp.js.map +1 -1
- package/dist/attributes/shape/fill/media-preset.js.map +1 -1
- package/dist/attributes/shape/fill/registry.js.map +1 -1
- package/dist/attributes/shape/fill/union.js.map +1 -1
- package/dist/attributes/shape/filters/chain.d.ts +4 -10
- package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
- package/dist/attributes/shape/filters/chain.js +1 -13
- package/dist/attributes/shape/filters/chain.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/alpha.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/blur.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-adjustment.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/exposure.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/grayscale.js.map +1 -1
- package/dist/attributes/shape/filters/implementations/posterize-time.js.map +1 -1
- package/dist/attributes/shape/filters/index.d.ts +1 -1
- package/dist/attributes/shape/filters/index.js.map +1 -1
- package/dist/attributes/shape/filters/registry.d.ts +2 -2
- package/dist/attributes/shape/filters/registry.js +3 -3
- package/dist/attributes/shape/filters/registry.js.map +1 -1
- package/dist/attributes/shape/filters/union.d.ts +6 -7
- package/dist/attributes/shape/filters/union.d.ts.map +1 -1
- package/dist/attributes/shape/filters/union.js.map +1 -1
- package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
- package/dist/attributes/shape/path/anchors.js +12 -5
- package/dist/attributes/shape/path/anchors.js.map +1 -1
- package/dist/attributes/shape/path/bezier.js.map +1 -1
- package/dist/attributes/shape/path/index.js.map +1 -1
- package/dist/attributes/shape/path/measure.js.map +1 -1
- package/dist/attributes/shape/path/morph.d.ts.map +1 -1
- package/dist/attributes/shape/path/morph.js +16 -4
- package/dist/attributes/shape/path/morph.js.map +1 -1
- package/dist/attributes/shape/path/ops.js.map +1 -1
- package/dist/attributes/shape/path/types.js.map +1 -1
- package/dist/attributes/shape/path/walk.js.map +1 -1
- package/dist/attributes/shape/shaders/index.js.map +1 -1
- package/dist/attributes/shape/shaders/pack.js.map +1 -1
- package/dist/attributes/shape/shaders/resolve.js.map +1 -1
- package/dist/attributes/shape/shadow/index.js.map +1 -1
- package/dist/attributes/shape/shadow/shadow.js.map +1 -1
- package/dist/attributes/shape/stroke/index.d.ts +2 -2
- package/dist/attributes/shape/stroke/index.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/index.js +1 -1
- package/dist/attributes/shape/stroke/index.js.map +1 -1
- package/dist/attributes/shape/stroke/stroke.d.ts +27 -6
- package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
- package/dist/attributes/shape/stroke/stroke.js +22 -2
- package/dist/attributes/shape/stroke/stroke.js.map +1 -1
- package/dist/attributes/shared/operators.js.map +1 -1
- package/dist/attributes/text/index.js.map +1 -1
- package/dist/attributes/text/ops.d.ts +6 -0
- package/dist/attributes/text/ops.d.ts.map +1 -1
- package/dist/attributes/text/ops.js +1 -0
- package/dist/attributes/text/ops.js.map +1 -1
- package/dist/attributes/text/types.js.map +1 -1
- package/dist/browser/chunks/chunk-2RIYH36X.js +3 -0
- package/dist/browser/chunks/chunk-2RIYH36X.js.map +7 -0
- package/dist/browser/chunks/chunk-DDJN3QII.js +15 -0
- package/dist/browser/chunks/chunk-DDJN3QII.js.map +7 -0
- package/dist/browser/chunks/chunk-DHB4COFY.js +2 -0
- package/dist/browser/chunks/chunk-DHB4COFY.js.map +7 -0
- package/dist/browser/chunks/chunk-EJDPYDQI.js +5 -0
- package/dist/browser/chunks/chunk-EJDPYDQI.js.map +7 -0
- package/dist/browser/chunks/chunk-SFNJRPBV.js +2 -0
- package/dist/browser/chunks/chunk-SFNJRPBV.js.map +7 -0
- package/dist/browser/chunks/chunk-XAWE4EAK.js +2 -0
- package/dist/browser/chunks/chunk-XAWE4EAK.js.map +7 -0
- package/dist/browser/component.js +1 -1
- package/dist/browser/component.js.map +4 -4
- package/dist/browser/experimental.js +2 -0
- package/dist/browser/experimental.js.map +7 -0
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/browser/jsx-jsx-dev-runtime.js +1 -1
- package/dist/browser/jsx-jsx-runtime.js +1 -1
- package/dist/browser/manifest.json +4 -2
- package/dist/browser/sdk.js +1 -1
- package/dist/component/api.d.ts +508 -0
- package/dist/component/api.d.ts.map +1 -0
- package/dist/component/api.js +4 -0
- package/dist/component/api.js.map +1 -0
- package/dist/component/builtins/audio.d.ts +26 -0
- package/dist/component/builtins/audio.d.ts.map +1 -0
- package/dist/component/builtins/audio.js +41 -0
- package/dist/component/builtins/audio.js.map +1 -0
- package/dist/component/builtins/canvas3d.d.ts +98 -0
- package/dist/component/builtins/canvas3d.d.ts.map +1 -0
- package/dist/component/builtins/canvas3d.js +21 -0
- package/dist/component/builtins/canvas3d.js.map +1 -0
- package/dist/component/builtins/composite.d.ts +56 -0
- package/dist/component/builtins/composite.d.ts.map +1 -0
- package/dist/component/builtins/composite.js +25 -0
- package/dist/component/builtins/composite.js.map +1 -0
- package/dist/component/builtins/geometry.d.ts +505 -0
- package/dist/component/builtins/geometry.d.ts.map +1 -0
- package/dist/component/builtins/geometry.js +107 -0
- package/dist/component/builtins/geometry.js.map +1 -0
- package/dist/component/builtins/layout.d.ts +88 -0
- package/dist/component/builtins/layout.d.ts.map +1 -0
- package/dist/component/builtins/layout.js +84 -0
- package/dist/component/builtins/layout.js.map +1 -0
- package/dist/component/builtins/media.d.ts +95 -0
- package/dist/component/builtins/media.d.ts.map +1 -0
- package/dist/component/builtins/media.js +149 -0
- package/dist/component/builtins/media.js.map +1 -0
- package/dist/component/builtins/providers.d.ts +23 -0
- package/dist/component/builtins/providers.d.ts.map +1 -0
- package/dist/component/builtins/providers.js +30 -0
- package/dist/component/builtins/providers.js.map +1 -0
- package/dist/component/builtins/text.d.ts +193 -0
- package/dist/component/builtins/text.d.ts.map +1 -0
- package/dist/component/builtins/text.js +113 -0
- package/dist/component/builtins/text.js.map +1 -0
- package/dist/component/builtins/three.d.ts +1085 -0
- package/dist/component/builtins/three.d.ts.map +1 -0
- package/dist/component/builtins/three.js +265 -0
- package/dist/component/builtins/three.js.map +1 -0
- package/dist/component/clip-of.d.ts +5 -0
- package/dist/component/clip-of.d.ts.map +1 -0
- package/dist/component/clip-of.js +33 -0
- package/dist/component/clip-of.js.map +1 -0
- package/dist/component/commands-for.d.ts +19 -0
- package/dist/component/commands-for.d.ts.map +1 -0
- package/dist/component/commands-for.js +5 -0
- package/dist/component/commands-for.js.map +1 -0
- package/dist/component/component-audio.d.ts +9 -0
- package/dist/component/component-audio.d.ts.map +1 -0
- package/dist/component/component-audio.js +18 -0
- package/dist/component/component-audio.js.map +1 -0
- package/dist/component/component2d.d.ts +9 -0
- package/dist/component/component2d.d.ts.map +1 -0
- package/dist/component/component2d.js +239 -0
- package/dist/component/component2d.js.map +1 -0
- package/dist/component/component3d.d.ts +9 -0
- package/dist/component/component3d.d.ts.map +1 -0
- package/dist/component/component3d.js +99 -0
- package/dist/component/component3d.js.map +1 -0
- package/dist/component/factory.d.ts +63 -0
- package/dist/component/factory.d.ts.map +1 -0
- package/dist/component/factory.js +313 -0
- package/dist/component/factory.js.map +1 -0
- package/dist/component/modules/aim.d.ts +30 -0
- package/dist/component/modules/aim.d.ts.map +1 -0
- package/dist/component/modules/aim.js +39 -0
- package/dist/component/modules/aim.js.map +1 -0
- package/dist/component/modules/corners.d.ts +13 -0
- package/dist/component/modules/corners.d.ts.map +1 -0
- package/dist/component/modules/corners.js +12 -0
- package/dist/component/modules/corners.js.map +1 -0
- package/dist/component/modules/flow.d.ts +26 -0
- package/dist/component/modules/flow.d.ts.map +1 -0
- package/dist/component/modules/flow.js +55 -0
- package/dist/component/modules/flow.js.map +1 -0
- package/dist/component/modules/material.d.ts +40 -0
- package/dist/component/modules/material.d.ts.map +1 -0
- package/dist/component/modules/material.js +75 -0
- package/dist/component/modules/material.js.map +1 -0
- package/dist/component/modules/paint.d.ts +71 -0
- package/dist/component/modules/paint.d.ts.map +1 -0
- package/dist/component/modules/paint.js +106 -0
- package/dist/component/modules/paint.js.map +1 -0
- package/dist/component/modules/shapes.d.ts +31 -0
- package/dist/component/modules/shapes.d.ts.map +1 -0
- package/dist/component/modules/shapes.js +43 -0
- package/dist/component/modules/shapes.js.map +1 -0
- package/dist/component/modules/text-layout.d.ts +26 -0
- package/dist/component/modules/text-layout.d.ts.map +1 -0
- package/dist/component/modules/text-layout.js +57 -0
- package/dist/component/modules/text-layout.js.map +1 -0
- package/dist/component/modules/text-style.d.ts +48 -0
- package/dist/component/modules/text-style.d.ts.map +1 -0
- package/dist/component/modules/text-style.js +63 -0
- package/dist/component/modules/text-style.js.map +1 -0
- package/dist/component/modules/three-entries.d.ts +23 -0
- package/dist/component/modules/three-entries.d.ts.map +1 -0
- package/dist/component/modules/three-entries.js +41 -0
- package/dist/component/modules/three-entries.js.map +1 -0
- package/dist/component/modules/view3d.d.ts +55 -0
- package/dist/component/modules/view3d.d.ts.map +1 -0
- package/dist/component/modules/view3d.js +160 -0
- package/dist/component/modules/view3d.js.map +1 -0
- package/dist/component/timeline.d.ts +22 -0
- package/dist/component/timeline.d.ts.map +1 -0
- package/dist/component/timeline.js +128 -0
- package/dist/component/timeline.js.map +1 -0
- package/dist/component/type-def.d.ts +26 -0
- package/dist/component/type-def.d.ts.map +1 -0
- package/dist/component/type-def.js +16 -0
- package/dist/component/type-def.js.map +1 -0
- package/dist/component/types.d.ts +91 -0
- package/dist/component/types.d.ts.map +1 -0
- package/dist/component/types.js +88 -0
- package/dist/component/types.js.map +1 -0
- package/dist/component/views.d.ts +121 -0
- package/dist/component/views.d.ts.map +1 -0
- package/dist/component/views.js +413 -0
- package/dist/component/views.js.map +1 -0
- package/dist/component.d.ts +4 -5
- package/dist/component.d.ts.map +1 -1
- package/dist/component.js +3 -5
- package/dist/component.js.map +1 -1
- package/dist/document/audio.d.ts +10 -2
- package/dist/document/audio.d.ts.map +1 -1
- package/dist/document/audio.js +45 -4
- package/dist/document/audio.js.map +1 -1
- package/dist/document/builtins.d.ts.map +1 -1
- package/dist/document/builtins.js +15 -39
- package/dist/document/builtins.js.map +1 -1
- package/dist/document/command-traits.d.ts +1 -1
- package/dist/document/command-traits.js +16 -1
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/deny-globals.js.map +1 -1
- package/dist/document/diff.d.ts.map +1 -1
- package/dist/document/diff.js +3 -3
- package/dist/document/diff.js.map +1 -1
- package/dist/document/doc-index.d.ts +2 -2
- package/dist/document/doc-index.d.ts.map +1 -1
- package/dist/document/doc-index.js +3 -3
- package/dist/document/doc-index.js.map +1 -1
- package/dist/document/expression/compile.d.ts.map +1 -1
- package/dist/document/expression/compile.js +8 -5
- package/dist/document/expression/compile.js.map +1 -1
- package/dist/document/expression/index.js.map +1 -1
- package/dist/document/expression/ops.js +1 -1
- package/dist/document/expression/ops.js.map +1 -1
- package/dist/document/expression/parse.d.ts.map +1 -1
- package/dist/document/expression/parse.js +15 -6
- package/dist/document/expression/parse.js.map +1 -1
- package/dist/document/expression/refs.d.ts +1 -1
- package/dist/document/expression/refs.js +1 -1
- package/dist/document/expression/refs.js.map +1 -1
- package/dist/document/expression/types.js.map +1 -1
- package/dist/document/expression/walk.d.ts.map +1 -1
- package/dist/document/expression/walk.js +2 -1
- package/dist/document/expression/walk.js.map +1 -1
- package/dist/document/index.d.ts +2 -0
- package/dist/document/index.d.ts.map +1 -1
- package/dist/document/index.js +2 -0
- package/dist/document/index.js.map +1 -1
- package/dist/document/node-decorator.js.map +1 -1
- package/dist/document/node-descriptor.d.ts +25 -0
- 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 +70 -0
- package/dist/document/placement.d.ts.map +1 -0
- package/dist/document/placement.js +83 -0
- package/dist/document/placement.js.map +1 -0
- package/dist/document/project.d.ts +2 -2
- package/dist/document/project.d.ts.map +1 -1
- package/dist/document/project.js.map +1 -1
- package/dist/document/registry.d.ts +23 -11
- package/dist/document/registry.d.ts.map +1 -1
- package/dist/document/registry.js +46 -19
- package/dist/document/registry.js.map +1 -1
- package/dist/document/settled-index.d.ts +49 -0
- package/dist/document/settled-index.d.ts.map +1 -0
- package/dist/document/settled-index.js +247 -0
- package/dist/document/settled-index.js.map +1 -0
- package/dist/document/timeline-patch.js.map +1 -1
- package/dist/document/timeline.d.ts +100 -19
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +290 -42
- package/dist/document/timeline.js.map +1 -1
- package/dist/document/types.d.ts +12 -12
- package/dist/document/types.d.ts.map +1 -1
- package/dist/document/types.js +2 -2
- package/dist/document/types.js.map +1 -1
- package/dist/document/validate.d.ts +2 -2
- package/dist/document/validate.d.ts.map +1 -1
- package/dist/document/validate.js +37 -31
- package/dist/document/validate.js.map +1 -1
- package/dist/document/withdraw.d.ts +28 -0
- package/dist/document/withdraw.d.ts.map +1 -0
- package/dist/document/withdraw.js +61 -0
- package/dist/document/withdraw.js.map +1 -0
- package/dist/experimental.d.ts +22 -0
- package/dist/experimental.d.ts.map +1 -0
- package/dist/experimental.js +20 -0
- package/dist/experimental.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/jsx/jsx-dev-runtime.js.map +1 -1
- package/dist/jsx/jsx-runtime.d.ts +9 -1
- package/dist/jsx/jsx-runtime.d.ts.map +1 -1
- package/dist/jsx/jsx-runtime.js +13 -3
- package/dist/jsx/jsx-runtime.js.map +1 -1
- package/dist/layout/bounds.d.ts +0 -1
- package/dist/layout/bounds.d.ts.map +1 -1
- package/dist/layout/bounds.js.map +1 -1
- package/dist/layout/constraints.js.map +1 -1
- package/dist/layout/flex.d.ts +4 -2
- package/dist/layout/flex.d.ts.map +1 -1
- package/dist/layout/flex.js +27 -11
- package/dist/layout/flex.js.map +1 -1
- package/dist/layout/freeform.js.map +1 -1
- package/dist/layout/grid.js.map +1 -1
- package/dist/layout/index.js.map +1 -1
- package/dist/layout/item.js.map +1 -1
- package/dist/layout/ops.d.ts +6 -0
- package/dist/layout/ops.d.ts.map +1 -1
- package/dist/layout/ops.js +6 -0
- package/dist/layout/ops.js.map +1 -1
- package/dist/layout/types.js.map +1 -1
- package/dist/nodes/2d/node-lifecycle.js.map +1 -1
- package/dist/nodes/2d/node-motion.js.map +1 -1
- package/dist/nodes/2d/node-render.d.ts +3 -3
- package/dist/nodes/2d/node-render.d.ts.map +1 -1
- package/dist/nodes/2d/node-render.js.map +1 -1
- package/dist/nodes/2d/node-transform.js.map +1 -1
- package/dist/nodes/2d/node2d.d.ts +115 -3
- package/dist/nodes/2d/node2d.d.ts.map +1 -1
- package/dist/nodes/2d/node2d.js +180 -28
- package/dist/nodes/2d/node2d.js.map +1 -1
- package/dist/nodes/2d/paint-node.d.ts +27 -0
- package/dist/nodes/2d/paint-node.d.ts.map +1 -1
- package/dist/nodes/2d/paint-node.js +42 -0
- package/dist/nodes/2d/paint-node.js.map +1 -1
- package/dist/nodes/audio/audio-bus.js.map +1 -1
- package/dist/nodes/audio/index.d.ts +2 -2
- package/dist/nodes/audio/index.d.ts.map +1 -1
- package/dist/nodes/audio/index.js +0 -2
- package/dist/nodes/audio/index.js.map +1 -1
- package/dist/nodes/audio/node-audio.js.map +1 -1
- package/dist/nodes/audio/sound-node.d.ts +4 -3
- package/dist/nodes/audio/sound-node.d.ts.map +1 -1
- package/dist/nodes/audio/sound-node.js +4 -1
- package/dist/nodes/audio/sound-node.js.map +1 -1
- package/dist/nodes/geometry/bounds-shape-node.d.ts +4 -4
- package/dist/nodes/geometry/bounds-shape-node.js +2 -2
- package/dist/nodes/geometry/bounds-shape-node.js.map +1 -1
- package/dist/nodes/geometry/box-path-node.d.ts +3 -3
- package/dist/nodes/geometry/box-path-node.js +2 -2
- package/dist/nodes/geometry/box-path-node.js.map +1 -1
- package/dist/nodes/geometry/ellipse-node.js.map +1 -1
- package/dist/nodes/geometry/group-bounds.d.ts +2 -2
- package/dist/nodes/geometry/group-bounds.d.ts.map +1 -1
- package/dist/nodes/geometry/group-bounds.js +1 -2
- package/dist/nodes/geometry/group-bounds.js.map +1 -1
- package/dist/nodes/geometry/path-node.d.ts.map +1 -1
- package/dist/nodes/geometry/path-node.js +6 -0
- package/dist/nodes/geometry/path-node.js.map +1 -1
- package/dist/nodes/geometry/polygon-node.js.map +1 -1
- package/dist/nodes/geometry/polygram-node.js.map +1 -1
- package/dist/nodes/geometry/rect-node.js.map +1 -1
- package/dist/nodes/geometry/shape-node.js.map +1 -1
- package/dist/nodes/geometry/shape-outline.d.ts +2 -2
- package/dist/nodes/geometry/shape-outline.d.ts.map +1 -1
- package/dist/nodes/geometry/shape-outline.js +2 -13
- package/dist/nodes/geometry/shape-outline.js.map +1 -1
- package/dist/nodes/index.d.ts +40 -33
- package/dist/nodes/index.d.ts.map +1 -1
- package/dist/nodes/index.js +17 -36
- package/dist/nodes/index.js.map +1 -1
- package/dist/nodes/layout/camera-node.d.ts +9 -0
- package/dist/nodes/layout/camera-node.d.ts.map +1 -1
- package/dist/nodes/layout/camera-node.js +38 -3
- package/dist/nodes/layout/camera-node.js.map +1 -1
- package/dist/nodes/layout/orbit-camera-node.d.ts +1 -1
- package/dist/nodes/layout/orbit-camera-node.js +1 -1
- package/dist/nodes/layout/orbit-camera-node.js.map +1 -1
- package/dist/nodes/layout/rotated-box.js.map +1 -1
- package/dist/nodes/media/video-node.d.ts.map +1 -1
- package/dist/nodes/media/video-node.js +2 -0
- package/dist/nodes/media/video-node.js.map +1 -1
- package/dist/nodes/node/declare-paints.js.map +1 -1
- package/dist/nodes/node/node-editor-state.js.map +1 -1
- package/dist/nodes/node/node-reactive.js.map +1 -1
- package/dist/nodes/node/node-time.d.ts +3 -3
- package/dist/nodes/node/node-time.d.ts.map +1 -1
- package/dist/nodes/node/node-time.js +1 -1
- package/dist/nodes/node/node-time.js.map +1 -1
- package/dist/nodes/node/node-walk.js.map +1 -1
- package/dist/nodes/node/node.d.ts +12 -4
- package/dist/nodes/node/node.d.ts.map +1 -1
- package/dist/nodes/node/node.js +67 -27
- package/dist/nodes/node/node.js.map +1 -1
- package/dist/nodes/node/text-defaults.d.ts +10 -12
- package/dist/nodes/node/text-defaults.d.ts.map +1 -1
- package/dist/nodes/node/text-defaults.js +10 -12
- package/dist/nodes/node/text-defaults.js.map +1 -1
- package/dist/nodes/{scene → root}/canvas2d-node.d.ts +4 -3
- package/dist/nodes/root/canvas2d-node.d.ts.map +1 -0
- package/dist/nodes/{scene → root}/canvas2d-node.js +5 -2
- package/dist/nodes/root/canvas2d-node.js.map +1 -0
- package/dist/nodes/root/provider-node.d.ts.map +1 -0
- package/dist/nodes/root/provider-node.js.map +1 -0
- package/dist/nodes/root/theme-provider-node.d.ts.map +1 -0
- package/dist/nodes/root/theme-provider-node.js.map +1 -0
- package/dist/nodes/text/default-text-style-node.d.ts +5 -2
- package/dist/nodes/text/default-text-style-node.d.ts.map +1 -1
- package/dist/nodes/text/default-text-style-node.js +10 -4
- package/dist/nodes/text/default-text-style-node.js.map +1 -1
- package/dist/nodes/text/number-format.d.ts +1 -1
- package/dist/nodes/text/number-format.js +1 -1
- package/dist/nodes/text/number-format.js.map +1 -1
- package/dist/nodes/text/number-node.js.map +1 -1
- package/dist/nodes/text/number-pattern.js.map +1 -1
- package/dist/nodes/text/richtext-node.d.ts +0 -5
- package/dist/nodes/text/richtext-node.d.ts.map +1 -1
- package/dist/nodes/text/richtext-node.js +6 -72
- package/dist/nodes/text/richtext-node.js.map +1 -1
- package/dist/nodes/text/text-base.d.ts +5 -22
- package/dist/nodes/text/text-base.d.ts.map +1 -1
- package/dist/nodes/text/text-base.js +13 -364
- package/dist/nodes/text/text-base.js.map +1 -1
- package/dist/nodes/text/text-layout.d.ts +87 -0
- package/dist/nodes/text/text-layout.d.ts.map +1 -0
- package/dist/nodes/text/text-layout.js +368 -0
- package/dist/nodes/text/text-layout.js.map +1 -0
- package/dist/nodes/text/text-node.js.map +1 -1
- package/dist/nodes/text/text-selection.js.map +1 -1
- package/dist/nodes/three/camera-nodes.d.ts +21 -3
- package/dist/nodes/three/camera-nodes.d.ts.map +1 -1
- package/dist/nodes/three/camera-nodes.js +42 -1
- package/dist/nodes/three/camera-nodes.js.map +1 -1
- package/dist/nodes/three/canvas3d-node.d.ts +32 -7
- package/dist/nodes/three/canvas3d-node.d.ts.map +1 -1
- package/dist/nodes/three/canvas3d-node.js +50 -2
- package/dist/nodes/three/canvas3d-node.js.map +1 -1
- package/dist/nodes/three/drawable-nodes.d.ts +25 -11
- package/dist/nodes/three/drawable-nodes.d.ts.map +1 -1
- package/dist/nodes/three/drawable-nodes.js +43 -13
- package/dist/nodes/three/drawable-nodes.js.map +1 -1
- package/dist/nodes/three/environment-nodes.d.ts +9 -3
- package/dist/nodes/three/environment-nodes.d.ts.map +1 -1
- package/dist/nodes/three/environment-nodes.js.map +1 -1
- package/dist/nodes/three/geometry-nodes.d.ts +2 -2
- package/dist/nodes/three/geometry-nodes.js +2 -2
- package/dist/nodes/three/geometry-nodes.js.map +1 -1
- package/dist/nodes/three/grid-geometry3d.js.map +1 -1
- package/dist/nodes/three/group3d.js.map +1 -1
- package/dist/nodes/three/light-nodes.d.ts.map +1 -1
- package/dist/nodes/three/light-nodes.js +3 -3
- package/dist/nodes/three/light-nodes.js.map +1 -1
- package/dist/nodes/three/mesh3d.js.map +1 -1
- package/dist/nodes/three/node3d.d.ts +48 -0
- package/dist/nodes/three/node3d.d.ts.map +1 -1
- package/dist/nodes/three/node3d.js +53 -3
- package/dist/nodes/three/node3d.js.map +1 -1
- package/dist/platform/audio-sink.d.ts +2 -2
- package/dist/platform/audio-sink.d.ts.map +1 -1
- package/dist/platform/audio-sink.js.map +1 -1
- package/dist/platform/exporter.d.ts +13 -8
- package/dist/platform/exporter.d.ts.map +1 -1
- package/dist/platform/exporter.js.map +1 -1
- package/dist/platform/index.d.ts +1 -1
- package/dist/platform/index.d.ts.map +1 -1
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/stepped-clock.js.map +1 -1
- package/dist/platform/storage-adapter.d.ts +12 -6
- package/dist/platform/storage-adapter.d.ts.map +1 -1
- package/dist/platform/storage-adapter.js +4 -0
- package/dist/platform/storage-adapter.js.map +1 -1
- package/dist/platform/ticker.d.ts +6 -0
- package/dist/platform/ticker.d.ts.map +1 -1
- package/dist/platform/ticker.js +6 -0
- package/dist/platform/ticker.js.map +1 -1
- package/dist/project/config.js.map +1 -1
- package/dist/project/index.js.map +1 -1
- package/dist/project/tree.d.ts +3 -3
- package/dist/project/tree.d.ts.map +1 -1
- package/dist/project/tree.js.map +1 -1
- package/dist/props/host.js.map +1 -1
- package/dist/props/index.js.map +1 -1
- package/dist/props/observer.js.map +1 -1
- package/dist/props/slot.js.map +1 -1
- package/dist/renamed-scene-names.d.ts +17 -0
- package/dist/renamed-scene-names.d.ts.map +1 -0
- package/dist/renamed-scene-names.js +9 -0
- package/dist/renamed-scene-names.js.map +1 -0
- package/dist/render/canvas-render-context2d.d.ts +2 -2
- package/dist/render/canvas-render-context2d.d.ts.map +1 -1
- package/dist/render/canvas-render-context2d.js.map +1 -1
- package/dist/render/clip-contains.js.map +1 -1
- package/dist/render/clip.js.map +1 -1
- package/dist/render/descriptors/ellipse.js.map +1 -1
- package/dist/render/descriptors/latex.js.map +1 -1
- package/dist/render/descriptors/line.js.map +1 -1
- package/dist/render/descriptors/path-builder.js.map +1 -1
- package/dist/render/descriptors/path.js.map +1 -1
- package/dist/render/descriptors/polygon.js.map +1 -1
- package/dist/render/descriptors/polygram.js.map +1 -1
- package/dist/render/descriptors/rect.js.map +1 -1
- package/dist/render/descriptors/richtext.js.map +1 -1
- package/dist/render/descriptors/shape.d.ts +12 -0
- package/dist/render/descriptors/shape.d.ts.map +1 -1
- package/dist/render/descriptors/shape.js.map +1 -1
- package/dist/render/descriptors/text.d.ts +2 -2
- package/dist/render/descriptors/text.js +2 -2
- package/dist/render/descriptors/text.js.map +1 -1
- package/dist/render/descriptors/transform.d.ts +2 -2
- package/dist/render/descriptors/transform.d.ts.map +1 -1
- package/dist/render/descriptors/transform.js.map +1 -1
- package/dist/render/graphics2d.d.ts +3 -3
- package/dist/render/graphics2d.d.ts.map +1 -1
- package/dist/render/graphics2d.js +1 -1
- package/dist/render/graphics2d.js.map +1 -1
- package/dist/render/index.js.map +1 -1
- package/dist/render/measure-context.js.map +1 -1
- package/dist/render/null-render-context.js.map +1 -1
- package/dist/render/render-context2d.d.ts +2 -2
- package/dist/render/render-context2d.d.ts.map +1 -1
- package/dist/render/render-context2d.js.map +1 -1
- package/dist/render/surface.js.map +1 -1
- package/dist/render/text-defaults.js.map +1 -1
- package/dist/render/text-layout.js.map +1 -1
- package/dist/render3d/bounds3d.d.ts.map +1 -1
- package/dist/render3d/bounds3d.js +4 -2
- package/dist/render3d/bounds3d.js.map +1 -1
- package/dist/render3d/builders.js.map +1 -1
- package/dist/render3d/camera.d.ts +6 -0
- package/dist/render3d/camera.d.ts.map +1 -1
- package/dist/render3d/camera.js +5 -3
- package/dist/render3d/camera.js.map +1 -1
- package/dist/render3d/fill3d.d.ts +2 -9
- package/dist/render3d/fill3d.d.ts.map +1 -1
- package/dist/render3d/fill3d.js +2 -13
- package/dist/render3d/fill3d.js.map +1 -1
- package/dist/render3d/geometry.d.ts +8 -1
- package/dist/render3d/geometry.d.ts.map +1 -1
- package/dist/render3d/geometry.js.map +1 -1
- package/dist/render3d/graphics3d.d.ts +8 -4
- package/dist/render3d/graphics3d.d.ts.map +1 -1
- package/dist/render3d/graphics3d.js +18 -10
- package/dist/render3d/graphics3d.js.map +1 -1
- package/dist/render3d/index.d.ts +1 -1
- package/dist/render3d/index.js +1 -1
- package/dist/render3d/index.js.map +1 -1
- package/dist/render3d/inert.d.ts +14 -0
- package/dist/render3d/inert.d.ts.map +1 -0
- package/dist/render3d/inert.js +62 -0
- package/dist/render3d/inert.js.map +1 -0
- package/dist/render3d/light.js.map +1 -1
- package/dist/render3d/material.d.ts +10 -5
- package/dist/render3d/material.d.ts.map +1 -1
- package/dist/render3d/material.js.map +1 -1
- package/dist/render3d/matrix4.js.map +1 -1
- package/dist/render3d/render-context3d.js.map +1 -1
- package/dist/render3d/resources.js.map +1 -1
- package/dist/render3d/rounded-box.js.map +1 -1
- package/dist/render3d/scene-settings.d.ts +23 -4
- package/dist/render3d/scene-settings.d.ts.map +1 -1
- package/dist/render3d/scene-settings.js.map +1 -1
- package/dist/render3d/scene3d.d.ts +11 -0
- package/dist/render3d/scene3d.d.ts.map +1 -1
- package/dist/render3d/scene3d.js +39 -6
- package/dist/render3d/scene3d.js.map +1 -1
- package/dist/render3d/segments.js.map +1 -1
- package/dist/render3d/texture.d.ts +9 -0
- package/dist/render3d/texture.d.ts.map +1 -1
- package/dist/render3d/texture.js +13 -0
- package/dist/render3d/texture.js.map +1 -1
- package/dist/render3d/tracking.js.map +1 -1
- package/dist/render3d/transform.d.ts +1 -1
- package/dist/render3d/transform.js.map +1 -1
- package/dist/render3d/vector3.d.ts +18 -1
- package/dist/render3d/vector3.d.ts.map +1 -1
- package/dist/render3d/vector3.js +27 -0
- package/dist/render3d/vector3.js.map +1 -1
- package/dist/render3d/walk.d.ts +1 -1
- package/dist/render3d/walk.d.ts.map +1 -1
- package/dist/render3d/walk.js +5 -1
- package/dist/render3d/walk.js.map +1 -1
- package/dist/runtime/asset-refine.js.map +1 -1
- package/dist/runtime/asset-timeline.js.map +1 -1
- package/dist/runtime/asset-update.js.map +1 -1
- package/dist/runtime/audio-index.js.map +1 -1
- package/dist/runtime/builtin-context.js.map +1 -1
- package/dist/runtime/clip-instance.d.ts +9 -4
- package/dist/runtime/clip-instance.d.ts.map +1 -1
- package/dist/runtime/clip-instance.js +27 -9
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.d.ts +18 -0
- package/dist/runtime/clip-store.d.ts.map +1 -1
- package/dist/runtime/clip-store.js +97 -0
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/engine.d.ts +5 -0
- package/dist/runtime/engine.d.ts.map +1 -1
- package/dist/runtime/engine.js +2 -0
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/frame-time.d.ts +31 -0
- package/dist/runtime/frame-time.d.ts.map +1 -0
- package/dist/runtime/frame-time.js +29 -0
- package/dist/runtime/frame-time.js.map +1 -0
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +1 -0
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/node-picking.d.ts +44 -3
- package/dist/runtime/node-picking.d.ts.map +1 -1
- package/dist/runtime/node-picking.js +124 -10
- package/dist/runtime/node-picking.js.map +1 -1
- package/dist/runtime/node-picking3d.d.ts +13 -5
- package/dist/runtime/node-picking3d.d.ts.map +1 -1
- package/dist/runtime/node-picking3d.js +10 -2
- package/dist/runtime/node-picking3d.js.map +1 -1
- package/dist/runtime/placement.d.ts.map +1 -1
- package/dist/runtime/placement.js +4 -5
- package/dist/runtime/placement.js.map +1 -1
- package/dist/runtime/playback-controller.d.ts +31 -2
- package/dist/runtime/playback-controller.d.ts.map +1 -1
- package/dist/runtime/playback-controller.js +63 -6
- package/dist/runtime/playback-controller.js.map +1 -1
- package/dist/runtime/playback.js.map +1 -1
- package/dist/runtime/precompisition.js.map +1 -1
- package/dist/runtime/project-assets.js.map +1 -1
- package/dist/runtime/session.d.ts +9 -7
- package/dist/runtime/session.d.ts.map +1 -1
- package/dist/runtime/session.js +12 -4
- package/dist/runtime/session.js.map +1 -1
- package/dist/runtime/settle.js.map +1 -1
- package/dist/runtime/state-evaluator.d.ts +1 -1
- package/dist/runtime/state-evaluator.d.ts.map +1 -1
- package/dist/runtime/state-evaluator.js +4 -3
- package/dist/runtime/state-evaluator.js.map +1 -1
- package/dist/runtime/text-geometry.d.ts.map +1 -1
- package/dist/runtime/text-geometry.js +7 -3
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.d.ts +50 -25
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +52 -42
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command-decorator.d.ts +2 -0
- package/dist/tween/command-decorator.d.ts.map +1 -1
- package/dist/tween/command-decorator.js.map +1 -1
- package/dist/tween/command.d.ts +12 -0
- package/dist/tween/command.d.ts.map +1 -1
- package/dist/tween/command.js +14 -0
- package/dist/tween/command.js.map +1 -1
- package/dist/tween/ease/constants.d.ts.map +1 -1
- package/dist/tween/ease/constants.js +8 -5
- package/dist/tween/ease/constants.js.map +1 -1
- package/dist/tween/ease/curve.d.ts.map +1 -1
- package/dist/tween/ease/curve.js +4 -3
- package/dist/tween/ease/curve.js.map +1 -1
- package/dist/tween/ease/describe.d.ts +15 -0
- package/dist/tween/ease/describe.d.ts.map +1 -0
- package/dist/tween/ease/describe.js +37 -0
- package/dist/tween/ease/describe.js.map +1 -0
- package/dist/tween/ease/type.js.map +1 -1
- package/dist/tween/index.js.map +1 -1
- package/dist/tween/inert.js.map +1 -1
- package/dist/tween/lerp.js.map +1 -1
- package/dist/tween/loop.js.map +1 -1
- package/dist/tween/prepare.d.ts +3 -3
- package/dist/tween/prepare.js +3 -3
- package/dist/tween/prepare.js.map +1 -1
- package/dist/tween/seekable.d.ts +1 -1
- package/dist/tween/seekable.js.map +1 -1
- package/dist/tween/stepper.js.map +1 -1
- package/dist/tween/to-command.js.map +1 -1
- package/dist/util/clamp.js.map +1 -1
- package/dist/util/context.js.map +1 -1
- package/dist/util/csv.js.map +1 -1
- package/dist/util/generateList.js.map +1 -1
- package/dist/util/index.js.map +1 -1
- package/dist/util/metrics.d.ts +1 -1
- package/dist/util/metrics.js +1 -1
- package/dist/util/metrics.js.map +1 -1
- package/dist/util/random.js.map +1 -1
- package/dist/util/reference.js.map +1 -1
- package/dist/util/scheduler.js.map +1 -1
- package/package.json +7 -1
- package/dist/attributes/shape/effects/implementations/displace.d.ts +0 -48
- package/dist/attributes/shape/effects/implementations/displace.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/displace.js +0 -30
- package/dist/attributes/shape/effects/implementations/displace.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/god-rays.d.ts +0 -28
- package/dist/attributes/shape/effects/implementations/god-rays.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/god-rays.js +0 -26
- package/dist/attributes/shape/effects/implementations/god-rays.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/texture.d.ts +0 -28
- package/dist/attributes/shape/effects/implementations/texture.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/texture.js +0 -25
- package/dist/attributes/shape/effects/implementations/texture.js.map +0 -1
- package/dist/attributes/shape/effects/implementations/trails.d.ts +0 -41
- package/dist/attributes/shape/effects/implementations/trails.d.ts.map +0 -1
- package/dist/attributes/shape/effects/implementations/trails.js +0 -22
- package/dist/attributes/shape/effects/implementations/trails.js.map +0 -1
- package/dist/browser/chunks/chunk-2T3HXSC2.js +0 -2
- package/dist/browser/chunks/chunk-2T3HXSC2.js.map +0 -7
- package/dist/browser/chunks/chunk-KJXGRHOL.js +0 -3
- package/dist/browser/chunks/chunk-KJXGRHOL.js.map +0 -7
- package/dist/browser/chunks/chunk-TGDX2SS2.js +0 -18
- package/dist/browser/chunks/chunk-TGDX2SS2.js.map +0 -7
- package/dist/nodes/geometry/dot-grid-node.d.ts +0 -105
- package/dist/nodes/geometry/dot-grid-node.d.ts.map +0 -1
- package/dist/nodes/geometry/dot-grid-node.js +0 -142
- package/dist/nodes/geometry/dot-grid-node.js.map +0 -1
- package/dist/nodes/geometry/grid-lines.d.ts +0 -101
- package/dist/nodes/geometry/grid-lines.d.ts.map +0 -1
- package/dist/nodes/geometry/grid-lines.js +0 -128
- package/dist/nodes/geometry/grid-lines.js.map +0 -1
- package/dist/nodes/geometry/grid-pattern-node.d.ts +0 -58
- package/dist/nodes/geometry/grid-pattern-node.d.ts.map +0 -1
- package/dist/nodes/geometry/grid-pattern-node.js +0 -172
- package/dist/nodes/geometry/grid-pattern-node.js.map +0 -1
- package/dist/nodes/geometry/line-grid-node.d.ts +0 -62
- package/dist/nodes/geometry/line-grid-node.d.ts.map +0 -1
- package/dist/nodes/geometry/line-grid-node.js +0 -127
- package/dist/nodes/geometry/line-grid-node.js.map +0 -1
- package/dist/nodes/geometry/line-node.d.ts +0 -58
- package/dist/nodes/geometry/line-node.d.ts.map +0 -1
- package/dist/nodes/geometry/line-node.js +0 -123
- package/dist/nodes/geometry/line-node.js.map +0 -1
- package/dist/nodes/geometry/viewport-pattern-node.d.ts +0 -39
- package/dist/nodes/geometry/viewport-pattern-node.d.ts.map +0 -1
- package/dist/nodes/geometry/viewport-pattern-node.js +0 -79
- package/dist/nodes/geometry/viewport-pattern-node.js.map +0 -1
- package/dist/nodes/scene/canvas2d-node.d.ts.map +0 -1
- package/dist/nodes/scene/canvas2d-node.js.map +0 -1
- package/dist/nodes/scene/provider-node.d.ts.map +0 -1
- package/dist/nodes/scene/provider-node.js.map +0 -1
- package/dist/nodes/scene/theme-provider-node.d.ts.map +0 -1
- package/dist/nodes/scene/theme-provider-node.js.map +0 -1
- /package/dist/nodes/{scene → root}/provider-node.d.ts +0 -0
- /package/dist/nodes/{scene → root}/provider-node.js +0 -0
- /package/dist/nodes/{scene → root}/theme-provider-node.d.ts +0 -0
- /package/dist/nodes/{scene → root}/theme-provider-node.js +0 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { ROOT_NODE_ID } from "./types.js";
|
|
2
|
+
/** The one core type whose children are of the other dimension. */
|
|
3
|
+
const CANVAS_3D = "canvas3d";
|
|
4
|
+
/** Whether `type` is `name`, or is built on it through `parentKey`. */
|
|
5
|
+
export function nodeTypeIsA(registry, type, name) {
|
|
6
|
+
const seen = new Set();
|
|
7
|
+
for (let at = type; at !== undefined && !seen.has(at); at = registry.describe(at)?.parentKey) {
|
|
8
|
+
if (at === name)
|
|
9
|
+
return true;
|
|
10
|
+
seen.add(at);
|
|
11
|
+
}
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
function among(registry, type, names, options) {
|
|
15
|
+
return names.some((name) => nodeTypeIsA(registry, type, name) || options.isA?.(type, name) === true);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Why a node of `child` cannot go directly inside one of `parent`, or `null`
|
|
19
|
+
* when it can. A `null` parent is the document's own root, which is 2D and
|
|
20
|
+
* names nothing.
|
|
21
|
+
*/
|
|
22
|
+
export function parentIssue(registry, child, parent, options = {}) {
|
|
23
|
+
const own = registry.describe(child);
|
|
24
|
+
const holder = parent === null ? undefined : registry.describe(parent);
|
|
25
|
+
if (parent !== null && (holder?.layout?.acceptsChildren === false || holder?.holds?.length === 0))
|
|
26
|
+
return { kind: "leaf", parent };
|
|
27
|
+
const within = own?.within ?? [];
|
|
28
|
+
if (within.length > 0 && (parent === null || !among(registry, parent, within, options))) {
|
|
29
|
+
return { kind: "within", within };
|
|
30
|
+
}
|
|
31
|
+
if (parent !== null && holder?.closed === true && !among(registry, parent, within, options)) {
|
|
32
|
+
return { kind: "closed", parent };
|
|
33
|
+
}
|
|
34
|
+
const inThree = parent !== null && (holder?.dimension === "3d" || holder?.holds?.includes("3d") === true || among(registry, parent, [CANVAS_3D], options));
|
|
35
|
+
if ((own?.dimension === "3d") !== inThree)
|
|
36
|
+
return { kind: "dimension", parent };
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
/** The sibling `child` needs that `siblings`, the types already under its parent, do not include; `null` when it needs none or has one. */
|
|
40
|
+
export function siblingIssue(registry, child, siblings, options = {}) {
|
|
41
|
+
const beside = registry.describe(child)?.beside ?? [];
|
|
42
|
+
if (beside.length === 0 || siblings.some((type) => among(registry, type, beside, options)))
|
|
43
|
+
return null;
|
|
44
|
+
return { kind: "beside", beside };
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Every node of `nodes` that is not where its type says it goes, by id, with
|
|
48
|
+
* the first reason. A node of an unregistered type is left out: that is a build
|
|
49
|
+
* error, and says so itself.
|
|
50
|
+
*/
|
|
51
|
+
export function placementIssues(registry, nodes, options = {}) {
|
|
52
|
+
// A document may write its stage as a row or leave it out: either way its children's parent is the root.
|
|
53
|
+
const parentOf = (node) => (node.parentId === ROOT_NODE_ID ? null : node.parentId);
|
|
54
|
+
const byId = new Map(nodes.map((node) => [node.id, node]));
|
|
55
|
+
const children = new Map();
|
|
56
|
+
for (const node of nodes) {
|
|
57
|
+
if (node.id === ROOT_NODE_ID)
|
|
58
|
+
continue;
|
|
59
|
+
const under = children.get(parentOf(node));
|
|
60
|
+
if (under)
|
|
61
|
+
under.push(node.type);
|
|
62
|
+
else
|
|
63
|
+
children.set(parentOf(node), [node.type]);
|
|
64
|
+
}
|
|
65
|
+
const issues = new Map();
|
|
66
|
+
for (const node of nodes) {
|
|
67
|
+
if (node.id === ROOT_NODE_ID || !registry.hasNode(node.type))
|
|
68
|
+
continue;
|
|
69
|
+
const parentId = parentOf(node);
|
|
70
|
+
const parentType = parentId === null ? null : (byId.get(parentId)?.type ?? null);
|
|
71
|
+
const issue = parentIssue(registry, node.type, parentType, options) ??
|
|
72
|
+
siblingIssue(registry, node.type, without(children.get(parentId) ?? [], node.type), options);
|
|
73
|
+
if (issue)
|
|
74
|
+
issues.set(node.id, issue);
|
|
75
|
+
}
|
|
76
|
+
return issues;
|
|
77
|
+
}
|
|
78
|
+
// The node's own type once: a second area is a sibling of the first, the first is not its own.
|
|
79
|
+
function without(types, own) {
|
|
80
|
+
const at = types.indexOf(own);
|
|
81
|
+
return at === -1 ? [...types] : [...types.slice(0, at), ...types.slice(at + 1)];
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=placement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"placement.js","sourceRoot":"","sources":["../../src/document/placement.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAiB,MAAM,SAAS,CAAC;AAyCtD,mEAAmE;AACnE,MAAM,SAAS,GAAG,UAAU,CAAC;AAE7B,uEAAuE;AACvE,MAAM,UAAU,WAAW,CAAC,QAAkB,EAAE,IAAY,EAAE,IAAY;IACtE,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,IAAI,EAAE,GAAuB,IAAI,EAAE,EAAE,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC;QAC/G,IAAI,EAAE,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;QAC7B,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,SAAS,KAAK,CAAC,QAAkB,EAAE,IAAY,EAAE,KAAwB,EAAE,OAAyB;IAChG,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;AACzG,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CACvB,QAAkB,EAClB,KAAa,EACb,MAAqB,EACrB,UAA4B,EAAE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AC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;AACpF,CAAC","sourcesContent":["import type { Registry } from \"./registry\";\r\nimport { ROOT_NODE_ID, type NodeSpec } from \"./types\";\r\n\r\n/**\r\n * Where a node type may go, read off the registry without building anything:\r\n * the answer a host needs before it offers a type under a parent, accepts a\r\n * drop, or lets an assistant create a row.\r\n *\r\n * Four things decide it. A parent that takes no children takes none. The two\r\n * trees do not mix: a `Node3D` lives under a Canvas 3D or another 3D node, and\r\n * nothing else does. A type that names where it goes ({@link\r\n * NodeTypeDescriptor.within}) goes only there, and a {@link\r\n * NodeTypeDescriptor.closed} parent takes only the types that name it. Those\r\n * are about the parent; {@link NodeTypeDescriptor.beside} is about the\r\n * siblings, and is kept apart because a host can meet it by adding one.\r\n *\r\n * None of it is enforced when a document is built. A node in the wrong place\r\n * builds and, as a rule, draws nothing; this says why.\r\n */\r\n\r\n/** Why a node of a type is not where it can work. */\r\nexport type PlacementIssue =\r\n /** The parent takes no children. */\r\n | { kind: \"leaf\"; parent: string }\r\n /** A 3D node outside a 3D tree, or anything else inside one. */\r\n | { kind: \"dimension\"; parent: string | null }\r\n /** It goes inside one of `within`, and the parent is none of them. */\r\n | { kind: \"within\"; within: readonly string[] }\r\n /** The parent takes only the types that name it. */\r\n | { kind: \"closed\"; parent: string }\r\n /** It needs one of `beside` under the same parent, and there is none. */\r\n | { kind: \"beside\"; beside: readonly string[] };\r\n\r\nexport interface PlacementOptions {\r\n /**\r\n * A host's own sense of one type standing for another, beside the\r\n * registry's: a copy of a component it made under a new key is still that\r\n * component to whatever goes inside it.\r\n */\r\n isA?: (type: string, name: string) => boolean;\r\n}\r\n\r\n/** The one core type whose children are of the other dimension. */\r\nconst CANVAS_3D = \"canvas3d\";\r\n\r\n/** Whether `type` is `name`, or is built on it through `parentKey`. */\r\nexport function nodeTypeIsA(registry: Registry, type: string, name: string): boolean {\r\n const seen = new Set<string>();\r\n for (let at: string | undefined = type; at !== undefined && !seen.has(at); at = registry.describe(at)?.parentKey) {\r\n if (at === name) return true;\r\n seen.add(at);\r\n }\r\n return false;\r\n}\r\n\r\nfunction among(registry: Registry, type: string, names: readonly string[], options: PlacementOptions): boolean {\r\n return names.some((name) => nodeTypeIsA(registry, type, name) || options.isA?.(type, name) === true);\r\n}\r\n\r\n/**\r\n * Why a node of `child` cannot go directly inside one of `parent`, or `null`\r\n * when it can. A `null` parent is the document's own root, which is 2D and\r\n * names nothing.\r\n */\r\nexport function parentIssue(\r\n registry: Registry,\r\n child: string,\r\n parent: string | null,\r\n options: PlacementOptions = {},\r\n): PlacementIssue | null {\r\n const own = registry.describe(child);\r\n const holder = parent === null ? undefined : registry.describe(parent);\r\n if (parent !== null && (holder?.layout?.acceptsChildren === false || holder?.holds?.length === 0)) return { kind: \"leaf\", parent };\r\n\r\n const within = own?.within ?? [];\r\n if (within.length > 0 && (parent === null || !among(registry, parent, within, options))) {\r\n return { kind: \"within\", within };\r\n }\r\n if (parent !== null && holder?.closed === true && !among(registry, parent, within, options)) {\r\n return { kind: \"closed\", parent };\r\n }\r\n\r\n const inThree = parent !== null && (holder?.dimension === \"3d\" || holder?.holds?.includes(\"3d\") === true || among(registry, parent, [CANVAS_3D], options));\r\n if ((own?.dimension === \"3d\") !== inThree) return { kind: \"dimension\", parent };\r\n return null;\r\n}\r\n\r\n/** The sibling `child` needs that `siblings`, the types already under its parent, do not include; `null` when it needs none or has one. */\r\nexport function siblingIssue(\r\n registry: Registry,\r\n child: string,\r\n siblings: readonly string[],\r\n options: PlacementOptions = {},\r\n): PlacementIssue | null {\r\n const beside = registry.describe(child)?.beside ?? [];\r\n if (beside.length === 0 || siblings.some((type) => among(registry, type, beside, options))) return null;\r\n return { kind: \"beside\", beside };\r\n}\r\n\r\n/**\r\n * Every node of `nodes` that is not where its type says it goes, by id, with\r\n * the first reason. A node of an unregistered type is left out: that is a build\r\n * error, and says so itself.\r\n */\r\nexport function placementIssues(\r\n registry: Registry,\r\n nodes: readonly Pick<NodeSpec, \"id\" | \"type\" | \"parentId\">[],\r\n options: PlacementOptions = {},\r\n): Map<string, PlacementIssue> {\r\n // A document may write its stage as a row or leave it out: either way its children's parent is the root.\r\n const parentOf = (node: Pick<NodeSpec, \"parentId\">) => (node.parentId === ROOT_NODE_ID ? null : node.parentId);\r\n const byId = new Map(nodes.map((node) => [node.id, node]));\r\n const children = new Map<string | null, string[]>();\r\n for (const node of nodes) {\r\n if (node.id === ROOT_NODE_ID) continue;\r\n const under = children.get(parentOf(node));\r\n if (under) under.push(node.type);\r\n else children.set(parentOf(node), [node.type]);\r\n }\r\n const issues = new Map<string, PlacementIssue>();\r\n for (const node of nodes) {\r\n if (node.id === ROOT_NODE_ID || !registry.hasNode(node.type)) continue;\r\n const parentId = parentOf(node);\r\n const parentType = parentId === null ? null : (byId.get(parentId)?.type ?? null);\r\n const issue =\r\n parentIssue(registry, node.type, parentType, options) ??\r\n siblingIssue(registry, node.type, without(children.get(parentId) ?? [], node.type), options);\r\n if (issue) issues.set(node.id, issue);\r\n }\r\n return issues;\r\n}\r\n\r\n// The node's own type once: a second area is a sibling of the first, the first is not its own.\r\nfunction without(types: readonly string[], own: string): string[] {\r\n const at = types.indexOf(own);\r\n return at === -1 ? [...types] : [...types.slice(0, at), ...types.slice(at + 1)];\r\n}\r\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Size2D } from "../attributes/layout/size.js";
|
|
2
2
|
import type { Theme } from "../project/config.js";
|
|
3
|
-
import type { ClipDocument,
|
|
3
|
+
import type { ClipDocument, VisualDocument } from "./types.js";
|
|
4
4
|
/**
|
|
5
5
|
* The **project** as data: a whole video, not one clip — and the one thing the
|
|
6
6
|
* runtime plays.
|
|
@@ -83,7 +83,7 @@ export declare function isProjectDocument(doc: unknown): doc is ProjectDocument;
|
|
|
83
83
|
* Viewport and fps describe the output rather than the clip, so they come from
|
|
84
84
|
* the caller.
|
|
85
85
|
*/
|
|
86
|
-
export declare function asProjectDocument(doc: ProjectDocument |
|
|
86
|
+
export declare function asProjectDocument(doc: ProjectDocument | VisualDocument, output?: {
|
|
87
87
|
name?: string;
|
|
88
88
|
viewport?: Size2D;
|
|
89
89
|
fps?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/document/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,KAAK,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/document/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG5D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,SAAS,CAAC;IAChB,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd;;;OAGG;IACH,MAAM,EAAE,KAAK,EAAE,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,KAAK;IAClB;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,qBAAqB;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,IAAI,EAAE,YAAY,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;;OAQG;IACH,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,gDAAgD;AAChD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,eAAe,CAEtE;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC7B,GAAG,EAAE,eAAe,GAAG,cAAc,EACrC,MAAM,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,GAChE,eAAe,CAUjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/document/project.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AA6E3C,gDAAgD;AAChD,MAAM,UAAU,iBAAiB,CAAC,GAAY;IAC1C,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAK,GAAuB,CAAC,IAAI,KAAK,SAAS,CAAC;AAClG,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAC7B,
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/document/project.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AA6E3C,gDAAgD;AAChD,MAAM,UAAU,iBAAiB,CAAC,GAAY;IAC1C,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAK,GAAuB,CAAC,IAAI,KAAK,SAAS,CAAC;AAClG,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAC7B,GAAqC,EACrC,SAA6D,EAAE;IAE/D,IAAI,iBAAiB,CAAC,GAAG,CAAC;QAAE,OAAO,GAAG,CAAC;IACvC,OAAO;QACH,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,UAAU;QAC/B,GAAG,EAAE,MAAM,CAAC,GAAG;QACf,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,KAAK,EAAE,GAAG,CAAC,KAAK;QAChB,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC;KACvE,CAAC;AACN,CAAC","sourcesContent":["import type { Size2D } from \"@/attributes/layout/size\";\r\nimport type { Theme } from \"@/project/config\";\r\n\r\nimport type { ClipDocument, VisualDocument } from \"./types\";\r\nimport { documentDuration } from \"./types\";\r\n\r\n/**\r\n * The **project** as data: a whole video, not one clip — and the one thing the\r\n * runtime plays.\r\n *\r\n * A clip document says what happens inside one composition. This says how those\r\n * compositions are laid against each other to make the finished thing — and it\r\n * is the same idea one level up, so it reads the same way: rows placed at times,\r\n * evaluated rather than played.\r\n *\r\n * ### One list of tracks\r\n *\r\n * A {@link ClipDocument} is a still, a composition *or* an audio document, and a\r\n * composition already carries both picture and sound — so there is one list for\r\n * all of it, not a second one for sound.\r\n *\r\n * **Array position is paint order**, first entry at the back, exactly as\r\n * position in a `fill` array is. A background is the first track; an overlay is\r\n * the last; a cross-dissolve is two tracks whose spans overlap and whose clips\r\n * fade themselves.\r\n */\r\nexport interface ProjectDocument {\r\n kind: \"project\";\r\n /** Human-readable project name. */\r\n name: string;\r\n /** Target frame rate. Defaults to 60. */\r\n fps?: number;\r\n /** Output canvas dimensions in pixels. Defaults to 1920×1080. */\r\n viewport?: Size2D;\r\n /** Visual design tokens (colors, typography) available to every clip. */\r\n theme?: Theme;\r\n /**\r\n * Every clip, placed. **Array position is paint order** — the first entry is\r\n * at the back.\r\n */\r\n tracks: Track[];\r\n}\r\n\r\n/**\r\n * One clip, placed on the project timeline.\r\n *\r\n * The clip document is **inline**, not referenced by id. A shared id would deduplicate JSON and\r\n * cost an id space, a resolution step and a dangling-reference failure mode — and\r\n * it would not buy what it looks like it buys, because the content that actually\r\n * repeats in an edit mostly has to *differ* per placement (a lower third with\r\n * different text, a chapter card with a different label).\r\n */\r\nexport interface Track {\r\n /**\r\n * Stable identity, so a host can address, reorder and diff one row — and so\r\n * the runtime can keep a track's built tree across an edit that leaves its\r\n * clip untouched.\r\n */\r\n id: string;\r\n /** Display label. */\r\n name?: string;\r\n /** What plays: a still, a composition, or sound. */\r\n clip: ClipDocument;\r\n /**\r\n * Second on the **project** timeline at which this clip's own clock reads 0.\r\n * Authored, never derived from the row above it, so a clip's start cannot\r\n * move because a neighbour changed. Defaults to 0.\r\n */\r\n startAt?: number;\r\n /**\r\n * Seconds this clip occupies. **Required.**\r\n *\r\n * So a project's length is arithmetic over its tracks rather than something\r\n * measured out of a media file or a timeline — a three-minute music bed\r\n * cannot silently make a thirty-second edit three minutes long. Longer than\r\n * the document holds its last frame; shorter cuts it off, which is also what\r\n * lets a **still**, a document with no length at all, be a backdrop.\r\n */\r\n duration: number;\r\n}\r\n\r\n/** Narrows an unknown document to a project. */\r\nexport function isProjectDocument(doc: unknown): doc is ProjectDocument {\r\n return typeof doc === \"object\" && doc !== null && (doc as ProjectDocument).kind === \"project\";\r\n}\r\n\r\n/**\r\n * The project a session plays, from either document it can open.\r\n *\r\n * A lone still or composition becomes the only track of a project around it.\r\n * Viewport and fps describe the output rather than the clip, so they come from\r\n * the caller.\r\n */\r\nexport function asProjectDocument(\r\n doc: ProjectDocument | VisualDocument,\r\n output: { name?: string; viewport?: Size2D; fps?: number } = {},\r\n): ProjectDocument {\r\n if (isProjectDocument(doc)) return doc;\r\n return {\r\n kind: \"project\",\r\n name: output.name ?? \"Untitled\",\r\n fps: output.fps,\r\n viewport: output.viewport,\r\n theme: doc.theme,\r\n tracks: [{ id: \"clip\", clip: doc, duration: documentDuration(doc) }],\r\n };\r\n}\r\n"]}
|
|
@@ -122,6 +122,13 @@ export type CommandTypeEntry = {
|
|
|
122
122
|
* renderer bug. A command opting in is saying its args reach `set()`.
|
|
123
123
|
*/
|
|
124
124
|
binds?: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* The method it runs on its target, where it runs one: the paint
|
|
127
|
+
* commands call the node's own `fillTo`, `strokeTo`, …. A node type
|
|
128
|
+
* without it, or one that withdrew it, does not take the command
|
|
129
|
+
* ({@link Registry.takesCommand}).
|
|
130
|
+
*/
|
|
131
|
+
method?: string;
|
|
125
132
|
} | {
|
|
126
133
|
key: string;
|
|
127
134
|
scope: "variable";
|
|
@@ -143,6 +150,8 @@ export interface NodeTypeRecord {
|
|
|
143
150
|
ctor: NodeConstructor;
|
|
144
151
|
/** Its commands, by the key a document names them with. */
|
|
145
152
|
commands: ReadonlyMap<string, NodeCommandEntry>;
|
|
153
|
+
/** Commands it inherits and withdrew (`withdraw`): never offered, still dispatched for a stored document that names one. */
|
|
154
|
+
withdrawn: ReadonlyMap<string, NodeCommandEntry>;
|
|
146
155
|
/**
|
|
147
156
|
* What the type declares about itself — see {@link NodeTypeDescriptor}.
|
|
148
157
|
*
|
|
@@ -164,8 +173,8 @@ export interface NodeCommandEntry {
|
|
|
164
173
|
args: readonly CommandArgDescriptor[];
|
|
165
174
|
}
|
|
166
175
|
/**
|
|
167
|
-
* How a registry compiles and links a node authored as a TS
|
|
168
|
-
*
|
|
176
|
+
* How a registry compiles and links a node authored as a TS source string
|
|
177
|
+
* that default-exports a component, via {@link Registry.addNodeFromSource}.
|
|
169
178
|
*
|
|
170
179
|
* Entirely host-supplied — `core` has no compiler dependency and cannot
|
|
171
180
|
* import the published `@motionscript/sdk` barrel itself (that package
|
|
@@ -181,12 +190,6 @@ export interface DynamicNodeConfig {
|
|
|
181
190
|
* script authored under either name keeps compiling unmodified.
|
|
182
191
|
*/
|
|
183
192
|
sdk: Record<string, unknown>;
|
|
184
|
-
/**
|
|
185
|
-
* What `require("@motionscript/sdk/jsx-runtime")` resolves to (also under
|
|
186
|
-
* the legacy `motionscript/jsx-runtime` and `motion-script/jsx-runtime`
|
|
187
|
-
* specifiers). Omit to reject a script that uses JSX outright.
|
|
188
|
-
*/
|
|
189
|
-
jsxRuntime?: Record<string, unknown>;
|
|
190
193
|
/**
|
|
191
194
|
* Further modules a script may `require`, by exact specifier — what a
|
|
192
195
|
* forked component imports beyond the sdk barrel:
|
|
@@ -196,7 +199,7 @@ export interface DynamicNodeConfig {
|
|
|
196
199
|
*/
|
|
197
200
|
modules?: Readonly<Record<string, unknown>>;
|
|
198
201
|
/**
|
|
199
|
-
* TS
|
|
202
|
+
* TS source → JS text (CommonJS). Host-injected, never bundled —
|
|
200
203
|
* `core` has no compiler dependency of its own.
|
|
201
204
|
*/
|
|
202
205
|
compile: (source: string) => Promise<string>;
|
|
@@ -314,6 +317,7 @@ export declare class Registry {
|
|
|
314
317
|
addCommand(key: string, factory: CommandFactory, options?: {
|
|
315
318
|
binds?: boolean;
|
|
316
319
|
args?: readonly CommandArg[];
|
|
320
|
+
method?: string;
|
|
317
321
|
}): this;
|
|
318
322
|
/**
|
|
319
323
|
* Register a command that writes a **variable** rather than a node.
|
|
@@ -335,6 +339,13 @@ export declare class Registry {
|
|
|
335
339
|
* source, and an `instanceof` against the original is false for it.
|
|
336
340
|
*/
|
|
337
341
|
nodeCommand(nodeTypeKey: string, commandKey: string): CommandFactory | undefined;
|
|
342
|
+
/**
|
|
343
|
+
* Whether a node of `nodeTypeKey` takes `commandKey`: one its own table
|
|
344
|
+
* publishes, or a node-less one that acts on a node (`to`, `fillTo`) unless
|
|
345
|
+
* the method it runs is one the type lacks or withdrew. What a host offers a
|
|
346
|
+
* node is its table and the node-less commands it takes.
|
|
347
|
+
*/
|
|
348
|
+
takesCommand(nodeTypeKey: string, commandKey: string): boolean;
|
|
338
349
|
/**
|
|
339
350
|
* Every command key available. With a node type, that type's own table;
|
|
340
351
|
* without one, the node-less commands. Sorted, so the order is stable.
|
|
@@ -419,8 +430,7 @@ export declare class Registry {
|
|
|
419
430
|
*
|
|
420
431
|
* `new Function` in-realm, never a blob module or a worker — see
|
|
421
432
|
* {@link DynamicNodeConfig} and `deny-globals.ts` for why. `require()` is
|
|
422
|
-
* locked to exactly `"@motionscript/sdk"
|
|
423
|
-
* (plus the earlier unscoped `"motionscript"` and `"motion-script"`
|
|
433
|
+
* locked to exactly `"@motionscript/sdk"` (plus the earlier unscoped `"motionscript"` and `"motion-script"`
|
|
424
434
|
* spellings, so a script written under either name still compiles) and
|
|
425
435
|
* the host's `modules`, own keys only so `require("constructor")` cannot
|
|
426
436
|
* reach `Object`. No relative
|
|
@@ -444,6 +454,8 @@ export declare class Registry {
|
|
|
444
454
|
* it answers from the prototype, before any field initializer has run.
|
|
445
455
|
*/
|
|
446
456
|
private _describeDimension;
|
|
457
|
+
/** The trees a type takes children from, off the prototype as its dimension is. */
|
|
458
|
+
private _describeHolds;
|
|
447
459
|
/**
|
|
448
460
|
* The control a value's own type implies. Only ever a fallback: a typed
|
|
449
461
|
* decorator states its kind, and a plain `@property` may too.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/document/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAiB,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAe,MAAM,iBAAiB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAAkB,KAAK,UAAU,EAAE,KAAK,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACvG,OAAO,EAEH,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,MAAM,EACd,MAAM,iCAAiC,CAAC;AAIzC,OAAO,KAAK,EAA0B,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAUxC;;;;;;;;;;;;;;;;;;;;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ACH,OAAO,CAAC,eAAe;IA6BvB,0DAA0D;IAC1D,OAAO,CAAC,QAAQ;IAShB;;;;;;OAMG;IACH,OAAO,CAAC,mBAAmB;IAc3B;;;;;OAKG;IACH,OAAO,CAAC,kBAAkB;IAK1B,mFAAmF;IACnF,OAAO,CAAC,cAAc;IAKtB;;;;;;;OAOG;IACH,OAAO,CAAC,UAAU;IAclB,sFAAsF;IACtF,OAAO,CAAC,aAAa;CAIxB"}
|
|
@@ -6,7 +6,7 @@ import { DENIED_GLOBALS } from "./deny-globals.js";
|
|
|
6
6
|
import { getNodeDescriptor } from "./node-decorator.js";
|
|
7
7
|
/**
|
|
8
8
|
* The specifiers a dynamic node's `require()` resolves to the host's sdk
|
|
9
|
-
* barrel
|
|
9
|
+
* barrel. The published
|
|
10
10
|
* name comes first; the two after it are the package's earlier unscoped names,
|
|
11
11
|
* kept so a script authored under either still compiles.
|
|
12
12
|
*/
|
|
@@ -36,12 +36,14 @@ export class Registry {
|
|
|
36
36
|
}
|
|
37
37
|
addNode(type, ctorOrOptions, maybeOptions) {
|
|
38
38
|
const isTwoArgForm = typeof ctorOrOptions === "function";
|
|
39
|
-
|
|
39
|
+
// A component (`component2d(...)`) registers as the node class it generated.
|
|
40
|
+
const given = (isTwoArgForm ? ctorOrOptions : type);
|
|
41
|
+
const cls = typeof given.node === "function" ? given.node : given;
|
|
40
42
|
const options = isTwoArgForm ? maybeOptions : ctorOrOptions;
|
|
41
43
|
const declared = isTwoArgForm ? type : getNodeDescriptor(cls);
|
|
42
44
|
if (declared === undefined) {
|
|
43
|
-
throw new Error(`${cls.name || "The class"}
|
|
44
|
-
`
|
|
45
|
+
throw new Error(`${cls.name || "The class"} is no component, so it has no document key. ` +
|
|
46
|
+
`Make it with component2d({ key }), or register it explicitly: addNode("myKey", TheClass).`);
|
|
45
47
|
}
|
|
46
48
|
const descriptor = typeof declared === "string" ? { key: declared } : declared;
|
|
47
49
|
const key = descriptor.key;
|
|
@@ -56,17 +58,20 @@ export class Registry {
|
|
|
56
58
|
}
|
|
57
59
|
}
|
|
58
60
|
const commands = new Map();
|
|
61
|
+
const withdrawn = new Map();
|
|
59
62
|
for (const meta of getCommandMeta(Object.create(cls.prototype))) {
|
|
60
|
-
commands.set(meta.key, { method: meta.method, args: this._describeArgs(meta.args) });
|
|
63
|
+
(meta.withdrawn ? withdrawn : commands).set(meta.key, { method: meta.method, args: this._describeArgs(meta.args) });
|
|
61
64
|
}
|
|
62
65
|
this._nodes.set(key, {
|
|
63
66
|
key,
|
|
64
67
|
ctor: cls,
|
|
65
68
|
commands,
|
|
69
|
+
withdrawn,
|
|
66
70
|
// Derived, never declared: see `NodeTypeDescriptor.properties`.
|
|
67
71
|
descriptor: {
|
|
68
72
|
...descriptor,
|
|
69
73
|
dimension: this._describeDimension(cls),
|
|
74
|
+
holds: this._describeHolds(cls),
|
|
70
75
|
properties: this._describeProperties(cls),
|
|
71
76
|
},
|
|
72
77
|
});
|
|
@@ -153,6 +158,7 @@ export class Registry {
|
|
|
153
158
|
factory,
|
|
154
159
|
...(options?.args ? { args: this._describeArgs(options.args) } : {}),
|
|
155
160
|
binds: options?.binds,
|
|
161
|
+
...(options?.method ? { method: options.method } : {}),
|
|
156
162
|
});
|
|
157
163
|
return this;
|
|
158
164
|
}
|
|
@@ -183,7 +189,8 @@ export class Registry {
|
|
|
183
189
|
* source, and an `instanceof` against the original is false for it.
|
|
184
190
|
*/
|
|
185
191
|
nodeCommand(nodeTypeKey, commandKey) {
|
|
186
|
-
const
|
|
192
|
+
const record = this._nodes.get(nodeTypeKey);
|
|
193
|
+
const entry = record?.commands.get(commandKey) ?? record?.withdrawn.get(commandKey);
|
|
187
194
|
if (!entry)
|
|
188
195
|
return undefined;
|
|
189
196
|
return (target, args, duration, easing) => {
|
|
@@ -199,6 +206,27 @@ export class Registry {
|
|
|
199
206
|
.call(target, { data, duration, easing });
|
|
200
207
|
};
|
|
201
208
|
}
|
|
209
|
+
/**
|
|
210
|
+
* Whether a node of `nodeTypeKey` takes `commandKey`: one its own table
|
|
211
|
+
* publishes, or a node-less one that acts on a node (`to`, `fillTo`) unless
|
|
212
|
+
* the method it runs is one the type lacks or withdrew. What a host offers a
|
|
213
|
+
* node is its table and the node-less commands it takes.
|
|
214
|
+
*/
|
|
215
|
+
takesCommand(nodeTypeKey, commandKey) {
|
|
216
|
+
const record = this._nodes.get(nodeTypeKey);
|
|
217
|
+
if (!record)
|
|
218
|
+
return false;
|
|
219
|
+
if (record.commands.has(commandKey))
|
|
220
|
+
return true;
|
|
221
|
+
const global = this._commands.get(commandKey);
|
|
222
|
+
if (global?.scope !== "node")
|
|
223
|
+
return false;
|
|
224
|
+
if (global.method === undefined)
|
|
225
|
+
return true;
|
|
226
|
+
if (record.withdrawn.has(global.method))
|
|
227
|
+
return false;
|
|
228
|
+
return typeof record.ctor.prototype[global.method] === "function";
|
|
229
|
+
}
|
|
202
230
|
/**
|
|
203
231
|
* Every command key available. With a node type, that type's own table;
|
|
204
232
|
* without one, the node-less commands. Sorted, so the order is stable.
|
|
@@ -349,28 +377,20 @@ export class Registry {
|
|
|
349
377
|
*
|
|
350
378
|
* `new Function` in-realm, never a blob module or a worker — see
|
|
351
379
|
* {@link DynamicNodeConfig} and `deny-globals.ts` for why. `require()` is
|
|
352
|
-
* locked to exactly `"@motionscript/sdk"
|
|
353
|
-
* (plus the earlier unscoped `"motionscript"` and `"motion-script"`
|
|
380
|
+
* locked to exactly `"@motionscript/sdk"` (plus the earlier unscoped `"motionscript"` and `"motion-script"`
|
|
354
381
|
* spellings, so a script written under either name still compiles) and
|
|
355
382
|
* the host's `modules`, own keys only so `require("constructor")` cannot
|
|
356
383
|
* reach `Object`. No relative
|
|
357
384
|
* imports, since a dynamic node is one script, not a package.
|
|
358
385
|
*/
|
|
359
386
|
_evalNodeModule(js) {
|
|
360
|
-
const { sdk,
|
|
387
|
+
const { sdk, modules } = this._dynamicNodes;
|
|
361
388
|
const require = (specifier) => {
|
|
362
389
|
if (SDK_SPECIFIERS.includes(specifier))
|
|
363
390
|
return sdk;
|
|
364
|
-
if (jsxRuntime && SDK_SPECIFIERS.some((name) => specifier === `${name}/jsx-runtime`)) {
|
|
365
|
-
return jsxRuntime;
|
|
366
|
-
}
|
|
367
391
|
if (modules && Object.hasOwn(modules, specifier))
|
|
368
392
|
return modules[specifier];
|
|
369
|
-
const available = [
|
|
370
|
-
"@motionscript/sdk",
|
|
371
|
-
...(jsxRuntime ? ["@motionscript/sdk/jsx-runtime"] : []),
|
|
372
|
-
...Object.keys(modules ?? {}),
|
|
373
|
-
];
|
|
393
|
+
const available = ["@motionscript/sdk", ...Object.keys(modules ?? {})];
|
|
374
394
|
throw new Error(`"${specifier}" isn't available to a custom node. It can require ` +
|
|
375
395
|
`${available.map((s) => `"${s}"`).join(", ")}; a host supplies more through \`dynamicNodes.modules\`.`);
|
|
376
396
|
};
|
|
@@ -382,8 +402,8 @@ export class Registry {
|
|
|
382
402
|
const factory = new Function("exports", "require", "module", ...DENIED_GLOBALS, `"use strict";\nreturn function () {\n${js}\n};`);
|
|
383
403
|
factory(mod.exports, require, mod)();
|
|
384
404
|
const ctor = mod.exports.default;
|
|
385
|
-
if (typeof ctor !== "function" || getNodeDescriptor(ctor) === undefined) {
|
|
386
|
-
throw new Error("This script must `export default` a
|
|
405
|
+
if (typeof ctor !== "function" || getNodeDescriptor(typeof ctor.node === "function" ? ctor.node : ctor) === undefined) {
|
|
406
|
+
throw new Error("This script must `export default` a component: `component2d({ key: \"…\", … })`.");
|
|
387
407
|
}
|
|
388
408
|
return ctor;
|
|
389
409
|
}
|
|
@@ -406,6 +426,8 @@ export class Registry {
|
|
|
406
426
|
_describeProperties(ctor) {
|
|
407
427
|
const out = {};
|
|
408
428
|
for (const meta of getPropertyMeta(Object.create(ctor.prototype))) {
|
|
429
|
+
if (meta.withdrawn)
|
|
430
|
+
continue;
|
|
409
431
|
const editor = meta.editor ?? {};
|
|
410
432
|
out[meta.key] = {
|
|
411
433
|
...editor,
|
|
@@ -425,6 +447,11 @@ export class Registry {
|
|
|
425
447
|
const dimension = Object.create(ctor.prototype).dimension;
|
|
426
448
|
return typeof dimension === "string" ? dimension : undefined;
|
|
427
449
|
}
|
|
450
|
+
/** The trees a type takes children from, off the prototype as its dimension is. */
|
|
451
|
+
_describeHolds(ctor) {
|
|
452
|
+
const trees = Object.create(ctor.prototype)._childTrees;
|
|
453
|
+
return Array.isArray(trees) ? [...trees] : undefined;
|
|
454
|
+
}
|
|
428
455
|
/**
|
|
429
456
|
* The control a value's own type implies. Only ever a fallback: a typed
|
|
430
457
|
* decorator states its kind, and a plain `@property` may too.
|