@seaguntech/ui 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.
package/dist/index.js ADDED
@@ -0,0 +1,1041 @@
1
+ 'use client'
2
+
3
+ // src/lib/utils.ts
4
+ import { clsx } from "clsx";
5
+ import { twMerge } from "tailwind-merge";
6
+ function cn(...inputs) {
7
+ return twMerge(clsx(inputs));
8
+ }
9
+
10
+ // src/components/badge.tsx
11
+ import { cva } from "class-variance-authority";
12
+ import * as React from "react";
13
+ var badgeVariants = cva(
14
+ "inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium transition-all duration-300",
15
+ {
16
+ variants: {
17
+ variant: {
18
+ default: "border-transparent bg-primary text-primary-foreground",
19
+ secondary: "border-transparent bg-secondary text-secondary-foreground",
20
+ outline: "text-foreground",
21
+ new: "badge-new"
22
+ }
23
+ },
24
+ defaultVariants: {
25
+ variant: "default"
26
+ }
27
+ }
28
+ );
29
+ function Badge({
30
+ className,
31
+ variant,
32
+ ...props
33
+ }) {
34
+ return /* @__PURE__ */ React.createElement(
35
+ "div",
36
+ {
37
+ "data-slot": "badge",
38
+ className: cn(badgeVariants({ variant }), className),
39
+ ...props
40
+ }
41
+ );
42
+ }
43
+
44
+ // src/components/bento-grid.tsx
45
+ import React2 from "react";
46
+ function BentoGrid({ className, children, ...props }) {
47
+ return /* @__PURE__ */ React2.createElement(
48
+ "div",
49
+ {
50
+ className: cn(
51
+ "grid w-full auto-rows-[22rem] grid-cols-3 gap-4 mx-auto",
52
+ className
53
+ ),
54
+ ...props
55
+ },
56
+ children
57
+ );
58
+ }
59
+ function BentoGridItem({
60
+ className,
61
+ title,
62
+ description,
63
+ header,
64
+ icon
65
+ }) {
66
+ return /* @__PURE__ */ React2.createElement(
67
+ "div",
68
+ {
69
+ className: cn(
70
+ "row-span-1 rounded-xl group/bento hover:shadow-xl transition duration-200 shadow-input dark:shadow-none p-4 dark:bg-black dark:border-white/[0.2] bg-white border border-transparent justify-between flex flex-col space-y-4",
71
+ className
72
+ )
73
+ },
74
+ header,
75
+ /* @__PURE__ */ React2.createElement("div", { className: "group-hover/bento:translate-x-2 transition duration-200" }, icon, /* @__PURE__ */ React2.createElement("div", { className: "font-sans font-bold text-neutral-600 dark:text-neutral-200 mb-2 mt-2" }, title), /* @__PURE__ */ React2.createElement("div", { className: "font-sans font-normal text-neutral-600 text-xs dark:text-neutral-300" }, description))
76
+ );
77
+ }
78
+
79
+ // src/components/button.tsx
80
+ import { Slot } from "@radix-ui/react-slot";
81
+ import { cva as cva2 } from "class-variance-authority";
82
+ import * as React3 from "react";
83
+ var buttonVariants = cva2(
84
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium 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 [&_svg]:pointer-events-none [&_svg]:size-4",
85
+ {
86
+ variants: {
87
+ variant: {
88
+ default: "bg-primary text-primary-foreground hover:opacity-90",
89
+ secondary: "bg-secondary text-secondary-foreground hover:opacity-90",
90
+ outline: "border border-input bg-background hover:bg-accent",
91
+ ghost: "hover:bg-accent",
92
+ destructive: "bg-destructive text-destructive-foreground hover:opacity-90",
93
+ link: "text-primary underline-offset-4 hover:underline"
94
+ },
95
+ size: {
96
+ default: "h-10 px-4 py-2",
97
+ sm: "h-9 px-3",
98
+ lg: "h-11 px-8",
99
+ icon: "size-10"
100
+ }
101
+ },
102
+ defaultVariants: {
103
+ variant: "default",
104
+ size: "default"
105
+ }
106
+ }
107
+ );
108
+ function Button({
109
+ className,
110
+ variant,
111
+ size,
112
+ asChild = false,
113
+ ...props
114
+ }) {
115
+ const Comp = asChild ? Slot : "button";
116
+ return /* @__PURE__ */ React3.createElement(
117
+ Comp,
118
+ {
119
+ "data-slot": "button",
120
+ className: cn(buttonVariants({ variant, size, className })),
121
+ ...props
122
+ }
123
+ );
124
+ }
125
+
126
+ // src/components/card.tsx
127
+ import * as React4 from "react";
128
+ function Card({ className, ...props }) {
129
+ return /* @__PURE__ */ React4.createElement(
130
+ "div",
131
+ {
132
+ "data-slot": "card",
133
+ className: cn(
134
+ "rounded-lg border bg-card text-card-foreground shadow-sm",
135
+ className
136
+ ),
137
+ ...props
138
+ }
139
+ );
140
+ }
141
+ function CardHeader({
142
+ className,
143
+ ...props
144
+ }) {
145
+ return /* @__PURE__ */ React4.createElement(
146
+ "div",
147
+ {
148
+ "data-slot": "card-header",
149
+ className: cn("flex flex-col space-y-1.5 p-6", className),
150
+ ...props
151
+ }
152
+ );
153
+ }
154
+ function CardTitle({ className, ...props }) {
155
+ return /* @__PURE__ */ React4.createElement(
156
+ "h3",
157
+ {
158
+ "data-slot": "card-title",
159
+ className: cn(
160
+ "text-lg font-semibold leading-none tracking-tight",
161
+ className
162
+ ),
163
+ ...props
164
+ }
165
+ );
166
+ }
167
+ function CardDescription({
168
+ className,
169
+ ...props
170
+ }) {
171
+ return /* @__PURE__ */ React4.createElement(
172
+ "p",
173
+ {
174
+ "data-slot": "card-description",
175
+ className: cn("text-sm text-muted-foreground", className),
176
+ ...props
177
+ }
178
+ );
179
+ }
180
+ function CardContent({
181
+ className,
182
+ ...props
183
+ }) {
184
+ return /* @__PURE__ */ React4.createElement(
185
+ "div",
186
+ {
187
+ "data-slot": "card-content",
188
+ className: cn("p-6 pt-0", className),
189
+ ...props
190
+ }
191
+ );
192
+ }
193
+ function CardFooter({
194
+ className,
195
+ ...props
196
+ }) {
197
+ return /* @__PURE__ */ React4.createElement(
198
+ "div",
199
+ {
200
+ "data-slot": "card-footer",
201
+ className: cn("flex items-center p-6 pt-0", className),
202
+ ...props
203
+ }
204
+ );
205
+ }
206
+
207
+ // src/components/dialog.tsx
208
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
209
+ import { X } from "lucide-react";
210
+ import * as React5 from "react";
211
+ function Dialog(props) {
212
+ return /* @__PURE__ */ React5.createElement(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
213
+ }
214
+ function DialogTrigger(props) {
215
+ return /* @__PURE__ */ React5.createElement(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
216
+ }
217
+ function DialogPortal(props) {
218
+ return /* @__PURE__ */ React5.createElement(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
219
+ }
220
+ function DialogClose(props) {
221
+ return /* @__PURE__ */ React5.createElement(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
222
+ }
223
+ function DialogOverlay({
224
+ className,
225
+ ...props
226
+ }) {
227
+ return /* @__PURE__ */ React5.createElement(
228
+ DialogPrimitive.Overlay,
229
+ {
230
+ "data-slot": "dialog-overlay",
231
+ className: cn(
232
+ "fixed inset-0 z-50 bg-black/60 backdrop-blur-sm",
233
+ className
234
+ ),
235
+ ...props
236
+ }
237
+ );
238
+ }
239
+ function DialogContent({
240
+ className,
241
+ children,
242
+ ...props
243
+ }) {
244
+ return /* @__PURE__ */ React5.createElement(DialogPortal, null, /* @__PURE__ */ React5.createElement(DialogOverlay, null), /* @__PURE__ */ React5.createElement(
245
+ DialogPrimitive.Content,
246
+ {
247
+ "data-slot": "dialog-content",
248
+ className: cn(
249
+ "bg-background fixed top-1/2 left-1/2 z-50 grid w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-lg border p-6 shadow-lg",
250
+ className
251
+ ),
252
+ ...props
253
+ },
254
+ children,
255
+ /* @__PURE__ */ React5.createElement(DialogPrimitive.Close, { className: "ring-offset-background data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-80 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2" }, /* @__PURE__ */ React5.createElement(X, { className: "size-4" }), /* @__PURE__ */ React5.createElement("span", { className: "sr-only" }, "Close"))
256
+ ));
257
+ }
258
+ function DialogHeader({
259
+ className,
260
+ ...props
261
+ }) {
262
+ return /* @__PURE__ */ React5.createElement(
263
+ "div",
264
+ {
265
+ "data-slot": "dialog-header",
266
+ className: cn("flex flex-col space-y-1.5", className),
267
+ ...props
268
+ }
269
+ );
270
+ }
271
+ function DialogFooter({
272
+ className,
273
+ ...props
274
+ }) {
275
+ return /* @__PURE__ */ React5.createElement(
276
+ "div",
277
+ {
278
+ "data-slot": "dialog-footer",
279
+ className: cn(
280
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
281
+ className
282
+ ),
283
+ ...props
284
+ }
285
+ );
286
+ }
287
+ function DialogTitle({
288
+ className,
289
+ ...props
290
+ }) {
291
+ return /* @__PURE__ */ React5.createElement(
292
+ DialogPrimitive.Title,
293
+ {
294
+ "data-slot": "dialog-title",
295
+ className: cn("text-lg font-semibold", className),
296
+ ...props
297
+ }
298
+ );
299
+ }
300
+ function DialogDescription({
301
+ className,
302
+ ...props
303
+ }) {
304
+ return /* @__PURE__ */ React5.createElement(
305
+ DialogPrimitive.Description,
306
+ {
307
+ "data-slot": "dialog-description",
308
+ className: cn("text-muted-foreground text-sm", className),
309
+ ...props
310
+ }
311
+ );
312
+ }
313
+
314
+ // src/components/command.tsx
315
+ import { Command as CommandPrimitive } from "cmdk";
316
+ import { Search } from "lucide-react";
317
+ import * as React6 from "react";
318
+ var Command = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
319
+ CommandPrimitive,
320
+ {
321
+ ref,
322
+ className: cn(
323
+ "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
324
+ className
325
+ ),
326
+ ...props
327
+ }
328
+ ));
329
+ Command.displayName = CommandPrimitive.displayName;
330
+ var CommandDialog = ({ children, ...props }) => {
331
+ return /* @__PURE__ */ React6.createElement(Dialog, { ...props }, /* @__PURE__ */ React6.createElement(DialogContent, { className: "overflow-hidden p-0 shadow-lg" }, /* @__PURE__ */ React6.createElement(DialogTitle, { className: "sr-only" }, "Command menu"), /* @__PURE__ */ React6.createElement(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[data-cmdk-input-wrapper]_svg]:h-5 [&_[data-cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5" }, children)));
332
+ };
333
+ var CommandInput = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement("div", { className: "flex items-center border-b px-3", "data-cmdk-input-wrapper": "" }, /* @__PURE__ */ React6.createElement(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), /* @__PURE__ */ React6.createElement(
334
+ CommandPrimitive.Input,
335
+ {
336
+ ref,
337
+ className: cn(
338
+ "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
339
+ className
340
+ ),
341
+ ...props
342
+ }
343
+ )));
344
+ CommandInput.displayName = CommandPrimitive.Input.displayName;
345
+ var CommandList = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
346
+ CommandPrimitive.List,
347
+ {
348
+ ref,
349
+ className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
350
+ ...props
351
+ }
352
+ ));
353
+ CommandList.displayName = CommandPrimitive.List.displayName;
354
+ var CommandEmpty = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(
355
+ CommandPrimitive.Empty,
356
+ {
357
+ ref,
358
+ className: "py-6 text-center text-sm",
359
+ ...props
360
+ }
361
+ ));
362
+ CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
363
+ var CommandGroup = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
364
+ CommandPrimitive.Group,
365
+ {
366
+ ref,
367
+ className: cn(
368
+ "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
369
+ className
370
+ ),
371
+ ...props
372
+ }
373
+ ));
374
+ CommandGroup.displayName = CommandPrimitive.Group.displayName;
375
+ var CommandSeparator = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
376
+ CommandPrimitive.Separator,
377
+ {
378
+ ref,
379
+ className: cn("-mx-1 h-px bg-border", className),
380
+ ...props
381
+ }
382
+ ));
383
+ CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
384
+ var CommandItem = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
385
+ CommandPrimitive.Item,
386
+ {
387
+ ref,
388
+ className: cn(
389
+ "relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
390
+ className
391
+ ),
392
+ ...props
393
+ }
394
+ ));
395
+ CommandItem.displayName = CommandPrimitive.Item.displayName;
396
+ var CommandShortcut = ({
397
+ className,
398
+ ...props
399
+ }) => {
400
+ return /* @__PURE__ */ React6.createElement(
401
+ "span",
402
+ {
403
+ className: cn(
404
+ "ml-auto text-xs tracking-widest text-muted-foreground",
405
+ className
406
+ ),
407
+ ...props
408
+ }
409
+ );
410
+ };
411
+ CommandShortcut.displayName = "CommandShortcut";
412
+
413
+ // src/components/conversation.tsx
414
+ import * as React7 from "react";
415
+ function Conversation({
416
+ className,
417
+ ...props
418
+ }) {
419
+ return /* @__PURE__ */ React7.createElement(
420
+ "div",
421
+ {
422
+ "data-slot": "conversation",
423
+ className: cn("flex flex-col gap-3", className),
424
+ ...props
425
+ }
426
+ );
427
+ }
428
+ function Message({
429
+ from = "assistant",
430
+ className,
431
+ ...props
432
+ }) {
433
+ return /* @__PURE__ */ React7.createElement(
434
+ "div",
435
+ {
436
+ "data-slot": "message",
437
+ className: cn(
438
+ "max-w-[80%] rounded-xl px-3 py-2 text-sm",
439
+ from === "user" ? "bg-primary text-primary-foreground ml-auto" : "bg-muted text-foreground",
440
+ className
441
+ ),
442
+ ...props
443
+ }
444
+ );
445
+ }
446
+
447
+ // src/components/dropdown-menu.tsx
448
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
449
+ import * as React8 from "react";
450
+ function DropdownMenu(props) {
451
+ return /* @__PURE__ */ React8.createElement(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
452
+ }
453
+ function DropdownMenuTrigger(props) {
454
+ return /* @__PURE__ */ React8.createElement(
455
+ DropdownMenuPrimitive.Trigger,
456
+ {
457
+ "data-slot": "dropdown-menu-trigger",
458
+ ...props
459
+ }
460
+ );
461
+ }
462
+ function DropdownMenuContent({
463
+ className,
464
+ sideOffset = 4,
465
+ ...props
466
+ }) {
467
+ return /* @__PURE__ */ React8.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React8.createElement(
468
+ DropdownMenuPrimitive.Content,
469
+ {
470
+ "data-slot": "dropdown-menu-content",
471
+ sideOffset,
472
+ className: cn(
473
+ "bg-popover text-popover-foreground z-50 min-w-40 overflow-hidden rounded-md border p-1 shadow-md",
474
+ className
475
+ ),
476
+ ...props
477
+ }
478
+ ));
479
+ }
480
+ function DropdownMenuItem({
481
+ className,
482
+ ...props
483
+ }) {
484
+ return /* @__PURE__ */ React8.createElement(
485
+ DropdownMenuPrimitive.Item,
486
+ {
487
+ "data-slot": "dropdown-menu-item",
488
+ className: cn(
489
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none",
490
+ className
491
+ ),
492
+ ...props
493
+ }
494
+ );
495
+ }
496
+ function DropdownMenuSeparator({
497
+ className,
498
+ ...props
499
+ }) {
500
+ return /* @__PURE__ */ React8.createElement(
501
+ DropdownMenuPrimitive.Separator,
502
+ {
503
+ className: cn("bg-border -mx-1 my-1 h-px", className),
504
+ ...props
505
+ }
506
+ );
507
+ }
508
+ function DropdownMenuLabel({
509
+ className,
510
+ ...props
511
+ }) {
512
+ return /* @__PURE__ */ React8.createElement(
513
+ DropdownMenuPrimitive.Label,
514
+ {
515
+ className: cn("px-2 py-1.5 text-sm font-medium", className),
516
+ ...props
517
+ }
518
+ );
519
+ }
520
+
521
+ // src/components/generative-container.tsx
522
+ import React9 from "react";
523
+ function GenerativeContainer({
524
+ children,
525
+ className,
526
+ active = true,
527
+ ...props
528
+ }) {
529
+ return /* @__PURE__ */ React9.createElement(
530
+ "div",
531
+ {
532
+ className: cn("relative rounded-xl p-[1px] overflow-hidden", className),
533
+ ...props
534
+ },
535
+ active && /* @__PURE__ */ React9.createElement("div", { className: "absolute inset-0 z-0 bg-[conic-gradient(from_0deg_at_50%_50%,transparent_0%,transparent_75%,hsl(var(--primary))_100%)] animate-[spin_3s_linear_infinite]" }),
536
+ /* @__PURE__ */ React9.createElement("div", { className: "relative z-10 rounded-[10px] bg-background h-full w-full" }, children)
537
+ );
538
+ }
539
+
540
+ // src/components/input.tsx
541
+ import * as React10 from "react";
542
+ function Input({ className, error, id, ...props }) {
543
+ const errorId = id ? `${id}-error` : void 0;
544
+ return /* @__PURE__ */ React10.createElement("div", { className: "grid gap-1.5" }, /* @__PURE__ */ React10.createElement(
545
+ "input",
546
+ {
547
+ id,
548
+ "data-slot": "input",
549
+ className: cn(
550
+ "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
551
+ error && "border-destructive focus-visible:ring-destructive",
552
+ className
553
+ ),
554
+ "aria-invalid": error ? true : void 0,
555
+ "aria-describedby": error ? errorId : void 0,
556
+ ...props
557
+ }
558
+ ), error ? /* @__PURE__ */ React10.createElement("p", { id: errorId, className: "text-sm text-destructive", role: "alert" }, error) : null);
559
+ }
560
+
561
+ // src/components/label.tsx
562
+ import * as LabelPrimitive from "@radix-ui/react-label";
563
+ import * as React11 from "react";
564
+ function Label2({
565
+ className,
566
+ ...props
567
+ }) {
568
+ return /* @__PURE__ */ React11.createElement(
569
+ LabelPrimitive.Root,
570
+ {
571
+ "data-slot": "label",
572
+ className: cn(
573
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
574
+ className
575
+ ),
576
+ ...props
577
+ }
578
+ );
579
+ }
580
+
581
+ // src/components/magnetic-button.tsx
582
+ import { motion } from "framer-motion";
583
+ import React12, { useRef, useState } from "react";
584
+ function MagneticButton({
585
+ children,
586
+ distance = 10,
587
+ className,
588
+ ...props
589
+ }) {
590
+ const [position, setPosition] = useState({ x: 0, y: 0 });
591
+ const ref = useRef(null);
592
+ const handleMouse = (e) => {
593
+ const { clientX, clientY } = e;
594
+ if (!ref.current) return;
595
+ const { height, width, left, top } = ref.current.getBoundingClientRect();
596
+ const middleX = clientX - (left + width / 2);
597
+ const middleY = clientY - (top + height / 2);
598
+ const normalizedX = middleX / Math.max(width / 2, 1);
599
+ const normalizedY = middleY / Math.max(height / 2, 1);
600
+ setPosition({
601
+ x: normalizedX * distance,
602
+ y: normalizedY * distance
603
+ });
604
+ };
605
+ const reset = () => {
606
+ setPosition({ x: 0, y: 0 });
607
+ };
608
+ return /* @__PURE__ */ React12.createElement(
609
+ motion.div,
610
+ {
611
+ style: { position: "relative", display: "inline-block" },
612
+ ref,
613
+ onMouseMove: handleMouse,
614
+ onMouseLeave: reset,
615
+ animate: { x: position.x, y: position.y },
616
+ transition: { type: "spring", stiffness: 150, damping: 15, mass: 0.1 }
617
+ },
618
+ /* @__PURE__ */ React12.createElement(Button, { className, ...props }, children)
619
+ );
620
+ }
621
+
622
+ // src/components/scroll-area.tsx
623
+ import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
624
+ import * as React13 from "react";
625
+ var ScrollArea = React13.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React13.createElement(
626
+ ScrollAreaPrimitive.Root,
627
+ {
628
+ ref,
629
+ className: cn("relative overflow-hidden", className),
630
+ ...props
631
+ },
632
+ /* @__PURE__ */ React13.createElement(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]" }, children),
633
+ /* @__PURE__ */ React13.createElement(ScrollBar, null),
634
+ /* @__PURE__ */ React13.createElement(ScrollAreaPrimitive.Corner, null)
635
+ ));
636
+ ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
637
+ var ScrollBar = React13.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React13.createElement(
638
+ ScrollAreaPrimitive.ScrollAreaScrollbar,
639
+ {
640
+ ref,
641
+ orientation,
642
+ className: cn(
643
+ "flex touch-none select-none transition-colors",
644
+ orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
645
+ orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
646
+ className
647
+ ),
648
+ ...props
649
+ },
650
+ /* @__PURE__ */ React13.createElement(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
651
+ ));
652
+ ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
653
+
654
+ // src/components/separator.tsx
655
+ import * as SeparatorPrimitive from "@radix-ui/react-separator";
656
+ import * as React14 from "react";
657
+ function Separator2({
658
+ className,
659
+ orientation = "horizontal",
660
+ decorative = true,
661
+ ...props
662
+ }) {
663
+ return /* @__PURE__ */ React14.createElement(
664
+ SeparatorPrimitive.Root,
665
+ {
666
+ "data-slot": "separator",
667
+ decorative,
668
+ orientation,
669
+ className: cn(
670
+ "bg-border shrink-0",
671
+ orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
672
+ className
673
+ ),
674
+ ...props
675
+ }
676
+ );
677
+ }
678
+
679
+ // src/components/spotlight-card.tsx
680
+ import React15, { useRef as useRef2, useState as useState2 } from "react";
681
+ function SpotlightCard({
682
+ children,
683
+ className,
684
+ spotlightColor = "rgba(120, 119, 198, 0.1)",
685
+ ...props
686
+ }) {
687
+ const divRef = useRef2(null);
688
+ const [isFocused, setIsFocused] = useState2(false);
689
+ const [position, setPosition] = useState2({ x: 0, y: 0 });
690
+ const [opacity, setOpacity] = useState2(0);
691
+ const handleMouseMove = (e) => {
692
+ if (!divRef.current || isFocused) return;
693
+ const div = divRef.current;
694
+ const rect = div.getBoundingClientRect();
695
+ setPosition({ x: e.clientX - rect.left, y: e.clientY - rect.top });
696
+ };
697
+ const handleFocus = () => {
698
+ setIsFocused(true);
699
+ setOpacity(1);
700
+ };
701
+ const handleBlur = () => {
702
+ setIsFocused(false);
703
+ setOpacity(0);
704
+ };
705
+ const handleMouseEnter = () => {
706
+ setOpacity(1);
707
+ };
708
+ const handleMouseLeave = () => {
709
+ setOpacity(0);
710
+ };
711
+ return /* @__PURE__ */ React15.createElement(
712
+ "div",
713
+ {
714
+ ref: divRef,
715
+ onMouseMove: handleMouseMove,
716
+ onFocus: handleFocus,
717
+ onBlur: handleBlur,
718
+ onMouseEnter: handleMouseEnter,
719
+ onMouseLeave: handleMouseLeave,
720
+ className: cn(
721
+ "relative overflow-hidden rounded-xl border bg-card text-card-foreground shadow transition-colors",
722
+ className
723
+ ),
724
+ ...props
725
+ },
726
+ /* @__PURE__ */ React15.createElement(
727
+ "div",
728
+ {
729
+ className: "pointer-events-none absolute -inset-px opacity-0 transition duration-300",
730
+ style: {
731
+ opacity,
732
+ background: `radial-gradient(600px circle at ${position.x}px ${position.y}px, ${spotlightColor}, transparent 40%)`
733
+ }
734
+ }
735
+ ),
736
+ /* @__PURE__ */ React15.createElement("div", { className: "relative h-full z-10" }, children)
737
+ );
738
+ }
739
+
740
+ // src/components/tabs.tsx
741
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
742
+ import * as React16 from "react";
743
+ function Tabs({
744
+ className,
745
+ ...props
746
+ }) {
747
+ return /* @__PURE__ */ React16.createElement(
748
+ TabsPrimitive.Root,
749
+ {
750
+ "data-slot": "tabs",
751
+ className: cn("flex flex-col gap-2", className),
752
+ ...props
753
+ }
754
+ );
755
+ }
756
+ function TabsList({
757
+ className,
758
+ ...props
759
+ }) {
760
+ return /* @__PURE__ */ React16.createElement(
761
+ TabsPrimitive.List,
762
+ {
763
+ "data-slot": "tabs-list",
764
+ className: cn(
765
+ "bg-muted text-muted-foreground inline-flex h-10 items-center rounded-md p-1",
766
+ className
767
+ ),
768
+ ...props
769
+ }
770
+ );
771
+ }
772
+ function TabsTrigger({
773
+ className,
774
+ ...props
775
+ }) {
776
+ return /* @__PURE__ */ React16.createElement(
777
+ TabsPrimitive.Trigger,
778
+ {
779
+ "data-slot": "tabs-trigger",
780
+ className: cn(
781
+ "data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-sm px-3 py-1.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
782
+ className
783
+ ),
784
+ ...props
785
+ }
786
+ );
787
+ }
788
+ function TabsContent({
789
+ className,
790
+ ...props
791
+ }) {
792
+ return /* @__PURE__ */ React16.createElement(
793
+ TabsPrimitive.Content,
794
+ {
795
+ "data-slot": "tabs-content",
796
+ className: cn(
797
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-md",
798
+ className
799
+ ),
800
+ ...props
801
+ }
802
+ );
803
+ }
804
+
805
+ // src/components/textarea.tsx
806
+ import * as React17 from "react";
807
+ function Textarea({
808
+ className,
809
+ ...props
810
+ }) {
811
+ return /* @__PURE__ */ React17.createElement(
812
+ "textarea",
813
+ {
814
+ "data-slot": "textarea",
815
+ className: cn(
816
+ "border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring min-h-20 w-full rounded-md border px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
817
+ className
818
+ ),
819
+ ...props
820
+ }
821
+ );
822
+ }
823
+
824
+ // src/components/voice-button.tsx
825
+ import { Mic, MicOff } from "lucide-react";
826
+ import * as React18 from "react";
827
+ function VoiceButton({
828
+ isListening = false,
829
+ onToggle,
830
+ disabled,
831
+ className
832
+ }) {
833
+ return /* @__PURE__ */ React18.createElement(
834
+ Button,
835
+ {
836
+ type: "button",
837
+ variant: isListening ? "destructive" : "default",
838
+ className: cn("min-w-36 gap-2", className),
839
+ onClick: onToggle,
840
+ disabled
841
+ },
842
+ isListening ? /* @__PURE__ */ React18.createElement(MicOff, null) : /* @__PURE__ */ React18.createElement(Mic, null),
843
+ isListening ? "Stop listening" : "Start speaking"
844
+ );
845
+ }
846
+
847
+ // src/components/voice-input-bar.tsx
848
+ import { AnimatePresence, motion as motion2 } from "framer-motion";
849
+ import { Mic as Mic2, Send } from "lucide-react";
850
+ import React19, { useRef as useRef3, useState as useState3 } from "react";
851
+ function VoiceInputBar({
852
+ onSend,
853
+ onVoiceStart,
854
+ onVoiceStop,
855
+ placeholder = "Message or tap mic...",
856
+ className
857
+ }) {
858
+ const [isListening, setIsListening] = useState3(false);
859
+ const [text, setText] = useState3("");
860
+ const inputRef = useRef3(null);
861
+ const toggleListen = () => {
862
+ if (isListening) {
863
+ setIsListening(false);
864
+ onVoiceStop?.();
865
+ } else {
866
+ setIsListening(true);
867
+ onVoiceStart?.();
868
+ }
869
+ };
870
+ const handleSend = () => {
871
+ if (text.trim()) {
872
+ onSend?.(text);
873
+ setText("");
874
+ }
875
+ };
876
+ return /* @__PURE__ */ React19.createElement(
877
+ "div",
878
+ {
879
+ className: cn(
880
+ "relative flex w-full max-w-2xl items-center rounded-full border bg-background px-2 py-1.5 shadow-sm transition-all focus-within:ring-1 focus-within:ring-ring",
881
+ isListening && "ring-1 ring-primary/50 shadow-md",
882
+ className
883
+ )
884
+ },
885
+ /* @__PURE__ */ React19.createElement(
886
+ "button",
887
+ {
888
+ type: "button",
889
+ onClick: toggleListen,
890
+ className: cn(
891
+ "flex h-10 w-10 shrink-0 items-center justify-center rounded-full transition-colors",
892
+ isListening ? "bg-red-500 text-white shadow-[0_0_15px_rgba(239,68,68,0.5)]" : "bg-muted text-muted-foreground hover:bg-muted/80 hover:text-foreground"
893
+ )
894
+ },
895
+ /* @__PURE__ */ React19.createElement(Mic2, { className: cn("h-5 w-5", isListening && "animate-pulse") })
896
+ ),
897
+ /* @__PURE__ */ React19.createElement("div", { className: "relative flex-1 overflow-hidden px-3" }, /* @__PURE__ */ React19.createElement(AnimatePresence, { mode: "popLayout" }, isListening ? /* @__PURE__ */ React19.createElement(
898
+ motion2.div,
899
+ {
900
+ initial: { y: 20, opacity: 0 },
901
+ animate: { y: 0, opacity: 1 },
902
+ exit: { y: -20, opacity: 0 },
903
+ className: "flex h-10 items-center justify-center space-x-1"
904
+ },
905
+ [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 2].map((i, index) => /* @__PURE__ */ React19.createElement(
906
+ motion2.div,
907
+ {
908
+ key: index,
909
+ animate: {
910
+ height: ["10%", "100%", "10%"]
911
+ },
912
+ transition: {
913
+ duration: 1,
914
+ repeat: Infinity,
915
+ delay: index * 0.1,
916
+ ease: "easeInOut"
917
+ },
918
+ className: "w-1 rounded-full bg-foreground"
919
+ }
920
+ )),
921
+ /* @__PURE__ */ React19.createElement("span", { className: "ml-4 text-sm font-medium animate-pulse text-muted-foreground" }, "Listening...")
922
+ ) : /* @__PURE__ */ React19.createElement(
923
+ motion2.input,
924
+ {
925
+ initial: { y: -20, opacity: 0 },
926
+ animate: { y: 0, opacity: 1 },
927
+ exit: { y: 20, opacity: 0 },
928
+ ref: inputRef,
929
+ type: "text",
930
+ value: text,
931
+ onChange: (e) => setText(e.target.value),
932
+ onKeyDown: (e) => e.key === "Enter" && handleSend(),
933
+ placeholder,
934
+ className: "flex h-10 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"
935
+ }
936
+ ))),
937
+ /* @__PURE__ */ React19.createElement(AnimatePresence, null, !isListening && text.length > 0 && /* @__PURE__ */ React19.createElement(
938
+ motion2.button,
939
+ {
940
+ initial: { scale: 0.8, opacity: 0 },
941
+ animate: { scale: 1, opacity: 1 },
942
+ exit: { scale: 0.8, opacity: 0 },
943
+ type: "button",
944
+ onClick: handleSend,
945
+ className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-primary text-primary-foreground hover:bg-primary/90 transition-colors mr-1"
946
+ },
947
+ /* @__PURE__ */ React19.createElement(Send, { className: "h-4 w-4 ml-0.5" })
948
+ ))
949
+ );
950
+ }
951
+
952
+ // src/components/waveform.tsx
953
+ import * as React20 from "react";
954
+ function Waveform({
955
+ bars = 24,
956
+ active = false,
957
+ className
958
+ }) {
959
+ const data = React20.useMemo(() => {
960
+ return Array.from({ length: bars }, (_, index) => {
961
+ const cycle = index % 7 + 1;
962
+ return cycle / 7;
963
+ });
964
+ }, [bars]);
965
+ return /* @__PURE__ */ React20.createElement(
966
+ "div",
967
+ {
968
+ "data-slot": "waveform",
969
+ className: cn("flex h-10 items-end gap-1 rounded-md px-2", className)
970
+ },
971
+ data.map((value, index) => /* @__PURE__ */ React20.createElement(
972
+ "div",
973
+ {
974
+ key: index,
975
+ className: cn(
976
+ "bg-primary/80 w-1 rounded-full transition-all",
977
+ active ? "animate-pulse" : ""
978
+ ),
979
+ style: { height: `${Math.max(value * 100, 20)}%` }
980
+ }
981
+ ))
982
+ );
983
+ }
984
+ export {
985
+ Badge,
986
+ BentoGrid,
987
+ BentoGridItem,
988
+ Button,
989
+ Card,
990
+ CardContent,
991
+ CardDescription,
992
+ CardFooter,
993
+ CardHeader,
994
+ CardTitle,
995
+ Command,
996
+ CommandDialog,
997
+ CommandEmpty,
998
+ CommandGroup,
999
+ CommandInput,
1000
+ CommandItem,
1001
+ CommandList,
1002
+ CommandSeparator,
1003
+ CommandShortcut,
1004
+ Conversation,
1005
+ Dialog,
1006
+ DialogClose,
1007
+ DialogContent,
1008
+ DialogDescription,
1009
+ DialogFooter,
1010
+ DialogHeader,
1011
+ DialogOverlay,
1012
+ DialogPortal,
1013
+ DialogTitle,
1014
+ DialogTrigger,
1015
+ DropdownMenu,
1016
+ DropdownMenuContent,
1017
+ DropdownMenuItem,
1018
+ DropdownMenuLabel,
1019
+ DropdownMenuSeparator,
1020
+ DropdownMenuTrigger,
1021
+ GenerativeContainer,
1022
+ Input,
1023
+ Label2 as Label,
1024
+ MagneticButton,
1025
+ Message,
1026
+ ScrollArea,
1027
+ ScrollBar,
1028
+ Separator2 as Separator,
1029
+ SpotlightCard,
1030
+ Tabs,
1031
+ TabsContent,
1032
+ TabsList,
1033
+ TabsTrigger,
1034
+ Textarea,
1035
+ VoiceButton,
1036
+ VoiceInputBar,
1037
+ Waveform,
1038
+ buttonVariants,
1039
+ cn
1040
+ };
1041
+ //# sourceMappingURL=index.js.map