@pelatform/ui 1.6.0 → 2.0.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/css/source.css +20 -0
- package/css/theme.css +1 -2
- package/dist/animation.d.ts +4 -379
- package/dist/animation.js +2 -1752
- package/dist/aria.d.ts +1 -31
- package/dist/aria.js +2 -139
- package/dist/base.d.ts +1 -651
- package/dist/base.js +2 -5556
- package/dist/chunk-UEVIEY7W.js +51 -0
- package/dist/{components.cjs → chunk-VZEE3GOC.js} +81 -2344
- package/dist/components.d.ts +224 -181
- package/dist/components.js +364 -765
- package/dist/default.d.ts +1 -1322
- package/dist/default.js +2 -8931
- package/dist/hooks.d.ts +4 -1083
- package/dist/hooks.js +5 -662
- package/dist/index.d.ts +58 -308
- package/dist/index.js +5 -226
- package/package.json +25 -105
- package/dist/animation.cjs +0 -1752
- package/dist/animation.d.cts +0 -379
- package/dist/aria.cjs +0 -139
- package/dist/aria.d.cts +0 -31
- package/dist/badge-BtI4BMea.d.cts +0 -33
- package/dist/badge-BtI4BMea.d.ts +0 -33
- package/dist/base.cjs +0 -5556
- package/dist/base.d.cts +0 -651
- package/dist/chunk-3N75YA6Q.cjs +0 -60
- package/dist/chunk-7472NIIL.cjs +0 -40
- package/dist/chunk-BXUKTDPN.cjs +0 -576
- package/dist/chunk-CD2BCCQU.js +0 -180
- package/dist/chunk-CJXIPSTG.cjs +0 -10
- package/dist/chunk-CTHRAJQZ.js +0 -1522
- package/dist/chunk-D373YKDA.js +0 -196
- package/dist/chunk-EZW5GNS4.js +0 -6
- package/dist/chunk-HILACSFA.cjs +0 -1522
- package/dist/chunk-HR3R6KKM.js +0 -40
- package/dist/chunk-HW52LCWN.js +0 -22
- package/dist/chunk-I46SELBA.cjs +0 -22
- package/dist/chunk-J4JGE3U5.cjs +0 -180
- package/dist/chunk-RQHJBTEU.js +0 -10
- package/dist/chunk-SK6SSJHC.js +0 -9
- package/dist/chunk-T74DBLYY.js +0 -60
- package/dist/chunk-TB6DU23O.js +0 -576
- package/dist/chunk-UP53DCYH.cjs +0 -6
- package/dist/chunk-ZBO5IAMA.cjs +0 -196
- package/dist/chunk-ZDR3OZ7Z.cjs +0 -9
- package/dist/colors-CUDWvz1g.d.cts +0 -42
- package/dist/colors-CUDWvz1g.d.ts +0 -42
- package/dist/components-CidsRcc3.d.cts +0 -46
- package/dist/components-CidsRcc3.d.ts +0 -46
- package/dist/components.d.cts +0 -2944
- package/dist/default.cjs +0 -8931
- package/dist/default.d.cts +0 -1322
- package/dist/hooks.cjs +0 -666
- package/dist/hooks.d.cts +0 -1172
- package/dist/index.cjs +0 -230
- package/dist/index.d.cts +0 -318
- package/dist/input-AwYIskrX.d.cts +0 -22
- package/dist/input-AwYIskrX.d.ts +0 -22
- package/dist/menu-GmSRfRGB.d.cts +0 -43
- package/dist/menu-GmSRfRGB.d.ts +0 -43
- package/dist/metafile-cjs.json +0 -1
- package/dist/metafile-esm.json +0 -1
- package/dist/re-export/cva.cjs +0 -6
- package/dist/re-export/cva.d.cts +0 -10
- package/dist/re-export/cva.d.ts +0 -10
- package/dist/re-export/cva.js +0 -6
- package/dist/re-export/motion.cjs +0 -2
- package/dist/re-export/motion.d.cts +0 -1
- package/dist/re-export/motion.d.ts +0 -1
- package/dist/re-export/motion.js +0 -2
- package/dist/re-export/next-themes.cjs +0 -2
- package/dist/re-export/next-themes.d.cts +0 -1
- package/dist/re-export/next-themes.d.ts +0 -1
- package/dist/re-export/next-themes.js +0 -2
- package/dist/re-export/react-day-picker.cjs +0 -2
- package/dist/re-export/react-day-picker.d.cts +0 -1
- package/dist/re-export/react-day-picker.d.ts +0 -1
- package/dist/re-export/react-day-picker.js +0 -2
- package/dist/re-export/react-hook-form.cjs +0 -2
- package/dist/re-export/react-hook-form.d.cts +0 -1
- package/dist/re-export/react-hook-form.d.ts +0 -1
- package/dist/re-export/react-hook-form.js +0 -2
- package/dist/re-export/resolver.cjs +0 -2
- package/dist/re-export/resolver.d.cts +0 -1
- package/dist/re-export/resolver.d.ts +0 -1
- package/dist/re-export/resolver.js +0 -2
- package/dist/re-export/sonner.cjs +0 -2
- package/dist/re-export/sonner.d.cts +0 -1
- package/dist/re-export/sonner.d.ts +0 -1
- package/dist/re-export/sonner.js +0 -2
- package/dist/re-export/tanstack-query.cjs +0 -2
- package/dist/re-export/tanstack-query.d.cts +0 -1
- package/dist/re-export/tanstack-query.d.ts +0 -1
- package/dist/re-export/tanstack-query.js +0 -2
- package/dist/re-export/tanstack-table.cjs +0 -2
- package/dist/re-export/tanstack-table.d.cts +0 -1
- package/dist/re-export/tanstack-table.d.ts +0 -1
- package/dist/re-export/tanstack-table.js +0 -2
- package/dist/re-export/zod.cjs +0 -2
- package/dist/re-export/zod.d.cts +0 -1
- package/dist/re-export/zod.d.ts +0 -1
- package/dist/re-export/zod.js +0 -2
package/dist/animation.js
CHANGED
|
@@ -1,1752 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
HoverBackground
|
|
6
|
-
} from "./chunk-D373YKDA.js";
|
|
7
|
-
import {
|
|
8
|
-
cn
|
|
9
|
-
} from "./chunk-RQHJBTEU.js";
|
|
10
|
-
|
|
11
|
-
// src/ui/animation/avatar-group.tsx
|
|
12
|
-
import * as React from "react";
|
|
13
|
-
import {
|
|
14
|
-
AnimatePresence,
|
|
15
|
-
motion,
|
|
16
|
-
useMotionValue,
|
|
17
|
-
useSpring,
|
|
18
|
-
useTransform
|
|
19
|
-
} from "motion/react";
|
|
20
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
21
|
-
var AvatarGroupContext = React.createContext(null);
|
|
22
|
-
var StaggeredContent = ({ content }) => {
|
|
23
|
-
const children = React.Children.toArray(content);
|
|
24
|
-
return /* @__PURE__ */ jsx(
|
|
25
|
-
motion.div,
|
|
26
|
-
{
|
|
27
|
-
initial: "initial",
|
|
28
|
-
animate: "animate",
|
|
29
|
-
exit: "exit",
|
|
30
|
-
variants: {
|
|
31
|
-
animate: { transition: { staggerChildren: 0.08 } }
|
|
32
|
-
},
|
|
33
|
-
children: children.map((child, i) => /* @__PURE__ */ jsx(
|
|
34
|
-
motion.div,
|
|
35
|
-
{
|
|
36
|
-
variants: {
|
|
37
|
-
initial: { opacity: 0, y: 20 },
|
|
38
|
-
animate: {
|
|
39
|
-
opacity: 1,
|
|
40
|
-
y: 0,
|
|
41
|
-
transition: { duration: 0.3, ease: "easeOut" }
|
|
42
|
-
},
|
|
43
|
-
exit: {
|
|
44
|
-
opacity: 0,
|
|
45
|
-
y: -20,
|
|
46
|
-
transition: { duration: 0.2, ease: "easeIn" }
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
children: child
|
|
50
|
-
},
|
|
51
|
-
i
|
|
52
|
-
))
|
|
53
|
-
}
|
|
54
|
-
);
|
|
55
|
-
};
|
|
56
|
-
function AvatarGroup({
|
|
57
|
-
children,
|
|
58
|
-
className,
|
|
59
|
-
tooltipClassName,
|
|
60
|
-
animation = "default"
|
|
61
|
-
}) {
|
|
62
|
-
const contextValue = {
|
|
63
|
-
tooltipClassName,
|
|
64
|
-
animation
|
|
65
|
-
};
|
|
66
|
-
return /* @__PURE__ */ jsx(AvatarGroupContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx("div", { className: cn("-space-x-2.5 flex", className), children }) });
|
|
67
|
-
}
|
|
68
|
-
function AvatarGroupItem({
|
|
69
|
-
children,
|
|
70
|
-
className,
|
|
71
|
-
tooltipClassName,
|
|
72
|
-
animation: itemAnimation
|
|
73
|
-
}) {
|
|
74
|
-
const context = React.useContext(AvatarGroupContext);
|
|
75
|
-
const [hoveredIndex, setHoveredIndex] = React.useState(false);
|
|
76
|
-
const springConfig = { stiffness: 100, damping: 5 };
|
|
77
|
-
const x = useMotionValue(0);
|
|
78
|
-
const animation = itemAnimation || context?.animation || "default";
|
|
79
|
-
const finalTooltipClassName = tooltipClassName || context?.tooltipClassName;
|
|
80
|
-
const rotate = useSpring(useTransform(x, [-100, 100], [-45, 45]), springConfig);
|
|
81
|
-
const translateX = useSpring(useTransform(x, [-100, 100], [-50, 50]), springConfig);
|
|
82
|
-
const tooltipChild = React.Children.toArray(children).find(
|
|
83
|
-
(child) => React.isValidElement(child) && child.type === AvatarGroupTooltip
|
|
84
|
-
);
|
|
85
|
-
const otherChildren = React.Children.toArray(children).filter(
|
|
86
|
-
(child) => !(React.isValidElement(child) && child.type === AvatarGroupTooltip)
|
|
87
|
-
);
|
|
88
|
-
const tooltipContent = tooltipChild && React.isValidElement(tooltipChild) ? tooltipChild.props.children : null;
|
|
89
|
-
const handleMouseMove = (event) => {
|
|
90
|
-
const halfWidth = event.target.offsetWidth / 2;
|
|
91
|
-
x.set(event.nativeEvent.offsetX - halfWidth);
|
|
92
|
-
};
|
|
93
|
-
const animationVariants = {
|
|
94
|
-
default: {
|
|
95
|
-
initial: { opacity: 0, y: 20, scale: 0.6 },
|
|
96
|
-
animate: {
|
|
97
|
-
opacity: 1,
|
|
98
|
-
y: 0,
|
|
99
|
-
scale: 1,
|
|
100
|
-
transition: {
|
|
101
|
-
type: "spring",
|
|
102
|
-
stiffness: 260,
|
|
103
|
-
damping: 10
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
exit: {
|
|
107
|
-
opacity: 0,
|
|
108
|
-
y: 20,
|
|
109
|
-
scale: 0.6,
|
|
110
|
-
transition: {
|
|
111
|
-
duration: 0.2,
|
|
112
|
-
ease: "easeInOut"
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
flip: {
|
|
117
|
-
initial: { opacity: 0, rotateX: -90 },
|
|
118
|
-
animate: {
|
|
119
|
-
opacity: 1,
|
|
120
|
-
rotateX: 0,
|
|
121
|
-
transition: {
|
|
122
|
-
type: "spring",
|
|
123
|
-
stiffness: 180,
|
|
124
|
-
damping: 25
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
exit: {
|
|
128
|
-
opacity: 0,
|
|
129
|
-
rotateX: -90,
|
|
130
|
-
transition: {
|
|
131
|
-
duration: 0.3,
|
|
132
|
-
ease: "easeInOut"
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
reveal: {
|
|
137
|
-
initial: { opacity: 0, scale: 0.95 },
|
|
138
|
-
animate: {
|
|
139
|
-
opacity: 1,
|
|
140
|
-
scale: 1,
|
|
141
|
-
transition: { duration: 0.15, ease: "easeOut" }
|
|
142
|
-
},
|
|
143
|
-
exit: {
|
|
144
|
-
opacity: 0,
|
|
145
|
-
scale: 0.95,
|
|
146
|
-
transition: { duration: 0.1, ease: "easeIn" }
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
const selectedVariant = animationVariants[animation];
|
|
151
|
-
return /* @__PURE__ */ jsxs(
|
|
152
|
-
"div",
|
|
153
|
-
{
|
|
154
|
-
className: cn("group relative", className),
|
|
155
|
-
onMouseEnter: () => setHoveredIndex(true),
|
|
156
|
-
onMouseLeave: () => setHoveredIndex(false),
|
|
157
|
-
children: [
|
|
158
|
-
/* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: hoveredIndex && tooltipContent && /* @__PURE__ */ jsxs(
|
|
159
|
-
motion.div,
|
|
160
|
-
{
|
|
161
|
-
initial: selectedVariant.initial,
|
|
162
|
-
animate: selectedVariant.animate,
|
|
163
|
-
exit: selectedVariant.exit,
|
|
164
|
-
style: {
|
|
165
|
-
translateX: animation === "reveal" ? 0 : translateX,
|
|
166
|
-
rotate: animation === "reveal" ? 0 : rotate,
|
|
167
|
-
whiteSpace: "nowrap",
|
|
168
|
-
transformOrigin: "center"
|
|
169
|
-
},
|
|
170
|
-
className: cn(
|
|
171
|
-
"-top-16 -translate-x-1/2 absolute left-1/2 z-50 flex flex-col items-center justify-center rounded-md bg-black px-4 py-2 font-medium text-white text-xs shadow-xl",
|
|
172
|
-
finalTooltipClassName
|
|
173
|
-
),
|
|
174
|
-
children: [
|
|
175
|
-
/* @__PURE__ */ jsx(
|
|
176
|
-
motion.div,
|
|
177
|
-
{
|
|
178
|
-
className: "-bottom-px absolute inset-x-10 z-30 h-px w-[20%] bg-linear-to-r from-transparent via-emerald-500 to-transparent dark:via-emerald-900",
|
|
179
|
-
initial: { opacity: 0 },
|
|
180
|
-
animate: { opacity: 1 },
|
|
181
|
-
exit: { opacity: 0 },
|
|
182
|
-
transition: { duration: 0.15 }
|
|
183
|
-
}
|
|
184
|
-
),
|
|
185
|
-
/* @__PURE__ */ jsx(
|
|
186
|
-
motion.div,
|
|
187
|
-
{
|
|
188
|
-
className: "-bottom-px absolute left-10 z-30 h-px w-[40%] bg-linear-to-r from-transparent via-sky-500 to-transparent dark:via-sky-900",
|
|
189
|
-
initial: { opacity: 0 },
|
|
190
|
-
animate: { opacity: 1 },
|
|
191
|
-
exit: { opacity: 0 },
|
|
192
|
-
transition: { duration: 0.15 }
|
|
193
|
-
}
|
|
194
|
-
),
|
|
195
|
-
animation === "reveal" ? /* @__PURE__ */ jsx(StaggeredContent, { content: tooltipContent }) : tooltipContent
|
|
196
|
-
]
|
|
197
|
-
}
|
|
198
|
-
) }),
|
|
199
|
-
/* @__PURE__ */ jsx(
|
|
200
|
-
motion.div,
|
|
201
|
-
{
|
|
202
|
-
className: "relative cursor-pointer",
|
|
203
|
-
whileHover: {
|
|
204
|
-
zIndex: 30
|
|
205
|
-
},
|
|
206
|
-
whileTap: { scale: 0.95 },
|
|
207
|
-
transition: {
|
|
208
|
-
duration: 0.5
|
|
209
|
-
},
|
|
210
|
-
onMouseMove: handleMouseMove,
|
|
211
|
-
children: otherChildren
|
|
212
|
-
}
|
|
213
|
-
)
|
|
214
|
-
]
|
|
215
|
-
}
|
|
216
|
-
);
|
|
217
|
-
}
|
|
218
|
-
function AvatarGroupTooltip({ children, className }) {
|
|
219
|
-
return /* @__PURE__ */ jsx(
|
|
220
|
-
motion.div,
|
|
221
|
-
{
|
|
222
|
-
initial: { opacity: 0, y: 20, scale: 0.6 },
|
|
223
|
-
animate: { opacity: 1 },
|
|
224
|
-
exit: { opacity: 0 },
|
|
225
|
-
transition: { duration: 0.15 },
|
|
226
|
-
className: cn("relative z-30 hidden", className),
|
|
227
|
-
children
|
|
228
|
-
}
|
|
229
|
-
);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
// src/ui/animation/counting-number.tsx
|
|
233
|
-
import { useEffect, useRef, useState as useState2 } from "react";
|
|
234
|
-
import { animate, motion as motion2, useInView, useMotionValue as useMotionValue2 } from "motion/react";
|
|
235
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
236
|
-
function CountingNumber({
|
|
237
|
-
from = 0,
|
|
238
|
-
to = 100,
|
|
239
|
-
duration = 2,
|
|
240
|
-
delay = 0,
|
|
241
|
-
className,
|
|
242
|
-
startOnView = true,
|
|
243
|
-
once = false,
|
|
244
|
-
inViewMargin,
|
|
245
|
-
onComplete,
|
|
246
|
-
format,
|
|
247
|
-
...props
|
|
248
|
-
}) {
|
|
249
|
-
const ref = useRef(null);
|
|
250
|
-
const isInView = useInView(ref, { once, margin: inViewMargin });
|
|
251
|
-
const [hasAnimated, setHasAnimated] = useState2(false);
|
|
252
|
-
const [display, setDisplay] = useState2(from);
|
|
253
|
-
const motionValue = useMotionValue2(from);
|
|
254
|
-
const shouldStart = !startOnView || isInView && (!once || !hasAnimated);
|
|
255
|
-
useEffect(() => {
|
|
256
|
-
if (!shouldStart) return;
|
|
257
|
-
setHasAnimated(true);
|
|
258
|
-
const timeout = setTimeout(() => {
|
|
259
|
-
const controls = animate(motionValue, to, {
|
|
260
|
-
duration,
|
|
261
|
-
onUpdate: (v) => setDisplay(v),
|
|
262
|
-
onComplete
|
|
263
|
-
});
|
|
264
|
-
return () => controls.stop();
|
|
265
|
-
}, delay);
|
|
266
|
-
return () => clearTimeout(timeout);
|
|
267
|
-
}, [shouldStart, to, duration, delay, motionValue, onComplete]);
|
|
268
|
-
return /* @__PURE__ */ jsx2(motion2.span, { ref, className: cn("inline-block", className), ...props, children: format ? format(display) : Math.round(display) });
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
// src/ui/animation/github-button.tsx
|
|
272
|
-
import React2, { useCallback, useEffect as useEffect2, useState as useState3 } from "react";
|
|
273
|
-
import { cva } from "class-variance-authority";
|
|
274
|
-
import { Star } from "lucide-react";
|
|
275
|
-
import { motion as motion3, useInView as useInView2 } from "motion/react";
|
|
276
|
-
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
277
|
-
var githubButtonVariants = cva(
|
|
278
|
-
"cursor-pointer relative overflow-hidden will-change-transform backface-visibility-hidden transform-gpu transition-transform duration-200 ease-out hover:scale-105 group focus-visible:outline-hidden inline-flex items-center justify-center whitespace-nowrap font-medium ring-offset-background disabled:pointer-events-none disabled:opacity-60 [&_svg]:shrink-0",
|
|
279
|
-
{
|
|
280
|
-
variants: {
|
|
281
|
-
variant: {
|
|
282
|
-
default: "bg-zinc-950 hover:bg-zinc-900 text-white border-gray-700 dark:bg-zinc-50 dark:border-gray-300 dark:text-zinc-950 dark:hover:bg-zinc-50",
|
|
283
|
-
outline: "bg-background text-accent-foreground border border-input hover:bg-accent"
|
|
284
|
-
},
|
|
285
|
-
size: {
|
|
286
|
-
default: "h-8.5 rounded-md px-3 text-[0.8125rem] leading-none [&_svg]:size-4 gap-2",
|
|
287
|
-
sm: "h-7 rounded-md px-2.5 text-xs leading-none [&_svg]:size-3.5 gap-1.5",
|
|
288
|
-
lg: "h-10 rounded-md px-4 text-sm leading-none [&_svg]:size-5 gap-2.5"
|
|
289
|
-
}
|
|
290
|
-
},
|
|
291
|
-
defaultVariants: {
|
|
292
|
-
variant: "default",
|
|
293
|
-
size: "default"
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
);
|
|
297
|
-
function GithubButton({
|
|
298
|
-
initialStars = 0,
|
|
299
|
-
targetStars = 0,
|
|
300
|
-
starsClass = "",
|
|
301
|
-
fixedWidth = true,
|
|
302
|
-
animationDuration = 2,
|
|
303
|
-
animationDelay = 0,
|
|
304
|
-
autoAnimate = true,
|
|
305
|
-
className,
|
|
306
|
-
variant = "default",
|
|
307
|
-
size = "default",
|
|
308
|
-
showGithubIcon = true,
|
|
309
|
-
showStarIcon = true,
|
|
310
|
-
roundStars = false,
|
|
311
|
-
separator = false,
|
|
312
|
-
filled = false,
|
|
313
|
-
repoUrl,
|
|
314
|
-
onClick,
|
|
315
|
-
label = "",
|
|
316
|
-
useInViewTrigger = false,
|
|
317
|
-
inViewOptions = { once: true },
|
|
318
|
-
transition,
|
|
319
|
-
...props
|
|
320
|
-
}) {
|
|
321
|
-
const [currentStars, setCurrentStars] = useState3(initialStars);
|
|
322
|
-
const [isAnimating, setIsAnimating] = useState3(false);
|
|
323
|
-
const [starProgress, setStarProgress] = useState3(filled ? 100 : 0);
|
|
324
|
-
const [hasAnimated, setHasAnimated] = useState3(false);
|
|
325
|
-
const formatNumber = (num) => {
|
|
326
|
-
const units = ["k", "M", "B", "T"];
|
|
327
|
-
if (roundStars && num >= 1e3) {
|
|
328
|
-
let unitIndex = -1;
|
|
329
|
-
let value = num;
|
|
330
|
-
while (value >= 1e3 && unitIndex < units.length - 1) {
|
|
331
|
-
value /= 1e3;
|
|
332
|
-
unitIndex++;
|
|
333
|
-
}
|
|
334
|
-
const formatted = value % 1 === 0 ? value.toString() : value.toFixed(1);
|
|
335
|
-
return `${formatted}${units[unitIndex]}`;
|
|
336
|
-
}
|
|
337
|
-
return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
338
|
-
};
|
|
339
|
-
const startAnimation = useCallback(() => {
|
|
340
|
-
if (isAnimating || hasAnimated) return;
|
|
341
|
-
setIsAnimating(true);
|
|
342
|
-
const startTime = Date.now();
|
|
343
|
-
const startValue = 0;
|
|
344
|
-
const endValue = targetStars;
|
|
345
|
-
const duration = animationDuration * 1e3;
|
|
346
|
-
const animate2 = () => {
|
|
347
|
-
const elapsed = Date.now() - startTime;
|
|
348
|
-
const progress = Math.min(elapsed / duration, 1);
|
|
349
|
-
const easeOutQuart = 1 - (1 - progress) ** 4;
|
|
350
|
-
const newStars = Math.round(startValue + (endValue - startValue) * easeOutQuart);
|
|
351
|
-
setCurrentStars(newStars);
|
|
352
|
-
setStarProgress(progress * 100);
|
|
353
|
-
if (progress < 1) {
|
|
354
|
-
requestAnimationFrame(animate2);
|
|
355
|
-
} else {
|
|
356
|
-
setCurrentStars(endValue);
|
|
357
|
-
setStarProgress(100);
|
|
358
|
-
setIsAnimating(false);
|
|
359
|
-
setHasAnimated(true);
|
|
360
|
-
}
|
|
361
|
-
};
|
|
362
|
-
setTimeout(() => {
|
|
363
|
-
requestAnimationFrame(animate2);
|
|
364
|
-
}, animationDelay * 1e3);
|
|
365
|
-
}, [isAnimating, hasAnimated, targetStars, animationDuration, animationDelay]);
|
|
366
|
-
const ref = React2.useRef(null);
|
|
367
|
-
const isInView = useInView2(ref, inViewOptions);
|
|
368
|
-
useEffect2(() => {
|
|
369
|
-
setHasAnimated(false);
|
|
370
|
-
setCurrentStars(initialStars);
|
|
371
|
-
}, [initialStars]);
|
|
372
|
-
useEffect2(() => {
|
|
373
|
-
if (useInViewTrigger) {
|
|
374
|
-
if (isInView && !hasAnimated) {
|
|
375
|
-
startAnimation();
|
|
376
|
-
}
|
|
377
|
-
} else if (autoAnimate && !hasAnimated) {
|
|
378
|
-
startAnimation();
|
|
379
|
-
}
|
|
380
|
-
}, [autoAnimate, useInViewTrigger, isInView, hasAnimated, startAnimation]);
|
|
381
|
-
const navigateToRepo = () => {
|
|
382
|
-
if (!repoUrl) {
|
|
383
|
-
return;
|
|
384
|
-
}
|
|
385
|
-
try {
|
|
386
|
-
const link = document.createElement("a");
|
|
387
|
-
link.href = repoUrl;
|
|
388
|
-
link.target = "_blank";
|
|
389
|
-
link.rel = "noopener noreferrer";
|
|
390
|
-
document.body.appendChild(link);
|
|
391
|
-
link.click();
|
|
392
|
-
document.body.removeChild(link);
|
|
393
|
-
} catch {
|
|
394
|
-
try {
|
|
395
|
-
window.open(repoUrl, "_blank", "noopener,noreferrer");
|
|
396
|
-
} catch {
|
|
397
|
-
window.location.href = repoUrl;
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
};
|
|
401
|
-
const handleClick = (event) => {
|
|
402
|
-
if (onClick) {
|
|
403
|
-
onClick(event);
|
|
404
|
-
return;
|
|
405
|
-
}
|
|
406
|
-
if (repoUrl) {
|
|
407
|
-
navigateToRepo();
|
|
408
|
-
} else if (!hasAnimated) {
|
|
409
|
-
startAnimation();
|
|
410
|
-
}
|
|
411
|
-
};
|
|
412
|
-
const handleKeyDown = (event) => {
|
|
413
|
-
if (event.key === "Enter" || event.key === " ") {
|
|
414
|
-
event.preventDefault();
|
|
415
|
-
if (repoUrl) {
|
|
416
|
-
navigateToRepo();
|
|
417
|
-
} else if (!hasAnimated) {
|
|
418
|
-
startAnimation();
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
};
|
|
422
|
-
return /* @__PURE__ */ jsxs2(
|
|
423
|
-
"button",
|
|
424
|
-
{
|
|
425
|
-
ref,
|
|
426
|
-
className: cn(githubButtonVariants({ variant, size, className }), separator && "ps-0"),
|
|
427
|
-
onClick: handleClick,
|
|
428
|
-
onKeyDown: handleKeyDown,
|
|
429
|
-
tabIndex: 0,
|
|
430
|
-
"aria-label": repoUrl ? `Star ${label} on GitHub` : label,
|
|
431
|
-
...props,
|
|
432
|
-
children: [
|
|
433
|
-
showGithubIcon && /* @__PURE__ */ jsx3(
|
|
434
|
-
"div",
|
|
435
|
-
{
|
|
436
|
-
className: cn(
|
|
437
|
-
"relative flex h-full items-center justify-center",
|
|
438
|
-
separator && "w-9 border-input border-e bg-muted/60"
|
|
439
|
-
),
|
|
440
|
-
children: /* @__PURE__ */ jsx3("svg", { role: "img", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx3("path", { d: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" }) })
|
|
441
|
-
}
|
|
442
|
-
),
|
|
443
|
-
label && /* @__PURE__ */ jsx3("span", { children: label }),
|
|
444
|
-
showStarIcon && /* @__PURE__ */ jsxs2("div", { className: "relative inline-flex shrink-0", children: [
|
|
445
|
-
/* @__PURE__ */ jsx3(Star, { className: "fill-muted-foreground text-muted-foreground", "aria-hidden": "true" }),
|
|
446
|
-
/* @__PURE__ */ jsx3(
|
|
447
|
-
Star,
|
|
448
|
-
{
|
|
449
|
-
className: "absolute start-0 top-0 fill-yellow-400 text-yellow-400",
|
|
450
|
-
size: 18,
|
|
451
|
-
"aria-hidden": "true",
|
|
452
|
-
style: {
|
|
453
|
-
clipPath: `inset(${100 - starProgress}% 0 0 0)`
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
)
|
|
457
|
-
] }),
|
|
458
|
-
/* @__PURE__ */ jsxs2("div", { className: cn("relative flex flex-col overflow-hidden font-semibold", starsClass), children: [
|
|
459
|
-
/* @__PURE__ */ jsx3(
|
|
460
|
-
motion3.div,
|
|
461
|
-
{
|
|
462
|
-
animate: { opacity: 1 },
|
|
463
|
-
transition: {
|
|
464
|
-
type: "spring",
|
|
465
|
-
stiffness: 300,
|
|
466
|
-
damping: 30,
|
|
467
|
-
...transition
|
|
468
|
-
},
|
|
469
|
-
className: "tabular-nums",
|
|
470
|
-
children: /* @__PURE__ */ jsx3("span", { children: currentStars > 0 && formatNumber(currentStars) })
|
|
471
|
-
}
|
|
472
|
-
),
|
|
473
|
-
fixedWidth && /* @__PURE__ */ jsx3("span", { className: "h-0 overflow-hidden tabular-nums opacity-0", children: formatNumber(targetStars) })
|
|
474
|
-
] })
|
|
475
|
-
]
|
|
476
|
-
}
|
|
477
|
-
);
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
// src/ui/animation/gradient-background.tsx
|
|
481
|
-
import { motion as motion4 } from "motion/react";
|
|
482
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
483
|
-
function GradientBackground({
|
|
484
|
-
className,
|
|
485
|
-
transition = { duration: 10, ease: "easeInOut", repeat: Infinity },
|
|
486
|
-
...props
|
|
487
|
-
}) {
|
|
488
|
-
return /* @__PURE__ */ jsx4(
|
|
489
|
-
motion4.div,
|
|
490
|
-
{
|
|
491
|
-
"data-slot": "gradient-background",
|
|
492
|
-
className: cn(
|
|
493
|
-
"size-full bg-linear-to-br bg-size-[300%_300%] from-0% from-fuchsia-400 via-50% via-violet-500 to-100% to-fuchsia-600",
|
|
494
|
-
className
|
|
495
|
-
),
|
|
496
|
-
animate: {
|
|
497
|
-
backgroundPosition: [
|
|
498
|
-
"0% 0%",
|
|
499
|
-
"50% 50%",
|
|
500
|
-
"100% 0%",
|
|
501
|
-
"50% 100%",
|
|
502
|
-
"0% 50%",
|
|
503
|
-
"100% 100%",
|
|
504
|
-
"0% 0%"
|
|
505
|
-
]
|
|
506
|
-
},
|
|
507
|
-
whileTap: {
|
|
508
|
-
scale: 0.98
|
|
509
|
-
},
|
|
510
|
-
transition,
|
|
511
|
-
...props
|
|
512
|
-
}
|
|
513
|
-
);
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
// src/ui/animation/grid-background.tsx
|
|
517
|
-
import * as React3 from "react";
|
|
518
|
-
import { motion as motion5 } from "motion/react";
|
|
519
|
-
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
520
|
-
function GridBackground({
|
|
521
|
-
className,
|
|
522
|
-
children,
|
|
523
|
-
gridSize = "8:8",
|
|
524
|
-
colors = {},
|
|
525
|
-
beams = {},
|
|
526
|
-
...props
|
|
527
|
-
}) {
|
|
528
|
-
const {
|
|
529
|
-
background = "bg-slate-900",
|
|
530
|
-
borderColor = "border-slate-700/50",
|
|
531
|
-
borderSize = "1px",
|
|
532
|
-
borderStyle = "solid"
|
|
533
|
-
} = colors;
|
|
534
|
-
const {
|
|
535
|
-
count = 12,
|
|
536
|
-
colors: beamColors = [
|
|
537
|
-
"bg-cyan-400",
|
|
538
|
-
"bg-purple-400",
|
|
539
|
-
"bg-fuchsia-400",
|
|
540
|
-
"bg-violet-400",
|
|
541
|
-
"bg-blue-400",
|
|
542
|
-
"bg-indigo-400",
|
|
543
|
-
"bg-green-400",
|
|
544
|
-
"bg-yellow-400",
|
|
545
|
-
"bg-orange-400",
|
|
546
|
-
"bg-red-400",
|
|
547
|
-
"bg-pink-400",
|
|
548
|
-
"bg-rose-400"
|
|
549
|
-
],
|
|
550
|
-
shadow = "shadow-lg shadow-cyan-400/50 rounded-full",
|
|
551
|
-
speed = 4
|
|
552
|
-
} = beams;
|
|
553
|
-
const [cols, rows] = gridSize.split(":").map(Number);
|
|
554
|
-
const animatedBeams = React3.useMemo(
|
|
555
|
-
() => Array.from({ length: Math.min(count, 12) }, (_, i) => {
|
|
556
|
-
const direction = Math.random() > 0.5 ? "horizontal" : "vertical";
|
|
557
|
-
const startPosition = Math.random() > 0.5 ? "start" : "end";
|
|
558
|
-
return {
|
|
559
|
-
id: i,
|
|
560
|
-
color: beamColors[i % beamColors.length],
|
|
561
|
-
direction,
|
|
562
|
-
startPosition,
|
|
563
|
-
// For horizontal beams: choose a row index (1 to rows-1) - exclude edges
|
|
564
|
-
// For vertical beams: choose a column index (1 to cols-1) - exclude edges
|
|
565
|
-
gridLine: direction === "horizontal" ? Math.floor(Math.random() * (rows - 1)) + 1 : Math.floor(Math.random() * (cols - 1)) + 1,
|
|
566
|
-
delay: Math.random() * 2,
|
|
567
|
-
duration: speed + Math.random() * 2
|
|
568
|
-
};
|
|
569
|
-
}),
|
|
570
|
-
[count, beamColors, speed, cols, rows]
|
|
571
|
-
);
|
|
572
|
-
const gridStyle = {
|
|
573
|
-
"--border-style": borderStyle
|
|
574
|
-
};
|
|
575
|
-
return /* @__PURE__ */ jsxs3(
|
|
576
|
-
motion5.div,
|
|
577
|
-
{
|
|
578
|
-
"data-slot": "grid-background",
|
|
579
|
-
className: cn("relative size-full overflow-hidden", background, className),
|
|
580
|
-
style: gridStyle,
|
|
581
|
-
...props,
|
|
582
|
-
children: [
|
|
583
|
-
/* @__PURE__ */ jsx5(
|
|
584
|
-
"div",
|
|
585
|
-
{
|
|
586
|
-
className: cn("absolute inset-0 size-full", borderColor),
|
|
587
|
-
style: {
|
|
588
|
-
display: "grid",
|
|
589
|
-
gridTemplateColumns: `repeat(${cols}, 1fr)`,
|
|
590
|
-
gridTemplateRows: `repeat(${rows}, 1fr)`,
|
|
591
|
-
borderRightWidth: borderSize,
|
|
592
|
-
borderBottomWidth: borderSize,
|
|
593
|
-
borderRightStyle: borderStyle,
|
|
594
|
-
borderBottomStyle: borderStyle
|
|
595
|
-
},
|
|
596
|
-
children: Array.from({ length: cols * rows }).map((_, index) => /* @__PURE__ */ jsx5(
|
|
597
|
-
"div",
|
|
598
|
-
{
|
|
599
|
-
className: cn("relative", borderColor),
|
|
600
|
-
style: {
|
|
601
|
-
borderTopWidth: borderSize,
|
|
602
|
-
borderLeftWidth: borderSize,
|
|
603
|
-
borderTopStyle: borderStyle,
|
|
604
|
-
borderLeftStyle: borderStyle
|
|
605
|
-
}
|
|
606
|
-
},
|
|
607
|
-
index
|
|
608
|
-
))
|
|
609
|
-
}
|
|
610
|
-
),
|
|
611
|
-
animatedBeams.map((beam) => {
|
|
612
|
-
const horizontalPosition = beam.gridLine / rows * 100;
|
|
613
|
-
const verticalPosition = beam.gridLine / cols * 100;
|
|
614
|
-
return /* @__PURE__ */ jsx5(
|
|
615
|
-
motion5.div,
|
|
616
|
-
{
|
|
617
|
-
className: cn(
|
|
618
|
-
"absolute z-20 rounded-full backdrop-blur-sm",
|
|
619
|
-
beam.color,
|
|
620
|
-
beam.direction === "horizontal" ? "h-0.5 w-6" : "h-6 w-0.5",
|
|
621
|
-
shadow
|
|
622
|
-
),
|
|
623
|
-
style: {
|
|
624
|
-
...beam.direction === "horizontal" ? {
|
|
625
|
-
// Position exactly on the horizontal grid line
|
|
626
|
-
top: `${horizontalPosition}%`,
|
|
627
|
-
left: beam.startPosition === "start" ? "-12px" : "calc(100% + 12px)",
|
|
628
|
-
transform: "translateY(-50%)"
|
|
629
|
-
// Center on the line
|
|
630
|
-
} : {
|
|
631
|
-
// Position exactly on the vertical grid line
|
|
632
|
-
left: `${verticalPosition}%`,
|
|
633
|
-
top: beam.startPosition === "start" ? "-12px" : "calc(100% + 12px)",
|
|
634
|
-
transform: "translateX(-50%)"
|
|
635
|
-
// Center on the line
|
|
636
|
-
}
|
|
637
|
-
},
|
|
638
|
-
initial: {
|
|
639
|
-
opacity: 0
|
|
640
|
-
},
|
|
641
|
-
animate: {
|
|
642
|
-
opacity: [0, 1, 1, 0],
|
|
643
|
-
...beam.direction === "horizontal" ? {
|
|
644
|
-
// Move across the full width of the container
|
|
645
|
-
x: beam.startPosition === "start" ? [0, "calc(100vw + 24px)"] : [0, "calc(-100vw - 24px)"]
|
|
646
|
-
} : {
|
|
647
|
-
// Move across the full height of the container
|
|
648
|
-
y: beam.startPosition === "start" ? [0, "calc(100vh + 24px)"] : [0, "calc(-100vh - 24px)"]
|
|
649
|
-
}
|
|
650
|
-
},
|
|
651
|
-
transition: {
|
|
652
|
-
duration: beam.duration,
|
|
653
|
-
delay: beam.delay,
|
|
654
|
-
repeat: Infinity,
|
|
655
|
-
repeatDelay: Math.random() * 3 + 2,
|
|
656
|
-
// 2-5s pause between repeats
|
|
657
|
-
ease: "linear",
|
|
658
|
-
times: [0, 0.1, 0.9, 1]
|
|
659
|
-
// Quick fade in, maintain, quick fade out
|
|
660
|
-
}
|
|
661
|
-
},
|
|
662
|
-
beam.id
|
|
663
|
-
);
|
|
664
|
-
}),
|
|
665
|
-
/* @__PURE__ */ jsx5("div", { className: "relative z-10 size-full", children })
|
|
666
|
-
]
|
|
667
|
-
}
|
|
668
|
-
);
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
// src/ui/animation/marquee.tsx
|
|
672
|
-
import React4, { useRef as useRef2 } from "react";
|
|
673
|
-
import { Fragment, jsx as jsx6 } from "react/jsx-runtime";
|
|
674
|
-
function Marquee({
|
|
675
|
-
className,
|
|
676
|
-
reverse = false,
|
|
677
|
-
pauseOnHover = false,
|
|
678
|
-
children,
|
|
679
|
-
vertical = false,
|
|
680
|
-
repeat = 4,
|
|
681
|
-
ariaLabel,
|
|
682
|
-
ariaLive = "off",
|
|
683
|
-
ariaRole = "marquee",
|
|
684
|
-
...props
|
|
685
|
-
}) {
|
|
686
|
-
const marqueeRef = useRef2(null);
|
|
687
|
-
return /* @__PURE__ */ jsx6(
|
|
688
|
-
"div",
|
|
689
|
-
{
|
|
690
|
-
...props,
|
|
691
|
-
ref: marqueeRef,
|
|
692
|
-
"data-slot": "marquee",
|
|
693
|
-
className: cn(
|
|
694
|
-
"group flex gap-(--gap) overflow-hidden p-2 [--duration:40s] [--gap:1rem]",
|
|
695
|
-
{
|
|
696
|
-
"flex-row": !vertical,
|
|
697
|
-
"flex-col": vertical
|
|
698
|
-
},
|
|
699
|
-
className
|
|
700
|
-
),
|
|
701
|
-
"aria-label": ariaLabel,
|
|
702
|
-
"aria-live": ariaLive,
|
|
703
|
-
role: ariaRole,
|
|
704
|
-
tabIndex: 0,
|
|
705
|
-
children: React4.useMemo(
|
|
706
|
-
() => /* @__PURE__ */ jsx6(Fragment, { children: Array.from({ length: repeat }, (_, i) => /* @__PURE__ */ jsx6(
|
|
707
|
-
"div",
|
|
708
|
-
{
|
|
709
|
-
className: cn(
|
|
710
|
-
!vertical ? "flex-row gap-(--gap)" : "flex-col gap-(--gap)",
|
|
711
|
-
"flex shrink-0 justify-around",
|
|
712
|
-
!vertical && "animate-marquee flex-row",
|
|
713
|
-
vertical && "animate-marquee-vertical flex-col",
|
|
714
|
-
pauseOnHover && "group-hover:paused",
|
|
715
|
-
reverse && "direction-[reverse]"
|
|
716
|
-
),
|
|
717
|
-
children
|
|
718
|
-
},
|
|
719
|
-
i
|
|
720
|
-
)) }),
|
|
721
|
-
[repeat, children, vertical, pauseOnHover, reverse]
|
|
722
|
-
)
|
|
723
|
-
}
|
|
724
|
-
);
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
// src/ui/animation/shimmering-text.tsx
|
|
728
|
-
import { useMemo as useMemo2, useRef as useRef3 } from "react";
|
|
729
|
-
import { motion as motion6, useInView as useInView3 } from "motion/react";
|
|
730
|
-
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
731
|
-
function ShimmeringText({
|
|
732
|
-
text,
|
|
733
|
-
duration = 2,
|
|
734
|
-
delay = 0,
|
|
735
|
-
repeat = true,
|
|
736
|
-
repeatDelay = 0.5,
|
|
737
|
-
className,
|
|
738
|
-
startOnView = true,
|
|
739
|
-
once = false,
|
|
740
|
-
inViewMargin,
|
|
741
|
-
spread = 2,
|
|
742
|
-
color,
|
|
743
|
-
shimmerColor
|
|
744
|
-
}) {
|
|
745
|
-
const ref = useRef3(null);
|
|
746
|
-
const isInView = useInView3(ref, { once, margin: inViewMargin });
|
|
747
|
-
const dynamicSpread = useMemo2(() => {
|
|
748
|
-
return text.length * spread;
|
|
749
|
-
}, [text, spread]);
|
|
750
|
-
const shouldAnimate = !startOnView || isInView;
|
|
751
|
-
return /* @__PURE__ */ jsx7(
|
|
752
|
-
motion6.span,
|
|
753
|
-
{
|
|
754
|
-
ref,
|
|
755
|
-
className: cn(
|
|
756
|
-
"relative inline-block bg-size-[250%_100%,auto] bg-clip-text text-transparent",
|
|
757
|
-
"[--base-color:var(--color-zinc-400)] [--shimmer-color:var(--color-zinc-950)]",
|
|
758
|
-
"[background-repeat:no-repeat,padding-box]",
|
|
759
|
-
"[--shimmer-bg:linear-gradient(90deg,transparent_calc(50%-var(--spread)),var(--shimmer-color),transparent_calc(50%+var(--spread)))]",
|
|
760
|
-
"dark:[--base-color:var(--color-zinc-600)] dark:[--shimmer-color:var(--color-white)]",
|
|
761
|
-
className
|
|
762
|
-
),
|
|
763
|
-
style: {
|
|
764
|
-
"--spread": `${dynamicSpread}px`,
|
|
765
|
-
...color && { "--base-color": color },
|
|
766
|
-
...shimmerColor && { "--shimmer-color": shimmerColor },
|
|
767
|
-
backgroundImage: `var(--shimmer-bg), linear-gradient(var(--base-color), var(--base-color))`
|
|
768
|
-
},
|
|
769
|
-
initial: {
|
|
770
|
-
backgroundPosition: "100% center",
|
|
771
|
-
opacity: 0
|
|
772
|
-
},
|
|
773
|
-
animate: shouldAnimate ? {
|
|
774
|
-
backgroundPosition: "0% center",
|
|
775
|
-
opacity: 1
|
|
776
|
-
} : {},
|
|
777
|
-
transition: {
|
|
778
|
-
backgroundPosition: {
|
|
779
|
-
repeat: repeat ? Infinity : 0,
|
|
780
|
-
duration,
|
|
781
|
-
delay,
|
|
782
|
-
repeatDelay,
|
|
783
|
-
ease: "linear"
|
|
784
|
-
},
|
|
785
|
-
opacity: {
|
|
786
|
-
duration: 0.3,
|
|
787
|
-
delay
|
|
788
|
-
}
|
|
789
|
-
},
|
|
790
|
-
children: text
|
|
791
|
-
}
|
|
792
|
-
);
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
// src/ui/animation/sliding-number.tsx
|
|
796
|
-
import { useEffect as useEffect3, useRef as useRef4, useState as useState4 } from "react";
|
|
797
|
-
import { motion as motion7, useInView as useInView4, useSpring as useSpring2, useTransform as useTransform2 } from "motion/react";
|
|
798
|
-
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
799
|
-
function Digit({
|
|
800
|
-
place,
|
|
801
|
-
value,
|
|
802
|
-
digitHeight,
|
|
803
|
-
duration
|
|
804
|
-
}) {
|
|
805
|
-
const valueRoundedToPlace = Math.floor(value / place);
|
|
806
|
-
const animatedValue = useSpring2(valueRoundedToPlace, {
|
|
807
|
-
duration: duration * 1e3
|
|
808
|
-
// Convert to milliseconds
|
|
809
|
-
});
|
|
810
|
-
useEffect3(() => {
|
|
811
|
-
animatedValue.set(valueRoundedToPlace);
|
|
812
|
-
}, [animatedValue, valueRoundedToPlace]);
|
|
813
|
-
return /* @__PURE__ */ jsx8("div", { style: { height: digitHeight }, className: "relative w-[1ch] overflow-hidden tabular-nums", children: Array.from({ length: 10 }, (_, i) => /* @__PURE__ */ jsx8(MyNumber, { mv: animatedValue, number: i, digitHeight }, i)) });
|
|
814
|
-
}
|
|
815
|
-
function MyNumber({
|
|
816
|
-
mv,
|
|
817
|
-
number,
|
|
818
|
-
digitHeight
|
|
819
|
-
}) {
|
|
820
|
-
const y = useTransform2(mv, (latest) => {
|
|
821
|
-
const placeValue = latest % 10;
|
|
822
|
-
const offset = (10 + number - placeValue) % 10;
|
|
823
|
-
let memo = offset * digitHeight;
|
|
824
|
-
if (offset > 5) {
|
|
825
|
-
memo -= 10 * digitHeight;
|
|
826
|
-
}
|
|
827
|
-
return memo;
|
|
828
|
-
});
|
|
829
|
-
return /* @__PURE__ */ jsx8(motion7.span, { style: { y }, className: "absolute inset-0 flex items-center justify-center", children: number });
|
|
830
|
-
}
|
|
831
|
-
function SlidingNumber({
|
|
832
|
-
from,
|
|
833
|
-
to,
|
|
834
|
-
duration = 2,
|
|
835
|
-
delay = 0,
|
|
836
|
-
startOnView = true,
|
|
837
|
-
once = false,
|
|
838
|
-
className = "",
|
|
839
|
-
onComplete,
|
|
840
|
-
digitHeight = 40
|
|
841
|
-
}) {
|
|
842
|
-
const ref = useRef4(null);
|
|
843
|
-
const isInView = useInView4(ref, { once: false });
|
|
844
|
-
const [currentValue, setCurrentValue] = useState4(from);
|
|
845
|
-
const [hasAnimated, setHasAnimated] = useState4(false);
|
|
846
|
-
const [animationKey, setAnimationKey] = useState4(0);
|
|
847
|
-
useEffect3(() => {
|
|
848
|
-
setCurrentValue(from);
|
|
849
|
-
setHasAnimated(false);
|
|
850
|
-
setAnimationKey((prev) => prev + 1);
|
|
851
|
-
}, [from]);
|
|
852
|
-
useEffect3(() => {
|
|
853
|
-
setCurrentValue(from);
|
|
854
|
-
setHasAnimated(false);
|
|
855
|
-
setAnimationKey((prev) => prev + 1);
|
|
856
|
-
}, [from]);
|
|
857
|
-
useEffect3(() => {
|
|
858
|
-
if (!startOnView || !isInView) return;
|
|
859
|
-
if (once && hasAnimated) return;
|
|
860
|
-
const timer = setTimeout(() => {
|
|
861
|
-
setAnimationKey((prev) => prev + 1);
|
|
862
|
-
}, 50);
|
|
863
|
-
return () => clearTimeout(timer);
|
|
864
|
-
}, [isInView, startOnView, once, hasAnimated]);
|
|
865
|
-
const shouldStart = !startOnView || isInView && (!once || !hasAnimated);
|
|
866
|
-
useEffect3(() => {
|
|
867
|
-
if (!shouldStart) return;
|
|
868
|
-
setHasAnimated(true);
|
|
869
|
-
const timer = setTimeout(() => {
|
|
870
|
-
const startTime = Date.now();
|
|
871
|
-
const startValue = currentValue;
|
|
872
|
-
const difference = to - startValue;
|
|
873
|
-
const animate2 = () => {
|
|
874
|
-
const elapsed = Date.now() - startTime;
|
|
875
|
-
const progress = Math.min(elapsed / (duration * 1e3), 1);
|
|
876
|
-
const easeOutCubic = 1 - (1 - progress) ** 3;
|
|
877
|
-
const newValue = startValue + difference * easeOutCubic;
|
|
878
|
-
setCurrentValue(newValue);
|
|
879
|
-
if (progress < 1) {
|
|
880
|
-
requestAnimationFrame(animate2);
|
|
881
|
-
} else {
|
|
882
|
-
setCurrentValue(to);
|
|
883
|
-
onComplete?.();
|
|
884
|
-
}
|
|
885
|
-
};
|
|
886
|
-
requestAnimationFrame(animate2);
|
|
887
|
-
}, delay * 1e3);
|
|
888
|
-
return () => clearTimeout(timer);
|
|
889
|
-
}, [shouldStart, currentValue, to, duration, delay, onComplete]);
|
|
890
|
-
const roundedValue = Math.round(currentValue);
|
|
891
|
-
const absValue = Math.abs(roundedValue);
|
|
892
|
-
const maxDigits = Math.max(Math.abs(from).toString().length, Math.abs(to).toString().length);
|
|
893
|
-
const places = Array.from({ length: maxDigits }, (_, i) => 10 ** (maxDigits - i - 1));
|
|
894
|
-
return /* @__PURE__ */ jsxs4("div", { ref, className: `flex items-center ${className}`, children: [
|
|
895
|
-
roundedValue < 0 && "-",
|
|
896
|
-
places.map((place) => /* @__PURE__ */ jsx8(
|
|
897
|
-
Digit,
|
|
898
|
-
{
|
|
899
|
-
place,
|
|
900
|
-
value: absValue,
|
|
901
|
-
digitHeight,
|
|
902
|
-
duration
|
|
903
|
-
},
|
|
904
|
-
`${place}-${animationKey}`
|
|
905
|
-
))
|
|
906
|
-
] });
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
// src/ui/animation/svg-text.tsx
|
|
910
|
-
import * as React5 from "react";
|
|
911
|
-
import { useEffect as useEffect4, useRef as useRef5, useState as useState5 } from "react";
|
|
912
|
-
import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
913
|
-
function SvgText({
|
|
914
|
-
svg,
|
|
915
|
-
children,
|
|
916
|
-
className = "",
|
|
917
|
-
fontSize = "20vw",
|
|
918
|
-
fontWeight = "bold",
|
|
919
|
-
as: Component = "div"
|
|
920
|
-
}) {
|
|
921
|
-
const textRef = useRef5(null);
|
|
922
|
-
const [textDimensions, setTextDimensions] = useState5({ width: 0, height: 0 });
|
|
923
|
-
const content = React5.Children.toArray(children).join("");
|
|
924
|
-
const maskId = React5.useId();
|
|
925
|
-
useEffect4(() => {
|
|
926
|
-
if (!textRef.current) return;
|
|
927
|
-
const updateDimensions = () => {
|
|
928
|
-
const rect = textRef.current?.getBoundingClientRect();
|
|
929
|
-
if (rect) {
|
|
930
|
-
setTextDimensions({
|
|
931
|
-
width: Math.max(rect.width, 200),
|
|
932
|
-
height: Math.max(rect.height, 100)
|
|
933
|
-
});
|
|
934
|
-
}
|
|
935
|
-
};
|
|
936
|
-
updateDimensions();
|
|
937
|
-
const resizeObserver = new ResizeObserver(updateDimensions);
|
|
938
|
-
resizeObserver.observe(textRef.current);
|
|
939
|
-
return () => resizeObserver.disconnect();
|
|
940
|
-
}, []);
|
|
941
|
-
return /* @__PURE__ */ jsxs5(Component, { className: cn("relative inline-block", className), children: [
|
|
942
|
-
/* @__PURE__ */ jsx9(
|
|
943
|
-
"div",
|
|
944
|
-
{
|
|
945
|
-
ref: textRef,
|
|
946
|
-
className: "pointer-events-none absolute whitespace-nowrap font-bold opacity-0",
|
|
947
|
-
style: {
|
|
948
|
-
fontSize: typeof fontSize === "number" ? `${fontSize}px` : fontSize,
|
|
949
|
-
fontWeight,
|
|
950
|
-
fontFamily: "system-ui, -apple-system, sans-serif"
|
|
951
|
-
},
|
|
952
|
-
children: content
|
|
953
|
-
}
|
|
954
|
-
),
|
|
955
|
-
/* @__PURE__ */ jsxs5(
|
|
956
|
-
"svg",
|
|
957
|
-
{
|
|
958
|
-
className: "block",
|
|
959
|
-
width: textDimensions.width,
|
|
960
|
-
height: textDimensions.height,
|
|
961
|
-
viewBox: `0 0 ${textDimensions.width} ${textDimensions.height}`,
|
|
962
|
-
style: {
|
|
963
|
-
fontSize: typeof fontSize === "number" ? `${fontSize}px` : fontSize,
|
|
964
|
-
fontWeight,
|
|
965
|
-
fontFamily: "system-ui, -apple-system, sans-serif"
|
|
966
|
-
},
|
|
967
|
-
children: [
|
|
968
|
-
/* @__PURE__ */ jsx9("defs", { children: /* @__PURE__ */ jsxs5("mask", { id: maskId, children: [
|
|
969
|
-
/* @__PURE__ */ jsx9("rect", { width: "100%", height: "100%", fill: "black" }),
|
|
970
|
-
/* @__PURE__ */ jsx9(
|
|
971
|
-
"text",
|
|
972
|
-
{
|
|
973
|
-
x: "50%",
|
|
974
|
-
y: "50%",
|
|
975
|
-
textAnchor: "middle",
|
|
976
|
-
dominantBaseline: "central",
|
|
977
|
-
fill: "white",
|
|
978
|
-
style: {
|
|
979
|
-
fontSize: typeof fontSize === "number" ? `${fontSize}px` : fontSize,
|
|
980
|
-
fontWeight,
|
|
981
|
-
fontFamily: "system-ui, -apple-system, sans-serif"
|
|
982
|
-
},
|
|
983
|
-
children: content
|
|
984
|
-
}
|
|
985
|
-
)
|
|
986
|
-
] }) }),
|
|
987
|
-
/* @__PURE__ */ jsx9("g", { mask: `url(#${maskId})`, children: /* @__PURE__ */ jsx9(
|
|
988
|
-
"foreignObject",
|
|
989
|
-
{
|
|
990
|
-
width: "100%",
|
|
991
|
-
height: "100%",
|
|
992
|
-
style: {
|
|
993
|
-
overflow: "visible"
|
|
994
|
-
},
|
|
995
|
-
children: /* @__PURE__ */ jsx9(
|
|
996
|
-
"div",
|
|
997
|
-
{
|
|
998
|
-
style: {
|
|
999
|
-
width: `${textDimensions.width}px`,
|
|
1000
|
-
height: `${textDimensions.height}px`,
|
|
1001
|
-
display: "flex",
|
|
1002
|
-
alignItems: "center",
|
|
1003
|
-
justifyContent: "center"
|
|
1004
|
-
},
|
|
1005
|
-
children: /* @__PURE__ */ jsx9(
|
|
1006
|
-
"div",
|
|
1007
|
-
{
|
|
1008
|
-
style: {
|
|
1009
|
-
width: "400px",
|
|
1010
|
-
height: "200px",
|
|
1011
|
-
transform: `scale(${Math.max(textDimensions.width / 400, textDimensions.height / 200)})`,
|
|
1012
|
-
transformOrigin: "center"
|
|
1013
|
-
},
|
|
1014
|
-
children: svg
|
|
1015
|
-
}
|
|
1016
|
-
)
|
|
1017
|
-
}
|
|
1018
|
-
)
|
|
1019
|
-
}
|
|
1020
|
-
) })
|
|
1021
|
-
]
|
|
1022
|
-
}
|
|
1023
|
-
),
|
|
1024
|
-
/* @__PURE__ */ jsx9("span", { className: "sr-only", children: content })
|
|
1025
|
-
] });
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
// src/ui/animation/text-reveal.tsx
|
|
1029
|
-
import { useEffect as useEffect5, useRef as useRef6, useState as useState6 } from "react";
|
|
1030
|
-
import { motion as motion8, useInView as useInView5 } from "motion/react";
|
|
1031
|
-
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1032
|
-
var containerVariants = {
|
|
1033
|
-
fade: {
|
|
1034
|
-
hidden: {},
|
|
1035
|
-
visible: {
|
|
1036
|
-
transition: { staggerChildren: 0.02 }
|
|
1037
|
-
}
|
|
1038
|
-
},
|
|
1039
|
-
slideUp: {
|
|
1040
|
-
hidden: {},
|
|
1041
|
-
visible: {
|
|
1042
|
-
transition: { staggerChildren: 0.04 }
|
|
1043
|
-
}
|
|
1044
|
-
},
|
|
1045
|
-
slideDown: {
|
|
1046
|
-
hidden: {},
|
|
1047
|
-
visible: {
|
|
1048
|
-
transition: { staggerChildren: 0.04 }
|
|
1049
|
-
}
|
|
1050
|
-
},
|
|
1051
|
-
slideLeft: {
|
|
1052
|
-
hidden: {},
|
|
1053
|
-
visible: {
|
|
1054
|
-
transition: { staggerChildren: 0.04 }
|
|
1055
|
-
}
|
|
1056
|
-
},
|
|
1057
|
-
slideRight: {
|
|
1058
|
-
hidden: {},
|
|
1059
|
-
visible: {
|
|
1060
|
-
transition: { staggerChildren: 0.04 }
|
|
1061
|
-
}
|
|
1062
|
-
},
|
|
1063
|
-
scale: {
|
|
1064
|
-
hidden: {},
|
|
1065
|
-
visible: {
|
|
1066
|
-
transition: { staggerChildren: 0.06 }
|
|
1067
|
-
}
|
|
1068
|
-
},
|
|
1069
|
-
blur: {
|
|
1070
|
-
hidden: {},
|
|
1071
|
-
visible: {
|
|
1072
|
-
transition: { staggerChildren: 0.03 }
|
|
1073
|
-
}
|
|
1074
|
-
},
|
|
1075
|
-
typewriter: {
|
|
1076
|
-
hidden: {},
|
|
1077
|
-
visible: {
|
|
1078
|
-
transition: { staggerChildren: 0.15 }
|
|
1079
|
-
}
|
|
1080
|
-
},
|
|
1081
|
-
wave: {
|
|
1082
|
-
hidden: {},
|
|
1083
|
-
visible: {
|
|
1084
|
-
transition: { staggerChildren: 0.12 }
|
|
1085
|
-
}
|
|
1086
|
-
},
|
|
1087
|
-
stagger: {
|
|
1088
|
-
hidden: {},
|
|
1089
|
-
visible: {
|
|
1090
|
-
transition: { staggerChildren: 0.08 }
|
|
1091
|
-
}
|
|
1092
|
-
},
|
|
1093
|
-
rotate: {
|
|
1094
|
-
hidden: {},
|
|
1095
|
-
visible: {
|
|
1096
|
-
transition: { staggerChildren: 0.05 }
|
|
1097
|
-
}
|
|
1098
|
-
},
|
|
1099
|
-
elastic: {
|
|
1100
|
-
hidden: {},
|
|
1101
|
-
visible: {
|
|
1102
|
-
transition: { staggerChildren: 0.07 }
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
};
|
|
1106
|
-
var itemVariants = {
|
|
1107
|
-
fade: {
|
|
1108
|
-
hidden: { opacity: 0 },
|
|
1109
|
-
visible: {
|
|
1110
|
-
opacity: 1,
|
|
1111
|
-
transition: { duration: 0.6, ease: "easeOut" }
|
|
1112
|
-
}
|
|
1113
|
-
},
|
|
1114
|
-
slideUp: {
|
|
1115
|
-
hidden: { opacity: 0, y: 50, scale: 0.95 },
|
|
1116
|
-
visible: {
|
|
1117
|
-
opacity: 1,
|
|
1118
|
-
y: 0,
|
|
1119
|
-
scale: 1,
|
|
1120
|
-
transition: { duration: 0.7, ease: [0.22, 1, 0.36, 1] }
|
|
1121
|
-
}
|
|
1122
|
-
},
|
|
1123
|
-
slideDown: {
|
|
1124
|
-
hidden: { opacity: 0, y: -30, scale: 0.98 },
|
|
1125
|
-
visible: {
|
|
1126
|
-
opacity: 1,
|
|
1127
|
-
y: 0,
|
|
1128
|
-
scale: 1,
|
|
1129
|
-
transition: { duration: 0.5, ease: [0.25, 0.46, 0.45, 0.94] }
|
|
1130
|
-
}
|
|
1131
|
-
},
|
|
1132
|
-
slideLeft: {
|
|
1133
|
-
hidden: { opacity: 0, x: 60, rotateY: 15 },
|
|
1134
|
-
visible: {
|
|
1135
|
-
opacity: 1,
|
|
1136
|
-
x: 0,
|
|
1137
|
-
rotateY: 0,
|
|
1138
|
-
transition: { duration: 0.65, ease: [0.16, 1, 0.3, 1] }
|
|
1139
|
-
}
|
|
1140
|
-
},
|
|
1141
|
-
slideRight: {
|
|
1142
|
-
hidden: { opacity: 0, x: -60, rotateY: -15 },
|
|
1143
|
-
visible: {
|
|
1144
|
-
opacity: 1,
|
|
1145
|
-
x: 0,
|
|
1146
|
-
rotateY: 0,
|
|
1147
|
-
transition: { duration: 0.65, ease: [0.16, 1, 0.3, 1] }
|
|
1148
|
-
}
|
|
1149
|
-
},
|
|
1150
|
-
scale: {
|
|
1151
|
-
hidden: { opacity: 0, scale: 0.8 },
|
|
1152
|
-
visible: {
|
|
1153
|
-
opacity: 1,
|
|
1154
|
-
scale: 1,
|
|
1155
|
-
transition: { duration: 0.4, ease: [0.34, 1.56, 0.64, 1] }
|
|
1156
|
-
}
|
|
1157
|
-
},
|
|
1158
|
-
blur: {
|
|
1159
|
-
hidden: { opacity: 0, filter: "blur(4px)" },
|
|
1160
|
-
visible: {
|
|
1161
|
-
opacity: 1,
|
|
1162
|
-
filter: "blur(0px)",
|
|
1163
|
-
transition: { duration: 0.6, ease: "easeOut" }
|
|
1164
|
-
}
|
|
1165
|
-
},
|
|
1166
|
-
typewriter: {
|
|
1167
|
-
hidden: { width: 0 },
|
|
1168
|
-
visible: {
|
|
1169
|
-
width: "auto",
|
|
1170
|
-
transition: { duration: 0.3, ease: "easeInOut" }
|
|
1171
|
-
}
|
|
1172
|
-
},
|
|
1173
|
-
wave: {
|
|
1174
|
-
hidden: { opacity: 0, y: 20, rotateZ: -5 },
|
|
1175
|
-
visible: {
|
|
1176
|
-
opacity: 1,
|
|
1177
|
-
y: [20, -10, 0],
|
|
1178
|
-
rotateZ: [-5, 5, 0],
|
|
1179
|
-
transition: {
|
|
1180
|
-
duration: 0.8,
|
|
1181
|
-
ease: [0.34, 1.56, 0.64, 1],
|
|
1182
|
-
times: [0, 0.5, 1]
|
|
1183
|
-
}
|
|
1184
|
-
}
|
|
1185
|
-
},
|
|
1186
|
-
stagger: {
|
|
1187
|
-
hidden: { opacity: 0, y: 30, scale: 0.9 },
|
|
1188
|
-
visible: {
|
|
1189
|
-
opacity: 1,
|
|
1190
|
-
y: 0,
|
|
1191
|
-
scale: 1,
|
|
1192
|
-
transition: { duration: 0.6, ease: [0.25, 0.46, 0.45, 0.94] }
|
|
1193
|
-
}
|
|
1194
|
-
},
|
|
1195
|
-
rotate: {
|
|
1196
|
-
hidden: { opacity: 0, rotateY: -90 },
|
|
1197
|
-
visible: {
|
|
1198
|
-
opacity: 1,
|
|
1199
|
-
rotateY: 0,
|
|
1200
|
-
transition: { duration: 0.6, ease: [0.25, 0.46, 0.45, 0.94] }
|
|
1201
|
-
}
|
|
1202
|
-
},
|
|
1203
|
-
elastic: {
|
|
1204
|
-
hidden: { opacity: 0, scale: 0 },
|
|
1205
|
-
visible: {
|
|
1206
|
-
opacity: 1,
|
|
1207
|
-
scale: [0, 1.2, 1],
|
|
1208
|
-
transition: {
|
|
1209
|
-
duration: 0.8,
|
|
1210
|
-
ease: [0.68, -0.55, 0.265, 1.55],
|
|
1211
|
-
times: [0, 0.6, 1]
|
|
1212
|
-
}
|
|
1213
|
-
}
|
|
1214
|
-
}
|
|
1215
|
-
};
|
|
1216
|
-
function TextReveal({
|
|
1217
|
-
children,
|
|
1218
|
-
variant = "fade",
|
|
1219
|
-
className,
|
|
1220
|
-
style,
|
|
1221
|
-
delay = 0,
|
|
1222
|
-
duration = 0.6,
|
|
1223
|
-
staggerDelay = 0.03,
|
|
1224
|
-
once = true,
|
|
1225
|
-
startOnView = true,
|
|
1226
|
-
wordLevel = false
|
|
1227
|
-
}) {
|
|
1228
|
-
const ref = useRef6(null);
|
|
1229
|
-
const isInView = useInView5(ref, { once, margin: "-10%" });
|
|
1230
|
-
const [hasAnimated, setHasAnimated] = useState6(false);
|
|
1231
|
-
const shouldAnimate = startOnView ? isInView : true;
|
|
1232
|
-
const elements = wordLevel ? children.split(" ").map((word, i, arr) => i < arr.length - 1 ? `${word} ` : word) : children.split("");
|
|
1233
|
-
const customContainerVariants = {
|
|
1234
|
-
...containerVariants[variant],
|
|
1235
|
-
visible: {
|
|
1236
|
-
transition: {
|
|
1237
|
-
staggerChildren: staggerDelay,
|
|
1238
|
-
delayChildren: delay
|
|
1239
|
-
}
|
|
1240
|
-
}
|
|
1241
|
-
};
|
|
1242
|
-
const originalVariant = itemVariants[variant];
|
|
1243
|
-
const customItemVariants = duration === 0.6 ? originalVariant : {
|
|
1244
|
-
hidden: originalVariant.hidden,
|
|
1245
|
-
visible: {
|
|
1246
|
-
...originalVariant.visible,
|
|
1247
|
-
transition: {
|
|
1248
|
-
...originalVariant.visible.transition,
|
|
1249
|
-
duration
|
|
1250
|
-
}
|
|
1251
|
-
}
|
|
1252
|
-
};
|
|
1253
|
-
useEffect5(() => {
|
|
1254
|
-
if (shouldAnimate && !hasAnimated) {
|
|
1255
|
-
setHasAnimated(true);
|
|
1256
|
-
}
|
|
1257
|
-
}, [shouldAnimate, hasAnimated]);
|
|
1258
|
-
const MotionComponent = variant === "typewriter" ? motion8.div : motion8.span;
|
|
1259
|
-
return /* @__PURE__ */ jsx10(
|
|
1260
|
-
motion8.div,
|
|
1261
|
-
{
|
|
1262
|
-
ref,
|
|
1263
|
-
className: cn("inline-block", className),
|
|
1264
|
-
variants: customContainerVariants,
|
|
1265
|
-
initial: "hidden",
|
|
1266
|
-
animate: shouldAnimate ? "visible" : "hidden",
|
|
1267
|
-
style: {
|
|
1268
|
-
willChange: "transform, opacity",
|
|
1269
|
-
WebkitBackfaceVisibility: "hidden",
|
|
1270
|
-
backfaceVisibility: "hidden",
|
|
1271
|
-
WebkitTransform: "translate3d(0,0,0)",
|
|
1272
|
-
transform: "translate3d(0,0,0)",
|
|
1273
|
-
isolation: "isolate",
|
|
1274
|
-
contain: "layout style paint",
|
|
1275
|
-
...style
|
|
1276
|
-
},
|
|
1277
|
-
children: variant === "typewriter" ? /* @__PURE__ */ jsx10(
|
|
1278
|
-
motion8.span,
|
|
1279
|
-
{
|
|
1280
|
-
className: "inline-block overflow-hidden whitespace-nowrap",
|
|
1281
|
-
variants: customItemVariants,
|
|
1282
|
-
style: {
|
|
1283
|
-
display: "inline-block",
|
|
1284
|
-
whiteSpace: "nowrap"
|
|
1285
|
-
},
|
|
1286
|
-
children
|
|
1287
|
-
}
|
|
1288
|
-
) : elements.map((element, index) => /* @__PURE__ */ jsx10(
|
|
1289
|
-
MotionComponent,
|
|
1290
|
-
{
|
|
1291
|
-
className: cn("inline-block", {
|
|
1292
|
-
"whitespace-pre": !wordLevel
|
|
1293
|
-
}),
|
|
1294
|
-
variants: customItemVariants,
|
|
1295
|
-
style: {
|
|
1296
|
-
display: "inline-block",
|
|
1297
|
-
transformOrigin: variant === "rotate" ? "center center" : void 0,
|
|
1298
|
-
willChange: "transform, opacity",
|
|
1299
|
-
WebkitBackfaceVisibility: "hidden",
|
|
1300
|
-
backfaceVisibility: "hidden",
|
|
1301
|
-
WebkitTransform: "translate3d(0,0,0)",
|
|
1302
|
-
transform: "translate3d(0,0,0)",
|
|
1303
|
-
isolation: "isolate"
|
|
1304
|
-
},
|
|
1305
|
-
children: element === " " ? "\xA0" : element
|
|
1306
|
-
},
|
|
1307
|
-
index
|
|
1308
|
-
))
|
|
1309
|
-
}
|
|
1310
|
-
);
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1313
|
-
// src/ui/animation/typing-text.tsx
|
|
1314
|
-
import { useEffect as useEffect6, useRef as useRef7, useState as useState7 } from "react";
|
|
1315
|
-
import {
|
|
1316
|
-
motion as motion9,
|
|
1317
|
-
useInView as useInView6
|
|
1318
|
-
} from "motion/react";
|
|
1319
|
-
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1320
|
-
var cursorVariants = {
|
|
1321
|
-
blinking: {
|
|
1322
|
-
opacity: [0, 0, 1, 1],
|
|
1323
|
-
transition: {
|
|
1324
|
-
duration: 1,
|
|
1325
|
-
repeat: Infinity,
|
|
1326
|
-
repeatDelay: 0,
|
|
1327
|
-
ease: "linear",
|
|
1328
|
-
times: [0, 0.5, 0.5, 1]
|
|
1329
|
-
}
|
|
1330
|
-
}
|
|
1331
|
-
};
|
|
1332
|
-
function TypingText({
|
|
1333
|
-
text,
|
|
1334
|
-
texts,
|
|
1335
|
-
speed = 100,
|
|
1336
|
-
delay = 0,
|
|
1337
|
-
showCursor = true,
|
|
1338
|
-
cursorClassName = "",
|
|
1339
|
-
cursor = "|",
|
|
1340
|
-
loop = false,
|
|
1341
|
-
pauseDuration = 2e3,
|
|
1342
|
-
className,
|
|
1343
|
-
onComplete,
|
|
1344
|
-
startOnView = true,
|
|
1345
|
-
once = false,
|
|
1346
|
-
inViewMargin,
|
|
1347
|
-
...props
|
|
1348
|
-
}) {
|
|
1349
|
-
const ref = useRef7(null);
|
|
1350
|
-
const isInView = useInView6(ref, {
|
|
1351
|
-
once,
|
|
1352
|
-
margin: inViewMargin
|
|
1353
|
-
});
|
|
1354
|
-
const [hasAnimated, setHasAnimated] = useState7(false);
|
|
1355
|
-
const [displayText, setDisplayText] = useState7("");
|
|
1356
|
-
const [currentIndex, setCurrentIndex] = useState7(0);
|
|
1357
|
-
const [isTyping, setIsTyping] = useState7(false);
|
|
1358
|
-
const [currentTextIndex, setCurrentTextIndex] = useState7(0);
|
|
1359
|
-
const shouldStart = !startOnView || isInView && (!once || !hasAnimated);
|
|
1360
|
-
const textArray = texts && texts.length > 0 ? texts : [text];
|
|
1361
|
-
const currentText = textArray[currentTextIndex] ?? "";
|
|
1362
|
-
useEffect6(() => {
|
|
1363
|
-
if (!shouldStart) return;
|
|
1364
|
-
const timeout = setTimeout(() => {
|
|
1365
|
-
setIsTyping(true);
|
|
1366
|
-
setHasAnimated(true);
|
|
1367
|
-
}, delay);
|
|
1368
|
-
return () => clearTimeout(timeout);
|
|
1369
|
-
}, [delay, shouldStart]);
|
|
1370
|
-
useEffect6(() => {
|
|
1371
|
-
if (!isTyping) return;
|
|
1372
|
-
if (currentIndex < currentText.length) {
|
|
1373
|
-
const timeout = setTimeout(() => {
|
|
1374
|
-
setDisplayText(currentText.slice(0, currentIndex + 1));
|
|
1375
|
-
setCurrentIndex(currentIndex + 1);
|
|
1376
|
-
}, speed);
|
|
1377
|
-
return () => clearTimeout(timeout);
|
|
1378
|
-
} else {
|
|
1379
|
-
onComplete?.();
|
|
1380
|
-
if (loop && texts && texts.length > 1) {
|
|
1381
|
-
const timeout = setTimeout(() => {
|
|
1382
|
-
setDisplayText("");
|
|
1383
|
-
setCurrentIndex(0);
|
|
1384
|
-
setCurrentTextIndex((prev) => (prev + 1) % texts.length);
|
|
1385
|
-
}, pauseDuration);
|
|
1386
|
-
return () => clearTimeout(timeout);
|
|
1387
|
-
}
|
|
1388
|
-
}
|
|
1389
|
-
}, [currentIndex, currentText, isTyping, speed, loop, texts, pauseDuration, onComplete]);
|
|
1390
|
-
const finalVariants = {
|
|
1391
|
-
container: {
|
|
1392
|
-
hidden: { opacity: 0, y: 10 },
|
|
1393
|
-
show: { opacity: 1, y: 0, transition: { staggerChildren: 0.02 } },
|
|
1394
|
-
exit: { opacity: 0 }
|
|
1395
|
-
}
|
|
1396
|
-
};
|
|
1397
|
-
const MotionComponent = motion9.span;
|
|
1398
|
-
return /* @__PURE__ */ jsx11(
|
|
1399
|
-
MotionComponent,
|
|
1400
|
-
{
|
|
1401
|
-
ref,
|
|
1402
|
-
variants: finalVariants.container,
|
|
1403
|
-
initial: "hidden",
|
|
1404
|
-
whileInView: startOnView ? "show" : void 0,
|
|
1405
|
-
animate: startOnView ? void 0 : "show",
|
|
1406
|
-
exit: "exit",
|
|
1407
|
-
className: cn("whitespace-pre-wrap", className),
|
|
1408
|
-
viewport: { once },
|
|
1409
|
-
...props,
|
|
1410
|
-
children: /* @__PURE__ */ jsxs6("span", { style: { display: "inline-flex", alignItems: "center" }, children: [
|
|
1411
|
-
displayText,
|
|
1412
|
-
showCursor && /* @__PURE__ */ jsx11(
|
|
1413
|
-
motion9.span,
|
|
1414
|
-
{
|
|
1415
|
-
variants: cursorVariants,
|
|
1416
|
-
animate: "blinking",
|
|
1417
|
-
className: cn(
|
|
1418
|
-
"ms-1 inline-block w-px select-none font-normal text-foreground",
|
|
1419
|
-
cursorClassName
|
|
1420
|
-
),
|
|
1421
|
-
children: cursor
|
|
1422
|
-
}
|
|
1423
|
-
)
|
|
1424
|
-
] })
|
|
1425
|
-
}
|
|
1426
|
-
);
|
|
1427
|
-
}
|
|
1428
|
-
|
|
1429
|
-
// src/ui/animation/video-text.tsx
|
|
1430
|
-
import * as React6 from "react";
|
|
1431
|
-
import { useEffect as useEffect7, useRef as useRef8 } from "react";
|
|
1432
|
-
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1433
|
-
function VideoText({
|
|
1434
|
-
src,
|
|
1435
|
-
children,
|
|
1436
|
-
className = "",
|
|
1437
|
-
autoPlay = true,
|
|
1438
|
-
muted = true,
|
|
1439
|
-
loop = true,
|
|
1440
|
-
preload = "auto",
|
|
1441
|
-
fontSize = "20vw",
|
|
1442
|
-
fontWeight = "bold",
|
|
1443
|
-
as: Component = "div",
|
|
1444
|
-
onPlay,
|
|
1445
|
-
onPause,
|
|
1446
|
-
onEnded
|
|
1447
|
-
}) {
|
|
1448
|
-
const videoRef = useRef8(null);
|
|
1449
|
-
const canvasRef = useRef8(null);
|
|
1450
|
-
const textRef = useRef8(null);
|
|
1451
|
-
const containerRef = useRef8(null);
|
|
1452
|
-
useEffect7(() => {
|
|
1453
|
-
const video = videoRef.current;
|
|
1454
|
-
const canvas = canvasRef.current;
|
|
1455
|
-
const textElement = textRef.current;
|
|
1456
|
-
const container = containerRef.current;
|
|
1457
|
-
if (!video || !canvas || !textElement || !container) return;
|
|
1458
|
-
const ctx = canvas.getContext("2d");
|
|
1459
|
-
if (!ctx) return;
|
|
1460
|
-
let animationId;
|
|
1461
|
-
const updateCanvas = () => {
|
|
1462
|
-
const text = textElement.textContent || "";
|
|
1463
|
-
ctx.font = `${fontWeight} ${typeof fontSize === "number" ? `${fontSize}px` : fontSize} system-ui, -apple-system, sans-serif`;
|
|
1464
|
-
const textMetrics = ctx.measureText(text);
|
|
1465
|
-
const textWidth = textMetrics.width;
|
|
1466
|
-
const textHeight = typeof fontSize === "number" ? fontSize : parseFloat(fontSize.replace(/[^\d.]/g, "")) || 100;
|
|
1467
|
-
const padding = 40;
|
|
1468
|
-
canvas.width = Math.max(textWidth + padding * 2, 400);
|
|
1469
|
-
canvas.height = Math.max(textHeight + padding * 2, 200);
|
|
1470
|
-
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
1471
|
-
ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
|
|
1472
|
-
ctx.globalCompositeOperation = "destination-in";
|
|
1473
|
-
ctx.fillStyle = "white";
|
|
1474
|
-
ctx.font = `${fontWeight} ${typeof fontSize === "number" ? `${fontSize}px` : fontSize} system-ui, -apple-system, sans-serif`;
|
|
1475
|
-
ctx.textAlign = "center";
|
|
1476
|
-
ctx.textBaseline = "middle";
|
|
1477
|
-
ctx.fillText(text, canvas.width / 2, canvas.height / 2);
|
|
1478
|
-
ctx.globalCompositeOperation = "source-over";
|
|
1479
|
-
animationId = requestAnimationFrame(updateCanvas);
|
|
1480
|
-
};
|
|
1481
|
-
const handleVideoLoad = () => {
|
|
1482
|
-
updateCanvas();
|
|
1483
|
-
};
|
|
1484
|
-
const handleResize = () => {
|
|
1485
|
-
updateCanvas();
|
|
1486
|
-
};
|
|
1487
|
-
video.addEventListener("loadeddata", handleVideoLoad);
|
|
1488
|
-
video.addEventListener("play", updateCanvas);
|
|
1489
|
-
window.addEventListener("resize", handleResize);
|
|
1490
|
-
return () => {
|
|
1491
|
-
video.removeEventListener("loadeddata", handleVideoLoad);
|
|
1492
|
-
video.removeEventListener("play", updateCanvas);
|
|
1493
|
-
window.removeEventListener("resize", handleResize);
|
|
1494
|
-
if (animationId) {
|
|
1495
|
-
cancelAnimationFrame(animationId);
|
|
1496
|
-
}
|
|
1497
|
-
};
|
|
1498
|
-
}, [fontSize, fontWeight]);
|
|
1499
|
-
const sources = Array.isArray(src) ? src : [src];
|
|
1500
|
-
const content = React6.Children.toArray(children).join("");
|
|
1501
|
-
return /* @__PURE__ */ jsxs7(
|
|
1502
|
-
Component,
|
|
1503
|
-
{
|
|
1504
|
-
ref: containerRef,
|
|
1505
|
-
className: cn("relative inline-block overflow-hidden", className),
|
|
1506
|
-
children: [
|
|
1507
|
-
/* @__PURE__ */ jsxs7(
|
|
1508
|
-
"video",
|
|
1509
|
-
{
|
|
1510
|
-
ref: videoRef,
|
|
1511
|
-
className: "pointer-events-none absolute opacity-0",
|
|
1512
|
-
autoPlay,
|
|
1513
|
-
muted,
|
|
1514
|
-
loop,
|
|
1515
|
-
preload,
|
|
1516
|
-
playsInline: true,
|
|
1517
|
-
onPlay,
|
|
1518
|
-
onPause,
|
|
1519
|
-
onEnded,
|
|
1520
|
-
crossOrigin: "anonymous",
|
|
1521
|
-
children: [
|
|
1522
|
-
sources.map((source, index) => /* @__PURE__ */ jsx12("source", { src: source }, index)),
|
|
1523
|
-
"Your browser does not support the video tag."
|
|
1524
|
-
]
|
|
1525
|
-
}
|
|
1526
|
-
),
|
|
1527
|
-
/* @__PURE__ */ jsx12(
|
|
1528
|
-
"canvas",
|
|
1529
|
-
{
|
|
1530
|
-
ref: canvasRef,
|
|
1531
|
-
className: "block",
|
|
1532
|
-
style: {
|
|
1533
|
-
width: "100%",
|
|
1534
|
-
height: "auto"
|
|
1535
|
-
}
|
|
1536
|
-
}
|
|
1537
|
-
),
|
|
1538
|
-
/* @__PURE__ */ jsx12(
|
|
1539
|
-
"div",
|
|
1540
|
-
{
|
|
1541
|
-
ref: textRef,
|
|
1542
|
-
className: "pointer-events-none absolute font-bold opacity-0",
|
|
1543
|
-
style: {
|
|
1544
|
-
fontSize: typeof fontSize === "number" ? `${fontSize}px` : fontSize,
|
|
1545
|
-
fontWeight
|
|
1546
|
-
},
|
|
1547
|
-
"aria-label": content,
|
|
1548
|
-
children
|
|
1549
|
-
}
|
|
1550
|
-
),
|
|
1551
|
-
/* @__PURE__ */ jsx12("span", { className: "sr-only", children: content })
|
|
1552
|
-
]
|
|
1553
|
-
}
|
|
1554
|
-
);
|
|
1555
|
-
}
|
|
1556
|
-
|
|
1557
|
-
// src/ui/animation/word-rotate.tsx
|
|
1558
|
-
import { useEffect as useEffect8, useRef as useRef9, useState as useState8 } from "react";
|
|
1559
|
-
import {
|
|
1560
|
-
motion as motion10,
|
|
1561
|
-
useInView as useInView7
|
|
1562
|
-
} from "motion/react";
|
|
1563
|
-
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1564
|
-
function WordRotate({
|
|
1565
|
-
words,
|
|
1566
|
-
duration = 1500,
|
|
1567
|
-
animationStyle = "fade",
|
|
1568
|
-
loop = true,
|
|
1569
|
-
className,
|
|
1570
|
-
containerClassName,
|
|
1571
|
-
pauseDuration = 300,
|
|
1572
|
-
startOnView = true,
|
|
1573
|
-
once = false,
|
|
1574
|
-
inViewMargin,
|
|
1575
|
-
...props
|
|
1576
|
-
}) {
|
|
1577
|
-
const ref = useRef9(null);
|
|
1578
|
-
const isInView = useInView7(ref, {
|
|
1579
|
-
once,
|
|
1580
|
-
margin: inViewMargin
|
|
1581
|
-
});
|
|
1582
|
-
const [hasAnimated, setHasAnimated] = useState8(false);
|
|
1583
|
-
const [currentWord, setCurrentWord] = useState8(0);
|
|
1584
|
-
const [show, setShow] = useState8(true);
|
|
1585
|
-
const variants = {
|
|
1586
|
-
fade: {
|
|
1587
|
-
initial: { opacity: 0 },
|
|
1588
|
-
animate: {
|
|
1589
|
-
opacity: 1,
|
|
1590
|
-
transition: {
|
|
1591
|
-
duration: 0.4,
|
|
1592
|
-
ease: [0.4, 0, 0.2, 1]
|
|
1593
|
-
// Custom cubic-bezier for smooth fade
|
|
1594
|
-
}
|
|
1595
|
-
},
|
|
1596
|
-
exit: {
|
|
1597
|
-
opacity: 0,
|
|
1598
|
-
transition: {
|
|
1599
|
-
duration: 0.3,
|
|
1600
|
-
ease: [0.4, 0, 1, 1]
|
|
1601
|
-
// Faster exit
|
|
1602
|
-
}
|
|
1603
|
-
}
|
|
1604
|
-
},
|
|
1605
|
-
"slide-up": {
|
|
1606
|
-
initial: { opacity: 0, y: 24 },
|
|
1607
|
-
animate: {
|
|
1608
|
-
opacity: 1,
|
|
1609
|
-
y: 0,
|
|
1610
|
-
transition: {
|
|
1611
|
-
type: "spring",
|
|
1612
|
-
stiffness: 300,
|
|
1613
|
-
damping: 25,
|
|
1614
|
-
mass: 0.8
|
|
1615
|
-
}
|
|
1616
|
-
},
|
|
1617
|
-
exit: {
|
|
1618
|
-
opacity: 0,
|
|
1619
|
-
y: -24,
|
|
1620
|
-
transition: {
|
|
1621
|
-
duration: 0.25,
|
|
1622
|
-
ease: [0.4, 0, 1, 1]
|
|
1623
|
-
}
|
|
1624
|
-
}
|
|
1625
|
-
},
|
|
1626
|
-
"slide-down": {
|
|
1627
|
-
initial: { opacity: 0, y: -24 },
|
|
1628
|
-
animate: {
|
|
1629
|
-
opacity: 1,
|
|
1630
|
-
y: 0,
|
|
1631
|
-
transition: {
|
|
1632
|
-
type: "spring",
|
|
1633
|
-
stiffness: 300,
|
|
1634
|
-
damping: 25,
|
|
1635
|
-
mass: 0.8
|
|
1636
|
-
}
|
|
1637
|
-
},
|
|
1638
|
-
exit: {
|
|
1639
|
-
opacity: 0,
|
|
1640
|
-
y: 24,
|
|
1641
|
-
transition: {
|
|
1642
|
-
duration: 0.25,
|
|
1643
|
-
ease: [0.4, 0, 1, 1]
|
|
1644
|
-
}
|
|
1645
|
-
}
|
|
1646
|
-
},
|
|
1647
|
-
scale: {
|
|
1648
|
-
initial: { opacity: 0, scale: 0.8 },
|
|
1649
|
-
animate: {
|
|
1650
|
-
opacity: 1,
|
|
1651
|
-
scale: 1,
|
|
1652
|
-
transition: {
|
|
1653
|
-
type: "spring",
|
|
1654
|
-
stiffness: 400,
|
|
1655
|
-
damping: 30,
|
|
1656
|
-
mass: 0.6
|
|
1657
|
-
}
|
|
1658
|
-
},
|
|
1659
|
-
exit: {
|
|
1660
|
-
opacity: 0,
|
|
1661
|
-
scale: 0.9,
|
|
1662
|
-
transition: {
|
|
1663
|
-
duration: 0.2,
|
|
1664
|
-
ease: [0.4, 0, 1, 1]
|
|
1665
|
-
}
|
|
1666
|
-
}
|
|
1667
|
-
},
|
|
1668
|
-
flip: {
|
|
1669
|
-
initial: { opacity: 0, rotateX: 90 },
|
|
1670
|
-
animate: {
|
|
1671
|
-
opacity: 1,
|
|
1672
|
-
rotateX: 0,
|
|
1673
|
-
transition: {
|
|
1674
|
-
type: "spring",
|
|
1675
|
-
stiffness: 200,
|
|
1676
|
-
damping: 20,
|
|
1677
|
-
mass: 1
|
|
1678
|
-
}
|
|
1679
|
-
},
|
|
1680
|
-
exit: {
|
|
1681
|
-
opacity: 0,
|
|
1682
|
-
rotateX: -90,
|
|
1683
|
-
transition: {
|
|
1684
|
-
duration: 0.3,
|
|
1685
|
-
ease: [0.4, 0, 1, 1]
|
|
1686
|
-
}
|
|
1687
|
-
}
|
|
1688
|
-
}
|
|
1689
|
-
};
|
|
1690
|
-
const shouldStart = !startOnView || isInView && (!once || !hasAnimated);
|
|
1691
|
-
useEffect8(() => {
|
|
1692
|
-
if (!shouldStart) return;
|
|
1693
|
-
setHasAnimated(true);
|
|
1694
|
-
const interval = setInterval(() => {
|
|
1695
|
-
setShow(false);
|
|
1696
|
-
setTimeout(() => {
|
|
1697
|
-
setCurrentWord((prev) => {
|
|
1698
|
-
if (loop) {
|
|
1699
|
-
return (prev + 1) % words.length;
|
|
1700
|
-
} else {
|
|
1701
|
-
return prev < words.length - 1 ? prev + 1 : prev;
|
|
1702
|
-
}
|
|
1703
|
-
});
|
|
1704
|
-
setShow(true);
|
|
1705
|
-
}, pauseDuration);
|
|
1706
|
-
}, duration + pauseDuration);
|
|
1707
|
-
return () => clearInterval(interval);
|
|
1708
|
-
}, [shouldStart, duration, pauseDuration, words.length, loop]);
|
|
1709
|
-
return /* @__PURE__ */ jsx13(
|
|
1710
|
-
motion10.span,
|
|
1711
|
-
{
|
|
1712
|
-
ref,
|
|
1713
|
-
className: cn("inline-block overflow-hidden", containerClassName),
|
|
1714
|
-
...props,
|
|
1715
|
-
children: /* @__PURE__ */ jsx13(
|
|
1716
|
-
motion10.span,
|
|
1717
|
-
{
|
|
1718
|
-
initial: "initial",
|
|
1719
|
-
animate: show ? "animate" : "exit",
|
|
1720
|
-
exit: "exit",
|
|
1721
|
-
variants: variants[animationStyle],
|
|
1722
|
-
transition: { duration: 0.5 },
|
|
1723
|
-
style: {
|
|
1724
|
-
perspective: animationStyle === "flip" ? 1e3 : void 0
|
|
1725
|
-
},
|
|
1726
|
-
className: cn("inline-block overflow-hidden", className),
|
|
1727
|
-
children: words[currentWord]
|
|
1728
|
-
},
|
|
1729
|
-
currentWord
|
|
1730
|
-
)
|
|
1731
|
-
}
|
|
1732
|
-
);
|
|
1733
|
-
}
|
|
1734
|
-
export {
|
|
1735
|
-
AvatarGroup,
|
|
1736
|
-
AvatarGroupItem,
|
|
1737
|
-
AvatarGroupTooltip,
|
|
1738
|
-
CountingNumber,
|
|
1739
|
-
GithubButton,
|
|
1740
|
-
GradientBackground,
|
|
1741
|
-
GridBackground,
|
|
1742
|
-
HoverBackground,
|
|
1743
|
-
Marquee,
|
|
1744
|
-
ShimmeringText,
|
|
1745
|
-
SlidingNumber,
|
|
1746
|
-
SvgText,
|
|
1747
|
-
TextReveal,
|
|
1748
|
-
TypingText,
|
|
1749
|
-
VideoText,
|
|
1750
|
-
WordRotate,
|
|
1751
|
-
githubButtonVariants
|
|
1752
|
-
};
|
|
1
|
+
// src/animation.ts
|
|
2
|
+
export * from "@pelatform/ui.animation";
|