motion-start 0.1.15 → 0.1.18
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/MotionSSR.svelte.d.ts +3 -3
- 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/dist/render/dom/Motion-Proxy.svelte +25 -16
- package/dist/render/dom/Motion-Proxy.svelte.d.ts +1 -0
- package/dist/render/dom/Motion-Proxy.svelte.d.ts.map +1 -1
- package/dist/render/dom/motion-minimal.d.ts +179 -178
- package/dist/render/dom/motion-minimal.d.ts.map +1 -1
- package/dist/render/dom/motion-proxy.d.ts +7 -7
- package/dist/render/dom/motion-proxy.d.ts.map +1 -1
- package/dist/render/dom/motion-proxy.js +23 -7
- package/dist/render/dom/motion.d.ts +362 -361
- package/dist/render/dom/motion.d.ts.map +1 -1
- package/dist/render/html/UseHTMLProps.svelte.d.ts +3 -3
- package/dist/render/html/visual-element.d.ts +8 -1
- package/dist/render/html/visual-element.d.ts.map +1 -1
- package/dist/render/svg/UseSVGProps.svelte.d.ts +3 -3
- package/package.json +2 -2
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
|
+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AA8B,CAAC;AAGvE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,YAAY,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAC5E,YAAY,EACV,eAAe,EACf,cAAc,EACd,OAAO,EACP,SAAS,EACT,eAAe,EACf,IAAI,EACJ,aAAa,EACb,MAAM,EACN,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,YAAY,EACZ,MAAM,EACN,MAAM,EACN,mBAAmB,EACnB,UAAU,EACV,KAAK,EACL,WAAW,EACX,OAAO,EACP,QAAQ,GACT,MAAM,YAAY,CAAC;AACpB,cAAc,qBAAqB,CAAC;AACpC,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,EAAE,aAAa,IAAI,eAAe,EAAE,MAAM,mCAAmC,CAAC"}
|
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";
|
|
@@ -17,7 +17,7 @@ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
|
17
17
|
} ? Props extends Record<string, never> ? any : {
|
|
18
18
|
children?: any;
|
|
19
19
|
} : {});
|
|
20
|
-
declare const
|
|
20
|
+
declare const MotionSSR: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<MotionProps & {
|
|
21
21
|
isSVG?: boolean;
|
|
22
22
|
update?: any;
|
|
23
23
|
forwardMotionProps?: boolean;
|
|
@@ -36,6 +36,6 @@ declare const MotionSsr: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_Props
|
|
|
36
36
|
props: any;
|
|
37
37
|
};
|
|
38
38
|
}, {}, string>;
|
|
39
|
-
type
|
|
40
|
-
export default
|
|
39
|
+
type MotionSSR = InstanceType<typeof MotionSSR>;
|
|
40
|
+
export default MotionSSR;
|
|
41
41
|
//# sourceMappingURL=MotionSSR.svelte.d.ts.map
|
|
@@ -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, };
|
|
@@ -1,22 +1,31 @@
|
|
|
1
1
|
<!-- <svelte:options runes={true}/> -->
|
|
2
2
|
<script lang="ts">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import type { SvelteHTMLElements } from "svelte/elements";
|
|
4
|
+
import type { MotionProps } from "../../motion";
|
|
5
|
+
import Motion from "../../motion/Motion.svelte";
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
// let {as, class: className, children, ...restProps}: {as: keyof SvelteHTMLElements, children: Snippet, class: string } & MotionProps = $props();
|
|
8
|
+
export let ___tag: keyof SvelteHTMLElements;
|
|
9
|
+
export let el: SvelteHTMLElements[typeof ___tag]["this"];
|
|
10
|
+
export let isSVG = false;
|
|
10
11
|
</script>
|
|
11
12
|
|
|
12
|
-
<Motion {...$$restProps} let:props let:motion>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
<Motion {...$$restProps} let:props let:motion {isSVG}>
|
|
14
|
+
<svelte:element
|
|
15
|
+
this={___tag}
|
|
16
|
+
{...Object.fromEntries(
|
|
17
|
+
Object.entries(props).filter(
|
|
18
|
+
([key, _]) =>
|
|
19
|
+
key !== "latestvalues" &&
|
|
20
|
+
key !== "renderstate" &&
|
|
21
|
+
key !== "visualProps"
|
|
22
|
+
)
|
|
23
|
+
)}
|
|
24
|
+
bind:this={el}
|
|
25
|
+
class={props.class}
|
|
26
|
+
xmlns={isSVG ? "http://www.w3.org/2000/svg" : undefined}
|
|
27
|
+
use:motion
|
|
28
|
+
>
|
|
29
|
+
<slot />
|
|
30
|
+
</svelte:element>
|
|
22
31
|
</Motion>
|
|
@@ -21,6 +21,7 @@ declare const MotionProxy: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_Pro
|
|
|
21
21
|
[x: string]: any;
|
|
22
22
|
___tag: keyof SvelteHTMLElements;
|
|
23
23
|
el: SvelteHTMLElements[keyof SvelteHTMLElements]["this"];
|
|
24
|
+
isSVG?: boolean | undefined;
|
|
24
25
|
}, {
|
|
25
26
|
default: {};
|
|
26
27
|
}>, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Motion-Proxy.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/motion-start/render/dom/Motion-Pro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