@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
@@ -3,63 +3,16 @@ import { Schema as Schema5 } from "effect";
3
3
  import { UiSchema as UiSchema3 } from "effect/ui";
4
4
  import { Html } from "effect/ui/html";
5
5
  import { Combobox, VirtualList } from "effect/ui/kit";
6
-
7
- // ../../src/components/effectcn/button.ts
6
+ import { 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
-
35
- // ../../src/components/effectcn/combobox.ts
36
- var icon = (h, path) => h.el("svg").attrs({
37
- viewBox: "0 0 24 24",
38
- fill: "none",
39
- stroke: "currentColor",
40
- "stroke-width": "2",
41
- "stroke-linecap": "round",
42
- "stroke-linejoin": "round",
43
- "aria-hidden": "true"
44
- }).children(h.el("path").attr("d", path));
45
- var ComboboxButton = (h, combobox, options = {}) => combobox.trigger(h.button.class(cn("border-input bg-background text-foreground hover:bg-accent data-[popup-open]:bg-accent inline-flex h-8.5 w-56 items-center justify-between gap-2 rounded-md border pr-2 pl-3 text-start text-[13px] whitespace-nowrap shadow-sm transition-colors duration-150 select-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 [&_svg]:size-3.5", options.class))).children(options.value === undefined ? combobox.value(h.span.class("min-w-0 truncate data-[placeholder]:text-muted-foreground")) : h.span.class(cn("data-[placeholder]:text-muted-foreground min-w-0 truncate", options.valueClass)).children(options.value), combobox.icon(h.span.class("grid shrink-0 place-items-center text-muted-foreground")).children(icon(h, "M7 15l5 5 5-5M7 9l5-5 5 5")));
46
- var ComboboxPositioner = (h, combobox, options = {}) => combobox.positioner(h.div.class(cn("outline-none", options.class)));
47
- var ComboboxPopup = (h, combobox, options = {}) => combobox.popup(h.div.class(cn("bg-popover text-foreground shadow-float box-border flex max-h-[min(var(--available-height),20rem)] w-[var(--anchor-width)] max-w-[var(--available-width)] min-w-48 origin-[var(--transform-origin)] flex-col overflow-hidden rounded-lg border text-[13px] transition-[opacity,scale] duration-150 outline-none data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0", options.class)));
48
- var ComboboxSearchInput = (h, combobox, options = {}) => h.div.class(cn("text-muted-foreground flex shrink-0 items-center border-b pl-3 [&_svg]:size-3.5", options.class)).children(icon(h, "M21 21l-4.3-4.3M11 18a7 7 0 100-14 7 7 0 000 14z"), combobox.input(h.input.attrs({
49
- placeholder: options.placeholder,
50
- "aria-label": options.placeholder
51
- }).class("h-9 min-w-0 flex-1 bg-transparent px-2 text-[13px] text-foreground outline-none placeholder:text-muted-foreground")));
52
- var ComboboxEmpty = (h, combobox, options = {}) => combobox.empty(h.div.class(cn("text-muted-foreground px-3 py-5 text-center empty:hidden", options.class)));
53
- var ComboboxItem = (h, combobox, options) => combobox.item({
54
- element: h.div.class(cn("data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:text-muted-foreground flex min-h-7.5 cursor-default items-center justify-between gap-2 rounded-sm px-2 py-1 leading-snug select-none data-[disabled]:opacity-60 data-[selected]:font-medium", options.class)),
55
- value: options.value
56
- });
57
- var ComboboxItemIndicator = (h, combobox, options) => combobox.itemIndicator({
58
- element: h.span.class(cn("border-brand mr-1.5 mb-0.5 ml-2.5 h-[9px] w-[5px] shrink-0 rotate-45 border-r-[1.5px] border-b-[1.5px]", options.class)),
59
- value: options.value
60
- });
61
-
62
- // ../../src/components/icon-input/html.ts
8
+ ComboboxButton,
9
+ ComboboxEmpty,
10
+ ComboboxItem,
11
+ ComboboxItemIndicator,
12
+ ComboboxPopup,
13
+ ComboboxPositioner,
14
+ ComboboxSearchInput
15
+ } from "@/components/effectcn/combobox";
63
16
  import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
64
17
  import {
65
18
  ExternalLink as ExternalLinkIcon,
@@ -2,54 +2,7 @@
2
2
  import { Component as Component3, View } from "effect/ui";
3
3
  import { Icon } from "@iconify/react";
4
4
  import { ExternalLink, Search } from "lucide-react";
5
-
6
- // ../../src/components/ui/button.tsx
7
- import { Button as ButtonPrimitive } from "@base-ui/react/button";
8
- import { cva } from "class-variance-authority";
9
-
10
- // ../../src/lib/utils.ts
11
- import { cn } from "cn";
12
-
13
- // ../../src/components/ui/button.tsx
14
- import { jsx } from "react/jsx-runtime";
15
- 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", {
16
- variants: {
17
- variant: {
18
- default: "bg-primary text-primary-foreground hover:bg-primary/80",
19
- 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",
20
- 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",
21
- ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
22
- 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",
23
- link: "text-primary underline-offset-4 hover:underline"
24
- },
25
- size: {
26
- 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",
27
- 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",
28
- 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",
29
- lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
30
- icon: "size-9",
31
- "icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
32
- "icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
33
- "icon-lg": "size-10"
34
- }
35
- },
36
- defaultVariants: {
37
- variant: "default",
38
- size: "default"
39
- }
40
- });
41
- function Button({
42
- className,
43
- variant = "default",
44
- size = "default",
45
- ...props
46
- }) {
47
- return /* @__PURE__ */ jsx(ButtonPrimitive, {
48
- "data-slot": "button",
49
- className: cn(buttonVariants({ variant, size, className })),
50
- ...props
51
- });
52
- }
5
+ import { Button as Button2 } from "@/components/ui/button";
53
6
 
54
7
  // ../../src/components/virtualized-combobox/react.tsx
55
8
  import { Combobox as ComboboxPrimitive } from "@base-ui/react";
@@ -61,64 +14,11 @@ import {
61
14
  useImperativeHandle,
62
15
  useRef
63
16
  } from "react";
17
+ import { Button } from "@/components/ui/button";
18
+ import { InputGroup, InputGroupInput } from "@/components/ui/input-group";
64
19
 
65
- // ../../src/components/ui/input-group.tsx
66
- import { cva as cva2 } from "class-variance-authority";
67
-
68
- // ../../src/components/ui/input.tsx
69
- import { Input as InputPrimitive } from "@base-ui/react/input";
70
- import { jsx as jsx2 } from "react/jsx-runtime";
71
- function Input({ className, type, ...props }) {
72
- return /* @__PURE__ */ jsx2(InputPrimitive, {
73
- type,
74
- "data-slot": "input",
75
- 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),
76
- ...props
77
- });
78
- }
79
-
80
- // ../../src/components/ui/input-group.tsx
81
- import { jsx as jsx3 } from "react/jsx-runtime";
82
- function InputGroup({ className, ...props }) {
83
- return /* @__PURE__ */ jsx3("div", {
84
- "data-slot": "input-group",
85
- role: "group",
86
- className: cn("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", className),
87
- ...props
88
- });
89
- }
90
- var inputGroupAddonVariants = cva2("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
91
- variants: {
92
- align: {
93
- "inline-start": "order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]",
94
- "inline-end": "order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]",
95
- "block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
96
- "block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
97
- }
98
- },
99
- defaultVariants: { align: "inline-start" }
100
- });
101
- var inputGroupButtonVariants = cva2("flex items-center gap-2 text-sm shadow-none", {
102
- variants: {
103
- size: {
104
- xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
105
- sm: "",
106
- "icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
107
- "icon-sm": "size-8 p-0 has-[>svg]:p-0"
108
- }
109
- },
110
- defaultVariants: { size: "xs" }
111
- });
112
- function InputGroupInput({
113
- className,
114
- ...props
115
- }) {
116
- return /* @__PURE__ */ jsx3(Input, {
117
- "data-slot": "input-group-control",
118
- className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent", className),
119
- ...props
120
- });
121
- }
20
+ // ../../src/lib/utils.ts
21
+ import { cn } from "cn";
122
22
 
123
23
  // ../../src/components/virtualized-combobox/react.tsx
124
24
  import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider/react";
@@ -285,7 +185,7 @@ var update = Component.define(virtualizedComboboxOptions).update({
285
185
  });
286
186
 
287
187
  // ../../src/components/virtualized-combobox/react.tsx
288
- import { jsx as jsx4, jsxs, Fragment } from "react/jsx-runtime";
188
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
289
189
  "use client";
290
190
  var optionEquals = (item, selected) => item.value === selected.value;
291
191
  var VirtualizedComboboxList = ({
@@ -325,11 +225,11 @@ var VirtualizedComboboxList = ({
325
225
  }, [virtualizer]);
326
226
  return /* @__PURE__ */ jsxs(Fragment, {
327
227
  children: [
328
- filteredItems.length === 0 && /* @__PURE__ */ jsx4("div", {
228
+ filteredItems.length === 0 && /* @__PURE__ */ jsx("div", {
329
229
  className: "text-muted-foreground flex min-h-0 flex-1 flex-col items-center justify-center overflow-auto py-6 text-center text-sm",
330
230
  children: emptyLabel
331
231
  }),
332
- /* @__PURE__ */ jsx4(ComboboxPrimitive.List, {
232
+ /* @__PURE__ */ jsx(ComboboxPrimitive.List, {
333
233
  className: "min-h-0 flex-1 scroll-py-1 overflow-auto overscroll-contain p-1",
334
234
  hidden: filteredItems.length === 0,
335
235
  ref: handleScrollElementRef,
@@ -337,7 +237,7 @@ var VirtualizedComboboxList = ({
337
237
  height: Math.min(virtualizer.getTotalSize() + 8, 288),
338
238
  maxHeight: "var(--available-height)"
339
239
  },
340
- children: /* @__PURE__ */ jsx4("div", {
240
+ children: /* @__PURE__ */ jsx("div", {
341
241
  className: "relative w-full",
342
242
  role: "presentation",
343
243
  style: { height: virtualizer.getTotalSize() },
@@ -350,9 +250,9 @@ var VirtualizedComboboxList = ({
350
250
  transform: `translateY(${virtualItem.start}px)`
351
251
  };
352
252
  if (entry.kind === "group") {
353
- return /* @__PURE__ */ jsx4(ComboboxPrimitive.Group, {
253
+ return /* @__PURE__ */ jsx(ComboboxPrimitive.Group, {
354
254
  className: "contents",
355
- children: /* @__PURE__ */ jsx4(ComboboxPrimitive.GroupLabel, {
255
+ children: /* @__PURE__ */ jsx(ComboboxPrimitive.GroupLabel, {
356
256
  className: "text-muted-foreground absolute top-0 left-0 w-full px-2 pt-3 pb-1 text-xs",
357
257
  "data-index": virtualItem.index,
358
258
  ref: virtualizer.measureElement,
@@ -371,13 +271,13 @@ var VirtualizedComboboxList = ({
371
271
  style,
372
272
  value: entry.item,
373
273
  children: [
374
- renderItem?.(entry.item) ?? /* @__PURE__ */ jsx4("span", {
274
+ renderItem?.(entry.item) ?? /* @__PURE__ */ jsx("span", {
375
275
  className: virtualizedComboboxClasses.itemLabel,
376
276
  children: entry.item.label
377
277
  }),
378
- /* @__PURE__ */ jsx4(ComboboxPrimitive.ItemIndicator, {
278
+ /* @__PURE__ */ jsx(ComboboxPrimitive.ItemIndicator, {
379
279
  className: "absolute right-2 flex size-4 items-center justify-center",
380
- children: /* @__PURE__ */ jsx4(Check, {})
280
+ children: /* @__PURE__ */ jsx(Check, {})
381
281
  })
382
282
  ]
383
283
  }, entry.item.value);
@@ -400,8 +300,8 @@ var VirtualizedComboboxContent = ({
400
300
  virtualizerRef
401
301
  }) => {
402
302
  const labels = virtualizedComboboxMessages(locale, messageOverrides);
403
- return /* @__PURE__ */ jsx4(ComboboxPrimitive.Portal, {
404
- children: /* @__PURE__ */ jsx4(ComboboxPrimitive.Positioner, {
303
+ return /* @__PURE__ */ jsx(ComboboxPrimitive.Portal, {
304
+ children: /* @__PURE__ */ jsx(ComboboxPrimitive.Positioner, {
405
305
  align: "start",
406
306
  className: "isolate z-50",
407
307
  side: "bottom",
@@ -409,17 +309,17 @@ var VirtualizedComboboxContent = ({
409
309
  children: /* @__PURE__ */ jsxs(ComboboxPrimitive.Popup, {
410
310
  className: cn("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-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-in-95 relative flex max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-0 origin-(--transform-origin) flex-col overflow-hidden rounded-md shadow-md ring-1 duration-100", contentClassName),
411
311
  children: [
412
- /* @__PURE__ */ jsx4("div", {
312
+ /* @__PURE__ */ jsx("div", {
413
313
  className: "min-w-0 shrink-0 p-1 pb-0",
414
- children: /* @__PURE__ */ jsx4(InputGroup, {
314
+ children: /* @__PURE__ */ jsx(InputGroup, {
415
315
  className: "border-input/30 bg-input/30 h-8 w-full min-w-0 shadow-none",
416
- children: /* @__PURE__ */ jsx4(ComboboxPrimitive.Input, {
316
+ children: /* @__PURE__ */ jsx(ComboboxPrimitive.Input, {
417
317
  placeholder: labels.search,
418
- render: /* @__PURE__ */ jsx4(InputGroupInput, {})
318
+ render: /* @__PURE__ */ jsx(InputGroupInput, {})
419
319
  })
420
320
  })
421
321
  }),
422
- /* @__PURE__ */ jsx4(VirtualizedComboboxList, {
322
+ /* @__PURE__ */ jsx(VirtualizedComboboxList, {
423
323
  classes,
424
324
  emptyLabel,
425
325
  groupSelections,
@@ -444,20 +344,20 @@ var defaultTrigger = (ariaLabel, ariaInvalid, disabled, label, triggerId) => /*
444
344
  type: "button",
445
345
  variant: "outline",
446
346
  children: [
447
- /* @__PURE__ */ jsx4("span", {
347
+ /* @__PURE__ */ jsx("span", {
448
348
  className: "min-w-0 flex-1 truncate pr-7 text-left",
449
349
  children: label
450
350
  }),
451
- /* @__PURE__ */ jsx4(ChevronsUpDown, {
351
+ /* @__PURE__ */ jsx(ChevronsUpDown, {
452
352
  className: "text-muted-foreground shrink-0 opacity-70"
453
353
  })
454
354
  ]
455
355
  });
456
- var defaultClear = (label) => /* @__PURE__ */ jsx4(ComboboxPrimitive.Clear, {
356
+ var defaultClear = (label) => /* @__PURE__ */ jsx(ComboboxPrimitive.Clear, {
457
357
  "aria-label": label,
458
358
  className: "text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 absolute top-1/2 right-7 z-10 flex size-6 -translate-y-1/2 items-center justify-center rounded-sm outline-none focus-visible:border focus-visible:ring-3",
459
359
  type: "button",
460
- children: /* @__PURE__ */ jsx4(X, {
360
+ children: /* @__PURE__ */ jsx(X, {
461
361
  className: "size-3.5"
462
362
  })
463
363
  });
@@ -490,13 +390,13 @@ var VirtualizedComboboxSingle = (props) => {
490
390
  /* @__PURE__ */ jsxs("div", {
491
391
  className: "relative",
492
392
  children: [
493
- /* @__PURE__ */ jsx4(ComboboxPrimitive.Trigger, {
393
+ /* @__PURE__ */ jsx(ComboboxPrimitive.Trigger, {
494
394
  render: props.trigger ?? defaultTrigger(props.ariaLabel, props.ariaInvalid, props.disabled, selectedLabel(props.value, props.placeholder), props.triggerId)
495
395
  }),
496
396
  props.trigger ? null : defaultClear(labels.clear)
497
397
  ]
498
398
  }),
499
- /* @__PURE__ */ jsx4(VirtualizedComboboxContent, {
399
+ /* @__PURE__ */ jsx(VirtualizedComboboxContent, {
500
400
  ...props,
501
401
  groupSelections: false,
502
402
  itemIndexRef,
@@ -532,13 +432,13 @@ var VirtualizedComboboxMultiple = (props) => {
532
432
  /* @__PURE__ */ jsxs("div", {
533
433
  className: "relative",
534
434
  children: [
535
- /* @__PURE__ */ jsx4(ComboboxPrimitive.Trigger, {
435
+ /* @__PURE__ */ jsx(ComboboxPrimitive.Trigger, {
536
436
  render: props.trigger ?? defaultTrigger(props.ariaLabel, props.ariaInvalid, props.disabled, selectedLabel(props.value, props.placeholder), props.triggerId)
537
437
  }),
538
438
  props.trigger ? null : defaultClear(labels.clear)
539
439
  ]
540
440
  }),
541
- /* @__PURE__ */ jsx4(VirtualizedComboboxContent, {
441
+ /* @__PURE__ */ jsx(VirtualizedComboboxContent, {
542
442
  ...props,
543
443
  groupSelections: true,
544
444
  itemIndexRef,
@@ -550,10 +450,10 @@ var VirtualizedComboboxMultiple = (props) => {
550
450
  };
551
451
  function VirtualizedCombobox(props) {
552
452
  const locale = useKrakstackLocale(props.locale);
553
- return props.multiple ? /* @__PURE__ */ jsx4(VirtualizedComboboxMultiple, {
453
+ return props.multiple ? /* @__PURE__ */ jsx(VirtualizedComboboxMultiple, {
554
454
  ...props,
555
455
  locale
556
- }) : /* @__PURE__ */ jsx4(VirtualizedComboboxSingle, {
456
+ }) : /* @__PURE__ */ jsx(VirtualizedComboboxSingle, {
557
457
  ...props,
558
458
  locale
559
459
  });
@@ -709,7 +609,7 @@ var iconInputBehaviours = {
709
609
  };
710
610
 
711
611
  // ../../src/components/icon-input/react.tsx
712
- import { jsx as jsx5, jsxs as jsxs2, Fragment as Fragment2 } from "react/jsx-runtime";
612
+ import { jsx as jsx2, jsxs as jsxs2, Fragment as Fragment2 } from "react/jsx-runtime";
713
613
  var IconInputModel = Component3.define(iconInputOptions).make({
714
614
  ...iconInputBehaviours,
715
615
  view: () => View.text("")
@@ -733,20 +633,20 @@ function IconInput({
733
633
  const isWaiting = query.trim() !== "" && results?.collection !== collection;
734
634
  const items = icons.map((icon) => ({ label: icon, value: icon }));
735
635
  const selectedItem = value ? { label: value, value } : null;
736
- return /* @__PURE__ */ jsx5(VirtualizedCombobox, {
636
+ return /* @__PURE__ */ jsx2(VirtualizedCombobox, {
737
637
  ariaLabel: copy.select,
738
638
  contentClassName: "h-80 w-80",
739
639
  emptyLabel: isWaiting ? null : /* @__PURE__ */ jsxs2("div", {
740
640
  className: "text-muted-foreground flex flex-col items-center gap-2 px-3",
741
641
  children: [
742
- /* @__PURE__ */ jsx5(Search, {
642
+ /* @__PURE__ */ jsx2(Search, {
743
643
  className: "size-5"
744
644
  }),
745
- /* @__PURE__ */ jsx5("p", {
645
+ /* @__PURE__ */ jsx2("p", {
746
646
  children: query ? copy.empty : copy.searchPrompt
747
647
  }),
748
- /* @__PURE__ */ jsxs2(Button, {
749
- render: /* @__PURE__ */ jsx5("a", {
648
+ /* @__PURE__ */ jsxs2(Button2, {
649
+ render: /* @__PURE__ */ jsx2("a", {
750
650
  href: iconifyCollectionUrl(collection),
751
651
  rel: "noreferrer",
752
652
  target: "_blank"
@@ -757,7 +657,7 @@ function IconInput({
757
657
  children: [
758
658
  copy.browse,
759
659
  " ",
760
- /* @__PURE__ */ jsx5(ExternalLink, {
660
+ /* @__PURE__ */ jsx2(ExternalLink, {
761
661
  className: "inline size-3"
762
662
  })
763
663
  ]
@@ -786,22 +686,22 @@ function IconInput({
786
686
  placeholder: copy.select,
787
687
  renderItem: (item) => /* @__PURE__ */ jsxs2(Fragment2, {
788
688
  children: [
789
- /* @__PURE__ */ jsx5(Icon, {
689
+ /* @__PURE__ */ jsx2(Icon, {
790
690
  className: "size-5 shrink-0",
791
691
  icon: `${collection}:${item.value}`
792
692
  }),
793
- /* @__PURE__ */ jsx5("span", {
693
+ /* @__PURE__ */ jsx2("span", {
794
694
  className: "truncate",
795
695
  children: item.label
796
696
  }),
797
- /* @__PURE__ */ jsx5("span", {
697
+ /* @__PURE__ */ jsx2("span", {
798
698
  className: "sr-only",
799
699
  children: copy.select
800
700
  })
801
701
  ]
802
702
  }),
803
703
  searchValue: query,
804
- trigger: /* @__PURE__ */ jsx5(Button, {
704
+ trigger: /* @__PURE__ */ jsx2(Button2, {
805
705
  "aria-label": copy.select,
806
706
  disabled,
807
707
  id,
@@ -809,7 +709,7 @@ function IconInput({
809
709
  title: value,
810
710
  type: "button",
811
711
  variant: "outline",
812
- children: /* @__PURE__ */ jsx5(Icon, {
712
+ children: /* @__PURE__ */ jsx2(Icon, {
813
713
  className: "size-5",
814
714
  icon: `${collection}:${value}`
815
715
  })
@@ -2,41 +2,7 @@
2
2
  import { Effect as Effect2, Redacted, Schema as Schema5, Stream } from "effect";
3
3
  import { Mount } from "effect/ui";
4
4
  import { Html } from "effect/ui/html";
5
-
6
- // ../../src/components/effectcn/button.ts
7
- import {
8
- Button as KitButton
9
- } from "effect/ui/kit";
10
-
11
- // ../../src/lib/utils.ts
12
- import { cn } from "cn";
13
-
14
- // ../../src/components/effectcn/button.ts
15
- 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";
16
- var variants = {
17
- default: "bg-primary text-primary-foreground hover:bg-primary/85",
18
- secondary: "bg-secondary text-secondary-foreground hover:bg-accent",
19
- outline: "border-input bg-background text-foreground shadow-sm hover:bg-accent hover:text-accent-foreground",
20
- ghost: "text-foreground hover:bg-accent hover:text-accent-foreground",
21
- brand: "bg-brand-soft text-brand-soft-foreground hover:bg-brand-soft/85",
22
- destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/85",
23
- link: "h-auto px-0 text-foreground underline decoration-transparent underline-offset-4 hover:decoration-current"
24
- };
25
- var sizes = {
26
- default: "",
27
- sm: "h-7 rounded-sm px-2.5 text-xs",
28
- lg: "h-10 px-5 text-sm",
29
- icon: "w-8.5 px-0",
30
- "icon-sm": "h-7 w-7 rounded-sm px-0"
31
- };
32
- var buttonVariants = (options = {}) => cn(base, variants[options.variant ?? "default"], sizes[options.size ?? "default"], options.class);
33
- var Button = (h, options = {}) => KitButton(h, {
34
- element: options.element,
35
- onPress: options.onPress,
36
- props: options.loading ? { ...options.props, disabled: true, focusableWhenDisabled: true } : options.props
37
- }).class(buttonVariants(options)).attr("data-loading", options.loading ? "" : undefined);
38
-
39
- // ../../src/components/image-crop-editor/html.ts
5
+ import { Button } from "@/components/effectcn/button";
40
6
  import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
41
7
  import { Check, LoaderCircle, RotateCcw } from "@krak-stack/registry/lucide-effect";
42
8