@braintwopoint0/playback-commons 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,728 @@
1
+ "use client";
2
+
3
+ // src/ui/button.tsx
4
+ import * as React from "react";
5
+ import { Slot } from "@radix-ui/react-slot";
6
+ import { cva } from "class-variance-authority";
7
+
8
+ // src/utils/cn.ts
9
+ import { clsx } from "clsx";
10
+ import { twMerge } from "tailwind-merge";
11
+ function cn(...inputs) {
12
+ return twMerge(clsx(inputs));
13
+ }
14
+
15
+ // src/ui/button.tsx
16
+ import { jsx } from "react/jsx-runtime";
17
+ var buttonVariants = cva(
18
+ "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
19
+ {
20
+ variants: {
21
+ variant: {
22
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
23
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
24
+ outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
25
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
26
+ ghost: "hover:bg-accent hover:text-accent-foreground",
27
+ link: "text-primary underline-offset-4 hover:underline"
28
+ },
29
+ size: {
30
+ default: "h-10 px-4 py-2",
31
+ sm: "h-9 rounded-md px-3",
32
+ lg: "h-11 rounded-md px-8",
33
+ icon: "h-10 w-10"
34
+ }
35
+ },
36
+ defaultVariants: {
37
+ variant: "default",
38
+ size: "default"
39
+ }
40
+ }
41
+ );
42
+ var Button = React.forwardRef(
43
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
44
+ const Comp = asChild ? Slot : "button";
45
+ return /* @__PURE__ */ jsx(
46
+ Comp,
47
+ {
48
+ className: cn(buttonVariants({ variant, size, className })),
49
+ ref,
50
+ ...props
51
+ }
52
+ );
53
+ }
54
+ );
55
+ Button.displayName = "Button";
56
+
57
+ // src/ui/card.tsx
58
+ import * as React2 from "react";
59
+ import { jsx as jsx2 } from "react/jsx-runtime";
60
+ var Card = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
61
+ "div",
62
+ {
63
+ ref,
64
+ className: cn(
65
+ "rounded-lg border bg-card text-card-foreground shadow-sm",
66
+ className
67
+ ),
68
+ ...props
69
+ }
70
+ ));
71
+ Card.displayName = "Card";
72
+ var CardHeader = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
73
+ "div",
74
+ {
75
+ ref,
76
+ className: cn("flex flex-col space-y-1.5 p-6", className),
77
+ ...props
78
+ }
79
+ ));
80
+ CardHeader.displayName = "CardHeader";
81
+ var CardTitle = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
82
+ "h3",
83
+ {
84
+ ref,
85
+ className: cn(
86
+ "text-2xl font-semibold leading-none tracking-tight",
87
+ className
88
+ ),
89
+ ...props
90
+ }
91
+ ));
92
+ CardTitle.displayName = "CardTitle";
93
+ var CardDescription = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
94
+ "p",
95
+ {
96
+ ref,
97
+ className: cn("text-sm text-muted-foreground", className),
98
+ ...props
99
+ }
100
+ ));
101
+ CardDescription.displayName = "CardDescription";
102
+ var CardContent = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2("div", { ref, className: cn("p-6 pt-0", className), ...props }));
103
+ CardContent.displayName = "CardContent";
104
+ var CardFooter = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
105
+ "div",
106
+ {
107
+ ref,
108
+ className: cn("flex items-center p-6 pt-0", className),
109
+ ...props
110
+ }
111
+ ));
112
+ CardFooter.displayName = "CardFooter";
113
+
114
+ // src/ui/badge.tsx
115
+ import { cva as cva2 } from "class-variance-authority";
116
+ import { jsx as jsx3 } from "react/jsx-runtime";
117
+ var badgeVariants = cva2(
118
+ "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
119
+ {
120
+ variants: {
121
+ variant: {
122
+ default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
123
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
124
+ destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
125
+ outline: "text-foreground"
126
+ }
127
+ },
128
+ defaultVariants: {
129
+ variant: "default"
130
+ }
131
+ }
132
+ );
133
+ function Badge({ className, variant, ...props }) {
134
+ return /* @__PURE__ */ jsx3("div", { className: cn(badgeVariants({ variant }), className), ...props });
135
+ }
136
+
137
+ // src/ui/label.tsx
138
+ import * as React3 from "react";
139
+ import * as LabelPrimitive from "@radix-ui/react-label";
140
+ import { cva as cva3 } from "class-variance-authority";
141
+ import { jsx as jsx4 } from "react/jsx-runtime";
142
+ var labelVariants = cva3(
143
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
144
+ );
145
+ var Label = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
146
+ LabelPrimitive.Root,
147
+ {
148
+ ref,
149
+ className: cn(labelVariants(), className),
150
+ ...props
151
+ }
152
+ ));
153
+ Label.displayName = LabelPrimitive.Root.displayName;
154
+
155
+ // src/ui/input.tsx
156
+ import * as React4 from "react";
157
+ import { useMotionTemplate, useMotionValue, motion } from "motion/react";
158
+ import { jsx as jsx5 } from "react/jsx-runtime";
159
+ var Input = React4.forwardRef(
160
+ ({ className, type, ...props }, ref) => {
161
+ const radius = 100;
162
+ const [visible, setVisible] = React4.useState(false);
163
+ let mouseX = useMotionValue(0);
164
+ let mouseY = useMotionValue(0);
165
+ function handleMouseMove({ currentTarget, clientX, clientY }) {
166
+ let { left, top } = currentTarget.getBoundingClientRect();
167
+ mouseX.set(clientX - left);
168
+ mouseY.set(clientY - top);
169
+ }
170
+ return /* @__PURE__ */ jsx5(
171
+ motion.div,
172
+ {
173
+ style: {
174
+ background: useMotionTemplate`
175
+ radial-gradient(
176
+ ${visible ? radius + "px" : "0px"} circle at ${mouseX}px ${mouseY}px,
177
+ var(--timberwolf),
178
+ transparent 80%
179
+ )
180
+ `
181
+ },
182
+ onMouseMove: handleMouseMove,
183
+ onMouseEnter: () => setVisible(true),
184
+ onMouseLeave: () => setVisible(false),
185
+ className: "p-[2px] rounded-lg transition duration-300 group/input",
186
+ children: /* @__PURE__ */ jsx5(
187
+ "input",
188
+ {
189
+ type,
190
+ className: cn(
191
+ `flex h-10 w-full border-none bg-zinc-800 text-white shadow-input rounded-md px-3 py-2 text-sm file:border-0 file:bg-transparent
192
+ file:text-sm file:font-mediumplaceholder-text-neutral-600
193
+ focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-neutral-600
194
+ disabled:cursor-not-allowed disabled:opacity-50
195
+ shadow-[0px_0px_1px_1px_var(--neutral-700)]
196
+ group-hover/input:shadow-none transition duration-400
197
+ `,
198
+ className
199
+ ),
200
+ ref,
201
+ ...props
202
+ }
203
+ )
204
+ }
205
+ );
206
+ }
207
+ );
208
+ Input.displayName = "Input";
209
+
210
+ // src/ui/dialog.tsx
211
+ import * as React5 from "react";
212
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
213
+ import { Cross2Icon } from "@radix-ui/react-icons";
214
+ import { jsx as jsx6, jsxs } from "react/jsx-runtime";
215
+ var Dialog = DialogPrimitive.Root;
216
+ var DialogTrigger = DialogPrimitive.Trigger;
217
+ var DialogPortal = DialogPrimitive.Portal;
218
+ var DialogClose = DialogPrimitive.Close;
219
+ var DialogOverlay = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
220
+ DialogPrimitive.Overlay,
221
+ {
222
+ ref,
223
+ className: cn(
224
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
225
+ className
226
+ ),
227
+ ...props
228
+ }
229
+ ));
230
+ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
231
+ var DialogContent = React5.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
232
+ /* @__PURE__ */ jsx6(DialogOverlay, {}),
233
+ /* @__PURE__ */ jsxs(
234
+ DialogPrimitive.Content,
235
+ {
236
+ ref,
237
+ className: cn(
238
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-zinc-800 bg-zinc-950 p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
239
+ className
240
+ ),
241
+ ...props,
242
+ children: [
243
+ children,
244
+ /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-zinc-950 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-zinc-300 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-zinc-800 data-[state=open]:text-zinc-400", children: [
245
+ /* @__PURE__ */ jsx6(Cross2Icon, { className: "h-4 w-4" }),
246
+ /* @__PURE__ */ jsx6("span", { className: "sr-only", children: "Close" })
247
+ ] })
248
+ ]
249
+ }
250
+ )
251
+ ] }));
252
+ DialogContent.displayName = DialogPrimitive.Content.displayName;
253
+ var DialogHeader = ({
254
+ className,
255
+ ...props
256
+ }) => /* @__PURE__ */ jsx6(
257
+ "div",
258
+ {
259
+ className: cn(
260
+ "flex flex-col space-y-1.5 text-center sm:text-left",
261
+ className
262
+ ),
263
+ ...props
264
+ }
265
+ );
266
+ DialogHeader.displayName = "DialogHeader";
267
+ var DialogFooter = ({
268
+ className,
269
+ ...props
270
+ }) => /* @__PURE__ */ jsx6(
271
+ "div",
272
+ {
273
+ className: cn(
274
+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
275
+ className
276
+ ),
277
+ ...props
278
+ }
279
+ );
280
+ DialogFooter.displayName = "DialogFooter";
281
+ var DialogTitle = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
282
+ DialogPrimitive.Title,
283
+ {
284
+ ref,
285
+ className: cn(
286
+ "text-lg font-semibold leading-none tracking-tight",
287
+ className
288
+ ),
289
+ ...props
290
+ }
291
+ ));
292
+ DialogTitle.displayName = DialogPrimitive.Title.displayName;
293
+ var DialogDescription = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
294
+ DialogPrimitive.Description,
295
+ {
296
+ ref,
297
+ className: cn("text-sm text-zinc-400", className),
298
+ ...props
299
+ }
300
+ ));
301
+ DialogDescription.displayName = DialogPrimitive.Description.displayName;
302
+
303
+ // src/ui/animated-tooltip.tsx
304
+ import { useState as useState2 } from "react";
305
+ import {
306
+ motion as motion2,
307
+ useTransform,
308
+ useMotionValue as useMotionValue2,
309
+ useSpring
310
+ } from "motion/react";
311
+ import { Fragment, jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
312
+ var AnimatedTooltip = ({
313
+ items
314
+ }) => {
315
+ const [hoveredIndex, setHoveredIndex] = useState2(null);
316
+ const springConfig = { stiffness: 100, damping: 5 };
317
+ const x = useMotionValue2(0);
318
+ const rotate = useSpring(
319
+ useTransform(x, [-100, 100], [-45, 45]),
320
+ springConfig
321
+ );
322
+ const translateX = useSpring(
323
+ useTransform(x, [-100, 100], [-50, 50]),
324
+ springConfig
325
+ );
326
+ const handleMouseMove = (event) => {
327
+ const halfWidth = event.target.offsetWidth / 2;
328
+ x.set(event.nativeEvent.offsetX - halfWidth);
329
+ };
330
+ return /* @__PURE__ */ jsx7(Fragment, { children: items.map((item, idx) => /* @__PURE__ */ jsxs2(
331
+ "div",
332
+ {
333
+ className: "-mr-4 relative group",
334
+ onMouseEnter: () => setHoveredIndex(item.id),
335
+ onMouseLeave: () => setHoveredIndex(null),
336
+ children: [
337
+ hoveredIndex === item.id && /* @__PURE__ */ jsxs2(
338
+ motion2.div,
339
+ {
340
+ initial: { opacity: 0, y: 20, scale: 0.6 },
341
+ animate: {
342
+ opacity: 1,
343
+ y: 0,
344
+ scale: 1,
345
+ transition: {
346
+ type: "spring",
347
+ stiffness: 260,
348
+ damping: 10
349
+ }
350
+ },
351
+ exit: { opacity: 0, y: 20, scale: 0.6 },
352
+ style: {
353
+ translateX,
354
+ rotate,
355
+ whiteSpace: "nowrap"
356
+ },
357
+ className: "absolute -top-16 -left-1/2 translate-x-1/2 flex text-xs flex-col items-center justify-center rounded-md bg-black z-50 shadow-xl px-4 py-2",
358
+ children: [
359
+ /* @__PURE__ */ jsx7("div", { className: "absolute inset-x-10 z-30 w-[20%] -bottom-px bg-gradient-to-r from-transparent via-emerald-500 to-transparent h-px " }),
360
+ /* @__PURE__ */ jsx7("div", { className: "absolute left-10 w-[40%] z-30 -bottom-px bg-gradient-to-r from-transparent via-sky-500 to-transparent h-px " }),
361
+ /* @__PURE__ */ jsx7("div", { className: "font-bold text-white relative z-30 text-base", children: item.name }),
362
+ /* @__PURE__ */ jsx7("div", { className: "text-white text-xs", children: item.designation })
363
+ ]
364
+ }
365
+ ),
366
+ /* @__PURE__ */ jsx7(
367
+ "img",
368
+ {
369
+ onMouseMove: handleMouseMove,
370
+ height: 100,
371
+ width: 100,
372
+ src: item.image,
373
+ alt: item.name,
374
+ className: "object-cover !m-0 !p-0 object-top rounded-full h-16 w-16 border-2 group-hover:scale-105 group-hover:z-30 border-[var(--ash-grey)] relative transition duration-500"
375
+ }
376
+ )
377
+ ]
378
+ },
379
+ item.name
380
+ )) });
381
+ };
382
+
383
+ // src/ui/card-hover-effect.tsx
384
+ import { AnimatePresence as AnimatePresence2, motion as motion3 } from "motion/react";
385
+ import Link from "next/link";
386
+ import { useState as useState3 } from "react";
387
+ import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
388
+ var HoverEffect = ({
389
+ items,
390
+ className
391
+ }) => {
392
+ let [hoveredIndex, setHoveredIndex] = useState3(null);
393
+ return /* @__PURE__ */ jsx8(
394
+ "div",
395
+ {
396
+ className: cn(
397
+ "flex flex-wrap justify-center items-center pb-10",
398
+ className
399
+ ),
400
+ children: items.map((item, idx) => /* @__PURE__ */ jsxs3(
401
+ Link,
402
+ {
403
+ href: item?.link,
404
+ className: "relative group block p-2 h-72 w-80",
405
+ onMouseEnter: () => setHoveredIndex(idx),
406
+ onMouseLeave: () => setHoveredIndex(null),
407
+ children: [
408
+ /* @__PURE__ */ jsx8(AnimatePresence2, { children: hoveredIndex === idx && /* @__PURE__ */ jsx8(
409
+ motion3.span,
410
+ {
411
+ className: "absolute inset-0 h-full w-full bg-neutral-400/[0.5] block rounded-3xl",
412
+ layoutId: "hoverBackground",
413
+ initial: { opacity: 0 },
414
+ animate: {
415
+ opacity: 1,
416
+ transition: { duration: 0.15 }
417
+ },
418
+ exit: {
419
+ opacity: 0,
420
+ transition: { duration: 0.15, delay: 0.2 }
421
+ }
422
+ }
423
+ ) }),
424
+ /* @__PURE__ */ jsxs3(HoverCard, { logoUrl: item.logoUrl, children: [
425
+ /* @__PURE__ */ jsx8(HoverCardTitle, { children: item.title }),
426
+ /* @__PURE__ */ jsx8(HoverCardDescription, { children: item.description })
427
+ ] })
428
+ ]
429
+ },
430
+ item?.link
431
+ ))
432
+ }
433
+ );
434
+ };
435
+ var HoverCard = ({
436
+ className,
437
+ children,
438
+ logoUrl
439
+ }) => {
440
+ return /* @__PURE__ */ jsxs3(
441
+ "div",
442
+ {
443
+ className: cn(
444
+ "rounded-2xl h-full w-full p-4 overflow-hidden bg-black border border-white/[0.2] group-hover:border-[var(--timberwolf)] relative z-20",
445
+ className
446
+ ),
447
+ children: [
448
+ /* @__PURE__ */ jsx8(
449
+ "div",
450
+ {
451
+ className: "absolute bottom-[-3rem] left-[-5rem] h-56 w-56 opacity-50",
452
+ style: {
453
+ backgroundImage: `url(${logoUrl})`,
454
+ backgroundPosition: "bottom left",
455
+ backgroundSize: "contain",
456
+ backgroundRepeat: "no-repeat",
457
+ maskImage: "linear-gradient(to bottom left, transparent, black)"
458
+ }
459
+ }
460
+ ),
461
+ /* @__PURE__ */ jsx8("div", { className: "relative z-50", children: /* @__PURE__ */ jsx8("div", { className: "p-4", children }) })
462
+ ]
463
+ }
464
+ );
465
+ };
466
+ var HoverCardTitle = ({
467
+ className,
468
+ children
469
+ }) => {
470
+ return /* @__PURE__ */ jsx8("h4", { className: cn("text-zinc-100 font-bold tracking-wide mt-4", className), children });
471
+ };
472
+ var HoverCardDescription = ({
473
+ className,
474
+ children
475
+ }) => {
476
+ return /* @__PURE__ */ jsx8(
477
+ "p",
478
+ {
479
+ className: cn(
480
+ "mt-8 text-zinc-400 tracking-wide leading-relaxed text-sm",
481
+ className
482
+ ),
483
+ children
484
+ }
485
+ );
486
+ };
487
+
488
+ // src/ui/flip-words.tsx
489
+ import { useCallback, useEffect, useState as useState4 } from "react";
490
+ import { AnimatePresence as AnimatePresence3, motion as motion4 } from "motion/react";
491
+ import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
492
+ var FlipWords = ({
493
+ words,
494
+ duration = 3e3,
495
+ className
496
+ }) => {
497
+ const [currentWord, setCurrentWord] = useState4(words[0]);
498
+ const [isAnimating, setIsAnimating] = useState4(false);
499
+ const startAnimation = useCallback(() => {
500
+ const word = words[words.indexOf(currentWord) + 1] || words[0];
501
+ setCurrentWord(word);
502
+ setIsAnimating(true);
503
+ }, [currentWord, words]);
504
+ useEffect(() => {
505
+ if (!isAnimating)
506
+ setTimeout(() => {
507
+ startAnimation();
508
+ }, duration);
509
+ }, [isAnimating, duration, startAnimation]);
510
+ return /* @__PURE__ */ jsx9(
511
+ AnimatePresence3,
512
+ {
513
+ onExitComplete: () => {
514
+ setIsAnimating(false);
515
+ },
516
+ children: /* @__PURE__ */ jsx9(
517
+ motion4.div,
518
+ {
519
+ initial: {
520
+ opacity: 0,
521
+ y: 10
522
+ },
523
+ animate: {
524
+ opacity: 1,
525
+ y: 0
526
+ },
527
+ transition: {
528
+ type: "spring",
529
+ stiffness: 100,
530
+ damping: 10
531
+ },
532
+ exit: {
533
+ opacity: 0,
534
+ y: -40,
535
+ x: 40,
536
+ filter: "blur(8px)",
537
+ scale: 2,
538
+ position: "absolute"
539
+ },
540
+ className: cn(
541
+ "z-10 inline-block relative text-left text-neutral-100 px-2",
542
+ className
543
+ ),
544
+ children: currentWord.split(" ").map((word, wordIndex) => /* @__PURE__ */ jsxs4(
545
+ motion4.span,
546
+ {
547
+ initial: { opacity: 0, y: 10, filter: "blur(8px)" },
548
+ animate: { opacity: 1, y: 0, filter: "blur(0px)" },
549
+ transition: {
550
+ delay: wordIndex * 0.3,
551
+ duration: 0.3
552
+ },
553
+ className: "inline-block whitespace-nowrap",
554
+ children: [
555
+ word.split("").map((letter, letterIndex) => /* @__PURE__ */ jsx9(
556
+ motion4.span,
557
+ {
558
+ initial: { opacity: 0, y: 10, filter: "blur(8px)" },
559
+ animate: { opacity: 1, y: 0, filter: "blur(0px)" },
560
+ transition: {
561
+ delay: wordIndex * 0.3 + letterIndex * 0.05,
562
+ duration: 0.2
563
+ },
564
+ className: "inline-block",
565
+ children: letter
566
+ },
567
+ word + letterIndex
568
+ )),
569
+ /* @__PURE__ */ jsx9("span", { className: "inline-block", children: "\xA0" })
570
+ ]
571
+ },
572
+ word + wordIndex
573
+ ))
574
+ },
575
+ currentWord
576
+ )
577
+ }
578
+ );
579
+ };
580
+
581
+ // src/ui/hero-highlight.tsx
582
+ import {
583
+ useMotionValue as useMotionValue3,
584
+ motion as motion5,
585
+ useMotionTemplate as useMotionTemplate2,
586
+ animate
587
+ } from "motion/react";
588
+ import { useEffect as useEffect2, useState as useState5 } from "react";
589
+ import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
590
+ var HeroHighlight = ({
591
+ children,
592
+ className,
593
+ containerClassName
594
+ }) => {
595
+ let mouseX = useMotionValue3(0);
596
+ let mouseY = useMotionValue3(0);
597
+ const [isHoverable, setIsHoverable] = useState5(false);
598
+ useEffect2(() => {
599
+ const mediaQuery = window.matchMedia("(pointer: fine)");
600
+ setIsHoverable(mediaQuery.matches);
601
+ const handleChange = (e) => {
602
+ setIsHoverable(e.matches);
603
+ };
604
+ mediaQuery.addEventListener("change", handleChange);
605
+ return () => {
606
+ mediaQuery.removeEventListener("change", handleChange);
607
+ };
608
+ }, []);
609
+ useEffect2(() => {
610
+ if (!isHoverable) {
611
+ const updatePosition = () => {
612
+ const randomX = Math.random() * window.innerWidth;
613
+ const randomY = Math.random() * window.innerHeight;
614
+ animate(mouseX, randomX, { duration: 2 });
615
+ animate(mouseY, randomY, { duration: 2 });
616
+ };
617
+ const interval = setInterval(updatePosition, 2e3);
618
+ updatePosition();
619
+ return () => clearInterval(interval);
620
+ }
621
+ }, [isHoverable, mouseX, mouseY]);
622
+ const handleMouseMove = (event) => {
623
+ if (!isHoverable || !event.currentTarget) return;
624
+ const { left, top } = event.currentTarget.getBoundingClientRect();
625
+ mouseX.set(event.clientX - left);
626
+ mouseY.set(event.clientY - top);
627
+ };
628
+ return /* @__PURE__ */ jsxs5(
629
+ "div",
630
+ {
631
+ className: cn(
632
+ "relative h-[40rem] flex items-center bg-[var(--night)] justify-center w-full group",
633
+ containerClassName
634
+ ),
635
+ onMouseMove: handleMouseMove,
636
+ children: [
637
+ /* @__PURE__ */ jsx10("div", { className: "absolute inset-0 bg-dot-thick-neutral-800 pointer-events-none" }),
638
+ /* @__PURE__ */ jsx10(
639
+ motion5.div,
640
+ {
641
+ className: "pointer-events-none bg-dot-thick-gray-100 absolute inset-0 opacity-0 transition duration-300 group-hover:opacity-100",
642
+ style: {
643
+ WebkitMaskImage: useMotionTemplate2`
644
+ radial-gradient(
645
+ 200px circle at ${mouseX}px ${mouseY}px,
646
+ black 0%,
647
+ transparent 100%
648
+ )
649
+ `,
650
+ maskImage: useMotionTemplate2`
651
+ radial-gradient(
652
+ 200px circle at ${mouseX}px ${mouseY}px,
653
+ black 0%,
654
+ transparent 100%
655
+ )
656
+ `
657
+ }
658
+ }
659
+ ),
660
+ /* @__PURE__ */ jsx10("div", { className: cn("relative z-20", className), children })
661
+ ]
662
+ }
663
+ );
664
+ };
665
+ var Highlight = ({
666
+ children,
667
+ className
668
+ }) => {
669
+ return /* @__PURE__ */ jsx10(
670
+ motion5.span,
671
+ {
672
+ initial: {
673
+ backgroundSize: "0% 100%"
674
+ },
675
+ animate: {
676
+ backgroundSize: "100% 100%"
677
+ },
678
+ transition: {
679
+ duration: 2,
680
+ ease: "linear",
681
+ delay: 0.5
682
+ },
683
+ style: {
684
+ backgroundRepeat: "no-repeat",
685
+ backgroundPosition: "left center",
686
+ display: "inline"
687
+ },
688
+ className: cn(
689
+ `relative inline-block pb-1 px-1 rounded-lg bg-gradient-to-r from-[var(--ash-grey)] to-[var(--timberwolf)]`,
690
+ className
691
+ ),
692
+ children
693
+ }
694
+ );
695
+ };
696
+ export {
697
+ AnimatedTooltip,
698
+ Badge,
699
+ Button,
700
+ Card,
701
+ CardContent,
702
+ CardDescription,
703
+ CardFooter,
704
+ CardHeader,
705
+ CardTitle,
706
+ Dialog,
707
+ DialogClose,
708
+ DialogContent,
709
+ DialogDescription,
710
+ DialogFooter,
711
+ DialogHeader,
712
+ DialogOverlay,
713
+ DialogPortal,
714
+ DialogTitle,
715
+ DialogTrigger,
716
+ FlipWords,
717
+ HeroHighlight,
718
+ Highlight,
719
+ HoverCard,
720
+ HoverCardDescription,
721
+ HoverCardTitle,
722
+ HoverEffect,
723
+ Input,
724
+ Label,
725
+ badgeVariants,
726
+ buttonVariants
727
+ };
728
+ //# sourceMappingURL=index.js.map