@krate/motion 0.0.0-stage → 0.5.0-rc.17

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/src/index.ts ADDED
@@ -0,0 +1,143 @@
1
+ // @krate/motion: animations for Krate with the API of Framer Motion
2
+ // (motion/react). This module is Krate source: `<motion.div>` elements are
3
+ // compiled into plain elements whose ref runs the engine
4
+ // (`@krate/motion/engine`, bundled like an npm dependency); the components
5
+ // and hooks below run in Krate components.
6
+
7
+ import type { MotionNamespace } from './motion-types.js';
8
+
9
+ /** `<motion.div>`, `<motion.svg>`, ... for every HTML and SVG element; `motion.create(Component)`. */
10
+ export const motion: MotionNamespace = motionNamespace;
11
+ /** The same elements as `motion`, for use with LazyMotion (Krate ships only the features each element uses either way). */
12
+ export const m: MotionNamespace = mNamespace;
13
+
14
+ export { AnimatePresence, MotionConfig, LayoutGroup, LazyMotion, domAnimation, domMin, domMax } from './components.js';
15
+ export * as Reorder from './reorder.js';
16
+ export { MotionScope } from './context.js';
17
+ export * from './hooks.js';
18
+ export type * from './types.js';
19
+ export type { MotionNamespace, HTMLMotionProps, SVGMotionProps, MotionComponent } from './motion-types.js';
20
+
21
+ // Engine bindings are imported, then exported: the build bundles the npm
22
+ // (vendor) bindings a page's code reads from the imports of Krate-source
23
+ // modules, so a binding only re-exported would not reach the page.
24
+ import {
25
+ animate,
26
+ stagger,
27
+ scroll,
28
+ scrollInfo,
29
+ inView,
30
+ hover,
31
+ press,
32
+ motionValue,
33
+ MotionValue,
34
+ isMotionValue,
35
+ transform,
36
+ interpolate,
37
+ mix,
38
+ wrap,
39
+ clamp,
40
+ progress,
41
+ frame,
42
+ cancelFrame,
43
+ frameData,
44
+ frameSteps,
45
+ time,
46
+ spring,
47
+ inertia,
48
+ keyframes,
49
+ animationControls,
50
+ easeIn,
51
+ easeOut,
52
+ easeInOut,
53
+ circIn,
54
+ circOut,
55
+ circInOut,
56
+ backIn,
57
+ backOut,
58
+ backInOut,
59
+ anticipate,
60
+ cubicBezier,
61
+ steps,
62
+ linear,
63
+ mirrorEasing,
64
+ reverseEasing,
65
+ animateValue,
66
+ MotionGlobalConfig,
67
+ createScopedAnimate,
68
+ transformValue,
69
+ delay,
70
+ distance,
71
+ distance2D,
72
+ pipe,
73
+ noop,
74
+ isValidMotionProp,
75
+ isDragActive,
76
+ useInView,
77
+ useCycle,
78
+ createReducedMotion,
79
+ motionValueSignal,
80
+ mNamespace,
81
+ motionNamespace,
82
+ } from '@krate/motion/engine';
83
+ import { DragControls } from '@krate/motion/engine/drag';
84
+
85
+ export {
86
+ animate,
87
+ stagger,
88
+ scroll,
89
+ scrollInfo,
90
+ inView,
91
+ hover,
92
+ press,
93
+ motionValue,
94
+ MotionValue,
95
+ isMotionValue,
96
+ transform,
97
+ interpolate,
98
+ mix,
99
+ wrap,
100
+ clamp,
101
+ progress,
102
+ frame,
103
+ cancelFrame,
104
+ frameData,
105
+ frameSteps,
106
+ time,
107
+ spring,
108
+ inertia,
109
+ keyframes,
110
+ animationControls,
111
+ easeIn,
112
+ easeOut,
113
+ easeInOut,
114
+ circIn,
115
+ circOut,
116
+ circInOut,
117
+ backIn,
118
+ backOut,
119
+ backInOut,
120
+ anticipate,
121
+ cubicBezier,
122
+ steps,
123
+ linear,
124
+ mirrorEasing,
125
+ reverseEasing,
126
+ animateValue,
127
+ MotionGlobalConfig,
128
+ createScopedAnimate,
129
+ transformValue,
130
+ delay,
131
+ distance,
132
+ distance2D,
133
+ pipe,
134
+ noop,
135
+ isValidMotionProp,
136
+ isDragActive,
137
+ useInView,
138
+ useCycle,
139
+ createReducedMotion,
140
+ motionValueSignal,
141
+ DragControls,
142
+ };
143
+ export type { AnimationPlaybackControls, AnimationScope, Easing, EasingDefinition, ScrollInfo, ScrollOffset, SpringOptions } from '@krate/motion/engine';