motion-start 0.0.1 → 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 +42 -9
- package/{src → dist}/animation/UseAnimatedState.svelte +27 -25
- package/dist/animation/UseAnimatedState.svelte.d.ts +36 -0
- package/dist/animation/UseAnimatedState.svelte.d.ts.map +1 -0
- package/dist/animation/UseAnimation.svelte.d.ts +29 -0
- package/dist/animation/UseAnimation.svelte.d.ts.map +1 -0
- package/{src/animation/animate.ts → dist/animation/animate.d.ts} +59 -78
- package/dist/animation/animate.d.ts.map +1 -0
- package/dist/animation/animate.js +46 -0
- package/dist/animation/animation-controls.d.ts +12 -0
- package/dist/animation/animation-controls.d.ts.map +1 -0
- package/{src/animation/animation-controls.ts → dist/animation/animation-controls.js} +89 -101
- package/{src/animation/types.ts → dist/animation/types.d.ts} +84 -83
- package/dist/animation/types.d.ts.map +1 -0
- package/dist/animation/types.js +1 -0
- package/dist/animation/use-animated-state.d.ts +2 -0
- package/dist/animation/use-animated-state.d.ts.map +1 -0
- package/dist/animation/use-animated-state.js +1 -0
- package/dist/animation/use-animation.d.ts +62 -0
- package/dist/animation/use-animation.d.ts.map +1 -0
- package/{src/animation/use-animation.ts → dist/animation/use-animation.js} +66 -74
- package/dist/animation/utils/default-transitions.d.ts +27 -0
- package/dist/animation/utils/default-transitions.d.ts.map +1 -0
- package/{src/animation/utils/default-transitions.ts → dist/animation/utils/default-transitions.js} +57 -70
- package/dist/animation/utils/easing.d.ts +9 -0
- package/dist/animation/utils/easing.d.ts.map +1 -0
- package/{src/animation/utils/easing.ts → dist/animation/utils/easing.js} +42 -55
- package/dist/animation/utils/is-animatable.d.ts +17 -0
- package/dist/animation/utils/is-animatable.d.ts.map +1 -0
- package/{src/animation/utils/is-animatable.ts → dist/animation/utils/is-animatable.js} +33 -42
- package/{src/animation/utils/is-animation-controls.ts → dist/animation/utils/is-animation-controls.d.ts} +12 -17
- package/dist/animation/utils/is-animation-controls.d.ts.map +1 -0
- package/dist/animation/utils/is-animation-controls.js +8 -0
- package/{src/animation/utils/is-keyframes-target.ts → dist/animation/utils/is-keyframes-target.d.ts} +12 -17
- package/dist/animation/utils/is-keyframes-target.d.ts.map +1 -0
- package/dist/animation/utils/is-keyframes-target.js +8 -0
- package/dist/animation/utils/transitions.d.ts +35 -0
- package/dist/animation/utils/transitions.d.ts.map +1 -0
- package/{src/animation/utils/transitions.ts → dist/animation/utils/transitions.js} +211 -218
- package/{src/animation/utils/variant-resolvers.ts → dist/animation/utils/variant-resolvers.d.ts} +17 -15
- package/dist/animation/utils/variant-resolvers.d.ts.map +1 -0
- package/dist/animation/utils/variant-resolvers.js +1 -0
- package/{src → dist}/components/AnimatePresence/AnimatePresence.svelte +16 -8
- package/dist/components/AnimatePresence/AnimatePresence.svelte.d.ts +39 -0
- package/dist/components/AnimatePresence/AnimatePresence.svelte.d.ts.map +1 -0
- package/{src → dist}/components/AnimatePresence/PresenceChild/PresenceChild.svelte +14 -14
- package/dist/components/AnimatePresence/PresenceChild/PresenceChild.svelte.d.ts +29 -0
- package/dist/components/AnimatePresence/PresenceChild/PresenceChild.svelte.d.ts.map +1 -0
- package/{src/components/AnimatePresence/PresenceChild/index.ts → dist/components/AnimatePresence/PresenceChild/index.d.ts} +7 -7
- package/dist/components/AnimatePresence/PresenceChild/index.d.ts.map +1 -0
- package/dist/components/AnimatePresence/PresenceChild/index.js +5 -0
- package/{src/components/AnimatePresence/PresenceChild/types.ts → dist/components/AnimatePresence/PresenceChild/types.d.ts} +10 -10
- package/dist/components/AnimatePresence/PresenceChild/types.d.ts.map +1 -0
- package/dist/components/AnimatePresence/PresenceChild/types.js +1 -0
- package/{src/components/AnimatePresence/index.ts → dist/components/AnimatePresence/index.d.ts} +51 -46
- package/dist/components/AnimatePresence/index.d.ts.map +1 -0
- package/dist/components/AnimatePresence/index.js +2 -0
- package/dist/components/AnimatePresence/type.spec-d.d.ts +2 -0
- package/dist/components/AnimatePresence/type.spec-d.d.ts.map +1 -0
- package/dist/components/AnimatePresence/type.spec-d.js +6 -0
- package/{src/components/AnimatePresence/types.ts → dist/components/AnimatePresence/types.d.ts} +82 -79
- package/dist/components/AnimatePresence/types.d.ts.map +1 -0
- package/dist/components/AnimatePresence/types.js +1 -0
- package/dist/components/AnimatePresence/use-presence.d.ts +56 -0
- package/dist/components/AnimatePresence/use-presence.d.ts.map +1 -0
- package/{src/components/AnimatePresence/use-presence.ts → dist/components/AnimatePresence/use-presence.js} +69 -90
- package/{src → dist}/components/AnimateSharedLayout/AnimateSharedLayout.svelte +22 -15
- package/dist/components/AnimateSharedLayout/AnimateSharedLayout.svelte.d.ts +29 -0
- package/dist/components/AnimateSharedLayout/AnimateSharedLayout.svelte.d.ts.map +1 -0
- package/dist/components/AnimateSharedLayout/index.d.ts +11 -0
- package/dist/components/AnimateSharedLayout/index.d.ts.map +1 -0
- package/{src/components/AnimateSharedLayout/index.ts → dist/components/AnimateSharedLayout/index.js} +10 -11
- package/dist/components/AnimateSharedLayout/type.spec-d.d.ts +2 -0
- package/dist/components/AnimateSharedLayout/type.spec-d.d.ts.map +1 -0
- package/dist/components/AnimateSharedLayout/type.spec-d.js +6 -0
- package/{src/components/AnimateSharedLayout/types.ts → dist/components/AnimateSharedLayout/types.d.ts} +91 -111
- package/dist/components/AnimateSharedLayout/types.d.ts.map +1 -0
- package/dist/components/AnimateSharedLayout/types.js +39 -0
- package/dist/components/AnimateSharedLayout/utils/batcher.d.ts +11 -0
- package/dist/components/AnimateSharedLayout/utils/batcher.d.ts.map +1 -0
- package/{src/components/AnimateSharedLayout/utils/batcher.ts → dist/components/AnimateSharedLayout/utils/batcher.js} +86 -96
- package/dist/components/AnimateSharedLayout/utils/crossfader.d.ts +27 -0
- package/dist/components/AnimateSharedLayout/utils/crossfader.d.ts.map +1 -0
- package/{src/components/AnimateSharedLayout/utils/crossfader.ts → dist/components/AnimateSharedLayout/utils/crossfader.js} +228 -260
- package/dist/components/AnimateSharedLayout/utils/rotate.d.ts +8 -0
- package/dist/components/AnimateSharedLayout/utils/rotate.d.ts.map +1 -0
- package/{src/components/AnimateSharedLayout/utils/rotate.ts → dist/components/AnimateSharedLayout/utils/rotate.js} +39 -48
- package/dist/components/AnimateSharedLayout/utils/stack.d.ts +18 -0
- package/dist/components/AnimateSharedLayout/utils/stack.d.ts.map +1 -0
- package/{src/components/AnimateSharedLayout/utils/stack.ts → dist/components/AnimateSharedLayout/utils/stack.js} +138 -160
- package/{src → dist}/components/LazyMotion/LazyMotion.svelte +9 -3
- package/dist/components/LazyMotion/LazyMotion.svelte.d.ts +29 -0
- package/dist/components/LazyMotion/LazyMotion.svelte.d.ts.map +1 -0
- package/{src/components/LazyMotion/index.ts → dist/components/LazyMotion/index.d.ts} +42 -42
- package/dist/components/LazyMotion/index.d.ts.map +1 -0
- package/dist/components/LazyMotion/index.js +36 -0
- package/{src/components/LazyMotion/types.ts → dist/components/LazyMotion/types.d.ts} +57 -58
- package/dist/components/LazyMotion/types.d.ts.map +1 -0
- package/dist/components/LazyMotion/types.js +1 -0
- package/{src → dist}/components/MotionConfig/MotionConfig.svelte +4 -2
- package/dist/components/MotionConfig/MotionConfig.svelte.d.ts +29 -0
- package/dist/components/MotionConfig/MotionConfig.svelte.d.ts.map +1 -0
- package/dist/components/MotionConfig/MotionConfigScaleCorrection.d.ts +4 -0
- package/dist/components/MotionConfig/MotionConfigScaleCorrection.d.ts.map +1 -0
- package/dist/components/MotionConfig/MotionConfigScaleCorrection.js +32 -0
- package/{src/components/MotionConfig/index.ts → dist/components/MotionConfig/index.d.ts} +21 -20
- package/dist/components/MotionConfig/index.d.ts.map +1 -0
- package/dist/components/MotionConfig/index.js +14 -0
- package/dist/components/MotionConfig/type.spec-d.d.ts +2 -0
- package/dist/components/MotionConfig/type.spec-d.d.ts.map +1 -0
- package/dist/components/MotionConfig/type.spec-d.js +6 -0
- package/dist/components/MotionDiv.svelte.d.ts +31 -0
- package/dist/components/MotionDiv.svelte.d.ts.map +1 -0
- package/dist/context/DOMcontext.d.ts +6 -0
- package/dist/context/DOMcontext.d.ts.map +1 -0
- package/dist/context/DOMcontext.js +20 -0
- package/dist/context/LayoutGroupContext.d.ts +10 -0
- package/dist/context/LayoutGroupContext.d.ts.map +1 -0
- package/dist/context/LayoutGroupContext.js +7 -0
- package/dist/context/LazyContext.d.ts +13 -0
- package/dist/context/LazyContext.d.ts.map +1 -0
- package/dist/context/LazyContext.js +5 -0
- package/{src/context/MotionConfigContext.ts → dist/context/MotionConfigContext.d.ts} +35 -48
- package/dist/context/MotionConfigContext.d.ts.map +1 -0
- package/dist/context/MotionConfigContext.js +15 -0
- package/dist/context/MotionContext/MotionContext.svelte +13 -0
- package/dist/context/MotionContext/MotionContext.svelte.d.ts +5 -0
- package/dist/context/MotionContext/MotionContext.svelte.d.ts.map +1 -0
- package/dist/context/MotionContext/MotionContextProvider.svelte.d.ts +31 -0
- package/dist/context/MotionContext/MotionContextProvider.svelte.d.ts.map +1 -0
- package/dist/context/MotionContext/UseCreateMotionContext.svelte +39 -0
- package/dist/context/MotionContext/UseCreateMotionContext.svelte.d.ts +42 -0
- package/dist/context/MotionContext/UseCreateMotionContext.svelte.d.ts.map +1 -0
- package/dist/context/MotionContext/create.d.ts +2 -0
- package/dist/context/MotionContext/create.d.ts.map +1 -0
- package/{src/context/MotionContext/create.ts → dist/context/MotionContext/create.js} +1 -1
- package/dist/context/MotionContext/index.d.ts +15 -0
- package/dist/context/MotionContext/index.d.ts.map +1 -0
- package/dist/context/MotionContext/index.js +8 -0
- package/dist/context/MotionContext/utils.d.ts +9 -0
- package/dist/context/MotionContext/utils.d.ts.map +1 -0
- package/{src/context/MotionContext/utils.ts → dist/context/MotionContext/utils.js} +18 -29
- package/{src/context/PresenceContext.ts → dist/context/PresenceContext.d.ts} +22 -26
- package/dist/context/PresenceContext.d.ts.map +1 -0
- package/dist/context/PresenceContext.js +7 -0
- package/{src → dist}/context/ScaleCorrectionProvider.svelte +2 -3
- package/dist/context/ScaleCorrectionProvider.svelte.d.ts +33 -0
- package/dist/context/ScaleCorrectionProvider.svelte.d.ts.map +1 -0
- package/dist/context/SharedLayoutContext.d.ts +14 -0
- package/dist/context/SharedLayoutContext.d.ts.map +1 -0
- package/dist/context/SharedLayoutContext.js +18 -0
- package/dist/events/UseDomEvent-type.spec-d.d.ts +2 -0
- package/dist/events/UseDomEvent-type.spec-d.d.ts.map +1 -0
- package/dist/events/UseDomEvent-type.spec-d.js +6 -0
- package/{src → dist}/events/UseDomEvent.svelte +2 -17
- package/dist/events/UseDomEvent.svelte.d.ts +29 -0
- package/dist/events/UseDomEvent.svelte.d.ts.map +1 -0
- package/dist/events/UsePointerEvent.svelte +22 -0
- package/dist/events/UsePointerEvent.svelte.d.ts +29 -0
- package/dist/events/UsePointerEvent.svelte.d.ts.map +1 -0
- package/dist/events/event-info.d.ts +11 -0
- package/dist/events/event-info.d.ts.map +1 -0
- package/{src/events/event-info.ts → dist/events/event-info.js} +65 -69
- package/{src/events/types.ts → dist/events/types.d.ts} +16 -15
- package/dist/events/types.d.ts.map +1 -0
- package/dist/events/types.js +1 -0
- package/{src/events/use-dom-event.ts → dist/events/use-dom-event.d.ts} +51 -48
- package/dist/events/use-dom-event.d.ts.map +1 -0
- package/dist/events/use-dom-event.js +30 -0
- package/dist/events/use-pointer-event.d.ts +32 -0
- package/dist/events/use-pointer-event.d.ts.map +1 -0
- package/dist/events/use-pointer-event.js +35 -0
- package/dist/events/utils.d.ts +9 -0
- package/dist/events/utils.d.ts.map +1 -0
- package/{src/events/utils.ts → dist/events/utils.js} +20 -25
- package/dist/gestures/PanSession.d.ts +142 -0
- package/dist/gestures/PanSession.d.ts.map +1 -0
- package/dist/gestures/PanSession.js +232 -0
- package/dist/gestures/UseFocusGesture.svelte.d.ts +31 -0
- package/dist/gestures/UseFocusGesture.svelte.d.ts.map +1 -0
- package/dist/gestures/UseGestures.svelte.d.ts +31 -0
- package/dist/gestures/UseGestures.svelte.d.ts.map +1 -0
- package/{src → dist}/gestures/UseHoverGesture.svelte +6 -3
- package/dist/gestures/UseHoverGesture.svelte.d.ts +31 -0
- package/dist/gestures/UseHoverGesture.svelte.d.ts.map +1 -0
- package/{src → dist}/gestures/UsePanGesture.svelte +6 -5
- package/dist/gestures/UsePanGesture.svelte.d.ts +32 -0
- package/dist/gestures/UsePanGesture.svelte.d.ts.map +1 -0
- package/{src → dist}/gestures/UseTapGesture.svelte +6 -5
- package/dist/gestures/UseTapGesture.svelte.d.ts +31 -0
- package/dist/gestures/UseTapGesture.svelte.d.ts.map +1 -0
- package/{src → dist}/gestures/drag/UseDrag.svelte +5 -4
- package/dist/gestures/drag/UseDrag.svelte.d.ts +32 -0
- package/dist/gestures/drag/UseDrag.svelte.d.ts.map +1 -0
- package/dist/gestures/drag/UseDragControls.svelte +59 -0
- package/dist/gestures/drag/UseDragControls.svelte.d.ts +24 -0
- package/dist/gestures/drag/UseDragControls.svelte.d.ts.map +1 -0
- package/dist/gestures/drag/VisualElementDragControls.d.ts +116 -0
- package/dist/gestures/drag/VisualElementDragControls.d.ts.map +1 -0
- package/dist/gestures/drag/VisualElementDragControls.js +754 -0
- package/{src/gestures/drag/types.ts → dist/gestures/drag/types.d.ts} +309 -307
- package/dist/gestures/drag/types.d.ts.map +1 -0
- package/dist/gestures/drag/types.js +1 -0
- package/dist/gestures/drag/use-drag-controls.d.ts +130 -0
- package/dist/gestures/drag/use-drag-controls.d.ts.map +1 -0
- package/dist/gestures/drag/use-drag-controls.js +157 -0
- package/{src/gestures/drag/use-drag.ts → dist/gestures/drag/use-drag.d.ts} +13 -15
- package/dist/gestures/drag/use-drag.d.ts.map +1 -0
- package/dist/gestures/drag/use-drag.js +1 -0
- package/dist/gestures/drag/utils/constraints.d.ts +78 -0
- package/dist/gestures/drag/utils/constraints.d.ts.map +1 -0
- package/{src/gestures/drag/utils/constraints.ts → dist/gestures/drag/utils/constraints.js} +134 -157
- package/dist/gestures/drag/utils/lock.d.ts +14 -0
- package/dist/gestures/drag/utils/lock.d.ts.map +1 -0
- package/{src/gestures/drag/utils/lock.ts → dist/gestures/drag/utils/lock.js} +56 -69
- package/{src/gestures/types.ts → dist/gestures/types.d.ts} +258 -257
- package/dist/gestures/types.d.ts.map +1 -0
- package/dist/gestures/types.js +1 -0
- package/{src/gestures/use-focus-gesture.ts → dist/gestures/use-focus-gesture.d.ts} +14 -16
- package/dist/gestures/use-focus-gesture.d.ts.map +1 -0
- package/dist/gestures/use-focus-gesture.js +1 -0
- package/dist/gestures/use-gestures.d.ts +2 -0
- package/dist/gestures/use-gestures.d.ts.map +1 -0
- package/{src/gestures/use-gestures.ts → dist/gestures/use-gestures.js} +1 -2
- package/{src/gestures/use-hover-gesture.ts → dist/gestures/use-hover-gesture.d.ts} +8 -10
- package/dist/gestures/use-hover-gesture.d.ts.map +1 -0
- package/dist/gestures/use-hover-gesture.js +1 -0
- package/{src/gestures/use-pan-gesture.ts → dist/gestures/use-pan-gesture.d.ts} +20 -22
- package/dist/gestures/use-pan-gesture.d.ts.map +1 -0
- package/dist/gestures/use-pan-gesture.js +1 -0
- package/{src/gestures/use-tap-gesture.ts → dist/gestures/use-tap-gesture.d.ts} +12 -14
- package/dist/gestures/use-tap-gesture.d.ts.map +1 -0
- package/dist/gestures/use-tap-gesture.js +1 -0
- package/dist/gestures/utils/event-type.d.ts +12 -0
- package/dist/gestures/utils/event-type.d.ts.map +1 -0
- package/{src/gestures/utils/event-type.ts → dist/gestures/utils/event-type.js} +20 -24
- package/dist/gestures/utils/is-node-or-child.d.ts +18 -0
- package/dist/gestures/utils/is-node-or-child.d.ts.map +1 -0
- package/{src/gestures/utils/is-node-or-child.ts → dist/gestures/utils/is-node-or-child.js} +28 -31
- package/dist/index.d.ts +95 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +77 -0
- package/{src → dist}/motion/Motion.svelte +83 -74
- package/dist/motion/Motion.svelte.d.ts +41 -0
- package/dist/motion/Motion.svelte.d.ts.map +1 -0
- package/{src → dist}/motion/MotionSSR.svelte +77 -56
- package/dist/motion/MotionSSR.svelte.d.ts +41 -0
- package/dist/motion/MotionSSR.svelte.d.ts.map +1 -0
- package/dist/motion/features/AnimationState.svelte.d.ts +22 -0
- package/dist/motion/features/AnimationState.svelte.d.ts.map +1 -0
- package/{src → dist}/motion/features/Exit.svelte +15 -5
- package/dist/motion/features/Exit.svelte.d.ts +32 -0
- package/dist/motion/features/Exit.svelte.d.ts.map +1 -0
- package/{src → dist}/motion/features/UseFeatures.svelte +2 -2
- package/dist/motion/features/UseFeatures.svelte.d.ts +45 -0
- package/dist/motion/features/UseFeatures.svelte.d.ts.map +1 -0
- package/dist/motion/features/animations.d.ts +11 -0
- package/dist/motion/features/animations.d.ts.map +1 -0
- package/{src/motion/features/animations.ts → dist/motion/features/animations.js} +14 -22
- package/dist/motion/features/definitions.d.ts +37 -0
- package/dist/motion/features/definitions.d.ts.map +1 -0
- package/{src/motion/features/definitions.ts → dist/motion/features/definitions.js} +42 -49
- package/dist/motion/features/drag.d.ts +11 -0
- package/dist/motion/features/drag.d.ts.map +1 -0
- package/{src/motion/features/drag.ts → dist/motion/features/drag.js} +14 -24
- package/dist/motion/features/gestures.d.ts +11 -0
- package/dist/motion/features/gestures.d.ts.map +1 -0
- package/{src/motion/features/gestures.ts → dist/motion/features/gestures.js} +16 -24
- package/dist/motion/features/layout/Animate.d.ts +2 -0
- package/dist/motion/features/layout/Animate.d.ts.map +1 -0
- package/dist/motion/features/layout/Animate.js +2 -0
- package/{src → dist}/motion/features/layout/Animate.svelte +25 -24
- package/dist/motion/features/layout/Animate.svelte.d.ts +23 -0
- package/dist/motion/features/layout/Animate.svelte.d.ts.map +1 -0
- package/dist/motion/features/layout/AnimateLayoutContextProvider.svelte.d.ts +23 -0
- package/dist/motion/features/layout/AnimateLayoutContextProvider.svelte.d.ts.map +1 -0
- package/dist/motion/features/layout/Measure.d.ts +2 -0
- package/dist/motion/features/layout/Measure.d.ts.map +1 -0
- package/dist/motion/features/layout/Measure.js +2 -0
- package/{src → dist}/motion/features/layout/Measure.svelte +8 -6
- package/dist/motion/features/layout/Measure.svelte.d.ts +24 -0
- package/dist/motion/features/layout/Measure.svelte.d.ts.map +1 -0
- package/{src → dist}/motion/features/layout/MeasureContextProvider.svelte +7 -4
- package/dist/motion/features/layout/MeasureContextProvider.svelte.d.ts +23 -0
- package/dist/motion/features/layout/MeasureContextProvider.svelte.d.ts.map +1 -0
- package/dist/motion/features/layout/index.d.ts +8 -0
- package/dist/motion/features/layout/index.d.ts.map +1 -0
- package/{src/motion/features/layout/index.ts → dist/motion/features/layout/index.js} +11 -20
- package/{src/motion/features/layout/types.ts → dist/motion/features/layout/types.d.ts} +72 -71
- package/dist/motion/features/layout/types.d.ts.map +1 -0
- package/dist/motion/features/layout/types.js +1 -0
- package/dist/motion/features/layout/utils.d.ts +26 -0
- package/dist/motion/features/layout/utils.d.ts.map +1 -0
- package/{src/motion/features/layout/utils.ts → dist/motion/features/layout/utils.js} +28 -40
- package/{src/motion/features/types.ts → dist/motion/features/types.d.ts} +55 -53
- package/dist/motion/features/types.d.ts.map +1 -0
- package/dist/motion/features/types.js +1 -0
- package/{src/motion/features/use-features.ts → dist/motion/features/use-features.d.ts} +12 -16
- package/dist/motion/features/use-features.d.ts.map +1 -0
- package/dist/motion/features/use-features.js +5 -0
- package/dist/motion/index.d.ts +30 -0
- package/dist/motion/index.d.ts.map +1 -0
- package/dist/motion/index.js +35 -0
- package/{src/motion/types.ts → dist/motion/types.d.ts} +281 -278
- package/dist/motion/types.d.ts.map +1 -0
- package/dist/motion/types.js +1 -0
- package/{src → dist}/motion/utils/UseLayoutId.svelte +3 -2
- package/dist/motion/utils/UseLayoutId.svelte.d.ts +35 -0
- package/dist/motion/utils/UseLayoutId.svelte.d.ts.map +1 -0
- package/{src → dist}/motion/utils/UseVisualElement.svelte +22 -13
- package/dist/motion/utils/UseVisualElement.svelte.d.ts +40 -0
- package/dist/motion/utils/UseVisualElement.svelte.d.ts.map +1 -0
- package/{src → dist}/motion/utils/UseVisualState.svelte +27 -27
- package/dist/motion/utils/UseVisualState.svelte.d.ts +37 -0
- package/dist/motion/utils/UseVisualState.svelte.d.ts.map +1 -0
- package/dist/motion/utils/is-forced-motion-value.d.ts +11 -0
- package/dist/motion/utils/is-forced-motion-value.d.ts.map +1 -0
- package/{src/motion/utils/is-forced-motion-value.ts → dist/motion/utils/is-forced-motion-value.js} +13 -23
- package/{src/motion/utils/make-renderless-component.ts → dist/motion/utils/make-renderless-component.d.ts} +12 -17
- package/dist/motion/utils/make-renderless-component.d.ts.map +1 -0
- package/dist/motion/utils/make-renderless-component.js +11 -0
- package/{src/motion/utils/should-inhert-variant.ts → dist/motion/utils/should-inhert-variant.d.ts} +7 -6
- package/dist/motion/utils/should-inhert-variant.d.ts.map +1 -0
- package/dist/motion/utils/should-inhert-variant.js +1 -0
- package/dist/motion/utils/use-motion-ref.d.ts +14 -0
- package/dist/motion/utils/use-motion-ref.d.ts.map +1 -0
- package/dist/motion/utils/use-motion-ref.js +27 -0
- package/dist/motion/utils/use-visual-element.d.ts +11 -0
- package/dist/motion/utils/use-visual-element.d.ts.map +1 -0
- package/dist/motion/utils/use-visual-element.js +1 -0
- package/{src/motion/utils/use-visual-state.ts → dist/motion/utils/use-visual-state.d.ts} +21 -24
- package/dist/motion/utils/use-visual-state.d.ts.map +1 -0
- package/dist/motion/utils/use-visual-state.js +2 -0
- package/dist/motion/utils/valid-prop.d.ts +15 -0
- package/dist/motion/utils/valid-prop.d.ts.map +1 -0
- package/{src/motion/utils/valid-prop.ts → dist/motion/utils/valid-prop.js} +77 -80
- package/dist/render/dom/M-type.spec-d.d.ts +2 -0
- package/dist/render/dom/M-type.spec-d.d.ts.map +1 -0
- package/dist/render/dom/M-type.spec-d.js +6 -0
- package/{src/render/dom/M.svelte → dist/render/dom/Motion-Proxy.svelte} +8 -1
- package/dist/render/dom/Motion-Proxy.svelte.d.ts +33 -0
- package/dist/render/dom/Motion-Proxy.svelte.d.ts.map +1 -0
- package/dist/render/dom/Motion-type.spec-d.d.ts +2 -0
- package/dist/render/dom/Motion-type.spec-d.d.ts.map +1 -0
- package/dist/render/dom/Motion-type.spec-d.js +6 -0
- package/{src → dist}/render/dom/UseRender.svelte +2 -2
- package/dist/render/dom/UseRender.svelte.d.ts +42 -0
- package/dist/render/dom/UseRender.svelte.d.ts.map +1 -0
- package/dist/render/dom/create-visual-element.d.ts +8 -0
- package/dist/render/dom/create-visual-element.d.ts.map +1 -0
- package/{src/render/dom/create-visual-element.ts → dist/render/dom/create-visual-element.js} +12 -22
- package/dist/render/dom/featureBundle.d.ts +24 -0
- package/dist/render/dom/featureBundle.d.ts.map +1 -0
- package/{src/render/dom/featureBundle.ts → dist/render/dom/featureBundle.js} +20 -22
- package/dist/render/dom/motion-minimal.d.ts +942 -0
- package/dist/render/dom/motion-minimal.d.ts.map +1 -0
- package/dist/render/dom/motion-minimal.js +22 -0
- package/dist/render/dom/motion-proxy.d.ts +63 -0
- package/dist/render/dom/motion-proxy.d.ts.map +1 -0
- package/dist/render/dom/motion-proxy.js +57 -0
- package/dist/render/dom/motion.d.ts +966 -0
- package/dist/render/dom/motion.d.ts.map +1 -0
- package/{src/render/dom/motion.ts → dist/render/dom/motion.js} +46 -62
- package/dist/render/dom/projection/convert-to-relative.d.ts +12 -0
- package/dist/render/dom/projection/convert-to-relative.d.ts.map +1 -0
- package/{src/render/dom/projection/convert-to-relative.ts → dist/render/dom/projection/convert-to-relative.js} +32 -40
- package/dist/render/dom/projection/default-scale-correctors.d.ts +40 -0
- package/dist/render/dom/projection/default-scale-correctors.d.ts.map +1 -0
- package/{src/render/dom/projection/default-scale-correctors.ts → dist/render/dom/projection/default-scale-correctors.js} +108 -138
- package/dist/render/dom/projection/measure.d.ts +17 -0
- package/dist/render/dom/projection/measure.d.ts.map +1 -0
- package/{src/render/dom/projection/measure.ts → dist/render/dom/projection/measure.js} +19 -28
- package/dist/render/dom/projection/relative-set.d.ts +8 -0
- package/dist/render/dom/projection/relative-set.d.ts.map +1 -0
- package/{src/render/dom/projection/relative-set.ts → dist/render/dom/projection/relative-set.js} +18 -27
- package/dist/render/dom/projection/scale-correction.d.ts +16 -0
- package/dist/render/dom/projection/scale-correction.d.ts.map +1 -0
- package/dist/render/dom/projection/scale-correction.js +15 -0
- package/{src/render/dom/projection/types.ts → dist/render/dom/projection/types.d.ts} +14 -13
- package/dist/render/dom/projection/types.d.ts.map +1 -0
- package/dist/render/dom/projection/types.js +1 -0
- package/dist/render/dom/projection/utils.d.ts +18 -0
- package/dist/render/dom/projection/utils.d.ts.map +1 -0
- package/{src/render/dom/projection/utils.ts → dist/render/dom/projection/utils.js} +62 -69
- package/dist/render/dom/svg-visual-element.d.ts +3 -0
- package/dist/render/dom/svg-visual-element.d.ts.map +1 -0
- package/{src/render/dom/svg-visual-element.ts → dist/render/dom/svg-visual-element.js} +91 -114
- package/{src/render/dom/types.ts → dist/render/dom/types.d.ts} +33 -32
- package/dist/render/dom/types.d.ts.map +1 -0
- package/dist/render/dom/types.js +1 -0
- package/dist/render/dom/use-render.d.ts +6 -0
- package/dist/render/dom/use-render.d.ts.map +1 -0
- package/dist/render/dom/use-render.js +5 -0
- package/{src → dist}/render/dom/utils/UseInitialMotionProps.svelte +14 -3
- package/dist/render/dom/utils/UseInitialMotionProps.svelte.d.ts +36 -0
- package/dist/render/dom/utils/UseInitialMotionProps.svelte.d.ts.map +1 -0
- package/dist/render/dom/utils/batch-layout.d.ts +14 -0
- package/dist/render/dom/utils/batch-layout.d.ts.map +1 -0
- package/{src/render/dom/utils/batch-layout.ts → dist/render/dom/utils/batch-layout.js} +67 -77
- package/dist/render/dom/utils/camel-to-dash.d.ts +10 -0
- package/dist/render/dom/utils/camel-to-dash.d.ts.map +1 -0
- package/{src/render/dom/utils/camel-to-dash.ts → dist/render/dom/utils/camel-to-dash.js} +17 -20
- package/dist/render/dom/utils/create-config.d.ts +7 -0
- package/dist/render/dom/utils/create-config.d.ts.map +1 -0
- package/dist/render/dom/utils/create-config.js +18 -0
- package/dist/render/dom/utils/css-variables-conversion.d.ts +28 -0
- package/dist/render/dom/utils/css-variables-conversion.d.ts.map +1 -0
- package/{src/render/dom/utils/css-variables-conversion.ts → dist/render/dom/utils/css-variables-conversion.js} +111 -121
- package/dist/render/dom/utils/filter-props.d.ts +8 -0
- package/dist/render/dom/utils/filter-props.d.ts.map +1 -0
- package/{src/render/dom/utils/filter-props.ts → dist/render/dom/utils/filter-props.js} +47 -55
- package/dist/render/dom/utils/is-css-variable.d.ts +14 -0
- package/dist/render/dom/utils/is-css-variable.d.ts.map +1 -0
- package/{src/render/dom/utils/is-css-variable.ts → dist/render/dom/utils/is-css-variable.js} +15 -18
- package/dist/render/dom/utils/is-svg-component.d.ts +8 -0
- package/dist/render/dom/utils/is-svg-component.d.ts.map +1 -0
- package/{src/render/dom/utils/is-svg-component.ts → dist/render/dom/utils/is-svg-component.js} +36 -41
- package/dist/render/dom/utils/parse-dom-variant.d.ts +12 -0
- package/dist/render/dom/utils/parse-dom-variant.d.ts.map +1 -0
- package/{src/render/dom/utils/parse-dom-variant.ts → dist/render/dom/utils/parse-dom-variant.js} +17 -26
- package/dist/render/dom/utils/unit-conversion.d.ts +27 -0
- package/dist/render/dom/utils/unit-conversion.d.ts.map +1 -0
- package/{src/render/dom/utils/unit-conversion.ts → dist/render/dom/utils/unit-conversion.js} +236 -258
- package/dist/render/dom/utils/use-html-props.d.ts +2 -0
- package/dist/render/dom/utils/use-html-props.d.ts.map +1 -0
- package/{src/render/dom/utils/use-html-props.ts → dist/render/dom/utils/use-html-props.js} +2 -2
- package/dist/render/dom/utils/use-svg-props.d.ts +2 -0
- package/dist/render/dom/utils/use-svg-props.d.ts.map +1 -0
- package/dist/render/dom/utils/use-svg-props.js +1 -0
- package/dist/render/dom/value-types/animatable-none.d.ts +7 -0
- package/dist/render/dom/value-types/animatable-none.d.ts.map +1 -0
- package/{src/render/dom/value-types/animatable-none.ts → dist/render/dom/value-types/animatable-none.js} +20 -24
- package/dist/render/dom/value-types/defaults.d.ts +15 -0
- package/dist/render/dom/value-types/defaults.d.ts.map +1 -0
- package/dist/render/dom/value-types/defaults.js +31 -0
- package/dist/render/dom/value-types/dimensions.d.ts +15 -0
- package/dist/render/dom/value-types/dimensions.d.ts.map +1 -0
- package/{src/render/dom/value-types/dimensions.ts → dist/render/dom/value-types/dimensions.js} +23 -27
- package/dist/render/dom/value-types/find.d.ts +15 -0
- package/dist/render/dom/value-types/find.d.ts.map +1 -0
- package/dist/render/dom/value-types/find.js +21 -0
- package/{src/render/dom/value-types/get-as-type.ts → dist/render/dom/value-types/get-as-type.d.ts} +15 -21
- package/dist/render/dom/value-types/get-as-type.d.ts.map +1 -0
- package/dist/render/dom/value-types/get-as-type.js +13 -0
- package/dist/render/dom/value-types/number.d.ts +8 -0
- package/dist/render/dom/value-types/number.d.ts.map +1 -0
- package/{src/render/dom/value-types/number.ts → dist/render/dom/value-types/number.js} +74 -83
- package/{src/render/dom/value-types/test.ts → dist/render/dom/value-types/test.d.ts} +15 -17
- package/dist/render/dom/value-types/test.d.ts.map +1 -0
- package/dist/render/dom/value-types/test.js +9 -0
- package/{src/render/dom/value-types/type-auto.ts → dist/render/dom/value-types/type-auto.d.ts} +15 -21
- package/dist/render/dom/value-types/type-auto.d.ts.map +1 -0
- package/dist/render/dom/value-types/type-auto.js +12 -0
- package/{src/render/dom/value-types/type-int.ts → dist/render/dom/value-types/type-int.d.ts} +14 -23
- package/dist/render/dom/value-types/type-int.d.ts.map +1 -0
- package/dist/render/dom/value-types/type-int.js +12 -0
- package/{src/render/dom/value-types/types.ts → dist/render/dom/value-types/types.d.ts} +9 -8
- package/dist/render/dom/value-types/types.d.ts.map +1 -0
- package/dist/render/dom/value-types/types.js +1 -0
- package/{src → dist}/render/html/UseHTMLProps.svelte +19 -2
- package/{src → dist}/render/html/UseInitialMotionValues.svelte +1 -1
- package/dist/render/html/UseInitialMotionValues.svelte.d.ts +36 -0
- package/dist/render/html/UseInitialMotionValues.svelte.d.ts.map +1 -0
- package/dist/render/html/UseStyle.svelte +32 -0
- package/dist/render/html/UseStyle.svelte.d.ts +36 -0
- package/dist/render/html/UseStyle.svelte.d.ts.map +1 -0
- package/dist/render/html/config-motion.d.ts +13 -0
- package/dist/render/html/config-motion.d.ts.map +1 -0
- package/dist/render/html/config-motion.js +13 -0
- package/dist/render/html/supported-elements.d.ts +12 -0
- package/dist/render/html/supported-elements.d.ts.map +1 -0
- package/{src/render/html/supported-elements.ts → dist/render/html/supported-elements.js} +4 -10
- package/{src/render/html/types.ts → dist/render/html/types.d.ts} +54 -64
- package/dist/render/html/types.d.ts.map +1 -0
- package/dist/render/html/types.js +1 -0
- package/dist/render/html/use-props.d.ts +11 -0
- package/dist/render/html/use-props.d.ts.map +1 -0
- package/dist/render/html/use-props.js +15 -0
- package/dist/render/html/utils/build-projection-transform.d.ts +21 -0
- package/dist/render/html/utils/build-projection-transform.d.ts.map +1 -0
- package/{src/render/html/utils/build-projection-transform.ts → dist/render/html/utils/build-projection-transform.js} +39 -53
- package/dist/render/html/utils/build-styles.d.ts +13 -0
- package/dist/render/html/utils/build-styles.d.ts.map +1 -0
- package/{src/render/html/utils/build-styles.ts → dist/render/html/utils/build-styles.js} +108 -121
- package/dist/render/html/utils/build-transform.d.ts +21 -0
- package/dist/render/html/utils/build-transform.d.ts.map +1 -0
- package/{src/render/html/utils/build-transform.ts → dist/render/html/utils/build-transform.js} +70 -79
- package/dist/render/html/utils/create-render-state.d.ts +17 -0
- package/dist/render/html/utils/create-render-state.d.ts.map +1 -0
- package/dist/render/html/utils/create-render-state.js +18 -0
- package/dist/render/html/utils/render.d.ts +12 -0
- package/dist/render/html/utils/render.d.ts.map +1 -0
- package/{src/render/html/utils/render.ts → dist/render/html/utils/render.js} +15 -22
- package/dist/render/html/utils/scrape-motion-values.d.ts +8 -0
- package/dist/render/html/utils/scrape-motion-values.d.ts.map +1 -0
- package/{src/render/html/utils/scrape-motion-values.ts → dist/render/html/utils/scrape-motion-values.js} +19 -26
- package/dist/render/html/utils/transform.d.ts +25 -0
- package/dist/render/html/utils/transform.d.ts.map +1 -0
- package/{src/render/html/utils/transform.ts → dist/render/html/utils/transform.js} +48 -51
- package/dist/render/html/visual-element.d.ts +2312 -0
- package/dist/render/html/visual-element.d.ts.map +1 -0
- package/{src/render/html/visual-element.ts → dist/render/html/visual-element.js} +111 -129
- package/dist/render/index.d.ts +8 -0
- package/dist/render/index.d.ts.map +1 -0
- package/{src/render/index.ts → dist/render/index.js} +771 -703
- package/{src → dist}/render/svg/UseSVGProps.svelte +2 -2
- package/dist/render/svg/UseSVGProps.svelte.d.ts +39 -0
- package/dist/render/svg/UseSVGProps.svelte.d.ts.map +1 -0
- package/dist/render/svg/config-motion.d.ts +24 -0
- package/dist/render/svg/config-motion.d.ts.map +1 -0
- package/dist/render/svg/config-motion.js +44 -0
- package/dist/render/svg/lowercase-elements.d.ts +10 -0
- package/dist/render/svg/lowercase-elements.d.ts.map +1 -0
- package/{src/render/svg/lowercase-elements.ts → dist/render/svg/lowercase-elements.js} +35 -35
- package/dist/render/svg/supported-elements.d.ts +12 -0
- package/dist/render/svg/supported-elements.d.ts.map +1 -0
- package/{src/render/svg/supported-elements.ts → dist/render/svg/supported-elements.js} +4 -10
- package/dist/render/svg/types.d.ts +39 -0
- package/dist/render/svg/types.d.ts.map +1 -0
- package/dist/render/svg/types.js +1 -0
- package/{src/render/svg/use-props.ts → dist/render/svg/use-props.d.ts} +13 -14
- package/dist/render/svg/use-props.d.ts.map +1 -0
- package/dist/render/svg/use-props.js +1 -0
- package/dist/render/svg/utils/build-attrs.d.ts +16 -0
- package/dist/render/svg/utils/build-attrs.d.ts.map +1 -0
- package/dist/render/svg/utils/build-attrs.js +40 -0
- package/dist/render/svg/utils/camel-case-attrs.d.ts +9 -0
- package/dist/render/svg/utils/camel-case-attrs.d.ts.map +1 -0
- package/{src/render/svg/utils/camel-case-attrs.ts → dist/render/svg/utils/camel-case-attrs.js} +27 -27
- package/dist/render/svg/utils/create-render-state.d.ts +11 -0
- package/dist/render/svg/utils/create-render-state.d.ts.map +1 -0
- package/dist/render/svg/utils/create-render-state.js +7 -0
- package/dist/render/svg/utils/path.d.ts +15 -0
- package/dist/render/svg/utils/path.d.ts.map +1 -0
- package/{src/render/svg/utils/path.ts → dist/render/svg/utils/path.js} +46 -49
- package/dist/render/svg/utils/render.d.ts +8 -0
- package/dist/render/svg/utils/render.d.ts.map +1 -0
- package/{src/render/svg/utils/render.ts → dist/render/svg/utils/render.js} +14 -22
- package/dist/render/svg/utils/scrape-motion-values.d.ts +8 -0
- package/dist/render/svg/utils/scrape-motion-values.d.ts.map +1 -0
- package/{src/render/svg/utils/scrape-motion-values.ts → dist/render/svg/utils/scrape-motion-values.js} +19 -26
- package/dist/render/svg/utils/transform-origin.d.ts +12 -0
- package/dist/render/svg/utils/transform-origin.d.ts.map +1 -0
- package/{src/render/svg/utils/transform-origin.ts → dist/render/svg/utils/transform-origin.js} +21 -30
- package/dist/render/svg/visual-element.d.ts +7 -0
- package/dist/render/svg/visual-element.d.ts.map +1 -0
- package/{src/render/svg/visual-element.ts → dist/render/svg/visual-element.js} +38 -44
- package/{src/render/types.ts → dist/render/types.d.ts} +149 -148
- package/dist/render/types.d.ts.map +1 -0
- package/dist/render/types.js +1 -0
- package/dist/render/utils/animation-state.d.ts +43 -0
- package/dist/render/utils/animation-state.d.ts.map +1 -0
- package/{src/render/utils/animation-state.ts → dist/render/utils/animation-state.js} +338 -375
- package/dist/render/utils/animation.d.ts +27 -0
- package/dist/render/utils/animation.d.ts.map +1 -0
- package/{src/render/utils/animation.ts → dist/render/utils/animation.js} +145 -167
- package/{src/render/utils/compare-by-depth.ts → dist/render/utils/compare-by-depth.d.ts} +15 -18
- package/dist/render/utils/compare-by-depth.d.ts.map +1 -0
- package/dist/render/utils/compare-by-depth.js +8 -0
- package/dist/render/utils/flat-tree.d.ts +14 -0
- package/dist/render/utils/flat-tree.d.ts.map +1 -0
- package/dist/render/utils/flat-tree.js +53 -0
- package/{src/render/utils/is-draggable.ts → dist/render/utils/is-draggable.d.ts} +12 -17
- package/dist/render/utils/is-draggable.d.ts.map +1 -0
- package/dist/render/utils/is-draggable.js +9 -0
- package/{src/render/utils/lifecycles.ts → dist/render/utils/lifecycles.d.ts} +122 -172
- package/dist/render/utils/lifecycles.d.ts.map +1 -0
- package/dist/render/utils/lifecycles.js +44 -0
- package/dist/render/utils/motion-values.d.ts +9 -0
- package/dist/render/utils/motion-values.d.ts.map +1 -0
- package/{src/render/utils/motion-values.ts → dist/render/utils/motion-values.js} +50 -59
- package/dist/render/utils/projection.d.ts +9 -0
- package/dist/render/utils/projection.d.ts.map +1 -0
- package/{src/render/utils/projection.ts → dist/render/utils/projection.js} +29 -38
- package/dist/render/utils/setters.d.ts +794 -0
- package/dist/render/utils/setters.d.ts.map +1 -0
- package/dist/render/utils/setters.js +128 -0
- package/{src/render/utils/state.ts → dist/render/utils/state.d.ts} +90 -113
- package/dist/render/utils/state.d.ts.map +1 -0
- package/dist/render/utils/state.js +26 -0
- package/{src/render/utils/types.ts → dist/render/utils/types.d.ts} +13 -12
- package/dist/render/utils/types.d.ts.map +1 -0
- package/dist/render/utils/types.js +13 -0
- package/dist/render/utils/variants.d.ts +27 -0
- package/dist/render/utils/variants.d.ts.map +1 -0
- package/{src/render/utils/variants.ts → dist/render/utils/variants.js} +66 -76
- package/{src/types/geometry.ts → dist/types/geometry.d.ts} +93 -91
- package/dist/types/geometry.d.ts.map +1 -0
- package/dist/types/geometry.js +1 -0
- package/{src/types.ts → dist/types.d.ts} +1091 -1088
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/dist/utils/UseUnmountEffect.svelte.d.ts +30 -0
- package/dist/utils/UseUnmountEffect.svelte.d.ts.map +1 -0
- package/dist/utils/array.d.ts +12 -0
- package/dist/utils/array.d.ts.map +1 -0
- package/{src/utils/array.ts → dist/utils/array.js} +16 -18
- package/dist/utils/each-axis.d.ts +11 -0
- package/dist/utils/each-axis.d.ts.map +1 -0
- package/{src/utils/each-axis.ts → dist/utils/each-axis.js} +13 -15
- package/dist/utils/errors.d.ts +5 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +16 -0
- package/dist/utils/fix-process-env.d.ts +2 -0
- package/dist/utils/fix-process-env.d.ts.map +1 -0
- package/dist/utils/fix-process-env.js +19 -0
- package/dist/utils/geometry/delta-apply.d.ts +71 -0
- package/dist/utils/geometry/delta-apply.d.ts.map +1 -0
- package/{src/utils/geometry/delta-apply.ts → dist/utils/geometry/delta-apply.js} +162 -162
- package/dist/utils/geometry/delta-calc.d.ts +34 -0
- package/dist/utils/geometry/delta-calc.d.ts.map +1 -0
- package/{src/utils/geometry/delta-calc.ts → dist/utils/geometry/delta-calc.js} +84 -89
- package/dist/utils/geometry/index.d.ts +30 -0
- package/dist/utils/geometry/index.d.ts.map +1 -0
- package/{src/utils/geometry/index.ts → dist/utils/geometry/index.js} +70 -83
- package/dist/utils/is-browser.d.ts +11 -0
- package/dist/utils/is-browser.d.ts.map +1 -0
- package/{src/utils/is-browser.ts → dist/utils/is-browser.js} +10 -12
- package/dist/utils/is-numerical-string.d.ts +14 -0
- package/dist/utils/is-numerical-string.d.ts.map +1 -0
- package/{src/utils/is-numerical-string.ts → dist/utils/is-numerical-string.js} +13 -15
- package/dist/utils/is-ref-object.d.ts +13 -0
- package/dist/utils/is-ref-object.d.ts.map +1 -0
- package/dist/utils/is-ref-object.js +12 -0
- package/dist/utils/noop.d.ts +11 -0
- package/dist/utils/noop.d.ts.map +1 -0
- package/{src/utils/noop.ts → dist/utils/noop.js} +13 -15
- package/dist/utils/resolve-value.d.ts +9 -0
- package/dist/utils/resolve-value.d.ts.map +1 -0
- package/{src/utils/resolve-value.ts → dist/utils/resolve-value.js} +15 -23
- package/dist/utils/shallow-compare.d.ts +11 -0
- package/dist/utils/shallow-compare.d.ts.map +1 -0
- package/{src/utils/shallow-compare.ts → dist/utils/shallow-compare.js} +21 -23
- package/dist/utils/subscription-manager.d.ts +14 -0
- package/dist/utils/subscription-manager.d.ts.map +1 -0
- package/dist/utils/subscription-manager.js +69 -0
- package/dist/utils/time-conversion.d.ts +17 -0
- package/dist/utils/time-conversion.d.ts.map +1 -0
- package/{src/utils/time-conversion.ts → dist/utils/time-conversion.js} +16 -18
- package/{src/utils/transform.ts → dist/utils/transform.d.ts} +93 -120
- package/dist/utils/transform.d.ts.map +1 -0
- package/dist/utils/transform.js +23 -0
- package/dist/utils/use-cycle.d.ts +2 -0
- package/dist/utils/use-cycle.d.ts.map +1 -0
- package/{src/utils/use-cycle.ts → dist/utils/use-cycle.js} +65 -78
- package/dist/utils/use-force-update.d.ts +6 -0
- package/dist/utils/use-force-update.d.ts.map +1 -0
- package/dist/utils/use-force-update.js +2 -0
- package/dist/utils/use-reduced-motion.d.ts +33 -0
- package/dist/utils/use-reduced-motion.d.ts.map +1 -0
- package/{src/utils/use-reduced-motion.ts → dist/utils/use-reduced-motion.js} +52 -70
- package/{src/utils/use-unmount-effect.ts → dist/utils/use-unmount-effect.d.ts} +7 -8
- package/dist/utils/use-unmount-effect.d.ts.map +1 -0
- package/dist/utils/use-unmount-effect.js +1 -0
- package/{src/value/index.ts → dist/value/index.d.ts} +273 -409
- package/dist/value/index.d.ts.map +1 -0
- package/dist/value/index.js +546 -0
- package/dist/value/scroll/use-element-scroll.d.ts +9 -0
- package/dist/value/scroll/use-element-scroll.d.ts.map +1 -0
- package/dist/value/scroll/use-element-scroll.js +39 -0
- package/dist/value/scroll/use-viewport-scroll.d.ts +29 -0
- package/dist/value/scroll/use-viewport-scroll.d.ts.map +1 -0
- package/{src/value/scroll/use-viewport-scroll.ts → dist/value/scroll/use-viewport-scroll.js} +59 -81
- package/dist/value/scroll/utils.d.ts +25 -0
- package/dist/value/scroll/utils.d.ts.map +1 -0
- package/dist/value/scroll/utils.js +48 -0
- package/dist/value/use-combine-values.d.ts +9 -0
- package/dist/value/use-combine-values.d.ts.map +1 -0
- package/dist/value/use-combine-values.js +41 -0
- package/dist/value/use-motion-template.d.ts +31 -0
- package/dist/value/use-motion-template.d.ts.map +1 -0
- package/{src/value/use-motion-template.ts → dist/value/use-motion-template.js} +51 -57
- package/dist/value/use-motion-value.d.ts +27 -0
- package/dist/value/use-motion-value.d.ts.map +1 -0
- package/{src/value/use-motion-value.ts → dist/value/use-motion-value.js} +27 -27
- package/dist/value/use-spring.d.ts +29 -0
- package/dist/value/use-spring.d.ts.map +1 -0
- package/{src/value/use-spring.ts → dist/value/use-spring.js} +64 -84
- package/dist/value/use-transform.d.ts +87 -0
- package/dist/value/use-transform.d.ts.map +1 -0
- package/dist/value/use-transform.js +78 -0
- package/dist/value/use-velocity.d.ts +20 -0
- package/dist/value/use-velocity.d.ts.map +1 -0
- package/{src/value/use-velocity.ts → dist/value/use-velocity.js} +34 -44
- package/dist/value/utils/is-motion-value.d.ts +12 -0
- package/dist/value/utils/is-motion-value.d.ts.map +1 -0
- package/dist/value/utils/is-motion-value.js +8 -0
- package/dist/value/utils/resolve-motion-value.d.ts +16 -0
- package/dist/value/utils/resolve-motion-value.d.ts.map +1 -0
- package/{src/value/utils/resolve-motion-value.ts → dist/value/utils/resolve-motion-value.js} +25 -29
- package/package.json +58 -27
- package/src/animation/use-animated-state.ts +0 -1
- package/src/components/MotionConfig/MotionConfigScaleCorrection.ts +0 -47
- package/src/context/DOMcontext.ts +0 -21
- package/src/context/LayoutGroupContext.ts +0 -13
- package/src/context/LazyContext.ts +0 -18
- package/src/context/MotionContext/MotionContext.svelte +0 -27
- package/src/context/MotionContext/UseCreateMotionContext.svelte +0 -34
- package/src/context/MotionContext/index.ts +0 -14
- package/src/context/SharedLayoutContext.ts +0 -29
- package/src/events/UsePointerEvent.svelte +0 -76
- package/src/events/use-pointer-event.ts +0 -29
- package/src/gestures/PanSession.ts +0 -298
- package/src/gestures/drag/UseDragControls.svelte +0 -145
- package/src/gestures/drag/VisualElementDragControls.ts +0 -632
- package/src/gestures/drag/use-drag-controls.ts +0 -148
- package/src/index.ts +0 -104
- package/src/motion/features/layout/Animate.ts +0 -9
- package/src/motion/features/layout/Measure.ts +0 -9
- package/src/motion/index.ts +0 -64
- package/src/motion/utils/use-motion-ref.ts +0 -41
- package/src/motion/utils/use-visual-element.ts +0 -13
- package/src/render/dom/create-motion-class.ts +0 -12
- package/src/render/dom/motion-minimal.ts +0 -22
- package/src/render/dom/motion-proxy.ts +0 -107
- package/src/render/dom/projection/scale-correction.ts +0 -22
- package/src/render/dom/use-render.ts +0 -11
- package/src/render/dom/utils/create-config.ts +0 -33
- package/src/render/dom/utils/use-svg-props.ts +0 -1
- package/src/render/dom/value-types/defaults.ts +0 -30
- package/src/render/dom/value-types/find.ts +0 -31
- package/src/render/html/UseStyle.svelte +0 -47
- package/src/render/html/config-motion.ts +0 -23
- package/src/render/html/use-props.ts +0 -14
- package/src/render/html/utils/create-render-state.ts +0 -18
- package/src/render/svg/config-motion.ts +0 -51
- package/src/render/svg/types.ts +0 -51
- package/src/render/svg/utils/build-attrs.ts +0 -58
- package/src/render/svg/utils/create-render-state.ts +0 -17
- package/src/render/utils/flat-tree.ts +0 -35
- package/src/render/utils/setters.ts +0 -910
- package/src/utils/errors.ts +0 -22
- package/src/utils/fix-process-env.ts +0 -22
- package/src/utils/is-ref-object.ts +0 -16
- package/src/utils/subscription-manager.ts +0 -49
- package/src/utils/use-constant.ts +0 -23
- package/src/utils/use-force-update.ts +0 -7
- package/src/utils/use-isomorphic-effect.ts +0 -8
- package/src/value/scroll/use-element-scroll.ts +0 -73
- package/src/value/scroll/utils.ts +0 -76
- package/src/value/use-combine-values.ts +0 -53
- package/src/value/use-transform.ts +0 -216
- package/src/value/utils/is-motion-value.ts +0 -15
- /package/{src → dist}/animation/UseAnimation.svelte +0 -0
- /package/{src → dist}/components/MotionDiv.svelte +0 -0
- /package/{src → dist}/context/MotionContext/MotionContextProvider.svelte +0 -0
- /package/{src → dist}/gestures/UseFocusGesture.svelte +0 -0
- /package/{src → dist}/gestures/UseGestures.svelte +0 -0
- /package/{src → dist}/motion/features/AnimationState.svelte +0 -0
- /package/{src → dist}/motion/features/layout/AnimateLayoutContextProvider.svelte +0 -0
- /package/{src → dist}/utils/UseUnmountEffect.svelte +0 -0
|
@@ -1,1088 +1,1091 @@
|
|
|
1
|
-
/**
|
|
2
|
-
based on framer-motion@4.1.17,
|
|
3
|
-
Copyright (c) 2018 Framer B.V.
|
|
4
|
-
*/
|
|
5
|
-
import type {
|
|
6
|
-
import type { SVGPathProperties, TransformProperties } from
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
* -
|
|
74
|
-
* - An
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
* transitions
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
* }
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
* }
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
* staggers from the
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
* }
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
*
|
|
273
|
-
*
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
*
|
|
298
|
-
*
|
|
299
|
-
*
|
|
300
|
-
*
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
*
|
|
305
|
-
*
|
|
306
|
-
*
|
|
307
|
-
*
|
|
308
|
-
*
|
|
309
|
-
*
|
|
310
|
-
*
|
|
311
|
-
*
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
*
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
*
|
|
323
|
-
*
|
|
324
|
-
*
|
|
325
|
-
*
|
|
326
|
-
*
|
|
327
|
-
*
|
|
328
|
-
*
|
|
329
|
-
*
|
|
330
|
-
*
|
|
331
|
-
*
|
|
332
|
-
*
|
|
333
|
-
*
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
*
|
|
340
|
-
*
|
|
341
|
-
*
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
*
|
|
347
|
-
*
|
|
348
|
-
*
|
|
349
|
-
*
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
*
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
*
|
|
356
|
-
*
|
|
357
|
-
*
|
|
358
|
-
*
|
|
359
|
-
*
|
|
360
|
-
*
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
*
|
|
366
|
-
*
|
|
367
|
-
*
|
|
368
|
-
*
|
|
369
|
-
*
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
*
|
|
375
|
-
*
|
|
376
|
-
*
|
|
377
|
-
*
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
*
|
|
383
|
-
*
|
|
384
|
-
*
|
|
385
|
-
*
|
|
386
|
-
*
|
|
387
|
-
*
|
|
388
|
-
*
|
|
389
|
-
*
|
|
390
|
-
*
|
|
391
|
-
*
|
|
392
|
-
*
|
|
393
|
-
*
|
|
394
|
-
*
|
|
395
|
-
*
|
|
396
|
-
*
|
|
397
|
-
*
|
|
398
|
-
*
|
|
399
|
-
*
|
|
400
|
-
*
|
|
401
|
-
*
|
|
402
|
-
*
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
*
|
|
408
|
-
*
|
|
409
|
-
*
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
*
|
|
415
|
-
*
|
|
416
|
-
*
|
|
417
|
-
*
|
|
418
|
-
*
|
|
419
|
-
*
|
|
420
|
-
*
|
|
421
|
-
*
|
|
422
|
-
*
|
|
423
|
-
*
|
|
424
|
-
*
|
|
425
|
-
*
|
|
426
|
-
*
|
|
427
|
-
*
|
|
428
|
-
*
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
*
|
|
434
|
-
*
|
|
435
|
-
*
|
|
436
|
-
*
|
|
437
|
-
*
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
*
|
|
441
|
-
*
|
|
442
|
-
*
|
|
443
|
-
*
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
*
|
|
449
|
-
*
|
|
450
|
-
*
|
|
451
|
-
*
|
|
452
|
-
*
|
|
453
|
-
*
|
|
454
|
-
*
|
|
455
|
-
*
|
|
456
|
-
*
|
|
457
|
-
*
|
|
458
|
-
*
|
|
459
|
-
*
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
*
|
|
478
|
-
*
|
|
479
|
-
*
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
*
|
|
485
|
-
*
|
|
486
|
-
*
|
|
487
|
-
*
|
|
488
|
-
*
|
|
489
|
-
*
|
|
490
|
-
*
|
|
491
|
-
*
|
|
492
|
-
*
|
|
493
|
-
*
|
|
494
|
-
*
|
|
495
|
-
*
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
*
|
|
501
|
-
*
|
|
502
|
-
*
|
|
503
|
-
*
|
|
504
|
-
*
|
|
505
|
-
*
|
|
506
|
-
*
|
|
507
|
-
*
|
|
508
|
-
*
|
|
509
|
-
*
|
|
510
|
-
*
|
|
511
|
-
*
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
*
|
|
517
|
-
*
|
|
518
|
-
*
|
|
519
|
-
*
|
|
520
|
-
*
|
|
521
|
-
*
|
|
522
|
-
*
|
|
523
|
-
*
|
|
524
|
-
*
|
|
525
|
-
*
|
|
526
|
-
*
|
|
527
|
-
*
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
*
|
|
533
|
-
*
|
|
534
|
-
*
|
|
535
|
-
*
|
|
536
|
-
*
|
|
537
|
-
*
|
|
538
|
-
*
|
|
539
|
-
*
|
|
540
|
-
*
|
|
541
|
-
*
|
|
542
|
-
*
|
|
543
|
-
*
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
*
|
|
549
|
-
*
|
|
550
|
-
*
|
|
551
|
-
*
|
|
552
|
-
*
|
|
553
|
-
*
|
|
554
|
-
*
|
|
555
|
-
*
|
|
556
|
-
*
|
|
557
|
-
*
|
|
558
|
-
*
|
|
559
|
-
*
|
|
560
|
-
*
|
|
561
|
-
*
|
|
562
|
-
*
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
*
|
|
568
|
-
*
|
|
569
|
-
*
|
|
570
|
-
*
|
|
571
|
-
*
|
|
572
|
-
*
|
|
573
|
-
*
|
|
574
|
-
*
|
|
575
|
-
*
|
|
576
|
-
*
|
|
577
|
-
*
|
|
578
|
-
*
|
|
579
|
-
*
|
|
580
|
-
*
|
|
581
|
-
*
|
|
582
|
-
*
|
|
583
|
-
*
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
*
|
|
589
|
-
*
|
|
590
|
-
*
|
|
591
|
-
*
|
|
592
|
-
*
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
-
*
|
|
596
|
-
*
|
|
597
|
-
*
|
|
598
|
-
*
|
|
599
|
-
*
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
*
|
|
605
|
-
* `
|
|
606
|
-
*
|
|
607
|
-
*
|
|
608
|
-
*
|
|
609
|
-
*
|
|
610
|
-
*
|
|
611
|
-
*
|
|
612
|
-
*
|
|
613
|
-
*
|
|
614
|
-
*
|
|
615
|
-
*
|
|
616
|
-
*
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
*
|
|
622
|
-
*
|
|
623
|
-
*
|
|
624
|
-
*
|
|
625
|
-
*
|
|
626
|
-
*
|
|
627
|
-
*
|
|
628
|
-
*
|
|
629
|
-
*
|
|
630
|
-
*
|
|
631
|
-
*
|
|
632
|
-
*
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
*
|
|
642
|
-
*
|
|
643
|
-
*
|
|
644
|
-
*
|
|
645
|
-
*
|
|
646
|
-
*
|
|
647
|
-
*
|
|
648
|
-
*
|
|
649
|
-
*
|
|
650
|
-
*
|
|
651
|
-
*
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
*
|
|
662
|
-
*
|
|
663
|
-
*
|
|
664
|
-
*
|
|
665
|
-
*
|
|
666
|
-
*
|
|
667
|
-
*
|
|
668
|
-
*
|
|
669
|
-
*
|
|
670
|
-
*
|
|
671
|
-
*
|
|
672
|
-
*
|
|
673
|
-
*
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
*
|
|
679
|
-
*
|
|
680
|
-
*
|
|
681
|
-
*
|
|
682
|
-
*
|
|
683
|
-
*
|
|
684
|
-
*
|
|
685
|
-
*
|
|
686
|
-
*
|
|
687
|
-
*
|
|
688
|
-
*
|
|
689
|
-
*
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
*
|
|
695
|
-
*
|
|
696
|
-
*
|
|
697
|
-
*
|
|
698
|
-
*
|
|
699
|
-
*
|
|
700
|
-
*
|
|
701
|
-
*
|
|
702
|
-
*
|
|
703
|
-
*
|
|
704
|
-
*
|
|
705
|
-
*
|
|
706
|
-
*
|
|
707
|
-
*
|
|
708
|
-
*
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
*
|
|
714
|
-
*
|
|
715
|
-
*
|
|
716
|
-
*
|
|
717
|
-
*
|
|
718
|
-
*
|
|
719
|
-
*
|
|
720
|
-
*
|
|
721
|
-
*
|
|
722
|
-
*
|
|
723
|
-
*
|
|
724
|
-
*
|
|
725
|
-
*
|
|
726
|
-
*
|
|
727
|
-
*
|
|
728
|
-
*
|
|
729
|
-
*
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
* If
|
|
735
|
-
*
|
|
736
|
-
*
|
|
737
|
-
*
|
|
738
|
-
*
|
|
739
|
-
*
|
|
740
|
-
*
|
|
741
|
-
*
|
|
742
|
-
*
|
|
743
|
-
*
|
|
744
|
-
*
|
|
745
|
-
*
|
|
746
|
-
*
|
|
747
|
-
*
|
|
748
|
-
*
|
|
749
|
-
*
|
|
750
|
-
*
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
*
|
|
756
|
-
*
|
|
757
|
-
*
|
|
758
|
-
*
|
|
759
|
-
*
|
|
760
|
-
*
|
|
761
|
-
*
|
|
762
|
-
*
|
|
763
|
-
*
|
|
764
|
-
*
|
|
765
|
-
*
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
*
|
|
771
|
-
*
|
|
772
|
-
*
|
|
773
|
-
*
|
|
774
|
-
*
|
|
775
|
-
*
|
|
776
|
-
*
|
|
777
|
-
*
|
|
778
|
-
*
|
|
779
|
-
*
|
|
780
|
-
*
|
|
781
|
-
*
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
*
|
|
787
|
-
*
|
|
788
|
-
*
|
|
789
|
-
*
|
|
790
|
-
*
|
|
791
|
-
*
|
|
792
|
-
*
|
|
793
|
-
*
|
|
794
|
-
*
|
|
795
|
-
*
|
|
796
|
-
*
|
|
797
|
-
*
|
|
798
|
-
*
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
*
|
|
804
|
-
*
|
|
805
|
-
*
|
|
806
|
-
*
|
|
807
|
-
*
|
|
808
|
-
*
|
|
809
|
-
*
|
|
810
|
-
*
|
|
811
|
-
*
|
|
812
|
-
*
|
|
813
|
-
*
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
*
|
|
819
|
-
*
|
|
820
|
-
*
|
|
821
|
-
*
|
|
822
|
-
*
|
|
823
|
-
*
|
|
824
|
-
*
|
|
825
|
-
*
|
|
826
|
-
*
|
|
827
|
-
*
|
|
828
|
-
*
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
*
|
|
834
|
-
*
|
|
835
|
-
*
|
|
836
|
-
*
|
|
837
|
-
*
|
|
838
|
-
*
|
|
839
|
-
*
|
|
840
|
-
*
|
|
841
|
-
*
|
|
842
|
-
*
|
|
843
|
-
*
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
*
|
|
849
|
-
*
|
|
850
|
-
*
|
|
851
|
-
*
|
|
852
|
-
*
|
|
853
|
-
*
|
|
854
|
-
*
|
|
855
|
-
*
|
|
856
|
-
*
|
|
857
|
-
*
|
|
858
|
-
*
|
|
859
|
-
*
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
*
|
|
870
|
-
*
|
|
871
|
-
*
|
|
872
|
-
*
|
|
873
|
-
*
|
|
874
|
-
*
|
|
875
|
-
*
|
|
876
|
-
*
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
* Set to `"
|
|
882
|
-
*
|
|
883
|
-
*
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
*
|
|
889
|
-
*
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
*
|
|
895
|
-
*
|
|
896
|
-
*
|
|
897
|
-
*
|
|
898
|
-
*
|
|
899
|
-
*
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
*
|
|
905
|
-
*
|
|
906
|
-
*
|
|
907
|
-
*
|
|
908
|
-
*
|
|
909
|
-
*
|
|
910
|
-
*
|
|
911
|
-
*
|
|
912
|
-
*
|
|
913
|
-
*
|
|
914
|
-
*
|
|
915
|
-
*
|
|
916
|
-
*
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
*
|
|
922
|
-
*
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
*
|
|
932
|
-
*
|
|
933
|
-
*
|
|
934
|
-
*
|
|
935
|
-
*
|
|
936
|
-
*
|
|
937
|
-
*
|
|
938
|
-
*
|
|
939
|
-
*
|
|
940
|
-
*
|
|
941
|
-
*
|
|
942
|
-
*
|
|
943
|
-
*
|
|
944
|
-
*
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
*
|
|
985
|
-
*
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
export type
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
*
|
|
1021
|
-
*
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
export type
|
|
1025
|
-
type
|
|
1026
|
-
type
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
*
|
|
1050
|
-
*
|
|
1051
|
-
*
|
|
1052
|
-
*
|
|
1053
|
-
*
|
|
1054
|
-
* - `
|
|
1055
|
-
*
|
|
1056
|
-
*
|
|
1057
|
-
*
|
|
1058
|
-
*
|
|
1059
|
-
*
|
|
1060
|
-
*
|
|
1061
|
-
*
|
|
1062
|
-
* }
|
|
1063
|
-
*
|
|
1064
|
-
*
|
|
1065
|
-
*
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1
|
+
/**
|
|
2
|
+
based on framer-motion@4.1.17,
|
|
3
|
+
Copyright (c) 2018 Framer B.V.
|
|
4
|
+
*/
|
|
5
|
+
import type { SVGAttributes } from 'svelte/elements';
|
|
6
|
+
import type { SVGPathProperties, TransformProperties } from './motion/types.js';
|
|
7
|
+
import type { Properties } from 'csstype';
|
|
8
|
+
/**
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export type ResolvedKeyframesTarget = [null, ...number[]] | number[] | [null, ...string[]] | string[];
|
|
12
|
+
/**
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
export type KeyframesTarget = ResolvedKeyframesTarget | [null, ...CustomValueType[]] | CustomValueType[];
|
|
16
|
+
/**
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
export type ResolvedSingleTarget = string | number;
|
|
20
|
+
/**
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export type SingleTarget = ResolvedSingleTarget | CustomValueType;
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
export type ResolvedValueTarget = ResolvedSingleTarget | ResolvedKeyframesTarget;
|
|
28
|
+
/**
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export type ValueTarget = SingleTarget | KeyframesTarget;
|
|
32
|
+
/**
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
export type Props = {
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* A function that accepts a progress value between `0` and `1` and returns a
|
|
40
|
+
* new one.
|
|
41
|
+
*
|
|
42
|
+
* @library
|
|
43
|
+
*
|
|
44
|
+
* ```jsx
|
|
45
|
+
* const transition = {
|
|
46
|
+
* ease: progress => progress * progress
|
|
47
|
+
* }
|
|
48
|
+
*
|
|
49
|
+
* <Frame
|
|
50
|
+
* animate={{ opacity: 0 }}
|
|
51
|
+
* transition={transition}
|
|
52
|
+
* />
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* @motion
|
|
56
|
+
*
|
|
57
|
+
* ```jsx
|
|
58
|
+
* <MotionDiv
|
|
59
|
+
* animate={{ opacity: 0 }}
|
|
60
|
+
* transition={{
|
|
61
|
+
* duration: 1,
|
|
62
|
+
* ease: progress => progress * progress
|
|
63
|
+
* }}
|
|
64
|
+
* />
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
69
|
+
export type EasingFunction = (v: number) => number;
|
|
70
|
+
/**
|
|
71
|
+
* The easing function to use. Set as one of:
|
|
72
|
+
*
|
|
73
|
+
* - The name of an in-built easing function.
|
|
74
|
+
* - An array of four numbers to define a cubic bezier curve.
|
|
75
|
+
* - An easing function, that accepts and returns a progress value between `0` and `1`.
|
|
76
|
+
*
|
|
77
|
+
* @public
|
|
78
|
+
*/
|
|
79
|
+
export type Easing = [number, number, number, number] | 'linear' | 'easeIn' | 'easeOut' | 'easeInOut' | 'circIn' | 'circOut' | 'circInOut' | 'backIn' | 'backOut' | 'backInOut' | 'anticipate' | EasingFunction;
|
|
80
|
+
/**
|
|
81
|
+
* Options for orchestrating the timing of animations.
|
|
82
|
+
*
|
|
83
|
+
* @public
|
|
84
|
+
*/
|
|
85
|
+
export interface Orchestration {
|
|
86
|
+
/**
|
|
87
|
+
* Delay the animation by this duration (in seconds). Defaults to `0`.
|
|
88
|
+
*
|
|
89
|
+
* @remarks
|
|
90
|
+
* ```javascript
|
|
91
|
+
* const transition = {
|
|
92
|
+
* delay: 0.2
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*
|
|
96
|
+
* @public
|
|
97
|
+
*/
|
|
98
|
+
delay?: number;
|
|
99
|
+
/**
|
|
100
|
+
* Describes the relationship between the transition and its children. Set
|
|
101
|
+
* to `false` by default.
|
|
102
|
+
*
|
|
103
|
+
* @remarks
|
|
104
|
+
* When using variants, the transition can be scheduled in relation to its
|
|
105
|
+
* children with either `"beforeChildren"` to finish this transition before
|
|
106
|
+
* starting children transitions, `"afterChildren"` to finish children
|
|
107
|
+
* transitions before starting this transition.
|
|
108
|
+
*
|
|
109
|
+
* @motion
|
|
110
|
+
*
|
|
111
|
+
* ```jsx
|
|
112
|
+
* const list = {
|
|
113
|
+
* hidden: {
|
|
114
|
+
* opacity: 0,
|
|
115
|
+
* transition: { when: "afterChildren" }
|
|
116
|
+
* }
|
|
117
|
+
* }
|
|
118
|
+
*
|
|
119
|
+
* const item = {
|
|
120
|
+
* hidden: {
|
|
121
|
+
* opacity: 0,
|
|
122
|
+
* transition: { duration: 2 }
|
|
123
|
+
* }
|
|
124
|
+
* }
|
|
125
|
+
*
|
|
126
|
+
* <Motion let:motion={ul} variants={list} animate="hidden">
|
|
127
|
+
* <ul use:ul>
|
|
128
|
+
* <Motion let:motion variants={item}>
|
|
129
|
+
* <li use:motion />
|
|
130
|
+
* </Motion>
|
|
131
|
+
* <Motion let:motion variants={item}>
|
|
132
|
+
* <li use:motion />
|
|
133
|
+
* </Motion>
|
|
134
|
+
* </ul>
|
|
135
|
+
* </Motion>
|
|
136
|
+
* )
|
|
137
|
+
* ```
|
|
138
|
+
*
|
|
139
|
+
* @public
|
|
140
|
+
*/
|
|
141
|
+
when?: false | 'beforeChildren' | 'afterChildren' | string;
|
|
142
|
+
/**
|
|
143
|
+
* When using variants, children animations will start after this duration
|
|
144
|
+
* (in seconds). You can add the `transition` property to both the `Frame` and the `variant` directly. Adding it to the `variant` generally offers more flexibility, as it allows you to customize the delay per visual state.
|
|
145
|
+
*
|
|
146
|
+
* @motion
|
|
147
|
+
*
|
|
148
|
+
* ```jsx
|
|
149
|
+
* const container = {
|
|
150
|
+
* hidden: { opacity: 0 },
|
|
151
|
+
* show: {
|
|
152
|
+
* opacity: 1,
|
|
153
|
+
* transition: {
|
|
154
|
+
* delayChildren: 0.5
|
|
155
|
+
* }
|
|
156
|
+
* }
|
|
157
|
+
* }
|
|
158
|
+
*
|
|
159
|
+
* const item = {
|
|
160
|
+
* hidden: { opacity: 0 },
|
|
161
|
+
* show: { opacity: 1 }
|
|
162
|
+
* }
|
|
163
|
+
*
|
|
164
|
+
* <Motion let:motion={ul}
|
|
165
|
+
* variants={container}
|
|
166
|
+
* initial="hidden"
|
|
167
|
+
* animate="show">
|
|
168
|
+
* <ul use:ul>
|
|
169
|
+
* <Motion let:motion variants={item}>
|
|
170
|
+
* <li use:motion />
|
|
171
|
+
* </Motion>
|
|
172
|
+
* <Motion let:motion variants={item}>
|
|
173
|
+
* <li use:motion />
|
|
174
|
+
* </Motion>
|
|
175
|
+
* </ul>
|
|
176
|
+
* </Motion>
|
|
177
|
+
* ```
|
|
178
|
+
*
|
|
179
|
+
* @public
|
|
180
|
+
*/
|
|
181
|
+
delayChildren?: number;
|
|
182
|
+
/**
|
|
183
|
+
* When using variants, animations of child components can be staggered by this
|
|
184
|
+
* duration (in seconds).
|
|
185
|
+
*
|
|
186
|
+
* For instance, if `staggerChildren` is `0.01`, the first child will be
|
|
187
|
+
* delayed by `0` seconds, the second by `0.01`, the third by `0.02` and so
|
|
188
|
+
* on.
|
|
189
|
+
*
|
|
190
|
+
* The calculated stagger delay will be added to `delayChildren`.
|
|
191
|
+
*
|
|
192
|
+
* @motion
|
|
193
|
+
*
|
|
194
|
+
* ```jsx
|
|
195
|
+
* const container = {
|
|
196
|
+
* hidden: { opacity: 0 },
|
|
197
|
+
* show: {
|
|
198
|
+
* opacity: 1,
|
|
199
|
+
* transition: {
|
|
200
|
+
* staggerChildren: 0.5
|
|
201
|
+
* }
|
|
202
|
+
* }
|
|
203
|
+
* }
|
|
204
|
+
*
|
|
205
|
+
* const item = {
|
|
206
|
+
* hidden: { opacity: 0 },
|
|
207
|
+
* show: { opacity: 1 }
|
|
208
|
+
* }
|
|
209
|
+
*
|
|
210
|
+
* return (
|
|
211
|
+
* <Motion let:motion={ul}
|
|
212
|
+
* variants={container}
|
|
213
|
+
* initial="hidden"
|
|
214
|
+
* animate="show">
|
|
215
|
+
* <ol use:ul>
|
|
216
|
+
* <Motion let:motion variants={item}>
|
|
217
|
+
* <li use:motion />
|
|
218
|
+
* </Motion>
|
|
219
|
+
* <Motion let:motion variants={item}>
|
|
220
|
+
* <li use:motion />
|
|
221
|
+
* </Motion>
|
|
222
|
+
* </ol>
|
|
223
|
+
* </Motion>
|
|
224
|
+
* )
|
|
225
|
+
* ```
|
|
226
|
+
*
|
|
227
|
+
* @public
|
|
228
|
+
*/
|
|
229
|
+
staggerChildren?: number;
|
|
230
|
+
/**
|
|
231
|
+
* The direction in which to stagger children.
|
|
232
|
+
*
|
|
233
|
+
* A value of `1` staggers from the first to the last while `-1`
|
|
234
|
+
* staggers from the last to the first.
|
|
235
|
+
*
|
|
236
|
+
* @motion
|
|
237
|
+
*
|
|
238
|
+
* ```jsx
|
|
239
|
+
* const container = {
|
|
240
|
+
* hidden: { opacity: 0 },
|
|
241
|
+
* show: {
|
|
242
|
+
* opacity: 1,
|
|
243
|
+
* transition: {
|
|
244
|
+
* delayChildren: 0.5,
|
|
245
|
+
* staggerDirection: -1
|
|
246
|
+
* }
|
|
247
|
+
* }
|
|
248
|
+
* }
|
|
249
|
+
*
|
|
250
|
+
* const item = {
|
|
251
|
+
* hidden: { opacity: 0 },
|
|
252
|
+
* show: { opacity: 1 }
|
|
253
|
+
* }
|
|
254
|
+
*
|
|
255
|
+
* <Motion let:motion={ul}
|
|
256
|
+
* variants={container}
|
|
257
|
+
* initial="hidden"
|
|
258
|
+
* animate="show">
|
|
259
|
+
* <ul use:ul>
|
|
260
|
+
* <Motion let:motion
|
|
261
|
+
* variants={item}
|
|
262
|
+
* size={50}/>
|
|
263
|
+
* <li use:motion/>
|
|
264
|
+
* </Motion>
|
|
265
|
+
* <Motion let:motion
|
|
266
|
+
* variants={item}
|
|
267
|
+
* size={50}/>
|
|
268
|
+
* <li use:motion/>
|
|
269
|
+
* </Motion>*
|
|
270
|
+
* </ul>
|
|
271
|
+
* </Motion>
|
|
272
|
+
* ```
|
|
273
|
+
*
|
|
274
|
+
* @public
|
|
275
|
+
*/
|
|
276
|
+
staggerDirection?: number;
|
|
277
|
+
}
|
|
278
|
+
export interface Repeat {
|
|
279
|
+
/**
|
|
280
|
+
* The number of times to repeat the transition. Set to `Infinity` for perpetual repeating.
|
|
281
|
+
*
|
|
282
|
+
* Without setting `repeatType`, this will loop the animation.
|
|
283
|
+
*
|
|
284
|
+
* @motion
|
|
285
|
+
*
|
|
286
|
+
* ```jsx
|
|
287
|
+
* <MotionDiv
|
|
288
|
+
* animate={{ rotate: 180 }}
|
|
289
|
+
* transition={{ repeat: Infinity, duration: 2 }}
|
|
290
|
+
* />
|
|
291
|
+
* ```
|
|
292
|
+
*
|
|
293
|
+
* @public
|
|
294
|
+
*/
|
|
295
|
+
repeat?: number;
|
|
296
|
+
/**
|
|
297
|
+
* How to repeat the animation. This can be either:
|
|
298
|
+
*
|
|
299
|
+
* "loop": Repeats the animation from the start
|
|
300
|
+
*
|
|
301
|
+
* "reverse": Alternates between forward and backwards playback
|
|
302
|
+
*
|
|
303
|
+
* "mirror": Switches `from` and `to` alternately
|
|
304
|
+
*
|
|
305
|
+
* @motion
|
|
306
|
+
*
|
|
307
|
+
* ```jsx
|
|
308
|
+
* <MotionDiv
|
|
309
|
+
* animate={{ rotate: 180 }}
|
|
310
|
+
* transition={{
|
|
311
|
+
* repeat: 1,
|
|
312
|
+
* repeatType: "reverse",
|
|
313
|
+
* duration: 2
|
|
314
|
+
* }}
|
|
315
|
+
* />
|
|
316
|
+
* ```
|
|
317
|
+
*
|
|
318
|
+
* @public
|
|
319
|
+
*/
|
|
320
|
+
repeatType?: 'loop' | 'reverse' | 'mirror';
|
|
321
|
+
/**
|
|
322
|
+
* When repeating an animation, `repeatDelay` will set the
|
|
323
|
+
* duration of the time to wait, in seconds, between each repetition.
|
|
324
|
+
*
|
|
325
|
+
* @motion
|
|
326
|
+
*
|
|
327
|
+
* ```jsx
|
|
328
|
+
* <MotionDiv
|
|
329
|
+
* animate={{ rotate: 180 }}
|
|
330
|
+
* transition={{ repeat: Infinity, repeatDelay: 1 }}
|
|
331
|
+
* />
|
|
332
|
+
* ```
|
|
333
|
+
*
|
|
334
|
+
* @public
|
|
335
|
+
*/
|
|
336
|
+
repeatDelay?: number;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* An animation that animates between two or more values over a specific duration of time.
|
|
340
|
+
* This is the default animation for non-physical values like `color` and `opacity`.
|
|
341
|
+
*
|
|
342
|
+
* @public
|
|
343
|
+
*/
|
|
344
|
+
export interface Tween extends Repeat {
|
|
345
|
+
/**
|
|
346
|
+
* Set `type` to `"tween"` to use a duration-based tween animation.
|
|
347
|
+
* If any non-orchestration `transition` values are set without a `type` property,
|
|
348
|
+
* this is used as the default animation.
|
|
349
|
+
*
|
|
350
|
+
* @motion
|
|
351
|
+
*
|
|
352
|
+
* ```jsx
|
|
353
|
+
* <Motion let:motion isSVG={true}
|
|
354
|
+
* animate={{ pathLength: 1 }}
|
|
355
|
+
* transition={{ duration: 2, type: "tween" }}>
|
|
356
|
+
* <path use:motion/>
|
|
357
|
+
* </Motion> *
|
|
358
|
+
* />
|
|
359
|
+
* ```
|
|
360
|
+
*
|
|
361
|
+
* @public
|
|
362
|
+
*/
|
|
363
|
+
type?: 'tween';
|
|
364
|
+
/**
|
|
365
|
+
* The duration of the tween animation. Set to `0.3` by default, 0r `0.8` if animating a series of keyframes.
|
|
366
|
+
*
|
|
367
|
+
* @motion
|
|
368
|
+
*
|
|
369
|
+
* ```jsx
|
|
370
|
+
* const variants = {
|
|
371
|
+
* visible: {
|
|
372
|
+
* opacity: 1,
|
|
373
|
+
* transition: { duration: 2 }
|
|
374
|
+
* }
|
|
375
|
+
* }
|
|
376
|
+
* ```
|
|
377
|
+
*
|
|
378
|
+
* @public
|
|
379
|
+
*/
|
|
380
|
+
duration?: number;
|
|
381
|
+
/**
|
|
382
|
+
* The easing function to use. Set as one of the below.
|
|
383
|
+
*
|
|
384
|
+
* - The name of an existing easing function.
|
|
385
|
+
*
|
|
386
|
+
* - An array of four numbers to define a cubic bezier curve.
|
|
387
|
+
*
|
|
388
|
+
* - An easing function, that accepts and returns a value `0-1`.
|
|
389
|
+
*
|
|
390
|
+
* If the animating value is set as an array of multiple values for a keyframes
|
|
391
|
+
* animation, `ease` can be set as an array of easing functions to set different easings between
|
|
392
|
+
* each of those values.
|
|
393
|
+
*
|
|
394
|
+
* @motion
|
|
395
|
+
*
|
|
396
|
+
* ```jsx
|
|
397
|
+
* <MotionDiv
|
|
398
|
+
* animate={{ opacity: 0 }}
|
|
399
|
+
* transition={{ ease: [0.17, 0.67, 0.83, 0.67] }}
|
|
400
|
+
* />
|
|
401
|
+
* ```
|
|
402
|
+
*
|
|
403
|
+
* @public
|
|
404
|
+
*/
|
|
405
|
+
ease?: Easing | Easing[];
|
|
406
|
+
/**
|
|
407
|
+
* The duration of time already elapsed in the animation. Set to `0` by
|
|
408
|
+
* default.
|
|
409
|
+
*
|
|
410
|
+
* @internal
|
|
411
|
+
*/
|
|
412
|
+
elapsed?: number;
|
|
413
|
+
/**
|
|
414
|
+
* When animating keyframes, `times` can be used to determine where in the animation each keyframe is reached.
|
|
415
|
+
* Each value in `times` is a value between `0` and `1`, representing `duration`.
|
|
416
|
+
*
|
|
417
|
+
* There must be the same number of `times` as there are keyframes.
|
|
418
|
+
* Defaults to an array of evenly-spread durations.
|
|
419
|
+
*
|
|
420
|
+
* @motion
|
|
421
|
+
*
|
|
422
|
+
* ```jsx
|
|
423
|
+
* <MotionDiv
|
|
424
|
+
* animate={{ scale: [0, 1, 0.5, 1] }}
|
|
425
|
+
* transition={{ times: [0, 0.1, 0.9, 1] }}
|
|
426
|
+
* />
|
|
427
|
+
* ```
|
|
428
|
+
*
|
|
429
|
+
* @public
|
|
430
|
+
*/
|
|
431
|
+
times?: number[];
|
|
432
|
+
/**
|
|
433
|
+
* When animating keyframes, `easings` can be used to define easing functions between each keyframe. This array should be one item fewer than the number of keyframes, as these easings apply to the transitions between the keyframes.
|
|
434
|
+
*
|
|
435
|
+
* @motion
|
|
436
|
+
*
|
|
437
|
+
* ```jsx
|
|
438
|
+
* <MotionDiv
|
|
439
|
+
* animate={{ backgroundColor: ["#0f0", "#00f", "#f00"] }}
|
|
440
|
+
* transition={{ easings: ["easeIn", "easeOut"] }}
|
|
441
|
+
* />
|
|
442
|
+
* ```
|
|
443
|
+
*
|
|
444
|
+
* @public
|
|
445
|
+
*/
|
|
446
|
+
easings?: Easing[];
|
|
447
|
+
/**
|
|
448
|
+
* The value to animate from.
|
|
449
|
+
* By default, this is the current state of the animating value.
|
|
450
|
+
*
|
|
451
|
+
* @motion
|
|
452
|
+
*
|
|
453
|
+
* ```jsx
|
|
454
|
+
* <MotionDiv
|
|
455
|
+
* animate={{ rotate: 180 }}
|
|
456
|
+
* transition={{ from: 90, duration: 2 }}
|
|
457
|
+
* />
|
|
458
|
+
* ```
|
|
459
|
+
*
|
|
460
|
+
* @public
|
|
461
|
+
*/
|
|
462
|
+
from?: number | string;
|
|
463
|
+
/**
|
|
464
|
+
* @internal
|
|
465
|
+
*/
|
|
466
|
+
to?: number | string | ValueTarget;
|
|
467
|
+
/**
|
|
468
|
+
* @internal
|
|
469
|
+
*/
|
|
470
|
+
velocity?: number;
|
|
471
|
+
/**
|
|
472
|
+
* @internal
|
|
473
|
+
*/
|
|
474
|
+
delay?: number;
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* An animation that simulates spring physics for realistic motion.
|
|
478
|
+
* This is the default animation for physical values like `x`, `y`, `scale` and `rotate`.
|
|
479
|
+
*
|
|
480
|
+
* @public
|
|
481
|
+
*/
|
|
482
|
+
export interface Spring extends Repeat {
|
|
483
|
+
/**
|
|
484
|
+
* Set `type` to `"spring"` to animate using spring physics for natural
|
|
485
|
+
* movement. Type is set to `"spring"` by default.
|
|
486
|
+
*
|
|
487
|
+
* @motion
|
|
488
|
+
*
|
|
489
|
+
* ```jsx
|
|
490
|
+
* <MotionDiv
|
|
491
|
+
* animate={{ rotate: 180 }}
|
|
492
|
+
* transition={{ type: 'spring' }}
|
|
493
|
+
* />
|
|
494
|
+
* ```
|
|
495
|
+
*
|
|
496
|
+
* @public
|
|
497
|
+
*/
|
|
498
|
+
type: 'spring';
|
|
499
|
+
/**
|
|
500
|
+
* Stiffness of the spring. Higher values will create more sudden movement.
|
|
501
|
+
* Set to `100` by default.
|
|
502
|
+
*
|
|
503
|
+
* @motion
|
|
504
|
+
*
|
|
505
|
+
* ```jsx
|
|
506
|
+
* <MotionDiv
|
|
507
|
+
* animate={{ rotate: 180 }}
|
|
508
|
+
* transition={{ type: 'spring', stiffness: 50 }}
|
|
509
|
+
* />
|
|
510
|
+
* ```
|
|
511
|
+
*
|
|
512
|
+
* @public
|
|
513
|
+
*/
|
|
514
|
+
stiffness?: number;
|
|
515
|
+
/**
|
|
516
|
+
* Strength of opposing force. If set to 0, spring will oscillate
|
|
517
|
+
* indefinitely. Set to `10` by default.
|
|
518
|
+
*
|
|
519
|
+
* @motion
|
|
520
|
+
*
|
|
521
|
+
* ```jsx
|
|
522
|
+
* <MotionDiv
|
|
523
|
+
* animate={{ rotate: 180 }}
|
|
524
|
+
* transition={{ type: 'spring', damping: 300 }}
|
|
525
|
+
* />
|
|
526
|
+
* ```
|
|
527
|
+
*
|
|
528
|
+
* @public
|
|
529
|
+
*/
|
|
530
|
+
damping?: number;
|
|
531
|
+
/**
|
|
532
|
+
* Mass of the moving object. Higher values will result in more lethargic
|
|
533
|
+
* movement. Set to `1` by default.
|
|
534
|
+
*
|
|
535
|
+
* @motion
|
|
536
|
+
*
|
|
537
|
+
* ```jsx
|
|
538
|
+
* <motion.feTurbulence
|
|
539
|
+
* animate={{ baseFrequency: 0.5 } as any}
|
|
540
|
+
* transition={{ type: "spring", mass: 0.5 }}
|
|
541
|
+
* />
|
|
542
|
+
* ```
|
|
543
|
+
*
|
|
544
|
+
* @public
|
|
545
|
+
*/
|
|
546
|
+
mass?: number;
|
|
547
|
+
/**
|
|
548
|
+
* The duration of the animation, defined in seconds. Spring animations can be a maximum of 10 seconds.
|
|
549
|
+
*
|
|
550
|
+
* If `bounce` is set, this defaults to `0.8`.
|
|
551
|
+
*
|
|
552
|
+
* Note: `duration` and `bounce` will be overridden if `stiffness`, `damping` or `mass` are set.
|
|
553
|
+
*
|
|
554
|
+
* @motion
|
|
555
|
+
*
|
|
556
|
+
* ```jsx
|
|
557
|
+
* <MotionDiv
|
|
558
|
+
* animate={{ x: 100 }}
|
|
559
|
+
* transition={{ type: "spring", duration: 0.8 }}
|
|
560
|
+
* />
|
|
561
|
+
* ```
|
|
562
|
+
*
|
|
563
|
+
* @public
|
|
564
|
+
*/
|
|
565
|
+
duration?: number;
|
|
566
|
+
/**
|
|
567
|
+
* `bounce` determines the "bounciness" of a spring animation.
|
|
568
|
+
*
|
|
569
|
+
* `0` is no bounce, and `1` is extremely bouncy.
|
|
570
|
+
*
|
|
571
|
+
* If `duration` is set, this defaults to `0.25`.
|
|
572
|
+
*
|
|
573
|
+
* Note: `bounce` and `duration` will be overridden if `stiffness`, `damping` or `mass` are set.
|
|
574
|
+
*
|
|
575
|
+
* @motion
|
|
576
|
+
*
|
|
577
|
+
* ```jsx
|
|
578
|
+
* <MotionDiv
|
|
579
|
+
* animate={{ x: 100 }}
|
|
580
|
+
* transition={{ type: "spring", bounce: 0.25 }}
|
|
581
|
+
* />
|
|
582
|
+
* ```
|
|
583
|
+
*
|
|
584
|
+
* @public
|
|
585
|
+
*/
|
|
586
|
+
bounce?: number;
|
|
587
|
+
/**
|
|
588
|
+
* End animation if absolute speed (in units per second) drops below this
|
|
589
|
+
* value and delta is smaller than `restDelta`. Set to `0.01` by default.
|
|
590
|
+
*
|
|
591
|
+
* @motion
|
|
592
|
+
*
|
|
593
|
+
* ```jsx
|
|
594
|
+
* <MotionDiv
|
|
595
|
+
* animate={{ rotate: 180 }}
|
|
596
|
+
* transition={{ type: 'spring', restSpeed: 0.5 }}
|
|
597
|
+
* />
|
|
598
|
+
* ```
|
|
599
|
+
*
|
|
600
|
+
* @public
|
|
601
|
+
*/
|
|
602
|
+
restSpeed?: number;
|
|
603
|
+
/**
|
|
604
|
+
* End animation if distance is below this value and speed is below
|
|
605
|
+
* `restSpeed`. When animation ends, spring gets “snapped” to. Set to
|
|
606
|
+
* `0.01` by default.
|
|
607
|
+
*
|
|
608
|
+
* @motion
|
|
609
|
+
*
|
|
610
|
+
* ```jsx
|
|
611
|
+
* <MotionDiv
|
|
612
|
+
* animate={{ rotate: 180 }}
|
|
613
|
+
* transition={{ type: 'spring', restDelta: 0.5 }}
|
|
614
|
+
* />
|
|
615
|
+
* ```
|
|
616
|
+
*
|
|
617
|
+
* @public
|
|
618
|
+
*/
|
|
619
|
+
restDelta?: number;
|
|
620
|
+
/**
|
|
621
|
+
* The value to animate from.
|
|
622
|
+
* By default, this is the initial state of the animating value.
|
|
623
|
+
*
|
|
624
|
+
* @motion
|
|
625
|
+
*
|
|
626
|
+
* ```jsx
|
|
627
|
+
* <MotionDiv
|
|
628
|
+
* animate={{ rotate: 180 }}
|
|
629
|
+
* transition={{ type: 'spring', from: 90 }}
|
|
630
|
+
* />
|
|
631
|
+
* ```
|
|
632
|
+
*
|
|
633
|
+
* @public
|
|
634
|
+
*/
|
|
635
|
+
from?: number | string;
|
|
636
|
+
/**
|
|
637
|
+
* @internal
|
|
638
|
+
*/
|
|
639
|
+
to?: number | string | ValueTarget;
|
|
640
|
+
/**
|
|
641
|
+
* The initial velocity of the spring. By default this is the current velocity of the component.
|
|
642
|
+
*
|
|
643
|
+
* @motion
|
|
644
|
+
*
|
|
645
|
+
* ```jsx
|
|
646
|
+
* <MotionDiv
|
|
647
|
+
* animate={{ rotate: 180 }}
|
|
648
|
+
* transition={{ type: 'spring', velocity: 2 }}
|
|
649
|
+
* />
|
|
650
|
+
* ```
|
|
651
|
+
*
|
|
652
|
+
* @public
|
|
653
|
+
*/
|
|
654
|
+
velocity?: number;
|
|
655
|
+
/**
|
|
656
|
+
* @internal
|
|
657
|
+
*/
|
|
658
|
+
delay?: number;
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* An animation that decelerates a value based on its initial velocity,
|
|
662
|
+
* usually used to implement inertial scrolling.
|
|
663
|
+
*
|
|
664
|
+
* Optionally, `min` and `max` boundaries can be defined, and inertia
|
|
665
|
+
* will snap to these with a spring animation.
|
|
666
|
+
*
|
|
667
|
+
* This animation will automatically precalculate a target value,
|
|
668
|
+
* which can be modified with the `modifyTarget` property.
|
|
669
|
+
*
|
|
670
|
+
* This allows you to add snap-to-grid or similar functionality.
|
|
671
|
+
*
|
|
672
|
+
* Inertia is also the animation used for `dragTransition`, and can be configured via that prop.
|
|
673
|
+
*
|
|
674
|
+
* @public
|
|
675
|
+
*/
|
|
676
|
+
export interface Inertia {
|
|
677
|
+
/**
|
|
678
|
+
* Set `type` to animate using the inertia animation. Set to `"tween"` by
|
|
679
|
+
* default. This can be used for natural deceleration, like momentum scrolling.
|
|
680
|
+
*
|
|
681
|
+
* @motion
|
|
682
|
+
*
|
|
683
|
+
* ```jsx
|
|
684
|
+
* <MotionDiv
|
|
685
|
+
* animate={{ rotate: 180 }}
|
|
686
|
+
* transition={{ type: "inertia", velocity: 50 }}
|
|
687
|
+
* />
|
|
688
|
+
* ```
|
|
689
|
+
*
|
|
690
|
+
* @public
|
|
691
|
+
*/
|
|
692
|
+
type: 'inertia';
|
|
693
|
+
/**
|
|
694
|
+
* A function that receives the automatically-calculated target and returns a new one. Useful for snapping the target to a grid.
|
|
695
|
+
*
|
|
696
|
+
* @motion
|
|
697
|
+
*
|
|
698
|
+
* ```jsx
|
|
699
|
+
* <MotionDiv
|
|
700
|
+
* drag
|
|
701
|
+
* dragTransition={{
|
|
702
|
+
* power: 0,
|
|
703
|
+
* // Snap calculated target to nearest 50 pixels
|
|
704
|
+
* modifyTarget: target => Math.round(target / 50) * 50
|
|
705
|
+
* }}
|
|
706
|
+
* />
|
|
707
|
+
* ```
|
|
708
|
+
*
|
|
709
|
+
* @public
|
|
710
|
+
*/
|
|
711
|
+
modifyTarget?(v: number): number;
|
|
712
|
+
/**
|
|
713
|
+
* If `min` or `max` is set, this affects the stiffness of the bounce
|
|
714
|
+
* spring. Higher values will create more sudden movement. Set to `500` by
|
|
715
|
+
* default.
|
|
716
|
+
*
|
|
717
|
+
* @motion
|
|
718
|
+
*
|
|
719
|
+
* ```jsx
|
|
720
|
+
* <MotionDiv
|
|
721
|
+
* drag
|
|
722
|
+
* dragTransition={{
|
|
723
|
+
* min: 0,
|
|
724
|
+
* max: 100,
|
|
725
|
+
* bounceStiffness: 100
|
|
726
|
+
* }}
|
|
727
|
+
* />
|
|
728
|
+
* ```
|
|
729
|
+
*
|
|
730
|
+
* @public
|
|
731
|
+
*/
|
|
732
|
+
bounceStiffness?: number;
|
|
733
|
+
/**
|
|
734
|
+
* If `min` or `max` is set, this affects the damping of the bounce spring.
|
|
735
|
+
* If set to `0`, spring will oscillate indefinitely. Set to `10` by
|
|
736
|
+
* default.
|
|
737
|
+
*
|
|
738
|
+
* @motion
|
|
739
|
+
*
|
|
740
|
+
* ```jsx
|
|
741
|
+
* <MotionDiv
|
|
742
|
+
* drag
|
|
743
|
+
* dragTransition={{
|
|
744
|
+
* min: 0,
|
|
745
|
+
* max: 100,
|
|
746
|
+
* bounceDamping: 8
|
|
747
|
+
* }}
|
|
748
|
+
* />
|
|
749
|
+
* ```
|
|
750
|
+
*
|
|
751
|
+
* @public
|
|
752
|
+
*/
|
|
753
|
+
bounceDamping?: number;
|
|
754
|
+
/**
|
|
755
|
+
* A higher power value equals a further target. Set to `0.8` by default.
|
|
756
|
+
*
|
|
757
|
+
* @motion
|
|
758
|
+
*
|
|
759
|
+
* ```jsx
|
|
760
|
+
* <MotionDiv
|
|
761
|
+
* drag
|
|
762
|
+
* dragTransition={{ power: 0.2 }}
|
|
763
|
+
* />
|
|
764
|
+
* ```
|
|
765
|
+
*
|
|
766
|
+
* @public
|
|
767
|
+
*/
|
|
768
|
+
power?: number;
|
|
769
|
+
/**
|
|
770
|
+
* Adjusting the time constant will change the duration of the
|
|
771
|
+
* deceleration, thereby affecting its feel. Set to `700` by default.
|
|
772
|
+
*
|
|
773
|
+
* @motion
|
|
774
|
+
*
|
|
775
|
+
* ```jsx
|
|
776
|
+
* <MotionDiv
|
|
777
|
+
* drag
|
|
778
|
+
* dragTransition={{ timeConstant: 200 }}
|
|
779
|
+
* />
|
|
780
|
+
* ```
|
|
781
|
+
*
|
|
782
|
+
* @public
|
|
783
|
+
*/
|
|
784
|
+
timeConstant?: number;
|
|
785
|
+
/**
|
|
786
|
+
* End the animation if the distance to the animation target is below this value, and the absolute speed is below `restSpeed`.
|
|
787
|
+
* When the animation ends, the value gets snapped to the animation target. Set to `0.01` by default.
|
|
788
|
+
* Generally the default values provide smooth animation endings, only in rare cases should you need to customize these.
|
|
789
|
+
*
|
|
790
|
+
* @motion
|
|
791
|
+
*
|
|
792
|
+
* ```jsx
|
|
793
|
+
* <MotionDiv
|
|
794
|
+
* drag
|
|
795
|
+
* dragTransition={{ restDelta: 10 }}
|
|
796
|
+
* />
|
|
797
|
+
* ```
|
|
798
|
+
*
|
|
799
|
+
* @public
|
|
800
|
+
*/
|
|
801
|
+
restDelta?: number;
|
|
802
|
+
/**
|
|
803
|
+
* Minimum constraint. If set, the value will "bump" against this value (or immediately spring to it if the animation starts as less than this value).
|
|
804
|
+
*
|
|
805
|
+
* @motion
|
|
806
|
+
*
|
|
807
|
+
* ```jsx
|
|
808
|
+
* <MotionDiv
|
|
809
|
+
* drag
|
|
810
|
+
* dragTransition={{ min: 0, max: 100 }}
|
|
811
|
+
* />
|
|
812
|
+
* ```
|
|
813
|
+
*
|
|
814
|
+
* @public
|
|
815
|
+
*/
|
|
816
|
+
min?: number;
|
|
817
|
+
/**
|
|
818
|
+
* Maximum constraint. If set, the value will "bump" against this value (or immediately snap to it, if the initial animation value exceeds this value).
|
|
819
|
+
*
|
|
820
|
+
* @motion
|
|
821
|
+
*
|
|
822
|
+
* ```jsx
|
|
823
|
+
* <MotionDiv
|
|
824
|
+
* drag
|
|
825
|
+
* dragTransition={{ min: 0, max: 100 }}
|
|
826
|
+
* />
|
|
827
|
+
* ```
|
|
828
|
+
*
|
|
829
|
+
* @public
|
|
830
|
+
*/
|
|
831
|
+
max?: number;
|
|
832
|
+
/**
|
|
833
|
+
* The value to animate from. By default, this is the current state of the animating value.
|
|
834
|
+
*
|
|
835
|
+
* @motion
|
|
836
|
+
*
|
|
837
|
+
* ```jsx
|
|
838
|
+
* <MotionDiv
|
|
839
|
+
* drag
|
|
840
|
+
* dragTransition={{ from: 50 }}
|
|
841
|
+
* />
|
|
842
|
+
* ```
|
|
843
|
+
*
|
|
844
|
+
* @public
|
|
845
|
+
*/
|
|
846
|
+
from?: number | string;
|
|
847
|
+
/**
|
|
848
|
+
* The initial velocity of the animation.
|
|
849
|
+
* By default this is the current velocity of the component.
|
|
850
|
+
*
|
|
851
|
+
* @motion
|
|
852
|
+
*
|
|
853
|
+
* ```jsx
|
|
854
|
+
* <MotionDiv
|
|
855
|
+
* animate={{ rotate: 180 }}
|
|
856
|
+
* transition={{ type: 'inertia', velocity: 200 }}
|
|
857
|
+
* />
|
|
858
|
+
* ```
|
|
859
|
+
*
|
|
860
|
+
* @public
|
|
861
|
+
*/
|
|
862
|
+
velocity?: number;
|
|
863
|
+
/**
|
|
864
|
+
* @internal
|
|
865
|
+
*/
|
|
866
|
+
delay?: number;
|
|
867
|
+
}
|
|
868
|
+
/**
|
|
869
|
+
* Keyframes tweens between multiple `values`.
|
|
870
|
+
*
|
|
871
|
+
* These tweens can be arranged using the `duration`, `easings`, and `times` properties.
|
|
872
|
+
*
|
|
873
|
+
* @internalremarks
|
|
874
|
+
* We could possibly make the `type` property redundant, if not for all animations
|
|
875
|
+
* then for this one quite easily.
|
|
876
|
+
*
|
|
877
|
+
* @internal
|
|
878
|
+
*/
|
|
879
|
+
export interface Keyframes {
|
|
880
|
+
/**
|
|
881
|
+
* Set `type` to `"keyframes"` to animate using the keyframes animation.
|
|
882
|
+
* Set to `"tween"` by default. This can be used to animate between a series of values.
|
|
883
|
+
*
|
|
884
|
+
* @public
|
|
885
|
+
*/
|
|
886
|
+
type: 'keyframes';
|
|
887
|
+
/**
|
|
888
|
+
* An array of values to animate between.
|
|
889
|
+
*
|
|
890
|
+
* @internal
|
|
891
|
+
*/
|
|
892
|
+
values: KeyframesTarget;
|
|
893
|
+
/**
|
|
894
|
+
* An array of numbers between 0 and 1, where `1` represents the `total` duration.
|
|
895
|
+
*
|
|
896
|
+
* Each value represents at which point during the animation each item in the animation target should be hit, so the array should be the same length as `values`.
|
|
897
|
+
*
|
|
898
|
+
* Defaults to an array of evenly-spread durations.
|
|
899
|
+
*
|
|
900
|
+
* @public
|
|
901
|
+
*/
|
|
902
|
+
times?: number[];
|
|
903
|
+
/**
|
|
904
|
+
* An array of easing functions for each generated tween, or a single easing function applied to all tweens.
|
|
905
|
+
*
|
|
906
|
+
* This array should be one item less than `values`, as these easings apply to the transitions *between* the `values`.
|
|
907
|
+
*
|
|
908
|
+
* ```jsx
|
|
909
|
+
* const transition = {
|
|
910
|
+
* backgroundColor: {
|
|
911
|
+
* type: 'keyframes',
|
|
912
|
+
* easings: ['circIn', 'circOut']
|
|
913
|
+
* }
|
|
914
|
+
* }
|
|
915
|
+
* ```
|
|
916
|
+
*
|
|
917
|
+
* @public
|
|
918
|
+
*/
|
|
919
|
+
ease?: Easing | Easing[];
|
|
920
|
+
/**
|
|
921
|
+
* Popmotion's easing prop to define individual easings. `ease` will be mapped to this prop in keyframes animations.
|
|
922
|
+
*
|
|
923
|
+
* @internal
|
|
924
|
+
*/
|
|
925
|
+
easings?: Easing | Easing[];
|
|
926
|
+
/**
|
|
927
|
+
* @internal
|
|
928
|
+
*/
|
|
929
|
+
elapsed?: number;
|
|
930
|
+
/**
|
|
931
|
+
* The total duration of the animation. Set to `0.3` by default.
|
|
932
|
+
*
|
|
933
|
+
* ```jsx
|
|
934
|
+
* const transition = {
|
|
935
|
+
* type: "keyframes",
|
|
936
|
+
* duration: 2
|
|
937
|
+
* }
|
|
938
|
+
*
|
|
939
|
+
* <MotionDiv
|
|
940
|
+
* animate={{ opacity: 0 }}
|
|
941
|
+
* transition={transition}
|
|
942
|
+
* />
|
|
943
|
+
* ```
|
|
944
|
+
*
|
|
945
|
+
* @public
|
|
946
|
+
*/
|
|
947
|
+
duration?: number;
|
|
948
|
+
/**
|
|
949
|
+
* @public
|
|
950
|
+
*/
|
|
951
|
+
repeatDelay?: number;
|
|
952
|
+
/**
|
|
953
|
+
* @internal
|
|
954
|
+
*/
|
|
955
|
+
from?: number | string;
|
|
956
|
+
/**
|
|
957
|
+
* @internal
|
|
958
|
+
*/
|
|
959
|
+
to?: number | string | ValueTarget;
|
|
960
|
+
/**
|
|
961
|
+
* @internal
|
|
962
|
+
*/
|
|
963
|
+
velocity?: number;
|
|
964
|
+
/**
|
|
965
|
+
* @internal
|
|
966
|
+
*/
|
|
967
|
+
delay?: number;
|
|
968
|
+
}
|
|
969
|
+
/**
|
|
970
|
+
* @internal
|
|
971
|
+
*/
|
|
972
|
+
export interface Just {
|
|
973
|
+
type: 'just';
|
|
974
|
+
to?: number | string | ValueTarget;
|
|
975
|
+
from?: number | string;
|
|
976
|
+
delay?: number;
|
|
977
|
+
velocity?: number;
|
|
978
|
+
}
|
|
979
|
+
/**
|
|
980
|
+
* @public
|
|
981
|
+
*/
|
|
982
|
+
export interface None {
|
|
983
|
+
/**
|
|
984
|
+
* Set `type` to `false` for an instant transition.
|
|
985
|
+
*
|
|
986
|
+
* @public
|
|
987
|
+
*/
|
|
988
|
+
type: false;
|
|
989
|
+
/**
|
|
990
|
+
* @internal
|
|
991
|
+
*/
|
|
992
|
+
from?: number | string;
|
|
993
|
+
/**
|
|
994
|
+
* @internal
|
|
995
|
+
*/
|
|
996
|
+
delay?: number;
|
|
997
|
+
/**
|
|
998
|
+
* @internal
|
|
999
|
+
*/
|
|
1000
|
+
velocity?: number;
|
|
1001
|
+
}
|
|
1002
|
+
/**
|
|
1003
|
+
* @public
|
|
1004
|
+
*/
|
|
1005
|
+
export type PopmotionTransitionProps = Tween | Spring | Keyframes | Inertia | Just;
|
|
1006
|
+
/**
|
|
1007
|
+
* @public
|
|
1008
|
+
*/
|
|
1009
|
+
export type PermissiveTransitionDefinition = {
|
|
1010
|
+
[key: string]: any;
|
|
1011
|
+
};
|
|
1012
|
+
/**
|
|
1013
|
+
* @public
|
|
1014
|
+
*/
|
|
1015
|
+
export type TransitionDefinition = Tween | Spring | Keyframes | Inertia | Just | None | PermissiveTransitionDefinition;
|
|
1016
|
+
export type TransitionMap = Orchestration & {
|
|
1017
|
+
[key: string]: TransitionDefinition;
|
|
1018
|
+
};
|
|
1019
|
+
/**
|
|
1020
|
+
* Transition props
|
|
1021
|
+
*
|
|
1022
|
+
* @public
|
|
1023
|
+
*/
|
|
1024
|
+
export type Transition = (Orchestration & Repeat & TransitionDefinition) | (Orchestration & Repeat & TransitionMap);
|
|
1025
|
+
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
1026
|
+
type CSSPropertiesWithoutTransitionOrSingleTransforms = Omit<Properties, 'transition' | 'rotate' | 'scale' | 'perspective'>;
|
|
1027
|
+
type TargetProperties = CSSPropertiesWithoutTransitionOrSingleTransforms & SVGAttributes<SVGElement> & TransformProperties & SVGPathProperties;
|
|
1028
|
+
/**
|
|
1029
|
+
* @public
|
|
1030
|
+
*/
|
|
1031
|
+
export type MakeCustomValueType<T> = {
|
|
1032
|
+
[K in keyof T]: T[K] | CustomValueType;
|
|
1033
|
+
};
|
|
1034
|
+
/**
|
|
1035
|
+
* @public
|
|
1036
|
+
*/
|
|
1037
|
+
export type Target = MakeCustomValueType<TargetProperties>;
|
|
1038
|
+
/**
|
|
1039
|
+
* @public
|
|
1040
|
+
*/
|
|
1041
|
+
export type MakeKeyframes<T> = {
|
|
1042
|
+
[K in keyof T]: T[K] | T[K][] | [null, ...T[K][]];
|
|
1043
|
+
};
|
|
1044
|
+
/**
|
|
1045
|
+
* @public
|
|
1046
|
+
*/
|
|
1047
|
+
export type TargetWithKeyframes = MakeKeyframes<Target>;
|
|
1048
|
+
/**
|
|
1049
|
+
* An object that specifies values to animate to. Each value may be set either as
|
|
1050
|
+
* a single value, or an array of values.
|
|
1051
|
+
*
|
|
1052
|
+
* It may also option contain these properties:
|
|
1053
|
+
*
|
|
1054
|
+
* - `transition`: Specifies transitions for all or individual values.
|
|
1055
|
+
* - `transitionEnd`: Specifies values to set when the animation finishes.
|
|
1056
|
+
*
|
|
1057
|
+
* ```jsx
|
|
1058
|
+
* const target = {
|
|
1059
|
+
* x: "0%",
|
|
1060
|
+
* opacity: 0,
|
|
1061
|
+
* transition: { duration: 1 },
|
|
1062
|
+
* transitionEnd: { display: "none" }
|
|
1063
|
+
* }
|
|
1064
|
+
* ```
|
|
1065
|
+
*
|
|
1066
|
+
* @public
|
|
1067
|
+
*/
|
|
1068
|
+
export type TargetAndTransition = TargetWithKeyframes & {
|
|
1069
|
+
transition?: Transition;
|
|
1070
|
+
transitionEnd?: Target;
|
|
1071
|
+
};
|
|
1072
|
+
export type TargetResolver = (custom: any, current: Target, velocity: Target) => TargetAndTransition;
|
|
1073
|
+
/**
|
|
1074
|
+
* @public
|
|
1075
|
+
*/
|
|
1076
|
+
export type Variant = TargetAndTransition | TargetResolver;
|
|
1077
|
+
/**
|
|
1078
|
+
* @public
|
|
1079
|
+
*/
|
|
1080
|
+
export type Variants = {
|
|
1081
|
+
[key: string]: Variant;
|
|
1082
|
+
};
|
|
1083
|
+
/**
|
|
1084
|
+
* @public
|
|
1085
|
+
*/
|
|
1086
|
+
export interface CustomValueType {
|
|
1087
|
+
mix: (from: any, to: any) => (p: number) => number | string;
|
|
1088
|
+
toValue: () => number | string;
|
|
1089
|
+
}
|
|
1090
|
+
export {};
|
|
1091
|
+
//# sourceMappingURL=types.d.ts.map
|