motion-presets-kit 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.
@@ -0,0 +1,112 @@
1
+ import * as motion_react from 'motion/react';
2
+ import { Variants } from 'motion/react';
3
+ import { z } from 'zod';
4
+
5
+ declare const clipRevealOptionsSchema: z.ZodObject<{
6
+ duration: z.ZodDefault<z.ZodNumber>;
7
+ delay: z.ZodDefault<z.ZodNumber>;
8
+ ease: z.ZodDefault<z.ZodCustom<motion_react.Easing, motion_react.Easing>>;
9
+ spring: z.ZodOptional<z.ZodCustom<Omit<motion_react.SpringOptions, "keyframes">, Omit<motion_react.SpringOptions, "keyframes">>>;
10
+ excludeDelay: z.ZodDefault<z.ZodBoolean>;
11
+ reducedMotion: z.ZodDefault<z.ZodBoolean>;
12
+ direction: z.ZodDefault<z.ZodEnum<{
13
+ right: "right";
14
+ left: "left";
15
+ up: "up";
16
+ down: "down";
17
+ }>>;
18
+ scale: z.ZodOptional<z.ZodNumber>;
19
+ }, z.core.$strip>;
20
+ type ClipRevealOptions = z.input<typeof clipRevealOptionsSchema>;
21
+ type ResolvedClipRevealOptions = z.output<typeof clipRevealOptionsSchema>;
22
+
23
+ /**
24
+ * Reveal cinematográfico animando `clipPath` (con escala opcional).
25
+ * Función pura que retorna `Variants`.
26
+ */
27
+ declare function clipReveal(options?: ClipRevealOptions): Variants;
28
+
29
+ declare const fadeOptionsSchema: z.ZodObject<{
30
+ duration: z.ZodDefault<z.ZodNumber>;
31
+ delay: z.ZodDefault<z.ZodNumber>;
32
+ ease: z.ZodDefault<z.ZodCustom<motion_react.Easing, motion_react.Easing>>;
33
+ spring: z.ZodOptional<z.ZodCustom<Omit<motion_react.SpringOptions, "keyframes">, Omit<motion_react.SpringOptions, "keyframes">>>;
34
+ excludeDelay: z.ZodDefault<z.ZodBoolean>;
35
+ reducedMotion: z.ZodDefault<z.ZodBoolean>;
36
+ direction: z.ZodDefault<z.ZodEnum<{
37
+ right: "right";
38
+ left: "left";
39
+ none: "none";
40
+ up: "up";
41
+ down: "down";
42
+ }>>;
43
+ distance: z.ZodDefault<z.ZodNumber>;
44
+ blur: z.ZodDefault<z.ZodNumber>;
45
+ scale: z.ZodDefault<z.ZodNumber>;
46
+ }, z.core.$strip>;
47
+ type FadeOptions = z.input<typeof fadeOptionsSchema>;
48
+ type ResolvedFadeOptions = z.output<typeof fadeOptionsSchema>;
49
+
50
+ /**
51
+ * Fade de entrada con dirección, blur y escala opcionales.
52
+ * Función pura que retorna `Variants` para usar en `motion`/`motion/react`.
53
+ */
54
+ declare function fade(options?: FadeOptions): Variants;
55
+
56
+ declare const parentVariantsSchema: z.ZodObject<{
57
+ delayChildren: z.ZodDefault<z.ZodNumber>;
58
+ startDelay: z.ZodDefault<z.ZodNumber>;
59
+ reducedMotion: z.ZodDefault<z.ZodBoolean>;
60
+ }, z.core.$strip>;
61
+ type ParentVariantsOptions = z.input<typeof parentVariantsSchema>;
62
+ type ResolvedParentVariantsOptions = z.output<typeof parentVariantsSchema>;
63
+
64
+ /**
65
+ * Variants para el contenedor padre: anima hijos en cascada con `stagger()`.
66
+ * Los hijos deben usar `excludeDelay: true` para heredar el stagger (CL-001).
67
+ */
68
+ declare function parentVariants(options?: ParentVariantsOptions): Variants;
69
+
70
+ declare const scaleOptionsSchema: z.ZodObject<{
71
+ duration: z.ZodDefault<z.ZodNumber>;
72
+ delay: z.ZodDefault<z.ZodNumber>;
73
+ ease: z.ZodDefault<z.ZodCustom<motion_react.Easing, motion_react.Easing>>;
74
+ spring: z.ZodOptional<z.ZodCustom<Omit<motion_react.SpringOptions, "keyframes">, Omit<motion_react.SpringOptions, "keyframes">>>;
75
+ excludeDelay: z.ZodDefault<z.ZodBoolean>;
76
+ reducedMotion: z.ZodDefault<z.ZodBoolean>;
77
+ from: z.ZodDefault<z.ZodNumber>;
78
+ }, z.core.$strip>;
79
+ type ScaleOptions = z.input<typeof scaleOptionsSchema>;
80
+ type ResolvedScaleOptions = z.output<typeof scaleOptionsSchema>;
81
+
82
+ /**
83
+ * Entrada con escala (`from` → `1`) junto con `opacity: 0 → 1`.
84
+ * Función pura que retorna `Variants`.
85
+ */
86
+ declare function scale(options?: ScaleOptions): Variants;
87
+
88
+ declare const slideOptionsSchema: z.ZodObject<{
89
+ duration: z.ZodDefault<z.ZodNumber>;
90
+ delay: z.ZodDefault<z.ZodNumber>;
91
+ ease: z.ZodDefault<z.ZodCustom<motion_react.Easing, motion_react.Easing>>;
92
+ spring: z.ZodOptional<z.ZodCustom<Omit<motion_react.SpringOptions, "keyframes">, Omit<motion_react.SpringOptions, "keyframes">>>;
93
+ excludeDelay: z.ZodDefault<z.ZodBoolean>;
94
+ reducedMotion: z.ZodDefault<z.ZodBoolean>;
95
+ direction: z.ZodDefault<z.ZodEnum<{
96
+ right: "right";
97
+ left: "left";
98
+ up: "up";
99
+ down: "down";
100
+ }>>;
101
+ distance: z.ZodDefault<z.ZodNumber>;
102
+ }, z.core.$strip>;
103
+ type SlideOptions = z.input<typeof slideOptionsSchema>;
104
+ type ResolvedSlideOptions = z.output<typeof slideOptionsSchema>;
105
+
106
+ /**
107
+ * Desplazamiento puro (sin `opacity`) desde una dirección.
108
+ * Función pura que retorna `Variants`.
109
+ */
110
+ declare function slide(options?: SlideOptions): Variants;
111
+
112
+ export { type ClipRevealOptions as C, type FadeOptions as F, type ParentVariantsOptions as P, type ResolvedClipRevealOptions as R, type ScaleOptions as S, type ResolvedFadeOptions as a, type ResolvedParentVariantsOptions as b, type ResolvedScaleOptions as c, type ResolvedSlideOptions as d, type SlideOptions as e, clipReveal as f, clipRevealOptionsSchema as g, fade as h, fadeOptionsSchema as i, parentVariantsSchema as j, scaleOptionsSchema as k, slide as l, slideOptionsSchema as m, parentVariants as p, scale as s };
@@ -0,0 +1,112 @@
1
+ import * as motion_react from 'motion/react';
2
+ import { Variants } from 'motion/react';
3
+ import { z } from 'zod';
4
+
5
+ declare const clipRevealOptionsSchema: z.ZodObject<{
6
+ duration: z.ZodDefault<z.ZodNumber>;
7
+ delay: z.ZodDefault<z.ZodNumber>;
8
+ ease: z.ZodDefault<z.ZodCustom<motion_react.Easing, motion_react.Easing>>;
9
+ spring: z.ZodOptional<z.ZodCustom<Omit<motion_react.SpringOptions, "keyframes">, Omit<motion_react.SpringOptions, "keyframes">>>;
10
+ excludeDelay: z.ZodDefault<z.ZodBoolean>;
11
+ reducedMotion: z.ZodDefault<z.ZodBoolean>;
12
+ direction: z.ZodDefault<z.ZodEnum<{
13
+ right: "right";
14
+ left: "left";
15
+ up: "up";
16
+ down: "down";
17
+ }>>;
18
+ scale: z.ZodOptional<z.ZodNumber>;
19
+ }, z.core.$strip>;
20
+ type ClipRevealOptions = z.input<typeof clipRevealOptionsSchema>;
21
+ type ResolvedClipRevealOptions = z.output<typeof clipRevealOptionsSchema>;
22
+
23
+ /**
24
+ * Reveal cinematográfico animando `clipPath` (con escala opcional).
25
+ * Función pura que retorna `Variants`.
26
+ */
27
+ declare function clipReveal(options?: ClipRevealOptions): Variants;
28
+
29
+ declare const fadeOptionsSchema: z.ZodObject<{
30
+ duration: z.ZodDefault<z.ZodNumber>;
31
+ delay: z.ZodDefault<z.ZodNumber>;
32
+ ease: z.ZodDefault<z.ZodCustom<motion_react.Easing, motion_react.Easing>>;
33
+ spring: z.ZodOptional<z.ZodCustom<Omit<motion_react.SpringOptions, "keyframes">, Omit<motion_react.SpringOptions, "keyframes">>>;
34
+ excludeDelay: z.ZodDefault<z.ZodBoolean>;
35
+ reducedMotion: z.ZodDefault<z.ZodBoolean>;
36
+ direction: z.ZodDefault<z.ZodEnum<{
37
+ right: "right";
38
+ left: "left";
39
+ none: "none";
40
+ up: "up";
41
+ down: "down";
42
+ }>>;
43
+ distance: z.ZodDefault<z.ZodNumber>;
44
+ blur: z.ZodDefault<z.ZodNumber>;
45
+ scale: z.ZodDefault<z.ZodNumber>;
46
+ }, z.core.$strip>;
47
+ type FadeOptions = z.input<typeof fadeOptionsSchema>;
48
+ type ResolvedFadeOptions = z.output<typeof fadeOptionsSchema>;
49
+
50
+ /**
51
+ * Fade de entrada con dirección, blur y escala opcionales.
52
+ * Función pura que retorna `Variants` para usar en `motion`/`motion/react`.
53
+ */
54
+ declare function fade(options?: FadeOptions): Variants;
55
+
56
+ declare const parentVariantsSchema: z.ZodObject<{
57
+ delayChildren: z.ZodDefault<z.ZodNumber>;
58
+ startDelay: z.ZodDefault<z.ZodNumber>;
59
+ reducedMotion: z.ZodDefault<z.ZodBoolean>;
60
+ }, z.core.$strip>;
61
+ type ParentVariantsOptions = z.input<typeof parentVariantsSchema>;
62
+ type ResolvedParentVariantsOptions = z.output<typeof parentVariantsSchema>;
63
+
64
+ /**
65
+ * Variants para el contenedor padre: anima hijos en cascada con `stagger()`.
66
+ * Los hijos deben usar `excludeDelay: true` para heredar el stagger (CL-001).
67
+ */
68
+ declare function parentVariants(options?: ParentVariantsOptions): Variants;
69
+
70
+ declare const scaleOptionsSchema: z.ZodObject<{
71
+ duration: z.ZodDefault<z.ZodNumber>;
72
+ delay: z.ZodDefault<z.ZodNumber>;
73
+ ease: z.ZodDefault<z.ZodCustom<motion_react.Easing, motion_react.Easing>>;
74
+ spring: z.ZodOptional<z.ZodCustom<Omit<motion_react.SpringOptions, "keyframes">, Omit<motion_react.SpringOptions, "keyframes">>>;
75
+ excludeDelay: z.ZodDefault<z.ZodBoolean>;
76
+ reducedMotion: z.ZodDefault<z.ZodBoolean>;
77
+ from: z.ZodDefault<z.ZodNumber>;
78
+ }, z.core.$strip>;
79
+ type ScaleOptions = z.input<typeof scaleOptionsSchema>;
80
+ type ResolvedScaleOptions = z.output<typeof scaleOptionsSchema>;
81
+
82
+ /**
83
+ * Entrada con escala (`from` → `1`) junto con `opacity: 0 → 1`.
84
+ * Función pura que retorna `Variants`.
85
+ */
86
+ declare function scale(options?: ScaleOptions): Variants;
87
+
88
+ declare const slideOptionsSchema: z.ZodObject<{
89
+ duration: z.ZodDefault<z.ZodNumber>;
90
+ delay: z.ZodDefault<z.ZodNumber>;
91
+ ease: z.ZodDefault<z.ZodCustom<motion_react.Easing, motion_react.Easing>>;
92
+ spring: z.ZodOptional<z.ZodCustom<Omit<motion_react.SpringOptions, "keyframes">, Omit<motion_react.SpringOptions, "keyframes">>>;
93
+ excludeDelay: z.ZodDefault<z.ZodBoolean>;
94
+ reducedMotion: z.ZodDefault<z.ZodBoolean>;
95
+ direction: z.ZodDefault<z.ZodEnum<{
96
+ right: "right";
97
+ left: "left";
98
+ up: "up";
99
+ down: "down";
100
+ }>>;
101
+ distance: z.ZodDefault<z.ZodNumber>;
102
+ }, z.core.$strip>;
103
+ type SlideOptions = z.input<typeof slideOptionsSchema>;
104
+ type ResolvedSlideOptions = z.output<typeof slideOptionsSchema>;
105
+
106
+ /**
107
+ * Desplazamiento puro (sin `opacity`) desde una dirección.
108
+ * Función pura que retorna `Variants`.
109
+ */
110
+ declare function slide(options?: SlideOptions): Variants;
111
+
112
+ export { type ClipRevealOptions as C, type FadeOptions as F, type ParentVariantsOptions as P, type ResolvedClipRevealOptions as R, type ScaleOptions as S, type ResolvedFadeOptions as a, type ResolvedParentVariantsOptions as b, type ResolvedScaleOptions as c, type ResolvedSlideOptions as d, type SlideOptions as e, clipReveal as f, clipRevealOptionsSchema as g, fade as h, fadeOptionsSchema as i, parentVariantsSchema as j, scaleOptionsSchema as k, slide as l, slideOptionsSchema as m, parentVariants as p, scale as s };