@design-llm/motion 1.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/README.md +54 -0
- package/dist/index.cjs +9 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +1155 -0
- package/dist/index.js.map +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +71 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1155 @@
|
|
|
1
|
+
import Ye, { useState as Oe, useRef as he, useEffect as De, useMemo as me } from "react";
|
|
2
|
+
import { motion as X, useAnimation as He, useMotionValue as Ve } from "framer-motion";
|
|
3
|
+
import { gsap as oe } from "gsap";
|
|
4
|
+
var te = { exports: {} }, Z = {};
|
|
5
|
+
var Fe;
|
|
6
|
+
function ze() {
|
|
7
|
+
if (Fe) return Z;
|
|
8
|
+
Fe = 1;
|
|
9
|
+
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), r = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
10
|
+
function t(D, n, d) {
|
|
11
|
+
var o = null;
|
|
12
|
+
if (d !== void 0 && (o = "" + d), n.key !== void 0 && (o = "" + n.key), "key" in n) {
|
|
13
|
+
d = {};
|
|
14
|
+
for (var i in n)
|
|
15
|
+
i !== "key" && (d[i] = n[i]);
|
|
16
|
+
} else d = n;
|
|
17
|
+
return n = d.ref, {
|
|
18
|
+
$$typeof: e,
|
|
19
|
+
type: D,
|
|
20
|
+
key: o,
|
|
21
|
+
ref: n !== void 0 ? n : null,
|
|
22
|
+
props: d
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
return Z.Fragment = r, Z.jsx = t, Z.jsxs = t, Z;
|
|
26
|
+
}
|
|
27
|
+
var Q = {};
|
|
28
|
+
var ge;
|
|
29
|
+
function Ue() {
|
|
30
|
+
return ge || (ge = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
31
|
+
function e(u) {
|
|
32
|
+
if (u == null) return null;
|
|
33
|
+
if (typeof u == "function")
|
|
34
|
+
return u.$$typeof === Y ? null : u.displayName || u.name || null;
|
|
35
|
+
if (typeof u == "string") return u;
|
|
36
|
+
switch (u) {
|
|
37
|
+
case $:
|
|
38
|
+
return "Fragment";
|
|
39
|
+
case W:
|
|
40
|
+
return "Profiler";
|
|
41
|
+
case M:
|
|
42
|
+
return "StrictMode";
|
|
43
|
+
case w:
|
|
44
|
+
return "Suspense";
|
|
45
|
+
case O:
|
|
46
|
+
return "SuspenseList";
|
|
47
|
+
case _:
|
|
48
|
+
return "Activity";
|
|
49
|
+
}
|
|
50
|
+
if (typeof u == "object")
|
|
51
|
+
switch (typeof u.tag == "number" && console.error(
|
|
52
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
53
|
+
), u.$$typeof) {
|
|
54
|
+
case T:
|
|
55
|
+
return "Portal";
|
|
56
|
+
case v:
|
|
57
|
+
return u.displayName || "Context";
|
|
58
|
+
case k:
|
|
59
|
+
return (u._context.displayName || "Context") + ".Consumer";
|
|
60
|
+
case m:
|
|
61
|
+
var l = u.render;
|
|
62
|
+
return u = u.displayName, u || (u = l.displayName || l.name || "", u = u !== "" ? "ForwardRef(" + u + ")" : "ForwardRef"), u;
|
|
63
|
+
case f:
|
|
64
|
+
return l = u.displayName || null, l !== null ? l : e(u.type) || "Memo";
|
|
65
|
+
case A:
|
|
66
|
+
l = u._payload, u = u._init;
|
|
67
|
+
try {
|
|
68
|
+
return e(u(l));
|
|
69
|
+
} catch {
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
function r(u) {
|
|
75
|
+
return "" + u;
|
|
76
|
+
}
|
|
77
|
+
function t(u) {
|
|
78
|
+
try {
|
|
79
|
+
r(u);
|
|
80
|
+
var l = !1;
|
|
81
|
+
} catch {
|
|
82
|
+
l = !0;
|
|
83
|
+
}
|
|
84
|
+
if (l) {
|
|
85
|
+
l = console;
|
|
86
|
+
var E = l.error, j = typeof Symbol == "function" && Symbol.toStringTag && u[Symbol.toStringTag] || u.constructor.name || "Object";
|
|
87
|
+
return E.call(
|
|
88
|
+
l,
|
|
89
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
90
|
+
j
|
|
91
|
+
), r(u);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function D(u) {
|
|
95
|
+
if (u === $) return "<>";
|
|
96
|
+
if (typeof u == "object" && u !== null && u.$$typeof === A)
|
|
97
|
+
return "<...>";
|
|
98
|
+
try {
|
|
99
|
+
var l = e(u);
|
|
100
|
+
return l ? "<" + l + ">" : "<...>";
|
|
101
|
+
} catch {
|
|
102
|
+
return "<...>";
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
function n() {
|
|
106
|
+
var u = F.A;
|
|
107
|
+
return u === null ? null : u.getOwner();
|
|
108
|
+
}
|
|
109
|
+
function d() {
|
|
110
|
+
return Error("react-stack-top-frame");
|
|
111
|
+
}
|
|
112
|
+
function o(u) {
|
|
113
|
+
if (x.call(u, "key")) {
|
|
114
|
+
var l = Object.getOwnPropertyDescriptor(u, "key").get;
|
|
115
|
+
if (l && l.isReactWarning) return !1;
|
|
116
|
+
}
|
|
117
|
+
return u.key !== void 0;
|
|
118
|
+
}
|
|
119
|
+
function i(u, l) {
|
|
120
|
+
function E() {
|
|
121
|
+
P || (P = !0, console.error(
|
|
122
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
123
|
+
l
|
|
124
|
+
));
|
|
125
|
+
}
|
|
126
|
+
E.isReactWarning = !0, Object.defineProperty(u, "key", {
|
|
127
|
+
get: E,
|
|
128
|
+
configurable: !0
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
function a() {
|
|
132
|
+
var u = e(this.type);
|
|
133
|
+
return L[u] || (L[u] = !0, console.error(
|
|
134
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
135
|
+
)), u = this.props.ref, u !== void 0 ? u : null;
|
|
136
|
+
}
|
|
137
|
+
function c(u, l, E, j, V, ne) {
|
|
138
|
+
var I = E.ref;
|
|
139
|
+
return u = {
|
|
140
|
+
$$typeof: B,
|
|
141
|
+
type: u,
|
|
142
|
+
key: l,
|
|
143
|
+
props: E,
|
|
144
|
+
_owner: j
|
|
145
|
+
}, (I !== void 0 ? I : null) !== null ? Object.defineProperty(u, "ref", {
|
|
146
|
+
enumerable: !1,
|
|
147
|
+
get: a
|
|
148
|
+
}) : Object.defineProperty(u, "ref", { enumerable: !1, value: null }), u._store = {}, Object.defineProperty(u._store, "validated", {
|
|
149
|
+
configurable: !1,
|
|
150
|
+
enumerable: !1,
|
|
151
|
+
writable: !0,
|
|
152
|
+
value: 0
|
|
153
|
+
}), Object.defineProperty(u, "_debugInfo", {
|
|
154
|
+
configurable: !1,
|
|
155
|
+
enumerable: !1,
|
|
156
|
+
writable: !0,
|
|
157
|
+
value: null
|
|
158
|
+
}), Object.defineProperty(u, "_debugStack", {
|
|
159
|
+
configurable: !1,
|
|
160
|
+
enumerable: !1,
|
|
161
|
+
writable: !0,
|
|
162
|
+
value: V
|
|
163
|
+
}), Object.defineProperty(u, "_debugTask", {
|
|
164
|
+
configurable: !1,
|
|
165
|
+
enumerable: !1,
|
|
166
|
+
writable: !0,
|
|
167
|
+
value: ne
|
|
168
|
+
}), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
|
|
169
|
+
}
|
|
170
|
+
function p(u, l, E, j, V, ne) {
|
|
171
|
+
var I = l.children;
|
|
172
|
+
if (I !== void 0)
|
|
173
|
+
if (j)
|
|
174
|
+
if (R(I)) {
|
|
175
|
+
for (j = 0; j < I.length; j++)
|
|
176
|
+
h(I[j]);
|
|
177
|
+
Object.freeze && Object.freeze(I);
|
|
178
|
+
} else
|
|
179
|
+
console.error(
|
|
180
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
181
|
+
);
|
|
182
|
+
else h(I);
|
|
183
|
+
if (x.call(l, "key")) {
|
|
184
|
+
I = e(u);
|
|
185
|
+
var U = Object.keys(l).filter(function($e) {
|
|
186
|
+
return $e !== "key";
|
|
187
|
+
});
|
|
188
|
+
j = 0 < U.length ? "{key: someKey, " + U.join(": ..., ") + ": ...}" : "{key: someKey}", y[I + j] || (U = 0 < U.length ? "{" + U.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
189
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
190
|
+
let props = %s;
|
|
191
|
+
<%s {...props} />
|
|
192
|
+
React keys must be passed directly to JSX without using spread:
|
|
193
|
+
let props = %s;
|
|
194
|
+
<%s key={someKey} {...props} />`,
|
|
195
|
+
j,
|
|
196
|
+
I,
|
|
197
|
+
U,
|
|
198
|
+
I
|
|
199
|
+
), y[I + j] = !0);
|
|
200
|
+
}
|
|
201
|
+
if (I = null, E !== void 0 && (t(E), I = "" + E), o(l) && (t(l.key), I = "" + l.key), "key" in l) {
|
|
202
|
+
E = {};
|
|
203
|
+
for (var ae in l)
|
|
204
|
+
ae !== "key" && (E[ae] = l[ae]);
|
|
205
|
+
} else E = l;
|
|
206
|
+
return I && i(
|
|
207
|
+
E,
|
|
208
|
+
typeof u == "function" ? u.displayName || u.name || "Unknown" : u
|
|
209
|
+
), c(
|
|
210
|
+
u,
|
|
211
|
+
I,
|
|
212
|
+
E,
|
|
213
|
+
n(),
|
|
214
|
+
V,
|
|
215
|
+
ne
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
function h(u) {
|
|
219
|
+
C(u) ? u._store && (u._store.validated = 1) : typeof u == "object" && u !== null && u.$$typeof === A && (u._payload.status === "fulfilled" ? C(u._payload.value) && u._payload.value._store && (u._payload.value._store.validated = 1) : u._store && (u._store.validated = 1));
|
|
220
|
+
}
|
|
221
|
+
function C(u) {
|
|
222
|
+
return typeof u == "object" && u !== null && u.$$typeof === B;
|
|
223
|
+
}
|
|
224
|
+
var g = Ye, B = /* @__PURE__ */ Symbol.for("react.transitional.element"), T = /* @__PURE__ */ Symbol.for("react.portal"), $ = /* @__PURE__ */ Symbol.for("react.fragment"), M = /* @__PURE__ */ Symbol.for("react.strict_mode"), W = /* @__PURE__ */ Symbol.for("react.profiler"), k = /* @__PURE__ */ Symbol.for("react.consumer"), v = /* @__PURE__ */ Symbol.for("react.context"), m = /* @__PURE__ */ Symbol.for("react.forward_ref"), w = /* @__PURE__ */ Symbol.for("react.suspense"), O = /* @__PURE__ */ Symbol.for("react.suspense_list"), f = /* @__PURE__ */ Symbol.for("react.memo"), A = /* @__PURE__ */ Symbol.for("react.lazy"), _ = /* @__PURE__ */ Symbol.for("react.activity"), Y = /* @__PURE__ */ Symbol.for("react.client.reference"), F = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, x = Object.prototype.hasOwnProperty, R = Array.isArray, b = console.createTask ? console.createTask : function() {
|
|
225
|
+
return null;
|
|
226
|
+
};
|
|
227
|
+
g = {
|
|
228
|
+
react_stack_bottom_frame: function(u) {
|
|
229
|
+
return u();
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
var P, L = {}, S = g.react_stack_bottom_frame.bind(
|
|
233
|
+
g,
|
|
234
|
+
d
|
|
235
|
+
)(), N = b(D(d)), y = {};
|
|
236
|
+
Q.Fragment = $, Q.jsx = function(u, l, E) {
|
|
237
|
+
var j = 1e4 > F.recentlyCreatedOwnerStacks++;
|
|
238
|
+
return p(
|
|
239
|
+
u,
|
|
240
|
+
l,
|
|
241
|
+
E,
|
|
242
|
+
!1,
|
|
243
|
+
j ? Error("react-stack-top-frame") : S,
|
|
244
|
+
j ? b(D(u)) : N
|
|
245
|
+
);
|
|
246
|
+
}, Q.jsxs = function(u, l, E) {
|
|
247
|
+
var j = 1e4 > F.recentlyCreatedOwnerStacks++;
|
|
248
|
+
return p(
|
|
249
|
+
u,
|
|
250
|
+
l,
|
|
251
|
+
E,
|
|
252
|
+
!0,
|
|
253
|
+
j ? Error("react-stack-top-frame") : S,
|
|
254
|
+
j ? b(D(u)) : N
|
|
255
|
+
);
|
|
256
|
+
};
|
|
257
|
+
})()), Q;
|
|
258
|
+
}
|
|
259
|
+
var Ee;
|
|
260
|
+
function qe() {
|
|
261
|
+
return Ee || (Ee = 1, process.env.NODE_ENV === "production" ? te.exports = ze() : te.exports = Ue()), te.exports;
|
|
262
|
+
}
|
|
263
|
+
var s = qe();
|
|
264
|
+
const ot = () => /* @__PURE__ */ s.jsx(
|
|
265
|
+
X.div,
|
|
266
|
+
{
|
|
267
|
+
className: "relative w-72 h-96 rounded-2xl p-[2px] cursor-pointer group",
|
|
268
|
+
style: {
|
|
269
|
+
background: "linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%)",
|
|
270
|
+
backgroundSize: "200% 100%"
|
|
271
|
+
},
|
|
272
|
+
animate: {
|
|
273
|
+
backgroundPosition: ["0% 50%", "100% 50%", "0% 50%"]
|
|
274
|
+
},
|
|
275
|
+
transition: {
|
|
276
|
+
duration: 3,
|
|
277
|
+
repeat: 1 / 0,
|
|
278
|
+
ease: "linear"
|
|
279
|
+
},
|
|
280
|
+
whileHover: {
|
|
281
|
+
scale: 1.05,
|
|
282
|
+
y: -10
|
|
283
|
+
},
|
|
284
|
+
children: /* @__PURE__ */ s.jsxs("div", { className: "w-full h-full bg-gray-900 rounded-2xl flex flex-col items-center justify-center p-8 relative overflow-hidden", children: [
|
|
285
|
+
/* @__PURE__ */ s.jsx("div", { className: "absolute inset-0 bg-gradient-to-br from-indigo-500/20 via-transparent to-purple-500/20 opacity-0 group-hover:opacity-100 transition-opacity duration-500" }),
|
|
286
|
+
/* @__PURE__ */ s.jsxs("div", { className: "relative z-10 text-center", children: [
|
|
287
|
+
/* @__PURE__ */ s.jsx("div", { className: "w-20 h-20 mx-auto mb-6 rounded-full bg-gradient-to-br from-indigo-400 to-purple-500 flex items-center justify-center text-4xl animate-float", children: "✨" }),
|
|
288
|
+
/* @__PURE__ */ s.jsx("h4", { className: "text-2xl font-bold text-white mb-3", children: "流光卡片" }),
|
|
289
|
+
/* @__PURE__ */ s.jsxs("p", { className: "text-gray-400 text-sm leading-relaxed", children: [
|
|
290
|
+
"悬停查看动态效果",
|
|
291
|
+
/* @__PURE__ */ s.jsx("br", {}),
|
|
292
|
+
"渐变边框 + 浮动动画"
|
|
293
|
+
] })
|
|
294
|
+
] }),
|
|
295
|
+
/* @__PURE__ */ s.jsx("div", { className: "absolute bottom-0 left-0 right-0 h-1 bg-gradient-to-r from-transparent via-indigo-500 to-transparent opacity-50" })
|
|
296
|
+
] })
|
|
297
|
+
}
|
|
298
|
+
), lt = () => {
|
|
299
|
+
const e = {
|
|
300
|
+
hidden: { opacity: 0 },
|
|
301
|
+
visible: {
|
|
302
|
+
opacity: 1,
|
|
303
|
+
transition: {
|
|
304
|
+
staggerChildren: 0.1
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}, r = {
|
|
308
|
+
hidden: { y: 50, opacity: 0 },
|
|
309
|
+
visible: {
|
|
310
|
+
y: 0,
|
|
311
|
+
opacity: 1,
|
|
312
|
+
transition: {
|
|
313
|
+
type: "spring",
|
|
314
|
+
bounce: 0.5,
|
|
315
|
+
duration: 0.8
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}, t = ["开始使用", "查看文档", "示例代码", "关于我们"];
|
|
319
|
+
return /* @__PURE__ */ s.jsx(
|
|
320
|
+
X.div,
|
|
321
|
+
{
|
|
322
|
+
className: "flex flex-wrap gap-4 justify-center",
|
|
323
|
+
variants: e,
|
|
324
|
+
initial: "hidden",
|
|
325
|
+
animate: "visible",
|
|
326
|
+
children: t.map((D, n) => /* @__PURE__ */ s.jsx(
|
|
327
|
+
X.button,
|
|
328
|
+
{
|
|
329
|
+
variants: r,
|
|
330
|
+
whileHover: { scale: 1.05 },
|
|
331
|
+
whileTap: { scale: 0.95 },
|
|
332
|
+
className: "px-6 py-3 bg-gradient-to-r from-pink-500 to-orange-500 text-white font-semibold rounded-lg shadow-lg hover:shadow-xl transition-shadow",
|
|
333
|
+
children: D
|
|
334
|
+
},
|
|
335
|
+
n
|
|
336
|
+
))
|
|
337
|
+
}
|
|
338
|
+
);
|
|
339
|
+
}, Ge = (e, r) => {
|
|
340
|
+
const t = /* @__PURE__ */ new Set([...Object.keys(e), ...r.flatMap((n) => Object.keys(n))]), D = {};
|
|
341
|
+
return t.forEach((n) => {
|
|
342
|
+
D[n] = [e[n], ...r.map((d) => d[n])];
|
|
343
|
+
}), D;
|
|
344
|
+
}, xe = ({
|
|
345
|
+
text: e = "",
|
|
346
|
+
delay: r = 200,
|
|
347
|
+
className: t = "",
|
|
348
|
+
animateBy: D = "words",
|
|
349
|
+
direction: n = "top",
|
|
350
|
+
threshold: d = 0.1,
|
|
351
|
+
rootMargin: o = "0px",
|
|
352
|
+
animationFrom: i,
|
|
353
|
+
animationTo: a,
|
|
354
|
+
easing: c = (C) => C,
|
|
355
|
+
onAnimationComplete: p,
|
|
356
|
+
stepDuration: h = 0.35
|
|
357
|
+
}) => {
|
|
358
|
+
const C = D === "words" ? e.split(" ") : e.split(""), [g, B] = Oe(!1), T = he(null);
|
|
359
|
+
De(() => {
|
|
360
|
+
if (!T.current) return;
|
|
361
|
+
const O = new IntersectionObserver(
|
|
362
|
+
([f]) => {
|
|
363
|
+
f.isIntersecting && (B(!0), O.unobserve(T.current));
|
|
364
|
+
},
|
|
365
|
+
{ threshold: d, rootMargin: o }
|
|
366
|
+
);
|
|
367
|
+
return O.observe(T.current), () => O.disconnect();
|
|
368
|
+
}, [d, o]);
|
|
369
|
+
const $ = me(
|
|
370
|
+
() => n === "top" ? { filter: "blur(10px)", opacity: 0, y: -50 } : { filter: "blur(10px)", opacity: 0, y: 50 },
|
|
371
|
+
[n]
|
|
372
|
+
), M = me(
|
|
373
|
+
() => [
|
|
374
|
+
{
|
|
375
|
+
filter: "blur(5px)",
|
|
376
|
+
opacity: 0.5,
|
|
377
|
+
y: n === "top" ? 5 : -5
|
|
378
|
+
},
|
|
379
|
+
{ filter: "blur(0px)", opacity: 1, y: 0 }
|
|
380
|
+
],
|
|
381
|
+
[n]
|
|
382
|
+
), W = i ?? $, k = a ?? M, v = k.length + 1, m = h * (v - 1), w = Array.from({ length: v }, (O, f) => v === 1 ? 0 : f / (v - 1));
|
|
383
|
+
return /* @__PURE__ */ s.jsx("p", { ref: T, className: `blur-text ${t} flex flex-wrap`, children: C.map((O, f) => {
|
|
384
|
+
const A = Ge(W, k), _ = {
|
|
385
|
+
duration: m,
|
|
386
|
+
times: w,
|
|
387
|
+
delay: f * r / 1e3
|
|
388
|
+
};
|
|
389
|
+
return _.ease = c, /* @__PURE__ */ s.jsxs(
|
|
390
|
+
X.span,
|
|
391
|
+
{
|
|
392
|
+
className: "inline-block will-change-[transform,filter,opacity]",
|
|
393
|
+
initial: W,
|
|
394
|
+
animate: g ? A : W,
|
|
395
|
+
transition: _,
|
|
396
|
+
onAnimationComplete: f === C.length - 1 ? p : void 0,
|
|
397
|
+
children: [
|
|
398
|
+
O === " " ? " " : O,
|
|
399
|
+
D === "words" && f < C.length - 1 && " "
|
|
400
|
+
]
|
|
401
|
+
},
|
|
402
|
+
f
|
|
403
|
+
);
|
|
404
|
+
}) });
|
|
405
|
+
}, ct = () => /* @__PURE__ */ s.jsxs("div", { className: "space-y-8 max-w-2xl", children: [
|
|
406
|
+
/* @__PURE__ */ s.jsx(
|
|
407
|
+
xe,
|
|
408
|
+
{
|
|
409
|
+
text: "Isn't this so cool?!",
|
|
410
|
+
className: "text-4xl font-bold text-white",
|
|
411
|
+
delay: 100,
|
|
412
|
+
animateBy: "words",
|
|
413
|
+
direction: "top"
|
|
414
|
+
}
|
|
415
|
+
),
|
|
416
|
+
/* @__PURE__ */ s.jsx(
|
|
417
|
+
xe,
|
|
418
|
+
{
|
|
419
|
+
text: "逐字显示的中文文本动画效果",
|
|
420
|
+
className: "text-3xl font-semibold text-indigo-400",
|
|
421
|
+
delay: 50,
|
|
422
|
+
animateBy: "characters",
|
|
423
|
+
direction: "top"
|
|
424
|
+
}
|
|
425
|
+
)
|
|
426
|
+
] }), Je = (e, r, t = !0) => ({
|
|
427
|
+
from: r,
|
|
428
|
+
to: r + 360,
|
|
429
|
+
ease: "linear",
|
|
430
|
+
duration: e,
|
|
431
|
+
type: "tween",
|
|
432
|
+
repeat: t ? 1 / 0 : 0
|
|
433
|
+
}), q = (e, r) => ({
|
|
434
|
+
rotate: Je(e, r),
|
|
435
|
+
scale: {
|
|
436
|
+
type: "spring",
|
|
437
|
+
damping: 20,
|
|
438
|
+
stiffness: 300
|
|
439
|
+
}
|
|
440
|
+
}), be = ({ text: e, spinDuration: r = 20, onHover: t = "speedUp", className: D = "" }) => {
|
|
441
|
+
const n = Array.from(e), d = He(), o = Ve(0);
|
|
442
|
+
De(() => {
|
|
443
|
+
const c = o.get();
|
|
444
|
+
d.start({
|
|
445
|
+
rotate: c + 360,
|
|
446
|
+
scale: 1,
|
|
447
|
+
transition: q(r, c)
|
|
448
|
+
});
|
|
449
|
+
}, [r, e, t, d, o]);
|
|
450
|
+
const i = () => {
|
|
451
|
+
const c = o.get();
|
|
452
|
+
if (!t) return;
|
|
453
|
+
let p, h = 1;
|
|
454
|
+
switch (t) {
|
|
455
|
+
case "slowDown":
|
|
456
|
+
p = q(r * 2, c);
|
|
457
|
+
break;
|
|
458
|
+
case "speedUp":
|
|
459
|
+
p = q(r / 4, c);
|
|
460
|
+
break;
|
|
461
|
+
case "pause":
|
|
462
|
+
p = {
|
|
463
|
+
rotate: { type: "spring", damping: 20, stiffness: 300 },
|
|
464
|
+
scale: { type: "spring", damping: 20, stiffness: 300 }
|
|
465
|
+
}, h = 1;
|
|
466
|
+
break;
|
|
467
|
+
case "goBonkers":
|
|
468
|
+
p = q(r / 20, c), h = 0.8;
|
|
469
|
+
break;
|
|
470
|
+
default:
|
|
471
|
+
p = q(r, c);
|
|
472
|
+
}
|
|
473
|
+
d.start({
|
|
474
|
+
rotate: c + 360,
|
|
475
|
+
scale: h,
|
|
476
|
+
transition: p
|
|
477
|
+
});
|
|
478
|
+
}, a = () => {
|
|
479
|
+
const c = o.get();
|
|
480
|
+
d.start({
|
|
481
|
+
rotate: c + 360,
|
|
482
|
+
scale: 1,
|
|
483
|
+
transition: q(r, c)
|
|
484
|
+
});
|
|
485
|
+
};
|
|
486
|
+
return /* @__PURE__ */ s.jsx(
|
|
487
|
+
X.div,
|
|
488
|
+
{
|
|
489
|
+
className: `m-0 mx-auto rounded-full w-[200px] h-[200px] relative text-white font-black text-center cursor-pointer origin-center ${D}`,
|
|
490
|
+
style: { rotate: o },
|
|
491
|
+
initial: { rotate: 0 },
|
|
492
|
+
animate: d,
|
|
493
|
+
onMouseEnter: i,
|
|
494
|
+
onMouseLeave: a,
|
|
495
|
+
children: n.map((c, p) => {
|
|
496
|
+
const h = 360 / n.length * p, C = Math.PI / n.length, g = C * p, B = C * p, T = `rotateZ(${h}deg) translate3d(${g}px, ${B}px, 0)`;
|
|
497
|
+
return /* @__PURE__ */ s.jsx(
|
|
498
|
+
"span",
|
|
499
|
+
{
|
|
500
|
+
className: "absolute inline-block inset-0 text-2xl transition-all duration-500 ease-[cubic-bezier(0,0,0,1)]",
|
|
501
|
+
style: { transform: T, WebkitTransform: T },
|
|
502
|
+
children: c
|
|
503
|
+
},
|
|
504
|
+
p
|
|
505
|
+
);
|
|
506
|
+
})
|
|
507
|
+
}
|
|
508
|
+
);
|
|
509
|
+
}, dt = () => /* @__PURE__ */ s.jsxs("div", { className: "flex flex-col items-center gap-12", children: [
|
|
510
|
+
/* @__PURE__ */ s.jsxs("div", { className: "text-center space-y-4", children: [
|
|
511
|
+
/* @__PURE__ */ s.jsx(
|
|
512
|
+
be,
|
|
513
|
+
{
|
|
514
|
+
text: "REACT • FRAMER • MOTION • ",
|
|
515
|
+
spinDuration: 15,
|
|
516
|
+
onHover: "speedUp"
|
|
517
|
+
}
|
|
518
|
+
),
|
|
519
|
+
/* @__PURE__ */ s.jsx("p", { className: "text-gray-400 text-sm", children: "悬浮加速效果" })
|
|
520
|
+
] }),
|
|
521
|
+
/* @__PURE__ */ s.jsxs("div", { className: "text-center space-y-4", children: [
|
|
522
|
+
/* @__PURE__ */ s.jsx(
|
|
523
|
+
be,
|
|
524
|
+
{
|
|
525
|
+
text: "TAILWIND • CSS • VITE • ",
|
|
526
|
+
spinDuration: 12,
|
|
527
|
+
onHover: "pause",
|
|
528
|
+
className: "text-indigo-400"
|
|
529
|
+
}
|
|
530
|
+
),
|
|
531
|
+
/* @__PURE__ */ s.jsx("p", { className: "text-gray-400 text-sm", children: "悬浮暂停效果" })
|
|
532
|
+
] })
|
|
533
|
+
] });
|
|
534
|
+
let K, G, ye = typeof Symbol == "function" ? /* @__PURE__ */ Symbol() : "_split", le, Xe = () => le || fe.register(window.gsap), ve = typeof Intl < "u" && "Segmenter" in Intl ? new Intl.Segmenter() : 0, ee = (e) => typeof e == "string" ? ee(document.querySelectorAll(e)) : "length" in e ? Array.from(e).reduce((r, t) => (typeof t == "string" ? r.push(...ee(t)) : r.push(t), r), []) : [e], we = (e) => ee(e).filter((r) => r instanceof HTMLElement), ce = [], ie = function() {
|
|
535
|
+
}, Ze = { add: (e) => e() }, Qe = /\s+/g, Ae = new RegExp("\\p{RI}\\p{RI}|\\p{Emoji}(\\p{EMod}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?(\\u{200D}\\p{Emoji}(\\p{EMod}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?)*|.", "gu"), re = { left: 0, top: 0, width: 0, height: 0 }, Ke = (e, r) => {
|
|
536
|
+
for (; ++r < e.length && e[r] === re; )
|
|
537
|
+
;
|
|
538
|
+
return e[r] || re;
|
|
539
|
+
}, je = ({ element: e, html: r, ariaL: t, ariaH: D }) => {
|
|
540
|
+
e.innerHTML = r, t ? e.setAttribute("aria-label", t) : e.removeAttribute("aria-label"), D ? e.setAttribute("aria-hidden", D) : e.removeAttribute("aria-hidden");
|
|
541
|
+
}, _e = (e, r) => {
|
|
542
|
+
if (r) {
|
|
543
|
+
let t = new Set(e.join("").match(r) || ce), D = e.length, n, d, o, i;
|
|
544
|
+
if (t.size)
|
|
545
|
+
for (; --D > -1; ) {
|
|
546
|
+
d = e[D];
|
|
547
|
+
for (o of t)
|
|
548
|
+
if (o.startsWith(d) && o.length > d.length) {
|
|
549
|
+
for (n = 0, i = d; o.startsWith(i += e[D + ++n]) && i.length < o.length; )
|
|
550
|
+
;
|
|
551
|
+
if (n && i.length === o.length) {
|
|
552
|
+
e[D] = o, e.splice(D + 1, n);
|
|
553
|
+
break;
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
return e;
|
|
559
|
+
}, Be = (e) => window.getComputedStyle(e).display === "inline" && (e.style.display = "inline-block"), J = (e, r, t) => r.insertBefore(typeof e == "string" ? document.createTextNode(e) : e, t), de = (e, r, t) => {
|
|
560
|
+
let D = r[e + "sClass"] || "", { tag: n = "div", aria: d = "auto", propIndex: o = !1 } = r, i = e === "line" ? "block" : "inline-block", a = D.indexOf("++") > -1, c = (p) => {
|
|
561
|
+
let h = document.createElement(n), C = t.length + 1;
|
|
562
|
+
return D && (h.className = D + (a ? " " + D + C : "")), o && h.style.setProperty("--" + e, C + ""), d !== "none" && h.setAttribute("aria-hidden", "true"), n !== "span" && (h.style.position = "relative", h.style.display = i), h.textContent = p, t.push(h), h;
|
|
563
|
+
};
|
|
564
|
+
return a && (D = D.replace("++", "")), c.collection = t, c;
|
|
565
|
+
}, et = (e, r, t, D) => {
|
|
566
|
+
let n = de("line", t, D), d = window.getComputedStyle(e).textAlign || "left";
|
|
567
|
+
return (o, i) => {
|
|
568
|
+
let a = n("");
|
|
569
|
+
for (a.style.textAlign = d, e.insertBefore(a, r[o]); o < i; o++)
|
|
570
|
+
a.appendChild(r[o]);
|
|
571
|
+
a.normalize();
|
|
572
|
+
};
|
|
573
|
+
}, Ie = (e, r, t, D, n, d, o, i, a, c) => {
|
|
574
|
+
var p;
|
|
575
|
+
let h = Array.from(e.childNodes), C = 0, { wordDelimiter: g, reduceWhiteSpace: B = !0, prepareText: T } = r, $ = e.getBoundingClientRect(), M = $, W = !B && window.getComputedStyle(e).whiteSpace.substring(0, 3) === "pre", k = 0, v = t.collection, m, w, O, f, A, _, Y, F, x, R, b, P, L, S, N, y, u, l;
|
|
576
|
+
for (typeof g == "object" ? (O = g.delimiter || g, w = g.replaceWith || "") : w = g === "" ? "" : g || " ", m = w !== " "; C < h.length; C++)
|
|
577
|
+
if (f = h[C], f.nodeType === 3) {
|
|
578
|
+
for (N = f.textContent || "", B ? N = N.replace(Qe, " ") : W && (N = N.replace(/\n/g, w + `
|
|
579
|
+
`)), T && (N = T(N, e)), f.textContent = N, A = w || O ? N.split(O || w) : N.match(i) || ce, u = A[A.length - 1], F = m ? u.slice(-1) === " " : !u, u || A.pop(), M = $, Y = m ? A[0].charAt(0) === " " : !A[0], Y && J(" ", e, f), A[0] || A.shift(), _e(A, a), d && c || (f.textContent = ""), x = 1; x <= A.length; x++)
|
|
580
|
+
if (y = A[x - 1], !B && W && y.charAt(0) === `
|
|
581
|
+
` && ((p = f.previousSibling) == null || p.remove(), J(document.createElement("br"), e, f), y = y.slice(1)), !B && y === "")
|
|
582
|
+
J(w, e, f);
|
|
583
|
+
else if (y === " ")
|
|
584
|
+
e.insertBefore(document.createTextNode(" "), f);
|
|
585
|
+
else {
|
|
586
|
+
if (m && y.charAt(0) === " " && J(" ", e, f), k && x === 1 && !Y && v.indexOf(k.parentNode) > -1 ? (_ = v[v.length - 1], _.appendChild(document.createTextNode(D ? "" : y))) : (_ = t(D ? "" : y), J(_, e, f), k && x === 1 && !Y && _.insertBefore(k, _.firstChild)), D)
|
|
587
|
+
for (b = ve ? _e([...ve.segment(y)].map((E) => E.segment), a) : y.match(i) || ce, l = 0; l < b.length; l++)
|
|
588
|
+
_.appendChild(b[l] === " " ? document.createTextNode(" ") : D(b[l]));
|
|
589
|
+
if (d && c) {
|
|
590
|
+
if (N = f.textContent = N.substring(y.length + 1, N.length), R = _.getBoundingClientRect(), R.top > M.top && R.left <= M.left) {
|
|
591
|
+
for (P = e.cloneNode(), L = e.childNodes[0]; L && L !== _; )
|
|
592
|
+
S = L, L = L.nextSibling, P.appendChild(S);
|
|
593
|
+
e.parentNode.insertBefore(P, e), n && Be(P);
|
|
594
|
+
}
|
|
595
|
+
M = R;
|
|
596
|
+
}
|
|
597
|
+
(x < A.length || F) && J(x >= A.length ? " " : m && y.slice(-1) === " " ? " " + w : w, e, f);
|
|
598
|
+
}
|
|
599
|
+
e.removeChild(f), k = 0;
|
|
600
|
+
} else f.nodeType === 1 && (o && o.indexOf(f) > -1 ? (v.indexOf(f.previousSibling) > -1 && v[v.length - 1].appendChild(f), k = f) : (Ie(f, r, t, D, n, d, o, i, a, !0), k = 0), n && Be(f));
|
|
601
|
+
};
|
|
602
|
+
const Pe = class Le {
|
|
603
|
+
constructor(r, t) {
|
|
604
|
+
this.isSplit = !1, Xe(), this.elements = we(r), this.chars = [], this.words = [], this.lines = [], this.masks = [], this.vars = t, this.elements.forEach((o) => {
|
|
605
|
+
var i;
|
|
606
|
+
t.overwrite !== !1 && ((i = o[ye]) == null || i._data.orig.filter(({ element: a }) => a === o).forEach(je)), o[ye] = this;
|
|
607
|
+
}), this._split = () => this.isSplit && this.split(this.vars);
|
|
608
|
+
let D = [], n, d = () => {
|
|
609
|
+
let o = D.length, i;
|
|
610
|
+
for (; o--; ) {
|
|
611
|
+
i = D[o];
|
|
612
|
+
let a = i.element.offsetWidth;
|
|
613
|
+
if (a !== i.width) {
|
|
614
|
+
i.width = a, this._split();
|
|
615
|
+
return;
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
};
|
|
619
|
+
this._data = { orig: D, obs: typeof ResizeObserver < "u" && new ResizeObserver(() => {
|
|
620
|
+
clearTimeout(n), n = setTimeout(d, 200);
|
|
621
|
+
}) }, ie(this), this.split(t);
|
|
622
|
+
}
|
|
623
|
+
split(r) {
|
|
624
|
+
return (this._ctx || Ze).add(() => {
|
|
625
|
+
this.isSplit && this.revert(), this.vars = r = r || this.vars || {};
|
|
626
|
+
let { type: t = "chars,words,lines", aria: D = "auto", deepSlice: n = !0, smartWrap: d, onSplit: o, autoSplit: i = !1, specialChars: a, mask: c } = this.vars, p = t.indexOf("lines") > -1, h = t.indexOf("chars") > -1, C = t.indexOf("words") > -1, g = h && !C && !p, B = a && ("push" in a ? new RegExp("(?:" + a.join("|") + ")", "gu") : a), T = B ? new RegExp(B.source + "|" + Ae.source, "gu") : Ae, $ = !!r.ignore && we(r.ignore), { orig: M, animTime: W, obs: k } = this._data, v;
|
|
627
|
+
(h || C || p) && (this.elements.forEach((m, w) => {
|
|
628
|
+
M[w] = {
|
|
629
|
+
element: m,
|
|
630
|
+
html: m.innerHTML,
|
|
631
|
+
ariaL: m.getAttribute("aria-label"),
|
|
632
|
+
ariaH: m.getAttribute("aria-hidden")
|
|
633
|
+
}, D === "auto" ? m.setAttribute("aria-label", (m.textContent || "").trim()) : D === "hidden" && m.setAttribute("aria-hidden", "true");
|
|
634
|
+
let O = [], f = [], A = [], _ = h ? de("char", r, O) : null, Y = de("word", r, f), F, x, R, b;
|
|
635
|
+
if (Ie(m, r, Y, _, g, n && (p || g), $, T, B, !1), p) {
|
|
636
|
+
let P = ee(m.childNodes), L = et(m, P, r, A), S, N = [], y = 0, u = P.map((j) => j.nodeType === 1 ? j.getBoundingClientRect() : re), l = re, E;
|
|
637
|
+
for (F = 0; F < P.length; F++)
|
|
638
|
+
S = P[F], S.nodeType === 1 && (S.nodeName === "BR" ? ((!F || P[F - 1].nodeName !== "BR") && (N.push(S), L(y, F + 1)), y = F + 1, l = Ke(u, F)) : (E = u[F], F && E.top > l.top && E.left < l.left + l.width - 1 && (L(y, F), y = F), l = E));
|
|
639
|
+
y < F && L(y, F), N.forEach((j) => {
|
|
640
|
+
var V;
|
|
641
|
+
return (V = j.parentNode) == null ? void 0 : V.removeChild(j);
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
if (!C) {
|
|
645
|
+
for (F = 0; F < f.length; F++)
|
|
646
|
+
if (x = f[F], h || !x.nextSibling || x.nextSibling.nodeType !== 3)
|
|
647
|
+
if (d && !p) {
|
|
648
|
+
for (R = document.createElement("span"), R.style.whiteSpace = "nowrap"; x.firstChild; )
|
|
649
|
+
R.appendChild(x.firstChild);
|
|
650
|
+
x.replaceWith(R);
|
|
651
|
+
} else
|
|
652
|
+
x.replaceWith(...x.childNodes);
|
|
653
|
+
else
|
|
654
|
+
b = x.nextSibling, b && b.nodeType === 3 && (b.textContent = (x.textContent || "") + (b.textContent || ""), x.remove());
|
|
655
|
+
f.length = 0, m.normalize();
|
|
656
|
+
}
|
|
657
|
+
this.lines.push(...A), this.words.push(...f), this.chars.push(...O);
|
|
658
|
+
}), c && this[c] && this.masks.push(...this[c].map((m) => {
|
|
659
|
+
let w = m.cloneNode();
|
|
660
|
+
return m.replaceWith(w), w.appendChild(m), m.className && (w.className = m.className.trim() + "-mask"), w.style.overflow = "clip", w;
|
|
661
|
+
}))), this.isSplit = !0, G && p && (i ? G.addEventListener("loadingdone", this._split) : G.status === "loading" && console.warn("SplitText called before fonts loaded")), (v = o && o(this)) && v.totalTime && (this._data.anim = W ? v.totalTime(W) : v), p && i && this.elements.forEach((m, w) => {
|
|
662
|
+
M[w].width = m.offsetWidth, k && k.observe(m);
|
|
663
|
+
});
|
|
664
|
+
}), this;
|
|
665
|
+
}
|
|
666
|
+
kill() {
|
|
667
|
+
let { obs: r } = this._data;
|
|
668
|
+
r && r.disconnect(), G?.removeEventListener("loadingdone", this._split);
|
|
669
|
+
}
|
|
670
|
+
revert() {
|
|
671
|
+
var r, t;
|
|
672
|
+
if (this.isSplit) {
|
|
673
|
+
let { orig: D, anim: n } = this._data;
|
|
674
|
+
this.kill(), D.forEach(je), this.chars.length = this.words.length = this.lines.length = D.length = this.masks.length = 0, this.isSplit = !1, n && (this._data.animTime = n.totalTime(), n.revert()), (t = (r = this.vars).onRevert) == null || t.call(r, this);
|
|
675
|
+
}
|
|
676
|
+
return this;
|
|
677
|
+
}
|
|
678
|
+
static create(r, t) {
|
|
679
|
+
return new Le(r, t);
|
|
680
|
+
}
|
|
681
|
+
static register(r) {
|
|
682
|
+
K = K || r || window.gsap, K && (ee = K.utils.toArray, ie = K.core.context || ie), !le && window.innerWidth > 0 && (G = document.fonts, le = !0);
|
|
683
|
+
}
|
|
684
|
+
};
|
|
685
|
+
Pe.version = "3.14.2";
|
|
686
|
+
let fe = Pe;
|
|
687
|
+
var tt = /(?:^\s+|\s+$)/g, ut = /([\uD800-\uDBFF][\uDC00-\uDFFF](?:[\u200D\uFE0F][\uD800-\uDBFF][\uDC00-\uDFFF]){2,}|\uD83D\uDC69(?:\u200D(?:(?:\uD83D\uDC69\u200D)?\uD83D\uDC67|(?:\uD83D\uDC69\u200D)?\uD83D\uDC66)|\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D(?:\uD83D\uDC69\u200D)?\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D(?:\uD83D\uDC69\u200D)?\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2642\u2640]\uFE0F|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDD27\uDCBC\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC6F\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3C-\uDD3E\uDDD6-\uDDDF])\u200D[\u2640\u2642]\uFE0F|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|(?:\u26F9|\uD83C[\uDFCC\uDFCB]|\uD83D\uDD75)(?:\uFE0F\u200D[\u2640\u2642]|(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642])\uFE0F|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC69\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708]))\uFE0F|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83D\uDC69\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC66\u200D\uD83D\uDC66|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]))|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\u200D(?:(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC67|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC66)|\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDD1-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])?|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])\uFE0F)/;
|
|
688
|
+
function Ce(e) {
|
|
689
|
+
var r = e.nodeType, t = "";
|
|
690
|
+
if (r === 1 || r === 9 || r === 11) {
|
|
691
|
+
if (typeof e.textContent == "string")
|
|
692
|
+
return e.textContent;
|
|
693
|
+
for (e = e.firstChild; e; e = e.nextSibling)
|
|
694
|
+
t += Ce(e);
|
|
695
|
+
} else if (r === 3 || r === 4)
|
|
696
|
+
return e.nodeValue;
|
|
697
|
+
return t;
|
|
698
|
+
}
|
|
699
|
+
function H(e, r, t, D, n) {
|
|
700
|
+
if (e += "", t && (e = e.trim ? e.trim() : e.replace(tt, "")), r && r !== "")
|
|
701
|
+
return e.replace(/>/g, ">").replace(/</g, "<").split(r);
|
|
702
|
+
for (var d = [], o = e.length, i = 0, a, c; i < o; i++)
|
|
703
|
+
c = e.charAt(i), (c.charCodeAt(0) >= 55296 && c.charCodeAt(0) <= 56319 || e.charCodeAt(i + 1) >= 65024 && e.charCodeAt(i + 1) <= 65039) && (a = ((e.substr(i, 12).split(ut) || [])[1] || "").length || 2, c = e.substr(i, a), d.emoji = 1, i += a - 1), d.push(n ? c : c === ">" ? ">" : c === "<" ? "<" : D && c === " " && (e.charAt(i - 1) === " " || e.charAt(i + 1) === " ") ? " " : c);
|
|
704
|
+
return d;
|
|
705
|
+
}
|
|
706
|
+
var ue = /* @__PURE__ */ (function() {
|
|
707
|
+
function e(t) {
|
|
708
|
+
this.chars = H(t), this.sets = [], this.length = 50;
|
|
709
|
+
for (var D = 0; D < 20; D++)
|
|
710
|
+
this.sets[D] = Te(80, this.chars);
|
|
711
|
+
}
|
|
712
|
+
var r = e.prototype;
|
|
713
|
+
return r.grow = function(D) {
|
|
714
|
+
for (var n = 0; n < 20; n++)
|
|
715
|
+
this.sets[n] += Te(D - this.length, this.chars);
|
|
716
|
+
this.length = D;
|
|
717
|
+
}, e;
|
|
718
|
+
})(), z, We, Me = function() {
|
|
719
|
+
return z || typeof window < "u" && (z = window.gsap) && z.registerPlugin && z;
|
|
720
|
+
}, rt = 1, Ne = /\s+/g, Te = function(r, t) {
|
|
721
|
+
for (var D = t.length, n = ""; --r > -1; )
|
|
722
|
+
n += t[~~(Math.random() * D)];
|
|
723
|
+
return n;
|
|
724
|
+
}, pe = "ABCDEFGHIJKLMNOPQRSTUVWXYZ", Se = pe.toLowerCase(), Dt = {
|
|
725
|
+
upperCase: new ue(pe),
|
|
726
|
+
lowerCase: new ue(Se),
|
|
727
|
+
upperAndLowerCase: new ue(pe + Se)
|
|
728
|
+
}, ke = function() {
|
|
729
|
+
We = z = Me();
|
|
730
|
+
}, se = {
|
|
731
|
+
version: "3.14.2",
|
|
732
|
+
name: "scrambleText",
|
|
733
|
+
register: function(r, t, D) {
|
|
734
|
+
z = r, ke();
|
|
735
|
+
},
|
|
736
|
+
init: function(r, t, D, n, d) {
|
|
737
|
+
if (We || ke(), this.prop = "innerHTML" in r ? "innerHTML" : "textContent" in r ? "textContent" : 0, !!this.prop) {
|
|
738
|
+
this.target = r, typeof t != "object" && (t = {
|
|
739
|
+
text: t
|
|
740
|
+
});
|
|
741
|
+
var o = t.text || t.value || "", i = t.trim !== !1, a = this, c, p, h, C;
|
|
742
|
+
return a.delimiter = c = t.delimiter || "", a.original = H(Ce(r).replace(Ne, " ").split(" ").join(""), c, i), (o === "{original}" || o === !0 || o == null) && (o = a.original.join(c)), a.text = H((o || "").replace(Ne, " "), c, i), a.hasClass = !!(t.newClass || t.oldClass), a.newClass = t.newClass, a.oldClass = t.oldClass, C = c === "", a.textHasEmoji = C && !!a.text.emoji, a.charsHaveEmoji = !!t.chars && !!H(t.chars).emoji, a.length = C ? a.original.length : a.original.join(c).length, a.lengthDif = (C ? a.text.length : a.text.join(c).length) - a.length, a.fillChar = t.fillChar || t.chars && ~t.chars.indexOf(" ") ? " " : "", a.charSet = h = Dt[t.chars || "upperCase"] || new ue(t.chars), a.speed = 0.05 / (t.speed || 1), a.prevScrambleTime = 0, a.setIndex = Math.random() * 20 | 0, p = a.length + Math.max(a.lengthDif, 0), p > h.length && h.grow(p), a.chars = h.sets[a.setIndex], a.revealDelay = t.revealDelay || 0, a.tweenLength = t.tweenLength !== !1, a.tween = D, a.rightToLeft = !!t.rightToLeft, a._props.push("scrambleText", "text"), rt;
|
|
743
|
+
}
|
|
744
|
+
},
|
|
745
|
+
render: function(r, t) {
|
|
746
|
+
var D = t.target, n = t.prop, d = t.text, o = t.delimiter, i = t.tween, a = t.prevScrambleTime, c = t.revealDelay, p = t.setIndex, h = t.chars, C = t.charSet, g = t.length, B = t.textHasEmoji, T = t.charsHaveEmoji, $ = t.lengthDif, M = t.tweenLength, W = t.oldClass, k = t.newClass, v = t.rightToLeft, m = t.fillChar, w = t.speed, O = t.original, f = t.hasClass, A = d.length, _ = i._time, Y = _ - a, F, x, R, b, P, L, S, N, y, u, l;
|
|
747
|
+
c && (i._from && (_ = i._dur - _), r = _ === 0 ? 0 : _ < c ? 1e-6 : _ === i._dur ? 1 : i._ease((_ - c) / (i._dur - c))), r < 0 ? r = 0 : r > 1 && (r = 1), v && (r = 1 - r), F = ~~(r * A + 0.5), r ? ((Y > w || Y < -w) && (t.setIndex = p = (p + (Math.random() * 19 | 0)) % 20, t.chars = C.sets[p], t.prevScrambleTime += Y), b = h) : b = O.join(o), l = i._from ? r : 1 - r, u = g + (M ? i._from ? l * l * l : 1 - l * l * l : 1) * $, v ? r === 1 && (i._from || i.data === "isFromStart") ? (R = "", b = O.join(o)) : (S = d.slice(F).join(o), T ? R = H(b).slice(0, u - (B ? H(S) : S).length + 0.5 | 0).join("") : R = b.substr(0, u - (B ? H(S) : S).length + 0.5 | 0), b = S) : (R = d.slice(0, F).join(o), x = (B ? H(R) : R).length, T ? b = H(b).slice(x, u + 0.5 | 0).join("") : b = b.substr(x, u - x + 0.5 | 0)), f ? (N = v ? W : k, y = v ? k : W, P = N && F !== 0, L = y && F !== A, S = (P ? "<span class='" + N + "'>" : "") + R + (P ? "</span>" : "") + (L ? "<span class='" + y + "'>" : "") + o + b + (L ? "</span>" : "")) : S = R + o + b, D[n] = m === " " && ~S.indexOf(" ") ? S.split(" ").join(" ") : S;
|
|
748
|
+
}
|
|
749
|
+
};
|
|
750
|
+
se.emojiSafeSplit = H;
|
|
751
|
+
se.getText = Ce;
|
|
752
|
+
Me() && z.registerPlugin(se);
|
|
753
|
+
oe.registerPlugin(fe, se);
|
|
754
|
+
const Re = ({
|
|
755
|
+
radius: e = 100,
|
|
756
|
+
duration: r = 1.2,
|
|
757
|
+
speed: t = 0.5,
|
|
758
|
+
scrambleChars: D = ".:",
|
|
759
|
+
className: n = "",
|
|
760
|
+
style: d = {},
|
|
761
|
+
children: o
|
|
762
|
+
}) => {
|
|
763
|
+
const i = he(null);
|
|
764
|
+
return De(() => {
|
|
765
|
+
if (!i.current) return;
|
|
766
|
+
const a = fe.create(i.current.querySelector("p"), {
|
|
767
|
+
type: "chars",
|
|
768
|
+
charsClass: "inline-block will-change-transform"
|
|
769
|
+
});
|
|
770
|
+
a.chars.forEach((h) => {
|
|
771
|
+
const C = h;
|
|
772
|
+
oe.set(C, { attr: { "data-content": C.innerHTML } });
|
|
773
|
+
});
|
|
774
|
+
const c = (h) => {
|
|
775
|
+
a.chars.forEach((C) => {
|
|
776
|
+
const g = C, { left: B, top: T, width: $, height: M } = g.getBoundingClientRect(), W = h.clientX - (B + $ / 2), k = h.clientY - (T + M / 2), v = Math.hypot(W, k);
|
|
777
|
+
v < e && oe.to(g, {
|
|
778
|
+
overwrite: !0,
|
|
779
|
+
duration: r * (1 - v / e),
|
|
780
|
+
scrambleText: {
|
|
781
|
+
text: g.dataset.content || "",
|
|
782
|
+
chars: D,
|
|
783
|
+
speed: t
|
|
784
|
+
},
|
|
785
|
+
ease: "none"
|
|
786
|
+
});
|
|
787
|
+
});
|
|
788
|
+
}, p = i.current;
|
|
789
|
+
return p.addEventListener("pointermove", c), () => {
|
|
790
|
+
p.removeEventListener("pointermove", c), a.revert();
|
|
791
|
+
};
|
|
792
|
+
}, [e, r, t, D]), /* @__PURE__ */ s.jsx(
|
|
793
|
+
"div",
|
|
794
|
+
{
|
|
795
|
+
ref: i,
|
|
796
|
+
className: `m-[7vw] max-w-[800px] font-mono text-[clamp(14px,4vw,32px)] text-white ${n}`,
|
|
797
|
+
style: d,
|
|
798
|
+
children: /* @__PURE__ */ s.jsx("p", { children: o })
|
|
799
|
+
}
|
|
800
|
+
);
|
|
801
|
+
}, pt = () => /* @__PURE__ */ s.jsxs("div", { className: "flex flex-col items-center gap-8 w-full", children: [
|
|
802
|
+
/* @__PURE__ */ s.jsx(
|
|
803
|
+
Re,
|
|
804
|
+
{
|
|
805
|
+
radius: 120,
|
|
806
|
+
duration: 1.5,
|
|
807
|
+
speed: 0.6,
|
|
808
|
+
scrambleChars: "!<>-_\\\\/[]{}—=+*^?#________",
|
|
809
|
+
children: "Move your cursor over this text to see the scramble effect!"
|
|
810
|
+
}
|
|
811
|
+
),
|
|
812
|
+
/* @__PURE__ */ s.jsx(
|
|
813
|
+
Re,
|
|
814
|
+
{
|
|
815
|
+
radius: 100,
|
|
816
|
+
duration: 1.2,
|
|
817
|
+
speed: 0.5,
|
|
818
|
+
scrambleChars: "01",
|
|
819
|
+
className: "text-green-400",
|
|
820
|
+
children: "Binary scramble effect with 0 and 1 characters"
|
|
821
|
+
}
|
|
822
|
+
)
|
|
823
|
+
] }), st = ({
|
|
824
|
+
direction: e = "clockwise",
|
|
825
|
+
speed: r = 2,
|
|
826
|
+
color: t = "#6366f1",
|
|
827
|
+
dashLength: D = 10,
|
|
828
|
+
gapLength: n = 5,
|
|
829
|
+
width: d = 300,
|
|
830
|
+
height: o = 200,
|
|
831
|
+
strokeWidth: i = 2,
|
|
832
|
+
borderRadius: a = 0
|
|
833
|
+
}) => {
|
|
834
|
+
const c = he(null);
|
|
835
|
+
return De(() => {
|
|
836
|
+
if (!c.current) return;
|
|
837
|
+
const p = c.current, h = p.getTotalLength();
|
|
838
|
+
p.style.strokeDasharray = `${D} ${n}`, p.style.strokeDashoffset = e === "clockwise" ? h : 0;
|
|
839
|
+
let C, g = e === "clockwise" ? h : 0;
|
|
840
|
+
const B = e === "clockwise" ? -r : r, T = () => {
|
|
841
|
+
g += B, e === "clockwise" ? g <= -(D + n) && (g = 0) : g >= D + n && (g = 0), p.style.strokeDashoffset = g, C = requestAnimationFrame(T);
|
|
842
|
+
};
|
|
843
|
+
return C = requestAnimationFrame(T), () => {
|
|
844
|
+
C && cancelAnimationFrame(C);
|
|
845
|
+
};
|
|
846
|
+
}, [e, r, D, n]), /* @__PURE__ */ s.jsx(
|
|
847
|
+
"svg",
|
|
848
|
+
{
|
|
849
|
+
width: d + i * 2,
|
|
850
|
+
height: o + i * 2,
|
|
851
|
+
className: "overflow-visible",
|
|
852
|
+
children: /* @__PURE__ */ s.jsx(
|
|
853
|
+
X.rect,
|
|
854
|
+
{
|
|
855
|
+
ref: c,
|
|
856
|
+
x: i,
|
|
857
|
+
y: i,
|
|
858
|
+
width: d,
|
|
859
|
+
height: o,
|
|
860
|
+
rx: a,
|
|
861
|
+
ry: a,
|
|
862
|
+
fill: "transparent",
|
|
863
|
+
stroke: t,
|
|
864
|
+
strokeWidth: i,
|
|
865
|
+
strokeLinecap: "round",
|
|
866
|
+
initial: { opacity: 0 },
|
|
867
|
+
animate: { opacity: 1 },
|
|
868
|
+
transition: { duration: 0.5 }
|
|
869
|
+
}
|
|
870
|
+
)
|
|
871
|
+
}
|
|
872
|
+
);
|
|
873
|
+
}, ht = () => {
|
|
874
|
+
const [e, r] = Oe({
|
|
875
|
+
direction: "clockwise",
|
|
876
|
+
speed: 2,
|
|
877
|
+
color: "#6366f1",
|
|
878
|
+
dashLength: 15,
|
|
879
|
+
gapLength: 8,
|
|
880
|
+
width: 300,
|
|
881
|
+
height: 200,
|
|
882
|
+
strokeWidth: 3,
|
|
883
|
+
borderRadius: 20
|
|
884
|
+
}), t = (D, n) => {
|
|
885
|
+
r((d) => ({ ...d, [D]: n }));
|
|
886
|
+
};
|
|
887
|
+
return /* @__PURE__ */ s.jsxs("div", { className: "w-full space-y-8", children: [
|
|
888
|
+
/* @__PURE__ */ s.jsx("div", { className: "flex items-center justify-center min-h-[300px] bg-gray-900/30 rounded-xl border border-gray-800 p-8", children: /* @__PURE__ */ s.jsx(st, { ...e }) }),
|
|
889
|
+
/* @__PURE__ */ s.jsxs("div", { className: "bg-gray-800/50 rounded-xl border border-gray-700 p-6 space-y-6", children: [
|
|
890
|
+
/* @__PURE__ */ s.jsx("h3", { className: "text-lg font-semibold text-white mb-4", children: "参数调整" }),
|
|
891
|
+
/* @__PURE__ */ s.jsxs("div", { className: "space-y-2", children: [
|
|
892
|
+
/* @__PURE__ */ s.jsx("label", { className: "text-sm font-medium text-gray-300", children: "流动方向" }),
|
|
893
|
+
/* @__PURE__ */ s.jsxs("div", { className: "flex gap-4", children: [
|
|
894
|
+
/* @__PURE__ */ s.jsx(
|
|
895
|
+
"button",
|
|
896
|
+
{
|
|
897
|
+
onClick: () => t("direction", "clockwise"),
|
|
898
|
+
className: `px-4 py-2 rounded-lg font-medium transition-all ${e.direction === "clockwise" ? "bg-indigo-600 text-white" : "bg-gray-700 text-gray-300 hover:bg-gray-600"}`,
|
|
899
|
+
children: "顺时针"
|
|
900
|
+
}
|
|
901
|
+
),
|
|
902
|
+
/* @__PURE__ */ s.jsx(
|
|
903
|
+
"button",
|
|
904
|
+
{
|
|
905
|
+
onClick: () => t("direction", "counterclockwise"),
|
|
906
|
+
className: `px-4 py-2 rounded-lg font-medium transition-all ${e.direction === "counterclockwise" ? "bg-indigo-600 text-white" : "bg-gray-700 text-gray-300 hover:bg-gray-600"}`,
|
|
907
|
+
children: "逆时针"
|
|
908
|
+
}
|
|
909
|
+
)
|
|
910
|
+
] })
|
|
911
|
+
] }),
|
|
912
|
+
/* @__PURE__ */ s.jsxs("div", { className: "space-y-2", children: [
|
|
913
|
+
/* @__PURE__ */ s.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
914
|
+
/* @__PURE__ */ s.jsx("label", { className: "text-sm font-medium text-gray-300", children: "流动速度" }),
|
|
915
|
+
/* @__PURE__ */ s.jsx(
|
|
916
|
+
"input",
|
|
917
|
+
{
|
|
918
|
+
type: "number",
|
|
919
|
+
value: e.speed,
|
|
920
|
+
onChange: (D) => t("speed", parseFloat(D.target.value)),
|
|
921
|
+
className: "w-20 px-3 py-1 bg-gray-700 text-white rounded-lg border border-gray-600 focus:border-indigo-500 focus:outline-none",
|
|
922
|
+
min: "0.1",
|
|
923
|
+
max: "10",
|
|
924
|
+
step: "0.1"
|
|
925
|
+
}
|
|
926
|
+
)
|
|
927
|
+
] }),
|
|
928
|
+
/* @__PURE__ */ s.jsx(
|
|
929
|
+
"input",
|
|
930
|
+
{
|
|
931
|
+
type: "range",
|
|
932
|
+
value: e.speed,
|
|
933
|
+
onChange: (D) => t("speed", parseFloat(D.target.value)),
|
|
934
|
+
className: "w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer accent-indigo-600",
|
|
935
|
+
min: "0.1",
|
|
936
|
+
max: "10",
|
|
937
|
+
step: "0.1"
|
|
938
|
+
}
|
|
939
|
+
)
|
|
940
|
+
] }),
|
|
941
|
+
/* @__PURE__ */ s.jsxs("div", { className: "space-y-2", children: [
|
|
942
|
+
/* @__PURE__ */ s.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
943
|
+
/* @__PURE__ */ s.jsx("label", { className: "text-sm font-medium text-gray-300", children: "实线长度" }),
|
|
944
|
+
/* @__PURE__ */ s.jsx(
|
|
945
|
+
"input",
|
|
946
|
+
{
|
|
947
|
+
type: "number",
|
|
948
|
+
value: e.dashLength,
|
|
949
|
+
onChange: (D) => t("dashLength", parseInt(D.target.value)),
|
|
950
|
+
className: "w-20 px-3 py-1 bg-gray-700 text-white rounded-lg border border-gray-600 focus:border-indigo-500 focus:outline-none",
|
|
951
|
+
min: "1",
|
|
952
|
+
max: "50"
|
|
953
|
+
}
|
|
954
|
+
)
|
|
955
|
+
] }),
|
|
956
|
+
/* @__PURE__ */ s.jsx(
|
|
957
|
+
"input",
|
|
958
|
+
{
|
|
959
|
+
type: "range",
|
|
960
|
+
value: e.dashLength,
|
|
961
|
+
onChange: (D) => t("dashLength", parseInt(D.target.value)),
|
|
962
|
+
className: "w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer accent-indigo-600",
|
|
963
|
+
min: "1",
|
|
964
|
+
max: "50"
|
|
965
|
+
}
|
|
966
|
+
)
|
|
967
|
+
] }),
|
|
968
|
+
/* @__PURE__ */ s.jsxs("div", { className: "space-y-2", children: [
|
|
969
|
+
/* @__PURE__ */ s.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
970
|
+
/* @__PURE__ */ s.jsx("label", { className: "text-sm font-medium text-gray-300", children: "间隔长度" }),
|
|
971
|
+
/* @__PURE__ */ s.jsx(
|
|
972
|
+
"input",
|
|
973
|
+
{
|
|
974
|
+
type: "number",
|
|
975
|
+
value: e.gapLength,
|
|
976
|
+
onChange: (D) => t("gapLength", parseInt(D.target.value)),
|
|
977
|
+
className: "w-20 px-3 py-1 bg-gray-700 text-white rounded-lg border border-gray-600 focus:border-indigo-500 focus:outline-none",
|
|
978
|
+
min: "1",
|
|
979
|
+
max: "50"
|
|
980
|
+
}
|
|
981
|
+
)
|
|
982
|
+
] }),
|
|
983
|
+
/* @__PURE__ */ s.jsx(
|
|
984
|
+
"input",
|
|
985
|
+
{
|
|
986
|
+
type: "range",
|
|
987
|
+
value: e.gapLength,
|
|
988
|
+
onChange: (D) => t("gapLength", parseInt(D.target.value)),
|
|
989
|
+
className: "w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer accent-indigo-600",
|
|
990
|
+
min: "1",
|
|
991
|
+
max: "50"
|
|
992
|
+
}
|
|
993
|
+
)
|
|
994
|
+
] }),
|
|
995
|
+
/* @__PURE__ */ s.jsxs("div", { className: "space-y-2", children: [
|
|
996
|
+
/* @__PURE__ */ s.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
997
|
+
/* @__PURE__ */ s.jsx("label", { className: "text-sm font-medium text-gray-300", children: "线条粗细" }),
|
|
998
|
+
/* @__PURE__ */ s.jsx(
|
|
999
|
+
"input",
|
|
1000
|
+
{
|
|
1001
|
+
type: "number",
|
|
1002
|
+
value: e.strokeWidth,
|
|
1003
|
+
onChange: (D) => t("strokeWidth", parseInt(D.target.value)),
|
|
1004
|
+
className: "w-20 px-3 py-1 bg-gray-700 text-white rounded-lg border border-gray-600 focus:border-indigo-500 focus:outline-none",
|
|
1005
|
+
min: "1",
|
|
1006
|
+
max: "10"
|
|
1007
|
+
}
|
|
1008
|
+
)
|
|
1009
|
+
] }),
|
|
1010
|
+
/* @__PURE__ */ s.jsx(
|
|
1011
|
+
"input",
|
|
1012
|
+
{
|
|
1013
|
+
type: "range",
|
|
1014
|
+
value: e.strokeWidth,
|
|
1015
|
+
onChange: (D) => t("strokeWidth", parseInt(D.target.value)),
|
|
1016
|
+
className: "w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer accent-indigo-600",
|
|
1017
|
+
min: "1",
|
|
1018
|
+
max: "10"
|
|
1019
|
+
}
|
|
1020
|
+
)
|
|
1021
|
+
] }),
|
|
1022
|
+
/* @__PURE__ */ s.jsxs("div", { className: "space-y-2", children: [
|
|
1023
|
+
/* @__PURE__ */ s.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
1024
|
+
/* @__PURE__ */ s.jsx("label", { className: "text-sm font-medium text-gray-300", children: "圆角半径" }),
|
|
1025
|
+
/* @__PURE__ */ s.jsx(
|
|
1026
|
+
"input",
|
|
1027
|
+
{
|
|
1028
|
+
type: "number",
|
|
1029
|
+
value: e.borderRadius,
|
|
1030
|
+
onChange: (D) => t("borderRadius", parseInt(D.target.value)),
|
|
1031
|
+
className: "w-20 px-3 py-1 bg-gray-700 text-white rounded-lg border border-gray-600 focus:border-indigo-500 focus:outline-none",
|
|
1032
|
+
min: "0",
|
|
1033
|
+
max: "100"
|
|
1034
|
+
}
|
|
1035
|
+
)
|
|
1036
|
+
] }),
|
|
1037
|
+
/* @__PURE__ */ s.jsx(
|
|
1038
|
+
"input",
|
|
1039
|
+
{
|
|
1040
|
+
type: "range",
|
|
1041
|
+
value: e.borderRadius,
|
|
1042
|
+
onChange: (D) => t("borderRadius", parseInt(D.target.value)),
|
|
1043
|
+
className: "w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer accent-indigo-600",
|
|
1044
|
+
min: "0",
|
|
1045
|
+
max: "100"
|
|
1046
|
+
}
|
|
1047
|
+
)
|
|
1048
|
+
] }),
|
|
1049
|
+
/* @__PURE__ */ s.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
1050
|
+
/* @__PURE__ */ s.jsxs("div", { className: "space-y-2", children: [
|
|
1051
|
+
/* @__PURE__ */ s.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
1052
|
+
/* @__PURE__ */ s.jsx("label", { className: "text-sm font-medium text-gray-300", children: "宽度" }),
|
|
1053
|
+
/* @__PURE__ */ s.jsx(
|
|
1054
|
+
"input",
|
|
1055
|
+
{
|
|
1056
|
+
type: "number",
|
|
1057
|
+
value: e.width,
|
|
1058
|
+
onChange: (D) => t("width", parseInt(D.target.value)),
|
|
1059
|
+
className: "w-20 px-3 py-1 bg-gray-700 text-white rounded-lg border border-gray-600 focus:border-indigo-500 focus:outline-none",
|
|
1060
|
+
min: "50",
|
|
1061
|
+
max: "600"
|
|
1062
|
+
}
|
|
1063
|
+
)
|
|
1064
|
+
] }),
|
|
1065
|
+
/* @__PURE__ */ s.jsx(
|
|
1066
|
+
"input",
|
|
1067
|
+
{
|
|
1068
|
+
type: "range",
|
|
1069
|
+
value: e.width,
|
|
1070
|
+
onChange: (D) => t("width", parseInt(D.target.value)),
|
|
1071
|
+
className: "w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer accent-indigo-600",
|
|
1072
|
+
min: "50",
|
|
1073
|
+
max: "600"
|
|
1074
|
+
}
|
|
1075
|
+
)
|
|
1076
|
+
] }),
|
|
1077
|
+
/* @__PURE__ */ s.jsxs("div", { className: "space-y-2", children: [
|
|
1078
|
+
/* @__PURE__ */ s.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
1079
|
+
/* @__PURE__ */ s.jsx("label", { className: "text-sm font-medium text-gray-300", children: "高度" }),
|
|
1080
|
+
/* @__PURE__ */ s.jsx(
|
|
1081
|
+
"input",
|
|
1082
|
+
{
|
|
1083
|
+
type: "number",
|
|
1084
|
+
value: e.height,
|
|
1085
|
+
onChange: (D) => t("height", parseInt(D.target.value)),
|
|
1086
|
+
className: "w-20 px-3 py-1 bg-gray-700 text-white rounded-lg border border-gray-600 focus:border-indigo-500 focus:outline-none",
|
|
1087
|
+
min: "50",
|
|
1088
|
+
max: "400"
|
|
1089
|
+
}
|
|
1090
|
+
)
|
|
1091
|
+
] }),
|
|
1092
|
+
/* @__PURE__ */ s.jsx(
|
|
1093
|
+
"input",
|
|
1094
|
+
{
|
|
1095
|
+
type: "range",
|
|
1096
|
+
value: e.height,
|
|
1097
|
+
onChange: (D) => t("height", parseInt(D.target.value)),
|
|
1098
|
+
className: "w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer accent-indigo-600",
|
|
1099
|
+
min: "50",
|
|
1100
|
+
max: "400"
|
|
1101
|
+
}
|
|
1102
|
+
)
|
|
1103
|
+
] })
|
|
1104
|
+
] }),
|
|
1105
|
+
/* @__PURE__ */ s.jsxs("div", { className: "space-y-2", children: [
|
|
1106
|
+
/* @__PURE__ */ s.jsx("label", { className: "text-sm font-medium text-gray-300", children: "边框颜色" }),
|
|
1107
|
+
/* @__PURE__ */ s.jsxs("div", { className: "flex gap-3 items-center", children: [
|
|
1108
|
+
/* @__PURE__ */ s.jsx(
|
|
1109
|
+
"input",
|
|
1110
|
+
{
|
|
1111
|
+
type: "color",
|
|
1112
|
+
value: e.color,
|
|
1113
|
+
onChange: (D) => t("color", D.target.value),
|
|
1114
|
+
className: "w-12 h-12 rounded-lg cursor-pointer bg-gray-700 border-2 border-gray-600"
|
|
1115
|
+
}
|
|
1116
|
+
),
|
|
1117
|
+
/* @__PURE__ */ s.jsx(
|
|
1118
|
+
"input",
|
|
1119
|
+
{
|
|
1120
|
+
type: "text",
|
|
1121
|
+
value: e.color,
|
|
1122
|
+
onChange: (D) => t("color", D.target.value),
|
|
1123
|
+
className: "flex-1 px-3 py-2 bg-gray-700 text-white rounded-lg border border-gray-600 focus:border-indigo-500 focus:outline-none font-mono",
|
|
1124
|
+
placeholder: "#6366f1"
|
|
1125
|
+
}
|
|
1126
|
+
)
|
|
1127
|
+
] })
|
|
1128
|
+
] }),
|
|
1129
|
+
/* @__PURE__ */ s.jsxs("div", { className: "space-y-2", children: [
|
|
1130
|
+
/* @__PURE__ */ s.jsx("label", { className: "text-sm font-medium text-gray-300", children: "快速选择颜色" }),
|
|
1131
|
+
/* @__PURE__ */ s.jsx("div", { className: "flex gap-2 flex-wrap", children: ["#6366f1", "#ec4899", "#10b981", "#f59e0b", "#8b5cf6", "#ef4444"].map((D) => /* @__PURE__ */ s.jsx(
|
|
1132
|
+
"button",
|
|
1133
|
+
{
|
|
1134
|
+
onClick: () => t("color", D),
|
|
1135
|
+
className: "w-10 h-10 rounded-lg border-2 transition-all hover:scale-110",
|
|
1136
|
+
style: {
|
|
1137
|
+
backgroundColor: D,
|
|
1138
|
+
borderColor: e.color === D ? "#fff" : D
|
|
1139
|
+
}
|
|
1140
|
+
},
|
|
1141
|
+
D
|
|
1142
|
+
)) })
|
|
1143
|
+
] })
|
|
1144
|
+
] })
|
|
1145
|
+
] });
|
|
1146
|
+
};
|
|
1147
|
+
export {
|
|
1148
|
+
ct as BlurText,
|
|
1149
|
+
lt as BounceIn,
|
|
1150
|
+
dt as CircularText,
|
|
1151
|
+
ht as FlowingDashedBox,
|
|
1152
|
+
ot as GlowCard,
|
|
1153
|
+
pt as ScrambledText
|
|
1154
|
+
};
|
|
1155
|
+
//# sourceMappingURL=index.js.map
|