@motion-script/core 0.1.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/README.md +69 -0
- package/dist/assets/catalog.d.ts +83 -0
- package/dist/assets/catalog.d.ts.map +1 -0
- package/dist/assets/catalog.js +110 -0
- package/dist/assets/catalog.js.map +1 -0
- package/dist/assets/index.d.ts +5 -0
- package/dist/assets/index.d.ts.map +1 -0
- package/dist/assets/index.js +4 -0
- package/dist/assets/index.js.map +1 -0
- package/dist/assets/manager.d.ts +32 -0
- package/dist/assets/manager.d.ts.map +1 -0
- package/dist/assets/manager.js +108 -0
- package/dist/assets/manager.js.map +1 -0
- package/dist/assets/manager.test.d.ts +2 -0
- package/dist/assets/manager.test.d.ts.map +1 -0
- package/dist/assets/manager.test.js +133 -0
- package/dist/assets/manager.test.js.map +1 -0
- package/dist/assets/manifest.d.ts +38 -0
- package/dist/assets/manifest.d.ts.map +1 -0
- package/dist/assets/manifest.js +2 -0
- package/dist/assets/manifest.js.map +1 -0
- package/dist/assets/record.d.ts +40 -0
- package/dist/assets/record.d.ts.map +1 -0
- package/dist/assets/record.js +2 -0
- package/dist/assets/record.js.map +1 -0
- package/dist/assets/tracker.d.ts +69 -0
- package/dist/assets/tracker.d.ts.map +1 -0
- package/dist/assets/tracker.js +178 -0
- package/dist/assets/tracker.js.map +1 -0
- package/dist/attributes/audio/request.d.ts +21 -0
- package/dist/attributes/audio/request.d.ts.map +1 -0
- package/dist/attributes/audio/request.js +2 -0
- package/dist/attributes/audio/request.js.map +1 -0
- package/dist/attributes/audio/sound.d.ts +83 -0
- package/dist/attributes/audio/sound.d.ts.map +1 -0
- package/dist/attributes/audio/sound.js +106 -0
- package/dist/attributes/audio/sound.js.map +1 -0
- package/dist/attributes/index.d.ts +18 -0
- package/dist/attributes/index.d.ts.map +1 -0
- package/dist/attributes/index.js +17 -0
- package/dist/attributes/index.js.map +1 -0
- package/dist/attributes/layout/bounds.d.ts +12 -0
- package/dist/attributes/layout/bounds.d.ts.map +1 -0
- package/dist/attributes/layout/bounds.js +2 -0
- package/dist/attributes/layout/bounds.js.map +1 -0
- package/dist/attributes/layout/constraints.d.ts +6 -0
- package/dist/attributes/layout/constraints.d.ts.map +1 -0
- package/dist/attributes/layout/constraints.js +2 -0
- package/dist/attributes/layout/constraints.js.map +1 -0
- package/dist/attributes/layout/index.d.ts +6 -0
- package/dist/attributes/layout/index.d.ts.map +1 -0
- package/dist/attributes/layout/index.js +2 -0
- package/dist/attributes/layout/index.js.map +1 -0
- package/dist/attributes/layout/padding.d.ts +26 -0
- package/dist/attributes/layout/padding.d.ts.map +1 -0
- package/dist/attributes/layout/padding.js +17 -0
- package/dist/attributes/layout/padding.js.map +1 -0
- package/dist/attributes/layout/padding.test.d.ts +2 -0
- package/dist/attributes/layout/padding.test.d.ts.map +1 -0
- package/dist/attributes/layout/padding.test.js +32 -0
- package/dist/attributes/layout/padding.test.js.map +1 -0
- package/dist/attributes/layout/size.d.ts +14 -0
- package/dist/attributes/layout/size.d.ts.map +1 -0
- package/dist/attributes/layout/size.js +2 -0
- package/dist/attributes/layout/size.js.map +1 -0
- package/dist/attributes/layout/vector2.d.ts +8 -0
- package/dist/attributes/layout/vector2.d.ts.map +1 -0
- package/dist/attributes/layout/vector2.js +8 -0
- package/dist/attributes/layout/vector2.js.map +1 -0
- package/dist/attributes/layout/vector2.test.d.ts +2 -0
- package/dist/attributes/layout/vector2.test.d.ts.map +1 -0
- package/dist/attributes/layout/vector2.test.js +23 -0
- package/dist/attributes/layout/vector2.test.js.map +1 -0
- package/dist/attributes/mask/boolean.d.ts +2 -0
- package/dist/attributes/mask/boolean.d.ts.map +1 -0
- package/dist/attributes/mask/boolean.js +2 -0
- package/dist/attributes/mask/boolean.js.map +1 -0
- package/dist/attributes/mask/mask.d.ts +9 -0
- package/dist/attributes/mask/mask.d.ts.map +1 -0
- package/dist/attributes/mask/mask.js +2 -0
- package/dist/attributes/mask/mask.js.map +1 -0
- package/dist/attributes/properties/decorator.d.ts +45 -0
- package/dist/attributes/properties/decorator.d.ts.map +1 -0
- package/dist/attributes/properties/decorator.js +72 -0
- package/dist/attributes/properties/decorator.js.map +1 -0
- package/dist/attributes/properties/decorator.test.d.ts +2 -0
- package/dist/attributes/properties/decorator.test.d.ts.map +1 -0
- package/dist/attributes/properties/decorator.test.js +52 -0
- package/dist/attributes/properties/decorator.test.js.map +1 -0
- package/dist/attributes/shape/corners/border-radius.d.ts +32 -0
- package/dist/attributes/shape/corners/border-radius.d.ts.map +1 -0
- package/dist/attributes/shape/corners/border-radius.js +50 -0
- package/dist/attributes/shape/corners/border-radius.js.map +1 -0
- package/dist/attributes/shape/corners/border-radius.test.d.ts +2 -0
- package/dist/attributes/shape/corners/border-radius.test.d.ts.map +1 -0
- package/dist/attributes/shape/corners/border-radius.test.js +52 -0
- package/dist/attributes/shape/corners/border-radius.test.js.map +1 -0
- package/dist/attributes/shape/corners/index.d.ts +2 -0
- package/dist/attributes/shape/corners/index.d.ts.map +1 -0
- package/dist/attributes/shape/corners/index.js +2 -0
- package/dist/attributes/shape/corners/index.js.map +1 -0
- package/dist/attributes/shape/effects/chain.d.ts +145 -0
- package/dist/attributes/shape/effects/chain.d.ts.map +1 -0
- package/dist/attributes/shape/effects/chain.js +163 -0
- package/dist/attributes/shape/effects/chain.js.map +1 -0
- package/dist/attributes/shape/effects/chain.test.d.ts +2 -0
- package/dist/attributes/shape/effects/chain.test.d.ts.map +1 -0
- package/dist/attributes/shape/effects/chain.test.js +63 -0
- package/dist/attributes/shape/effects/chain.test.js.map +1 -0
- package/dist/attributes/shape/effects/effect-data.d.ts +18 -0
- package/dist/attributes/shape/effects/effect-data.d.ts.map +1 -0
- package/dist/attributes/shape/effects/effect-data.js +2 -0
- package/dist/attributes/shape/effects/effect-data.js.map +1 -0
- package/dist/attributes/shape/effects/implementations/background-blur.d.ts +13 -0
- package/dist/attributes/shape/effects/implementations/background-blur.d.ts.map +1 -0
- package/dist/attributes/shape/effects/implementations/background-blur.js +6 -0
- package/dist/attributes/shape/effects/implementations/background-blur.js.map +1 -0
- package/dist/attributes/shape/effects/implementations/bloom.d.ts +12 -0
- package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -0
- package/dist/attributes/shape/effects/implementations/bloom.js +11 -0
- package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -0
- package/dist/attributes/shape/effects/implementations/blur.d.ts +7 -0
- package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -0
- package/dist/attributes/shape/effects/implementations/blur.js +6 -0
- package/dist/attributes/shape/effects/implementations/blur.js.map +1 -0
- package/dist/attributes/shape/effects/implementations/bulge-pinch.d.ts +13 -0
- package/dist/attributes/shape/effects/implementations/bulge-pinch.d.ts.map +1 -0
- package/dist/attributes/shape/effects/implementations/bulge-pinch.js +15 -0
- package/dist/attributes/shape/effects/implementations/bulge-pinch.js.map +1 -0
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +10 -0
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -0
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +10 -0
- package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -0
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts +7 -0
- package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -0
- package/dist/attributes/shape/effects/implementations/grayscale.js +6 -0
- package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -0
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts +8 -0
- package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -0
- package/dist/attributes/shape/effects/implementations/pixelate.js +10 -0
- package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -0
- package/dist/attributes/shape/effects/implementations/sksl.d.ts +39 -0
- package/dist/attributes/shape/effects/implementations/sksl.d.ts.map +1 -0
- package/dist/attributes/shape/effects/implementations/sksl.js +48 -0
- package/dist/attributes/shape/effects/implementations/sksl.js.map +1 -0
- package/dist/attributes/shape/effects/implementations/texture.d.ts +9 -0
- package/dist/attributes/shape/effects/implementations/texture.d.ts.map +1 -0
- package/dist/attributes/shape/effects/implementations/texture.js +11 -0
- package/dist/attributes/shape/effects/implementations/texture.js.map +1 -0
- package/dist/attributes/shape/effects/implementations/vintage.d.ts +10 -0
- package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -0
- package/dist/attributes/shape/effects/implementations/vintage.js +10 -0
- package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -0
- package/dist/attributes/shape/effects/implementations/zoom.d.ts +14 -0
- package/dist/attributes/shape/effects/implementations/zoom.d.ts.map +1 -0
- package/dist/attributes/shape/effects/implementations/zoom.js +13 -0
- package/dist/attributes/shape/effects/implementations/zoom.js.map +1 -0
- package/dist/attributes/shape/effects/index.d.ts +19 -0
- package/dist/attributes/shape/effects/index.d.ts.map +1 -0
- package/dist/attributes/shape/effects/index.js +4 -0
- package/dist/attributes/shape/effects/index.js.map +1 -0
- package/dist/attributes/shape/effects/registry.d.ts +4 -0
- package/dist/attributes/shape/effects/registry.d.ts.map +1 -0
- package/dist/attributes/shape/effects/registry.js +51 -0
- package/dist/attributes/shape/effects/registry.js.map +1 -0
- package/dist/attributes/shape/effects/union.d.ts +14 -0
- package/dist/attributes/shape/effects/union.d.ts.map +1 -0
- package/dist/attributes/shape/effects/union.js +2 -0
- package/dist/attributes/shape/effects/union.js.map +1 -0
- package/dist/attributes/shape/fill/blend.d.ts +13 -0
- package/dist/attributes/shape/fill/blend.d.ts.map +1 -0
- package/dist/attributes/shape/fill/blend.js +32 -0
- package/dist/attributes/shape/fill/blend.js.map +1 -0
- package/dist/attributes/shape/fill/blend.test.d.ts +2 -0
- package/dist/attributes/shape/fill/blend.test.d.ts.map +1 -0
- package/dist/attributes/shape/fill/blend.test.js +18 -0
- package/dist/attributes/shape/fill/blend.test.js.map +1 -0
- package/dist/attributes/shape/fill/chain.d.ts +127 -0
- package/dist/attributes/shape/fill/chain.d.ts.map +1 -0
- package/dist/attributes/shape/fill/chain.js +116 -0
- package/dist/attributes/shape/fill/chain.js.map +1 -0
- package/dist/attributes/shape/fill/chain.test.d.ts +2 -0
- package/dist/attributes/shape/fill/chain.test.d.ts.map +1 -0
- package/dist/attributes/shape/fill/chain.test.js +92 -0
- package/dist/attributes/shape/fill/chain.test.js.map +1 -0
- package/dist/attributes/shape/fill/color/constants.d.ts +13 -0
- package/dist/attributes/shape/fill/color/constants.d.ts.map +1 -0
- package/dist/attributes/shape/fill/color/constants.js +162 -0
- package/dist/attributes/shape/fill/color/constants.js.map +1 -0
- package/dist/attributes/shape/fill/color/parser.d.ts +39 -0
- package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -0
- package/dist/attributes/shape/fill/color/parser.js +212 -0
- package/dist/attributes/shape/fill/color/parser.js.map +1 -0
- package/dist/attributes/shape/fill/color/parser.test.d.ts +2 -0
- package/dist/attributes/shape/fill/color/parser.test.d.ts.map +1 -0
- package/dist/attributes/shape/fill/color/parser.test.js +99 -0
- package/dist/attributes/shape/fill/color/parser.test.js.map +1 -0
- package/dist/attributes/shape/fill/implementations/color.d.ts +17 -0
- package/dist/attributes/shape/fill/implementations/color.d.ts.map +1 -0
- package/dist/attributes/shape/fill/implementations/color.js +24 -0
- package/dist/attributes/shape/fill/implementations/color.js.map +1 -0
- package/dist/attributes/shape/fill/implementations/conic-gradient.d.ts +24 -0
- package/dist/attributes/shape/fill/implementations/conic-gradient.d.ts.map +1 -0
- package/dist/attributes/shape/fill/implementations/conic-gradient.js +33 -0
- package/dist/attributes/shape/fill/implementations/conic-gradient.js.map +1 -0
- package/dist/attributes/shape/fill/implementations/image.d.ts +27 -0
- package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -0
- package/dist/attributes/shape/fill/implementations/image.js +16 -0
- package/dist/attributes/shape/fill/implementations/image.js.map +1 -0
- package/dist/attributes/shape/fill/implementations/linear-gradient.d.ts +24 -0
- package/dist/attributes/shape/fill/implementations/linear-gradient.d.ts.map +1 -0
- package/dist/attributes/shape/fill/implementations/linear-gradient.js +33 -0
- package/dist/attributes/shape/fill/implementations/linear-gradient.js.map +1 -0
- package/dist/attributes/shape/fill/implementations/noise.d.ts +22 -0
- package/dist/attributes/shape/fill/implementations/noise.d.ts.map +1 -0
- package/dist/attributes/shape/fill/implementations/noise.js +35 -0
- package/dist/attributes/shape/fill/implementations/noise.js.map +1 -0
- package/dist/attributes/shape/fill/implementations/radial-gradient.d.ts +24 -0
- package/dist/attributes/shape/fill/implementations/radial-gradient.d.ts.map +1 -0
- package/dist/attributes/shape/fill/implementations/radial-gradient.js +33 -0
- package/dist/attributes/shape/fill/implementations/radial-gradient.js.map +1 -0
- package/dist/attributes/shape/fill/implementations/stripe.d.ts +23 -0
- package/dist/attributes/shape/fill/implementations/stripe.d.ts.map +1 -0
- package/dist/attributes/shape/fill/implementations/stripe.js +36 -0
- package/dist/attributes/shape/fill/implementations/stripe.js.map +1 -0
- package/dist/attributes/shape/fill/implementations/video.d.ts +41 -0
- package/dist/attributes/shape/fill/implementations/video.d.ts.map +1 -0
- package/dist/attributes/shape/fill/implementations/video.js +51 -0
- package/dist/attributes/shape/fill/implementations/video.js.map +1 -0
- package/dist/attributes/shape/fill/index.d.ts +18 -0
- package/dist/attributes/shape/fill/index.d.ts.map +1 -0
- package/dist/attributes/shape/fill/index.js +5 -0
- package/dist/attributes/shape/fill/index.js.map +1 -0
- package/dist/attributes/shape/fill/lerp.d.ts +11 -0
- package/dist/attributes/shape/fill/lerp.d.ts.map +1 -0
- package/dist/attributes/shape/fill/lerp.js +17 -0
- package/dist/attributes/shape/fill/lerp.js.map +1 -0
- package/dist/attributes/shape/fill/lerp.test.d.ts +2 -0
- package/dist/attributes/shape/fill/lerp.test.d.ts.map +1 -0
- package/dist/attributes/shape/fill/lerp.test.js +18 -0
- package/dist/attributes/shape/fill/lerp.test.js.map +1 -0
- package/dist/attributes/shape/fill/registry.d.ts +28 -0
- package/dist/attributes/shape/fill/registry.d.ts.map +1 -0
- package/dist/attributes/shape/fill/registry.js +83 -0
- package/dist/attributes/shape/fill/registry.js.map +1 -0
- package/dist/attributes/shape/fill/union.d.ts +50 -0
- package/dist/attributes/shape/fill/union.d.ts.map +1 -0
- package/dist/attributes/shape/fill/union.js +11 -0
- package/dist/attributes/shape/fill/union.js.map +1 -0
- package/dist/attributes/shape/filters/chain.d.ts +65 -0
- package/dist/attributes/shape/filters/chain.d.ts.map +1 -0
- package/dist/attributes/shape/filters/chain.js +83 -0
- package/dist/attributes/shape/filters/chain.js.map +1 -0
- package/dist/attributes/shape/filters/chain.test.d.ts +2 -0
- package/dist/attributes/shape/filters/chain.test.d.ts.map +1 -0
- package/dist/attributes/shape/filters/chain.test.js +49 -0
- package/dist/attributes/shape/filters/chain.test.js.map +1 -0
- package/dist/attributes/shape/filters/implementations/alpha.d.ts +7 -0
- package/dist/attributes/shape/filters/implementations/alpha.d.ts.map +1 -0
- package/dist/attributes/shape/filters/implementations/alpha.js +7 -0
- package/dist/attributes/shape/filters/implementations/alpha.js.map +1 -0
- package/dist/attributes/shape/filters/implementations/blur.d.ts +7 -0
- package/dist/attributes/shape/filters/implementations/blur.d.ts.map +1 -0
- package/dist/attributes/shape/filters/implementations/blur.js +7 -0
- package/dist/attributes/shape/filters/implementations/blur.js.map +1 -0
- package/dist/attributes/shape/filters/implementations/color-adjustment.d.ts +26 -0
- package/dist/attributes/shape/filters/implementations/color-adjustment.d.ts.map +1 -0
- package/dist/attributes/shape/filters/implementations/color-adjustment.js +26 -0
- package/dist/attributes/shape/filters/implementations/color-adjustment.js.map +1 -0
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +13 -0
- package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -0
- package/dist/attributes/shape/filters/implementations/color-matrix.js +12 -0
- package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -0
- package/dist/attributes/shape/filters/implementations/curves.d.ts +17 -0
- package/dist/attributes/shape/filters/implementations/curves.d.ts.map +1 -0
- package/dist/attributes/shape/filters/implementations/curves.js +18 -0
- package/dist/attributes/shape/filters/implementations/curves.js.map +1 -0
- package/dist/attributes/shape/filters/implementations/exposure.d.ts +7 -0
- package/dist/attributes/shape/filters/implementations/exposure.d.ts.map +1 -0
- package/dist/attributes/shape/filters/implementations/exposure.js +7 -0
- package/dist/attributes/shape/filters/implementations/exposure.js.map +1 -0
- package/dist/attributes/shape/filters/implementations/grayscale.d.ts +7 -0
- package/dist/attributes/shape/filters/implementations/grayscale.d.ts.map +1 -0
- package/dist/attributes/shape/filters/implementations/grayscale.js +7 -0
- package/dist/attributes/shape/filters/implementations/grayscale.js.map +1 -0
- package/dist/attributes/shape/filters/index.d.ts +16 -0
- package/dist/attributes/shape/filters/index.d.ts.map +1 -0
- package/dist/attributes/shape/filters/index.js +5 -0
- package/dist/attributes/shape/filters/index.js.map +1 -0
- package/dist/attributes/shape/filters/registry.d.ts +37 -0
- package/dist/attributes/shape/filters/registry.d.ts.map +1 -0
- package/dist/attributes/shape/filters/registry.js +60 -0
- package/dist/attributes/shape/filters/registry.js.map +1 -0
- package/dist/attributes/shape/filters/registry.test.d.ts +5 -0
- package/dist/attributes/shape/filters/registry.test.d.ts.map +1 -0
- package/dist/attributes/shape/filters/registry.test.js +75 -0
- package/dist/attributes/shape/filters/registry.test.js.map +1 -0
- package/dist/attributes/shape/filters/union.d.ts +10 -0
- package/dist/attributes/shape/filters/union.d.ts.map +1 -0
- package/dist/attributes/shape/filters/union.js +2 -0
- package/dist/attributes/shape/filters/union.js.map +1 -0
- package/dist/attributes/shape/path/bezier.d.ts +28 -0
- package/dist/attributes/shape/path/bezier.d.ts.map +1 -0
- package/dist/attributes/shape/path/bezier.js +76 -0
- package/dist/attributes/shape/path/bezier.js.map +1 -0
- package/dist/attributes/shape/path/bezier.test.d.ts +2 -0
- package/dist/attributes/shape/path/bezier.test.d.ts.map +1 -0
- package/dist/attributes/shape/path/bezier.test.js +85 -0
- package/dist/attributes/shape/path/bezier.test.js.map +1 -0
- package/dist/attributes/shape/path/dash.d.ts +15 -0
- package/dist/attributes/shape/path/dash.d.ts.map +1 -0
- package/dist/attributes/shape/path/dash.js +299 -0
- package/dist/attributes/shape/path/dash.js.map +1 -0
- package/dist/attributes/shape/path/dash.test.d.ts +2 -0
- package/dist/attributes/shape/path/dash.test.d.ts.map +1 -0
- package/dist/attributes/shape/path/dash.test.js +36 -0
- package/dist/attributes/shape/path/dash.test.js.map +1 -0
- package/dist/attributes/shape/path/index.d.ts +5 -0
- package/dist/attributes/shape/path/index.d.ts.map +1 -0
- package/dist/attributes/shape/path/index.js +5 -0
- package/dist/attributes/shape/path/index.js.map +1 -0
- package/dist/attributes/shape/path/length.d.ts +14 -0
- package/dist/attributes/shape/path/length.d.ts.map +1 -0
- package/dist/attributes/shape/path/length.js +169 -0
- package/dist/attributes/shape/path/length.js.map +1 -0
- package/dist/attributes/shape/path/length.test.d.ts +2 -0
- package/dist/attributes/shape/path/length.test.d.ts.map +1 -0
- package/dist/attributes/shape/path/length.test.js +56 -0
- package/dist/attributes/shape/path/length.test.js.map +1 -0
- package/dist/attributes/shape/path/subpath.d.ts +15 -0
- package/dist/attributes/shape/path/subpath.d.ts.map +1 -0
- package/dist/attributes/shape/path/subpath.js +486 -0
- package/dist/attributes/shape/path/subpath.js.map +1 -0
- package/dist/attributes/shape/path/subpath.test.d.ts +2 -0
- package/dist/attributes/shape/path/subpath.test.d.ts.map +1 -0
- package/dist/attributes/shape/path/subpath.test.js +54 -0
- package/dist/attributes/shape/path/subpath.test.js.map +1 -0
- package/dist/attributes/shape/shadow/index.d.ts +5 -0
- package/dist/attributes/shape/shadow/index.d.ts.map +1 -0
- package/dist/attributes/shape/shadow/index.js +3 -0
- package/dist/attributes/shape/shadow/index.js.map +1 -0
- package/dist/attributes/shape/shadow/lerp.d.ts +3 -0
- package/dist/attributes/shape/shadow/lerp.d.ts.map +1 -0
- package/dist/attributes/shape/shadow/lerp.js +30 -0
- package/dist/attributes/shape/shadow/lerp.js.map +1 -0
- package/dist/attributes/shape/shadow/resolver.d.ts +22 -0
- package/dist/attributes/shape/shadow/resolver.d.ts.map +1 -0
- package/dist/attributes/shape/shadow/resolver.js +17 -0
- package/dist/attributes/shape/shadow/resolver.js.map +1 -0
- package/dist/attributes/shape/stroke/index.d.ts +5 -0
- package/dist/attributes/shape/stroke/index.d.ts.map +1 -0
- package/dist/attributes/shape/stroke/index.js +3 -0
- package/dist/attributes/shape/stroke/index.js.map +1 -0
- package/dist/attributes/shape/stroke/lerp.d.ts +3 -0
- package/dist/attributes/shape/stroke/lerp.d.ts.map +1 -0
- package/dist/attributes/shape/stroke/lerp.js +30 -0
- package/dist/attributes/shape/stroke/lerp.js.map +1 -0
- package/dist/attributes/shape/stroke/mapper.d.ts +24 -0
- package/dist/attributes/shape/stroke/mapper.d.ts.map +1 -0
- package/dist/attributes/shape/stroke/mapper.js +25 -0
- package/dist/attributes/shape/stroke/mapper.js.map +1 -0
- package/dist/attributes/text/align.d.ts +2 -0
- package/dist/attributes/text/align.d.ts.map +1 -0
- package/dist/attributes/text/align.js +2 -0
- package/dist/attributes/text/align.js.map +1 -0
- package/dist/attributes/text/lerp.d.ts +8 -0
- package/dist/attributes/text/lerp.d.ts.map +1 -0
- package/dist/attributes/text/lerp.js +38 -0
- package/dist/attributes/text/lerp.js.map +1 -0
- package/dist/attributes/text/lerp.test.d.ts +2 -0
- package/dist/attributes/text/lerp.test.d.ts.map +1 -0
- package/dist/attributes/text/lerp.test.js +39 -0
- package/dist/attributes/text/lerp.test.js.map +1 -0
- package/dist/attributes/text/span.d.ts +37 -0
- package/dist/attributes/text/span.d.ts.map +1 -0
- package/dist/attributes/text/span.js +2 -0
- package/dist/attributes/text/span.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/jsx/jsx-dev-runtime.d.ts +19 -0
- package/dist/jsx/jsx-dev-runtime.d.ts.map +1 -0
- package/dist/jsx/jsx-dev-runtime.js +16 -0
- package/dist/jsx/jsx-dev-runtime.js.map +1 -0
- package/dist/jsx/jsx-runtime.d.ts +19 -0
- package/dist/jsx/jsx-runtime.d.ts.map +1 -0
- package/dist/jsx/jsx-runtime.js +16 -0
- package/dist/jsx/jsx-runtime.js.map +1 -0
- package/dist/layout/flex.d.ts +66 -0
- package/dist/layout/flex.d.ts.map +1 -0
- package/dist/layout/flex.js +196 -0
- package/dist/layout/flex.js.map +1 -0
- package/dist/layout/flex.test.d.ts +2 -0
- package/dist/layout/flex.test.d.ts.map +1 -0
- package/dist/layout/flex.test.js +336 -0
- package/dist/layout/flex.test.js.map +1 -0
- package/dist/layout/grid.d.ts +38 -0
- package/dist/layout/grid.d.ts.map +1 -0
- package/dist/layout/grid.js +117 -0
- package/dist/layout/grid.js.map +1 -0
- package/dist/layout/index.d.ts +6 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/index.js +6 -0
- package/dist/layout/index.js.map +1 -0
- package/dist/layout/padding.d.ts +19 -0
- package/dist/layout/padding.d.ts.map +1 -0
- package/dist/layout/padding.js +16 -0
- package/dist/layout/padding.js.map +1 -0
- package/dist/layout/padding.test.d.ts +2 -0
- package/dist/layout/padding.test.d.ts.map +1 -0
- package/dist/layout/padding.test.js +39 -0
- package/dist/layout/padding.test.js.map +1 -0
- package/dist/layout/size-resolver.d.ts +13 -0
- package/dist/layout/size-resolver.d.ts.map +1 -0
- package/dist/layout/size-resolver.js +22 -0
- package/dist/layout/size-resolver.js.map +1 -0
- package/dist/layout/size-resolver.test.d.ts +2 -0
- package/dist/layout/size-resolver.test.d.ts.map +1 -0
- package/dist/layout/size-resolver.test.js +24 -0
- package/dist/layout/size-resolver.test.js.map +1 -0
- package/dist/layout/tweens.d.ts +5 -0
- package/dist/layout/tweens.d.ts.map +1 -0
- package/dist/layout/tweens.js +16 -0
- package/dist/layout/tweens.js.map +1 -0
- package/dist/layout/tweens.test.d.ts +2 -0
- package/dist/layout/tweens.test.d.ts.map +1 -0
- package/dist/layout/tweens.test.js +26 -0
- package/dist/layout/tweens.test.js.map +1 -0
- package/dist/nodes/base/boolean-node.d.ts +14 -0
- package/dist/nodes/base/boolean-node.d.ts.map +1 -0
- package/dist/nodes/base/boolean-node.js +34 -0
- package/dist/nodes/base/boolean-node.js.map +1 -0
- package/dist/nodes/base/camera-node.d.ts +27 -0
- package/dist/nodes/base/camera-node.d.ts.map +1 -0
- package/dist/nodes/base/camera-node.js +31 -0
- package/dist/nodes/base/camera-node.js.map +1 -0
- package/dist/nodes/base/mask-node.d.ts +14 -0
- package/dist/nodes/base/mask-node.d.ts.map +1 -0
- package/dist/nodes/base/mask-node.js +37 -0
- package/dist/nodes/base/mask-node.js.map +1 -0
- package/dist/nodes/base/node.d.ts +284 -0
- package/dist/nodes/base/node.d.ts.map +1 -0
- package/dist/nodes/base/node.js +800 -0
- package/dist/nodes/base/node.js.map +1 -0
- package/dist/nodes/base/scene-node.d.ts +45 -0
- package/dist/nodes/base/scene-node.d.ts.map +1 -0
- package/dist/nodes/base/scene-node.js +122 -0
- package/dist/nodes/base/scene-node.js.map +1 -0
- package/dist/nodes/geometry/ellipse-node.d.ts +18 -0
- package/dist/nodes/geometry/ellipse-node.d.ts.map +1 -0
- package/dist/nodes/geometry/ellipse-node.js +55 -0
- package/dist/nodes/geometry/ellipse-node.js.map +1 -0
- package/dist/nodes/geometry/grid-node.d.ts +40 -0
- package/dist/nodes/geometry/grid-node.d.ts.map +1 -0
- package/dist/nodes/geometry/grid-node.js +138 -0
- package/dist/nodes/geometry/grid-node.js.map +1 -0
- package/dist/nodes/geometry/line-node.d.ts +17 -0
- package/dist/nodes/geometry/line-node.d.ts.map +1 -0
- package/dist/nodes/geometry/line-node.js +34 -0
- package/dist/nodes/geometry/line-node.js.map +1 -0
- package/dist/nodes/geometry/path-node.d.ts +17 -0
- package/dist/nodes/geometry/path-node.d.ts.map +1 -0
- package/dist/nodes/geometry/path-node.js +230 -0
- package/dist/nodes/geometry/path-node.js.map +1 -0
- package/dist/nodes/geometry/polygon-node.d.ts +20 -0
- package/dist/nodes/geometry/polygon-node.d.ts.map +1 -0
- package/dist/nodes/geometry/polygon-node.js +42 -0
- package/dist/nodes/geometry/polygon-node.js.map +1 -0
- package/dist/nodes/geometry/polygram-node.d.ts +27 -0
- package/dist/nodes/geometry/polygram-node.d.ts.map +1 -0
- package/dist/nodes/geometry/polygram-node.js +47 -0
- package/dist/nodes/geometry/polygram-node.js.map +1 -0
- package/dist/nodes/geometry/rect-node.d.ts +50 -0
- package/dist/nodes/geometry/rect-node.d.ts.map +1 -0
- package/dist/nodes/geometry/rect-node.js +275 -0
- package/dist/nodes/geometry/rect-node.js.map +1 -0
- package/dist/nodes/geometry/shape-node.d.ts +66 -0
- package/dist/nodes/geometry/shape-node.d.ts.map +1 -0
- package/dist/nodes/geometry/shape-node.js +127 -0
- package/dist/nodes/geometry/shape-node.js.map +1 -0
- package/dist/nodes/index.d.ts +17 -0
- package/dist/nodes/index.d.ts.map +1 -0
- package/dist/nodes/index.js +20 -0
- package/dist/nodes/index.js.map +1 -0
- package/dist/nodes/media/image-node.d.ts +28 -0
- package/dist/nodes/media/image-node.d.ts.map +1 -0
- package/dist/nodes/media/image-node.js +53 -0
- package/dist/nodes/media/image-node.js.map +1 -0
- package/dist/nodes/text/richtext-node.d.ts +46 -0
- package/dist/nodes/text/richtext-node.d.ts.map +1 -0
- package/dist/nodes/text/richtext-node.js +155 -0
- package/dist/nodes/text/richtext-node.js.map +1 -0
- package/dist/nodes/text/text-node.d.ts +42 -0
- package/dist/nodes/text/text-node.d.ts.map +1 -0
- package/dist/nodes/text/text-node.js +123 -0
- package/dist/nodes/text/text-node.js.map +1 -0
- package/dist/platform/audio-device.d.ts +40 -0
- package/dist/platform/audio-device.d.ts.map +1 -0
- package/dist/platform/audio-device.js +19 -0
- package/dist/platform/audio-device.js.map +1 -0
- package/dist/platform/index.d.ts +4 -0
- package/dist/platform/index.d.ts.map +1 -0
- package/dist/platform/index.js +4 -0
- package/dist/platform/index.js.map +1 -0
- package/dist/platform/master-clock.d.ts +54 -0
- package/dist/platform/master-clock.d.ts.map +1 -0
- package/dist/platform/master-clock.js +85 -0
- package/dist/platform/master-clock.js.map +1 -0
- package/dist/platform/storage-adapter.d.ts +29 -0
- package/dist/platform/storage-adapter.d.ts.map +1 -0
- package/dist/platform/storage-adapter.js +70 -0
- package/dist/platform/storage-adapter.js.map +1 -0
- package/dist/project/config.d.ts +24 -0
- package/dist/project/config.d.ts.map +1 -0
- package/dist/project/config.js +14 -0
- package/dist/project/config.js.map +1 -0
- package/dist/project/config.test.d.ts +2 -0
- package/dist/project/config.test.d.ts.map +1 -0
- package/dist/project/config.test.js +28 -0
- package/dist/project/config.test.js.map +1 -0
- package/dist/project/index.d.ts +3 -0
- package/dist/project/index.d.ts.map +1 -0
- package/dist/project/index.js +3 -0
- package/dist/project/index.js.map +1 -0
- package/dist/project/tree.d.ts +48 -0
- package/dist/project/tree.d.ts.map +1 -0
- package/dist/project/tree.js +11 -0
- package/dist/project/tree.js.map +1 -0
- package/dist/render/build-stage.d.ts +63 -0
- package/dist/render/build-stage.d.ts.map +1 -0
- package/dist/render/build-stage.js +91 -0
- package/dist/render/build-stage.js.map +1 -0
- package/dist/render/descriptors/ellipse.d.ts +10 -0
- package/dist/render/descriptors/ellipse.d.ts.map +1 -0
- package/dist/render/descriptors/ellipse.js +20 -0
- package/dist/render/descriptors/ellipse.js.map +1 -0
- package/dist/render/descriptors/image.d.ts +12 -0
- package/dist/render/descriptors/image.d.ts.map +1 -0
- package/dist/render/descriptors/image.js +12 -0
- package/dist/render/descriptors/image.js.map +1 -0
- package/dist/render/descriptors/latex.d.ts +6 -0
- package/dist/render/descriptors/latex.d.ts.map +1 -0
- package/dist/render/descriptors/latex.js +2 -0
- package/dist/render/descriptors/latex.js.map +1 -0
- package/dist/render/descriptors/line.d.ts +9 -0
- package/dist/render/descriptors/line.d.ts.map +1 -0
- package/dist/render/descriptors/line.js +19 -0
- package/dist/render/descriptors/line.js.map +1 -0
- package/dist/render/descriptors/path-builder.d.ts +14 -0
- package/dist/render/descriptors/path-builder.d.ts.map +1 -0
- package/dist/render/descriptors/path-builder.js +34 -0
- package/dist/render/descriptors/path-builder.js.map +1 -0
- package/dist/render/descriptors/path.d.ts +105 -0
- package/dist/render/descriptors/path.d.ts.map +1 -0
- package/dist/render/descriptors/path.js +45 -0
- package/dist/render/descriptors/path.js.map +1 -0
- package/dist/render/descriptors/path.test.d.ts +2 -0
- package/dist/render/descriptors/path.test.d.ts.map +1 -0
- package/dist/render/descriptors/path.test.js +40 -0
- package/dist/render/descriptors/path.test.js.map +1 -0
- package/dist/render/descriptors/polygon.d.ts +9 -0
- package/dist/render/descriptors/polygon.d.ts.map +1 -0
- package/dist/render/descriptors/polygon.js +19 -0
- package/dist/render/descriptors/polygon.js.map +1 -0
- package/dist/render/descriptors/polygram.d.ts +10 -0
- package/dist/render/descriptors/polygram.d.ts.map +1 -0
- package/dist/render/descriptors/polygram.js +20 -0
- package/dist/render/descriptors/polygram.js.map +1 -0
- package/dist/render/descriptors/rect.d.ts +9 -0
- package/dist/render/descriptors/rect.d.ts.map +1 -0
- package/dist/render/descriptors/rect.js +18 -0
- package/dist/render/descriptors/rect.js.map +1 -0
- package/dist/render/descriptors/richtext.d.ts +12 -0
- package/dist/render/descriptors/richtext.d.ts.map +1 -0
- package/dist/render/descriptors/richtext.js +20 -0
- package/dist/render/descriptors/richtext.js.map +1 -0
- package/dist/render/descriptors/shape.d.ts +6 -0
- package/dist/render/descriptors/shape.d.ts.map +1 -0
- package/dist/render/descriptors/shape.js +2 -0
- package/dist/render/descriptors/shape.js.map +1 -0
- package/dist/render/descriptors/text.d.ts +19 -0
- package/dist/render/descriptors/text.d.ts.map +1 -0
- package/dist/render/descriptors/text.js +27 -0
- package/dist/render/descriptors/text.js.map +1 -0
- package/dist/render/descriptors/transform.d.ts +16 -0
- package/dist/render/descriptors/transform.d.ts.map +1 -0
- package/dist/render/descriptors/transform.js +14 -0
- package/dist/render/descriptors/transform.js.map +1 -0
- package/dist/render/index.d.ts +17 -0
- package/dist/render/index.d.ts.map +1 -0
- package/dist/render/index.js +16 -0
- package/dist/render/index.js.map +1 -0
- package/dist/render/measure-scope.d.ts +25 -0
- package/dist/render/measure-scope.d.ts.map +1 -0
- package/dist/render/measure-scope.js +11 -0
- package/dist/render/measure-scope.js.map +1 -0
- package/dist/render/render-context.d.ts +258 -0
- package/dist/render/render-context.d.ts.map +1 -0
- package/dist/render/render-context.js +95 -0
- package/dist/render/render-context.js.map +1 -0
- package/dist/runtime/index.d.ts +4 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +4 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/playback-controller.d.ts +105 -0
- package/dist/runtime/playback-controller.d.ts.map +1 -0
- package/dist/runtime/playback-controller.js +244 -0
- package/dist/runtime/playback-controller.js.map +1 -0
- package/dist/runtime/playback-controller.test.d.ts +2 -0
- package/dist/runtime/playback-controller.test.d.ts.map +1 -0
- package/dist/runtime/playback-controller.test.js +148 -0
- package/dist/runtime/playback-controller.test.js.map +1 -0
- package/dist/runtime/precompisition.d.ts +107 -0
- package/dist/runtime/precompisition.d.ts.map +1 -0
- package/dist/runtime/precompisition.js +202 -0
- package/dist/runtime/precompisition.js.map +1 -0
- package/dist/runtime/precompisition.test.d.ts +2 -0
- package/dist/runtime/precompisition.test.d.ts.map +1 -0
- package/dist/runtime/precompisition.test.js +138 -0
- package/dist/runtime/precompisition.test.js.map +1 -0
- package/dist/runtime/runtime.fixtures.d.ts +158 -0
- package/dist/runtime/runtime.fixtures.d.ts.map +1 -0
- package/dist/runtime/runtime.fixtures.js +264 -0
- package/dist/runtime/runtime.fixtures.js.map +1 -0
- package/dist/runtime/state-evaluator.d.ts +76 -0
- package/dist/runtime/state-evaluator.d.ts.map +1 -0
- package/dist/runtime/state-evaluator.js +162 -0
- package/dist/runtime/state-evaluator.js.map +1 -0
- package/dist/runtime/state-evaluator.test.d.ts +2 -0
- package/dist/runtime/state-evaluator.test.d.ts.map +1 -0
- package/dist/runtime/state-evaluator.test.js +122 -0
- package/dist/runtime/state-evaluator.test.js.map +1 -0
- package/dist/signals/create.d.ts +21 -0
- package/dist/signals/create.d.ts.map +1 -0
- package/dist/signals/create.js +74 -0
- package/dist/signals/create.js.map +1 -0
- package/dist/signals/create.test.d.ts +2 -0
- package/dist/signals/create.test.d.ts.map +1 -0
- package/dist/signals/create.test.js +81 -0
- package/dist/signals/create.test.js.map +1 -0
- package/dist/signals/host.d.ts +11 -0
- package/dist/signals/host.d.ts.map +1 -0
- package/dist/signals/host.js +10 -0
- package/dist/signals/host.js.map +1 -0
- package/dist/signals/index.d.ts +4 -0
- package/dist/signals/index.d.ts.map +1 -0
- package/dist/signals/index.js +3 -0
- package/dist/signals/index.js.map +1 -0
- package/dist/signals/signal-cell.test.d.ts +2 -0
- package/dist/signals/signal-cell.test.d.ts.map +1 -0
- package/dist/signals/signal-cell.test.js +202 -0
- package/dist/signals/signal-cell.test.js.map +1 -0
- package/dist/signals/signal.d.ts +46 -0
- package/dist/signals/signal.d.ts.map +1 -0
- package/dist/signals/signal.js +162 -0
- package/dist/signals/signal.js.map +1 -0
- package/dist/signals/signal.test.d.ts +2 -0
- package/dist/signals/signal.test.d.ts.map +1 -0
- package/dist/signals/signal.test.js +192 -0
- package/dist/signals/signal.test.js.map +1 -0
- package/dist/signals/subscriber.d.ts +5 -0
- package/dist/signals/subscriber.d.ts.map +1 -0
- package/dist/signals/subscriber.js +2 -0
- package/dist/signals/subscriber.js.map +1 -0
- package/dist/tween/animation-builder.d.ts +74 -0
- package/dist/tween/animation-builder.d.ts.map +1 -0
- package/dist/tween/animation-builder.js +99 -0
- package/dist/tween/animation-builder.js.map +1 -0
- package/dist/tween/ease/constants.d.ts +13 -0
- package/dist/tween/ease/constants.d.ts.map +1 -0
- package/dist/tween/ease/constants.js +71 -0
- package/dist/tween/ease/constants.js.map +1 -0
- package/dist/tween/ease/type.d.ts +2 -0
- package/dist/tween/ease/type.d.ts.map +1 -0
- package/dist/tween/ease/type.js +2 -0
- package/dist/tween/ease/type.js.map +1 -0
- package/dist/tween/eases.test.d.ts +2 -0
- package/dist/tween/eases.test.d.ts.map +1 -0
- package/dist/tween/eases.test.js +91 -0
- package/dist/tween/eases.test.js.map +1 -0
- package/dist/tween/generator.d.ts +22 -0
- package/dist/tween/generator.d.ts.map +1 -0
- package/dist/tween/generator.js +2 -0
- package/dist/tween/generator.js.map +1 -0
- package/dist/tween/index.d.ts +12 -0
- package/dist/tween/index.d.ts.map +1 -0
- package/dist/tween/index.js +12 -0
- package/dist/tween/index.js.map +1 -0
- package/dist/tween/lerp.d.ts +11 -0
- package/dist/tween/lerp.d.ts.map +1 -0
- package/dist/tween/lerp.js +13 -0
- package/dist/tween/lerp.js.map +1 -0
- package/dist/tween/lerp.test.d.ts +2 -0
- package/dist/tween/lerp.test.d.ts.map +1 -0
- package/dist/tween/lerp.test.js +22 -0
- package/dist/tween/lerp.test.js.map +1 -0
- package/dist/tween/parallel.d.ts +23 -0
- package/dist/tween/parallel.d.ts.map +1 -0
- package/dist/tween/parallel.js +79 -0
- package/dist/tween/parallel.js.map +1 -0
- package/dist/tween/prepare.d.ts +34 -0
- package/dist/tween/prepare.d.ts.map +1 -0
- package/dist/tween/prepare.js +52 -0
- package/dist/tween/prepare.js.map +1 -0
- package/dist/tween/prepare.test.d.ts +2 -0
- package/dist/tween/prepare.test.d.ts.map +1 -0
- package/dist/tween/prepare.test.js +44 -0
- package/dist/tween/prepare.test.js.map +1 -0
- package/dist/tween/sequence.d.ts +19 -0
- package/dist/tween/sequence.d.ts.map +1 -0
- package/dist/tween/sequence.js +22 -0
- package/dist/tween/sequence.js.map +1 -0
- package/dist/tween/sequence.test.d.ts +2 -0
- package/dist/tween/sequence.test.d.ts.map +1 -0
- package/dist/tween/sequence.test.js +68 -0
- package/dist/tween/sequence.test.js.map +1 -0
- package/dist/tween/stepper.d.ts +34 -0
- package/dist/tween/stepper.d.ts.map +1 -0
- package/dist/tween/stepper.js +4 -0
- package/dist/tween/stepper.js.map +1 -0
- package/dist/tween/tests/batched-parallel.test.d.ts +2 -0
- package/dist/tween/tests/batched-parallel.test.d.ts.map +1 -0
- package/dist/tween/tests/batched-parallel.test.js +76 -0
- package/dist/tween/tests/batched-parallel.test.js.map +1 -0
- package/dist/tween/tests/parallel.test.d.ts +2 -0
- package/dist/tween/tests/parallel.test.d.ts.map +1 -0
- package/dist/tween/tests/parallel.test.js +129 -0
- package/dist/tween/tests/parallel.test.js.map +1 -0
- package/dist/tween/tests/realtime.test.d.ts +2 -0
- package/dist/tween/tests/realtime.test.d.ts.map +1 -0
- package/dist/tween/tests/realtime.test.js +76 -0
- package/dist/tween/tests/realtime.test.js.map +1 -0
- package/dist/tween/tween.d.ts +18 -0
- package/dist/tween/tween.d.ts.map +1 -0
- package/dist/tween/tween.js +28 -0
- package/dist/tween/tween.js.map +1 -0
- package/dist/tween/tween.test.d.ts +2 -0
- package/dist/tween/tween.test.d.ts.map +1 -0
- package/dist/tween/tween.test.js +38 -0
- package/dist/tween/tween.test.js.map +1 -0
- package/dist/tween/wait.d.ts +19 -0
- package/dist/tween/wait.d.ts.map +1 -0
- package/dist/tween/wait.js +25 -0
- package/dist/tween/wait.js.map +1 -0
- package/dist/tween/wait.test.d.ts +2 -0
- package/dist/tween/wait.test.d.ts.map +1 -0
- package/dist/tween/wait.test.js +35 -0
- package/dist/tween/wait.test.js.map +1 -0
- package/dist/util/clamp.d.ts +12 -0
- package/dist/util/clamp.d.ts.map +1 -0
- package/dist/util/clamp.js +16 -0
- package/dist/util/clamp.js.map +1 -0
- package/dist/util/clamp.test.d.ts +2 -0
- package/dist/util/clamp.test.d.ts.map +1 -0
- package/dist/util/clamp.test.js +31 -0
- package/dist/util/clamp.test.js.map +1 -0
- package/dist/util/index.d.ts +4 -0
- package/dist/util/index.d.ts.map +1 -0
- package/dist/util/index.js +4 -0
- package/dist/util/index.js.map +1 -0
- package/dist/util/random.d.ts +16 -0
- package/dist/util/random.d.ts.map +1 -0
- package/dist/util/random.js +28 -0
- package/dist/util/random.js.map +1 -0
- package/dist/util/random.test.d.ts +2 -0
- package/dist/util/random.test.d.ts.map +1 -0
- package/dist/util/random.test.js +42 -0
- package/dist/util/random.test.js.map +1 -0
- package/dist/util/range.d.ts +12 -0
- package/dist/util/range.d.ts.map +1 -0
- package/dist/util/range.js +11 -0
- package/dist/util/range.js.map +1 -0
- package/dist/util/reference.d.ts +15 -0
- package/dist/util/reference.d.ts.map +1 -0
- package/dist/util/reference.js +20 -0
- package/dist/util/reference.js.map +1 -0
- package/dist/util/reference.test.d.ts +2 -0
- package/dist/util/reference.test.d.ts.map +1 -0
- package/dist/util/reference.test.js +32 -0
- package/dist/util/reference.test.js.map +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { lerpFill } from "../fill/registry";
|
|
2
|
+
function lerpShadow(from, to, t) {
|
|
3
|
+
return {
|
|
4
|
+
blur: from.blur + (to.blur - from.blur) * t,
|
|
5
|
+
dx: (from.dx ?? 0) + ((to.dx ?? 0) - (from.dx ?? 0)) * t,
|
|
6
|
+
dy: (from.dy ?? 0) + ((to.dy ?? 0) - (from.dy ?? 0)) * t,
|
|
7
|
+
fill: lerpFill(from.fill, to.fill, t),
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export function lerpShadowArray(from, to, t) {
|
|
11
|
+
if (from === to)
|
|
12
|
+
return from;
|
|
13
|
+
const len = Math.max(from.length, to.length);
|
|
14
|
+
const result = [];
|
|
15
|
+
for (let i = 0; i < len; i++) {
|
|
16
|
+
const f = from[i];
|
|
17
|
+
const tf = to[i];
|
|
18
|
+
if (!f) {
|
|
19
|
+
result.push(tf);
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
if (!tf) {
|
|
23
|
+
result.push(f);
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
result.push(lerpShadow(f, tf, t));
|
|
27
|
+
}
|
|
28
|
+
return result;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=lerp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lerp.js","sourceRoot":"","sources":["../../../../src/attributes/shape/shadow/lerp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,SAAS,UAAU,CAAC,IAAoB,EAAE,EAAkB,EAAE,CAAS;IACnE,OAAO;QACH,IAAI,EAAE,IAAI,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;QAC3C,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;QACxD,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;QACxD,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;KACxC,CAAC;AACN,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAsB,EAAE,EAAoB,EAAE,CAAS;IACnF,IAAI,IAAI,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IAC7B,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;IAC7C,MAAM,MAAM,GAAqB,EAAE,CAAC;IACpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3B,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;QACjB,IAAI,CAAC,CAAC,EAAE,CAAC;YAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAAC,SAAS;QAAC,CAAC;QACtC,IAAI,CAAC,EAAE,EAAE,CAAC;YAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAAC,SAAS;QAAC,CAAC;QACtC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FillProp, FillResolved } from '../fill/union';
|
|
2
|
+
export interface ShadowProp {
|
|
3
|
+
blur?: number;
|
|
4
|
+
dx?: number;
|
|
5
|
+
dy?: number;
|
|
6
|
+
/** Any loose fill: a CSS color string, fill prop object, or resolved fill. */
|
|
7
|
+
fill?: FillProp;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Fully resolved shadow — all fields normalised with defaults applied.
|
|
11
|
+
* Compatible with the lerp registry (IFill is used for fill to avoid
|
|
12
|
+
* breaking the existing lerp/registry pipeline).
|
|
13
|
+
*/
|
|
14
|
+
export interface ShadowResolved {
|
|
15
|
+
blur: number;
|
|
16
|
+
dx?: number;
|
|
17
|
+
dy?: number;
|
|
18
|
+
fill: FillResolved;
|
|
19
|
+
}
|
|
20
|
+
export declare function resolveShadow(prop: ShadowProp, previous?: ShadowResolved): ShadowResolved;
|
|
21
|
+
export declare function resolveShadowArray(prop: ShadowProp | ShadowProp[] | undefined, previous?: ShadowResolved[]): ShadowResolved[];
|
|
22
|
+
//# sourceMappingURL=resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/shadow/resolver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAIvD,MAAM,WAAW,UAAU;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,8EAA8E;IAC9E,IAAI,CAAC,EAAE,QAAQ,CAAC;CACnB;AACD;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,YAAY,CAAC;CACtB;AAID,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,cAAc,GAAG,cAAc,CAOzF;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,EAAE,GAAG,SAAS,EAAE,QAAQ,CAAC,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAI7H"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { resolveFill } from '../fill/registry';
|
|
2
|
+
// ── Mapper ───────────────────────────────────────────────────────────────────
|
|
3
|
+
export function resolveShadow(prop, previous) {
|
|
4
|
+
return {
|
|
5
|
+
blur: prop.blur ?? previous?.blur ?? 0,
|
|
6
|
+
dx: prop.dx ?? previous?.dx,
|
|
7
|
+
dy: prop.dy ?? previous?.dy,
|
|
8
|
+
fill: prop.fill != null ? resolveFill(prop.fill) : (previous?.fill ?? resolveFill('transparent')),
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export function resolveShadowArray(prop, previous) {
|
|
12
|
+
if (prop == null)
|
|
13
|
+
return [];
|
|
14
|
+
const arr = Array.isArray(prop) ? prop : [prop];
|
|
15
|
+
return arr.map((p, i) => resolveShadow(p, previous?.[i]));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolver.js","sourceRoot":"","sources":["../../../../src/attributes/shape/shadow/resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAwB/C,gFAAgF;AAEhF,MAAM,UAAU,aAAa,CAAC,IAAgB,EAAE,QAAyB;IACrE,OAAO;QACH,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,QAAQ,EAAE,IAAI,IAAI,CAAC;QACtC,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,QAAQ,EAAE,EAAE;QAC3B,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,QAAQ,EAAE,EAAE;QAC3B,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,IAAI,IAAI,WAAW,CAAC,aAAa,CAAC,CAAC;KACpG,CAAC;AACN,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAA2C,EAAE,QAA2B;IACvG,IAAI,IAAI,IAAI,IAAI;QAAE,OAAO,EAAE,CAAC;IAC5B,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAChD,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Stroke prop and resolved types, resolver, and array lerp. */
|
|
2
|
+
export type { StrokeProp, StrokeResolved } from './mapper';
|
|
3
|
+
export { resolveStroke, resolveStrokeArray } from './mapper';
|
|
4
|
+
export { lerpStrokeArray } from './lerp';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/stroke/index.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/attributes/shape/stroke/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lerp.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/stroke/lerp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAYlE,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,EAAE,EAAE,EAAE,EAAE,cAAc,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,cAAc,EAAE,CAYzG"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { lerpFill } from "../fill/registry";
|
|
2
|
+
function lerpStroke(from, to, t) {
|
|
3
|
+
return {
|
|
4
|
+
weight: (from.weight) + ((to.weight) - (from.weight)) * t,
|
|
5
|
+
fill: lerpFill(from.fill, to.fill, t),
|
|
6
|
+
dash: t < 0.5 ? from.dash : to.dash,
|
|
7
|
+
dashOffset: (from.dashOffset) + ((to.dashOffset) - (from.dashOffset)) * t,
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export function lerpStrokeArray(from, to, t) {
|
|
11
|
+
if (from === to)
|
|
12
|
+
return from;
|
|
13
|
+
const len = Math.max(from.length, to.length);
|
|
14
|
+
const result = [];
|
|
15
|
+
for (let i = 0; i < len; i++) {
|
|
16
|
+
const f = from[i];
|
|
17
|
+
const tf = to[i];
|
|
18
|
+
if (!f) {
|
|
19
|
+
result.push(tf);
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
if (!tf) {
|
|
23
|
+
result.push(f);
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
result.push(lerpStroke(f, tf, t));
|
|
27
|
+
}
|
|
28
|
+
return result;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=lerp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lerp.js","sourceRoot":"","sources":["../../../../src/attributes/shape/stroke/lerp.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,SAAS,UAAU,CAAC,IAAoB,EAAE,EAAkB,EAAE,CAAS;IACnE,OAAO;QACH,MAAM,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC;QACzD,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QACrC,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;QACnC,UAAU,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC;KAC5E,CAAC;AACN,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAsB,EAAE,EAAoB,EAAE,CAAS;IACnF,IAAI,IAAI,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IAC7B,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;IAC7C,MAAM,MAAM,GAAqB,EAAE,CAAC;IACpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3B,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;QACjB,IAAI,CAAC,CAAC,EAAE,CAAC;YAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAAC,SAAS;QAAC,CAAC;QACtC,IAAI,CAAC,EAAE,EAAE,CAAC;YAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAAC,SAAS;QAAC,CAAC;QACtC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FillProp, FillResolved } from '../fill/union';
|
|
2
|
+
export interface StrokeProp {
|
|
3
|
+
/** Stroke width in pixels. Defaults to 1. */
|
|
4
|
+
weight?: number;
|
|
5
|
+
/** Any loose fill: a CSS color string, fill prop object, or resolved fill. */
|
|
6
|
+
fill?: FillProp;
|
|
7
|
+
/** Dash pattern. A single number `n` becomes `[n, n]`. */
|
|
8
|
+
dash?: number | number[];
|
|
9
|
+
dashOffset?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Fully resolved stroke — all fields normalised with defaults applied.
|
|
13
|
+
* Compatible with the lerp registry (IFill is used for fill to avoid
|
|
14
|
+
* breaking the existing lerp/registry pipeline).
|
|
15
|
+
*/
|
|
16
|
+
export interface StrokeResolved {
|
|
17
|
+
weight: number;
|
|
18
|
+
fill: FillResolved;
|
|
19
|
+
dash?: number[];
|
|
20
|
+
dashOffset: number;
|
|
21
|
+
}
|
|
22
|
+
export declare function resolveStroke(prop: StrokeProp, previous?: StrokeResolved): StrokeResolved;
|
|
23
|
+
export declare function resolveStrokeArray(prop: StrokeProp | StrokeProp[] | undefined, previous?: StrokeResolved[]): StrokeResolved[];
|
|
24
|
+
//# sourceMappingURL=mapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/stroke/mapper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAIvD,MAAM,WAAW,UAAU;IACvB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACtB;AAKD,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,cAAc,GAAG,cAAc,CAczF;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,EAAE,GAAG,SAAS,EAAE,QAAQ,CAAC,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAI7H"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { resolveFill } from '../../../attributes/shape/fill/registry';
|
|
2
|
+
// ── Mapper ───────────────────────────────────────────────────────────────────
|
|
3
|
+
export function resolveStroke(prop, previous) {
|
|
4
|
+
let dash;
|
|
5
|
+
if (prop.dash != null) {
|
|
6
|
+
const raw = Array.isArray(prop.dash) ? prop.dash : [prop.dash];
|
|
7
|
+
dash = raw.length === 1 ? [raw[0], raw[0]] : raw;
|
|
8
|
+
}
|
|
9
|
+
else {
|
|
10
|
+
dash = previous?.dash;
|
|
11
|
+
}
|
|
12
|
+
return {
|
|
13
|
+
weight: prop.weight ?? previous?.weight ?? 1,
|
|
14
|
+
fill: prop.fill != null ? resolveFill(prop.fill) : (previous?.fill ?? resolveFill('transparent')),
|
|
15
|
+
dash,
|
|
16
|
+
dashOffset: prop.dashOffset ?? previous?.dashOffset ?? 0,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export function resolveStrokeArray(prop, previous) {
|
|
20
|
+
if (prop == null)
|
|
21
|
+
return [];
|
|
22
|
+
const arr = Array.isArray(prop) ? prop : [prop];
|
|
23
|
+
return arr.map((p, i) => resolveStroke(p, previous?.[i]));
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=mapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapper.js","sourceRoot":"","sources":["../../../../src/attributes/shape/stroke/mapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AA4B/D,gFAAgF;AAEhF,MAAM,UAAU,aAAa,CAAC,IAAgB,EAAE,QAAyB;IACrE,IAAI,IAA0B,CAAC;IAC/B,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC;QACpB,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/D,IAAI,GAAG,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IACrD,CAAC;SAAM,CAAC;QACJ,IAAI,GAAG,QAAQ,EAAE,IAAI,CAAC;IAC1B,CAAC;IACD,OAAO;QACH,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,QAAQ,EAAE,MAAM,IAAI,CAAC;QAC5C,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,IAAI,IAAI,WAAW,CAAC,aAAa,CAAC,CAAC;QACjG,IAAI;QACJ,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,QAAQ,EAAE,UAAU,IAAI,CAAC;KAC3D,CAAC;AACN,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAA2C,EAAE,QAA2B;IACvG,IAAI,IAAI,IAAI,IAAI;QAAE,OAAO,EAAE,CAAC;IAC5B,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAChD,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"align.d.ts","sourceRoot":"","sources":["../../../src/attributes/text/align.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"align.js","sourceRoot":"","sources":["../../../src/attributes/text/align.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lerp between two strings by holding the longest common prefix and suffix
|
|
3
|
+
* fixed, then shrinking the differing middle of `from` to empty and growing
|
|
4
|
+
* it back as the middle of `to`. Degenerates to a single phase for pure
|
|
5
|
+
* append/prepend/truncate cases.
|
|
6
|
+
*/
|
|
7
|
+
export declare function lerpText(from: string, to: string, t: number): string;
|
|
8
|
+
//# sourceMappingURL=lerp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lerp.d.ts","sourceRoot":"","sources":["../../../src/attributes/text/lerp.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAgCpE"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lerp between two strings by holding the longest common prefix and suffix
|
|
3
|
+
* fixed, then shrinking the differing middle of `from` to empty and growing
|
|
4
|
+
* it back as the middle of `to`. Degenerates to a single phase for pure
|
|
5
|
+
* append/prepend/truncate cases.
|
|
6
|
+
*/
|
|
7
|
+
export function lerpText(from, to, t) {
|
|
8
|
+
if (t <= 0)
|
|
9
|
+
return from;
|
|
10
|
+
if (t >= 1)
|
|
11
|
+
return to;
|
|
12
|
+
let pre = 0;
|
|
13
|
+
const maxPre = Math.min(from.length, to.length);
|
|
14
|
+
while (pre < maxPre && from.charCodeAt(pre) === to.charCodeAt(pre))
|
|
15
|
+
pre++;
|
|
16
|
+
let suf = 0;
|
|
17
|
+
const maxSuf = Math.min(from.length - pre, to.length - pre);
|
|
18
|
+
while (suf < maxSuf &&
|
|
19
|
+
from.charCodeAt(from.length - 1 - suf) === to.charCodeAt(to.length - 1 - suf))
|
|
20
|
+
suf++;
|
|
21
|
+
const removeLen = from.length - pre - suf;
|
|
22
|
+
const addLen = to.length - pre - suf;
|
|
23
|
+
const totalLen = removeLen + addLen;
|
|
24
|
+
if (totalLen === 0)
|
|
25
|
+
return to;
|
|
26
|
+
const prefix = from.substring(0, pre);
|
|
27
|
+
const suffix = from.substring(from.length - suf);
|
|
28
|
+
const split = removeLen / totalLen;
|
|
29
|
+
if (t < split) {
|
|
30
|
+
const localT = split === 0 ? 1 : t / split;
|
|
31
|
+
const midLen = Math.round(removeLen * (1 - localT));
|
|
32
|
+
return prefix + from.substring(pre, pre + midLen) + suffix;
|
|
33
|
+
}
|
|
34
|
+
const localT = split === 1 ? 1 : (t - split) / (1 - split);
|
|
35
|
+
const midLen = Math.round(addLen * localT);
|
|
36
|
+
return prefix + to.substring(pre, pre + midLen) + suffix;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=lerp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lerp.js","sourceRoot":"","sources":["../../../src/attributes/text/lerp.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,EAAU,EAAE,CAAS;IACxD,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACxB,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IAEtB,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;IAChD,OAAO,GAAG,GAAG,MAAM,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,GAAG,EAAE,CAAC;IAE1E,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,GAAG,EAAE,EAAE,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC;IAC5D,OACI,GAAG,GAAG,MAAM;QACZ,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,GAAG,CAAC,KAAK,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC,GAAG,GAAG,CAAC;QAC/E,GAAG,EAAE,CAAC;IAER,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,GAAG,GAAG,GAAG,GAAG,CAAC;IAC1C,MAAM,MAAM,GAAG,EAAE,CAAC,MAAM,GAAG,GAAG,GAAG,GAAG,CAAC;IACrC,MAAM,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;IACpC,IAAI,QAAQ,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAE9B,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACtC,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC;IACjD,MAAM,KAAK,GAAG,SAAS,GAAG,QAAQ,CAAC;IAEnC,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC;QACZ,MAAM,MAAM,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;QAC3C,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;QACpD,OAAO,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC;IAC/D,CAAC;IACD,MAAM,MAAM,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC;IAC3D,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAC3C,OAAO,MAAM,GAAG,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC;AAC7D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lerp.test.d.ts","sourceRoot":"","sources":["../../../src/attributes/text/lerp.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { lerpText } from '@/attributes/text/lerp';
|
|
3
|
+
describe('lerpText', () => {
|
|
4
|
+
it('returns from at t<=0 and to at t>=1', () => {
|
|
5
|
+
expect(lerpText('abc', 'xyz', 0)).toBe('abc');
|
|
6
|
+
expect(lerpText('abc', 'xyz', 1)).toBe('xyz');
|
|
7
|
+
expect(lerpText('abc', 'xyz', -0.5)).toBe('abc');
|
|
8
|
+
expect(lerpText('abc', 'xyz', 2)).toBe('xyz');
|
|
9
|
+
});
|
|
10
|
+
it('returns to immediately when the strings are identical', () => {
|
|
11
|
+
expect(lerpText('same', 'same', 0.5)).toBe('same');
|
|
12
|
+
});
|
|
13
|
+
it('preserves a common prefix and suffix throughout', () => {
|
|
14
|
+
// "cat" -> "cot": prefix "c", suffix "t", middle a->o.
|
|
15
|
+
for (let t = 0; t <= 1; t += 0.1) {
|
|
16
|
+
const out = lerpText('cat', 'cot', t);
|
|
17
|
+
expect(out.startsWith('c')).toBe(true);
|
|
18
|
+
expect(out.endsWith('t')).toBe(true);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
it('shrinks the removed middle before growing the added middle', () => {
|
|
22
|
+
// Pure append: "go" -> "going". prefix "go", nothing removed.
|
|
23
|
+
const early = lerpText('go', 'going', 0.25);
|
|
24
|
+
const late = lerpText('go', 'going', 0.9);
|
|
25
|
+
expect(early.length).toBeLessThanOrEqual(late.length);
|
|
26
|
+
expect(late.startsWith('go')).toBe(true);
|
|
27
|
+
});
|
|
28
|
+
it('handles truncation (to is a prefix of from)', () => {
|
|
29
|
+
const mid = lerpText('hello', 'hel', 0.5);
|
|
30
|
+
expect(mid.startsWith('hel')).toBe(true);
|
|
31
|
+
expect(mid.length).toBeGreaterThanOrEqual(3);
|
|
32
|
+
expect(mid.length).toBeLessThanOrEqual(5);
|
|
33
|
+
});
|
|
34
|
+
it('never produces a string longer than both endpoints combined', () => {
|
|
35
|
+
const out = lerpText('abcdef', 'uvwxyz', 0.5);
|
|
36
|
+
expect(out.length).toBeLessThanOrEqual('abcdef'.length + 'uvwxyz'.length);
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=lerp.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lerp.test.js","sourceRoot":"","sources":["../../../src/attributes/text/lerp.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACtB,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;QAC3C,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9C,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9C,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACjD,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uDAAuD,EAAE,GAAG,EAAE;QAC7D,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QACvD,uDAAuD;QACvD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC;YAC/B,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;YACtC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACvC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4DAA4D,EAAE,GAAG,EAAE;QAClE,8DAA8D;QAC9D,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;QAC5C,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAC1C,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACtD,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6CAA6C,EAAE,GAAG,EAAE;QACnD,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;QAC1C,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;QAC7C,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6DAA6D,EAAE,GAAG,EAAE;QACnE,MAAM,GAAG,GAAG,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;QAC9C,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,mBAAmB,CAAC,QAAQ,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { FillResolved } from "../shape/fill/union";
|
|
2
|
+
import { ChainableFill } from "../shape/fill/chain";
|
|
3
|
+
import { StrokeProp, StrokeResolved } from "../shape/stroke/mapper";
|
|
4
|
+
export type FontStyle = 'normal' | 'italic' | 'oblique';
|
|
5
|
+
/**
|
|
6
|
+
* A styled run of text. Spans may nest — children inherit any style fields
|
|
7
|
+
* the parent set and override the ones they redeclare (Flutter-style
|
|
8
|
+
* TextSpan). A span with `children` and no `text` acts as a pure style
|
|
9
|
+
* scope; a span with both contributes its `text` before its children.
|
|
10
|
+
*/
|
|
11
|
+
export interface TextSpan {
|
|
12
|
+
text?: string;
|
|
13
|
+
fontFamily?: string;
|
|
14
|
+
fontSize?: number;
|
|
15
|
+
fontWeight?: number;
|
|
16
|
+
fontStyle?: FontStyle;
|
|
17
|
+
letterSpacing?: number;
|
|
18
|
+
fill?: ChainableFill;
|
|
19
|
+
stroke?: StrokeProp | StrokeProp[];
|
|
20
|
+
children?: TextSpan[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A span flattened against its parents — every style field is concrete and
|
|
24
|
+
* fills/strokes are resolved. Newlines in `text` are preserved; the renderer
|
|
25
|
+
* splits on `\n` to lay out lines.
|
|
26
|
+
*/
|
|
27
|
+
export interface ResolvedTextSpan {
|
|
28
|
+
text: string;
|
|
29
|
+
fontFamily: string;
|
|
30
|
+
fontSize: number;
|
|
31
|
+
fontWeight: number;
|
|
32
|
+
fontStyle: FontStyle;
|
|
33
|
+
letterSpacing: number;
|
|
34
|
+
fill: FillResolved[];
|
|
35
|
+
stroke: StrokeResolved[];
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=span.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"span.d.ts","sourceRoot":"","sources":["../../../src/attributes/text/span.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAEpE,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAExD;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,MAAM,CAAC,EAAE,UAAU,GAAG,UAAU,EAAE,CAAC;IACnC,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,YAAY,EAAE,CAAC;IACrB,MAAM,EAAE,cAAc,EAAE,CAAC;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"span.js","sourceRoot":"","sources":["../../../src/attributes/text/span.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './attributes';
|
|
2
|
+
export * from './nodes';
|
|
3
|
+
export * from './project';
|
|
4
|
+
export * from './render';
|
|
5
|
+
export * from './runtime';
|
|
6
|
+
export * from './platform';
|
|
7
|
+
export * from './assets';
|
|
8
|
+
export * from './util';
|
|
9
|
+
export * from './tween';
|
|
10
|
+
export * from './signals';
|
|
11
|
+
export * from './layout';
|
|
12
|
+
export * from './signals';
|
|
13
|
+
export * from './jsx/jsx-runtime';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './attributes';
|
|
2
|
+
export * from './nodes';
|
|
3
|
+
export * from './project';
|
|
4
|
+
export * from './render';
|
|
5
|
+
export * from './runtime';
|
|
6
|
+
export * from './platform';
|
|
7
|
+
export * from './assets';
|
|
8
|
+
export * from './util';
|
|
9
|
+
export * from './tween';
|
|
10
|
+
export * from './signals';
|
|
11
|
+
export * from './layout';
|
|
12
|
+
export * from './signals';
|
|
13
|
+
export * from './jsx/jsx-runtime';
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Node } from "../nodes/base/node";
|
|
2
|
+
import type { Reference } from "../util/reference";
|
|
3
|
+
export declare function jsx(type: any, props: any): any;
|
|
4
|
+
export declare const jsxDEV: typeof jsx;
|
|
5
|
+
export declare const Fragment: unique symbol;
|
|
6
|
+
export declare namespace JSX {
|
|
7
|
+
type Element = Node;
|
|
8
|
+
interface ElementClass extends Node<any> {
|
|
9
|
+
}
|
|
10
|
+
interface ElementChildrenAttribute {
|
|
11
|
+
children: {};
|
|
12
|
+
}
|
|
13
|
+
interface IntrinsicAttributes {
|
|
14
|
+
ref?: Reference<any>;
|
|
15
|
+
}
|
|
16
|
+
interface IntrinsicElements {
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=jsx-dev-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-dev-runtime.d.ts","sourceRoot":"","sources":["../../src/jsx/jsx-dev-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,wBAAgB,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,OAiBxC;AAED,eAAO,MAAM,MAAM,YAAM,CAAC;AAC1B,eAAO,MAAM,QAAQ,eAAgC,CAAC;AAEtD,yBAAiB,GAAG,CAAC;IACjB,KAAY,OAAO,GAAG,IAAI,CAAC;IAC3B,UAAiB,YAAa,SAAQ,IAAI,CAAC,GAAG,CAAC;KAAI;IACnD,UAAiB,wBAAwB;QAAG,QAAQ,EAAE,EAAE,CAAA;KAAE;IAC1D,UAAiB,mBAAmB;QAAG,GAAG,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAA;KAAE;IAC7D,UAAiB,iBAAiB;KAAI;CACzC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function jsx(type, props) {
|
|
2
|
+
// Fragment support
|
|
3
|
+
if (type === Fragment) {
|
|
4
|
+
return props?.children ?? [];
|
|
5
|
+
}
|
|
6
|
+
// Class-based node
|
|
7
|
+
if (typeof type === "function") {
|
|
8
|
+
const isArray = Array.isArray(props.children);
|
|
9
|
+
let children = isArray || !props.children ? props.children : [props.children];
|
|
10
|
+
return new type({ ...props, children });
|
|
11
|
+
}
|
|
12
|
+
throw new Error("JSX element must be a SceneNode class (e.g. <Circle />)");
|
|
13
|
+
}
|
|
14
|
+
export const jsxDEV = jsx;
|
|
15
|
+
export const Fragment = Symbol.for("motion.fragment");
|
|
16
|
+
//# sourceMappingURL=jsx-dev-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-dev-runtime.js","sourceRoot":"","sources":["../../src/jsx/jsx-dev-runtime.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,GAAG,CAAC,IAAS,EAAE,KAAU;IACrC,mBAAmB;IACnB,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;QACpB,OAAO,KAAK,EAAE,QAAQ,IAAI,EAAE,CAAC;IACjC,CAAC;IAED,mBAAmB;IACnB,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;QAC7B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAE9C,IAAI,QAAQ,GAAG,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC9E,OAAO,IAAI,IAAI,CAAC,EAAE,GAAG,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,IAAI,KAAK,CACX,yDAAyD,CAC5D,CAAC;AACN,CAAC;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;AAC1B,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Node } from "../nodes/base/node";
|
|
2
|
+
import type { Reference } from "../util/reference";
|
|
3
|
+
export declare function jsx(type: any, props: any): any;
|
|
4
|
+
export declare const jsxs: typeof jsx;
|
|
5
|
+
export declare const Fragment: unique symbol;
|
|
6
|
+
export declare namespace JSX {
|
|
7
|
+
type Element = Node;
|
|
8
|
+
interface ElementClass extends Node<any> {
|
|
9
|
+
}
|
|
10
|
+
interface ElementChildrenAttribute {
|
|
11
|
+
children: {};
|
|
12
|
+
}
|
|
13
|
+
interface IntrinsicAttributes {
|
|
14
|
+
ref?: Reference<any>;
|
|
15
|
+
}
|
|
16
|
+
interface IntrinsicElements {
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=jsx-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-runtime.d.ts","sourceRoot":"","sources":["../../src/jsx/jsx-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,wBAAgB,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,OAiBxC;AAED,eAAO,MAAM,IAAI,YAAM,CAAC;AACxB,eAAO,MAAM,QAAQ,eAAgC,CAAC;AAEtD,yBAAiB,GAAG,CAAC;IACjB,KAAY,OAAO,GAAG,IAAI,CAAC;IAC3B,UAAiB,YAAa,SAAQ,IAAI,CAAC,GAAG,CAAC;KAAI;IACnD,UAAiB,wBAAwB;QAAG,QAAQ,EAAE,EAAE,CAAA;KAAE;IAC1D,UAAiB,mBAAmB;QAAG,GAAG,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAA;KAAE;IAC7D,UAAiB,iBAAiB;KAAI;CACzC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function jsx(type, props) {
|
|
2
|
+
// Fragment support
|
|
3
|
+
if (type === Fragment) {
|
|
4
|
+
return props?.children ?? [];
|
|
5
|
+
}
|
|
6
|
+
// Class-based node
|
|
7
|
+
if (typeof type === "function") {
|
|
8
|
+
const isArray = Array.isArray(props.children);
|
|
9
|
+
let children = isArray || !props.children ? props.children : [props.children];
|
|
10
|
+
return new type({ ...props, children });
|
|
11
|
+
}
|
|
12
|
+
throw new Error("JSX element must be a SceneNode class (e.g. <Circle />)");
|
|
13
|
+
}
|
|
14
|
+
export const jsxs = jsx;
|
|
15
|
+
export const Fragment = Symbol.for("motion.fragment");
|
|
16
|
+
//# sourceMappingURL=jsx-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-runtime.js","sourceRoot":"","sources":["../../src/jsx/jsx-runtime.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,GAAG,CAAC,IAAS,EAAE,KAAU;IACrC,mBAAmB;IACnB,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;QACpB,OAAO,KAAK,EAAE,QAAQ,IAAI,EAAE,CAAC;IACjC,CAAC;IAED,mBAAmB;IACnB,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;QAC7B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAE9C,IAAI,QAAQ,GAAG,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC9E,OAAO,IAAI,IAAI,CAAC,EAAE,GAAG,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,IAAI,KAAK,CACX,yDAAyD,CAC5D,CAAC;AACN,CAAC;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CAAC;AACxB,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { BoxBounds } from "../attributes/layout/bounds";
|
|
2
|
+
import { PaddingResolved } from "../attributes/layout/padding";
|
|
3
|
+
import { SizeConstraints } from "../attributes/layout/constraints";
|
|
4
|
+
import { Size2D, SizeInput } from "../attributes/layout/size";
|
|
5
|
+
export type FlexDirection = "row" | "column";
|
|
6
|
+
export type GapSize = number | "auto";
|
|
7
|
+
/**
|
|
8
|
+
* Minimal child contract the flex strategy needs. Any object that exposes
|
|
9
|
+
* a size mode per axis and can be measured under constraints qualifies —
|
|
10
|
+
* the strategy never touches anything else, so it stays decoupled from
|
|
11
|
+
* SceneNode/TransformNode and is reusable outside the node tree.
|
|
12
|
+
*/
|
|
13
|
+
export interface FlexChild {
|
|
14
|
+
widthMode: SizeInput;
|
|
15
|
+
heightMode: SizeInput;
|
|
16
|
+
measure(constraints: SizeConstraints): Partial<Size2D>;
|
|
17
|
+
}
|
|
18
|
+
export interface FlexMeasureEntry<C extends FlexChild = FlexChild> {
|
|
19
|
+
child: C;
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
isFlexibleMain: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface FlexMeasureResult<C extends FlexChild = FlexChild> {
|
|
25
|
+
entries: FlexMeasureEntry<C>[];
|
|
26
|
+
hugWidth: number;
|
|
27
|
+
hugHeight: number;
|
|
28
|
+
}
|
|
29
|
+
export interface FlexAlignment {
|
|
30
|
+
/** -1 = start, 0 = center, 1 = end (matches Vector2 convention used by FlexNode). */
|
|
31
|
+
x: -1 | 0 | 1 | number;
|
|
32
|
+
y: -1 | 0 | 1 | number;
|
|
33
|
+
}
|
|
34
|
+
export interface FlexMeasureInput {
|
|
35
|
+
direction: FlexDirection;
|
|
36
|
+
innerWidth: number;
|
|
37
|
+
innerHeight: number;
|
|
38
|
+
gap: GapSize;
|
|
39
|
+
/** Size mode the container itself uses on each axis. Drives hug-cross anchoring. */
|
|
40
|
+
parentWidthMode: SizeInput;
|
|
41
|
+
parentHeightMode: SizeInput;
|
|
42
|
+
}
|
|
43
|
+
export interface FlexLayoutInput<C extends FlexChild = FlexChild> {
|
|
44
|
+
direction: FlexDirection;
|
|
45
|
+
entries: FlexMeasureEntry<C>[];
|
|
46
|
+
/** The full container rect (post-padding-aware sizing). */
|
|
47
|
+
rect: BoxBounds;
|
|
48
|
+
/** Inner area width/height — outer rect minus padding. */
|
|
49
|
+
innerWidth: number;
|
|
50
|
+
innerHeight: number;
|
|
51
|
+
gap: GapSize;
|
|
52
|
+
alignment: FlexAlignment;
|
|
53
|
+
padding: PaddingResolved;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Pure measure pass for a flex container: measures children, distributes
|
|
57
|
+
* remaining space to fill-main children, and returns hug sizes for the
|
|
58
|
+
* container. Calls `child.measure()` only — no layout side effects.
|
|
59
|
+
*/
|
|
60
|
+
export declare function measureFlex<C extends FlexChild>(children: readonly C[], input: FlexMeasureInput): FlexMeasureResult<C>;
|
|
61
|
+
/**
|
|
62
|
+
* Pure layout pass for a flex container: given measured entries and a rect,
|
|
63
|
+
* returns the local bounds for each child (centered coordinates).
|
|
64
|
+
*/
|
|
65
|
+
export declare function layoutFlex<C extends FlexChild>(input: FlexLayoutInput<C>): BoxBounds[];
|
|
66
|
+
//# sourceMappingURL=flex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flex.d.ts","sourceRoot":"","sources":["../../src/layout/flex.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,CAAC;AAC7C,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACtB,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC1D;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS;IAC7D,KAAK,EAAE,CAAC,CAAC;IACT,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS;IAC9D,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC1B,qFAAqF;IACrF,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;IACvB,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC7B,SAAS,EAAE,aAAa,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,OAAO,CAAC;IACb,oFAAoF;IACpF,eAAe,EAAE,SAAS,CAAC;IAC3B,gBAAgB,EAAE,SAAS,CAAC;CAC/B;AAED,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS;IAC5D,SAAS,EAAE,aAAa,CAAC;IACzB,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/B,2DAA2D;IAC3D,IAAI,EAAE,SAAS,CAAC;IAChB,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,OAAO,CAAC;IACb,SAAS,EAAE,aAAa,CAAC;IACzB,OAAO,EAAE,eAAe,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,SAAS,EAC3C,QAAQ,EAAE,SAAS,CAAC,EAAE,EACtB,KAAK,EAAE,gBAAgB,GACxB,iBAAiB,CAAC,CAAC,CAAC,CAqGtB;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,CAuFtF"}
|