motion-v 0.13.1 → 1.0.0-alpha.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/dist/cjs/index.js +1000 -961
- package/dist/es/components/index.d.ts +2 -0
- package/dist/es/components/lazy-motion/context.d.ts +7 -0
- package/dist/es/components/lazy-motion/context.mjs +6 -0
- package/dist/es/components/lazy-motion/index.d.ts +26 -0
- package/dist/es/components/lazy-motion/index.mjs +36 -0
- package/dist/es/components/motion/index.d.ts +179 -2
- package/dist/es/components/motion/index.mjs +8 -0
- package/dist/es/components/motion/m.d.ts +178 -0
- package/dist/es/components/motion/m.mjs +7 -0
- package/dist/es/components/motion/props.d.ts +227 -0
- package/dist/es/components/motion/props.mjs +93 -0
- package/dist/es/components/motion/{Motion.d.ts → types.d.ts} +12 -9
- package/dist/es/components/motion/use-motion-state.d.ts +790 -0
- package/dist/es/components/motion/use-motion-state.mjs +115 -0
- package/dist/es/components/motion/utils.d.ts +20 -5
- package/dist/es/components/motion/utils.mjs +122 -1
- package/dist/es/components/reorder/Group.vue.mjs +5 -2
- package/dist/es/components/reorder/Item.vue.mjs +5 -2
- package/dist/es/components/reorder/index.d.ts +12 -0
- package/dist/es/features/animation/animation.d.ts +32 -0
- package/dist/es/features/animation/animation.mjs +152 -5
- package/dist/es/features/animation/types.d.ts +17 -0
- package/dist/es/features/dom-animation.d.ts +2 -0
- package/dist/es/features/dom-animation.mjs +19 -0
- package/dist/es/features/dom-max.d.ts +2 -0
- package/dist/es/features/dom-max.mjs +23 -0
- package/dist/es/features/feature-manager.mjs +20 -20
- package/dist/es/features/gestures/drag/VisualElementDragControls.d.ts +1 -1
- package/dist/es/features/gestures/hover/index.d.ts +2 -0
- package/dist/es/features/gestures/hover/index.mjs +13 -2
- package/dist/es/features/gestures/in-view/index.mjs +3 -3
- package/dist/es/features/gestures/index.d.ts +0 -1
- package/dist/es/features/gestures/press/index.mjs +17 -19
- package/dist/es/features/index.d.ts +2 -0
- package/dist/es/index.d.ts +1 -0
- package/dist/es/index.mjs +17 -9
- package/dist/es/state/motion-state.d.ts +6 -5
- package/dist/es/state/motion-state.mjs +7 -12
- package/dist/es/state/style.mjs +2 -2
- package/dist/es/state/transform.d.ts +0 -1
- package/dist/es/state/transform.mjs +0 -1
- package/dist/es/types/state.d.ts +1 -0
- package/dist/nuxt/index.cjs +3 -1
- package/dist/nuxt/index.mjs +3 -1
- package/dist/resolver/index.cjs +3 -1
- package/dist/resolver/index.mjs +3 -1
- package/package.json +1 -1
- package/dist/es/components/motion/Motion.vue.mjs +0 -241
- package/dist/es/components/motion/Motion.vue2.mjs +0 -4
- package/dist/es/components/motion/NameSpace.d.ts +0 -15
- package/dist/es/components/motion/NameSpace.mjs +0 -48
- package/dist/es/components/motion/Primitive.d.ts +0 -57
- package/dist/es/components/motion/Primitive.mjs +0 -45
- package/dist/es/components/motion/Slot.d.ts +0 -5
- package/dist/es/components/motion/Slot.mjs +0 -36
- package/dist/es/components/motion/renderSlotFragments.mjs +0 -13
- package/dist/es/features/gestures/base.d.ts +0 -8
- package/dist/es/state/animate-updates.d.ts +0 -20
- package/dist/es/state/animate-updates.mjs +0 -147
- package/dist/es/utils/noop.d.ts +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AnimationFeature } from "./animation/animation.mjs";
|
|
2
|
+
import { PressGesture } from "./gestures/press/index.mjs";
|
|
3
|
+
import { HoverGesture } from "./gestures/hover/index.mjs";
|
|
4
|
+
import { InViewGesture } from "./gestures/in-view/index.mjs";
|
|
5
|
+
import { FocusGesture } from "./gestures/focus/index.mjs";
|
|
6
|
+
const domAnimation = [
|
|
7
|
+
AnimationFeature,
|
|
8
|
+
PressGesture,
|
|
9
|
+
HoverGesture,
|
|
10
|
+
InViewGesture,
|
|
11
|
+
FocusGesture
|
|
12
|
+
// ProjectionFeature,
|
|
13
|
+
// DragGesture,
|
|
14
|
+
// LayoutFeature,
|
|
15
|
+
// PanGesture,
|
|
16
|
+
];
|
|
17
|
+
export {
|
|
18
|
+
domAnimation
|
|
19
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AnimationFeature } from "./animation/animation.mjs";
|
|
2
|
+
import { PressGesture } from "./gestures/press/index.mjs";
|
|
3
|
+
import { HoverGesture } from "./gestures/hover/index.mjs";
|
|
4
|
+
import { InViewGesture } from "./gestures/in-view/index.mjs";
|
|
5
|
+
import { FocusGesture } from "./gestures/focus/index.mjs";
|
|
6
|
+
import { ProjectionFeature } from "./layout/projection.mjs";
|
|
7
|
+
import { DragGesture } from "./gestures/drag/index.mjs";
|
|
8
|
+
import { LayoutFeature } from "./layout/layout.mjs";
|
|
9
|
+
import { PanGesture } from "./gestures/pan/index.mjs";
|
|
10
|
+
const domMax = [
|
|
11
|
+
AnimationFeature,
|
|
12
|
+
PressGesture,
|
|
13
|
+
HoverGesture,
|
|
14
|
+
InViewGesture,
|
|
15
|
+
FocusGesture,
|
|
16
|
+
ProjectionFeature,
|
|
17
|
+
PanGesture,
|
|
18
|
+
DragGesture,
|
|
19
|
+
LayoutFeature
|
|
20
|
+
];
|
|
21
|
+
export {
|
|
22
|
+
domMax
|
|
23
|
+
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PanGesture } from "./gestures/pan/index.mjs";
|
|
3
|
-
import { AnimationFeature } from "./animation/animation.mjs";
|
|
4
|
-
import { ProjectionFeature } from "./layout/projection.mjs";
|
|
5
|
-
import { FocusGesture } from "./gestures/focus/index.mjs";
|
|
6
|
-
import { HoverGesture } from "./gestures/hover/index.mjs";
|
|
7
|
-
import { PressGesture } from "./gestures/press/index.mjs";
|
|
8
|
-
import { InViewGesture } from "./gestures/in-view/index.mjs";
|
|
9
|
-
import { DragGesture } from "./gestures/drag/index.mjs";
|
|
1
|
+
import { watch } from "vue";
|
|
10
2
|
class FeatureManager {
|
|
11
3
|
constructor(state) {
|
|
12
4
|
this.features = [];
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
5
|
+
const { features = [], lazyMotionContext } = state.options;
|
|
6
|
+
const allFeatures = features.concat(lazyMotionContext.features.value);
|
|
7
|
+
this.features = allFeatures.map((Feature) => new Feature(state));
|
|
8
|
+
const featureInstances = this.features;
|
|
9
|
+
watch(lazyMotionContext.features, (features2) => {
|
|
10
|
+
features2.forEach((feature) => {
|
|
11
|
+
if (!allFeatures.includes(feature)) {
|
|
12
|
+
allFeatures.push(feature);
|
|
13
|
+
const featureInstance = new feature(state);
|
|
14
|
+
featureInstances.push(featureInstance);
|
|
15
|
+
if (state.isMounted()) {
|
|
16
|
+
featureInstance.beforeMount();
|
|
17
|
+
featureInstance.mount();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}, {
|
|
22
|
+
flush: "pre"
|
|
23
|
+
});
|
|
24
24
|
}
|
|
25
25
|
mount() {
|
|
26
26
|
this.features.forEach((feature) => feature.mount());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MotionProps } from '../../../components/motion/Motion';
|
|
2
1
|
import { Options } from '../../../types';
|
|
3
2
|
import { Point, VisualElement } from 'framer-motion';
|
|
3
|
+
import { MotionProps } from '../../../components';
|
|
4
4
|
export declare const elementDragControls: WeakMap<VisualElement<unknown, unknown, {}>, VisualElementDragControls>;
|
|
5
5
|
export interface DragControlOptions {
|
|
6
6
|
snapToCursor?: boolean;
|
|
@@ -14,15 +14,26 @@ function handleHoverEvent(state, event, lifecycle) {
|
|
|
14
14
|
}
|
|
15
15
|
class HoverGesture extends Feature {
|
|
16
16
|
isActive() {
|
|
17
|
-
|
|
17
|
+
const { whileHover, onHoverStart, onHoverEnd } = this.state.options;
|
|
18
|
+
return Boolean(whileHover || onHoverStart || onHoverEnd);
|
|
18
19
|
}
|
|
19
20
|
constructor(state) {
|
|
20
21
|
super(state);
|
|
21
22
|
}
|
|
22
23
|
mount() {
|
|
24
|
+
this.register();
|
|
25
|
+
}
|
|
26
|
+
update() {
|
|
27
|
+
const { whileHover, onHoverStart, onHoverEnd } = this.state.visualElement.prevProps;
|
|
28
|
+
if (!(whileHover || onHoverStart || onHoverEnd)) {
|
|
29
|
+
this.register();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
register() {
|
|
23
33
|
const element = this.state.element;
|
|
24
|
-
if (!element)
|
|
34
|
+
if (!element || !this.isActive())
|
|
25
35
|
return;
|
|
36
|
+
this.unmount();
|
|
26
37
|
this.unmount = hover(
|
|
27
38
|
element,
|
|
28
39
|
(el, startEvent) => {
|
|
@@ -14,17 +14,17 @@ function handleHoverEvent(state, entry, lifecycle) {
|
|
|
14
14
|
}
|
|
15
15
|
class InViewGesture extends Feature {
|
|
16
16
|
isActive() {
|
|
17
|
-
return Boolean(this.state.
|
|
17
|
+
return Boolean(this.state.options.whileInView);
|
|
18
18
|
}
|
|
19
19
|
constructor(state) {
|
|
20
20
|
super(state);
|
|
21
21
|
}
|
|
22
22
|
startObserver() {
|
|
23
23
|
const element = this.state.element;
|
|
24
|
-
if (!element)
|
|
24
|
+
if (!element || !this.isActive())
|
|
25
25
|
return;
|
|
26
26
|
this.unmount();
|
|
27
|
-
const { once, ...viewOptions } = this.state.
|
|
27
|
+
const { once, ...viewOptions } = this.state.options.inViewOptions || {};
|
|
28
28
|
this.unmount = inView(
|
|
29
29
|
element,
|
|
30
30
|
(_, entry) => {
|
|
@@ -31,30 +31,28 @@ class PressGesture extends Feature {
|
|
|
31
31
|
this.register();
|
|
32
32
|
}
|
|
33
33
|
update() {
|
|
34
|
-
const
|
|
35
|
-
if (
|
|
34
|
+
const { whilePress, onPress, onPressCancel, onPressStart } = this.state.options;
|
|
35
|
+
if (!(whilePress || onPress || onPressCancel || onPressStart)) {
|
|
36
36
|
this.register();
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
register() {
|
|
40
|
+
const element = this.state.element;
|
|
41
|
+
if (!element || !this.isActive())
|
|
42
|
+
return;
|
|
40
43
|
this.unmount();
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
);
|
|
54
|
-
},
|
|
55
|
-
{ useGlobalTarget: this.state.options.globalPressTarget }
|
|
56
|
-
);
|
|
57
|
-
}
|
|
44
|
+
this.unmount = press(
|
|
45
|
+
element,
|
|
46
|
+
(el, startEvent) => {
|
|
47
|
+
handlePressEvent(this.state, startEvent, "Start");
|
|
48
|
+
return (endEvent, { success }) => handlePressEvent(
|
|
49
|
+
this.state,
|
|
50
|
+
endEvent,
|
|
51
|
+
success ? "End" : "Cancel"
|
|
52
|
+
);
|
|
53
|
+
},
|
|
54
|
+
{ useGlobalTarget: this.state.options.globalPressTarget }
|
|
55
|
+
);
|
|
58
56
|
}
|
|
59
57
|
}
|
|
60
58
|
export {
|
package/dist/es/index.d.ts
CHANGED
package/dist/es/index.mjs
CHANGED
|
@@ -3,10 +3,11 @@ import { default as default2 } from "./components/LayoutGroup.vue.mjs";
|
|
|
3
3
|
import { useLayoutGroup } from "./components/use-layout-group.mjs";
|
|
4
4
|
import { injectLayoutGroup, injectMotion, provideLayoutGroup, provideMotion } from "./components/context.mjs";
|
|
5
5
|
import { useDragControls } from "./features/gestures/drag/use-drag-controls.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
6
|
+
import { domMax } from "./features/dom-max.mjs";
|
|
7
|
+
import { domAnimation } from "./features/dom-animation.mjs";
|
|
8
|
+
import { default as default3 } from "./components/RowValue.vue.mjs";
|
|
9
|
+
import { default as default4 } from "./components/animate-presence/AnimatePresence.vue.mjs";
|
|
10
|
+
import { default as default5 } from "./components/motion-config/MotionConfig.vue.mjs";
|
|
10
11
|
import { MotionValue, cancelFrame, frame, frameData, hover, isDragActive, motionValue, press, time, motionValue as motionValue2 } from "motion-dom";
|
|
11
12
|
import { invariant } from "./external/.pnpm/motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
12
13
|
import { noop } from "./external/.pnpm/motion-utils@12.5.0/external/motion-utils/dist/es/noop.mjs";
|
|
@@ -36,10 +37,12 @@ import { mix } from "./external/.pnpm/framer-motion@12.5.0/external/framer-motio
|
|
|
36
37
|
import { pipe } from "./external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/utils/pipe.mjs";
|
|
37
38
|
import { transform } from "./external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/utils/transform.mjs";
|
|
38
39
|
import { wrap } from "./external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/utils/wrap.mjs";
|
|
39
|
-
import { motion } from "./components/motion/
|
|
40
|
+
import { Motion, motion } from "./components/motion/index.mjs";
|
|
40
41
|
import { mountedStates } from "./state/motion-state.mjs";
|
|
41
42
|
import { provideMotionConfig, useMotionConfig } from "./components/motion-config/context.mjs";
|
|
42
43
|
import { Reorder, ReorderGroup, ReorderItem } from "./components/reorder/index.mjs";
|
|
44
|
+
import { LazyMotion } from "./components/lazy-motion/index.mjs";
|
|
45
|
+
import { M, m } from "./components/motion/m.mjs";
|
|
43
46
|
import { useComputed } from "./value/use-computed.mjs";
|
|
44
47
|
import { useCombineMotionValues } from "./value/use-combine-values.mjs";
|
|
45
48
|
import { useTransform } from "./value/use-transform.mjs";
|
|
@@ -60,15 +63,17 @@ import { millisecondsToSeconds, secondsToMilliseconds } from "./utils/time-conve
|
|
|
60
63
|
import { getContextWindow } from "./utils/get-context-window.mjs";
|
|
61
64
|
import { useDomRef } from "./utils/use-dom-ref.mjs";
|
|
62
65
|
export {
|
|
63
|
-
|
|
66
|
+
default4 as AnimatePresence,
|
|
64
67
|
default2 as LayoutGroup,
|
|
65
|
-
|
|
66
|
-
|
|
68
|
+
LazyMotion,
|
|
69
|
+
M,
|
|
70
|
+
Motion,
|
|
71
|
+
default5 as MotionConfig,
|
|
67
72
|
MotionValue,
|
|
68
73
|
Reorder,
|
|
69
74
|
ReorderGroup,
|
|
70
75
|
ReorderItem,
|
|
71
|
-
|
|
76
|
+
default3 as RowValue,
|
|
72
77
|
addScaleCorrector,
|
|
73
78
|
animate,
|
|
74
79
|
animateMini,
|
|
@@ -87,6 +92,8 @@ export {
|
|
|
87
92
|
delayInSeconds as delay,
|
|
88
93
|
distance,
|
|
89
94
|
distance2D,
|
|
95
|
+
domAnimation,
|
|
96
|
+
domMax,
|
|
90
97
|
easeIn,
|
|
91
98
|
easeInOut,
|
|
92
99
|
easeOut,
|
|
@@ -103,6 +110,7 @@ export {
|
|
|
103
110
|
isDragActive,
|
|
104
111
|
isMotionValue,
|
|
105
112
|
keyframes,
|
|
113
|
+
m,
|
|
106
114
|
millisecondsToSeconds,
|
|
107
115
|
mirrorEasing,
|
|
108
116
|
mix,
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { MotionStateContext, Options } from '../types';
|
|
2
2
|
import { DOMKeyframesDefinition, VisualElement } from 'framer-motion';
|
|
3
3
|
import { frame } from 'framer-motion/dom';
|
|
4
|
+
import { Feature, StateType } from '../features';
|
|
4
5
|
import { PresenceContext } from '../components/presence';
|
|
5
|
-
import {
|
|
6
|
+
import { AnimateUpdates } from '../features/animation/types';
|
|
7
|
+
import { LazyMotionContext } from '../components/lazy-motion/context';
|
|
6
8
|
export declare const mountedStates: WeakMap<Element, MotionState>;
|
|
7
9
|
/**
|
|
8
10
|
* Core class that manages animation state and orchestrates animations.
|
|
@@ -14,6 +16,8 @@ export declare class MotionState {
|
|
|
14
16
|
private parent?;
|
|
15
17
|
options: Options & {
|
|
16
18
|
animatePresenceContext?: PresenceContext;
|
|
19
|
+
features?: Feature[];
|
|
20
|
+
lazyMotionContext?: LazyMotionContext;
|
|
17
21
|
};
|
|
18
22
|
isSafeToRemove: boolean;
|
|
19
23
|
isVShow: boolean;
|
|
@@ -46,10 +50,7 @@ export declare class MotionState {
|
|
|
46
50
|
beforeUpdate(): void;
|
|
47
51
|
update(options: Options): void;
|
|
48
52
|
setActive(name: StateType, isActive: boolean, isAnimate?: boolean): void;
|
|
49
|
-
animateUpdates:
|
|
53
|
+
animateUpdates: AnimateUpdates;
|
|
50
54
|
isMounted(): boolean;
|
|
51
|
-
getOptions(): Options<any> & {
|
|
52
|
-
animatePresenceContext?: PresenceContext;
|
|
53
|
-
};
|
|
54
55
|
willUpdate(label: string): void;
|
|
55
56
|
}
|
|
@@ -4,8 +4,9 @@ import { resolveVariant, isAnimateChanged } from "./utils.mjs";
|
|
|
4
4
|
import { FeatureManager } from "../features/feature-manager.mjs";
|
|
5
5
|
import { createVisualElement } from "./create-visual-element.mjs";
|
|
6
6
|
import { doneCallbacks } from "../components/presence.mjs";
|
|
7
|
-
import { animateUpdates } from "./animate-updates.mjs";
|
|
8
7
|
import { isVariantLabels } from "./utils/is-variant-labels.mjs";
|
|
8
|
+
import { noop } from "../external/.pnpm/motion-utils@12.5.0/external/motion-utils/dist/es/noop.mjs";
|
|
9
|
+
import "../external/.pnpm/motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
9
10
|
import { frame, cancelFrame } from "motion-dom";
|
|
10
11
|
const mountedStates = /* @__PURE__ */ new WeakMap();
|
|
11
12
|
let id = 0;
|
|
@@ -23,7 +24,7 @@ class MotionState {
|
|
|
23
24
|
};
|
|
24
25
|
this.currentProcess = null;
|
|
25
26
|
this._context = null;
|
|
26
|
-
this.animateUpdates =
|
|
27
|
+
this.animateUpdates = noop;
|
|
27
28
|
this.id = `motion-state-${id++}`;
|
|
28
29
|
this.options = options;
|
|
29
30
|
this.parent = parent;
|
|
@@ -36,9 +37,7 @@ class MotionState {
|
|
|
36
37
|
parent: parent == null ? void 0 : parent.visualElement,
|
|
37
38
|
props: {
|
|
38
39
|
...this.options,
|
|
39
|
-
|
|
40
|
-
whileTap: this.options.whilePress,
|
|
41
|
-
whileInView: this.options.whileInView
|
|
40
|
+
whileTap: this.options.whilePress
|
|
42
41
|
},
|
|
43
42
|
visualState: {
|
|
44
43
|
renderState: {
|
|
@@ -83,9 +82,7 @@ class MotionState {
|
|
|
83
82
|
updateOptions() {
|
|
84
83
|
this.visualElement.update({
|
|
85
84
|
...this.options,
|
|
86
|
-
|
|
87
|
-
whileTap: this.options.press,
|
|
88
|
-
whileInView: this.options.inView,
|
|
85
|
+
whileTap: this.options.whilePress,
|
|
89
86
|
reducedMotionConfig: this.options.motionConfig.reduceMotion
|
|
90
87
|
}, {
|
|
91
88
|
isPresent: !doneCallbacks.has(this.element)
|
|
@@ -97,6 +94,7 @@ class MotionState {
|
|
|
97
94
|
}
|
|
98
95
|
// Mount motion state to DOM element, handles parent-child relationships
|
|
99
96
|
mount(element, options, notAnimate = false) {
|
|
97
|
+
var _a;
|
|
100
98
|
invariant(
|
|
101
99
|
Boolean(element),
|
|
102
100
|
"Animation state must be mounted with valid Element"
|
|
@@ -115,7 +113,7 @@ class MotionState {
|
|
|
115
113
|
if (this.visualElement.type === "svg") {
|
|
116
114
|
this.visualElement.updateDimensions();
|
|
117
115
|
}
|
|
118
|
-
this.startAnimation();
|
|
116
|
+
(_a = this.startAnimation) == null ? void 0 : _a.call(this);
|
|
119
117
|
}
|
|
120
118
|
if (this.options.layoutId) {
|
|
121
119
|
mountedLayoutIds.add(this.options.layoutId);
|
|
@@ -203,9 +201,6 @@ class MotionState {
|
|
|
203
201
|
isMounted() {
|
|
204
202
|
return Boolean(this.element);
|
|
205
203
|
}
|
|
206
|
-
getOptions() {
|
|
207
|
-
return this.options;
|
|
208
|
-
}
|
|
209
204
|
// Called before layout updates to prepare for changes
|
|
210
205
|
willUpdate(label) {
|
|
211
206
|
var _a;
|
package/dist/es/state/style.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { isTransform, transformAlias,
|
|
1
|
+
import { isCssVar, isNumber } from "./utils.mjs";
|
|
2
|
+
import { transformDefinitions, isTransform, transformAlias, buildTransformTemplate } from "./transform.mjs";
|
|
3
3
|
import { px } from "../value/types/numbers/units.mjs";
|
|
4
4
|
import { isMotionValue } from "../utils/motion-value.mjs";
|
|
5
5
|
const style = {
|
|
@@ -13,7 +13,6 @@ export declare const transformAlias: {
|
|
|
13
13
|
};
|
|
14
14
|
export declare function compareTransformOrder([a]: [string, any], [b]: [string, any]): number;
|
|
15
15
|
export declare function buildTransformTemplate(transforms: [string, any][]): string;
|
|
16
|
-
export declare function getFirstAnimateTransform(initialFrame: any, animateFrame: any): any;
|
|
17
16
|
export declare const transformResetValue: {
|
|
18
17
|
translate: number[];
|
|
19
18
|
rotate: number;
|
package/dist/es/types/state.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ export interface Options<T = any> extends LayoutOptions, PressProps, HoverProps,
|
|
|
58
58
|
motionConfig?: MotionConfigState;
|
|
59
59
|
onAnimationComplete?: (definition: Options['animate']) => void;
|
|
60
60
|
onUpdate?: (latest: ResolvedValues) => void;
|
|
61
|
+
onAnimationStart?: (definition: Options['animate']) => void;
|
|
61
62
|
}
|
|
62
63
|
export interface MotionStateContext {
|
|
63
64
|
initial?: VariantLabels | boolean;
|
package/dist/nuxt/index.cjs
CHANGED
package/dist/nuxt/index.mjs
CHANGED
package/dist/resolver/index.cjs
CHANGED
package/dist/resolver/index.mjs
CHANGED