motion-start 0.1.17 → 0.1.19
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/dist/index.d.ts +66 -65
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +48 -47
- package/dist/motion/features/layout/types.d.ts +2 -1
- package/dist/motion/features/layout/types.d.ts.map +1 -1
- package/dist/motion/features/layout/utils.d.ts +4 -1
- package/dist/motion/features/layout/utils.d.ts.map +1 -1
- package/dist/motion/features/layout/utils.js +8 -3
- package/package.json +21 -21
package/dist/index.d.ts
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
based on framer-motion@4.0.3,
|
|
3
3
|
Copyright (c) 2018 Framer B.V.
|
|
4
4
|
*/
|
|
5
|
-
export { FramerTreeLayoutContext } from
|
|
6
|
-
export { UseGestures } from
|
|
7
|
-
export { UsePanGesture } from
|
|
8
|
-
export { UseTapGesture } from
|
|
9
|
-
export { default as MotionSSR } from
|
|
10
|
-
export { UseAnimation } from
|
|
11
|
-
export { default as Mdiv, default as MotionDiv } from
|
|
5
|
+
export { FramerTreeLayoutContext } from "./context/SharedLayoutContext.js";
|
|
6
|
+
export { UseGestures } from "./gestures/use-gestures.js";
|
|
7
|
+
export { UsePanGesture } from "./gestures/use-pan-gesture.js";
|
|
8
|
+
export { UseTapGesture } from "./gestures/use-tap-gesture.js";
|
|
9
|
+
export { default as MotionSSR } from "./motion/MotionSSR.svelte";
|
|
10
|
+
export { UseAnimation } from "./animation/use-animation.js";
|
|
11
|
+
export { default as Mdiv, default as MotionDiv, } from "./components/MotionDiv.svelte";
|
|
12
12
|
/**
|
|
13
13
|
based on framer-motion@4.1.17,
|
|
14
14
|
Copyright (c) 2018 Framer B.V.
|
|
@@ -16,80 +16,81 @@ Copyright (c) 2018 Framer B.V.
|
|
|
16
16
|
/**
|
|
17
17
|
* Components
|
|
18
18
|
*/
|
|
19
|
-
export { AnimatePresence } from
|
|
20
|
-
export { AnimateSharedLayout } from
|
|
21
|
-
export { LazyMotion } from
|
|
22
|
-
export { MotionConfig } from
|
|
23
|
-
export { motion, createDomMotionComponent, motion as Motion } from
|
|
24
|
-
export { m, m as M } from
|
|
19
|
+
export { AnimatePresence } from "./components/AnimatePresence/index.js";
|
|
20
|
+
export { AnimateSharedLayout } from "./components/AnimateSharedLayout/index.js";
|
|
21
|
+
export { LazyMotion } from "./components/LazyMotion/index.js";
|
|
22
|
+
export { MotionConfig } from "./components/MotionConfig/index.js";
|
|
23
|
+
export { motion, createDomMotionComponent, motion as Motion, } from "./render/dom/motion.js";
|
|
24
|
+
export { m, m as M } from "./render/dom/motion-minimal.js";
|
|
25
25
|
/**
|
|
26
26
|
* Features
|
|
27
27
|
*/
|
|
28
|
-
export { featureBundle, animations, drag, gestureAnimations } from
|
|
28
|
+
export { featureBundle, animations, drag, gestureAnimations, } from "./render/dom/featureBundle.js";
|
|
29
29
|
/**
|
|
30
30
|
* Motion values
|
|
31
31
|
*/
|
|
32
|
-
export { MotionValue, motionValue, type PassiveEffect, type Subscriber } from
|
|
33
|
-
export { useElementScroll } from
|
|
34
|
-
export { useViewportScroll } from
|
|
35
|
-
export { useMotionTemplate } from
|
|
36
|
-
export { useMotionValue } from
|
|
37
|
-
export { useSpring } from
|
|
38
|
-
export { useTransform } from
|
|
39
|
-
export { useVelocity } from
|
|
40
|
-
export { resolveMotionValue } from
|
|
32
|
+
export { MotionValue, motionValue, type PassiveEffect, type Subscriber, } from "./value/index.js";
|
|
33
|
+
export { useElementScroll } from "./value/scroll/use-element-scroll.js";
|
|
34
|
+
export { useViewportScroll } from "./value/scroll/use-viewport-scroll.js";
|
|
35
|
+
export { useMotionTemplate } from "./value/use-motion-template.js";
|
|
36
|
+
export { useMotionValue } from "./value/use-motion-value.js";
|
|
37
|
+
export { useSpring } from "./value/use-spring.js";
|
|
38
|
+
export { useTransform } from "./value/use-transform.js";
|
|
39
|
+
export { useVelocity } from "./value/use-velocity.js";
|
|
40
|
+
export { resolveMotionValue } from "./value/utils/resolve-motion-value.js";
|
|
41
41
|
/**
|
|
42
42
|
* Accessibility
|
|
43
43
|
*/
|
|
44
|
-
export { useReducedMotion } from
|
|
44
|
+
export { useReducedMotion } from "./utils/use-reduced-motion.js";
|
|
45
45
|
/**
|
|
46
46
|
* Utils
|
|
47
47
|
*/
|
|
48
|
-
export { animate } from
|
|
49
|
-
export { animationControls } from
|
|
50
|
-
export type { AnimationControls } from
|
|
51
|
-
export { useAnimation } from
|
|
52
|
-
export { useIsPresent, usePresence } from
|
|
53
|
-
export { createCrossfader } from
|
|
54
|
-
export { UseDomEvent } from
|
|
55
|
-
export type { PanInfo } from
|
|
56
|
-
export { DragControls, useDragControls } from
|
|
57
|
-
export type { FocusHandlers, HoverHandlers, PanHandlers, TapHandlers, TapInfo } from
|
|
58
|
-
export { createMotionComponent } from
|
|
59
|
-
export { isValidMotionProp } from
|
|
60
|
-
export { addScaleCorrection } from
|
|
61
|
-
export { snapshotViewportBox } from
|
|
62
|
-
export { batchLayout, flushLayout } from
|
|
63
|
-
export { visualElement } from
|
|
64
|
-
export type { VisualElement } from
|
|
65
|
-
export { animateVisualElement } from
|
|
66
|
-
export { transform } from
|
|
67
|
-
export { useCycle } from
|
|
48
|
+
export { animate } from "./animation/animate.js";
|
|
49
|
+
export { animationControls } from "./animation/animation-controls.js";
|
|
50
|
+
export type { AnimationControls } from "./animation/types.js";
|
|
51
|
+
export { useAnimation } from "./animation/use-animation.js";
|
|
52
|
+
export { useIsPresent, usePresence, } from "./components/AnimatePresence/use-presence.js";
|
|
53
|
+
export { createCrossfader } from "./components/AnimateSharedLayout/utils/crossfader.js";
|
|
54
|
+
export { UseDomEvent } from "./events/use-dom-event.js";
|
|
55
|
+
export type { PanInfo } from "./gestures/PanSession.js";
|
|
56
|
+
export { DragControls, useDragControls, } from "./gestures/drag/use-drag-controls.js";
|
|
57
|
+
export type { FocusHandlers, HoverHandlers, PanHandlers, TapHandlers, TapInfo, } from "./gestures/types.js";
|
|
58
|
+
export { createMotionComponent } from "./motion/index.js";
|
|
59
|
+
export { isValidMotionProp } from "./motion/utils/valid-prop.js";
|
|
60
|
+
export { addScaleCorrection } from "./render/dom/projection/scale-correction.js";
|
|
61
|
+
export { snapshotViewportBox } from "./render/dom/projection/utils.js";
|
|
62
|
+
export { batchLayout, flushLayout } from "./render/dom/utils/batch-layout.js";
|
|
63
|
+
export { visualElement } from "./render/index.js";
|
|
64
|
+
export type { VisualElement } from "./render/types.js";
|
|
65
|
+
export { animateVisualElement } from "./render/utils/animation.js";
|
|
66
|
+
export { transform } from "./utils/transform.js";
|
|
67
|
+
export { useCycle } from "./utils/use-cycle.js";
|
|
68
68
|
/**
|
|
69
69
|
* Contexts
|
|
70
70
|
*/
|
|
71
|
-
export { LayoutGroupContext } from
|
|
72
|
-
export { MotionConfigContext } from
|
|
73
|
-
export { PresenceContext } from
|
|
71
|
+
export { LayoutGroupContext } from "./context/LayoutGroupContext.js";
|
|
72
|
+
export { MotionConfigContext } from "./context/MotionConfigContext.js";
|
|
73
|
+
export { PresenceContext } from "./context/PresenceContext.js";
|
|
74
74
|
/**
|
|
75
75
|
* Types
|
|
76
76
|
*/
|
|
77
|
-
export type { AnimationOptions, AnimationPlaybackControls } from
|
|
78
|
-
export type { AnimatePresenceProps } from
|
|
79
|
-
export type { SharedLayoutAnimationConfig, SharedLayoutProps, SharedLayoutSyncMethods, SyncLayoutLifecycles, VisibilityAction, } from
|
|
80
|
-
export { createBatcher } from
|
|
81
|
-
export type { LazyProps } from
|
|
82
|
-
export type { MotionConfigProps } from
|
|
83
|
-
export type { SharedLayoutContext } from
|
|
84
|
-
export type { EventInfo } from
|
|
85
|
-
export type { DragElastic, DragHandlers, DraggableProps } from
|
|
86
|
-
export type { LayoutProps } from
|
|
87
|
-
export * from
|
|
88
|
-
export type { AnimationProps, MotionAdvancedProps, MotionProps, MotionStyle, MotionTransform, RelayoutInfo, ResolveLayoutTransition, VariantLabels, } from
|
|
89
|
-
export type { CustomDomComponent } from
|
|
90
|
-
export { FlatTree } from
|
|
91
|
-
export type { VisualElementLifecycles } from
|
|
92
|
-
export type { CustomValueType, EasingFunction, Inertia, Keyframes, KeyframesTarget, None, Orchestration, Repeat, ResolvedKeyframesTarget, ResolvedSingleTarget, ResolvedValueTarget, SingleTarget, Spring, Target, TargetAndTransition, Transition, Tween, ValueTarget, Variant, Variants, } from
|
|
93
|
-
export * from
|
|
94
|
-
export type { ScrollMotionValues } from
|
|
77
|
+
export type { AnimationOptions, AnimationPlaybackControls, } from "./animation/animate.js";
|
|
78
|
+
export type { AnimatePresenceProps } from "./components/AnimatePresence/types.js";
|
|
79
|
+
export type { SharedLayoutAnimationConfig, SharedLayoutProps, SharedLayoutSyncMethods, SyncLayoutLifecycles, VisibilityAction, } from "./components/AnimateSharedLayout/types.js";
|
|
80
|
+
export { createBatcher } from "./components/AnimateSharedLayout/utils/batcher.js";
|
|
81
|
+
export type { LazyProps } from "./components/LazyMotion/types.js";
|
|
82
|
+
export type { MotionConfigProps } from "./components/MotionConfig/index.js";
|
|
83
|
+
export type { SharedLayoutContext } from "./context/SharedLayoutContext.js";
|
|
84
|
+
export type { EventInfo } from "./events/types.js";
|
|
85
|
+
export type { DragElastic, DragHandlers, DraggableProps, } from "./gestures/drag/types.js";
|
|
86
|
+
export type { LayoutProps } from "./motion/features/layout/types.js";
|
|
87
|
+
export * from "./motion/features/types.js";
|
|
88
|
+
export type { AnimationProps, MotionAdvancedProps, MotionProps, MotionStyle, MotionTransform, RelayoutInfo, ResolveLayoutTransition, VariantLabels, } from "./motion/types.js";
|
|
89
|
+
export type { CustomDomComponent } from "./render/dom/motion-proxy.js";
|
|
90
|
+
export { FlatTree } from "./render/utils/flat-tree.js";
|
|
91
|
+
export type { VisualElementLifecycles } from "./render/utils/lifecycles.js";
|
|
92
|
+
export type { CustomValueType, EasingFunction, Inertia, Keyframes, KeyframesTarget, None, Orchestration, Repeat, ResolvedKeyframesTarget, ResolvedSingleTarget, ResolvedValueTarget, SingleTarget, Spring, Target, TargetAndTransition, Transition, Tween, ValueTarget, Variant, Variants, } from "./types.js";
|
|
93
|
+
export * from "./types/geometry.js";
|
|
94
|
+
export type { ScrollMotionValues } from "./value/scroll/utils.js";
|
|
95
|
+
export { animateLayout as layoutAnimation } from "./motion/features/layout/utils.js";
|
|
95
96
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/lib/motion-start/index.ts"],"names":[],"mappings":"AAAA;;;EAGE;AACF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/lib/motion-start/index.ts"],"names":[],"mappings":"AAAA;;;EAGE;AACF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,OAAO,EACL,OAAO,IAAI,IAAI,EACf,OAAO,IAAI,SAAS,GACrB,MAAM,+BAA+B,CAAC;AAIvC;;;EAGE;AACF;;GAEG;AACH,OA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AC"}
|
package/dist/index.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
based on framer-motion@4.0.3,
|
|
3
3
|
Copyright (c) 2018 Framer B.V.
|
|
4
4
|
*/
|
|
5
|
-
export { FramerTreeLayoutContext } from
|
|
6
|
-
export { UseGestures } from
|
|
7
|
-
export { UsePanGesture } from
|
|
8
|
-
export { UseTapGesture } from
|
|
9
|
-
export { default as MotionSSR } from
|
|
10
|
-
export { UseAnimation } from
|
|
11
|
-
export { default as Mdiv, default as MotionDiv } from
|
|
5
|
+
export { FramerTreeLayoutContext } from "./context/SharedLayoutContext.js";
|
|
6
|
+
export { UseGestures } from "./gestures/use-gestures.js";
|
|
7
|
+
export { UsePanGesture } from "./gestures/use-pan-gesture.js";
|
|
8
|
+
export { UseTapGesture } from "./gestures/use-tap-gesture.js";
|
|
9
|
+
export { default as MotionSSR } from "./motion/MotionSSR.svelte";
|
|
10
|
+
export { UseAnimation } from "./animation/use-animation.js";
|
|
11
|
+
export { default as Mdiv, default as MotionDiv, } from "./components/MotionDiv.svelte";
|
|
12
12
|
// ----------------------------------------------------------------------------------------------
|
|
13
13
|
/**
|
|
14
14
|
based on framer-motion@4.1.17,
|
|
@@ -17,60 +17,61 @@ Copyright (c) 2018 Framer B.V.
|
|
|
17
17
|
/**
|
|
18
18
|
* Components
|
|
19
19
|
*/
|
|
20
|
-
export { AnimatePresence } from
|
|
21
|
-
export { AnimateSharedLayout } from
|
|
22
|
-
export { LazyMotion } from
|
|
23
|
-
export { MotionConfig } from
|
|
24
|
-
export { motion, createDomMotionComponent, motion as Motion } from
|
|
25
|
-
export { m, m as M } from
|
|
20
|
+
export { AnimatePresence } from "./components/AnimatePresence/index.js";
|
|
21
|
+
export { AnimateSharedLayout } from "./components/AnimateSharedLayout/index.js";
|
|
22
|
+
export { LazyMotion } from "./components/LazyMotion/index.js";
|
|
23
|
+
export { MotionConfig } from "./components/MotionConfig/index.js";
|
|
24
|
+
export { motion, createDomMotionComponent, motion as Motion, } from "./render/dom/motion.js";
|
|
25
|
+
export { m, m as M } from "./render/dom/motion-minimal.js";
|
|
26
26
|
/**
|
|
27
27
|
* Features
|
|
28
28
|
*/
|
|
29
|
-
export { featureBundle, animations, drag, gestureAnimations } from
|
|
29
|
+
export { featureBundle, animations, drag, gestureAnimations, } from "./render/dom/featureBundle.js";
|
|
30
30
|
/**
|
|
31
31
|
* Motion values
|
|
32
32
|
*/
|
|
33
|
-
export { MotionValue, motionValue } from
|
|
34
|
-
export { useElementScroll } from
|
|
35
|
-
export { useViewportScroll } from
|
|
36
|
-
export { useMotionTemplate } from
|
|
37
|
-
export { useMotionValue } from
|
|
38
|
-
export { useSpring } from
|
|
39
|
-
export { useTransform } from
|
|
40
|
-
export { useVelocity } from
|
|
41
|
-
export { resolveMotionValue } from
|
|
33
|
+
export { MotionValue, motionValue, } from "./value/index.js";
|
|
34
|
+
export { useElementScroll } from "./value/scroll/use-element-scroll.js";
|
|
35
|
+
export { useViewportScroll } from "./value/scroll/use-viewport-scroll.js";
|
|
36
|
+
export { useMotionTemplate } from "./value/use-motion-template.js";
|
|
37
|
+
export { useMotionValue } from "./value/use-motion-value.js";
|
|
38
|
+
export { useSpring } from "./value/use-spring.js";
|
|
39
|
+
export { useTransform } from "./value/use-transform.js";
|
|
40
|
+
export { useVelocity } from "./value/use-velocity.js";
|
|
41
|
+
export { resolveMotionValue } from "./value/utils/resolve-motion-value.js";
|
|
42
42
|
/**
|
|
43
43
|
* Accessibility
|
|
44
44
|
*/
|
|
45
|
-
export { useReducedMotion } from
|
|
45
|
+
export { useReducedMotion } from "./utils/use-reduced-motion.js";
|
|
46
46
|
/**
|
|
47
47
|
* Utils
|
|
48
48
|
*/
|
|
49
|
-
export { animate } from
|
|
50
|
-
export { animationControls } from
|
|
51
|
-
export { useAnimation } from
|
|
52
|
-
export { useIsPresent, usePresence } from
|
|
53
|
-
export { createCrossfader } from
|
|
54
|
-
export { UseDomEvent } from
|
|
55
|
-
export { DragControls, useDragControls } from
|
|
56
|
-
export { createMotionComponent } from
|
|
57
|
-
export { isValidMotionProp } from
|
|
58
|
-
export { addScaleCorrection } from
|
|
59
|
-
export { snapshotViewportBox } from
|
|
60
|
-
export { batchLayout, flushLayout } from
|
|
61
|
-
export { visualElement } from
|
|
62
|
-
export { animateVisualElement } from
|
|
63
|
-
export { transform } from
|
|
64
|
-
export { useCycle } from
|
|
49
|
+
export { animate } from "./animation/animate.js";
|
|
50
|
+
export { animationControls } from "./animation/animation-controls.js";
|
|
51
|
+
export { useAnimation } from "./animation/use-animation.js";
|
|
52
|
+
export { useIsPresent, usePresence, } from "./components/AnimatePresence/use-presence.js";
|
|
53
|
+
export { createCrossfader } from "./components/AnimateSharedLayout/utils/crossfader.js";
|
|
54
|
+
export { UseDomEvent } from "./events/use-dom-event.js";
|
|
55
|
+
export { DragControls, useDragControls, } from "./gestures/drag/use-drag-controls.js";
|
|
56
|
+
export { createMotionComponent } from "./motion/index.js";
|
|
57
|
+
export { isValidMotionProp } from "./motion/utils/valid-prop.js";
|
|
58
|
+
export { addScaleCorrection } from "./render/dom/projection/scale-correction.js";
|
|
59
|
+
export { snapshotViewportBox } from "./render/dom/projection/utils.js";
|
|
60
|
+
export { batchLayout, flushLayout } from "./render/dom/utils/batch-layout.js";
|
|
61
|
+
export { visualElement } from "./render/index.js";
|
|
62
|
+
export { animateVisualElement } from "./render/utils/animation.js";
|
|
63
|
+
export { transform } from "./utils/transform.js";
|
|
64
|
+
export { useCycle } from "./utils/use-cycle.js";
|
|
65
65
|
/**
|
|
66
66
|
* Contexts
|
|
67
67
|
*/
|
|
68
|
-
export { LayoutGroupContext } from
|
|
69
|
-
export { MotionConfigContext } from
|
|
70
|
-
export { PresenceContext } from
|
|
71
|
-
export { createBatcher } from
|
|
72
|
-
export * from
|
|
68
|
+
export { LayoutGroupContext } from "./context/LayoutGroupContext.js";
|
|
69
|
+
export { MotionConfigContext } from "./context/MotionConfigContext.js";
|
|
70
|
+
export { PresenceContext } from "./context/PresenceContext.js";
|
|
71
|
+
export { createBatcher } from "./components/AnimateSharedLayout/utils/batcher.js";
|
|
72
|
+
export * from "./motion/features/types.js";
|
|
73
73
|
// export type { ForwardRefComponent, HTMLMotionProps } from "./render/html/types.js";
|
|
74
74
|
// export type { SVGAttributesAsMotionValues, SVGMotionProps } from "./render/svg/types.js";
|
|
75
|
-
export { FlatTree } from
|
|
76
|
-
export * from
|
|
75
|
+
export { FlatTree } from "./render/utils/flat-tree.js";
|
|
76
|
+
export * from "./types/geometry.js";
|
|
77
|
+
export { animateLayout as layoutAnimation } from "./motion/features/layout/utils.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { animateLayout } from "./utils";
|
|
1
2
|
/**
|
|
2
3
|
based on framer-motion@4.1.17,
|
|
3
4
|
Copyright (c) 2018 Framer B.V.
|
|
@@ -28,7 +29,7 @@ export interface LayoutProps {
|
|
|
28
29
|
*
|
|
29
30
|
* @public
|
|
30
31
|
*/
|
|
31
|
-
layout?: boolean | "position";
|
|
32
|
+
layout?: ReturnType<(typeof animateLayout)["track"]> | boolean | "position";
|
|
32
33
|
/**
|
|
33
34
|
* Enable shared layout transitions between components for children of `AnimateSharedLayout`.
|
|
34
35
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/motion-start/motion/features/layout/types.ts"],"names":[],"mappings":"AAAA;;;EAGE;AACF;;GAEG;AACH,MAAM,WAAW,WAAW;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/motion-start/motion/features/layout/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C;;;EAGE;AACF;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC,CAAC,OAAO,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,OAAO,GAAG,UAAU,CAAC;IAC5E;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;OAOG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;;;OAIG;IACH,yBAAyB,CAAC,IAAI,IAAI,CAAC;CACpC"}
|
|
@@ -22,5 +22,8 @@ declare function calcRelativeOffset(parent: AxisBox2D, child: AxisBox2D): {
|
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
declare function checkIfParentHasChanged(prev: WithLayoutId, next: WithLayoutId): boolean;
|
|
25
|
-
|
|
25
|
+
declare const animateLayout: {
|
|
26
|
+
track: <A extends unknown[], R>(fn: (...args: A) => R) => (...args: A) => R;
|
|
27
|
+
};
|
|
28
|
+
export { calcRelativeOffset, calcRelativeOffsetAxis, checkIfParentHasChanged, tweenAxis, animateLayout, };
|
|
26
29
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/lib/motion-start/motion/features/layout/utils.ts"],"names":[],"mappings":"AAAA;;;EAGE;AACF,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC/D,UAAU,YAAY;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/lib/motion-start/motion/features/layout/utils.ts"],"names":[],"mappings":"AAAA;;;EAGE;AACF,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC/D,UAAU,YAAY;IACpB,WAAW,EAAE,MAAM,SAAS,GAAG,MAAM,CAAC;CACvC;AASD,iBAAS,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,QAGjE;AACD,iBAAS,sBAAsB,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI;;;EAKxD;AACD,iBAAS,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS;;;;;;;;;EAK9D;AACD,iBAAS,uBAAuB,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,WAItE;AAED,QAAA,MAAM,aAAa;YACT,CAAC,SAAS,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,eAAP,CAAC,KAAK,CAAC;CAGtD,CAAC;AAEF,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,SAAS,EACT,aAAa,GACd,CAAC"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
based on framer-motion@4.1.11,
|
|
3
3
|
Copyright (c) 2018 Framer B.V.
|
|
4
4
|
*/
|
|
5
|
-
import { fixed } from
|
|
6
|
-
import { mix } from
|
|
5
|
+
import { fixed } from "../../../utils/fix-process-env";
|
|
6
|
+
import { mix } from "popmotion";
|
|
7
7
|
function tweenAxis(target, prev, next, p) {
|
|
8
8
|
target.min = mix(prev.min, next.min, p);
|
|
9
9
|
target.max = mix(prev.max, next.max, p);
|
|
@@ -25,4 +25,9 @@ function checkIfParentHasChanged(prev, next) {
|
|
|
25
25
|
var nextId = next.getLayoutId();
|
|
26
26
|
return prevId !== nextId || (nextId === undefined && prev !== next);
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
const animateLayout = {
|
|
29
|
+
track: (fn) => {
|
|
30
|
+
return fn;
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
export { calcRelativeOffset, calcRelativeOffsetAxis, checkIfParentHasChanged, tweenAxis, animateLayout, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "motion-start",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "Svelte animation library inspired by the React library framer-motion.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"test:types": "vitest --typecheck.only",
|
|
72
72
|
"test:ui": "vitest --ui",
|
|
73
73
|
"test:types:ui": "vitest --ui",
|
|
74
|
-
"release": "bun --bun run build &&
|
|
74
|
+
"release": "bun --bun run build && npm publish --access public && npx changeset tag"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"framesync": "^6.1.2",
|
|
@@ -79,32 +79,33 @@
|
|
|
79
79
|
"style-value-types": "5.1.2"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
+
"@biomejs/biome": "^2.0.0",
|
|
82
83
|
"@changesets/cli": "^2.27.10",
|
|
83
|
-
"@biomejs/biome": "^1.9.4",
|
|
84
84
|
"@emotion/is-prop-valid": "^1.3.1",
|
|
85
|
+
"@lucide/svelte": "^0.544.0",
|
|
86
|
+
"@sveltejs/adapter-auto": "^6.0.0",
|
|
87
|
+
"@sveltejs/kit": "^2.0.0",
|
|
85
88
|
"@sveltejs/package": "^2.3.11",
|
|
86
|
-
"@sveltejs/vite-plugin-svelte": "^
|
|
87
|
-
"
|
|
89
|
+
"@sveltejs/vite-plugin-svelte": "^6.0.0",
|
|
90
|
+
"@tailwindcss/typography": "^0.5.15",
|
|
91
|
+
"@tailwindcss/vite": "^4.0.0",
|
|
88
92
|
"@tsconfig/svelte": "^5.0.4",
|
|
89
93
|
"@types/node": "^20.17.9",
|
|
90
94
|
"@vitest/ui": "latest",
|
|
91
|
-
"
|
|
92
|
-
"publint": "^0.2.12",
|
|
93
|
-
"typescript": "^5.7.2",
|
|
94
|
-
"vite": "5.4.11",
|
|
95
|
-
"vitest": "latest",
|
|
96
|
-
"@sveltejs/adapter-auto": "^6.0.0",
|
|
97
|
-
"@sveltejs/kit": "2.7.1",
|
|
98
|
-
"@tailwindcss/typography": "^0.5.15",
|
|
99
|
-
"@tailwindcss/vite": "^4.0.0-alpha.28",
|
|
100
|
-
"tailwindcss": "^4.0.0-alpha.28",
|
|
101
|
-
"bits-ui": "^0.21.16",
|
|
95
|
+
"bits-ui": "^2.11.0",
|
|
102
96
|
"class-variance-authority": "^0.7.1",
|
|
103
97
|
"clsx": "^2.1.1",
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
98
|
+
"csstype": "^3.1.3",
|
|
99
|
+
"lucide-svelte": "^0.542.0",
|
|
100
|
+
"mode-watcher": "^1.1.0",
|
|
101
|
+
"publint": "^0.3.0",
|
|
102
|
+
"svelte-check": "^4.1.1",
|
|
103
|
+
"tailwind-merge": "^3.0.0",
|
|
104
|
+
"tailwind-variants": "^3.1.1",
|
|
105
|
+
"tailwindcss": "^4.0.0",
|
|
106
|
+
"typescript": "^5.7.2",
|
|
107
|
+
"vite": "^7.0.0",
|
|
108
|
+
"vitest": "latest"
|
|
108
109
|
},
|
|
109
110
|
"peerDependencies": {
|
|
110
111
|
"svelte": "^5.33.16"
|
|
@@ -113,7 +114,6 @@
|
|
|
113
114
|
"bun": ">=1.0.0",
|
|
114
115
|
"node": ">=20"
|
|
115
116
|
},
|
|
116
|
-
"sideEffects": false,
|
|
117
117
|
"keywords": [
|
|
118
118
|
"svelte animation",
|
|
119
119
|
"svelte",
|