motion-v 0.7.0 → 0.7.1
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 +280 -134
- package/dist/es/animation/hooks/animation-controls.mjs +78 -0
- package/dist/es/animation/{use-animate.mjs → hooks/use-animate.mjs} +1 -1
- package/dist/es/animation/hooks/use-animation-controls.mjs +16 -0
- package/dist/es/animation/utils.mjs +6 -0
- package/dist/es/components/animate-presence/AnimatePresence.vue.mjs +2 -2
- package/dist/es/components/motion/Motion.vue.mjs +4 -1
- package/dist/es/constants/index.mjs +0 -1
- package/dist/es/features/animation/animation.mjs +33 -0
- package/dist/es/features/feature-manager.mjs +5 -1
- package/dist/es/features/gestures/focus/index.mjs +36 -0
- package/dist/es/index.mjs +3 -1
- package/dist/es/state/animate-updates.mjs +129 -0
- package/dist/es/state/motion-state.mjs +6 -123
- package/dist/es/state/style.mjs +2 -2
- package/dist/src/animation/hooks/animation-controls.d.ts +8 -0
- package/dist/src/animation/hooks/use-animate.d.ts +8 -0
- package/dist/src/animation/hooks/use-animation-controls.d.ts +33 -0
- package/dist/src/animation/index.d.ts +2 -1
- package/dist/src/animation/types.d.ts +68 -0
- package/dist/src/animation/utils.d.ts +2 -0
- package/dist/src/components/animate-presence/utils.d.ts +0 -1
- package/dist/src/components/index.d.ts +1 -1
- package/dist/src/components/motion/NameSpace.d.ts +2 -2
- package/dist/src/features/animation/animation.d.ts +13 -0
- package/dist/src/features/gestures/focus/index.d.ts +7 -0
- package/dist/src/features/gestures/focus/types.d.ts +6 -0
- package/dist/src/features/index.d.ts +1 -0
- package/dist/src/state/animate-updates.d.ts +19 -0
- package/dist/src/state/animation/types.d.ts +0 -0
- package/dist/src/state/motion-state.d.ts +2 -4
- package/dist/src/state/utils.d.ts +1 -1
- package/dist/src/types/state.d.ts +4 -2
- package/package.json +3 -2
- package/dist/es/components/animate-presence/utils.mjs +0 -10
- /package/dist/src/{animation/use-animation.d.ts → state/animation/index.d.ts} +0 -0
|
@@ -10,6 +10,8 @@ import { LayoutGroupState } from '../components/context';
|
|
|
10
10
|
import { PanProps } from '../features/gestures/pan/types';
|
|
11
11
|
import { MotionConfigState } from '../components/motion-config/types';
|
|
12
12
|
import { $Transition } from './framer-motion';
|
|
13
|
+
import { FocusProps } from '../features/gestures/focus/types';
|
|
14
|
+
import { AnimationControls } from '../animation/types';
|
|
13
15
|
type AnimationPlaybackControls = ReturnType<typeof animate>;
|
|
14
16
|
export type TargetResolver = (custom: any, current: Target, velocity: Target) => TargetAndTransition | string;
|
|
15
17
|
export interface Variant extends DOMKeyframesDefinition {
|
|
@@ -30,11 +32,11 @@ export type MotionStyle = Partial<{
|
|
|
30
32
|
[K in keyof Variant]: Variant[K] | MotionValue;
|
|
31
33
|
}>;
|
|
32
34
|
export type ElementType = keyof IntrinsicElementAttributes;
|
|
33
|
-
export interface Options<T = any> extends LayoutOptions, PressProps, HoverProps, InViewProps, DragProps, PanProps {
|
|
35
|
+
export interface Options<T = any> extends LayoutOptions, PressProps, HoverProps, InViewProps, DragProps, PanProps, FocusProps {
|
|
34
36
|
custom?: T;
|
|
35
37
|
as?: ElementType;
|
|
36
38
|
initial?: string | Variant | boolean;
|
|
37
|
-
animate?: string | Variant;
|
|
39
|
+
animate?: string | Variant | AnimationControls;
|
|
38
40
|
exit?: string | Variant;
|
|
39
41
|
variants?: {
|
|
40
42
|
[k: string]: Variant | ((custom: T) => Variant);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "motion-v",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -55,12 +55,13 @@
|
|
|
55
55
|
"vue": ">=3.0.0"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@vueuse/core": "^
|
|
58
|
+
"@vueuse/core": "^10.0.0",
|
|
59
59
|
"framer-motion": "11.16.6",
|
|
60
60
|
"hey-listen": "^1.0.8",
|
|
61
61
|
"motion-dom": "^11.16.4"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
+
"@testing-library/vue": "^8.1.0",
|
|
64
65
|
"@vitejs/plugin-vue": "^5.1.4",
|
|
65
66
|
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
|
66
67
|
"@vitest/coverage-v8": "^1.4.0",
|
|
File without changes
|