adaptive-ui-react 0.0.0-stage → 0.1.1

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/dist/index.js ADDED
@@ -0,0 +1,1815 @@
1
+ "use client";
2
+
3
+ // src/components/ui/image-scroll.jsx
4
+ import React2, { useState } from "react";
5
+
6
+ // src/components/ui/image-scroll.module.css
7
+ var image_scroll_default = {};
8
+
9
+ // src/components/ui/image-scroll.jsx
10
+ import { ArrowUpRight, Image as ImageIcon } from "lucide-react";
11
+ var DEFAULT_SCROLL_IMAGES = [
12
+ {
13
+ id: 1,
14
+ src: "https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?auto=format&fit=crop&w=700&q=80",
15
+ title: "Quantum Fluidity",
16
+ category: "3D ART",
17
+ accent: "#6366f1"
18
+ },
19
+ {
20
+ id: 2,
21
+ src: "https://images.unsplash.com/photo-1634017839464-5c339ebe3cb4?auto=format&fit=crop&w=700&q=80",
22
+ title: "Prism Dimensions",
23
+ category: "GEOMETRY",
24
+ accent: "#ec4899"
25
+ },
26
+ {
27
+ id: 3,
28
+ src: "https://images.unsplash.com/photo-1618005198919-d3d4b5a92ead?auto=format&fit=crop&w=700&q=80",
29
+ title: "Holographic Veil",
30
+ category: "SYNTH",
31
+ accent: "#10b981"
32
+ },
33
+ {
34
+ id: 4,
35
+ src: "https://images.unsplash.com/photo-1633167606207-d840b5070fc2?auto=format&fit=crop&w=700&q=80",
36
+ title: "Neon Nexus",
37
+ category: "CYBER",
38
+ accent: "#06b6d4"
39
+ },
40
+ {
41
+ id: 5,
42
+ src: "https://images.unsplash.com/photo-1614850523459-c2f4c699c52e?auto=format&fit=crop&w=700&q=80",
43
+ title: "Chromatic Wave",
44
+ category: "GRADIENT",
45
+ accent: "#f59e0b"
46
+ },
47
+ {
48
+ id: 6,
49
+ src: "https://images.unsplash.com/photo-1620641788421-7a1c342ea42e?auto=format&fit=crop&w=700&q=80",
50
+ title: "Iridescent Orbit",
51
+ category: "SPATIAL",
52
+ accent: "#8b5cf6"
53
+ },
54
+ {
55
+ id: 7,
56
+ src: "https://images.unsplash.com/photo-1635070041078-e363dbe005cb?auto=format&fit=crop&w=700&q=80",
57
+ title: "Vortex Singularity",
58
+ category: "MOTION",
59
+ accent: "#14b8a6"
60
+ },
61
+ {
62
+ id: 8,
63
+ src: "https://images.unsplash.com/photo-1618172193763-c511deb635ca?auto=format&fit=crop&w=700&q=80",
64
+ title: "Monolith Monad",
65
+ category: "ABSTRACT",
66
+ accent: "#e11d48"
67
+ },
68
+ {
69
+ id: 9,
70
+ src: "https://images.unsplash.com/photo-1607604276583-eef5d076aa5f?auto=format&fit=crop&w=700&q=80",
71
+ title: "Cyber Horizon",
72
+ category: "CITY",
73
+ accent: "#38bdf8"
74
+ }
75
+ ];
76
+ function DefaultImageCard({ item, cardWidth, cardHeight, onCardClick }) {
77
+ const [imgError, setImgError] = useState(false);
78
+ const src = typeof item === "string" ? item : item == null ? void 0 : item.src;
79
+ const title = typeof item === "string" ? "Creative Asset" : (item == null ? void 0 : item.title) || "Visual Frame";
80
+ const category = typeof item === "string" ? "ASSET" : (item == null ? void 0 : item.category) || "GALLERY";
81
+ const accent = typeof item === "object" && (item == null ? void 0 : item.accent) ? item.accent : "#10b981";
82
+ return /* @__PURE__ */ React2.createElement(
83
+ "div",
84
+ {
85
+ onClick: () => onCardClick == null ? void 0 : onCardClick(item),
86
+ style: {
87
+ width: cardWidth,
88
+ height: cardHeight
89
+ },
90
+ className: "group relative shrink-0 cursor-pointer overflow-hidden rounded-2xl border border-white/10 bg-zinc-900/90 shadow-xl transition-all duration-300 hover:border-white/25 hover:shadow-2xl hover:shadow-black/60"
91
+ },
92
+ /* @__PURE__ */ React2.createElement(
93
+ "div",
94
+ {
95
+ className: "absolute inset-0 bg-gradient-to-br from-zinc-800 via-zinc-900 to-black",
96
+ style: {
97
+ backgroundImage: imgError ? `radial-gradient(circle at 50% 30%, ${accent}25, transparent 70%), linear-gradient(to bottom, #18181b, #09090b)` : void 0
98
+ }
99
+ }
100
+ ),
101
+ !imgError && src && // eslint-disable-next-line @next/next/no-img-element
102
+ /* @__PURE__ */ React2.createElement(
103
+ "img",
104
+ {
105
+ src,
106
+ alt: title,
107
+ loading: "lazy",
108
+ decoding: "async",
109
+ onError: () => setImgError(true),
110
+ className: "absolute inset-0 h-full w-full object-cover transition-transform duration-700 ease-out group-hover:scale-108"
111
+ }
112
+ ),
113
+ imgError && /* @__PURE__ */ React2.createElement("div", { className: "absolute inset-0 flex flex-col items-center justify-center gap-2 p-4 text-center" }, /* @__PURE__ */ React2.createElement(
114
+ "div",
115
+ {
116
+ className: "flex size-10 items-center justify-center rounded-xl border border-white/10 bg-white/5 backdrop-blur-sm",
117
+ style: { color: accent }
118
+ },
119
+ /* @__PURE__ */ React2.createElement(ImageIcon, { className: "size-5" })
120
+ ), /* @__PURE__ */ React2.createElement("span", { className: "font-mono text-xs uppercase tracking-wider text-zinc-400" }, title)),
121
+ /* @__PURE__ */ React2.createElement("div", { className: "pointer-events-none absolute inset-0 bg-gradient-to-t from-black/85 via-black/25 to-transparent transition-opacity duration-300 group-hover:from-black/90" }),
122
+ /* @__PURE__ */ React2.createElement(
123
+ "div",
124
+ {
125
+ className: "pointer-events-none absolute -inset-px rounded-2xl opacity-0 transition-opacity duration-300 group-hover:opacity-100",
126
+ style: {
127
+ boxShadow: `inset 0 0 0 1px ${accent}66, 0 0 24px -6px ${accent}40`
128
+ }
129
+ }
130
+ ),
131
+ /* @__PURE__ */ React2.createElement("div", { className: "absolute inset-x-0 bottom-0 flex flex-col justify-end p-3 sm:p-4" }, /* @__PURE__ */ React2.createElement("div", { className: "flex items-center justify-between gap-2" }, /* @__PURE__ */ React2.createElement(
132
+ "span",
133
+ {
134
+ className: "inline-flex items-center gap-1.5 rounded-full border border-white/15 bg-black/60 px-2 py-0.5 font-mono text-[10px] sm:text-[11px] font-semibold tracking-wider uppercase text-white backdrop-blur-md",
135
+ style: { borderLeftColor: accent, borderLeftWidth: "2.5px" }
136
+ },
137
+ category
138
+ ), /* @__PURE__ */ React2.createElement("span", { className: "flex size-6 sm:size-7 items-center justify-center rounded-full bg-white/10 text-white/70 opacity-0 transition-all duration-300 group-hover:opacity-100 group-hover:scale-110" }, /* @__PURE__ */ React2.createElement(ArrowUpRight, { className: "size-3 sm:size-3.5" }))), /* @__PURE__ */ React2.createElement("h4", { className: "mt-1.5 line-clamp-1 font-sans text-xs sm:text-sm font-bold tracking-wide text-white drop-shadow" }, title))
139
+ );
140
+ }
141
+ function prepareTrackItems(items) {
142
+ if (!items || items.length === 0) return [];
143
+ let base = [...items];
144
+ while (base.length < 6) {
145
+ base = [...base, ...items];
146
+ }
147
+ return [...base, ...base];
148
+ }
149
+ function distributeItems(items, count) {
150
+ const tracks = Array.from({ length: count }, () => []);
151
+ items.forEach((item, index) => {
152
+ tracks[index % count].push(item);
153
+ });
154
+ return tracks;
155
+ }
156
+ function ImageScroll({
157
+ direction = "vertical",
158
+ images = DEFAULT_SCROLL_IMAGES,
159
+ speed = 1,
160
+ reverse = false,
161
+ pauseOnHover = true,
162
+ columns = 3,
163
+ rows = 3,
164
+ staggerDirection = true,
165
+ gap = 18,
166
+ blurEdges = true,
167
+ height = "560px",
168
+ tilt = false,
169
+ cardWidth,
170
+ cardHeight,
171
+ renderItem,
172
+ onCardClick,
173
+ className = "",
174
+ style = {}
175
+ }) {
176
+ const isVertical = direction === "vertical";
177
+ const numTracks = isVertical ? Math.max(1, columns) : Math.max(1, rows);
178
+ const trackItemGroups = distributeItems(images, numTracks);
179
+ const normalizedSpeed = Number(speed) || 1;
180
+ const baseDuration = isVertical ? normalizedSpeed <= 8 ? 28 / Math.max(0.1, normalizedSpeed) : Math.max(4, 65 - normalizedSpeed) : normalizedSpeed <= 8 ? 42 / Math.max(0.1, normalizedSpeed) : Math.max(6, 90 - normalizedSpeed);
181
+ const defaultWidth = isVertical ? cardWidth || "250px" : cardWidth || (numTracks >= 3 ? "240px" : "280px");
182
+ const defaultHeight = isVertical ? cardHeight || "280px" : cardHeight || (numTracks >= 3 ? "165px" : "210px");
183
+ const containerStyles = {
184
+ "--scroll-gap": `${gap}px`,
185
+ "--container-height": height,
186
+ ...style
187
+ };
188
+ return /* @__PURE__ */ React2.createElement(
189
+ "div",
190
+ {
191
+ style: containerStyles,
192
+ className: `
193
+ ${image_scroll_default.container}
194
+ ${tilt ? image_scroll_default.tiltPerspective : ""}
195
+ ${pauseOnHover ? image_scroll_default.pauseHover : ""}
196
+ ${isVertical && blurEdges ? image_scroll_default.fadeMaskVertical : ""}
197
+ ${!isVertical && blurEdges ? image_scroll_default.fadeMaskHorizontal : ""}
198
+ ${className}
199
+ `
200
+ },
201
+ /* @__PURE__ */ React2.createElement("div", { className: tilt ? image_scroll_default.tiltInner : "" }, isVertical ? (
202
+ /* ================= VERTICAL COLUMNS ================= */
203
+ /* @__PURE__ */ React2.createElement("div", { className: image_scroll_default.verticalWrapper }, trackItemGroups.map((group, colIdx) => {
204
+ const isColReverse = staggerDirection ? colIdx % 2 === 1 ? !reverse : reverse : reverse;
205
+ const colSpeed = staggerDirection ? baseDuration * (1 + colIdx % 3 * 0.15) : baseDuration;
206
+ const trackItems = prepareTrackItems(group);
207
+ return /* @__PURE__ */ React2.createElement(
208
+ "div",
209
+ {
210
+ key: `col-${colIdx}`,
211
+ className: isColReverse ? image_scroll_default.verticalTrackReverse : image_scroll_default.verticalTrack,
212
+ style: {
213
+ animationDuration: `${colSpeed}s`
214
+ }
215
+ },
216
+ trackItems.map((item, itemIdx) => /* @__PURE__ */ React2.createElement(React2.Fragment, { key: `v-item-${colIdx}-${itemIdx}` }, renderItem ? renderItem(item, itemIdx) : /* @__PURE__ */ React2.createElement(
217
+ DefaultImageCard,
218
+ {
219
+ item,
220
+ cardWidth: defaultWidth,
221
+ cardHeight: defaultHeight,
222
+ onCardClick
223
+ }
224
+ )))
225
+ );
226
+ }))
227
+ ) : (
228
+ /* ================= HORIZONTAL ROWS ================= */
229
+ /* @__PURE__ */ React2.createElement("div", { className: image_scroll_default.horizontalWrapper }, trackItemGroups.map((group, rowIdx) => {
230
+ const isRowReverse = staggerDirection ? rowIdx % 2 === 1 ? !reverse : reverse : reverse;
231
+ const rowSpeed = staggerDirection ? baseDuration * (1 + rowIdx % 3 * 0.15) : baseDuration;
232
+ const trackItems = prepareTrackItems(group);
233
+ return /* @__PURE__ */ React2.createElement(
234
+ "div",
235
+ {
236
+ key: `row-${rowIdx}`,
237
+ className: isRowReverse ? image_scroll_default.horizontalTrackReverse : image_scroll_default.horizontalTrack,
238
+ style: {
239
+ animationDuration: `${rowSpeed}s`
240
+ }
241
+ },
242
+ trackItems.map((item, itemIdx) => /* @__PURE__ */ React2.createElement(React2.Fragment, { key: `h-item-${rowIdx}-${itemIdx}` }, renderItem ? renderItem(item, itemIdx) : /* @__PURE__ */ React2.createElement(
243
+ DefaultImageCard,
244
+ {
245
+ item,
246
+ cardWidth: defaultWidth,
247
+ cardHeight: defaultHeight,
248
+ onCardClick
249
+ }
250
+ )))
251
+ );
252
+ }))
253
+ ))
254
+ );
255
+ }
256
+ var InfiniteImageScroll = ImageScroll;
257
+
258
+ // src/components/ui/interactive-ascii-face.jsx
259
+ import { useEffect, useRef, useState as useState2 } from "react";
260
+
261
+ // src/components/ui/interactive-ascii-face.module.css
262
+ var interactive_ascii_face_default = {};
263
+
264
+ // src/components/ui/interactive-ascii-face.jsx
265
+ var REFERENCE = "/images/ascii-portrait.png";
266
+ var GLYPHS = [".:;|`", "il/+=:", "xovucz", "7TZH28", "NWM#@%"];
267
+ var MASK_WIDTH = 360;
268
+ var MASK_HEIGHT = 432;
269
+ var CELL_WIDTH = 5;
270
+ var CELL_HEIGHT = 7;
271
+ function sampleImage(image, cropReference) {
272
+ const canvas = document.createElement("canvas");
273
+ canvas.width = MASK_WIDTH;
274
+ canvas.height = MASK_HEIGHT;
275
+ const context = canvas.getContext("2d");
276
+ if (!context) throw new Error("Canvas unavailable");
277
+ const sourceHeight = cropReference ? 610 : image.naturalHeight;
278
+ const scale = cropReference ? Math.min(500 / image.naturalWidth, 610 / sourceHeight) : Math.max(500 / image.naturalWidth, 610 / sourceHeight);
279
+ const width = image.naturalWidth * scale * MASK_WIDTH / 500;
280
+ const height = sourceHeight * scale * MASK_HEIGHT / 610;
281
+ const left = (MASK_WIDTH - width) / 2;
282
+ const top = (MASK_HEIGHT - height) / 2;
283
+ context.drawImage(image, 0, 0, image.naturalWidth, sourceHeight, left, top, width, height);
284
+ const { data } = context.getImageData(0, 0, MASK_WIDTH, MASK_HEIGHT);
285
+ const tones = Float32Array.from({ length: MASK_WIDTH * MASK_HEIGHT }, (_, i) => {
286
+ const index = i * 4;
287
+ const luminance = (0.2126 * data[index] + 0.7152 * data[index + 1] + 0.0722 * data[index + 2]) / 255;
288
+ return luminance * data[index + 3] / 255;
289
+ });
290
+ const visibleTones = Array.from(tones).filter((_, i) => data[i * 4 + 3] >= 245).sort((a, b) => a - b);
291
+ const shadow = Math.min(0.1, (visibleTones[Math.floor(visibleTones.length * 0.08)] ?? 0) * 0.8);
292
+ const highlight = Math.max(0.48, visibleTones[Math.floor(visibleTones.length * 0.92)] ?? 1);
293
+ const detailed = tones.map((tone, i) => {
294
+ if (data[i * 4 + 3] === 0) return 0;
295
+ const x = i % MASK_WIDTH;
296
+ const neighbors = ((x > 0 ? tones[i - 1] : tone) + (x < MASK_WIDTH - 1 ? tones[i + 1] : tone) + (tones[i - MASK_WIDTH] ?? tone) + (tones[i + MASK_WIDTH] ?? tone)) / 4;
297
+ const detailedTone = tone + (tone - neighbors) * 0.45;
298
+ if (cropReference) return Math.min(1, Math.max(0, (detailedTone - 0.045) / 0.91)) ** 0.55;
299
+ return Math.min(1, Math.max(0, (detailedTone - shadow) / (highlight - shadow))) ** 0.75;
300
+ });
301
+ const foreground = cropReference ? void 0 : Uint8Array.from(data, (_, index) => data[index * 4 + 3] > 12 ? 1 : 0);
302
+ return { tones: detailed, foreground };
303
+ }
304
+ function animateRain(canvas, portrait, image, pointer, settings) {
305
+ const context = canvas.getContext("2d");
306
+ if (!context) return;
307
+ let renderWidth = 1;
308
+ let renderHeight = 1;
309
+ let rainTime = 0;
310
+ let frame = 0;
311
+ let lastPaint = -Infinity;
312
+ let offsetX = 0;
313
+ let offsetY = 0;
314
+ function paint(delta = 1e3 / 60) {
315
+ var _a;
316
+ if (!context) return;
317
+ const width = renderWidth;
318
+ const height = renderHeight;
319
+ const portraitWidth = portrait.offsetWidth;
320
+ const portraitHeight = portrait.offsetHeight;
321
+ const { color, imageClarity, mouseSpeed } = settings.current;
322
+ const interaction = pointer.current;
323
+ const response = Math.min(1.8, Math.max(0.3, mouseSpeed || 1));
324
+ const follow = 1 - Math.exp(-delta * 0.011 * response);
325
+ offsetX += (((interaction == null ? void 0 : interaction.offset.x) ?? 0) - offsetX) * follow;
326
+ offsetY += (((interaction == null ? void 0 : interaction.offset.y) ?? 0) - offsetY) * follow;
327
+ const left = (width - portraitWidth) / 2 + offsetX;
328
+ const top = (height - portraitHeight) / 2 + offsetY;
329
+ context.globalAlpha = 1;
330
+ context.clearRect(0, 0, width, height);
331
+ const mask = image == null ? void 0 : image.tones;
332
+ context.fillStyle = color;
333
+ context.font = "6px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace";
334
+ context.textAlign = "center";
335
+ context.textBaseline = "middle";
336
+ for (let x = CELL_WIDTH / 2, column = 0; x < width; x += CELL_WIDTH, column++) {
337
+ const speed = 42 + column * 17 % 28;
338
+ const trail = 160 + column * 41 % 66;
339
+ const cycle = trail + 72 + column * 13 % 45;
340
+ const travel = rainTime * speed / 1e3 + column * 137;
341
+ const head = travel % cycle;
342
+ const traveledRows = Math.floor(travel / CELL_HEIGHT);
343
+ const maskX = Math.floor((x - left) / portraitWidth * MASK_WIDTH);
344
+ for (let y = CELL_HEIGHT / 2, row = 0; y < height; y += CELL_HEIGHT, row++) {
345
+ const maskY = Math.floor((y - top) / portraitHeight * MASK_HEIGHT);
346
+ const tone = mask && maskX >= 0 && maskX < MASK_WIDTH && maskY >= 0 && maskY < MASK_HEIGHT ? mask[maskY * MASK_WIDTH + maskX] : 0;
347
+ const distance = (head - y % cycle + cycle) % cycle;
348
+ const strength = Math.max(0, 1 - distance / trail) ** 1.25;
349
+ const glyphRow = row - traveledRows;
350
+ const seed = Math.imul(column + 1, 374761393) ^ Math.imul(glyphRow, 668265263);
351
+ const imageIndex = maskX >= 0 && maskX < MASK_WIDTH && maskY >= 0 && maskY < MASK_HEIGHT ? maskY * MASK_WIDTH + maskX : -1;
352
+ const belongsToUpload = imageIndex >= 0 && ((_a = image == null ? void 0 : image.foreground) == null ? void 0 : _a[imageIndex]) === 1;
353
+ const belongsToPortrait = imageIndex >= 0 && (belongsToUpload || !(image == null ? void 0 : image.foreground) && tone > 0.035);
354
+ const imageTone = belongsToUpload ? Math.min(1, 0.36 + tone * Math.max(0.5, imageClarity)) : Math.min(1, tone * Math.max(0.5, imageClarity));
355
+ if (!belongsToPortrait && strength < 0.09) continue;
356
+ const visualTone = belongsToPortrait ? imageTone : strength * 0.78;
357
+ const group = Math.round(visualTone * (GLYPHS.length - 1));
358
+ const glyphs = GLYPHS[group];
359
+ const glyph = ((seed ^ seed >>> 13 ^ Math.imul(traveledRows, 1274126177)) >>> 0) % glyphs.length;
360
+ context.globalAlpha = belongsToPortrait ? Math.min(1, 0.28 + imageTone * 0.72) : Math.min(0.7, 0.06 + strength * 0.62);
361
+ context.fillText(glyphs[glyph], x, y);
362
+ }
363
+ }
364
+ }
365
+ function tick(time) {
366
+ const delta = Number.isFinite(lastPaint) ? Math.min(34, time - lastPaint) : 1e3 / 60;
367
+ rainTime += delta * Math.max(0, settings.current.lineSpeed ?? 1);
368
+ paint(delta);
369
+ lastPaint = time;
370
+ frame = requestAnimationFrame(tick);
371
+ }
372
+ function resize() {
373
+ if (!context) return;
374
+ const pixelRatio = Math.min(window.devicePixelRatio || 1, 2);
375
+ renderWidth = Math.max(1, Math.round(canvas.clientWidth));
376
+ renderHeight = Math.max(1, Math.round(canvas.clientHeight));
377
+ canvas.width = renderWidth * pixelRatio;
378
+ canvas.height = renderHeight * pixelRatio;
379
+ context.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);
380
+ context.imageSmoothingEnabled = false;
381
+ paint();
382
+ }
383
+ const observer = new ResizeObserver(resize);
384
+ observer.observe(canvas);
385
+ resize();
386
+ frame = requestAnimationFrame(tick);
387
+ return {
388
+ paint,
389
+ dispose: () => {
390
+ observer.disconnect();
391
+ cancelAnimationFrame(frame);
392
+ }
393
+ };
394
+ }
395
+ function InteractiveAsciiFace({
396
+ src,
397
+ alt = "Human portrait formed from green ASCII characters",
398
+ followPointer = true,
399
+ maxOffset = 22,
400
+ color = "#60ed83",
401
+ lineSpeed = 1,
402
+ mouseSpeed = 1,
403
+ imageClarity = 1.35,
404
+ className = ""
405
+ }) {
406
+ const fieldRef = useRef(null);
407
+ const portraitRef = useRef(null);
408
+ const pointer = useRef(null);
409
+ const settings = useRef({ color, imageClarity, lineSpeed, mouseSpeed });
410
+ const renderer = useRef(void 0);
411
+ const source = src ?? REFERENCE;
412
+ const [result, setResult] = useState2();
413
+ const current = (result == null ? void 0 : result.source) === source ? result : void 0;
414
+ const mask = current == null ? void 0 : current.mask;
415
+ useEffect(() => {
416
+ const objectUrl = typeof source === "string" ? void 0 : URL.createObjectURL(source);
417
+ const image = new window.Image();
418
+ image.crossOrigin = "anonymous";
419
+ image.onload = () => {
420
+ try {
421
+ setResult({ source, mask: sampleImage(image, source === REFERENCE) });
422
+ } catch {
423
+ setResult({ source });
424
+ }
425
+ };
426
+ image.onerror = () => setResult({ source });
427
+ image.src = objectUrl ?? String(source);
428
+ return () => {
429
+ image.onload = null;
430
+ image.onerror = null;
431
+ if (objectUrl) URL.revokeObjectURL(objectUrl);
432
+ };
433
+ }, [source]);
434
+ useEffect(() => {
435
+ if (fieldRef.current && portraitRef.current) {
436
+ const animation = animateRain(fieldRef.current, portraitRef.current, mask, pointer, settings);
437
+ renderer.current = animation;
438
+ return () => {
439
+ animation == null ? void 0 : animation.dispose();
440
+ renderer.current = void 0;
441
+ };
442
+ }
443
+ }, [mask]);
444
+ useEffect(() => {
445
+ var _a;
446
+ settings.current = { color, imageClarity, lineSpeed, mouseSpeed };
447
+ (_a = renderer.current) == null ? void 0 : _a.paint();
448
+ }, [color, imageClarity, lineSpeed, mouseSpeed]);
449
+ function movePortrait(event) {
450
+ var _a;
451
+ if (!followPointer || event.pointerType === "touch") return;
452
+ const bounds = (_a = fieldRef.current) == null ? void 0 : _a.getBoundingClientRect();
453
+ if (!(bounds == null ? void 0 : bounds.width) || !bounds.height) return;
454
+ const offset = Number.isFinite(maxOffset) ? Math.max(0, maxOffset) : 22;
455
+ const x = event.clientX - bounds.left;
456
+ const y = event.clientY - bounds.top;
457
+ pointer.current = { position: { x, y }, offset: { x: (x / bounds.width * 2 - 1) * offset, y: (y / bounds.height * 2 - 1) * offset } };
458
+ }
459
+ return /* @__PURE__ */ React.createElement(
460
+ "div",
461
+ {
462
+ className: [interactive_ascii_face_default.stage, className].filter(Boolean).join(" "),
463
+ onPointerMove: movePortrait,
464
+ onPointerLeave: () => {
465
+ pointer.current = null;
466
+ }
467
+ },
468
+ /* @__PURE__ */ React.createElement(
469
+ "canvas",
470
+ {
471
+ ref: fieldRef,
472
+ className: interactive_ascii_face_default.field,
473
+ role: mask ? "img" : void 0,
474
+ "aria-label": mask ? alt : void 0,
475
+ "aria-hidden": !mask
476
+ }
477
+ ),
478
+ /* @__PURE__ */ React.createElement(
479
+ "div",
480
+ {
481
+ ref: portraitRef,
482
+ className: interactive_ascii_face_default.frame
483
+ },
484
+ !mask && /* @__PURE__ */ React.createElement("p", { className: interactive_ascii_face_default.status, role: "status" }, current ? "Couldn\u2019t read this image. Try a PNG, JPEG, or WebP." : "Converting image to ASCII\u2026")
485
+ )
486
+ );
487
+ }
488
+
489
+ // src/components/ui/blob-morph-hero.jsx
490
+ import React3, { useEffect as useEffect2, useId, useMemo, useRef as useRef2, useState as useState3 } from "react";
491
+ var BASE_IMG = "/images/banner-crypto-base.webp";
492
+ var EQUIPPED_IMG = "/images/banner-crypto-equipped.png";
493
+ var DEFAULT_PRESETS = [
494
+ {
495
+ id: "lando-f1",
496
+ title: "LANDO // F1",
497
+ accentColor: "#d8ff1f",
498
+ bgColor: "#fbfbf8",
499
+ blobColor: "#e6e7df",
500
+ topoColor: "#dcddd4",
501
+ wireColor: "#9aa1a8",
502
+ baseImage: BASE_IMG,
503
+ equippedImage: EQUIPPED_IMG
504
+ },
505
+ {
506
+ id: "monza-stealth",
507
+ title: "MONZA // STEALTH",
508
+ accentColor: "#ff5a1f",
509
+ bgColor: "#faf8f6",
510
+ blobColor: "#ebe5df",
511
+ topoColor: "#e0d8d0",
512
+ wireColor: "#a39a93",
513
+ baseImage: BASE_IMG,
514
+ equippedImage: EQUIPPED_IMG
515
+ },
516
+ {
517
+ id: "stride-carbon",
518
+ title: "STRIDE // CARBON",
519
+ accentColor: "#22d3ee",
520
+ bgColor: "#f7fafb",
521
+ blobColor: "#e1e8ea",
522
+ topoColor: "#d5dde0",
523
+ wireColor: "#93a0a6",
524
+ baseImage: BASE_IMG,
525
+ equippedImage: EQUIPPED_IMG
526
+ }
527
+ ];
528
+ var LEVELS = [-3.2, -2.6, -2, -1.4, -0.8, -0.2, 0.4, 1, 1.6, 2.2, 2.8, 3.4];
529
+ var EDGES = [
530
+ [],
531
+ [[3, 2]],
532
+ [[2, 1]],
533
+ [[3, 1]],
534
+ [[0, 1]],
535
+ [[0, 1], [3, 2]],
536
+ [[0, 2]],
537
+ [[0, 3]],
538
+ [[0, 3]],
539
+ [[0, 2]],
540
+ [[0, 3], [2, 1]],
541
+ [[0, 1]],
542
+ [[3, 1]],
543
+ [[2, 1]],
544
+ [[3, 2]],
545
+ []
546
+ ];
547
+ function heightAt(x, y, t) {
548
+ return Math.sin(x * 1.1 + t * 0.55) + Math.sin(y * 1.4 - t * 0.45) + Math.sin((x + y) * 0.8 + t * 0.35) + Math.sin(Math.hypot(x - 2.5, y - 1.8) * 1.3 - t * 0.5);
549
+ }
550
+ function drawTopography(ctx, W2, H2, t, color) {
551
+ const cell = 16;
552
+ const cols = Math.ceil(W2 / cell);
553
+ const rows = Math.ceil(H2 / cell);
554
+ const sc = 8 / Math.min(W2, H2);
555
+ const stride = cols + 1;
556
+ const grid = new Float32Array(stride * (rows + 1));
557
+ for (let j = 0; j <= rows; j++) {
558
+ for (let i = 0; i <= cols; i++) {
559
+ grid[j * stride + i] = heightAt(i * cell * sc, j * cell * sc, t);
560
+ }
561
+ }
562
+ ctx.clearRect(0, 0, W2, H2);
563
+ ctx.strokeStyle = color;
564
+ ctx.lineWidth = 1;
565
+ for (let l = 0; l < LEVELS.length; l++) {
566
+ const lvl = LEVELS[l];
567
+ ctx.beginPath();
568
+ for (let j = 0; j < rows; j++) {
569
+ for (let i = 0; i < cols; i++) {
570
+ const tl = grid[j * stride + i];
571
+ const tr = grid[j * stride + i + 1];
572
+ const br = grid[(j + 1) * stride + i + 1];
573
+ const bl = grid[(j + 1) * stride + i];
574
+ const idx = (tl > lvl ? 8 : 0) | (tr > lvl ? 4 : 0) | (br > lvl ? 2 : 0) | (bl > lvl ? 1 : 0);
575
+ if (idx === 0 || idx === 15) continue;
576
+ const x0 = i * cell;
577
+ const y0 = j * cell;
578
+ const segs = EDGES[idx];
579
+ for (let s = 0; s < segs.length; s++) {
580
+ const e = segs[s];
581
+ let ax, ay, bx, by;
582
+ for (let k = 0; k < 2; k++) {
583
+ const edge = e[k];
584
+ let px, py;
585
+ if (edge === 0) {
586
+ px = x0 + (lvl - tl) / (tr - tl) * cell;
587
+ py = y0;
588
+ } else if (edge === 1) {
589
+ px = x0 + cell;
590
+ py = y0 + (lvl - tr) / (br - tr) * cell;
591
+ } else if (edge === 2) {
592
+ px = x0 + (lvl - bl) / (br - bl) * cell;
593
+ py = y0 + cell;
594
+ } else {
595
+ px = x0;
596
+ py = y0 + (lvl - tl) / (bl - tl) * cell;
597
+ }
598
+ if (k === 0) {
599
+ ax = px;
600
+ ay = py;
601
+ } else {
602
+ bx = px;
603
+ by = py;
604
+ }
605
+ }
606
+ ctx.moveTo(ax, ay);
607
+ ctx.lineTo(bx, by);
608
+ }
609
+ }
610
+ }
611
+ ctx.stroke();
612
+ }
613
+ }
614
+ var BLOBS = [
615
+ { fx: 0.31, fy: 0.23, px: 0, py: 1.2, ax: 0.46, ay: 0.4, r: 0.13 },
616
+ { fx: 0.22, fy: 0.37, px: 2.1, py: 0.4, ax: 0.44, ay: 0.42, r: 0.1 },
617
+ { fx: 0.41, fy: 0.19, px: 4, py: 2.5, ax: 0.48, ay: 0.38, r: 0.15 },
618
+ { fx: 0.27, fy: 0.33, px: 5.3, py: 3.9, ax: 0.45, ay: 0.41, r: 0.09 },
619
+ { fx: 0.17, fy: 0.29, px: 1, py: 5.1, ax: 0.47, ay: 0.36, r: 0.12 },
620
+ { fx: 0.36, fy: 0.44, px: 3.3, py: 0.9, ax: 0.42, ay: 0.43, r: 0.08 }
621
+ ];
622
+ var MERIDIAN_SPREADS = [40, 80, 120, 160, 185];
623
+ var HELMET = {
624
+ shell: "M200 60C285 60 335 120 338 210C340 290 322 350 292 392C270 420 238 432 200 432C162 432 130 420 108 392C78 350 60 290 62 210C65 120 115 60 200 60Z",
625
+ visor: "M108 196C130 172 270 172 292 196C300 212 298 238 286 250C262 262 138 262 114 250C102 238 100 212 108 196Z",
626
+ // wireframe mesh (clipped to the shell)
627
+ latitudes: Array.from({ length: 11 }, (_, i) => {
628
+ const y = 92 + i * 32;
629
+ return `M40 ${y}C120 ${y + 18} 280 ${y + 18} 360 ${y}`;
630
+ }),
631
+ meridians: [
632
+ "M200 60V432",
633
+ ...MERIDIAN_SPREADS.flatMap((k) => [
634
+ `M200 60C${200 - k} 120 ${200 - k} 380 200 432`,
635
+ `M200 60C${200 + k} 120 ${200 + k} 380 200 432`
636
+ ])
637
+ ],
638
+ // design lines: roof stripes, chin vents, nose bridge, neck/HANS
639
+ details: [
640
+ "M140 80C128 110 124 150 128 176",
641
+ "M260 80C272 110 276 150 272 176",
642
+ "M160 330C180 338 220 338 240 330",
643
+ "M170 350C188 356 212 356 230 350",
644
+ "M200 262V318"
645
+ ]
646
+ };
647
+ var HEAD_VB = { x: 58, y: 56, w: 284, h: 380 };
648
+ var DEFAULT_HEAD_BOX = { x: 0.28, y: 0.04, w: 0.44, h: 0.42 };
649
+ var VE = { vectorEffect: "non-scaling-stroke" };
650
+ var WIPE_REVEAL = 2.4;
651
+ var WIPE_HOLD = 1.6;
652
+ var WIPE_HIDE = 1;
653
+ var WIPE_GAP = 1;
654
+ var WIPE_CYCLE = WIPE_REVEAL + WIPE_HOLD + WIPE_HIDE + WIPE_GAP;
655
+ var easeInOut = (p) => p < 0.5 ? 4 * p * p * p : 1 - Math.pow(-2 * p + 2, 3) / 2;
656
+ var MASK_SCALE = 0.4;
657
+ function ensureSize(canvas, w, h) {
658
+ if (canvas.width !== w || canvas.height !== h) {
659
+ canvas.width = w;
660
+ canvas.height = h;
661
+ }
662
+ }
663
+ function BlobMorphHero({
664
+ preset = "lando-f1",
665
+ baseImage = "",
666
+ equippedImage = "",
667
+ blobMode = "roam",
668
+ speed = 1,
669
+ autoPlay = true,
670
+ showTopography = true,
671
+ showAmbientBlobs = true,
672
+ showHud = true,
673
+ showNextRace = false,
674
+ accentColor,
675
+ topoColor,
676
+ bgColor,
677
+ blobColor,
678
+ wireColor,
679
+ showTelemetry = false,
680
+ showHeadline = false,
681
+ autoFitHead = true,
682
+ stretchHud = false,
683
+ debugAlign = false,
684
+ customSvgMarkup = "",
685
+ headBox,
686
+ debugHead = false,
687
+ flipBase = false,
688
+ flipEquipped = false,
689
+ className = "",
690
+ onProgressChange
691
+ }) {
692
+ const active = DEFAULT_PRESETS.find((p) => p.id === preset) || DEFAULT_PRESETS[0];
693
+ const accent = accentColor || active.accentColor;
694
+ const topo = topoColor || active.topoColor;
695
+ const bg = bgColor || active.bgColor;
696
+ const blobFill = blobColor || active.blobColor;
697
+ const wire = wireColor || active.wireColor;
698
+ const baseSrc = baseImage || active.baseImage;
699
+ const equippedSrc = equippedImage || active.equippedImage;
700
+ const headline = active.title.split("//")[0].trim();
701
+ const [autoHead, setAutoHead] = useState3(null);
702
+ const hb = {
703
+ ...DEFAULT_HEAD_BOX,
704
+ ...active.headBox || {},
705
+ ...autoFitHead && autoHead || {},
706
+ ...headBox || {}
707
+ };
708
+ const rootRef = useRef2(null);
709
+ const topoRef = useRef2(null);
710
+ const ambRef = useRef2(null);
711
+ const revRef = useRef2(null);
712
+ const spdRef = useRef2(null);
713
+ const covRef = useRef2(null);
714
+ const eqImgRef = useRef2(null);
715
+ const wipeRef = useRef2(null);
716
+ const scanRef = useRef2(null);
717
+ const uid = useId().replace(/:/g, "");
718
+ const shellId = "bmh-shell-" + uid;
719
+ const wipeId = "bmh-wipe-" + uid;
720
+ const [size, setSize] = useState3({ w: 0, h: 0 });
721
+ const [aspect, setAspect] = useState3(0.8);
722
+ const box = useMemo(() => {
723
+ let h = size.h * 0.9;
724
+ let w = h * aspect;
725
+ if (w > size.w * 0.9) {
726
+ w = size.w * 0.9;
727
+ h = w / aspect;
728
+ }
729
+ return {
730
+ x: Math.round((size.w - w) / 2),
731
+ y: Math.round((size.h - h) / 2),
732
+ w: Math.round(w),
733
+ h: Math.round(h)
734
+ };
735
+ }, [size, aspect]);
736
+ const propsRef = useRef2({});
737
+ propsRef.current = {
738
+ speed,
739
+ flipEquipped,
740
+ debugAlign,
741
+ autoPlay,
742
+ blobMode,
743
+ showTopography,
744
+ showAmbientBlobs,
745
+ topo,
746
+ accent,
747
+ blobFill,
748
+ onProgressChange
749
+ };
750
+ const sizeRef = useRef2(size);
751
+ sizeRef.current = size;
752
+ const boxRef = useRef2(box);
753
+ boxRef.current = box;
754
+ useEffect2(() => {
755
+ const el = rootRef.current;
756
+ if (!el) return;
757
+ const ro = new ResizeObserver(([entry]) => {
758
+ const { width, height } = entry.contentRect;
759
+ setSize({ w: Math.round(width), h: Math.round(height) });
760
+ });
761
+ ro.observe(el);
762
+ return () => ro.disconnect();
763
+ }, []);
764
+ useEffect2(() => {
765
+ const im = new Image();
766
+ im.onload = () => {
767
+ if (im.naturalWidth && im.naturalHeight) {
768
+ setAspect(im.naturalWidth / im.naturalHeight);
769
+ }
770
+ };
771
+ im.src = baseSrc;
772
+ }, [baseSrc]);
773
+ useEffect2(() => {
774
+ const im = new Image();
775
+ im.decoding = "async";
776
+ setAutoHead(null);
777
+ im.onload = () => {
778
+ try {
779
+ const sw = Math.min(256, im.naturalWidth);
780
+ const sh = Math.max(1, Math.round(sw * im.naturalHeight / im.naturalWidth));
781
+ const c = document.createElement("canvas");
782
+ c.width = sw;
783
+ c.height = sh;
784
+ const cx = c.getContext("2d", { willReadFrequently: true });
785
+ cx.drawImage(im, 0, 0, sw, sh);
786
+ const px = cx.getImageData(0, 0, sw, sh).data;
787
+ let x0 = sw, y0 = sh, x1 = -1, y1 = -1;
788
+ for (let y = 0; y < sh; y++) {
789
+ for (let x = 0; x < sw; x++) {
790
+ if (px[(y * sw + x) * 4 + 3] > 40) {
791
+ if (x < x0) x0 = x;
792
+ if (x > x1) x1 = x;
793
+ if (y < y0) y0 = y;
794
+ if (y > y1) y1 = y;
795
+ }
796
+ }
797
+ }
798
+ if (x1 > x0 && y1 > y0) {
799
+ const w = (x1 - x0 + 1) / sw;
800
+ const h = (y1 - y0 + 1) / sh;
801
+ if (w * h < 0.8) setAutoHead({ x: x0 / sw, y: y0 / sh, w, h });
802
+ }
803
+ } catch (e) {
804
+ }
805
+ };
806
+ im.src = equippedSrc;
807
+ eqImgRef.current = im;
808
+ }, [equippedSrc]);
809
+ useEffect2(() => {
810
+ const maskCanvas = document.createElement("canvas");
811
+ const mctx = maskCanvas.getContext("2d");
812
+ let imgData = null;
813
+ let nx1 = new Float32Array(0);
814
+ let nx2 = new Float32Array(0);
815
+ let ny1 = new Float32Array(0);
816
+ let ny2 = new Float32Array(0);
817
+ let raf = 0;
818
+ let last = performance.now();
819
+ let t = 0;
820
+ let frame = 0;
821
+ const tick = (now) => {
822
+ raf = requestAnimationFrame(tick);
823
+ const dt = Math.min((now - last) / 1e3, 0.05);
824
+ last = now;
825
+ const p = propsRef.current;
826
+ const { w: W2, h: H2 } = sizeRef.current;
827
+ const bx = boxRef.current;
828
+ if (!W2 || !H2 || !bx.w || !bx.h) return;
829
+ if (p.autoPlay) t += dt * p.speed;
830
+ frame++;
831
+ const dpr = Math.min(window.devicePixelRatio || 1, 1.5);
832
+ const topoCanvas = topoRef.current;
833
+ if (topoCanvas) {
834
+ ensureSize(topoCanvas, Math.round(W2 * dpr), Math.round(H2 * dpr));
835
+ const tctx = topoCanvas.getContext("2d");
836
+ tctx.setTransform(dpr, 0, 0, dpr, 0, 0);
837
+ if (p.showTopography) drawTopography(tctx, W2, H2, t, p.topo);
838
+ else tctx.clearRect(0, 0, W2, H2);
839
+ }
840
+ const mw = Math.max(8, Math.round(W2 * MASK_SCALE));
841
+ const mh = Math.max(8, Math.round(H2 * MASK_SCALE));
842
+ if (maskCanvas.width !== mw || maskCanvas.height !== mh) {
843
+ maskCanvas.width = mw;
844
+ maskCanvas.height = mh;
845
+ imgData = mctx.createImageData(mw, mh);
846
+ }
847
+ const minD = Math.min(mw, mh);
848
+ const live = BLOBS.map((b) => {
849
+ const rad = b.r * minD * 1.5 * (1 + 0.18 * Math.sin(t * 0.9 + b.px));
850
+ return {
851
+ x: (0.5 + b.ax * Math.sin(t * b.fx + b.px)) * mw,
852
+ y: (0.5 + b.ay * Math.sin(t * b.fy + b.py)) * mh,
853
+ r2: rad * rad
854
+ };
855
+ });
856
+ if (p.blobMode === "flood") {
857
+ const surge = 0.5 + 0.5 * Math.sin(t * 0.7);
858
+ const rad = minD * (0.16 + 0.24 * surge);
859
+ live.push({
860
+ x: (bx.x + bx.w / 2) / W2 * mw,
861
+ y: (bx.y + bx.h / 2) / H2 * mh,
862
+ r2: rad * rad
863
+ });
864
+ }
865
+ const sx0 = bx.x / W2 * mw;
866
+ const sy0 = bx.y / H2 * mh;
867
+ const sx1 = (bx.x + bx.w) / W2 * mw;
868
+ const sy1 = (bx.y + bx.h) / H2 * mh;
869
+ let covered = 0;
870
+ let total = 0;
871
+ if (nx1.length !== mw) {
872
+ nx1 = new Float32Array(mw);
873
+ nx2 = new Float32Array(mw);
874
+ }
875
+ if (ny1.length !== mh) {
876
+ ny1 = new Float32Array(mh);
877
+ ny2 = new Float32Array(mh);
878
+ }
879
+ for (let x = 0; x < mw; x++) {
880
+ nx1[x] = Math.sin(x * 0.025 + t * 0.9);
881
+ nx2[x] = Math.sin(x * 0.045 - t * 1.4);
882
+ }
883
+ for (let y = 0; y < mh; y++) {
884
+ ny1[y] = Math.cos(y * 0.03 - t * 1.1);
885
+ ny2[y] = Math.sin(y * 0.05 + t * 0.8);
886
+ }
887
+ const d = imgData.data;
888
+ const n = live.length;
889
+ for (let y = 0; y < mh; y++) {
890
+ for (let x = 0; x < mw; x++) {
891
+ let f = 0;
892
+ for (let k = 0; k < n; k++) {
893
+ const dx = x - live[k].x;
894
+ const dy = y - live[k].y;
895
+ f += live[k].r2 / (dx * dx + dy * dy + 1);
896
+ }
897
+ f += 0.5 * (nx1[x] * ny1[y] + 0.6 * nx2[x] * ny2[y]);
898
+ let a = (f - 1) / 0.05 + 0.5;
899
+ a = a < 0 ? 0 : a > 1 ? 1 : a;
900
+ const o = (y * mw + x) * 4;
901
+ d[o] = 255;
902
+ d[o + 1] = 255;
903
+ d[o + 2] = 255;
904
+ d[o + 3] = a * 255;
905
+ if (x >= sx0 && x < sx1 && y >= sy0 && y < sy1) {
906
+ total++;
907
+ covered += a;
908
+ }
909
+ }
910
+ }
911
+ mctx.putImageData(imgData, 0, 0);
912
+ const ambCanvas = ambRef.current;
913
+ if (ambCanvas) {
914
+ ensureSize(ambCanvas, Math.round(W2 * dpr), Math.round(H2 * dpr));
915
+ const actx = ambCanvas.getContext("2d");
916
+ actx.setTransform(dpr, 0, 0, dpr, 0, 0);
917
+ actx.globalCompositeOperation = "source-over";
918
+ actx.clearRect(0, 0, W2, H2);
919
+ if (p.showAmbientBlobs) {
920
+ actx.imageSmoothingEnabled = true;
921
+ actx.imageSmoothingQuality = "high";
922
+ actx.drawImage(maskCanvas, 0, 0, W2, H2);
923
+ actx.globalCompositeOperation = "source-in";
924
+ actx.fillStyle = p.blobFill;
925
+ actx.fillRect(0, 0, W2, H2);
926
+ actx.globalCompositeOperation = "source-over";
927
+ }
928
+ }
929
+ const revCanvas = revRef.current;
930
+ const eq = eqImgRef.current;
931
+ if (revCanvas) {
932
+ ensureSize(revCanvas, Math.round(bx.w * dpr), Math.round(bx.h * dpr));
933
+ const rctx = revCanvas.getContext("2d");
934
+ rctx.setTransform(dpr, 0, 0, dpr, 0, 0);
935
+ rctx.globalCompositeOperation = "source-over";
936
+ rctx.clearRect(0, 0, bx.w, bx.h);
937
+ if (eq && eq.complete && eq.naturalWidth) {
938
+ if (p.flipEquipped) {
939
+ rctx.save();
940
+ rctx.translate(bx.w, 0);
941
+ rctx.scale(-1, 1);
942
+ rctx.drawImage(eq, 0, 0, bx.w, bx.h);
943
+ rctx.restore();
944
+ } else {
945
+ rctx.drawImage(eq, 0, 0, bx.w, bx.h);
946
+ }
947
+ if (!p.debugAlign) {
948
+ rctx.globalCompositeOperation = "destination-in";
949
+ rctx.imageSmoothingEnabled = true;
950
+ rctx.imageSmoothingQuality = "high";
951
+ rctx.drawImage(maskCanvas, -bx.x, -bx.y, W2, H2);
952
+ rctx.globalCompositeOperation = "source-over";
953
+ }
954
+ }
955
+ }
956
+ {
957
+ const c = t % WIPE_CYCLE;
958
+ let top = 1;
959
+ let bottom = 1;
960
+ let lead = -1;
961
+ if (c < WIPE_REVEAL) {
962
+ top = 0;
963
+ bottom = easeInOut(c / WIPE_REVEAL);
964
+ lead = bottom;
965
+ } else if (c < WIPE_REVEAL + WIPE_HOLD) {
966
+ top = 0;
967
+ bottom = 1;
968
+ } else if (c < WIPE_REVEAL + WIPE_HOLD + WIPE_HIDE) {
969
+ top = easeInOut((c - WIPE_REVEAL - WIPE_HOLD) / WIPE_HIDE);
970
+ bottom = 1;
971
+ lead = top;
972
+ }
973
+ const wipe = wipeRef.current;
974
+ if (wipe) {
975
+ wipe.setAttribute("y", (HEAD_VB.y + top * HEAD_VB.h).toFixed(1));
976
+ wipe.setAttribute("height", (Math.max(0, bottom - top) * HEAD_VB.h).toFixed(1));
977
+ }
978
+ const scan = scanRef.current;
979
+ if (scan) {
980
+ const y = HEAD_VB.y + Math.max(lead, 0) * HEAD_VB.h;
981
+ scan.setAttribute("transform", "translate(0 " + y.toFixed(1) + ")");
982
+ scan.setAttribute("opacity", lead < 0 ? "0" : "1");
983
+ }
984
+ }
985
+ const progress = total ? covered / total : 0;
986
+ if (frame % 2 === 0 && p.onProgressChange) p.onProgressChange(progress);
987
+ if (frame % 6 === 0) {
988
+ if (spdRef.current) {
989
+ spdRef.current.textContent = Math.round(240 + 80 * Math.sin(t * 1.7)) + " KM/H";
990
+ }
991
+ if (covRef.current) {
992
+ covRef.current.textContent = Math.round(progress * 100) + "%";
993
+ }
994
+ }
995
+ };
996
+ raf = requestAnimationFrame(tick);
997
+ return () => cancelAnimationFrame(raf);
998
+ }, []);
999
+ return /* @__PURE__ */ React3.createElement(
1000
+ "div",
1001
+ {
1002
+ ref: rootRef,
1003
+ className: `relative h-full w-full overflow-hidden ${className}`,
1004
+ style: { background: bg }
1005
+ },
1006
+ /* @__PURE__ */ React3.createElement("canvas", { ref: topoRef, className: "absolute inset-0 h-full w-full" }),
1007
+ /* @__PURE__ */ React3.createElement(
1008
+ "canvas",
1009
+ {
1010
+ ref: ambRef,
1011
+ className: "pointer-events-none absolute inset-0 h-full w-full",
1012
+ style: { opacity: 1 }
1013
+ }
1014
+ ),
1015
+ showHeadline && /* @__PURE__ */ React3.createElement("div", { className: "pointer-events-none absolute inset-0 flex select-none items-center justify-center" }, /* @__PURE__ */ React3.createElement(
1016
+ "span",
1017
+ {
1018
+ className: "font-black uppercase leading-none",
1019
+ style: {
1020
+ fontSize: "clamp(80px, 20vw, 280px)",
1021
+ color: "transparent",
1022
+ WebkitTextStroke: `1px ${wire}66`
1023
+ }
1024
+ },
1025
+ headline
1026
+ )),
1027
+ /* @__PURE__ */ React3.createElement(
1028
+ "div",
1029
+ {
1030
+ className: "absolute",
1031
+ style: { left: box.x, top: box.y, width: box.w, height: box.h }
1032
+ },
1033
+ /* @__PURE__ */ React3.createElement(
1034
+ "img",
1035
+ {
1036
+ src: baseSrc,
1037
+ alt: "",
1038
+ draggable: false,
1039
+ className: "absolute inset-0 h-full w-full select-none",
1040
+ style: flipBase ? { transform: "scaleX(-1)" } : void 0
1041
+ }
1042
+ ),
1043
+ /* @__PURE__ */ React3.createElement(
1044
+ "canvas",
1045
+ {
1046
+ ref: revRef,
1047
+ className: "absolute inset-0 h-full w-full",
1048
+ style: debugAlign ? { opacity: 0.5 } : void 0
1049
+ }
1050
+ ),
1051
+ showHud && /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(
1052
+ "svg",
1053
+ {
1054
+ viewBox: `${HEAD_VB.x} ${HEAD_VB.y} ${HEAD_VB.w} ${HEAD_VB.h}`,
1055
+ preserveAspectRatio: stretchHud ? "none" : "xMidYMid meet",
1056
+ className: "pointer-events-none absolute",
1057
+ style: {
1058
+ left: `${hb.x * 100}%`,
1059
+ top: `${hb.y * 100}%`,
1060
+ width: `${hb.w * 100}%`,
1061
+ height: `${hb.h * 100}%`,
1062
+ outline: debugHead ? "1px dashed #ff00ff" : "none"
1063
+ },
1064
+ fill: "none",
1065
+ stroke: wire,
1066
+ strokeWidth: "1",
1067
+ strokeLinecap: "round",
1068
+ strokeLinejoin: "round",
1069
+ shapeRendering: "geometricPrecision"
1070
+ },
1071
+ /* @__PURE__ */ React3.createElement("defs", null, /* @__PURE__ */ React3.createElement("clipPath", { id: shellId }, /* @__PURE__ */ React3.createElement("path", { d: HELMET.shell })), /* @__PURE__ */ React3.createElement("clipPath", { id: wipeId }, /* @__PURE__ */ React3.createElement("rect", { ref: wipeRef, x: HEAD_VB.x, y: HEAD_VB.y, width: HEAD_VB.w, height: "0" }))),
1072
+ /* @__PURE__ */ React3.createElement("g", { clipPath: `url(#${wipeId})` }, customSvgMarkup ? /* @__PURE__ */ React3.createElement("g", { dangerouslySetInnerHTML: { __html: customSvgMarkup } }) : /* @__PURE__ */ React3.createElement("g", null, /* @__PURE__ */ React3.createElement("path", { d: HELMET.shell, fill: "#ffffff", fillOpacity: "0.16", stroke: "none" }), /* @__PURE__ */ React3.createElement("path", { d: HELMET.visor, fill: wire, fillOpacity: "0.07", stroke: "none" }), /* @__PURE__ */ React3.createElement("g", { clipPath: `url(#${shellId})`, opacity: "0.5", strokeWidth: "0.6" }, HELMET.latitudes.map((d, i) => /* @__PURE__ */ React3.createElement("path", { key: "la" + i, d, ...VE })), HELMET.meridians.map((d, i) => /* @__PURE__ */ React3.createElement("path", { key: "me" + i, d, ...VE }))), /* @__PURE__ */ React3.createElement("path", { d: HELMET.shell, strokeWidth: "1.2", ...VE }), /* @__PURE__ */ React3.createElement("path", { d: HELMET.visor, strokeWidth: "1", ...VE }), HELMET.details.map((d, i) => /* @__PURE__ */ React3.createElement("path", { key: "de" + i, d, opacity: "0.6", ...VE })))),
1073
+ /* @__PURE__ */ React3.createElement("g", { ref: scanRef, opacity: "0" }, /* @__PURE__ */ React3.createElement("line", { x1: HEAD_VB.x, x2: HEAD_VB.x + HEAD_VB.w, y1: "0", y2: "0", stroke: wire, strokeWidth: "4", opacity: "0.18", ...VE }), /* @__PURE__ */ React3.createElement("line", { x1: HEAD_VB.x, x2: HEAD_VB.x + HEAD_VB.w, y1: "0", y2: "0", stroke: wire, strokeWidth: "1.2", opacity: "0.9", ...VE }))
1074
+ ), showTelemetry && /* @__PURE__ */ React3.createElement(
1075
+ "div",
1076
+ {
1077
+ className: "pointer-events-none absolute left-3 top-3 font-mono text-[11px] leading-4",
1078
+ style: { color: wire }
1079
+ },
1080
+ /* @__PURE__ */ React3.createElement("div", null, "SPD ", /* @__PURE__ */ React3.createElement("span", { ref: spdRef }, "0 KM/H")),
1081
+ /* @__PURE__ */ React3.createElement("div", null, "LIVERY ", /* @__PURE__ */ React3.createElement("span", { ref: covRef }, "0%"))
1082
+ ))
1083
+ ),
1084
+ showNextRace && /* @__PURE__ */ React3.createElement(
1085
+ "div",
1086
+ {
1087
+ className: "pointer-events-none absolute left-6 top-6 text-xs",
1088
+ style: { color: "#111111" }
1089
+ },
1090
+ /* @__PURE__ */ React3.createElement("div", { className: "opacity-60" }, "Next race"),
1091
+ /* @__PURE__ */ React3.createElement("div", { className: "text-sm font-semibold" }, "Las Vegas GP")
1092
+ )
1093
+ );
1094
+ }
1095
+
1096
+ // src/components/ui/infinite-tunnel-hero.jsx
1097
+ import { useEffect as useEffect3, useRef as useRef3 } from "react";
1098
+ import gsap from "gsap";
1099
+ var SHAPES = [
1100
+ [[523.9, 887.7], [391.2, 887.7], [520.1, 824], [624.3, 824]],
1101
+ [[137.3, 845.2], [0, 886.1], [0, 923.1], [24.2, 923.1], [250.9, 845.2]],
1102
+ [[402.1, 861.6], [281.1, 861.6], [422.9, 807.6], [519.7, 807.6]],
1103
+ [[678.9, 848.9], [563.5, 848.9], [645.6, 799.3], [738.8, 799.3]],
1104
+ [[747.6, 1053.5], [310.7, 1053.5], [633, 834.2], [862.7, 834.2]],
1105
+ [[0, 992], [0, 1080], [180.8, 1080], [326.5, 992]],
1106
+ [[376.6, 843.5], [0, 998.4], [0, 1028.3], [418.6, 843.5]],
1107
+ [[760.4, 843.5], [802.4, 843.5], [864.4, 760.2], [836.3, 760.2]],
1108
+ [[372.6, 795.5], [0, 918.8], [0, 931.1], [19.4, 931.1], [406.6, 795.5]],
1109
+ [[1364.5, 862.3], [1664.8, 1080], [1746.1, 1080], [1409.6, 862.3]],
1110
+ [[108.2, 908.8], [0, 947.8], [0, 1005.5], [231.4, 1005.5], [408.5, 908.8]],
1111
+ [[975.2, 878.9], [703.3, 878.9], [806.5, 775.5], [980.7, 775.5]],
1112
+ [[1064.8, 804.3], [940.8, 804.3], [950.9, 760.9], [1049.7, 760.9]],
1113
+ [[1261.3, 803.3], [1138, 803.3], [1108, 760.2], [1206.3, 760.2]],
1114
+ [[1410.6, 817.1], [1307.3, 817.1], [1239.7, 768.9], [1321, 768.9]],
1115
+ [[1368.7, 804.3], [1271.2, 804.3], [1214, 760.9], [1291.6, 760.9]],
1116
+ [[1459.5, 785.9], [1370.5, 785.9], [1320.3, 760.2], [1397.6, 760.2]],
1117
+ [[1564.7, 844.8], [1508.1, 844.8], [1379.6, 781.8], [1422.2, 781.8]],
1118
+ [[475.7, 959.8], [308, 1080], [531.4, 1080], [644.2, 959.8]],
1119
+ [[480.3, 826.2], [372.8, 826.2], [508.7, 774.5], [592.5, 774.5]],
1120
+ [[509.7, 803.3], [412.7, 803.3], [530, 760.2], [607.3, 760.2]],
1121
+ [[377.9, 811.7], [249.6, 811.7], [422.5, 760.2], [520.9, 760.2]],
1122
+ [[783.4, 953.1], [710.7, 1080], [995, 1080], [993.8, 953.1]],
1123
+ [[1070.8, 1011.5], [872.1, 1011.5], [906.5, 889.3], [1047.4, 889.3]],
1124
+ [[1116.1, 951.4], [1161, 1080], [1472.5, 1080], [1345.7, 951.4]],
1125
+ [[1576.9, 1040.7], [1290.5, 1040.7], [1199, 903.7], [1398.1, 903.7]],
1126
+ [[707.4, 795.8], [576.9, 795.8], [645.7, 761.7], [754.5, 761.7]],
1127
+ [[1186.3, 925.9], [1028.1, 925.9], [1013.7, 797.9], [1111.5, 797.9]],
1128
+ [[1477.3, 886.1], [1187.3, 886.1], [1134.9, 807.5], [1347.5, 807.5]],
1129
+ [[0, 959.8], [0, 968.2], [21.8, 959.8]],
1130
+ [[1234.9, 864.1], [1065.4, 864.1], [1056.5, 831.6], [1205.8, 831.6]],
1131
+ [[599.2, 806.7], [465.3, 806.7], [515.9, 785.9], [636.9, 785.9]],
1132
+ [[1291.4, 909.8], [1317.9, 909.8], [1296.8, 889.3], [1272, 889.3]],
1133
+ [[1059.7, 1054.2], [1063.5, 1080], [1104.2, 1080], [1098.2, 1054.2]],
1134
+ [[1504.4, 1041.6], [1548.3, 1080], [1588.9, 1080], [1541.9, 1041.6]],
1135
+ [[1081.7, 781.1], [1097.5, 781.1], [1093.2, 773.6], [1078.1, 773.6]],
1136
+ [[1349.6, 817.1], [1368.4, 817.1], [1350.8, 806.6], [1332.9, 806.6]],
1137
+ [[898.3, 766.6], [912.8, 766.6], [915.7, 760.2], [901.6, 760.2]],
1138
+ [[528.7, 827.3], [548.4, 827.3], [569.8, 815.9], [551.1, 815.9]],
1139
+ [[764.6, 781.1], [780.4, 781.1], [788.7, 773.6], [773.5, 773.6]],
1140
+ [[338.1, 965.3], [369.3, 965.3], [415.7, 937.3], [386.9, 937.3]],
1141
+ [[174.8, 897.3], [200.3, 897.3], [249.3, 878.3], [225.4, 878.3]],
1142
+ [[168.2, 840.8], [188.9, 840.8], [229.9, 828], [210.2, 828]],
1143
+ [[699.4, 844.8], [720.5, 844.8], [734.6, 831.6], [714.5, 831.6]],
1144
+ [[1672, 900.6], [1533.5, 900.6], [1412.8, 831.8], [1520.5, 831.8]],
1145
+ [[1524.4, 876], [1906.8, 1080], [1920, 1080], [1920, 920.8], [1793.6, 876]],
1146
+ [[1905.9, 903.7], [1920, 908.5], [1920, 903.7]],
1147
+ [[1744.5, 892.8], [1794.7, 892.8], [1496.8, 781.1], [1465.2, 781.1]],
1148
+ [[1495.6, 800.5], [1844.3, 945], [1920, 945], [1920, 867.9], [1693.5, 800.5]],
1149
+ [[1712.7, 817.1], [1609.4, 817.1], [1477.3, 768.9], [1558.6, 768.9]],
1150
+ [[1471.7, 807.7], [1489.7, 807.7], [1467.4, 798], [1450.2, 798]],
1151
+ [[1677.6, 894.7], [1702.8, 894.7], [1659, 876], [1635.3, 876]]
1152
+ ];
1153
+ var LOOP_SECONDS = 8 / 1.05;
1154
+ var GAP = 120;
1155
+ var SHAPE_COPIES = 4;
1156
+ var PARTICLE_COUNT = 300;
1157
+ var GLOW_ON = true;
1158
+ var SIDE_STEP = 600;
1159
+ var W = 1920;
1160
+ var H = 1080;
1161
+ var VX = 960;
1162
+ var VY = 540;
1163
+ var PINK = "#FF52EF";
1164
+ var BG = "#1F0038";
1165
+ var GRID_Y = [
1166
+ 760.234,
1167
+ 761.142,
1168
+ 763.949,
1169
+ 768.853,
1170
+ 776.024,
1171
+ 785.614,
1172
+ 797.775,
1173
+ 812.701,
1174
+ 830.564,
1175
+ 851.494,
1176
+ 875.708,
1177
+ 903.334,
1178
+ 934.568,
1179
+ 969.56,
1180
+ 1008.46,
1181
+ 1051.49
1182
+ ];
1183
+ var GRID_Y_EXIT = 1100;
1184
+ var RADIAL_X = Array.from({ length: 12 }, (_, i) => 126.298 + i * 151.6);
1185
+ var RADIAL_Y0 = 760.234;
1186
+ var BOTTOM_EDGE = 560.234;
1187
+ var TOP_EDGE = H - BOTTOM_EDGE;
1188
+ var mirrorY = (y) => H - y;
1189
+ var toPoints = (pts, mirror) => pts.map(([x, y]) => `${x},${mirror ? mirrorY(y) : y}`).join(" ");
1190
+ var yAt = (u) => {
1191
+ const ys = [GRID_Y[0], ...GRID_Y, GRID_Y_EXIT];
1192
+ const i = Math.max(0, Math.min(ys.length - 2, Math.floor(u + 1)));
1193
+ const t = u + 1 - i;
1194
+ return ys[i] + (ys[i + 1] - ys[i]) * t;
1195
+ };
1196
+ var radialEnd = (x0) => {
1197
+ const k = (H - RADIAL_Y0) / (RADIAL_Y0 - VY);
1198
+ return VX + (x0 - VX) * (1 + k);
1199
+ };
1200
+ var mulberry32 = (a) => () => {
1201
+ a |= 0;
1202
+ a = a + 1831565813 | 0;
1203
+ let t = Math.imul(a ^ a >>> 15, 1 | a);
1204
+ t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;
1205
+ return ((t ^ t >>> 14) >>> 0) / 4294967296;
1206
+ };
1207
+ var rand = mulberry32(7);
1208
+ var PARTICLE_COLORS = ["#FFFFFF", "#FFB8F8", PINK, "#FF8DF4"];
1209
+ var PARTICLES = Array.from({ length: PARTICLE_COUNT }, () => ({
1210
+ x: -W * ((3 - 1) / 2) - 200 + rand() * (W * 3 + 400),
1211
+ // -200 + rand() * (W + 400)
1212
+ dy: 180 + rand() * 360,
1213
+ // center-la irundhu distance
1214
+ r: 0.8 + rand() * 1.8,
1215
+ speed: 1 + Math.floor(rand() * 2),
1216
+ // 1,2,3 (integer => seamless loop)
1217
+ off: rand(),
1218
+ color: PARTICLE_COLORS[Math.floor(rand() * PARTICLE_COLORS.length)]
1219
+ }));
1220
+ var flyState = (q) => {
1221
+ const s = 0.45 * Math.pow(4.2, q);
1222
+ const o = Math.max(0, Math.min(1, q / 0.15, (1 - q) / 0.2));
1223
+ return {
1224
+ o,
1225
+ tr: `translate(${VX} ${VY}) scale(${s * 1.2} ${s}) translate(${-VX} ${-VY})`
1226
+ };
1227
+ };
1228
+ function InfiniteTunnelHero({
1229
+ color = PINK,
1230
+ backgroundColor = BG,
1231
+ speed = 1,
1232
+ className = "",
1233
+ children
1234
+ }) {
1235
+ const rootRef = useRef3(null);
1236
+ const hLines = useRef3([]);
1237
+ const shapesBottom = useRef3([]);
1238
+ const shapesTop = useRef3([]);
1239
+ const dotsBottom = useRef3([]);
1240
+ const dotsTop = useRef3([]);
1241
+ useEffect3(() => {
1242
+ const reduce = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
1243
+ const state = { p: 0 };
1244
+ const apply = (el, tr, o) => {
1245
+ if (!el) return;
1246
+ el.setAttribute("transform", tr);
1247
+ el.setAttribute("opacity", String(o));
1248
+ };
1249
+ const render = () => {
1250
+ const p = state.p;
1251
+ for (let j = -1; j < GRID_Y.length; j++) {
1252
+ const y = yAt(j + p);
1253
+ let o = 1;
1254
+ if (j === -1) o = p;
1255
+ if (j === GRID_Y.length - 1) o = 1 - p;
1256
+ const el = hLines.current[j + 1];
1257
+ if (el) {
1258
+ el.setAttribute("y1", String(y));
1259
+ el.setAttribute("y2", String(y));
1260
+ el.setAttribute("opacity", String(o));
1261
+ }
1262
+ }
1263
+ for (let i = 0; i < SHAPES.length; i++) {
1264
+ for (let c = 0; c < SHAPE_COPIES; c++) {
1265
+ const idx = i * SHAPE_COPIES + c;
1266
+ const base = i * 0.618034 + c / SHAPE_COPIES;
1267
+ const dx = (c - (SHAPE_COPIES - 1) / 2) * SIDE_STEP;
1268
+ const b = flyState((p + base) % 1, dx);
1269
+ const t = flyState((p + base + 0.31) % 1, -dx);
1270
+ apply(shapesBottom.current[idx], b.tr, b.o);
1271
+ apply(shapesTop.current[idx], t.tr, t.o);
1272
+ }
1273
+ }
1274
+ for (let i = 0; i < PARTICLES.length; i++) {
1275
+ const d = PARTICLES[i];
1276
+ const b = flyState((p * d.speed + d.off) % 1);
1277
+ const t = flyState((p * d.speed + d.off + 0.37) % 1);
1278
+ apply(dotsBottom.current[i], b.tr, b.o * 0.9);
1279
+ apply(dotsTop.current[i], t.tr, t.o * 0.9);
1280
+ }
1281
+ };
1282
+ if (reduce) {
1283
+ state.p = 0.3;
1284
+ render();
1285
+ return;
1286
+ }
1287
+ const ctx = gsap.context(() => {
1288
+ gsap.to(state, {
1289
+ p: 1,
1290
+ duration: LOOP_SECONDS / Math.max(0.1, speed),
1291
+ ease: "none",
1292
+ repeat: -1,
1293
+ onUpdate: render
1294
+ });
1295
+ gsap.to(".tunnel-glow", {
1296
+ opacity: 0.65,
1297
+ duration: 1,
1298
+ ease: "sine.inOut",
1299
+ yoyo: true,
1300
+ repeat: -1
1301
+ });
1302
+ }, rootRef);
1303
+ render();
1304
+ return () => ctx.revert();
1305
+ }, [speed]);
1306
+ const shapeCount = SHAPES.length * SHAPE_COPIES;
1307
+ return /* @__PURE__ */ React.createElement(
1308
+ "div",
1309
+ {
1310
+ className: `relative h-screen w-full overflow-hidden ${className}`,
1311
+ style: { background: backgroundColor }
1312
+ },
1313
+ /* @__PURE__ */ React.createElement(
1314
+ "svg",
1315
+ {
1316
+ ref: rootRef,
1317
+ className: "pointer-events-none absolute inset-0 h-full w-full",
1318
+ viewBox: `0 0 ${W} ${H}`,
1319
+ preserveAspectRatio: "xMidYMid slice",
1320
+ "aria-hidden": "true"
1321
+ },
1322
+ /* @__PURE__ */ React.createElement("defs", null, /* @__PURE__ */ React.createElement("linearGradient", { id: "slabBottom", x1: "0", y1: "1", x2: "0", y2: "0" }, /* @__PURE__ */ React.createElement("stop", { offset: "0", stopColor: color, stopOpacity: "0.9" }), /* @__PURE__ */ React.createElement("stop", { offset: "1", stopColor: color, stopOpacity: "0.35" })), /* @__PURE__ */ React.createElement("linearGradient", { id: "slabTop", x1: "0", y1: "0", x2: "0", y2: "1" }, /* @__PURE__ */ React.createElement("stop", { offset: "0", stopColor: color, stopOpacity: "0.9" }), /* @__PURE__ */ React.createElement("stop", { offset: "1", stopColor: color, stopOpacity: "0.35" })), /* @__PURE__ */ React.createElement(
1323
+ "linearGradient",
1324
+ {
1325
+ id: "gridStroke",
1326
+ gradientUnits: "userSpaceOnUse",
1327
+ x1: "0",
1328
+ y1: BOTTOM_EDGE,
1329
+ x2: "0",
1330
+ y2: "1100"
1331
+ },
1332
+ /* @__PURE__ */ React.createElement("stop", { offset: "0", stopColor: color, stopOpacity: "1" }),
1333
+ /* @__PURE__ */ React.createElement("stop", { offset: "0.08", stopColor: color, stopOpacity: "0.95" }),
1334
+ /* @__PURE__ */ React.createElement("stop", { offset: "0.2", stopColor: color, stopOpacity: "0.8" }),
1335
+ /* @__PURE__ */ React.createElement("stop", { offset: "0.45", stopColor: color, stopOpacity: "0.9" }),
1336
+ /* @__PURE__ */ React.createElement("stop", { offset: "1", stopColor: color, stopOpacity: "0.45" })
1337
+ ), /* @__PURE__ */ React.createElement(
1338
+ "linearGradient",
1339
+ {
1340
+ id: "gridFade",
1341
+ gradientUnits: "userSpaceOnUse",
1342
+ x1: "-480",
1343
+ y1: "0",
1344
+ x2: "2400",
1345
+ y2: "0"
1346
+ },
1347
+ /* @__PURE__ */ React.createElement("stop", { offset: "0.02", stopColor: "#292929" }),
1348
+ /* @__PURE__ */ React.createElement("stop", { offset: "0.05", stopColor: "#565656" }),
1349
+ /* @__PURE__ */ React.createElement("stop", { offset: "0.09", stopColor: "#7E7E7E" }),
1350
+ /* @__PURE__ */ React.createElement("stop", { offset: "0.12", stopColor: "#A1A1A1" }),
1351
+ /* @__PURE__ */ React.createElement("stop", { offset: "0.2", stopColor: "#D6D6D6" }),
1352
+ /* @__PURE__ */ React.createElement("stop", { offset: "0.3", stopColor: "#F5F5F5" }),
1353
+ /* @__PURE__ */ React.createElement("stop", { offset: "0.54", stopColor: "#FFFFFF" }),
1354
+ /* @__PURE__ */ React.createElement("stop", { offset: "0.74", stopColor: "#E2E2E2" }),
1355
+ /* @__PURE__ */ React.createElement("stop", { offset: "0.88", stopColor: "#8B8B8B" }),
1356
+ /* @__PURE__ */ React.createElement("stop", { offset: "0.96", stopColor: "#323232" })
1357
+ ), /* @__PURE__ */ React.createElement(
1358
+ "mask",
1359
+ {
1360
+ id: "gridMask",
1361
+ maskUnits: "userSpaceOnUse",
1362
+ x: "-480",
1363
+ y: "0",
1364
+ width: "2880",
1365
+ height: "1300"
1366
+ },
1367
+ /* @__PURE__ */ React.createElement("rect", { x: "-480", y: "0", width: "2880", height: "1300", fill: "url(#gridFade)" })
1368
+ ), /* @__PURE__ */ React.createElement("radialGradient", { id: "glow", cx: "50%", cy: "50%", r: "50%" }, /* @__PURE__ */ React.createElement("stop", { offset: "0.02", stopColor: color, stopOpacity: "1" }), /* @__PURE__ */ React.createElement("stop", { offset: "0.07", stopColor: color, stopOpacity: "0.95" }), /* @__PURE__ */ React.createElement("stop", { offset: "0.19", stopColor: color, stopOpacity: "0.8" }), /* @__PURE__ */ React.createElement("stop", { offset: "0.45", stopColor: color, stopOpacity: "0.45" }), /* @__PURE__ */ React.createElement("stop", { offset: "1", stopColor: color, stopOpacity: "0" }))),
1369
+ /* @__PURE__ */ React.createElement("g", { transform: `translate(0 ${GAP})` }, GLOW_ON && /* @__PURE__ */ React.createElement("g", { className: "tunnel-glow" }, /* @__PURE__ */ React.createElement(
1370
+ "rect",
1371
+ {
1372
+ x: VX - 1400,
1373
+ y: BOTTOM_EDGE + 60,
1374
+ width: 2800,
1375
+ height: 60,
1376
+ fill: "url(#glow)"
1377
+ }
1378
+ ), /* @__PURE__ */ React.createElement(
1379
+ "rect",
1380
+ {
1381
+ x: VX - 1e3,
1382
+ y: BOTTOM_EDGE - 110,
1383
+ width: 2e3,
1384
+ height: 220,
1385
+ fill: "url(#glow)",
1386
+ opacity: "0.22"
1387
+ }
1388
+ )), /* @__PURE__ */ React.createElement("g", { stroke: "url(#gridStroke)", strokeWidth: "0.8", mask: "url(#gridMask)" }, RADIAL_X.map((x) => /* @__PURE__ */ React.createElement("line", { key: `rb-${x}`, x1: x, y1: RADIAL_Y0, x2: radialEnd(x), y2: H })), Array.from({ length: GRID_Y.length + 1 }).map((_, i) => /* @__PURE__ */ React.createElement(
1389
+ "line",
1390
+ {
1391
+ key: `hb-${i}`,
1392
+ ref: (el) => {
1393
+ hLines.current[i] = el;
1394
+ },
1395
+ x1: -480,
1396
+ x2: 2400,
1397
+ y1: GRID_Y[0],
1398
+ y2: GRID_Y[0],
1399
+ opacity: "0"
1400
+ }
1401
+ ))), /* @__PURE__ */ React.createElement("g", { style: { mixBlendMode: "screen" } }, Array.from({ length: shapeCount }).map((_, k) => /* @__PURE__ */ React.createElement(
1402
+ "polygon",
1403
+ {
1404
+ key: `sb-${k}`,
1405
+ ref: (el) => {
1406
+ shapesBottom.current[k] = el;
1407
+ },
1408
+ points: toPoints(SHAPES[Math.floor(k / SHAPE_COPIES)], false),
1409
+ fill: "url(#slabBottom)",
1410
+ stroke: color,
1411
+ strokeWidth: "1.5",
1412
+ vectorEffect: "non-scaling-stroke",
1413
+ opacity: "0"
1414
+ }
1415
+ )), PARTICLES.map((d, i) => /* @__PURE__ */ React.createElement(
1416
+ "circle",
1417
+ {
1418
+ key: `pb-${i}`,
1419
+ ref: (el) => {
1420
+ dotsBottom.current[i] = el;
1421
+ },
1422
+ cx: d.x,
1423
+ cy: VY + d.dy,
1424
+ r: d.r,
1425
+ fill: d.color === "#FFFFFF" ? "#FFFFFF" : color,
1426
+ opacity: "0"
1427
+ }
1428
+ )))),
1429
+ /* @__PURE__ */ React.createElement("g", { transform: `translate(0 ${-GAP})` }, GLOW_ON && /* @__PURE__ */ React.createElement("g", { className: "tunnel-glow" }, /* @__PURE__ */ React.createElement(
1430
+ "rect",
1431
+ {
1432
+ x: VX - 1400,
1433
+ y: TOP_EDGE - 130,
1434
+ width: 2800,
1435
+ height: 60,
1436
+ fill: "url(#glow)"
1437
+ }
1438
+ ), /* @__PURE__ */ React.createElement(
1439
+ "rect",
1440
+ {
1441
+ x: VX - 1e3,
1442
+ y: TOP_EDGE - 110,
1443
+ width: 2e3,
1444
+ height: 220,
1445
+ fill: "url(#glow)",
1446
+ opacity: "0.22"
1447
+ }
1448
+ )), /* @__PURE__ */ React.createElement("g", { style: { mixBlendMode: "screen" } }, Array.from({ length: shapeCount }).map((_, k) => /* @__PURE__ */ React.createElement(
1449
+ "polygon",
1450
+ {
1451
+ key: `st-${k}`,
1452
+ ref: (el) => {
1453
+ shapesTop.current[k] = el;
1454
+ },
1455
+ points: toPoints(SHAPES[Math.floor(k / SHAPE_COPIES)], true),
1456
+ fill: "url(#slabTop)",
1457
+ stroke: color,
1458
+ strokeWidth: "1.5",
1459
+ vectorEffect: "non-scaling-stroke",
1460
+ opacity: "0"
1461
+ }
1462
+ )), PARTICLES.map((d, i) => /* @__PURE__ */ React.createElement(
1463
+ "circle",
1464
+ {
1465
+ key: `pt-${i}`,
1466
+ ref: (el) => {
1467
+ dotsTop.current[i] = el;
1468
+ },
1469
+ cx: W - d.x,
1470
+ cy: VY - d.dy,
1471
+ r: d.r,
1472
+ fill: d.color === "#FFFFFF" ? "#FFFFFF" : color,
1473
+ opacity: "0"
1474
+ }
1475
+ ))))
1476
+ ),
1477
+ /* @__PURE__ */ React.createElement("div", { className: "relative z-10 flex h-full w-full items-center justify-center" }, children)
1478
+ );
1479
+ }
1480
+
1481
+ // src/components/ui/scrollsmoothprovider.jsx
1482
+ import React4, { useEffect as useEffect4, useRef as useRef4, useState as useState4 } from "react";
1483
+ import Lenis from "lenis";
1484
+ function SmoothScrollProvider({ children, pathname: propPathname }) {
1485
+ const lenisRef = useRef4(null);
1486
+ const [currentPath, setCurrentPath] = useState4(
1487
+ () => typeof window !== "undefined" ? window.location.pathname : ""
1488
+ );
1489
+ useEffect4(() => {
1490
+ const lenis = new Lenis({
1491
+ duration: 1.15,
1492
+ easing: (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t)),
1493
+ smoothWheel: true,
1494
+ wheelMultiplier: 1,
1495
+ touchMultiplier: 1.2,
1496
+ lerp: 0.08,
1497
+ autoRaf: false
1498
+ });
1499
+ lenisRef.current = lenis;
1500
+ let rafId;
1501
+ function raf(time) {
1502
+ lenis.raf(time);
1503
+ rafId = requestAnimationFrame(raf);
1504
+ }
1505
+ rafId = requestAnimationFrame(raf);
1506
+ const resizeObserver = new ResizeObserver(() => {
1507
+ lenis.resize();
1508
+ });
1509
+ if (typeof document !== "undefined" && document.body) {
1510
+ resizeObserver.observe(document.body);
1511
+ }
1512
+ const handlePopState = () => {
1513
+ if (typeof window !== "undefined") {
1514
+ setCurrentPath(window.location.pathname);
1515
+ }
1516
+ };
1517
+ window.addEventListener("popstate", handlePopState);
1518
+ return () => {
1519
+ window.removeEventListener("popstate", handlePopState);
1520
+ cancelAnimationFrame(rafId);
1521
+ resizeObserver.disconnect();
1522
+ lenis.destroy();
1523
+ lenisRef.current = null;
1524
+ };
1525
+ }, []);
1526
+ const activePath = propPathname !== void 0 ? propPathname : currentPath;
1527
+ useEffect4(() => {
1528
+ if (!lenisRef.current) return;
1529
+ lenisRef.current.scrollTo(0, { immediate: true });
1530
+ const timeout = setTimeout(() => {
1531
+ var _a;
1532
+ (_a = lenisRef.current) == null ? void 0 : _a.resize();
1533
+ }, 50);
1534
+ return () => clearTimeout(timeout);
1535
+ }, [activePath]);
1536
+ return /* @__PURE__ */ React4.createElement(React4.Fragment, null, children);
1537
+ }
1538
+
1539
+ // src/components/ui/liquidGlassButton.jsx
1540
+ import React5 from "react";
1541
+ function LiquidGlassButton({
1542
+ children = "Liquid Glass Button",
1543
+ className = "",
1544
+ onClick,
1545
+ ...props
1546
+ }) {
1547
+ return /* @__PURE__ */ React5.createElement(
1548
+ "button",
1549
+ {
1550
+ type: "button",
1551
+ onClick,
1552
+ className: `relative inline-flex items-center justify-center px-6 py-2.5 rounded-xl font-medium transition-all duration-300 ${className}`,
1553
+ ...props
1554
+ },
1555
+ children
1556
+ );
1557
+ }
1558
+ var liquidGlassButton = LiquidGlassButton;
1559
+
1560
+ // src/components/ui/install-tabs.jsx
1561
+ import { useId as useId2, useState as useState5, useSyncExternalStore } from "react";
1562
+ import { AnimatePresence, motion } from "motion/react";
1563
+ import { Check, Terminal, Package } from "lucide-react";
1564
+ var managers = ["npm", "pnpm", "yarn", "bun"];
1565
+ var getCommand = (manager, packages = "adaptive-ui", component, mode = "cli", dev = false) => {
1566
+ if (mode === "cli" && component) {
1567
+ if (manager === "npm") return `npx adaptive-ui add ${component}`;
1568
+ if (manager === "pnpm") return `pnpm dlx adaptive-ui add ${component}`;
1569
+ if (manager === "yarn") return `yarn dlx adaptive-ui add ${component}`;
1570
+ if (manager === "bun") return `bunx --bun adaptive-ui add ${component}`;
1571
+ return `npx adaptive-ui add ${component}`;
1572
+ }
1573
+ const pkgName = packages || "adaptive-ui";
1574
+ if (manager === "npm") return `npm install ${dev ? "-D " : ""}${pkgName}`;
1575
+ if (manager === "pnpm") return `pnpm add ${dev ? "-D " : ""}${pkgName}`;
1576
+ if (manager === "yarn") return `yarn add ${dev ? "-D " : ""}${pkgName}`;
1577
+ if (manager === "bun") return `bun add ${dev ? "-D " : ""}${pkgName}`;
1578
+ return `npm install ${pkgName}`;
1579
+ };
1580
+ var STORAGE_KEY = "adaptive-ui:package-manager";
1581
+ var listeners = /* @__PURE__ */ new Set();
1582
+ var read = () => {
1583
+ try {
1584
+ const stored = localStorage.getItem(STORAGE_KEY);
1585
+ return managers.includes(stored) ? stored : "npm";
1586
+ } catch {
1587
+ return "npm";
1588
+ }
1589
+ };
1590
+ var choose = (manager) => {
1591
+ try {
1592
+ localStorage.setItem(STORAGE_KEY, manager);
1593
+ } catch {
1594
+ }
1595
+ listeners.forEach((listener) => listener());
1596
+ };
1597
+ var subscribe = (listener) => {
1598
+ listeners.add(listener);
1599
+ return () => listeners.delete(listener);
1600
+ };
1601
+ function InstallTabs({
1602
+ packages = "adaptive-ui",
1603
+ component,
1604
+ dev = false,
1605
+ className = ""
1606
+ }) {
1607
+ const id = useId2();
1608
+ const manager = useSyncExternalStore(subscribe, read, () => "npm");
1609
+ const [copied, setCopied] = useState5(false);
1610
+ const [mode, setMode] = useState5(component ? "cli" : "package");
1611
+ const currentText = getCommand(manager, packages, component, mode, dev);
1612
+ function onKey(event, index) {
1613
+ var _a;
1614
+ const step = event.key === "ArrowRight" ? 1 : event.key === "ArrowLeft" ? -1 : 0;
1615
+ if (!step) return;
1616
+ event.preventDefault();
1617
+ const next = managers[(index + step + managers.length) % managers.length];
1618
+ choose(next);
1619
+ (_a = document.getElementById(`${id}-${next}`)) == null ? void 0 : _a.focus();
1620
+ }
1621
+ async function copyCommand() {
1622
+ try {
1623
+ await navigator.clipboard.writeText(currentText);
1624
+ setCopied(true);
1625
+ window.setTimeout(() => setCopied(false), 1600);
1626
+ } catch {
1627
+ }
1628
+ }
1629
+ return /* @__PURE__ */ React.createElement(
1630
+ "div",
1631
+ {
1632
+ className: `w-full overflow-hidden rounded-xl border border-white/10 bg-zinc-950/90 shadow-2xl backdrop-blur-md ${className}`
1633
+ },
1634
+ /* @__PURE__ */ React.createElement("div", { className: "flex flex-wrap items-center justify-between gap-2 border-b border-white/10 bg-zinc-900/60 px-3 py-2" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React.createElement("div", { role: "tablist", "aria-label": "Package manager", className: "flex items-center gap-1" }, managers.map((option, index) => {
1635
+ const isSelected = manager === option;
1636
+ return /* @__PURE__ */ React.createElement(
1637
+ "button",
1638
+ {
1639
+ key: option,
1640
+ id: `${id}-${option}`,
1641
+ role: "tab",
1642
+ "aria-selected": isSelected,
1643
+ "aria-controls": `${id}-panel`,
1644
+ tabIndex: isSelected ? 0 : -1,
1645
+ onClick: () => choose(option),
1646
+ onKeyDown: (event) => onKey(event, index),
1647
+ className: `relative flex cursor-pointer items-center gap-1 rounded-lg px-2.5 py-1 font-mono text-xs transition-colors duration-150 focus-visible:outline-2 focus-visible:outline-emerald-400 ${isSelected ? "text-white font-semibold" : "text-zinc-400 hover:text-white"}`
1648
+ },
1649
+ isSelected && /* @__PURE__ */ React.createElement(
1650
+ motion.span,
1651
+ {
1652
+ layoutId: `${id}-pill`,
1653
+ "aria-hidden": true,
1654
+ className: "absolute inset-0 rounded-lg border border-white/15 bg-white/10 shadow-sm",
1655
+ transition: {
1656
+ type: "spring",
1657
+ stiffness: 400,
1658
+ damping: 30
1659
+ }
1660
+ }
1661
+ ),
1662
+ /* @__PURE__ */ React.createElement("span", { className: "relative z-10" }, option)
1663
+ );
1664
+ })), component && /* @__PURE__ */ React.createElement("div", { className: "ml-2 hidden items-center rounded-lg border border-white/10 bg-black/40 p-0.5 sm:flex" }, /* @__PURE__ */ React.createElement(
1665
+ "button",
1666
+ {
1667
+ type: "button",
1668
+ onClick: () => setMode("cli"),
1669
+ className: `flex cursor-pointer items-center gap-1 rounded-md px-2 py-0.5 text-[11px] font-mono transition ${mode === "cli" ? "bg-emerald-500/20 text-emerald-300 font-semibold border border-emerald-500/30" : "text-zinc-400 hover:text-white"}`
1670
+ },
1671
+ /* @__PURE__ */ React.createElement(Terminal, { className: "size-3" }),
1672
+ "CLI"
1673
+ ), /* @__PURE__ */ React.createElement(
1674
+ "button",
1675
+ {
1676
+ type: "button",
1677
+ onClick: () => setMode("package"),
1678
+ className: `flex cursor-pointer items-center gap-1 rounded-md px-2 py-0.5 text-[11px] font-mono transition ${mode === "package" ? "bg-emerald-500/20 text-emerald-300 font-semibold border border-emerald-500/30" : "text-zinc-400 hover:text-white"}`
1679
+ },
1680
+ /* @__PURE__ */ React.createElement(Package, { className: "size-3" }),
1681
+ "NPM"
1682
+ ))), /* @__PURE__ */ React.createElement(
1683
+ "button",
1684
+ {
1685
+ type: "button",
1686
+ onClick: copyCommand,
1687
+ className: "flex cursor-pointer items-center gap-1.5 rounded-lg border border-white/10 bg-white/5 px-2.5 py-1 font-mono text-xs text-zinc-300 transition hover:bg-white/15 hover:text-white",
1688
+ "aria-label": "Copy install command"
1689
+ },
1690
+ copied ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Check, { className: "size-3.5 text-emerald-400" }), /* @__PURE__ */ React.createElement("span", { className: "text-emerald-400 font-medium" }, "Copied!")) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", { className: "text-zinc-400" }, "Copy"))
1691
+ )),
1692
+ /* @__PURE__ */ React.createElement(
1693
+ "div",
1694
+ {
1695
+ id: `${id}-panel`,
1696
+ role: "tabpanel",
1697
+ "aria-labelledby": `${id}-${manager}`,
1698
+ className: "relative overflow-hidden px-4 py-3.5 font-mono text-xs sm:text-sm bg-black/40"
1699
+ },
1700
+ /* @__PURE__ */ React.createElement(AnimatePresence, { mode: "wait", initial: false }, /* @__PURE__ */ React.createElement(
1701
+ motion.div,
1702
+ {
1703
+ key: `${manager}-${mode}`,
1704
+ initial: { opacity: 0, x: -28 },
1705
+ animate: { opacity: 1, x: 0 },
1706
+ exit: { opacity: 0, x: 28 },
1707
+ transition: { duration: 0.22, ease: "easeOut" },
1708
+ className: "flex items-center gap-2.5 whitespace-nowrap text-zinc-200"
1709
+ },
1710
+ /* @__PURE__ */ React.createElement("span", { className: "select-none font-bold text-emerald-400" }, "$"),
1711
+ /* @__PURE__ */ React.createElement("span", { className: "tracking-wide" }, currentText)
1712
+ )),
1713
+ /* @__PURE__ */ React.createElement("span", { role: "status", className: "sr-only" }, copied ? "Copied" : "")
1714
+ )
1715
+ );
1716
+ }
1717
+
1718
+ // src/components/ui/props-table.jsx
1719
+ import React6, { useState as useState6 } from "react";
1720
+ import { Search, Copy, Check as Check2, SlidersHorizontal } from "lucide-react";
1721
+ function PropsTable({
1722
+ data = [],
1723
+ title = "Props Reference",
1724
+ description = "Complete reference of all customizable properties and parameters.",
1725
+ className = ""
1726
+ }) {
1727
+ const [searchQuery, setSearchQuery] = useState6("");
1728
+ const [copiedProp, setCopiedProp] = useState6(null);
1729
+ const filteredData = data.filter((item) => {
1730
+ const query = searchQuery.toLowerCase().trim();
1731
+ if (!query) return true;
1732
+ return item.prop.toLowerCase().includes(query) || item.type && item.type.toLowerCase().includes(query) || item.description && item.description.toLowerCase().includes(query);
1733
+ });
1734
+ const copyPropName = async (propName) => {
1735
+ var _a;
1736
+ try {
1737
+ if ((_a = navigator == null ? void 0 : navigator.clipboard) == null ? void 0 : _a.writeText) {
1738
+ await navigator.clipboard.writeText(propName);
1739
+ } else {
1740
+ const textarea = document.createElement("textarea");
1741
+ textarea.value = propName;
1742
+ textarea.style.position = "fixed";
1743
+ textarea.style.opacity = "0";
1744
+ document.body.appendChild(textarea);
1745
+ textarea.select();
1746
+ document.execCommand("copy");
1747
+ document.body.removeChild(textarea);
1748
+ }
1749
+ setCopiedProp(propName);
1750
+ setTimeout(() => setCopiedProp(null), 1800);
1751
+ } catch (e) {
1752
+ console.warn("Clipboard copy failed:", e);
1753
+ }
1754
+ };
1755
+ return /* @__PURE__ */ React6.createElement("div", { className: `space-y-4 w-full ${className}` }, /* @__PURE__ */ React6.createElement("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between gap-3" }, /* @__PURE__ */ React6.createElement("div", null, /* @__PURE__ */ React6.createElement("h3", { className: "text-xl md:text-2xl font-bold font-sans text-white flex items-center gap-2" }, /* @__PURE__ */ React6.createElement(SlidersHorizontal, { className: "w-5 h-5 text-lime-400" }), /* @__PURE__ */ React6.createElement("span", null, title)), description && /* @__PURE__ */ React6.createElement("p", { className: "mt-1 text-xs md:text-sm text-gray-400 font-sans" }, description)), /* @__PURE__ */ React6.createElement("div", { className: "relative w-full sm:w-64" }, /* @__PURE__ */ React6.createElement(Search, { className: "w-3.5 h-3.5 absolute left-3 top-1/2 -translate-y-1/2 text-zinc-500 pointer-events-none" }), /* @__PURE__ */ React6.createElement(
1756
+ "input",
1757
+ {
1758
+ type: "text",
1759
+ value: searchQuery,
1760
+ onChange: (e) => setSearchQuery(e.target.value),
1761
+ placeholder: "Search props, types...",
1762
+ className: "w-full bg-zinc-900/80 border border-white/10 rounded-xl pl-9 pr-3 py-1.5 text-xs text-white placeholder-zinc-500 focus:outline-none focus:border-lime-400/50 transition font-sans"
1763
+ }
1764
+ ), searchQuery && /* @__PURE__ */ React6.createElement(
1765
+ "button",
1766
+ {
1767
+ onClick: () => setSearchQuery(""),
1768
+ className: "absolute right-2.5 top-1/2 -translate-y-1/2 text-zinc-500 hover:text-white text-xs font-mono"
1769
+ },
1770
+ "\xD7"
1771
+ ))), /* @__PURE__ */ React6.createElement("div", { className: "rounded-2xl border border-white/10 overflow-hidden bg-zinc-950 shadow-xl" }, /* @__PURE__ */ React6.createElement("div", { className: "overflow-x-auto" }, /* @__PURE__ */ React6.createElement("table", { className: "w-full text-left text-xs font-sans" }, /* @__PURE__ */ React6.createElement("thead", { className: "bg-zinc-900/70 border-b border-white/10 font-mono text-zinc-400" }, /* @__PURE__ */ React6.createElement("tr", null, /* @__PURE__ */ React6.createElement("th", { className: "py-3 px-4 font-semibold w-1/4" }, "Prop"), /* @__PURE__ */ React6.createElement("th", { className: "py-3 px-4 font-semibold w-1/5" }, "Type"), /* @__PURE__ */ React6.createElement("th", { className: "py-3 px-4 font-semibold w-1/6" }, "Default"), /* @__PURE__ */ React6.createElement("th", { className: "py-3 px-4 font-semibold" }, "Description"))), /* @__PURE__ */ React6.createElement("tbody", { className: "divide-y divide-white/5 text-zinc-300" }, filteredData.length > 0 ? filteredData.map((item, idx) => /* @__PURE__ */ React6.createElement(
1772
+ "tr",
1773
+ {
1774
+ key: item.prop || idx,
1775
+ className: "hover:bg-white/[0.02] transition-colors group"
1776
+ },
1777
+ /* @__PURE__ */ React6.createElement("td", { className: "py-3.5 px-4 font-mono" }, /* @__PURE__ */ React6.createElement("div", { className: "flex items-center gap-1.5" }, /* @__PURE__ */ React6.createElement(
1778
+ "button",
1779
+ {
1780
+ onClick: () => copyPropName(item.prop),
1781
+ className: "font-semibold text-lime-400 hover:text-lime-300 transition flex items-center gap-1 cursor-pointer",
1782
+ title: "Click to copy prop name"
1783
+ },
1784
+ /* @__PURE__ */ React6.createElement("span", null, item.prop),
1785
+ copiedProp === item.prop ? /* @__PURE__ */ React6.createElement(Check2, { className: "w-3 h-3 text-emerald-400 shrink-0" }) : /* @__PURE__ */ React6.createElement(Copy, { className: "w-3 h-3 text-zinc-600 opacity-0 group-hover:opacity-100 transition shrink-0" })
1786
+ ), item.required && /* @__PURE__ */ React6.createElement("span", { className: "text-[10px] px-1.5 py-0.2 rounded bg-rose-500/20 text-rose-300 border border-rose-500/30 font-sans" }, "required"))),
1787
+ /* @__PURE__ */ React6.createElement("td", { className: "py-3.5 px-4 font-mono text-[11px]" }, /* @__PURE__ */ React6.createElement("span", { className: "inline-block px-2 py-0.5 rounded-md bg-zinc-900 text-cyan-300 border border-white/5" }, item.type)),
1788
+ /* @__PURE__ */ React6.createElement("td", { className: "py-3.5 px-4 font-mono text-[11px] text-zinc-400" }, item.default ? /* @__PURE__ */ React6.createElement("code", { className: "bg-zinc-900 px-1.5 py-0.5 rounded text-amber-300/90 border border-white/5" }, item.default) : /* @__PURE__ */ React6.createElement("span", { className: "text-zinc-600" }, "\u2014")),
1789
+ /* @__PURE__ */ React6.createElement("td", { className: "py-3.5 px-4 text-gray-300 leading-relaxed font-sans" }, item.description)
1790
+ )) : /* @__PURE__ */ React6.createElement("tr", null, /* @__PURE__ */ React6.createElement(
1791
+ "td",
1792
+ {
1793
+ colSpan: 4,
1794
+ className: "py-8 text-center text-zinc-500 font-mono text-xs"
1795
+ },
1796
+ 'No matching props found for "',
1797
+ searchQuery,
1798
+ '".'
1799
+ )))))));
1800
+ }
1801
+ export {
1802
+ BlobMorphHero,
1803
+ DEFAULT_PRESETS,
1804
+ DEFAULT_SCROLL_IMAGES,
1805
+ ImageScroll,
1806
+ InfiniteImageScroll,
1807
+ InfiniteTunnelHero,
1808
+ InstallTabs,
1809
+ InteractiveAsciiFace,
1810
+ LiquidGlassButton,
1811
+ PropsTable,
1812
+ SmoothScrollProvider,
1813
+ liquidGlassButton
1814
+ };
1815
+ //# sourceMappingURL=index.js.map