@krak-stack/registry 0.10.14 → 0.10.15

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @krak-stack/registry
2
2
 
3
+ ## 0.10.15
4
+
5
+ ### Patch Changes
6
+
7
+ - Export a standalone Effect ClamAV client at `@krak-stack/registry/clamav` and add opt-in durable malware scanning to Assets. Scanned uploads stay private until their verified bytes pass scanning.
8
+ - Replace deprecated MeloTTS synthesis with ElevenLabs Flash v2.5 through Cloudflare AI Gateway. The six supported languages and MP3 response are unchanged. Synthesis requires Cloudflare AI Gateway Unified Billing credits; transcription still uses Whisper.
9
+
3
10
  ## 0.10.14
4
11
 
5
12
  ### Patch Changes
@@ -1,5 +1,4 @@
1
1
  // ../../src/components/support-dialog.tsx
2
- import { Dialog as DialogPrimitive2 } from "@base-ui/react/dialog";
3
2
  import { Effect, FileSystem, Result, Schema } from "effect";
4
3
  import { Multipart } from "effect/http";
5
4
  import { HttpApiSchema } from "effect/http-api";
@@ -162,6 +161,7 @@ function AttachmentAction({
162
161
 
163
162
  // ../../src/components/ui/dialog.tsx
164
163
  import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
164
+ import { cn as cn2 } from "cn";
165
165
  import { XIcon } from "lucide-react";
166
166
  import { jsx as jsx3, jsxs } from "react/jsx-runtime";
167
167
  function Dialog({ ...props }) {
@@ -194,31 +194,77 @@ function DialogOverlay({
194
194
  }) {
195
195
  return /* @__PURE__ */ jsx3(DialogPrimitive.Backdrop, {
196
196
  "data-slot": "dialog-overlay",
197
- className: cn("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
197
+ className: cn2("data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs", className),
198
198
  ...props
199
199
  });
200
200
  }
201
- function DialogHeader({ className, ...props }) {
202
- return /* @__PURE__ */ jsx3("div", {
203
- "data-slot": "dialog-header",
204
- className: cn("grid gap-1.5", className),
205
- ...props
201
+ function DialogContent({
202
+ className,
203
+ children,
204
+ showCloseButton = true,
205
+ ...props
206
+ }) {
207
+ return /* @__PURE__ */ jsxs(DialogPortal, {
208
+ children: [
209
+ /* @__PURE__ */ jsx3(DialogOverlay, {}),
210
+ /* @__PURE__ */ jsxs(DialogPrimitive.Popup, {
211
+ "data-slot": "dialog-content",
212
+ className: cn2("bg-popover text-popover-foreground ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl p-6 text-sm ring-1 duration-100 outline-none sm:max-w-md", className),
213
+ ...props,
214
+ children: [
215
+ children,
216
+ showCloseButton && /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
217
+ "data-slot": "dialog-close",
218
+ render: /* @__PURE__ */ jsx3(Button, {
219
+ variant: "ghost",
220
+ className: "absolute top-4 right-4",
221
+ size: "icon-sm"
222
+ }),
223
+ children: [
224
+ /* @__PURE__ */ jsx3(XIcon, {}),
225
+ /* @__PURE__ */ jsx3("span", {
226
+ className: "sr-only",
227
+ children: "Close"
228
+ })
229
+ ]
230
+ })
231
+ ]
232
+ })
233
+ ]
206
234
  });
207
235
  }
208
- function DialogFooter({ className, ...props }) {
236
+ function DialogHeader({ className, ...props }) {
209
237
  return /* @__PURE__ */ jsx3("div", {
210
- "data-slot": "dialog-footer",
211
- className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
238
+ "data-slot": "dialog-header",
239
+ className: cn2("flex flex-col gap-2", className),
212
240
  ...props
213
241
  });
214
242
  }
215
- function DialogTitle({
243
+ function DialogFooter({
216
244
  className,
245
+ showCloseButton = false,
246
+ children,
217
247
  ...props
218
248
  }) {
249
+ return /* @__PURE__ */ jsxs("div", {
250
+ "data-slot": "dialog-footer",
251
+ className: cn2("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
252
+ ...props,
253
+ children: [
254
+ children,
255
+ showCloseButton && /* @__PURE__ */ jsx3(DialogPrimitive.Close, {
256
+ render: /* @__PURE__ */ jsx3(Button, {
257
+ variant: "outline"
258
+ }),
259
+ children: "Close"
260
+ })
261
+ ]
262
+ });
263
+ }
264
+ function DialogTitle({ className, ...props }) {
219
265
  return /* @__PURE__ */ jsx3(DialogPrimitive.Title, {
220
266
  "data-slot": "dialog-title",
221
- className: cn("text-lg font-medium", className),
267
+ className: cn2("leading-none font-medium", className),
222
268
  ...props
223
269
  });
224
270
  }
@@ -228,7 +274,7 @@ function DialogDescription({
228
274
  }) {
229
275
  return /* @__PURE__ */ jsx3(DialogPrimitive.Description, {
230
276
  "data-slot": "dialog-description",
231
- className: cn("text-sm text-muted-foreground", className),
277
+ className: cn2("text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3", className),
232
278
  ...props
233
279
  });
234
280
  }
@@ -452,185 +498,181 @@ var SupportDialog = ({
452
498
  children: copy.title
453
499
  })
454
500
  }),
455
- /* @__PURE__ */ jsxs2(DialogPortal, {
501
+ /* @__PURE__ */ jsxs2(DialogContent, {
502
+ showCloseButton: false,
503
+ className: "max-h-[calc(100dvh-2rem)] gap-4 overflow-auto text-base sm:max-w-lg",
456
504
  children: [
457
- /* @__PURE__ */ jsx7(DialogOverlay, {}),
458
- /* @__PURE__ */ jsxs2(DialogPrimitive2.Popup, {
459
- className: "bg-popover text-popover-foreground ring-foreground/10 fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100dvh-2rem)] w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 overflow-auto rounded-xl p-6 ring-1 outline-none",
505
+ /* @__PURE__ */ jsxs2(DialogHeader, {
506
+ className: status === "success" ? undefined : "pe-8",
460
507
  children: [
461
- /* @__PURE__ */ jsxs2(DialogHeader, {
462
- className: status === "success" ? undefined : "pe-8",
463
- children: [
464
- /* @__PURE__ */ jsx7(DialogTitle, {
465
- children: /* @__PURE__ */ jsx7("span", {
466
- id: `${id}-title`,
467
- children: copy.title
468
- })
469
- }),
470
- copy.description && /* @__PURE__ */ jsx7(DialogDescription, {
471
- children: copy.description
472
- })
473
- ]
474
- }),
475
- status !== "success" && /* @__PURE__ */ jsx7(DialogClose, {
476
- render: /* @__PURE__ */ jsx7(Button, {
477
- className: "absolute end-4 top-4",
478
- variant: "ghost",
479
- size: "icon-sm",
480
- "aria-label": copy.close,
481
- disabled: pending
482
- }),
483
- children: /* @__PURE__ */ jsx7(XIcon2, {
484
- "aria-hidden": "true"
508
+ /* @__PURE__ */ jsx7(DialogTitle, {
509
+ children: /* @__PURE__ */ jsx7("span", {
510
+ id: `${id}-title`,
511
+ children: copy.title
485
512
  })
486
513
  }),
487
- status === "success" ? /* @__PURE__ */ jsxs2(Fragment, {
488
- children: [
489
- /* @__PURE__ */ jsx7("p", {
490
- role: "status",
491
- className: "text-sm",
492
- children: copy.success
514
+ copy.description && /* @__PURE__ */ jsx7(DialogDescription, {
515
+ children: copy.description
516
+ })
517
+ ]
518
+ }),
519
+ status !== "success" && /* @__PURE__ */ jsx7(DialogClose, {
520
+ render: /* @__PURE__ */ jsx7(Button, {
521
+ className: "absolute end-4 top-4",
522
+ variant: "ghost",
523
+ size: "icon-sm",
524
+ "aria-label": copy.close,
525
+ disabled: pending
526
+ }),
527
+ children: /* @__PURE__ */ jsx7(XIcon2, {
528
+ "aria-hidden": "true"
529
+ })
530
+ }),
531
+ status === "success" ? /* @__PURE__ */ jsxs2(Fragment, {
532
+ children: [
533
+ /* @__PURE__ */ jsx7("p", {
534
+ role: "status",
535
+ className: "text-sm",
536
+ children: copy.success
537
+ }),
538
+ /* @__PURE__ */ jsx7(DialogFooter, {
539
+ children: /* @__PURE__ */ jsx7(DialogClose, {
540
+ render: /* @__PURE__ */ jsx7(Button, {
541
+ autoFocus: true
493
542
  }),
494
- /* @__PURE__ */ jsx7(DialogFooter, {
495
- children: /* @__PURE__ */ jsx7(DialogClose, {
496
- render: /* @__PURE__ */ jsx7(Button, {
497
- autoFocus: true
498
- }),
499
- children: copy.close
500
- })
501
- })
502
- ]
503
- }) : /* @__PURE__ */ jsxs2("form", {
504
- className: "grid gap-4",
505
- onSubmit: submit,
506
- "aria-busy": pending,
543
+ children: copy.close
544
+ })
545
+ })
546
+ ]
547
+ }) : /* @__PURE__ */ jsxs2("form", {
548
+ className: "grid gap-4",
549
+ onSubmit: submit,
550
+ "aria-busy": pending,
551
+ children: [
552
+ /* @__PURE__ */ jsxs2("fieldset", {
553
+ disabled: pending,
554
+ className: "grid min-w-0 gap-4",
507
555
  children: [
508
- /* @__PURE__ */ jsxs2("fieldset", {
509
- disabled: pending,
510
- className: "grid min-w-0 gap-4",
556
+ askForReplyEmail && /* @__PURE__ */ jsxs2("div", {
557
+ className: "grid gap-2",
511
558
  children: [
512
- askForReplyEmail && /* @__PURE__ */ jsxs2("div", {
513
- className: "grid gap-2",
514
- children: [
515
- /* @__PURE__ */ jsx7(Label, {
516
- htmlFor: `${id}-email`,
517
- children: copy.replyEmail
518
- }),
519
- /* @__PURE__ */ jsx7(Input, {
520
- id: `${id}-email`,
521
- name: "replyEmail",
522
- type: "email",
523
- autoComplete: "email",
524
- maxLength: supportReplyEmailLimit,
525
- required: true
526
- })
527
- ]
559
+ /* @__PURE__ */ jsx7(Label, {
560
+ htmlFor: `${id}-email`,
561
+ children: copy.replyEmail
562
+ }),
563
+ /* @__PURE__ */ jsx7(Input, {
564
+ id: `${id}-email`,
565
+ name: "replyEmail",
566
+ type: "email",
567
+ autoComplete: "email",
568
+ maxLength: supportReplyEmailLimit,
569
+ required: true
570
+ })
571
+ ]
572
+ }),
573
+ /* @__PURE__ */ jsxs2("div", {
574
+ className: "grid gap-2",
575
+ children: [
576
+ /* @__PURE__ */ jsx7(Textarea, {
577
+ id: `${id}-message`,
578
+ "aria-labelledby": `${id}-title`,
579
+ name: "message",
580
+ rows: 8,
581
+ className: "min-h-44",
582
+ placeholder: copy.placeholder,
583
+ required: true,
584
+ maxLength: supportMessageLimit,
585
+ onPaste: pasteScreenshot
586
+ }),
587
+ /* @__PURE__ */ jsx7("input", {
588
+ ref: fileInput,
589
+ type: "file",
590
+ "aria-label": copy.attach,
591
+ accept: screenshotAccept,
592
+ multiple: true,
593
+ hidden: true,
594
+ onChange: (event) => {
595
+ addAttachments(Array.from(event.currentTarget.files ?? []));
596
+ event.currentTarget.value = "";
597
+ }
528
598
  }),
529
- /* @__PURE__ */ jsxs2("div", {
530
- className: "grid gap-2",
531
- children: [
532
- /* @__PURE__ */ jsx7(Textarea, {
533
- id: `${id}-message`,
534
- "aria-labelledby": `${id}-title`,
535
- name: "message",
536
- rows: 8,
537
- className: "min-h-44",
538
- placeholder: copy.placeholder,
539
- required: true,
540
- maxLength: supportMessageLimit,
541
- onPaste: pasteScreenshot
542
- }),
543
- /* @__PURE__ */ jsx7("input", {
544
- ref: fileInput,
545
- type: "file",
546
- "aria-label": copy.attach,
547
- accept: screenshotAccept,
548
- multiple: true,
549
- hidden: true,
550
- onChange: (event) => {
551
- addAttachments(Array.from(event.currentTarget.files ?? []));
552
- event.currentTarget.value = "";
553
- }
554
- }),
555
- attachments.length > 0 && /* @__PURE__ */ jsx7("ul", {
556
- className: "flex min-w-0 flex-wrap gap-2",
557
- children: attachments.map((file, index) => /* @__PURE__ */ jsx7("li", {
558
- className: "max-w-full min-w-0",
559
- children: /* @__PURE__ */ jsxs2(Attachment, {
560
- size: "xs",
561
- className: "min-w-0 flex-nowrap",
599
+ attachments.length > 0 && /* @__PURE__ */ jsx7("ul", {
600
+ className: "flex min-w-0 flex-wrap gap-2",
601
+ children: attachments.map((file, index) => /* @__PURE__ */ jsx7("li", {
602
+ className: "max-w-full min-w-0",
603
+ children: /* @__PURE__ */ jsxs2(Attachment, {
604
+ size: "xs",
605
+ className: "min-w-0 flex-nowrap",
606
+ children: [
607
+ /* @__PURE__ */ jsxs2(AttachmentContent, {
608
+ className: "flex items-center gap-1.5",
562
609
  children: [
563
- /* @__PURE__ */ jsxs2(AttachmentContent, {
564
- className: "flex items-center gap-1.5",
565
- children: [
566
- /* @__PURE__ */ jsx7(AttachmentMedia, {
567
- className: "shrink-0",
568
- children: /* @__PURE__ */ jsx7(ImageIcon, {
569
- "aria-hidden": "true"
570
- })
571
- }),
572
- /* @__PURE__ */ jsx7(AttachmentTitle, {
573
- title: file.name,
574
- children: file.name
575
- })
576
- ]
577
- }),
578
- /* @__PURE__ */ jsx7(AttachmentActions, {
579
- className: "pe-1",
580
- children: /* @__PURE__ */ jsx7(AttachmentAction, {
581
- type: "button",
582
- "aria-label": `${copy.removeAttachment}: ${file.name}`,
583
- onClick: () => {
584
- setAttachments(attachments.filter((_, position) => position !== index));
585
- setInvalidAttachments(false);
586
- },
587
- children: /* @__PURE__ */ jsx7(XIcon2, {
588
- "aria-hidden": "true"
589
- })
610
+ /* @__PURE__ */ jsx7(AttachmentMedia, {
611
+ className: "shrink-0",
612
+ children: /* @__PURE__ */ jsx7(ImageIcon, {
613
+ "aria-hidden": "true"
590
614
  })
615
+ }),
616
+ /* @__PURE__ */ jsx7(AttachmentTitle, {
617
+ title: file.name,
618
+ children: file.name
591
619
  })
592
620
  ]
621
+ }),
622
+ /* @__PURE__ */ jsx7(AttachmentActions, {
623
+ className: "pe-1",
624
+ children: /* @__PURE__ */ jsx7(AttachmentAction, {
625
+ type: "button",
626
+ "aria-label": `${copy.removeAttachment}: ${file.name}`,
627
+ onClick: () => {
628
+ setAttachments(attachments.filter((_, position) => position !== index));
629
+ setInvalidAttachments(false);
630
+ },
631
+ children: /* @__PURE__ */ jsx7(XIcon2, {
632
+ "aria-hidden": "true"
633
+ })
634
+ })
593
635
  })
594
- }, index))
595
- }),
596
- invalidAttachments && /* @__PURE__ */ jsx7("p", {
597
- role: "alert",
598
- className: "text-destructive text-sm",
599
- children: copy.invalidAttachments
636
+ ]
600
637
  })
601
- ]
638
+ }, index))
639
+ }),
640
+ invalidAttachments && /* @__PURE__ */ jsx7("p", {
641
+ role: "alert",
642
+ className: "text-destructive text-sm",
643
+ children: copy.invalidAttachments
602
644
  })
603
645
  ]
604
- }),
605
- (status === "failed" || status === "invalid") && /* @__PURE__ */ jsx7("p", {
606
- role: "alert",
607
- className: "text-destructive text-sm",
608
- children: status === "invalid" ? copy.invalid : copy.failed
609
- }),
610
- /* @__PURE__ */ jsxs2("div", {
611
- className: "flex flex-wrap items-center justify-between gap-2",
646
+ })
647
+ ]
648
+ }),
649
+ (status === "failed" || status === "invalid") && /* @__PURE__ */ jsx7("p", {
650
+ role: "alert",
651
+ className: "text-destructive text-sm",
652
+ children: status === "invalid" ? copy.invalid : copy.failed
653
+ }),
654
+ /* @__PURE__ */ jsxs2("div", {
655
+ className: "flex flex-wrap items-center justify-between gap-2",
656
+ children: [
657
+ /* @__PURE__ */ jsxs2(Button, {
658
+ type: "button",
659
+ variant: "ghost",
660
+ size: "sm",
661
+ disabled: pending,
662
+ onClick: () => fileInput.current?.click(),
612
663
  children: [
613
- /* @__PURE__ */ jsxs2(Button, {
614
- type: "button",
615
- variant: "ghost",
616
- size: "sm",
617
- disabled: pending,
618
- onClick: () => fileInput.current?.click(),
619
- children: [
620
- /* @__PURE__ */ jsx7(Paperclip, {
621
- "aria-hidden": "true"
622
- }),
623
- copy.attach
624
- ]
664
+ /* @__PURE__ */ jsx7(Paperclip, {
665
+ "aria-hidden": "true"
625
666
  }),
626
- /* @__PURE__ */ jsx7(Button, {
627
- type: "submit",
628
- size: "sm",
629
- className: "ms-auto",
630
- disabled: pending,
631
- children: pending ? copy.pending : copy.submit
632
- })
667
+ copy.attach
633
668
  ]
669
+ }),
670
+ /* @__PURE__ */ jsx7(Button, {
671
+ type: "submit",
672
+ size: "sm",
673
+ className: "ms-auto",
674
+ disabled: pending,
675
+ children: pending ? copy.pending : copy.submit
634
676
  })
635
677
  ]
636
678
  })
@@ -5,9 +5,13 @@ declare function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props): Rea
5
5
  declare function DialogPortal({ ...props }: DialogPrimitive.Portal.Props): React.JSX.Element;
6
6
  declare function DialogClose({ ...props }: DialogPrimitive.Close.Props): React.JSX.Element;
7
7
  declare function DialogOverlay({ className, ...props }: DialogPrimitive.Backdrop.Props): React.JSX.Element;
8
- declare function DialogContent({ className, children, ...props }: DialogPrimitive.Popup.Props): React.JSX.Element;
8
+ declare function DialogContent({ className, children, showCloseButton, ...props }: DialogPrimitive.Popup.Props & {
9
+ showCloseButton?: boolean;
10
+ }): React.JSX.Element;
9
11
  declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
10
- declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
11
- declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): React.JSX.Element;
12
- declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): React.JSX.Element;
12
+ declare function DialogFooter({ className, showCloseButton, children, ...props }: React.ComponentProps<"div"> & {
13
+ showCloseButton?: boolean;
14
+ }): React.JSX.Element;
15
+ declare function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props): React.JSX.Element;
16
+ declare function DialogDescription({ className, ...props }: DialogPrimitive.Description.Props): React.JSX.Element;
13
17
  export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
@@ -53,6 +53,7 @@ function Button({
53
53
 
54
54
  // ../../src/components/ui/dialog.tsx
55
55
  import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
56
+ import { cn as cn2 } from "cn";
56
57
  import { XIcon } from "lucide-react";
57
58
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
58
59
  function Dialog({ ...props }) {
@@ -73,31 +74,42 @@ function DialogOverlay({
73
74
  }) {
74
75
  return /* @__PURE__ */ jsx2(DialogPrimitive.Backdrop, {
75
76
  "data-slot": "dialog-overlay",
76
- className: cn("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
77
+ className: cn2("data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs", className),
77
78
  ...props
78
79
  });
79
80
  }
80
81
  function DialogHeader({ className, ...props }) {
81
82
  return /* @__PURE__ */ jsx2("div", {
82
83
  "data-slot": "dialog-header",
83
- className: cn("grid gap-1.5", className),
84
+ className: cn2("flex flex-col gap-2", className),
84
85
  ...props
85
86
  });
86
87
  }
87
- function DialogFooter({ className, ...props }) {
88
- return /* @__PURE__ */ jsx2("div", {
89
- "data-slot": "dialog-footer",
90
- className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
91
- ...props
92
- });
93
- }
94
- function DialogTitle({
88
+ function DialogFooter({
95
89
  className,
90
+ showCloseButton = false,
91
+ children,
96
92
  ...props
97
93
  }) {
94
+ return /* @__PURE__ */ jsxs("div", {
95
+ "data-slot": "dialog-footer",
96
+ className: cn2("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
97
+ ...props,
98
+ children: [
99
+ children,
100
+ showCloseButton && /* @__PURE__ */ jsx2(DialogPrimitive.Close, {
101
+ render: /* @__PURE__ */ jsx2(Button, {
102
+ variant: "outline"
103
+ }),
104
+ children: "Close"
105
+ })
106
+ ]
107
+ });
108
+ }
109
+ function DialogTitle({ className, ...props }) {
98
110
  return /* @__PURE__ */ jsx2(DialogPrimitive.Title, {
99
111
  "data-slot": "dialog-title",
100
- className: cn("text-lg font-medium", className),
112
+ className: cn2("leading-none font-medium", className),
101
113
  ...props
102
114
  });
103
115
  }
@@ -56,6 +56,7 @@ import { SearchIcon } from "lucide-react";
56
56
 
57
57
  // ../../src/components/ui/dialog.tsx
58
58
  import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
59
+ import { cn as cn2 } from "cn";
59
60
  import { XIcon } from "lucide-react";
60
61
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
61
62
  function Dialog({ ...props }) {
@@ -76,13 +77,14 @@ function DialogOverlay({
76
77
  }) {
77
78
  return /* @__PURE__ */ jsx2(DialogPrimitive.Backdrop, {
78
79
  "data-slot": "dialog-overlay",
79
- className: cn("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
80
+ className: cn2("data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs", className),
80
81
  ...props
81
82
  });
82
83
  }
83
84
  function DialogContent({
84
85
  className,
85
86
  children,
87
+ showCloseButton = true,
86
88
  ...props
87
89
  }) {
88
90
  return /* @__PURE__ */ jsxs(DialogPortal, {
@@ -90,16 +92,19 @@ function DialogContent({
90
92
  /* @__PURE__ */ jsx2(DialogOverlay, {}),
91
93
  /* @__PURE__ */ jsxs(DialogPrimitive.Popup, {
92
94
  "data-slot": "dialog-content",
93
- className: cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-6 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-lg data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
95
+ className: cn2("bg-popover text-popover-foreground ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl p-6 text-sm ring-1 duration-100 outline-none sm:max-w-md", className),
94
96
  ...props,
95
97
  children: [
96
98
  children,
97
- /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
98
- className: "focus-visible:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:outline-none disabled:pointer-events-none",
99
+ showCloseButton && /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
100
+ "data-slot": "dialog-close",
101
+ render: /* @__PURE__ */ jsx2(Button, {
102
+ variant: "ghost",
103
+ className: "absolute top-4 right-4",
104
+ size: "icon-sm"
105
+ }),
99
106
  children: [
100
- /* @__PURE__ */ jsx2(XIcon, {
101
- className: "size-4"
102
- }),
107
+ /* @__PURE__ */ jsx2(XIcon, {}),
103
108
  /* @__PURE__ */ jsx2("span", {
104
109
  className: "sr-only",
105
110
  children: "Close"
@@ -114,17 +119,14 @@ function DialogContent({
114
119
  function DialogHeader({ className, ...props }) {
115
120
  return /* @__PURE__ */ jsx2("div", {
116
121
  "data-slot": "dialog-header",
117
- className: cn("grid gap-1.5", className),
122
+ className: cn2("flex flex-col gap-2", className),
118
123
  ...props
119
124
  });
120
125
  }
121
- function DialogTitle({
122
- className,
123
- ...props
124
- }) {
126
+ function DialogTitle({ className, ...props }) {
125
127
  return /* @__PURE__ */ jsx2(DialogPrimitive.Title, {
126
128
  "data-slot": "dialog-title",
127
- className: cn("text-lg font-medium", className),
129
+ className: cn2("leading-none font-medium", className),
128
130
  ...props
129
131
  });
130
132
  }
@@ -134,7 +136,7 @@ function DialogDescription({
134
136
  }) {
135
137
  return /* @__PURE__ */ jsx2(DialogPrimitive.Description, {
136
138
  "data-slot": "dialog-description",
137
- className: cn("text-sm text-muted-foreground", className),
139
+ className: cn2("text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3", className),
138
140
  ...props
139
141
  });
140
142
  }
@@ -111,6 +111,7 @@ import { SearchIcon } from "lucide-react";
111
111
 
112
112
  // ../../src/components/ui/dialog.tsx
113
113
  import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
114
+ import { cn as cn2 } from "cn";
114
115
  import { XIcon } from "lucide-react";
115
116
 
116
117
  // ../../src/components/ui/search-menu.tsx