@krak-stack/registry 0.11.4 → 0.11.5

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.
Files changed (171) hide show
  1. package/CHANGELOG.md +13 -1
  2. package/README.md +23 -9
  3. package/dist/components/agent/react.js +226 -1072
  4. package/dist/components/app-switcher/html.js +10 -53
  5. package/dist/components/app-switcher/react.js +29 -139
  6. package/dist/components/async-action-button/html.js +3 -34
  7. package/dist/components/async-action-button/react.d.ts +1 -1
  8. package/dist/components/async-action-button/react.js +8 -54
  9. package/dist/components/audit-log-table/react.js +555 -1265
  10. package/dist/components/bulk-list-input/html.js +3 -40
  11. package/dist/components/bulk-list-input/react.d.ts +1 -1
  12. package/dist/components/bulk-list-input/react.js +6 -59
  13. package/dist/components/code-block/html.js +1 -35
  14. package/dist/components/code-block/react.js +12 -59
  15. package/dist/components/color-input/html.js +2 -19
  16. package/dist/components/color-input/react.js +6 -97
  17. package/dist/components/copy-button/html.js +1 -35
  18. package/dist/components/copy-button/react.d.ts +1 -1
  19. package/dist/components/copy-button/react.js +7 -54
  20. package/dist/components/copy-value/html.js +11 -52
  21. package/dist/components/copy-value/react.js +25 -165
  22. package/dist/components/cron-input/html.js +2 -18
  23. package/dist/components/cron-input/react.js +15 -30
  24. package/dist/components/danger-confirmation/html.js +11 -57
  25. package/dist/components/danger-confirmation/react.js +26 -187
  26. package/dist/components/data-table/html.d.ts +12 -12
  27. package/dist/components/data-table/html.js +200 -174
  28. package/dist/components/data-table/react.js +549 -1259
  29. package/dist/components/date-input/html.js +19 -74
  30. package/dist/components/date-input/react.d.ts +1 -1
  31. package/dist/components/date-input/react.js +28 -313
  32. package/dist/components/docs/classes.d.ts +15 -0
  33. package/dist/components/docs/html.d.ts +55 -0
  34. package/dist/components/docs/html.js +837 -0
  35. package/dist/components/docs/index.d.ts +49 -0
  36. package/dist/components/docs/react.d.ts +10 -0
  37. package/dist/components/docs/react.js +949 -0
  38. package/dist/components/docs/schema.d.ts +49 -0
  39. package/dist/components/editable-text/html.js +6 -52
  40. package/dist/components/editable-text/react.js +13 -83
  41. package/dist/components/editing-locale-switcher/html.d.ts +2 -2
  42. package/dist/components/editing-locale-switcher/html.js +13 -43
  43. package/dist/components/editing-locale-switcher/react.js +17 -141
  44. package/dist/components/effect-form/react.js +249 -812
  45. package/dist/components/email-composer/react.js +62 -279
  46. package/dist/components/email-editor/html.js +13 -58
  47. package/dist/components/email-editor/react.js +187 -483
  48. package/dist/components/error-component/html.js +2 -47
  49. package/dist/components/error-component/react.js +33 -137
  50. package/dist/components/file-input/html.js +9 -40
  51. package/dist/components/file-input/react.js +39 -208
  52. package/dist/components/form/react.js +212 -777
  53. package/dist/components/icon-input/html.js +9 -56
  54. package/dist/components/icon-input/react.js +43 -143
  55. package/dist/components/image-crop-editor/html.js +1 -35
  56. package/dist/components/image-crop-editor/react.js +21 -66
  57. package/dist/components/locale-switcher/html.js +8 -55
  58. package/dist/components/locale-switcher/react.js +21 -146
  59. package/dist/components/map-menu/html.d.ts +8 -8
  60. package/dist/components/map-menu/html.js +13 -72
  61. package/dist/components/map-menu/react.js +92 -309
  62. package/dist/components/markdown/html.js +1 -35
  63. package/dist/components/markdown/react.js +20 -64
  64. package/dist/components/notification-menu/html.js +14 -50
  65. package/dist/components/notification-menu/react.js +73 -343
  66. package/dist/components/pagination/html.js +17 -73
  67. package/dist/components/pagination/react.js +37 -200
  68. package/dist/components/phone-number-input/html.js +19 -57
  69. package/dist/components/phone-number-input/react.d.ts +1 -1
  70. package/dist/components/phone-number-input/react.js +43 -142
  71. package/dist/components/presence-transition/index.d.ts +2 -2
  72. package/dist/components/registry-previews/component-example.js +26 -126
  73. package/dist/components/rich-text-editor/html.d.ts +12 -12
  74. package/dist/components/rich-text-editor/html.js +12 -85
  75. package/dist/components/rich-text-editor/react.js +55 -272
  76. package/dist/components/search-menu/classes.d.ts +2 -0
  77. package/dist/components/search-menu/html.d.ts +2 -0
  78. package/dist/components/search-menu/html.js +40 -73
  79. package/dist/components/search-menu/index.d.ts +27 -2
  80. package/dist/components/search-menu/react.d.ts +1 -1
  81. package/dist/components/search-menu/react.js +59 -280
  82. package/dist/components/search-menu/schema.d.ts +1 -0
  83. package/dist/components/select-with-custom-input/html.d.ts +2 -2
  84. package/dist/components/select-with-custom-input/html.js +13 -48
  85. package/dist/components/select-with-custom-input/react.js +22 -146
  86. package/dist/components/sidebar-layout/html.d.ts +16 -6
  87. package/dist/components/sidebar-layout/html.js +83 -69
  88. package/dist/components/sidebar-layout/index.d.ts +16 -0
  89. package/dist/components/sidebar-layout/react.js +105 -698
  90. package/dist/components/stats-card/react.js +13 -58
  91. package/dist/components/support/html.js +14 -69
  92. package/dist/components/support/react.js +74 -320
  93. package/dist/components/theme-switcher/html.js +11 -55
  94. package/dist/components/theme-switcher/react.js +28 -152
  95. package/dist/components/time-input/html.d.ts +2 -2
  96. package/dist/components/time-input/html.js +8 -53
  97. package/dist/components/time-input/react.js +34 -188
  98. package/dist/components/timezone-input/html.js +11 -67
  99. package/dist/components/timezone-input/react.js +41 -143
  100. package/dist/components/toast/html.d.ts +6 -6
  101. package/dist/components/toast/html.js +13 -46
  102. package/dist/components/tracking-notice/react.js +39 -188
  103. package/dist/components/unsaved-changes-guard/html.js +9 -43
  104. package/dist/components/unsaved-changes-guard/react.js +19 -169
  105. package/dist/components/upload-attachment/html.d.ts +4 -4
  106. package/dist/components/upload-attachment/html.js +4 -35
  107. package/dist/components/upload-attachment/react.js +25 -164
  108. package/dist/components/virtualized-combobox/html.js +10 -35
  109. package/dist/components/virtualized-combobox/react.js +28 -129
  110. package/dist/components/webhook-delivery-table/html.js +211 -184
  111. package/dist/components/webhook-delivery-table/react.js +585 -1362
  112. package/dist/lib/docs.integrations.server.js +150 -202
  113. package/dist/lib/docs.js +305 -1085
  114. package/dist/lib/docs.server.js +134 -186
  115. package/dist/lib/documentation-toolkit.js +144 -196
  116. package/dist/services/agent/client/index.js +226 -1072
  117. package/dist/services/notification/client/index.js +73 -343
  118. package/dist/services/notification/public.js +73 -343
  119. package/package.json +5 -13
  120. package/dist/components/effectcn/alert-dialog.d.ts +0 -13
  121. package/dist/components/effectcn/button.d.ts +0 -31
  122. package/dist/components/effectcn/calendar.d.ts +0 -12
  123. package/dist/components/effectcn/checkbox.d.ts +0 -10
  124. package/dist/components/effectcn/combobox.d.ts +0 -25
  125. package/dist/components/effectcn/dialog.d.ts +0 -19
  126. package/dist/components/effectcn/field.d.ts +0 -11
  127. package/dist/components/effectcn/file-drop.d.ts +0 -8
  128. package/dist/components/effectcn/input.d.ts +0 -26
  129. package/dist/components/effectcn/menu.d.ts +0 -85
  130. package/dist/components/effectcn/menubar.d.ts +0 -8
  131. package/dist/components/effectcn/popover.d.ts +0 -18
  132. package/dist/components/effectcn/scroll-area.d.ts +0 -12
  133. package/dist/components/effectcn/select.d.ts +0 -68
  134. package/dist/components/effectcn/toast.d.ts +0 -29
  135. package/dist/components/ui/alert-dialog.d.ts +0 -18
  136. package/dist/components/ui/alert.d.ts +0 -10
  137. package/dist/components/ui/attachment.d.ts +0 -23
  138. package/dist/components/ui/badge.d.ts +0 -7
  139. package/dist/components/ui/bubble.d.ts +0 -16
  140. package/dist/components/ui/button.d.ts +0 -8
  141. package/dist/components/ui/calendar.d.ts +0 -10
  142. package/dist/components/ui/card.d.ts +0 -11
  143. package/dist/components/ui/checkbox.d.ts +0 -3
  144. package/dist/components/ui/collapsible.d.ts +0 -5
  145. package/dist/components/ui/command.d.ts +0 -18
  146. package/dist/components/ui/dialog.d.ts +0 -17
  147. package/dist/components/ui/dropdown-menu.d.ts +0 -29
  148. package/dist/components/ui/empty.d.ts +0 -11
  149. package/dist/components/ui/field.d.ts +0 -24
  150. package/dist/components/ui/input-group.d.ts +0 -17
  151. package/dist/components/ui/input.d.ts +0 -3
  152. package/dist/components/ui/item.d.ts +0 -22
  153. package/dist/components/ui/label.d.ts +0 -3
  154. package/dist/components/ui/menubar.d.ts +0 -29
  155. package/dist/components/ui/message-scroller.d.ts +0 -10
  156. package/dist/components/ui/message.d.ts +0 -10
  157. package/dist/components/ui/popover.d.ts +0 -9
  158. package/dist/components/ui/scroll-area.d.ts +0 -4
  159. package/dist/components/ui/select.d.ts +0 -15
  160. package/dist/components/ui/select.js +0 -159
  161. package/dist/components/ui/separator.d.ts +0 -3
  162. package/dist/components/ui/sheet.d.ts +0 -14
  163. package/dist/components/ui/sidebar.d.ts +0 -63
  164. package/dist/components/ui/skeleton.d.ts +0 -2
  165. package/dist/components/ui/table.d.ts +0 -10
  166. package/dist/components/ui/tabs.d.ts +0 -10
  167. package/dist/components/ui/textarea.d.ts +0 -3
  168. package/dist/components/ui/tooltip.d.ts +0 -6
  169. package/dist/components/ui/trace.d.ts +0 -18
  170. package/dist/lib/effectcn-form.d.ts +0 -3
  171. package/dist/lib/effectcn-form.js +0 -54
@@ -2,166 +2,17 @@
2
2
  import { useState, useSyncExternalStore } from "react";
3
3
  import { createPortal } from "react-dom";
4
4
  import { Effect as Effect2, Schema as Schema3 } from "effect";
5
- import { XIcon as XIcon2 } from "lucide-react";
6
-
7
- // ../../src/components/ui/button.tsx
8
- import { Button as ButtonPrimitive } from "@base-ui/react/button";
9
- import { cva } from "class-variance-authority";
10
-
11
- // ../../src/lib/utils.ts
12
- import { cn } from "cn";
13
-
14
- // ../../src/components/ui/button.tsx
15
- import { jsx } from "react/jsx-runtime";
16
- var buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
17
- variants: {
18
- variant: {
19
- default: "bg-primary text-primary-foreground hover:bg-primary/80",
20
- outline: "border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
21
- secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
22
- ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
23
- destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
24
- link: "text-primary underline-offset-4 hover:underline"
25
- },
26
- size: {
27
- default: "h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
28
- xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
29
- sm: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
30
- lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
31
- icon: "size-9",
32
- "icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
33
- "icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
34
- "icon-lg": "size-10"
35
- }
36
- },
37
- defaultVariants: {
38
- variant: "default",
39
- size: "default"
40
- }
41
- });
42
- function Button({
43
- className,
44
- variant = "default",
45
- size = "default",
46
- ...props
47
- }) {
48
- return /* @__PURE__ */ jsx(ButtonPrimitive, {
49
- "data-slot": "button",
50
- className: cn(buttonVariants({ variant, size, className })),
51
- ...props
52
- });
53
- }
54
-
55
- // ../../src/components/tracking-notice/react.tsx
56
- import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider/react";
57
-
58
- // ../../src/components/ui/dialog.tsx
59
- import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
60
- import { cn as cn2 } from "cn";
61
5
  import { XIcon } from "lucide-react";
62
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
63
- function Dialog({ ...props }) {
64
- return /* @__PURE__ */ jsx2(DialogPrimitive.Root, {
65
- "data-slot": "dialog",
66
- ...props
67
- });
68
- }
69
- function DialogPortal({ ...props }) {
70
- return /* @__PURE__ */ jsx2(DialogPrimitive.Portal, {
71
- "data-slot": "dialog-portal",
72
- ...props
73
- });
74
- }
75
- function DialogOverlay({
76
- className,
77
- ...props
78
- }) {
79
- return /* @__PURE__ */ jsx2(DialogPrimitive.Backdrop, {
80
- "data-slot": "dialog-overlay",
81
- 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),
82
- ...props
83
- });
84
- }
85
- function DialogContent({
86
- className,
87
- children,
88
- showCloseButton = true,
89
- ...props
90
- }) {
91
- return /* @__PURE__ */ jsxs(DialogPortal, {
92
- children: [
93
- /* @__PURE__ */ jsx2(DialogOverlay, {}),
94
- /* @__PURE__ */ jsxs(DialogPrimitive.Popup, {
95
- "data-slot": "dialog-content",
96
- 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),
97
- ...props,
98
- children: [
99
- children,
100
- showCloseButton && /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
101
- "data-slot": "dialog-close",
102
- render: /* @__PURE__ */ jsx2(Button, {
103
- variant: "ghost",
104
- className: "absolute top-4 right-4",
105
- size: "icon-sm"
106
- }),
107
- children: [
108
- /* @__PURE__ */ jsx2(XIcon, {}),
109
- /* @__PURE__ */ jsx2("span", {
110
- className: "sr-only",
111
- children: "Close"
112
- })
113
- ]
114
- })
115
- ]
116
- })
117
- ]
118
- });
119
- }
120
- function DialogHeader({ className, ...props }) {
121
- return /* @__PURE__ */ jsx2("div", {
122
- "data-slot": "dialog-header",
123
- className: cn2("flex flex-col gap-2", className),
124
- ...props
125
- });
126
- }
127
- function DialogFooter({
128
- className,
129
- showCloseButton = false,
130
- children,
131
- ...props
132
- }) {
133
- return /* @__PURE__ */ jsxs("div", {
134
- "data-slot": "dialog-footer",
135
- className: cn2("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
136
- ...props,
137
- children: [
138
- children,
139
- showCloseButton && /* @__PURE__ */ jsx2(DialogPrimitive.Close, {
140
- render: /* @__PURE__ */ jsx2(Button, {
141
- variant: "outline"
142
- }),
143
- children: "Close"
144
- })
145
- ]
146
- });
147
- }
148
- function DialogTitle({ className, ...props }) {
149
- return /* @__PURE__ */ jsx2(DialogPrimitive.Title, {
150
- "data-slot": "dialog-title",
151
- className: cn2("leading-none font-medium", className),
152
- ...props
153
- });
154
- }
155
- function DialogDescription({
156
- className,
157
- ...props
158
- }) {
159
- return /* @__PURE__ */ jsx2(DialogPrimitive.Description, {
160
- "data-slot": "dialog-description",
161
- className: cn2("text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3", className),
162
- ...props
163
- });
164
- }
6
+ import { Button } from "@/components/ui/button";
7
+ import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider/react";
8
+ import {
9
+ Dialog,
10
+ DialogContent,
11
+ DialogDescription,
12
+ DialogFooter,
13
+ DialogHeader,
14
+ DialogTitle
15
+ } from "@/components/ui/dialog";
165
16
 
166
17
  // ../../src/services/opentelemetry/consent.ts
167
18
  import * as Data from "effect/Data";
@@ -301,7 +152,7 @@ var subscribeAnalyticsConsent = (listener) => {
301
152
  };
302
153
 
303
154
  // ../../src/components/tracking-notice/react.tsx
304
- import { jsx as jsx3, jsxs as jsxs2, Fragment } from "react/jsx-runtime";
155
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
305
156
  var browserPreferences = {
306
157
  subscribe: subscribeAnalyticsConsent,
307
158
  getSnapshot: analyticsConsentSnapshot,
@@ -370,15 +221,15 @@ var TrackingNotice = ({
370
221
  if (result)
371
222
  setOpen(false);
372
223
  };
373
- const actions = /* @__PURE__ */ jsxs2(Fragment, {
224
+ const actions = /* @__PURE__ */ jsxs(Fragment, {
374
225
  children: [
375
- /* @__PURE__ */ jsx3(Button, {
226
+ /* @__PURE__ */ jsx(Button, {
376
227
  type: "button",
377
228
  variant: "outline",
378
229
  onClick: () => save("declined"),
379
230
  children: labels.decline
380
231
  }),
381
- /* @__PURE__ */ jsx3(Button, {
232
+ /* @__PURE__ */ jsx(Button, {
382
233
  type: "button",
383
234
  disabled: snapshot === "blocked",
384
235
  onClick: () => save("accepted"),
@@ -386,20 +237,20 @@ var TrackingNotice = ({
386
237
  })
387
238
  ]
388
239
  });
389
- const description = /* @__PURE__ */ jsxs2(Fragment, {
240
+ const description = /* @__PURE__ */ jsxs(Fragment, {
390
241
  children: [
391
- /* @__PURE__ */ jsx3("p", {
242
+ /* @__PURE__ */ jsx("p", {
392
243
  children: labels.description
393
244
  }),
394
- /* @__PURE__ */ jsx3("p", {
245
+ /* @__PURE__ */ jsx("p", {
395
246
  className: "mt-2",
396
247
  children: labels.details
397
248
  }),
398
- /* @__PURE__ */ jsx3("p", {
249
+ /* @__PURE__ */ jsx("p", {
399
250
  className: "mt-2",
400
251
  children: labels.essential
401
252
  }),
402
- privacyHref ? /* @__PURE__ */ jsx3("a", {
253
+ privacyHref ? /* @__PURE__ */ jsx("a", {
403
254
  className: "mt-2 inline-block underline",
404
255
  href: privacyHref,
405
256
  children: labels.privacy
@@ -407,9 +258,9 @@ var TrackingNotice = ({
407
258
  ]
408
259
  });
409
260
  const status = snapshot === "blocked" ? labels.blocked : snapshot.startsWith("accepted:") ? labels.accepted : snapshot.startsWith("declined:") ? labels.declined : labels.pending;
410
- return /* @__PURE__ */ jsxs2(Fragment, {
261
+ return /* @__PURE__ */ jsxs(Fragment, {
411
262
  children: [
412
- /* @__PURE__ */ jsx3("button", {
263
+ /* @__PURE__ */ jsx("button", {
413
264
  type: "button",
414
265
  className: "text-muted-foreground hover:text-foreground text-sm underline",
415
266
  onClick: () => {
@@ -418,36 +269,36 @@ var TrackingNotice = ({
418
269
  },
419
270
  children: labels.preferences
420
271
  }),
421
- snapshot === "pending" && !dismissed && !open ? createPortal(/* @__PURE__ */ jsxs2("section", {
272
+ snapshot === "pending" && !dismissed && !open ? createPortal(/* @__PURE__ */ jsxs("section", {
422
273
  "aria-label": labels.title,
423
274
  className: "bg-card fixed inset-x-3 bottom-3 z-40 mx-auto max-w-3xl rounded-xl border p-5 shadow-xl sm:inset-x-6 sm:flex sm:items-center sm:gap-6",
424
275
  children: [
425
- /* @__PURE__ */ jsx3("button", {
276
+ /* @__PURE__ */ jsx("button", {
426
277
  type: "button",
427
278
  "aria-label": labels.close,
428
279
  className: "text-muted-foreground hover:text-foreground absolute top-2 right-2 rounded-sm p-1",
429
280
  onClick: () => setDismissed(true),
430
- children: /* @__PURE__ */ jsx3(XIcon2, {
281
+ children: /* @__PURE__ */ jsx(XIcon, {
431
282
  className: "size-3.5"
432
283
  })
433
284
  }),
434
- /* @__PURE__ */ jsxs2("div", {
285
+ /* @__PURE__ */ jsxs("div", {
435
286
  className: "min-w-0 flex-1",
436
287
  children: [
437
- /* @__PURE__ */ jsx3("h2", {
288
+ /* @__PURE__ */ jsx("h2", {
438
289
  className: "font-medium",
439
290
  children: labels.title
440
291
  }),
441
- /* @__PURE__ */ jsxs2("p", {
292
+ /* @__PURE__ */ jsxs("p", {
442
293
  className: "text-muted-foreground mt-2 text-sm leading-6",
443
294
  children: [
444
295
  labels.description,
445
296
  " ",
446
- privacyHref ? /* @__PURE__ */ jsx3("a", {
297
+ privacyHref ? /* @__PURE__ */ jsx("a", {
447
298
  className: "underline",
448
299
  href: privacyHref,
449
300
  children: labels.learnMore
450
- }) : /* @__PURE__ */ jsx3("button", {
301
+ }) : /* @__PURE__ */ jsx("button", {
451
302
  type: "button",
452
303
  className: "underline",
453
304
  onClick: () => {
@@ -460,42 +311,42 @@ var TrackingNotice = ({
460
311
  })
461
312
  ]
462
313
  }),
463
- /* @__PURE__ */ jsx3("div", {
314
+ /* @__PURE__ */ jsx("div", {
464
315
  className: "mt-4 flex shrink-0 gap-2 sm:mt-0",
465
316
  children: actions
466
317
  }),
467
- failed ? /* @__PURE__ */ jsx3("p", {
318
+ failed ? /* @__PURE__ */ jsx("p", {
468
319
  role: "alert",
469
320
  className: "text-destructive mt-3 text-sm sm:mt-0",
470
321
  children: labels.error
471
322
  }) : null
472
323
  ]
473
324
  }), document.body) : null,
474
- /* @__PURE__ */ jsx3(Dialog, {
325
+ /* @__PURE__ */ jsx(Dialog, {
475
326
  open,
476
327
  onOpenChange: setOpen,
477
- children: /* @__PURE__ */ jsxs2(DialogContent, {
328
+ children: /* @__PURE__ */ jsxs(DialogContent, {
478
329
  children: [
479
- /* @__PURE__ */ jsxs2(DialogHeader, {
330
+ /* @__PURE__ */ jsxs(DialogHeader, {
480
331
  children: [
481
- /* @__PURE__ */ jsx3(DialogTitle, {
332
+ /* @__PURE__ */ jsx(DialogTitle, {
482
333
  children: labels.title
483
334
  }),
484
- /* @__PURE__ */ jsx3(DialogDescription, {
335
+ /* @__PURE__ */ jsx(DialogDescription, {
485
336
  children: status
486
337
  })
487
338
  ]
488
339
  }),
489
- /* @__PURE__ */ jsx3("div", {
340
+ /* @__PURE__ */ jsx("div", {
490
341
  className: "text-muted-foreground text-sm leading-6",
491
342
  children: description
492
343
  }),
493
- failed ? /* @__PURE__ */ jsx3("p", {
344
+ failed ? /* @__PURE__ */ jsx("p", {
494
345
  role: "alert",
495
346
  className: "text-destructive text-sm",
496
347
  children: labels.error
497
348
  }) : null,
498
- /* @__PURE__ */ jsx3(DialogFooter, {
349
+ /* @__PURE__ */ jsx(DialogFooter, {
499
350
  children: actions
500
351
  })
501
352
  ]
@@ -3,50 +3,16 @@ import { Effect } from "effect";
3
3
  import { Component as Component2, Mount } from "effect/ui";
4
4
  import { Html } from "effect/ui/html";
5
5
  import { AlertDialog } from "effect/ui/kit";
6
-
7
- // ../../src/components/effectcn/button.ts
6
+ import { Button, buttonVariants } from "@/components/effectcn/button";
8
7
  import {
9
- Button as KitButton
10
- } from "effect/ui/kit";
11
-
12
- // ../../src/lib/utils.ts
13
- import { cn } from "cn";
14
-
15
- // ../../src/components/effectcn/button.ts
16
- var base = "inline-flex h-8.5 shrink-0 items-center justify-center gap-1.5 rounded-md border border-transparent px-3.5 text-[13px] leading-none font-medium whitespace-nowrap no-underline select-none transition-[background-color,border-color,color,opacity] duration-150 active:translate-y-px data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 [&_svg]:size-[15px] [&_svg]:shrink-0 data-[loading]:before:size-3 data-[loading]:before:animate-spin data-[loading]:before:rounded-full data-[loading]:before:border-2 data-[loading]:before:border-current data-[loading]:before:border-r-transparent";
17
- var variants = {
18
- default: "bg-primary text-primary-foreground hover:bg-primary/85",
19
- secondary: "bg-secondary text-secondary-foreground hover:bg-accent",
20
- outline: "border-input bg-background text-foreground shadow-sm hover:bg-accent hover:text-accent-foreground",
21
- ghost: "text-foreground hover:bg-accent hover:text-accent-foreground",
22
- brand: "bg-brand-soft text-brand-soft-foreground hover:bg-brand-soft/85",
23
- destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/85",
24
- link: "h-auto px-0 text-foreground underline decoration-transparent underline-offset-4 hover:decoration-current"
25
- };
26
- var sizes = {
27
- default: "",
28
- sm: "h-7 rounded-sm px-2.5 text-xs",
29
- lg: "h-10 px-5 text-sm",
30
- icon: "w-8.5 px-0",
31
- "icon-sm": "h-7 w-7 rounded-sm px-0"
32
- };
33
- var buttonVariants = (options = {}) => cn(base, variants[options.variant ?? "default"], sizes[options.size ?? "default"], options.class);
34
- var Button = (h, options = {}) => KitButton(h, {
35
- element: options.element,
36
- onPress: options.onPress,
37
- props: options.loading ? { ...options.props, disabled: true, focusableWhenDisabled: true } : options.props
38
- }).class(buttonVariants(options)).attr("data-loading", options.loading ? "" : undefined);
39
-
40
- // ../../src/components/effectcn/alert-dialog.ts
41
- var AlertDialogBackdrop = (h, dialog) => dialog.backdrop(h.div.class("fixed inset-0 bg-[color-mix(in_oklab,var(--shadow-color,#000)_45%,transparent)] transition-opacity duration-200 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0"));
42
- var AlertDialogViewport = (h, dialog) => dialog.viewport(h.div.class("pointer-events-none fixed inset-0 grid place-items-center p-4"));
43
- var AlertDialogPopup = (h, dialog, options = {}) => dialog.popup(h.div.class(cn("bg-popover text-foreground pointer-events-auto relative flex max-h-full w-full max-w-[440px] flex-col gap-4 rounded-lg border p-6 text-sm shadow-lg outline-none", "transition-[opacity,scale] duration-200 ease-out data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0", options.class)));
44
- var AlertDialogHeader = (h) => h.div.class("flex flex-col gap-1.5");
45
- var AlertDialogTitle = (h, dialog) => dialog.title(h.h2.class("m-0 border-0 p-0 text-[16px] leading-snug font-semibold tracking-tight"));
46
- var AlertDialogDescription = (h, dialog) => dialog.description(h.p.class("m-0 text-[13px] leading-normal text-muted-foreground [&_code]:rounded-xs [&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-xs [&_code]:text-foreground"));
47
- var AlertDialogFooter = (h) => h.div.class("flex flex-wrap items-center justify-end gap-2");
48
-
49
- // ../../src/components/unsaved-changes-guard/html.ts
8
+ AlertDialogBackdrop,
9
+ AlertDialogDescription,
10
+ AlertDialogFooter,
11
+ AlertDialogHeader,
12
+ AlertDialogPopup,
13
+ AlertDialogTitle,
14
+ AlertDialogViewport
15
+ } from "@/components/effectcn/alert-dialog";
50
16
  import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
51
17
 
52
18
  // ../../src/components/unsaved-changes-guard/index.ts
@@ -1,165 +1,15 @@
1
1
  // ../../src/components/unsaved-changes-guard/react.tsx
2
2
  import { useBlocker } from "@tanstack/react-router";
3
-
4
- // ../../src/components/ui/alert-dialog.tsx
5
- import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
6
-
7
- // ../../src/lib/utils.ts
8
- import { cn } from "cn";
9
-
10
- // ../../src/components/ui/button.tsx
11
- import { Button as ButtonPrimitive } from "@base-ui/react/button";
12
- import { cva } from "class-variance-authority";
13
- import { jsx } from "react/jsx-runtime";
14
- var buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
15
- variants: {
16
- variant: {
17
- default: "bg-primary text-primary-foreground hover:bg-primary/80",
18
- outline: "border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
19
- secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
20
- ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
21
- destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
22
- link: "text-primary underline-offset-4 hover:underline"
23
- },
24
- size: {
25
- default: "h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
26
- xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
27
- sm: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
28
- lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
29
- icon: "size-9",
30
- "icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
31
- "icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
32
- "icon-lg": "size-10"
33
- }
34
- },
35
- defaultVariants: {
36
- variant: "default",
37
- size: "default"
38
- }
39
- });
40
- function Button({
41
- className,
42
- variant = "default",
43
- size = "default",
44
- ...props
45
- }) {
46
- return /* @__PURE__ */ jsx(ButtonPrimitive, {
47
- "data-slot": "button",
48
- className: cn(buttonVariants({ variant, size, className })),
49
- ...props
50
- });
51
- }
52
-
53
- // ../../src/components/ui/alert-dialog.tsx
54
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
55
- "use client";
56
- function AlertDialog({ ...props }) {
57
- return /* @__PURE__ */ jsx2(AlertDialogPrimitive.Root, {
58
- "data-slot": "alert-dialog",
59
- ...props
60
- });
61
- }
62
- function AlertDialogPortal({ ...props }) {
63
- return /* @__PURE__ */ jsx2(AlertDialogPrimitive.Portal, {
64
- "data-slot": "alert-dialog-portal",
65
- ...props
66
- });
67
- }
68
- function AlertDialogOverlay({
69
- className,
70
- ...props
71
- }) {
72
- return /* @__PURE__ */ jsx2(AlertDialogPrimitive.Backdrop, {
73
- "data-slot": "alert-dialog-overlay",
74
- 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),
75
- ...props
76
- });
77
- }
78
- function AlertDialogContent({
79
- className,
80
- size = "default",
81
- ...props
82
- }) {
83
- return /* @__PURE__ */ jsxs(AlertDialogPortal, {
84
- children: [
85
- /* @__PURE__ */ jsx2(AlertDialogOverlay, {}),
86
- /* @__PURE__ */ jsx2(AlertDialogPrimitive.Popup, {
87
- "data-slot": "alert-dialog-content",
88
- "data-size": size,
89
- className: cn("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]: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),
90
- ...props
91
- })
92
- ]
93
- });
94
- }
95
- function AlertDialogHeader({
96
- className,
97
- ...props
98
- }) {
99
- return /* @__PURE__ */ jsx2("div", {
100
- "data-slot": "alert-dialog-header",
101
- className: cn("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className),
102
- ...props
103
- });
104
- }
105
- function AlertDialogFooter({
106
- className,
107
- ...props
108
- }) {
109
- return /* @__PURE__ */ jsx2("div", {
110
- "data-slot": "alert-dialog-footer",
111
- className: cn("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", className),
112
- ...props
113
- });
114
- }
115
- function AlertDialogTitle({
116
- className,
117
- ...props
118
- }) {
119
- return /* @__PURE__ */ jsx2(AlertDialogPrimitive.Title, {
120
- "data-slot": "alert-dialog-title",
121
- className: cn("text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className),
122
- ...props
123
- });
124
- }
125
- function AlertDialogDescription({
126
- className,
127
- ...props
128
- }) {
129
- return /* @__PURE__ */ jsx2(AlertDialogPrimitive.Description, {
130
- "data-slot": "alert-dialog-description",
131
- className: cn("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
132
- ...props
133
- });
134
- }
135
- function AlertDialogAction({
136
- className,
137
- ...props
138
- }) {
139
- return /* @__PURE__ */ jsx2(Button, {
140
- "data-slot": "alert-dialog-action",
141
- className: cn(className),
142
- ...props
143
- });
144
- }
145
- function AlertDialogCancel({
146
- className,
147
- variant = "outline",
148
- size = "default",
149
- ...props
150
- }) {
151
- return /* @__PURE__ */ jsx2(AlertDialogPrimitive.Close, {
152
- "data-slot": "alert-dialog-cancel",
153
- className: cn(className),
154
- render: /* @__PURE__ */ jsx2(Button, {
155
- variant,
156
- size
157
- }),
158
- ...props
159
- });
160
- }
161
-
162
- // ../../src/components/unsaved-changes-guard/react.tsx
3
+ import {
4
+ AlertDialog,
5
+ AlertDialogAction,
6
+ AlertDialogCancel,
7
+ AlertDialogContent,
8
+ AlertDialogDescription,
9
+ AlertDialogFooter,
10
+ AlertDialogHeader,
11
+ AlertDialogTitle
12
+ } from "@/components/ui/alert-dialog";
163
13
  import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider/react";
164
14
 
165
15
  // ../../src/components/unsaved-changes-guard/index.ts
@@ -238,7 +88,7 @@ var update = Component.define(unsavedChangesGuardOptions).update({
238
88
  });
239
89
 
240
90
  // ../../src/components/unsaved-changes-guard/react.tsx
241
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
91
+ import { jsx, jsxs } from "react/jsx-runtime";
242
92
  var UnsavedChangesGuard = ({
243
93
  dirty,
244
94
  enabled = true,
@@ -258,33 +108,33 @@ var UnsavedChangesGuard = ({
258
108
  }),
259
109
  withResolver: true
260
110
  });
261
- return /* @__PURE__ */ jsx3(AlertDialog, {
111
+ return /* @__PURE__ */ jsx(AlertDialog, {
262
112
  open: blocker.status === "blocked",
263
113
  onOpenChange: (open) => {
264
114
  if (!open)
265
115
  blocker.reset?.();
266
116
  },
267
- children: /* @__PURE__ */ jsxs2(AlertDialogContent, {
117
+ children: /* @__PURE__ */ jsxs(AlertDialogContent, {
268
118
  "data-component": "unsaved-changes-guard",
269
119
  className,
270
120
  children: [
271
- /* @__PURE__ */ jsxs2(AlertDialogHeader, {
121
+ /* @__PURE__ */ jsxs(AlertDialogHeader, {
272
122
  children: [
273
- /* @__PURE__ */ jsx3(AlertDialogTitle, {
123
+ /* @__PURE__ */ jsx(AlertDialogTitle, {
274
124
  children: copy.title
275
125
  }),
276
- /* @__PURE__ */ jsx3(AlertDialogDescription, {
126
+ /* @__PURE__ */ jsx(AlertDialogDescription, {
277
127
  children: copy.description
278
128
  })
279
129
  ]
280
130
  }),
281
- /* @__PURE__ */ jsxs2(AlertDialogFooter, {
131
+ /* @__PURE__ */ jsxs(AlertDialogFooter, {
282
132
  children: [
283
- /* @__PURE__ */ jsx3(AlertDialogCancel, {
133
+ /* @__PURE__ */ jsx(AlertDialogCancel, {
284
134
  type: "button",
285
135
  children: copy.stay
286
136
  }),
287
- /* @__PURE__ */ jsx3(AlertDialogAction, {
137
+ /* @__PURE__ */ jsx(AlertDialogAction, {
288
138
  type: "button",
289
139
  variant: "destructive",
290
140
  onClick: () => blocker.proceed?.(),
@@ -71,14 +71,14 @@ export declare const UploadAttachment: import("effect/ui/Component").Component<"
71
71
  readonly canRemove?: boolean | undefined;
72
72
  }, null, {
73
73
  readonly _tag: "Cancel";
74
- } | {
75
- readonly _tag: "Remove";
76
74
  } | {
77
75
  readonly _tag: "Retry";
78
- }, {
79
- readonly _tag: "Cancel";
80
76
  } | {
81
77
  readonly _tag: "Remove";
78
+ }, {
79
+ readonly _tag: "Cancel";
82
80
  } | {
83
81
  readonly _tag: "Retry";
82
+ } | {
83
+ readonly _tag: "Remove";
84
84
  }, never, Html.Elements, {}, never>;