motion-v 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/LICENSE +21 -0
- package/dist/index.js +3722 -0
- package/dist/index.umd.cjs +1 -0
- package/dist/src/components/AnimatePresence.d.ts +51 -0
- package/dist/src/components/Motion.d.ts +29 -0
- package/dist/src/components/Primitive.d.ts +39 -0
- package/dist/src/components/Slot.d.ts +5 -0
- package/dist/src/components/context.d.ts +7 -0
- package/dist/src/components/presence.d.ts +7 -0
- package/dist/src/components/renderSlotFragments.d.ts +2 -0
- package/dist/src/components/usePrimitiveElement.d.ts +5 -0
- package/dist/src/components/utils.d.ts +3 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/shared/index.d.ts +0 -0
- package/dist/src/state/event.d.ts +6 -0
- package/dist/src/state/features/events.d.ts +6 -0
- package/dist/src/state/features/feature.d.ts +15 -0
- package/dist/src/state/features/gestures/base.d.ts +10 -0
- package/dist/src/state/features/gestures/hover.d.ts +10 -0
- package/dist/src/state/features/gestures/in-view.d.ts +8 -0
- package/dist/src/state/features/gestures/index.d.ts +4 -0
- package/dist/src/state/features/gestures/press.d.ts +8 -0
- package/dist/src/state/features/gestures/types.d.ts +9 -0
- package/dist/src/state/features/index.d.ts +3 -0
- package/dist/src/state/index.d.ts +1 -0
- package/dist/src/state/motion-state.d.ts +31 -0
- package/dist/src/state/schedule.d.ts +3 -0
- package/dist/src/state/style.d.ts +6 -0
- package/dist/src/state/transform.d.ts +25 -0
- package/dist/src/state/types.d.ts +56 -0
- package/dist/src/state/utils.d.ts +16 -0
- package/dist/src/types/index.d.ts +14 -0
- package/dist/src/utils/createContext.d.ts +8 -0
- package/dist/src/utils/events.d.ts +2 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/package.json +42 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DOMKeyframesDefinition, DynamicAnimationOptions } from 'framer-motion';
|
|
2
|
+
export interface Variant extends DOMKeyframesDefinition {
|
|
3
|
+
transition?: DynamicAnimationOptions;
|
|
4
|
+
}
|
|
5
|
+
export interface AnimateOptions {
|
|
6
|
+
initial?: string | Variant | boolean;
|
|
7
|
+
animate?: string | Variant;
|
|
8
|
+
exit?: string | Variant;
|
|
9
|
+
variants?: {
|
|
10
|
+
[k: string]: Variant;
|
|
11
|
+
};
|
|
12
|
+
transition?: DynamicAnimationOptions;
|
|
13
|
+
}
|
|
14
|
+
export type MotionEventNames = 'motionstart' | 'motioncomplete' | 'hoverstart' | 'hoverend' | 'pressstart' | 'pressend' | 'viewenter' | 'viewleave';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param providerComponentName - The name(s) of the component(s) providing the context.
|
|
3
|
+
*
|
|
4
|
+
* There are situations where context can come from multiple components. In such cases, you might need to give an array of component names to provide your context, instead of just a single string.
|
|
5
|
+
*
|
|
6
|
+
* @param contextName The description for injection key symbol.
|
|
7
|
+
*/
|
|
8
|
+
export declare function createContext<ContextValue>(providerComponentName: string | string[], contextName?: string): readonly [<T extends ContextValue | null | undefined = ContextValue>(fallback?: T) => T extends null ? ContextValue | null : ContextValue, (contextValue: ContextValue) => ContextValue];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './createContext';
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "motion-v",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"author": "",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"keywords": [],
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/src/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.umd.cjs"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"main": "./dist/index.umd.cjs",
|
|
17
|
+
"module": "./dist/index.js",
|
|
18
|
+
"types": "./dist/src/index.d.ts",
|
|
19
|
+
"files": [
|
|
20
|
+
"./LICENSE",
|
|
21
|
+
"./dist"
|
|
22
|
+
],
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"framer-motion": "11.11.11"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@vitejs/plugin-vue": "^5.1.4",
|
|
28
|
+
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
|
29
|
+
"@vitest/coverage-v8": "^1.4.0",
|
|
30
|
+
"@vue/test-utils": "^2.4.5",
|
|
31
|
+
"framer-motion": "^11.0.0",
|
|
32
|
+
"jsdom": "^24.0.0",
|
|
33
|
+
"vite-plugin-dts": "^4.2.4",
|
|
34
|
+
"vitest": "^1.4.0"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"dev": "vite build --watch",
|
|
38
|
+
"build": "vite build",
|
|
39
|
+
"test": "vitest",
|
|
40
|
+
"coverage": "vitest run --coverage"
|
|
41
|
+
}
|
|
42
|
+
}
|