@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
@@ -23,222 +23,20 @@ import {
23
23
  Plus,
24
24
  Palette
25
25
  } from "lucide-react";
26
-
27
- // ../../src/components/ui/button.tsx
28
- import { Button as ButtonPrimitive } from "@base-ui/react/button";
29
- import { cva } from "class-variance-authority";
30
-
31
- // ../../src/lib/utils.ts
32
- import { cn } from "cn";
33
-
34
- // ../../src/components/ui/button.tsx
35
- import { jsx } from "react/jsx-runtime";
36
- 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", {
37
- variants: {
38
- variant: {
39
- default: "bg-primary text-primary-foreground hover:bg-primary/80",
40
- 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",
41
- 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",
42
- ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
43
- 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",
44
- link: "text-primary underline-offset-4 hover:underline"
45
- },
46
- size: {
47
- 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",
48
- 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",
49
- 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",
50
- lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
51
- icon: "size-9",
52
- "icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
53
- "icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
54
- "icon-lg": "size-10"
55
- }
56
- },
57
- defaultVariants: {
58
- variant: "default",
59
- size: "default"
60
- }
61
- });
62
- function Button({
63
- className,
64
- variant = "default",
65
- size = "default",
66
- ...props
67
- }) {
68
- return /* @__PURE__ */ jsx(ButtonPrimitive, {
69
- "data-slot": "button",
70
- className: cn(buttonVariants({ variant, size, className })),
71
- ...props
72
- });
73
- }
74
-
75
- // ../../src/components/ui/input.tsx
76
- import { Input as InputPrimitive } from "@base-ui/react/input";
77
- import { jsx as jsx2 } from "react/jsx-runtime";
78
- function Input({ className, type, ...props }) {
79
- return /* @__PURE__ */ jsx2(InputPrimitive, {
80
- type,
81
- "data-slot": "input",
82
- className: cn("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
83
- ...props
84
- });
85
- }
86
-
87
- // ../../src/components/ui/select.tsx
88
- import { Select as SelectPrimitive } from "@base-ui/react/select";
89
- import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
90
- import { jsx as jsx3, jsxs } from "react/jsx-runtime";
91
- "use client";
92
- var Select = SelectPrimitive.Root;
93
- function SelectValue({ className, ...props }) {
94
- return /* @__PURE__ */ jsx3(SelectPrimitive.Value, {
95
- "data-slot": "select-value",
96
- className: cn("flex flex-1 text-left", className),
97
- ...props
98
- });
99
- }
100
- function SelectTrigger({
101
- className,
102
- size = "default",
103
- children,
104
- ...props
105
- }) {
106
- return /* @__PURE__ */ jsxs(SelectPrimitive.Trigger, {
107
- "data-slot": "select-trigger",
108
- "data-size": size,
109
- className: cn("border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 flex w-fit items-center justify-between gap-1.5 rounded-md border bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
110
- ...props,
111
- children: [
112
- children,
113
- /* @__PURE__ */ jsx3(SelectPrimitive.Icon, {
114
- render: /* @__PURE__ */ jsx3(ChevronDownIcon, {
115
- className: "text-muted-foreground pointer-events-none size-4"
116
- })
117
- })
118
- ]
119
- });
120
- }
121
- function SelectContent({
122
- className,
123
- children,
124
- side = "bottom",
125
- sideOffset = 4,
126
- align = "start",
127
- alignOffset = 0,
128
- alignItemWithTrigger = false,
129
- ...props
130
- }) {
131
- return /* @__PURE__ */ jsx3(SelectPrimitive.Portal, {
132
- children: /* @__PURE__ */ jsx3(SelectPrimitive.Positioner, {
133
- side,
134
- sideOffset,
135
- align,
136
- alignOffset,
137
- alignItemWithTrigger,
138
- className: "isolate z-50",
139
- children: /* @__PURE__ */ jsxs(SelectPrimitive.Popup, {
140
- "data-slot": "select-content",
141
- "data-align-trigger": alignItemWithTrigger,
142
- className: cn("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-0 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md shadow-md ring-1 duration-100 data-[align-trigger=true]:animate-none", className),
143
- ...props,
144
- children: [
145
- /* @__PURE__ */ jsx3(SelectScrollUpButton, {}),
146
- /* @__PURE__ */ jsx3(SelectPrimitive.List, {
147
- children
148
- }),
149
- /* @__PURE__ */ jsx3(SelectScrollDownButton, {})
150
- ]
151
- })
152
- })
153
- });
154
- }
155
- function SelectItem({
156
- className,
157
- children,
158
- ...props
159
- }) {
160
- return /* @__PURE__ */ jsxs(SelectPrimitive.Item, {
161
- "data-slot": "select-item",
162
- className: cn("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
163
- ...props,
164
- children: [
165
- /* @__PURE__ */ jsx3(SelectPrimitive.ItemText, {
166
- className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap",
167
- children
168
- }),
169
- /* @__PURE__ */ jsx3(SelectPrimitive.ItemIndicator, {
170
- render: /* @__PURE__ */ jsx3("span", {
171
- className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center"
172
- }),
173
- children: /* @__PURE__ */ jsx3(CheckIcon, {
174
- className: "pointer-events-none"
175
- })
176
- })
177
- ]
178
- });
179
- }
180
- function SelectScrollUpButton({
181
- className,
182
- ...props
183
- }) {
184
- return /* @__PURE__ */ jsx3(SelectPrimitive.ScrollUpArrow, {
185
- "data-slot": "select-scroll-up-button",
186
- className: cn("bg-popover top-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className),
187
- ...props,
188
- children: /* @__PURE__ */ jsx3(ChevronUpIcon, {})
189
- });
190
- }
191
- function SelectScrollDownButton({
192
- className,
193
- ...props
194
- }) {
195
- return /* @__PURE__ */ jsx3(SelectPrimitive.ScrollDownArrow, {
196
- "data-slot": "select-scroll-down-button",
197
- className: cn("bg-popover bottom-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className),
198
- ...props,
199
- children: /* @__PURE__ */ jsx3(ChevronDownIcon, {})
200
- });
201
- }
202
-
203
- // ../../src/components/ui/popover.tsx
204
- import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
205
- import { jsx as jsx4 } from "react/jsx-runtime";
206
- function PopoverTrigger({ ...props }) {
207
- return /* @__PURE__ */ jsx4(PopoverPrimitive.Trigger, {
208
- "data-slot": "popover-trigger",
209
- ...props
210
- });
211
- }
212
- function PopoverContent({
213
- className,
214
- align = "center",
215
- alignOffset = 0,
216
- side = "bottom",
217
- sideOffset = 4,
218
- ...props
219
- }) {
220
- return /* @__PURE__ */ jsx4(PopoverPrimitive.Portal, {
221
- children: /* @__PURE__ */ jsx4(PopoverPrimitive.Positioner, {
222
- align,
223
- alignOffset,
224
- side,
225
- sideOffset,
226
- className: "isolate z-50",
227
- children: /* @__PURE__ */ jsx4(PopoverPrimitive.Popup, {
228
- "data-slot": "popover-content",
229
- className: cn("z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-md bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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),
230
- ...props
231
- })
232
- })
233
- });
234
- }
235
- function PopoverTitle({ className, ...props }) {
236
- return /* @__PURE__ */ jsx4(PopoverPrimitive.Title, {
237
- "data-slot": "popover-title",
238
- className: cn("font-medium", className),
239
- ...props
240
- });
241
- }
26
+ import { Button as Button2 } from "@/components/ui/button";
27
+ import { Input as Input2 } from "@/components/ui/input";
28
+ import {
29
+ Select as Select2,
30
+ SelectContent as SelectContent2,
31
+ SelectItem as SelectItem2,
32
+ SelectTrigger as SelectTrigger2,
33
+ SelectValue as SelectValue2
34
+ } from "@/components/ui/select";
35
+ import {
36
+ PopoverContent,
37
+ PopoverTrigger,
38
+ PopoverTitle
39
+ } from "@/components/ui/popover";
242
40
 
243
41
  // ../../src/components/animated-list/react.tsx
244
42
  import {
@@ -250,7 +48,7 @@ import {
250
48
  } from "react";
251
49
  import { GripVertical } from "lucide-react";
252
50
  import { Component as Component2, View } from "effect/ui";
253
- import { cn as cn2 } from "cn";
51
+ import { cn } from "cn";
254
52
  import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider/react";
255
53
 
256
54
  // ../../src/lib/krakmotion.ts
@@ -603,7 +401,7 @@ var animatedListBehaviours = {
603
401
  };
604
402
 
605
403
  // ../../src/components/animated-list/react.tsx
606
- import { jsx as jsx5, jsxs as jsxs2, Fragment } from "react/jsx-runtime";
404
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
607
405
  var Model = Component2.define(animatedListOptions).make({
608
406
  ...animatedListBehaviours,
609
407
  view: () => View.text("")
@@ -664,19 +462,19 @@ var AnimatedList = ({
664
462
  send(AnimatedListMessage.Announced({ key }));
665
463
  onReorder(next);
666
464
  };
667
- return /* @__PURE__ */ jsxs2(Fragment, {
465
+ return /* @__PURE__ */ jsxs(Fragment, {
668
466
  children: [
669
- /* @__PURE__ */ jsx5("ul", {
467
+ /* @__PURE__ */ jsx("ul", {
670
468
  ref: container,
671
469
  "data-slot": "animated-list",
672
- className: cn2(animatedListClasses.list, className),
470
+ className: cn(animatedListClasses.list, className),
673
471
  "aria-label": label,
674
472
  children: retained.map(({ key, label }) => {
675
473
  const value = rendered.get(key);
676
474
  if (!value)
677
475
  return null;
678
476
  const index = items.findIndex((candidate) => getKey(candidate) === key);
679
- return /* @__PURE__ */ jsx5(ListItem, {
477
+ return /* @__PURE__ */ jsx(ListItem, {
680
478
  itemKey: key,
681
479
  present: current.has(key),
682
480
  committed,
@@ -696,14 +494,14 @@ var AnimatedList = ({
696
494
  }, key);
697
495
  })
698
496
  }),
699
- onReorder ? /* @__PURE__ */ jsxs2(Fragment, {
497
+ onReorder ? /* @__PURE__ */ jsxs(Fragment, {
700
498
  children: [
701
- /* @__PURE__ */ jsx5("p", {
499
+ /* @__PURE__ */ jsx("p", {
702
500
  id: instructions,
703
501
  className: "sr-only",
704
502
  children: copy.instructions
705
503
  }),
706
- /* @__PURE__ */ jsx5("p", {
504
+ /* @__PURE__ */ jsx("p", {
707
505
  role: "status",
708
506
  "aria-live": "polite",
709
507
  "aria-atomic": "true",
@@ -762,15 +560,15 @@ var ListItem = ({
762
560
  exit();
763
561
  });
764
562
  }, [present, committed, duration, reduced]);
765
- return /* @__PURE__ */ jsxs2("li", {
563
+ return /* @__PURE__ */ jsxs("li", {
766
564
  ref,
767
565
  "data-slot": "animated-list-item",
768
566
  "data-motion-key": itemKey,
769
- className: cn2("relative", className),
567
+ className: cn("relative", className),
770
568
  inert: !present,
771
569
  "aria-hidden": !present ? true : undefined,
772
570
  children: [
773
- reorderable ? /* @__PURE__ */ jsx5("button", {
571
+ reorderable ? /* @__PURE__ */ jsx("button", {
774
572
  "data-slot": "animated-list-handle",
775
573
  type: "button",
776
574
  disabled: disabled || !present,
@@ -787,7 +585,7 @@ var ListItem = ({
787
585
  onKeyMove(event.key);
788
586
  }
789
587
  },
790
- children: /* @__PURE__ */ jsx5(GripVertical, {
588
+ children: /* @__PURE__ */ jsx(GripVertical, {
791
589
  className: "size-4",
792
590
  "aria-hidden": "true"
793
591
  })
@@ -818,62 +616,21 @@ import {
818
616
  Braces,
819
617
  ChevronDown
820
618
  } from "lucide-react";
821
-
822
- // ../../src/components/ui/dropdown-menu.tsx
823
- import { Menu as MenuPrimitive } from "@base-ui/react/menu";
824
- import { ChevronRightIcon, CheckIcon as CheckIcon2 } from "lucide-react";
825
- import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
826
- function DropdownMenu({ ...props }) {
827
- return /* @__PURE__ */ jsx6(MenuPrimitive.Root, {
828
- "data-slot": "dropdown-menu",
829
- ...props
830
- });
831
- }
832
- function DropdownMenuTrigger({ ...props }) {
833
- return /* @__PURE__ */ jsx6(MenuPrimitive.Trigger, {
834
- "data-slot": "dropdown-menu-trigger",
835
- ...props
836
- });
837
- }
838
- function DropdownMenuContent({
839
- align = "start",
840
- alignOffset = 0,
841
- side = "bottom",
842
- sideOffset = 4,
843
- className,
844
- ...props
845
- }) {
846
- return /* @__PURE__ */ jsx6(MenuPrimitive.Portal, {
847
- children: /* @__PURE__ */ jsx6(MenuPrimitive.Positioner, {
848
- className: "isolate z-50 outline-none",
849
- align,
850
- alignOffset,
851
- side,
852
- sideOffset,
853
- children: /* @__PURE__ */ jsx6(MenuPrimitive.Popup, {
854
- "data-slot": "dropdown-menu-content",
855
- className: cn("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95", className),
856
- ...props
857
- })
858
- })
859
- });
860
- }
861
- function DropdownMenuItem({
862
- className,
863
- inset,
864
- variant = "default",
865
- ...props
866
- }) {
867
- return /* @__PURE__ */ jsx6(MenuPrimitive.Item, {
868
- "data-slot": "dropdown-menu-item",
869
- "data-inset": inset,
870
- "data-variant": variant,
871
- className: cn("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive", className),
872
- ...props
873
- });
874
- }
875
-
876
- // ../../src/lib/email-document/legacy-rich-text/editor.tsx
619
+ import { Button } from "@/components/ui/button";
620
+ import { Input } from "@/components/ui/input";
621
+ import {
622
+ Select,
623
+ SelectContent,
624
+ SelectItem,
625
+ SelectTrigger,
626
+ SelectValue
627
+ } from "@/components/ui/select";
628
+ import {
629
+ DropdownMenu,
630
+ DropdownMenuContent,
631
+ DropdownMenuItem,
632
+ DropdownMenuTrigger
633
+ } from "@/components/ui/dropdown-menu";
877
634
  import { useKrakstackLocale as useKrakstackLocale2 } from "@krak-stack/registry/krakstack-provider/react";
878
635
 
879
636
  // ../../src/lib/email-document/legacy-rich-text/schema.ts
@@ -1108,7 +865,7 @@ var richTextExtensions = ({
1108
865
  ];
1109
866
 
1110
867
  // ../../src/lib/email-document/legacy-rich-text/editor.tsx
1111
- import { jsx as jsx7, jsxs as jsxs4, Fragment as Fragment2 } from "react/jsx-runtime";
868
+ import { jsx as jsx2, jsxs as jsxs2, Fragment as Fragment2 } from "react/jsx-runtime";
1112
869
  var labels2 = {
1113
870
  en: {
1114
871
  bold: "Bold",
@@ -1158,7 +915,7 @@ var ToolButton = ({
1158
915
  onClick,
1159
916
  pressed,
1160
917
  disabled
1161
- }) => /* @__PURE__ */ jsx7(Button, {
918
+ }) => /* @__PURE__ */ jsx2(Button, {
1162
919
  type: "button",
1163
920
  size: "icon-sm",
1164
921
  variant: pressed ? "secondary" : "ghost",
@@ -1171,26 +928,26 @@ var ToolButton = ({
1171
928
  children
1172
929
  });
1173
930
  var inlineContent = (inline, variables, values) => {
1174
- let content = inline.type === "text" ? inline.text : values?.[inline.key] ?? /* @__PURE__ */ jsx7("span", {
931
+ let content = inline.type === "text" ? inline.text : values?.[inline.key] ?? /* @__PURE__ */ jsx2("span", {
1175
932
  contentEditable: false,
1176
933
  "data-rich-variable": inline.key,
1177
934
  className: "inline-block rounded bg-indigo-50 px-1.5 font-mono text-[0.85em] text-indigo-800 select-all",
1178
935
  children: `{{${variables.find((variable) => variable.key === inline.key)?.label ?? inline.key}}}`
1179
936
  });
1180
937
  if (inline.marks?.bold)
1181
- content = /* @__PURE__ */ jsx7("strong", {
938
+ content = /* @__PURE__ */ jsx2("strong", {
1182
939
  children: content
1183
940
  });
1184
941
  if (inline.marks?.italic)
1185
- content = /* @__PURE__ */ jsx7("em", {
942
+ content = /* @__PURE__ */ jsx2("em", {
1186
943
  children: content
1187
944
  });
1188
945
  if (inline.marks?.underline)
1189
- content = /* @__PURE__ */ jsx7("u", {
946
+ content = /* @__PURE__ */ jsx2("u", {
1190
947
  children: content
1191
948
  });
1192
949
  if (inline.marks?.href)
1193
- content = /* @__PURE__ */ jsx7("a", {
950
+ content = /* @__PURE__ */ jsx2("a", {
1194
951
  href: inline.marks.href,
1195
952
  className: "underline",
1196
953
  children: content
@@ -1201,24 +958,24 @@ var RichTextContent = ({
1201
958
  value,
1202
959
  variables = [],
1203
960
  values
1204
- }) => /* @__PURE__ */ jsx7(Fragment2, {
961
+ }) => /* @__PURE__ */ jsx2(Fragment2, {
1205
962
  children: value.blocks.map((block, index) => {
1206
- const content = block.content.map((inline, key) => /* @__PURE__ */ jsx7("span", {
963
+ const content = block.content.map((inline, key) => /* @__PURE__ */ jsx2("span", {
1207
964
  children: inlineContent(inline, variables, values)
1208
965
  }, key));
1209
966
  if (block.type === "heading")
1210
- return /* @__PURE__ */ jsx7("h2", {
967
+ return /* @__PURE__ */ jsx2("h2", {
1211
968
  className: "text-xl font-semibold",
1212
- children: content.length ? content : /* @__PURE__ */ jsx7("br", {})
969
+ children: content.length ? content : /* @__PURE__ */ jsx2("br", {})
1213
970
  }, index);
1214
- return /* @__PURE__ */ jsx7("div", {
971
+ return /* @__PURE__ */ jsx2("div", {
1215
972
  "data-rich-kind": block.type,
1216
973
  style: block.type === "bullet" || block.type === "numbered" ? {
1217
974
  display: "list-item",
1218
975
  marginLeft: "1.5em",
1219
976
  listStyleType: block.type === "bullet" ? "disc" : "decimal"
1220
977
  } : undefined,
1221
- children: content.length ? content : /* @__PURE__ */ jsx7("br", {})
978
+ children: content.length ? content : /* @__PURE__ */ jsx2("br", {})
1222
979
  }, index);
1223
980
  })
1224
981
  });
@@ -1367,35 +1124,35 @@ var RichTextEditor = ({
1367
1124
  chip.textContent = text;
1368
1125
  }
1369
1126
  }, [editor, variables]);
1370
- return /* @__PURE__ */ jsxs4("div", {
1127
+ return /* @__PURE__ */ jsxs2("div", {
1371
1128
  "data-slot": "rich-text-editor",
1372
1129
  className: `bg-background text-foreground overflow-hidden rounded-xl border ${className ?? ""}`,
1373
1130
  "data-revision": revision,
1374
1131
  children: [
1375
- /* @__PURE__ */ jsxs4("div", {
1132
+ /* @__PURE__ */ jsxs2("div", {
1376
1133
  role: "group",
1377
1134
  "aria-label": copy.toolbar,
1378
1135
  className: "bg-muted/30 flex flex-wrap items-center gap-1 border-b p-2",
1379
1136
  children: [
1380
- /* @__PURE__ */ jsx7(ToolButton, {
1137
+ /* @__PURE__ */ jsx2(ToolButton, {
1381
1138
  label: copy.undo,
1382
1139
  disabled: disabled || !historyState.undo,
1383
1140
  onClick: () => travel(-1),
1384
- children: /* @__PURE__ */ jsx7(Undo2, {})
1141
+ children: /* @__PURE__ */ jsx2(Undo2, {})
1385
1142
  }),
1386
- /* @__PURE__ */ jsx7(ToolButton, {
1143
+ /* @__PURE__ */ jsx2(ToolButton, {
1387
1144
  label: copy.redo,
1388
1145
  disabled: disabled || !historyState.redo,
1389
1146
  onClick: () => travel(1),
1390
- children: /* @__PURE__ */ jsx7(Redo2, {})
1147
+ children: /* @__PURE__ */ jsx2(Redo2, {})
1391
1148
  }),
1392
- !singleLine ? /* @__PURE__ */ jsxs4(Fragment2, {
1149
+ !singleLine ? /* @__PURE__ */ jsxs2(Fragment2, {
1393
1150
  children: [
1394
- /* @__PURE__ */ jsx7("span", {
1151
+ /* @__PURE__ */ jsx2("span", {
1395
1152
  className: "mx-1 h-5 border-l",
1396
1153
  "aria-hidden": true
1397
1154
  }),
1398
- /* @__PURE__ */ jsxs4(Select, {
1155
+ /* @__PURE__ */ jsxs2(Select, {
1399
1156
  disabled,
1400
1157
  value: editor?.getAttributes("paragraph").kind ?? "paragraph",
1401
1158
  items: [
@@ -1409,30 +1166,30 @@ var RichTextEditor = ({
1409
1166
  editor?.chain().focus().updateAttributes("paragraph", { kind: value }).run();
1410
1167
  },
1411
1168
  children: [
1412
- /* @__PURE__ */ jsx7(SelectTrigger, {
1169
+ /* @__PURE__ */ jsx2(SelectTrigger, {
1413
1170
  size: "sm",
1414
1171
  "aria-label": copy.paragraph,
1415
1172
  className: "max-w-40 text-xs",
1416
- children: /* @__PURE__ */ jsx7(SelectValue, {})
1173
+ children: /* @__PURE__ */ jsx2(SelectValue, {})
1417
1174
  }),
1418
- /* @__PURE__ */ jsxs4(SelectContent, {
1175
+ /* @__PURE__ */ jsxs2(SelectContent, {
1419
1176
  align: "start",
1420
1177
  alignItemWithTrigger: false,
1421
1178
  finalFocus: focusEditor,
1422
1179
  children: [
1423
- /* @__PURE__ */ jsx7(SelectItem, {
1180
+ /* @__PURE__ */ jsx2(SelectItem, {
1424
1181
  value: "paragraph",
1425
1182
  children: copy.paragraph
1426
1183
  }),
1427
- /* @__PURE__ */ jsx7(SelectItem, {
1184
+ /* @__PURE__ */ jsx2(SelectItem, {
1428
1185
  value: "heading",
1429
1186
  children: copy.heading
1430
1187
  }),
1431
- /* @__PURE__ */ jsx7(SelectItem, {
1188
+ /* @__PURE__ */ jsx2(SelectItem, {
1432
1189
  value: "bullet",
1433
1190
  children: copy.bullet
1434
1191
  }),
1435
- /* @__PURE__ */ jsx7(SelectItem, {
1192
+ /* @__PURE__ */ jsx2(SelectItem, {
1436
1193
  value: "numbered",
1437
1194
  children: copy.numbered
1438
1195
  })
@@ -1440,28 +1197,28 @@ var RichTextEditor = ({
1440
1197
  })
1441
1198
  ]
1442
1199
  }),
1443
- /* @__PURE__ */ jsx7(ToolButton, {
1200
+ /* @__PURE__ */ jsx2(ToolButton, {
1444
1201
  label: copy.bold,
1445
1202
  disabled,
1446
1203
  pressed: !!marks.bold,
1447
1204
  onClick: () => format("bold"),
1448
- children: /* @__PURE__ */ jsx7(Bold, {})
1205
+ children: /* @__PURE__ */ jsx2(Bold, {})
1449
1206
  }),
1450
- /* @__PURE__ */ jsx7(ToolButton, {
1207
+ /* @__PURE__ */ jsx2(ToolButton, {
1451
1208
  label: copy.italic,
1452
1209
  disabled,
1453
1210
  pressed: !!marks.italic,
1454
1211
  onClick: () => format("italic"),
1455
- children: /* @__PURE__ */ jsx7(Italic, {})
1212
+ children: /* @__PURE__ */ jsx2(Italic, {})
1456
1213
  }),
1457
- /* @__PURE__ */ jsx7(ToolButton, {
1214
+ /* @__PURE__ */ jsx2(ToolButton, {
1458
1215
  label: copy.underline,
1459
1216
  disabled,
1460
1217
  pressed: !!marks.underline,
1461
1218
  onClick: () => format("underline"),
1462
- children: /* @__PURE__ */ jsx7(Underline, {})
1219
+ children: /* @__PURE__ */ jsx2(Underline, {})
1463
1220
  }),
1464
- /* @__PURE__ */ jsx7(ToolButton, {
1221
+ /* @__PURE__ */ jsx2(ToolButton, {
1465
1222
  label: copy.link,
1466
1223
  disabled,
1467
1224
  pressed: linkOpen || !!marks.href,
@@ -1470,36 +1227,36 @@ var RichTextEditor = ({
1470
1227
  setLinkError(false);
1471
1228
  setLinkOpen(!linkOpen);
1472
1229
  },
1473
- children: /* @__PURE__ */ jsx7(Link2, {})
1230
+ children: /* @__PURE__ */ jsx2(Link2, {})
1474
1231
  })
1475
1232
  ]
1476
1233
  }) : null,
1477
- variables.length ? /* @__PURE__ */ jsxs4(DropdownMenu, {
1234
+ variables.length ? /* @__PURE__ */ jsxs2(DropdownMenu, {
1478
1235
  children: [
1479
- /* @__PURE__ */ jsxs4(DropdownMenuTrigger, {
1236
+ /* @__PURE__ */ jsxs2(DropdownMenuTrigger, {
1480
1237
  disabled,
1481
- render: /* @__PURE__ */ jsx7(Button, {
1238
+ render: /* @__PURE__ */ jsx2(Button, {
1482
1239
  type: "button",
1483
1240
  variant: "outline",
1484
1241
  size: "sm",
1485
1242
  className: "ml-auto text-xs"
1486
1243
  }),
1487
1244
  children: [
1488
- /* @__PURE__ */ jsx7(Braces, {
1245
+ /* @__PURE__ */ jsx2(Braces, {
1489
1246
  className: "size-3.5",
1490
1247
  "aria-hidden": true
1491
1248
  }),
1492
1249
  copy.variable,
1493
- /* @__PURE__ */ jsx7(ChevronDown, {
1250
+ /* @__PURE__ */ jsx2(ChevronDown, {
1494
1251
  className: "size-3.5",
1495
1252
  "aria-hidden": true
1496
1253
  })
1497
1254
  ]
1498
1255
  }),
1499
- /* @__PURE__ */ jsx7(DropdownMenuContent, {
1256
+ /* @__PURE__ */ jsx2(DropdownMenuContent, {
1500
1257
  align: "end",
1501
1258
  finalFocus: focusEditor,
1502
- children: variables.map((variable) => /* @__PURE__ */ jsx7(DropdownMenuItem, {
1259
+ children: variables.map((variable) => /* @__PURE__ */ jsx2(DropdownMenuItem, {
1503
1260
  onClick: () => insertVariable(variable.key),
1504
1261
  children: variable.label
1505
1262
  }, variable.key))
@@ -1508,14 +1265,14 @@ var RichTextEditor = ({
1508
1265
  }) : null
1509
1266
  ]
1510
1267
  }),
1511
- linkOpen ? /* @__PURE__ */ jsxs4("div", {
1268
+ linkOpen ? /* @__PURE__ */ jsxs2("div", {
1512
1269
  className: "flex flex-wrap items-end gap-2 border-b p-3",
1513
1270
  children: [
1514
- /* @__PURE__ */ jsxs4("label", {
1271
+ /* @__PURE__ */ jsxs2("label", {
1515
1272
  className: "grid min-w-0 flex-1 gap-1 text-xs",
1516
1273
  children: [
1517
1274
  copy.linkUrl,
1518
- /* @__PURE__ */ jsx7(Input, {
1275
+ /* @__PURE__ */ jsx2(Input, {
1519
1276
  value: link,
1520
1277
  "aria-invalid": linkError,
1521
1278
  placeholder: "https://",
@@ -1523,7 +1280,7 @@ var RichTextEditor = ({
1523
1280
  })
1524
1281
  ]
1525
1282
  }),
1526
- /* @__PURE__ */ jsx7(Button, {
1283
+ /* @__PURE__ */ jsx2(Button, {
1527
1284
  type: "button",
1528
1285
  size: "sm",
1529
1286
  disabled,
@@ -1537,7 +1294,7 @@ var RichTextEditor = ({
1537
1294
  },
1538
1295
  children: copy.apply
1539
1296
  }),
1540
- marks.href ? /* @__PURE__ */ jsxs4(Button, {
1297
+ marks.href ? /* @__PURE__ */ jsxs2(Button, {
1541
1298
  type: "button",
1542
1299
  size: "sm",
1543
1300
  variant: "outline",
@@ -1548,31 +1305,31 @@ var RichTextEditor = ({
1548
1305
  setLinkError(false);
1549
1306
  },
1550
1307
  children: [
1551
- /* @__PURE__ */ jsx7(Unlink, {
1308
+ /* @__PURE__ */ jsx2(Unlink, {
1552
1309
  "aria-hidden": true
1553
1310
  }),
1554
1311
  copy.unlink
1555
1312
  ]
1556
1313
  }) : null,
1557
- /* @__PURE__ */ jsx7(Button, {
1314
+ /* @__PURE__ */ jsx2(Button, {
1558
1315
  type: "button",
1559
1316
  size: "sm",
1560
1317
  variant: "ghost",
1561
1318
  onClick: () => setLinkOpen(false),
1562
1319
  children: copy.cancel
1563
1320
  }),
1564
- linkError ? /* @__PURE__ */ jsx7("p", {
1321
+ linkError ? /* @__PURE__ */ jsx2("p", {
1565
1322
  role: "alert",
1566
1323
  className: "text-destructive w-full text-xs",
1567
1324
  children: copy.invalidLink
1568
1325
  }) : null
1569
1326
  ]
1570
1327
  }) : null,
1571
- /* @__PURE__ */ jsx7(EditorContent, {
1328
+ /* @__PURE__ */ jsx2(EditorContent, {
1572
1329
  editor,
1573
1330
  style: contentStyle
1574
1331
  }),
1575
- error ? /* @__PURE__ */ jsx7("p", {
1332
+ error ? /* @__PURE__ */ jsx2("p", {
1576
1333
  id: `${id}-error`,
1577
1334
  role: "alert",
1578
1335
  className: "text-destructive px-4 pb-3 text-xs",
@@ -1582,61 +1339,8 @@ var RichTextEditor = ({
1582
1339
  });
1583
1340
  };
1584
1341
 
1585
- // ../../src/components/ui/tabs.tsx
1586
- import { Tabs as TabsPrimitive } from "@base-ui/react/tabs";
1587
- import { cva as cva2 } from "class-variance-authority";
1588
- import { jsx as jsx8 } from "react/jsx-runtime";
1589
- function Tabs({
1590
- className,
1591
- orientation = "horizontal",
1592
- ...props
1593
- }) {
1594
- return /* @__PURE__ */ jsx8(TabsPrimitive.Root, {
1595
- "data-slot": "tabs",
1596
- "data-orientation": orientation,
1597
- className: cn("group/tabs flex gap-2 data-horizontal:flex-col", className),
1598
- ...props
1599
- });
1600
- }
1601
- var tabsListVariants = cva2("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none", {
1602
- variants: {
1603
- variant: {
1604
- default: "bg-muted",
1605
- line: "gap-1 bg-transparent"
1606
- }
1607
- },
1608
- defaultVariants: {
1609
- variant: "default"
1610
- }
1611
- });
1612
- function TabsList({
1613
- className,
1614
- variant = "default",
1615
- ...props
1616
- }) {
1617
- return /* @__PURE__ */ jsx8(TabsPrimitive.List, {
1618
- "data-slot": "tabs-list",
1619
- "data-variant": variant,
1620
- className: cn(tabsListVariants({ variant }), className),
1621
- ...props
1622
- });
1623
- }
1624
- function TabsTrigger({ className, ...props }) {
1625
- return /* @__PURE__ */ jsx8(TabsPrimitive.Tab, {
1626
- "data-slot": "tabs-trigger",
1627
- className: cn("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground", "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", className),
1628
- ...props
1629
- });
1630
- }
1631
- function TabsContent({ className, ...props }) {
1632
- return /* @__PURE__ */ jsx8(TabsPrimitive.Panel, {
1633
- "data-slot": "tabs-content",
1634
- className: cn("flex-1 text-sm outline-none", className),
1635
- ...props
1636
- });
1637
- }
1638
-
1639
1342
  // ../../src/components/email-editor/react.tsx
1343
+ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
1640
1344
  import { useKrakstackLocale as useKrakstackLocale3 } from "@krak-stack/registry/krakstack-provider/react";
1641
1345
 
1642
1346
  // ../../src/lib/email-document/schema.ts
@@ -2189,14 +1893,14 @@ var update2 = Component3.define(emailEditorOptions).update({
2189
1893
  });
2190
1894
 
2191
1895
  // ../../src/components/email-editor/react.tsx
2192
- import { jsx as jsx9, jsxs as jsxs5, Fragment as Fragment3 } from "react/jsx-runtime";
1896
+ import { jsx as jsx3, jsxs as jsxs3, Fragment as Fragment3 } from "react/jsx-runtime";
2193
1897
  var EmailEditorSelect = ({
2194
1898
  label,
2195
1899
  value,
2196
1900
  options,
2197
1901
  disabled,
2198
1902
  onValueChange
2199
- }) => /* @__PURE__ */ jsxs5(Select, {
1903
+ }) => /* @__PURE__ */ jsxs3(Select2, {
2200
1904
  items: options,
2201
1905
  value,
2202
1906
  disabled,
@@ -2205,15 +1909,15 @@ var EmailEditorSelect = ({
2205
1909
  onValueChange(value);
2206
1910
  },
2207
1911
  children: [
2208
- /* @__PURE__ */ jsx9(SelectTrigger, {
1912
+ /* @__PURE__ */ jsx3(SelectTrigger2, {
2209
1913
  "aria-label": label,
2210
1914
  className: "w-full min-w-0 text-xs",
2211
- children: /* @__PURE__ */ jsx9(SelectValue, {})
1915
+ children: /* @__PURE__ */ jsx3(SelectValue2, {})
2212
1916
  }),
2213
- /* @__PURE__ */ jsx9(SelectContent, {
1917
+ /* @__PURE__ */ jsx3(SelectContent2, {
2214
1918
  align: "start",
2215
1919
  alignItemWithTrigger: false,
2216
- children: options.map((option) => /* @__PURE__ */ jsx9(SelectItem, {
1920
+ children: options.map((option) => /* @__PURE__ */ jsx3(SelectItem2, {
2217
1921
  value: option.value,
2218
1922
  children: option.label
2219
1923
  }, option.value))
@@ -2270,7 +1974,7 @@ var EmailEditor = ({
2270
1974
  onChange({ ...value, elements: [...value.elements, element] });
2271
1975
  setActive(element.id);
2272
1976
  };
2273
- const field = (label, control) => /* @__PURE__ */ jsxs5("label", {
1977
+ const field = (label, control) => /* @__PURE__ */ jsxs3("label", {
2274
1978
  className: emailEditorClasses.inspectorField,
2275
1979
  children: [
2276
1980
  label,
@@ -2282,50 +1986,50 @@ var EmailEditor = ({
2282
1986
  "--email-paper": value.appearance.surface,
2283
1987
  "--email-hover": `color-mix(in srgb, ${value.appearance.surface} 94%, ${value.appearance.text})`
2284
1988
  };
2285
- return /* @__PURE__ */ jsxs5("div", {
1989
+ return /* @__PURE__ */ jsxs3("div", {
2286
1990
  "data-slot": "email-editor",
2287
1991
  className: emailEditorClasses.inspector,
2288
1992
  children: [
2289
- /* @__PURE__ */ jsxs5(Tabs, {
1993
+ /* @__PURE__ */ jsxs3(Tabs, {
2290
1994
  value: view,
2291
1995
  onValueChange: setView,
2292
1996
  children: [
2293
- /* @__PURE__ */ jsxs5(TabsList, {
1997
+ /* @__PURE__ */ jsxs3(TabsList, {
2294
1998
  children: [
2295
- /* @__PURE__ */ jsx9(TabsTrigger, {
1999
+ /* @__PURE__ */ jsx3(TabsTrigger, {
2296
2000
  value: "design",
2297
2001
  children: copy.edit
2298
2002
  }),
2299
- /* @__PURE__ */ jsx9(TabsTrigger, {
2003
+ /* @__PURE__ */ jsx3(TabsTrigger, {
2300
2004
  value: "preview",
2301
2005
  disabled: !preview,
2302
2006
  children: copy.preview
2303
2007
  })
2304
2008
  ]
2305
2009
  }),
2306
- /* @__PURE__ */ jsx9(TabsContent, {
2010
+ /* @__PURE__ */ jsx3(TabsContent, {
2307
2011
  value: "preview",
2308
2012
  className: "mt-4",
2309
2013
  children: preview
2310
2014
  }),
2311
- /* @__PURE__ */ jsxs5(TabsContent, {
2015
+ /* @__PURE__ */ jsxs3(TabsContent, {
2312
2016
  value: "design",
2313
2017
  className: "mt-4 space-y-4",
2314
2018
  children: [
2315
- /* @__PURE__ */ jsx9("div", {
2019
+ /* @__PURE__ */ jsx3("div", {
2316
2020
  className: "grid gap-3",
2317
2021
  children: ["subject", "preview"].map((key) => {
2318
2022
  const label = key === "subject" ? copy.subject : copy.preheader;
2319
- return /* @__PURE__ */ jsxs5("div", {
2023
+ return /* @__PURE__ */ jsxs3("div", {
2320
2024
  role: "group",
2321
2025
  "aria-label": label,
2322
2026
  className: "min-w-0 space-y-1.5",
2323
2027
  children: [
2324
- /* @__PURE__ */ jsx9("p", {
2028
+ /* @__PURE__ */ jsx3("p", {
2325
2029
  className: emailEditorClasses.sectionHeading,
2326
2030
  children: label
2327
2031
  }),
2328
- /* @__PURE__ */ jsx9(RichTextEditor, {
2032
+ /* @__PURE__ */ jsx3(RichTextEditor, {
2329
2033
  label,
2330
2034
  value: richTextFromEmailText(value[key]),
2331
2035
  onChange: (content) => onChange({ ...value, [key]: richTextPlainText(content) }),
@@ -2339,44 +2043,44 @@ var EmailEditor = ({
2339
2043
  }, key);
2340
2044
  })
2341
2045
  }),
2342
- /* @__PURE__ */ jsxs5("div", {
2046
+ /* @__PURE__ */ jsxs3("div", {
2343
2047
  className: "bg-muted/20 flex flex-wrap items-center justify-between gap-2 rounded-xl border p-2",
2344
2048
  children: [
2345
- /* @__PURE__ */ jsxs5(Popover.Root, {
2049
+ /* @__PURE__ */ jsxs3(Popover.Root, {
2346
2050
  open: insertOpen,
2347
2051
  onOpenChange: setInsertOpen,
2348
2052
  children: [
2349
- /* @__PURE__ */ jsxs5(PopoverTrigger, {
2053
+ /* @__PURE__ */ jsxs3(PopoverTrigger, {
2350
2054
  id: `${id}-add`,
2351
- render: /* @__PURE__ */ jsx9(Button, {
2055
+ render: /* @__PURE__ */ jsx3(Button2, {
2352
2056
  type: "button",
2353
2057
  size: "sm",
2354
2058
  disabled: disabled || value.elements.length >= 40
2355
2059
  }),
2356
2060
  children: [
2357
- /* @__PURE__ */ jsx9(Plus, {
2061
+ /* @__PURE__ */ jsx3(Plus, {
2358
2062
  className: "size-3.5",
2359
2063
  "aria-hidden": true
2360
2064
  }),
2361
2065
  copy.add,
2362
- /* @__PURE__ */ jsx9(ChevronDown2, {
2066
+ /* @__PURE__ */ jsx3(ChevronDown2, {
2363
2067
  className: "size-3.5",
2364
2068
  "aria-hidden": true
2365
2069
  })
2366
2070
  ]
2367
2071
  }),
2368
- /* @__PURE__ */ jsxs5(PopoverContent, {
2072
+ /* @__PURE__ */ jsxs3(PopoverContent, {
2369
2073
  align: "start",
2370
2074
  className: "w-64",
2371
2075
  children: [
2372
- /* @__PURE__ */ jsx9(PopoverTitle, {
2076
+ /* @__PURE__ */ jsx3(PopoverTitle, {
2373
2077
  children: copy.add
2374
2078
  }),
2375
- /* @__PURE__ */ jsx9("div", {
2079
+ /* @__PURE__ */ jsx3("div", {
2376
2080
  className: "grid gap-1",
2377
2081
  children: emailElementTypes.map((type) => {
2378
2082
  const Icon = icons[type];
2379
- return /* @__PURE__ */ jsxs5(Button, {
2083
+ return /* @__PURE__ */ jsxs3(Button2, {
2380
2084
  type: "button",
2381
2085
  variant: "ghost",
2382
2086
  size: "sm",
@@ -2387,7 +2091,7 @@ var EmailEditor = ({
2387
2091
  setInsertOpen(false);
2388
2092
  },
2389
2093
  children: [
2390
- /* @__PURE__ */ jsx9(Icon, {
2094
+ /* @__PURE__ */ jsx3(Icon, {
2391
2095
  className: "size-3.5",
2392
2096
  "aria-hidden": true
2393
2097
  }),
@@ -2400,35 +2104,35 @@ var EmailEditor = ({
2400
2104
  })
2401
2105
  ]
2402
2106
  }),
2403
- /* @__PURE__ */ jsxs5(Popover.Root, {
2107
+ /* @__PURE__ */ jsxs3(Popover.Root, {
2404
2108
  children: [
2405
- /* @__PURE__ */ jsxs5(PopoverTrigger, {
2406
- render: /* @__PURE__ */ jsx9(Button, {
2109
+ /* @__PURE__ */ jsxs3(PopoverTrigger, {
2110
+ render: /* @__PURE__ */ jsx3(Button2, {
2407
2111
  type: "button",
2408
2112
  variant: "outline",
2409
2113
  size: "sm",
2410
2114
  disabled
2411
2115
  }),
2412
2116
  children: [
2413
- /* @__PURE__ */ jsx9(Palette, {
2117
+ /* @__PURE__ */ jsx3(Palette, {
2414
2118
  className: "size-3.5",
2415
2119
  "aria-hidden": true
2416
2120
  }),
2417
2121
  copy.branding,
2418
- /* @__PURE__ */ jsx9(ChevronDown2, {
2122
+ /* @__PURE__ */ jsx3(ChevronDown2, {
2419
2123
  className: "size-3.5",
2420
2124
  "aria-hidden": true
2421
2125
  })
2422
2126
  ]
2423
2127
  }),
2424
- /* @__PURE__ */ jsxs5(PopoverContent, {
2128
+ /* @__PURE__ */ jsxs3(PopoverContent, {
2425
2129
  align: "end",
2426
2130
  className: "w-[min(380px,calc(100vw-2rem))]",
2427
2131
  children: [
2428
- /* @__PURE__ */ jsx9(PopoverTitle, {
2132
+ /* @__PURE__ */ jsx3(PopoverTitle, {
2429
2133
  children: copy.branding
2430
2134
  }),
2431
- /* @__PURE__ */ jsxs5("div", {
2135
+ /* @__PURE__ */ jsxs3("div", {
2432
2136
  className: "grid grid-cols-2 gap-4",
2433
2137
  children: [
2434
2138
  [
@@ -2437,11 +2141,11 @@ var EmailEditor = ({
2437
2141
  "primary",
2438
2142
  "primaryText",
2439
2143
  "text"
2440
- ].map((key) => /* @__PURE__ */ jsxs5("label", {
2144
+ ].map((key) => /* @__PURE__ */ jsxs3("label", {
2441
2145
  className: "flex items-center justify-between gap-2 text-xs",
2442
2146
  children: [
2443
2147
  key === "text" ? copy.foreground : copy[key],
2444
- /* @__PURE__ */ jsx9("input", {
2148
+ /* @__PURE__ */ jsx3("input", {
2445
2149
  type: "color",
2446
2150
  value: value.appearance[key],
2447
2151
  disabled,
@@ -2456,7 +2160,7 @@ var EmailEditor = ({
2456
2160
  })
2457
2161
  ]
2458
2162
  }, key)),
2459
- field(copy.font, /* @__PURE__ */ jsx9(EmailEditorSelect, {
2163
+ field(copy.font, /* @__PURE__ */ jsx3(EmailEditorSelect, {
2460
2164
  label: copy.font,
2461
2165
  value: value.appearance.font,
2462
2166
  disabled,
@@ -2477,17 +2181,17 @@ var EmailEditor = ({
2477
2181
  })
2478
2182
  ]
2479
2183
  }),
2480
- /* @__PURE__ */ jsxs5("div", {
2184
+ /* @__PURE__ */ jsxs3("div", {
2481
2185
  className: "flex min-w-0 flex-col gap-4",
2482
2186
  children: [
2483
- /* @__PURE__ */ jsx9("div", {
2187
+ /* @__PURE__ */ jsx3("div", {
2484
2188
  ref: canvas,
2485
2189
  "data-slot": "email-editor-canvas",
2486
2190
  className: "min-w-0 rounded-xl border p-3 sm:p-4",
2487
2191
  style: {
2488
2192
  backgroundColor: Schema11.is(EmailColor)(value.appearance.background) ? value.appearance.background : "#f4f4f5"
2489
2193
  },
2490
- children: /* @__PURE__ */ jsxs5("div", {
2194
+ children: /* @__PURE__ */ jsxs3("div", {
2491
2195
  className: "min-w-0 rounded-lg p-2 shadow-sm sm:p-3",
2492
2196
  style: {
2493
2197
  ...canvasVariables,
@@ -2496,11 +2200,11 @@ var EmailEditor = ({
2496
2200
  fontFamily: fonts[value.appearance.font]
2497
2201
  },
2498
2202
  children: [
2499
- !value.elements.length ? /* @__PURE__ */ jsx9("p", {
2203
+ !value.elements.length ? /* @__PURE__ */ jsx3("p", {
2500
2204
  className: emailEditorClasses.previewPlaceholder,
2501
2205
  children: copy.empty
2502
2206
  }) : null,
2503
- /* @__PURE__ */ jsx9(AnimatedList, {
2207
+ /* @__PURE__ */ jsx3(AnimatedList, {
2504
2208
  items: value.elements,
2505
2209
  getKey: (element) => element.id,
2506
2210
  label: copy.content,
@@ -2509,7 +2213,7 @@ var EmailEditor = ({
2509
2213
  duration: 140,
2510
2214
  onReorder: disabled ? undefined : (elements) => onChange({ ...value, elements }),
2511
2215
  itemClassName: "group flex min-w-0 items-start gap-1 rounded-lg bg-[var(--email-paper)] transition-[background-color,box-shadow] hover:bg-[var(--email-hover)] data-[dragging]:bg-[var(--email-hover)] data-[dragging]:shadow-lg [&>[data-slot=animated-list-handle]]:text-inherit",
2512
- children: (element) => /* @__PURE__ */ jsxs5("div", {
2216
+ children: (element) => /* @__PURE__ */ jsxs3("div", {
2513
2217
  ref: (surface) => {
2514
2218
  if (surface)
2515
2219
  elementSurfaces.current.set(element.id, surface);
@@ -2529,9 +2233,9 @@ var EmailEditor = ({
2529
2233
  },
2530
2234
  style: active === element.id ? { borderColor: value.appearance.primary } : undefined,
2531
2235
  children: [
2532
- /* @__PURE__ */ jsx9("div", {
2236
+ /* @__PURE__ */ jsx3("div", {
2533
2237
  className: "flex items-center justify-between gap-2 px-2 py-1 text-xs",
2534
- children: /* @__PURE__ */ jsxs5("button", {
2238
+ children: /* @__PURE__ */ jsxs3("button", {
2535
2239
  type: "button",
2536
2240
  disabled,
2537
2241
  "aria-label": `${copy.editElement}: ${copy[element.type]}`,
@@ -2541,7 +2245,7 @@ var EmailEditor = ({
2541
2245
  },
2542
2246
  className: "inline-flex items-center gap-1 rounded px-1 py-0.5 hover:underline",
2543
2247
  children: [
2544
- /* @__PURE__ */ jsx9(Pencil, {
2248
+ /* @__PURE__ */ jsx3(Pencil, {
2545
2249
  className: "size-3",
2546
2250
  "aria-hidden": true
2547
2251
  }),
@@ -2549,14 +2253,14 @@ var EmailEditor = ({
2549
2253
  ]
2550
2254
  })
2551
2255
  }),
2552
- /* @__PURE__ */ jsx9("div", {
2256
+ /* @__PURE__ */ jsx3("div", {
2553
2257
  style: {
2554
2258
  textAlign: element.alignment,
2555
2259
  paddingTop: element.paddingTop,
2556
2260
  paddingBottom: element.paddingBottom
2557
2261
  },
2558
2262
  className: "min-w-0 px-2",
2559
- children: element.type === "text" ? active === element.id ? /* @__PURE__ */ jsx9(RichTextEditor, {
2263
+ children: element.type === "text" ? active === element.id ? /* @__PURE__ */ jsx3(RichTextEditor, {
2560
2264
  value: element.content,
2561
2265
  variables,
2562
2266
  locale,
@@ -2567,7 +2271,7 @@ var EmailEditor = ({
2567
2271
  backgroundColor: value.appearance.surface
2568
2272
  },
2569
2273
  onChange: (content) => update({ ...element, content })
2570
- }) : /* @__PURE__ */ jsx9("div", {
2274
+ }) : /* @__PURE__ */ jsx3("div", {
2571
2275
  role: "button",
2572
2276
  tabIndex: disabled ? -1 : 0,
2573
2277
  "aria-label": `${copy.editElement}: ${copy.text}`,
@@ -2583,11 +2287,11 @@ var EmailEditor = ({
2583
2287
  setSettingsOpen(true);
2584
2288
  }
2585
2289
  },
2586
- children: /* @__PURE__ */ jsx9(RichTextContent, {
2290
+ children: /* @__PURE__ */ jsx3(RichTextContent, {
2587
2291
  value: element.content,
2588
2292
  variables
2589
2293
  })
2590
- }) : element.type === "button" ? /* @__PURE__ */ jsx9("button", {
2294
+ }) : element.type === "button" ? /* @__PURE__ */ jsx3("button", {
2591
2295
  type: "button",
2592
2296
  disabled,
2593
2297
  onClick: () => setActive(element.id),
@@ -2597,22 +2301,22 @@ var EmailEditor = ({
2597
2301
  color: value.appearance.primaryText
2598
2302
  },
2599
2303
  children: element.label
2600
- }) : element.type === "code" ? /* @__PURE__ */ jsx9("button", {
2304
+ }) : element.type === "code" ? /* @__PURE__ */ jsx3("button", {
2601
2305
  type: "button",
2602
2306
  disabled,
2603
2307
  onClick: () => setActive(element.id),
2604
2308
  className: "w-full rounded-lg border border-[#e5e7eb] p-4 font-mono text-xl tracking-[0.2em]",
2605
2309
  children: `{{${element.variable}}}`
2606
- }) : element.type === "image" || element.type === "logo" ? Schema11.is(RichTextLink)(element.src) ? /* @__PURE__ */ jsx9("img", {
2310
+ }) : element.type === "image" || element.type === "logo" ? Schema11.is(RichTextLink)(element.src) ? /* @__PURE__ */ jsx3("img", {
2607
2311
  src: element.src,
2608
2312
  alt: element.alt,
2609
2313
  width: element.width,
2610
2314
  className: emailEditorClasses.image
2611
- }) : /* @__PURE__ */ jsx9(Image, {
2315
+ }) : /* @__PURE__ */ jsx3(Image, {
2612
2316
  className: "mx-auto size-8"
2613
- }) : element.type === "divider" ? /* @__PURE__ */ jsx9("hr", {
2317
+ }) : element.type === "divider" ? /* @__PURE__ */ jsx3("hr", {
2614
2318
  className: "border-[#e5e7eb]"
2615
- }) : element.type === "spacer" ? /* @__PURE__ */ jsx9("div", {
2319
+ }) : element.type === "spacer" ? /* @__PURE__ */ jsx3("div", {
2616
2320
  style: { height: element.height },
2617
2321
  className: "min-h-2 rounded border border-dashed border-[#e5e7eb]"
2618
2322
  }) : null
@@ -2623,11 +2327,11 @@ var EmailEditor = ({
2623
2327
  ]
2624
2328
  })
2625
2329
  }),
2626
- /* @__PURE__ */ jsx9(Popover.Root, {
2330
+ /* @__PURE__ */ jsx3(Popover.Root, {
2627
2331
  open: settingsOpen && !!selected,
2628
2332
  onOpenChange: setSettingsOpen,
2629
- children: /* @__PURE__ */ jsx9(Popover.Portal, {
2630
- children: /* @__PURE__ */ jsx9(Popover.Positioner, {
2333
+ children: /* @__PURE__ */ jsx3(Popover.Portal, {
2334
+ children: /* @__PURE__ */ jsx3(Popover.Positioner, {
2631
2335
  anchor: settingsAnchor,
2632
2336
  side: "right",
2633
2337
  align: "start",
@@ -2638,33 +2342,33 @@ var EmailEditor = ({
2638
2342
  fallbackAxisSide: "none"
2639
2343
  },
2640
2344
  className: "z-50",
2641
- children: /* @__PURE__ */ jsxs5(Popover.Popup, {
2345
+ children: /* @__PURE__ */ jsxs3(Popover.Popup, {
2642
2346
  initialFocus: false,
2643
2347
  className: "bg-popover text-popover-foreground max-h-[min(480px,80dvh)] w-[min(380px,calc(100vw-2rem))] space-y-3 overflow-y-auto rounded-xl border p-4 shadow-lg outline-none",
2644
2348
  children: [
2645
- /* @__PURE__ */ jsxs5("div", {
2349
+ /* @__PURE__ */ jsxs3("div", {
2646
2350
  className: "flex items-center justify-between gap-2",
2647
2351
  children: [
2648
- /* @__PURE__ */ jsx9(Popover.Title, {
2352
+ /* @__PURE__ */ jsx3(Popover.Title, {
2649
2353
  className: "text-xs font-semibold",
2650
2354
  children: selected ? copy[selected.type] : copy.properties
2651
2355
  }),
2652
- /* @__PURE__ */ jsx9(Popover.Close, {
2356
+ /* @__PURE__ */ jsx3(Popover.Close, {
2653
2357
  "aria-label": copy.close,
2654
2358
  className: "hover:bg-muted rounded p-1",
2655
- children: /* @__PURE__ */ jsx9(X, {
2359
+ children: /* @__PURE__ */ jsx3(X, {
2656
2360
  className: "size-4"
2657
2361
  })
2658
2362
  })
2659
2363
  ]
2660
2364
  }),
2661
- !selected ? /* @__PURE__ */ jsx9("p", {
2365
+ !selected ? /* @__PURE__ */ jsx3("p", {
2662
2366
  className: emailEditorClasses.metadata,
2663
2367
  children: copy.select
2664
- }) : /* @__PURE__ */ jsxs5("div", {
2368
+ }) : /* @__PURE__ */ jsxs3("div", {
2665
2369
  className: "grid min-w-0 items-end gap-3 sm:grid-cols-2 [&>label]:min-w-0",
2666
2370
  children: [
2667
- field(copy.alignment, /* @__PURE__ */ jsx9(EmailEditorSelect, {
2371
+ field(copy.alignment, /* @__PURE__ */ jsx3(EmailEditorSelect, {
2668
2372
  label: copy.alignment,
2669
2373
  value: selected.alignment,
2670
2374
  disabled,
@@ -2677,13 +2381,13 @@ var EmailEditor = ({
2677
2381
  alignment: Schema11.decodeUnknownSync(EmailAlignment)(alignment)
2678
2382
  })
2679
2383
  })),
2680
- /* @__PURE__ */ jsx9("div", {
2384
+ /* @__PURE__ */ jsx3("div", {
2681
2385
  className: emailEditorClasses.actionGrid,
2682
- children: ["paddingTop", "paddingBottom"].map((key) => /* @__PURE__ */ jsxs5("label", {
2386
+ children: ["paddingTop", "paddingBottom"].map((key) => /* @__PURE__ */ jsxs3("label", {
2683
2387
  className: "grid gap-1.5 text-[11px]",
2684
2388
  children: [
2685
2389
  copy[key],
2686
- /* @__PURE__ */ jsx9(Input, {
2390
+ /* @__PURE__ */ jsx3(Input2, {
2687
2391
  type: "number",
2688
2392
  min: 0,
2689
2393
  max: 96,
@@ -2697,9 +2401,9 @@ var EmailEditor = ({
2697
2401
  ]
2698
2402
  }, key))
2699
2403
  }),
2700
- selected.type === "button" ? /* @__PURE__ */ jsxs5(Fragment3, {
2404
+ selected.type === "button" ? /* @__PURE__ */ jsxs3(Fragment3, {
2701
2405
  children: [
2702
- field(copy.label, /* @__PURE__ */ jsx9(Input, {
2406
+ field(copy.label, /* @__PURE__ */ jsx3(Input2, {
2703
2407
  value: selected.label,
2704
2408
  disabled,
2705
2409
  onChange: (event) => update({
@@ -2707,7 +2411,7 @@ var EmailEditor = ({
2707
2411
  label: event.target.value
2708
2412
  })
2709
2413
  })),
2710
- field(copy.destination, /* @__PURE__ */ jsx9(EmailEditorSelect, {
2414
+ field(copy.destination, /* @__PURE__ */ jsx3(EmailEditorSelect, {
2711
2415
  label: copy.destination,
2712
2416
  disabled,
2713
2417
  options: [
@@ -2729,7 +2433,7 @@ var EmailEditor = ({
2729
2433
  }
2730
2434
  })
2731
2435
  })),
2732
- selected.destination.type === "url" ? field(copy.url, /* @__PURE__ */ jsx9(Input, {
2436
+ selected.destination.type === "url" ? field(copy.url, /* @__PURE__ */ jsx3(Input2, {
2733
2437
  type: "url",
2734
2438
  value: selected.destination.url,
2735
2439
  disabled,
@@ -2743,7 +2447,7 @@ var EmailEditor = ({
2743
2447
  })) : null
2744
2448
  ]
2745
2449
  }) : null,
2746
- selected.type === "code" ? field(copy.variable, /* @__PURE__ */ jsx9(EmailEditorSelect, {
2450
+ selected.type === "code" ? field(copy.variable, /* @__PURE__ */ jsx3(EmailEditorSelect, {
2747
2451
  label: copy.variable,
2748
2452
  disabled,
2749
2453
  value: selected.variable,
@@ -2756,9 +2460,9 @@ var EmailEditor = ({
2756
2460
  variable
2757
2461
  })
2758
2462
  })) : null,
2759
- selected.type === "logo" || selected.type === "image" ? /* @__PURE__ */ jsxs5(Fragment3, {
2463
+ selected.type === "logo" || selected.type === "image" ? /* @__PURE__ */ jsxs3(Fragment3, {
2760
2464
  children: [
2761
- field(copy.src, /* @__PURE__ */ jsx9(Input, {
2465
+ field(copy.src, /* @__PURE__ */ jsx3(Input2, {
2762
2466
  type: "url",
2763
2467
  value: selected.src,
2764
2468
  disabled,
@@ -2767,7 +2471,7 @@ var EmailEditor = ({
2767
2471
  src: event.target.value
2768
2472
  })
2769
2473
  })),
2770
- field(copy.alt, /* @__PURE__ */ jsx9(Input, {
2474
+ field(copy.alt, /* @__PURE__ */ jsx3(Input2, {
2771
2475
  value: selected.alt,
2772
2476
  disabled,
2773
2477
  onChange: (event) => update({
@@ -2775,7 +2479,7 @@ var EmailEditor = ({
2775
2479
  alt: event.target.value
2776
2480
  })
2777
2481
  })),
2778
- field(copy.width, /* @__PURE__ */ jsx9(Input, {
2482
+ field(copy.width, /* @__PURE__ */ jsx3(Input2, {
2779
2483
  type: "number",
2780
2484
  min: 32,
2781
2485
  max: 560,
@@ -2788,7 +2492,7 @@ var EmailEditor = ({
2788
2492
  }))
2789
2493
  ]
2790
2494
  }) : null,
2791
- selected.type === "spacer" ? field(copy.height, /* @__PURE__ */ jsx9(Input, {
2495
+ selected.type === "spacer" ? field(copy.height, /* @__PURE__ */ jsx3(Input2, {
2792
2496
  type: "number",
2793
2497
  min: 0,
2794
2498
  max: 96,
@@ -2799,10 +2503,10 @@ var EmailEditor = ({
2799
2503
  height: event.target.valueAsNumber
2800
2504
  })
2801
2505
  })) : null,
2802
- /* @__PURE__ */ jsxs5("div", {
2506
+ /* @__PURE__ */ jsxs3("div", {
2803
2507
  className: "flex flex-wrap items-center gap-2 sm:col-span-2",
2804
2508
  children: [
2805
- /* @__PURE__ */ jsxs5(Button, {
2509
+ /* @__PURE__ */ jsxs3(Button2, {
2806
2510
  type: "button",
2807
2511
  size: "sm",
2808
2512
  variant: "outline",
@@ -2813,13 +2517,13 @@ var EmailEditor = ({
2813
2517
  setActive(id);
2814
2518
  },
2815
2519
  children: [
2816
- /* @__PURE__ */ jsx9(Copy, {
2520
+ /* @__PURE__ */ jsx3(Copy, {
2817
2521
  className: "size-3.5"
2818
2522
  }),
2819
2523
  copy.duplicate
2820
2524
  ]
2821
2525
  }),
2822
- /* @__PURE__ */ jsxs5(Button, {
2526
+ /* @__PURE__ */ jsxs3(Button2, {
2823
2527
  type: "button",
2824
2528
  size: "sm",
2825
2529
  variant: "ghost",
@@ -2832,7 +2536,7 @@ var EmailEditor = ({
2832
2536
  setSettingsOpen(false);
2833
2537
  },
2834
2538
  children: [
2835
- /* @__PURE__ */ jsx9(Trash2, {
2539
+ /* @__PURE__ */ jsx3(Trash2, {
2836
2540
  className: "size-3.5"
2837
2541
  }),
2838
2542
  copy.remove
@@ -2849,7 +2553,7 @@ var EmailEditor = ({
2849
2553
  })
2850
2554
  ]
2851
2555
  }),
2852
- /* @__PURE__ */ jsx9("p", {
2556
+ /* @__PURE__ */ jsx3("p", {
2853
2557
  className: emailEditorClasses.metadata,
2854
2558
  children: copy.local
2855
2559
  })
@@ -2857,7 +2561,7 @@ var EmailEditor = ({
2857
2561
  })
2858
2562
  ]
2859
2563
  }),
2860
- invalid ? /* @__PURE__ */ jsx9("p", {
2564
+ invalid ? /* @__PURE__ */ jsx3("p", {
2861
2565
  role: "alert",
2862
2566
  className: emailEditorClasses.error,
2863
2567
  children: copy.invalid