@krak-stack/registry 0.11.4 → 0.11.6

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 (175) hide show
  1. package/CHANGELOG.md +23 -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 +706 -1279
  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/classes.d.ts +9 -3
  27. package/dist/components/data-table/html.d.ts +93 -21
  28. package/dist/components/data-table/html.js +309 -196
  29. package/dist/components/data-table/index.d.ts +97 -9
  30. package/dist/components/data-table/react.d.ts +14 -3
  31. package/dist/components/data-table/react.js +700 -1273
  32. package/dist/components/data-table/schema.d.ts +175 -16
  33. package/dist/components/date-input/html.js +19 -74
  34. package/dist/components/date-input/react.d.ts +1 -1
  35. package/dist/components/date-input/react.js +28 -313
  36. package/dist/components/docs/classes.d.ts +15 -0
  37. package/dist/components/docs/html.d.ts +55 -0
  38. package/dist/components/docs/html.js +837 -0
  39. package/dist/components/docs/index.d.ts +49 -0
  40. package/dist/components/docs/react.d.ts +10 -0
  41. package/dist/components/docs/react.js +949 -0
  42. package/dist/components/docs/schema.d.ts +49 -0
  43. package/dist/components/editable-text/html.js +6 -52
  44. package/dist/components/editable-text/react.js +13 -83
  45. package/dist/components/editing-locale-switcher/html.d.ts +2 -2
  46. package/dist/components/editing-locale-switcher/html.js +13 -43
  47. package/dist/components/editing-locale-switcher/react.js +17 -141
  48. package/dist/components/effect-form/react.js +249 -812
  49. package/dist/components/email-composer/react.js +62 -279
  50. package/dist/components/email-editor/html.js +13 -58
  51. package/dist/components/email-editor/react.js +187 -483
  52. package/dist/components/error-component/html.js +2 -47
  53. package/dist/components/error-component/react.js +33 -137
  54. package/dist/components/file-input/html.js +9 -40
  55. package/dist/components/file-input/react.js +39 -208
  56. package/dist/components/form/react.js +212 -777
  57. package/dist/components/icon-input/html.js +9 -56
  58. package/dist/components/icon-input/react.js +43 -143
  59. package/dist/components/image-crop-editor/html.js +1 -35
  60. package/dist/components/image-crop-editor/react.js +21 -66
  61. package/dist/components/locale-switcher/html.js +8 -55
  62. package/dist/components/locale-switcher/react.js +21 -146
  63. package/dist/components/map-menu/html.d.ts +8 -8
  64. package/dist/components/map-menu/html.js +13 -72
  65. package/dist/components/map-menu/react.js +92 -309
  66. package/dist/components/markdown/html.js +1 -35
  67. package/dist/components/markdown/react.js +20 -64
  68. package/dist/components/notification-menu/html.js +14 -50
  69. package/dist/components/notification-menu/react.js +73 -343
  70. package/dist/components/pagination/html.js +17 -73
  71. package/dist/components/pagination/react.js +37 -200
  72. package/dist/components/phone-number-input/html.js +19 -57
  73. package/dist/components/phone-number-input/react.d.ts +1 -1
  74. package/dist/components/phone-number-input/react.js +43 -142
  75. package/dist/components/presence-transition/index.d.ts +2 -2
  76. package/dist/components/registry-previews/component-example.js +26 -126
  77. package/dist/components/rich-text-editor/html.d.ts +12 -12
  78. package/dist/components/rich-text-editor/html.js +12 -85
  79. package/dist/components/rich-text-editor/react.js +55 -272
  80. package/dist/components/search-menu/classes.d.ts +2 -0
  81. package/dist/components/search-menu/html.d.ts +2 -0
  82. package/dist/components/search-menu/html.js +40 -73
  83. package/dist/components/search-menu/index.d.ts +27 -2
  84. package/dist/components/search-menu/react.d.ts +1 -1
  85. package/dist/components/search-menu/react.js +59 -280
  86. package/dist/components/search-menu/schema.d.ts +1 -0
  87. package/dist/components/select-with-custom-input/html.d.ts +2 -2
  88. package/dist/components/select-with-custom-input/html.js +13 -48
  89. package/dist/components/select-with-custom-input/react.js +22 -146
  90. package/dist/components/sidebar-layout/html.d.ts +16 -6
  91. package/dist/components/sidebar-layout/html.js +83 -69
  92. package/dist/components/sidebar-layout/index.d.ts +16 -0
  93. package/dist/components/sidebar-layout/react.js +105 -698
  94. package/dist/components/stats-card/react.js +13 -58
  95. package/dist/components/support/html.js +14 -69
  96. package/dist/components/support/react.js +74 -320
  97. package/dist/components/theme-switcher/html.js +11 -55
  98. package/dist/components/theme-switcher/react.js +28 -152
  99. package/dist/components/time-input/html.d.ts +2 -2
  100. package/dist/components/time-input/html.js +8 -53
  101. package/dist/components/time-input/react.js +34 -188
  102. package/dist/components/timezone-input/html.js +11 -67
  103. package/dist/components/timezone-input/react.js +41 -143
  104. package/dist/components/toast/html.d.ts +6 -6
  105. package/dist/components/toast/html.js +13 -46
  106. package/dist/components/tracking-notice/react.js +39 -188
  107. package/dist/components/unsaved-changes-guard/html.js +9 -43
  108. package/dist/components/unsaved-changes-guard/react.js +19 -169
  109. package/dist/components/upload-attachment/html.d.ts +4 -4
  110. package/dist/components/upload-attachment/html.js +4 -35
  111. package/dist/components/upload-attachment/react.js +25 -164
  112. package/dist/components/virtualized-combobox/html.js +10 -35
  113. package/dist/components/virtualized-combobox/react.js +28 -129
  114. package/dist/components/webhook-delivery-table/html.js +320 -206
  115. package/dist/components/webhook-delivery-table/react.js +736 -1376
  116. package/dist/lib/docs.integrations.server.js +150 -202
  117. package/dist/lib/docs.js +305 -1085
  118. package/dist/lib/docs.server.js +134 -186
  119. package/dist/lib/documentation-toolkit.js +144 -196
  120. package/dist/services/agent/client/index.js +226 -1072
  121. package/dist/services/notification/client/index.js +73 -343
  122. package/dist/services/notification/public.js +73 -343
  123. package/package.json +5 -13
  124. package/dist/components/effectcn/alert-dialog.d.ts +0 -13
  125. package/dist/components/effectcn/button.d.ts +0 -31
  126. package/dist/components/effectcn/calendar.d.ts +0 -12
  127. package/dist/components/effectcn/checkbox.d.ts +0 -10
  128. package/dist/components/effectcn/combobox.d.ts +0 -25
  129. package/dist/components/effectcn/dialog.d.ts +0 -19
  130. package/dist/components/effectcn/field.d.ts +0 -11
  131. package/dist/components/effectcn/file-drop.d.ts +0 -8
  132. package/dist/components/effectcn/input.d.ts +0 -26
  133. package/dist/components/effectcn/menu.d.ts +0 -85
  134. package/dist/components/effectcn/menubar.d.ts +0 -8
  135. package/dist/components/effectcn/popover.d.ts +0 -18
  136. package/dist/components/effectcn/scroll-area.d.ts +0 -12
  137. package/dist/components/effectcn/select.d.ts +0 -68
  138. package/dist/components/effectcn/toast.d.ts +0 -29
  139. package/dist/components/ui/alert-dialog.d.ts +0 -18
  140. package/dist/components/ui/alert.d.ts +0 -10
  141. package/dist/components/ui/attachment.d.ts +0 -23
  142. package/dist/components/ui/badge.d.ts +0 -7
  143. package/dist/components/ui/bubble.d.ts +0 -16
  144. package/dist/components/ui/button.d.ts +0 -8
  145. package/dist/components/ui/calendar.d.ts +0 -10
  146. package/dist/components/ui/card.d.ts +0 -11
  147. package/dist/components/ui/checkbox.d.ts +0 -3
  148. package/dist/components/ui/collapsible.d.ts +0 -5
  149. package/dist/components/ui/command.d.ts +0 -18
  150. package/dist/components/ui/dialog.d.ts +0 -17
  151. package/dist/components/ui/dropdown-menu.d.ts +0 -29
  152. package/dist/components/ui/empty.d.ts +0 -11
  153. package/dist/components/ui/field.d.ts +0 -24
  154. package/dist/components/ui/input-group.d.ts +0 -17
  155. package/dist/components/ui/input.d.ts +0 -3
  156. package/dist/components/ui/item.d.ts +0 -22
  157. package/dist/components/ui/label.d.ts +0 -3
  158. package/dist/components/ui/menubar.d.ts +0 -29
  159. package/dist/components/ui/message-scroller.d.ts +0 -10
  160. package/dist/components/ui/message.d.ts +0 -10
  161. package/dist/components/ui/popover.d.ts +0 -9
  162. package/dist/components/ui/scroll-area.d.ts +0 -4
  163. package/dist/components/ui/select.d.ts +0 -15
  164. package/dist/components/ui/select.js +0 -159
  165. package/dist/components/ui/separator.d.ts +0 -3
  166. package/dist/components/ui/sheet.d.ts +0 -14
  167. package/dist/components/ui/sidebar.d.ts +0 -63
  168. package/dist/components/ui/skeleton.d.ts +0 -2
  169. package/dist/components/ui/table.d.ts +0 -10
  170. package/dist/components/ui/tabs.d.ts +0 -10
  171. package/dist/components/ui/textarea.d.ts +0 -3
  172. package/dist/components/ui/tooltip.d.ts +0 -6
  173. package/dist/components/ui/trace.d.ts +0 -18
  174. package/dist/lib/effectcn-form.d.ts +0 -3
  175. package/dist/lib/effectcn-form.js +0 -54
@@ -0,0 +1,49 @@
1
+ import { Schema } from "effect";
2
+ export declare const DocsPageLink: Schema.Struct<{
3
+ readonly label: Schema.String;
4
+ readonly href: Schema.String;
5
+ readonly exact: Schema.optional<Schema.Boolean>;
6
+ readonly badge: Schema.optional<Schema.String>;
7
+ readonly external: Schema.optional<Schema.Boolean>;
8
+ readonly description: Schema.optional<Schema.String>;
9
+ readonly searchText: Schema.optional<Schema.String>;
10
+ }>;
11
+ export declare const DocsLayoutProps: Schema.Struct<{
12
+ readonly locale: Schema.String;
13
+ readonly currentPath: Schema.String;
14
+ readonly groups: Schema.$Array<Schema.Struct<{
15
+ readonly label: Schema.String;
16
+ readonly items: Schema.$Array<Schema.Struct<{
17
+ readonly label: Schema.String;
18
+ readonly href: Schema.String;
19
+ readonly exact: Schema.optional<Schema.Boolean>;
20
+ readonly badge: Schema.optional<Schema.String>;
21
+ readonly external: Schema.optional<Schema.Boolean>;
22
+ readonly description: Schema.optional<Schema.String>;
23
+ readonly searchText: Schema.optional<Schema.String>;
24
+ }>>;
25
+ }>>;
26
+ readonly brand: Schema.Struct<{
27
+ readonly href: Schema.String;
28
+ readonly label: Schema.String;
29
+ readonly subtitle: Schema.optional<Schema.String>;
30
+ }>;
31
+ readonly repository: Schema.optional<Schema.Struct<{
32
+ readonly href: Schema.String;
33
+ readonly label: Schema.String;
34
+ }>>;
35
+ readonly searchLabel: Schema.String;
36
+ readonly searchEmpty: Schema.optional<Schema.String>;
37
+ readonly skipLabel: Schema.String;
38
+ readonly enableShortcut: Schema.optional<Schema.Boolean>;
39
+ }>;
40
+ export declare const DocsArticleProps: Schema.Struct<{
41
+ readonly title: Schema.String;
42
+ readonly description: Schema.optional<Schema.String>;
43
+ readonly tocLabel: Schema.String;
44
+ readonly headings: Schema.$Array<Schema.Struct<{
45
+ readonly id: Schema.String;
46
+ readonly title: Schema.String;
47
+ readonly depth: Schema.Literals<readonly [2, 3]>;
48
+ }>>;
49
+ }>;
@@ -2,54 +2,8 @@
2
2
  import { Redacted as Redacted2 } from "effect";
3
3
  import { Command as Command2 } from "effect/ui";
4
4
  import { Html, HtmlCommand } 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/effectcn/input.ts
40
- import {
41
- Input as KitInput
42
- } from "effect/ui/kit";
43
- var base2 = "block h-8.5 w-full min-w-0 rounded-md border border-input bg-background px-3 text-[13px] text-foreground shadow-sm outline-none " + "transition-[border-color,box-shadow] duration-150 placeholder:text-muted-foreground " + "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/20 " + "aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive/20 " + "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 " + "[&[readonly]]:bg-muted [&[readonly]]:text-muted-foreground [&[readonly]]:shadow-none " + "[&[type=file]]:cursor-pointer [&[type=file]]:pl-0 [&[type=file]]:leading-8 [&[type=file]]:text-muted-foreground " + "file:mr-3 file:h-8 file:cursor-pointer file:border-0 file:border-r file:border-solid file:border-input file:bg-muted file:px-3 " + "file:text-[13px] file:font-medium file:text-foreground";
44
- var sizes2 = {
45
- default: "",
46
- sm: "h-7 rounded-sm px-2.5 text-xs",
47
- lg: "h-10 px-3.5 text-sm"
48
- };
49
- var inputVariants = (options = {}) => cn(base2, sizes2[options.size ?? "default"], options.class);
50
- var Input = (h, options) => KitInput(h, options).class(inputVariants(options));
51
-
52
- // ../../src/components/editable-text/html.ts
5
+ import { Button } from "@/components/effectcn/button";
6
+ import { Input as TextInput } from "@/components/effectcn/input";
53
7
  import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
54
8
  import {
55
9
  LoaderCircle,
@@ -198,7 +152,7 @@ var editableTextBehaviours = {
198
152
  };
199
153
 
200
154
  // ../../src/components/editable-text/html.ts
201
- var Input2 = Html.ref("EditableTextInput", "input");
155
+ var Input = Html.ref("EditableTextInput", "input");
202
156
  var Trigger = Html.ref("EditableTextTrigger", "button");
203
157
  var EditableText = Html.component({
204
158
  ...editableTextOptions,
@@ -213,7 +167,7 @@ var EditableText = Html.component({
213
167
  if (message._tag === "Saved")
214
168
  return $.set(next).run(saveEditableDraft(next));
215
169
  if (message._tag === "Opened")
216
- return $.set(next).run(Command2.asNoop(HtmlCommand.focus(Input2, () => EditableTextMessage.Focused())), Command2.asNoop(HtmlCommand.select(Input2, () => EditableTextMessage.Focused())));
170
+ return $.set(next).run(Command2.asNoop(HtmlCommand.focus(Input, () => EditableTextMessage.Focused())), Command2.asNoop(HtmlCommand.select(Input, () => EditableTextMessage.Focused())));
217
171
  const focus = Command2.asNoop(HtmlCommand.focus(Trigger, () => EditableTextMessage.Focused()));
218
172
  if (message._tag === "Cancelled")
219
173
  return $.set(next).run(focus);
@@ -240,13 +194,13 @@ var EditableText = Html.component({
240
194
  }).ref(Trigger).attrs({
241
195
  "data-component": "editable-text-trigger",
242
196
  "aria-label": `${copy.edit} ${p.label}`
243
- }).children(h.span.class(editableTextClasses.value).children(p.value || copy.empty), PencilIcon(h)) : h.div.class(editableTextClasses.form).attr("data-slot", "editable-text-editor").on("keydown", escape, { preventDefault: true }).children(h.label.attr("for", id).class("text-sm font-medium").children(p.label), Input(h, {
197
+ }).children(h.span.class(editableTextClasses.value).children(p.value || copy.empty), PencilIcon(h)) : h.div.class(editableTextClasses.form).attr("data-slot", "editable-text-editor").on("keydown", escape, { preventDefault: true }).children(h.label.attr("for", id).class("text-sm font-medium").children(p.label), TextInput(h, {
244
198
  props: {
245
199
  value: Redacted2.value(model.draft),
246
200
  disabled: Boolean(p.disabled || pending)
247
201
  },
248
202
  onUpdate: ({ value }) => EditableTextMessage.Edited({ draft: Redacted2.make(value) })
249
- }).ref(Input2).attrs({
203
+ }).ref(Input).attrs({
250
204
  id,
251
205
  type: "text",
252
206
  maxlength: p.maxLength?.toString(),
@@ -3,79 +3,9 @@ import { Effect as Effect2, Redacted as Redacted2 } from "effect";
3
3
  import { Component as Component2, View } from "effect/ui";
4
4
  import { LoaderCircle, Pencil, RotateCcw } from "lucide-react";
5
5
  import { useEffect, useId, useLayoutEffect, useRef, useState } from "react";
6
-
7
- // ../../src/components/ui/button.tsx
8
- import { Button as ButtonPrimitive } from "@base-ui/react/button";
9
- import { cva } from "class-variance-authority";
10
-
11
- // ../../src/lib/utils.ts
12
- import { cn } from "cn";
13
-
14
- // ../../src/components/ui/button.tsx
15
- import { jsx } from "react/jsx-runtime";
16
- var buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
17
- variants: {
18
- variant: {
19
- default: "bg-primary text-primary-foreground hover:bg-primary/80",
20
- outline: "border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
21
- secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
22
- ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
23
- destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
24
- link: "text-primary underline-offset-4 hover:underline"
25
- },
26
- size: {
27
- default: "h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
28
- xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
29
- sm: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
30
- lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
31
- icon: "size-9",
32
- "icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
33
- "icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
34
- "icon-lg": "size-10"
35
- }
36
- },
37
- defaultVariants: {
38
- variant: "default",
39
- size: "default"
40
- }
41
- });
42
- function Button({
43
- className,
44
- variant = "default",
45
- size = "default",
46
- ...props
47
- }) {
48
- return /* @__PURE__ */ jsx(ButtonPrimitive, {
49
- "data-slot": "button",
50
- className: cn(buttonVariants({ variant, size, className })),
51
- ...props
52
- });
53
- }
54
-
55
- // ../../src/components/ui/input.tsx
56
- import { Input as InputPrimitive } from "@base-ui/react/input";
57
- import { jsx as jsx2 } from "react/jsx-runtime";
58
- function Input({ className, type, ...props }) {
59
- return /* @__PURE__ */ jsx2(InputPrimitive, {
60
- type,
61
- "data-slot": "input",
62
- 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),
63
- ...props
64
- });
65
- }
66
-
67
- // ../../src/components/ui/label.tsx
68
- import { jsx as jsx3 } from "react/jsx-runtime";
69
- "use client";
70
- function Label({ className, ...props }) {
71
- return /* @__PURE__ */ jsx3("label", {
72
- "data-slot": "label",
73
- className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
74
- ...props
75
- });
76
- }
77
-
78
- // ../../src/components/editable-text/react.tsx
6
+ import { Button } from "@/components/ui/button";
7
+ import { Input } from "@/components/ui/input";
8
+ import { Label } from "@/components/ui/label";
79
9
  import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider/react";
80
10
  import { useModel } from "@krak-stack/registry/effect-ui-adapter/react";
81
11
 
@@ -220,7 +150,7 @@ var editableTextBehaviours = {
220
150
  };
221
151
 
222
152
  // ../../src/components/editable-text/react.tsx
223
- import { jsx as jsx4, jsxs } from "react/jsx-runtime";
153
+ import { jsx, jsxs } from "react/jsx-runtime";
224
154
  "use client";
225
155
  var EditableTextModel = Component2.define(editableTextOptions).make({
226
156
  ...editableTextBehaviours,
@@ -250,7 +180,7 @@ var EditableText = ({ onSave, ...props }) => {
250
180
  trigger.current?.focus();
251
181
  wasEditing.current = editing;
252
182
  }, [editing]);
253
- return /* @__PURE__ */ jsx4("div", {
183
+ return /* @__PURE__ */ jsx("div", {
254
184
  "data-slot": "editable-text",
255
185
  "data-state": editing ? "editing" : "idle",
256
186
  className: props.className,
@@ -265,11 +195,11 @@ var EditableText = ({ onSave, ...props }) => {
265
195
  send(EditableTextMessage.Cancelled());
266
196
  },
267
197
  children: [
268
- /* @__PURE__ */ jsx4(Label, {
198
+ /* @__PURE__ */ jsx(Label, {
269
199
  htmlFor: id,
270
200
  children: props.label
271
201
  }),
272
- /* @__PURE__ */ jsx4(Input, {
202
+ /* @__PURE__ */ jsx(Input, {
273
203
  "data-component": "editable-text-input",
274
204
  ref: input,
275
205
  id,
@@ -294,16 +224,16 @@ var EditableText = ({ onSave, ...props }) => {
294
224
  "aria-busy": pending,
295
225
  onClick: () => send(EditableTextMessage.Saved()),
296
226
  children: [
297
- pending ? /* @__PURE__ */ jsx4(LoaderCircle, {
227
+ pending ? /* @__PURE__ */ jsx(LoaderCircle, {
298
228
  "aria-hidden": "true",
299
229
  className: editableTextClasses.pendingIcon
300
- }) : failed ? /* @__PURE__ */ jsx4(RotateCcw, {
230
+ }) : failed ? /* @__PURE__ */ jsx(RotateCcw, {
301
231
  "aria-hidden": "true"
302
232
  }) : null,
303
233
  pending ? copy.pending : copy.save
304
234
  ]
305
235
  }),
306
- /* @__PURE__ */ jsx4(Button, {
236
+ /* @__PURE__ */ jsx(Button, {
307
237
  type: "button",
308
238
  variant: "outline",
309
239
  disabled: pending,
@@ -312,7 +242,7 @@ var EditableText = ({ onSave, ...props }) => {
312
242
  })
313
243
  ]
314
244
  }),
315
- /* @__PURE__ */ jsx4("span", {
245
+ /* @__PURE__ */ jsx("span", {
316
246
  "data-slot": "async-action-feedback",
317
247
  role: "status",
318
248
  className: failed ? editableTextClasses.error : "sr-only",
@@ -329,11 +259,11 @@ var EditableText = ({ onSave, ...props }) => {
329
259
  className: editableTextClasses.editTrigger,
330
260
  onClick: () => send(EditableTextMessage.Opened()),
331
261
  children: [
332
- /* @__PURE__ */ jsx4("span", {
262
+ /* @__PURE__ */ jsx("span", {
333
263
  className: editableTextClasses.value,
334
264
  children: props.value || copy.empty
335
265
  }),
336
- /* @__PURE__ */ jsx4(Pencil, {
266
+ /* @__PURE__ */ jsx(Pencil, {
337
267
  "aria-hidden": "true"
338
268
  })
339
269
  ]
@@ -15,9 +15,9 @@ export declare const EditingLocaleSwitcher: import("effect/ui/Component").Compon
15
15
  } | undefined;
16
16
  readonly value: string;
17
17
  }, boolean, {
18
- readonly _tag: "Closed";
19
- } | {
20
18
  readonly _tag: "Opened";
19
+ } | {
20
+ readonly _tag: "Closed";
21
21
  } | {
22
22
  readonly _tag: "Picked";
23
23
  readonly value: string;
@@ -2,49 +2,19 @@
2
2
  import { Html } from "effect/ui/html";
3
3
  import { Select } from "effect/ui/kit";
4
4
  import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
5
-
6
- // ../../src/lib/utils.ts
7
- import { cn } from "cn";
8
-
9
- // ../../src/components/effectcn/select.ts
10
- var triggerSizes = {
11
- sm: "h-7 min-w-36 gap-1.5 rounded-sm pr-2 pl-2.5 text-xs",
12
- default: "h-8.5 min-w-48 pr-2.5 pl-3 text-[13px]",
13
- lg: "h-10 min-w-56 pr-3 pl-3.5 text-sm"
14
- };
15
- var popupSizes = {
16
- sm: "text-xs [&_[role=option]]:min-h-6.5 [&_[role=option]]:px-1.5 [&_[role=option]]:py-0.5",
17
- default: "text-[13px]",
18
- lg: "text-sm [&_[role=option]]:min-h-8.5 [&_[role=option]]:px-2.5"
19
- };
20
- var SelectTrigger = (h, select, options = {}) => select.trigger(h.button.on("mousedown", () => {
21
- return;
22
- }, { preventDefault: "always" }).class(cn("border-input bg-background inline-flex items-center justify-between gap-2 rounded-md border text-start", "text-foreground leading-none whitespace-nowrap shadow-sm select-none", "hover:bg-accent data-[popup-open]:bg-accent transition-colors duration-150", "data-[disabled]:hover:bg-background data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50", "data-[readonly]:bg-muted data-[readonly]:cursor-default", triggerSizes[options.size ?? "default"], options.class)));
23
- var SelectValue = (h, select, options = {}) => select.value(h.span.class(cn("data-[placeholder]:text-muted-foreground min-w-0 truncate leading-snug", options.class)));
24
- var SelectIcon = (h, select, options = {}) => select.icon(h.span.class(cn("border-muted-foreground mx-1 mb-[3px] size-[7px] shrink-0 rotate-45 border-r-[1.5px] border-b-[1.5px]", options.class)));
25
- var SelectPositioner = (h, select, options = {}) => select.positioner(h.div.class(cn("outline-none data-[side=none]:my-2.5", options.class)));
26
- var SelectPopup = (h, select, options = {}) => select.popup(h.div.class(cn("relative box-border max-w-[var(--available-width)] min-w-[max(var(--anchor-width),10rem)] overflow-y-auto", "bg-popover text-foreground shadow-float rounded-lg border p-1 outline-none", "max-h-[min(var(--available-height),20rem)] data-[side=none]:max-h-none", "origin-[var(--transform-origin)] transition-[opacity,scale] duration-150", "data-[ending-style]:opacity-0 data-[starting-style]:opacity-0", "not-data-[side=none]:data-[ending-style]:scale-95 not-data-[side=none]:data-[starting-style]:scale-95", "data-[side=none]:[scrollbar-width:none]", "has-[>[data-slot=select-list]]:flex has-[>[data-slot=select-list]]:flex-col", "has-[>[data-slot=select-list]]:overflow-hidden has-[>[data-slot=select-list]]:p-0", popupSizes[options.size ?? "default"], options.class)));
27
- var SelectList = (h, select, options = {}) => select.list(h.div.attr("data-slot", "select-list").class(cn("min-h-0 flex-1 [scrollbar-width:none] overflow-y-auto p-1 outline-none", options.class)));
28
- var SelectItem = (h, select, options) => select.item({
29
- element: h.div.class(cn("flex min-h-7.5 cursor-default scroll-my-1 items-center gap-2 rounded-sm px-2 py-1 leading-snug outline-none", "data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground select-none", "data-[disabled]:text-muted-foreground data-[disabled]:opacity-60 data-[selected]:font-medium", "[&_svg]:text-muted-foreground [&_svg]:size-[15px] [&_svg]:shrink-0", options.class)),
30
- value: options.value
31
- });
32
- var SelectItemText = (h, select, options = {}) => select.itemText(h.div.class(cn("min-w-0 flex-1 whitespace-nowrap", options.class)));
33
- var SelectItemIndicator = (h, select, options) => select.itemIndicator({
34
- 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)),
35
- value: options.value
36
- });
37
- var scrollArrow = "inset-x-0 z-10 hidden h-6 cursor-default place-items-center rounded-lg bg-popover data-[visible]:grid " + "before:size-1.5 before:rotate-45 before:border-muted-foreground";
38
- var SelectScrollUpArrow = (h, select, options = {}) => select.scrollUpArrow({
39
- keepMounted: true,
40
- element: h.div.class(cn(scrollArrow, "top-0 before:translate-y-0.5 before:border-t-[1.5px] before:border-l-[1.5px]", options.class))
41
- });
42
- var SelectScrollDownArrow = (h, select, options = {}) => select.scrollDownArrow({
43
- keepMounted: true,
44
- element: h.div.class(cn(scrollArrow, "bottom-0 before:-translate-y-0.5 before:border-r-[1.5px] before:border-b-[1.5px]", options.class))
45
- });
46
-
47
- // ../../src/components/editing-locale-switcher/html.ts
5
+ import {
6
+ SelectIcon,
7
+ SelectItem,
8
+ SelectItemIndicator,
9
+ SelectItemText,
10
+ SelectList,
11
+ SelectPopup,
12
+ SelectPositioner,
13
+ SelectScrollDownArrow,
14
+ SelectScrollUpArrow,
15
+ SelectTrigger,
16
+ SelectValue
17
+ } from "@/components/effectcn/select";
48
18
  import { SquarePen as EditIcon } from "@krak-stack/registry/lucide-effect";
49
19
 
50
20
  // ../../src/components/editing-locale-switcher/classes.ts
@@ -1,137 +1,13 @@
1
1
  // ../../src/components/editing-locale-switcher/react.tsx
2
2
  import { SquarePen } from "lucide-react";
3
-
4
- // ../../src/lib/utils.ts
5
- import { cn } from "cn";
6
-
7
- // ../../src/components/ui/label.tsx
8
- import { jsx } from "react/jsx-runtime";
9
- "use client";
10
- function Label({ className, ...props }) {
11
- return /* @__PURE__ */ jsx("label", {
12
- "data-slot": "label",
13
- className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
14
- ...props
15
- });
16
- }
17
-
18
- // ../../src/components/ui/select.tsx
19
- import { Select as SelectPrimitive } from "@base-ui/react/select";
20
- import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
21
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
22
- "use client";
23
- var Select = SelectPrimitive.Root;
24
- function SelectValue({ className, ...props }) {
25
- return /* @__PURE__ */ jsx2(SelectPrimitive.Value, {
26
- "data-slot": "select-value",
27
- className: cn("flex flex-1 text-left", className),
28
- ...props
29
- });
30
- }
31
- function SelectTrigger({
32
- className,
33
- size = "default",
34
- children,
35
- ...props
36
- }) {
37
- return /* @__PURE__ */ jsxs(SelectPrimitive.Trigger, {
38
- "data-slot": "select-trigger",
39
- "data-size": size,
40
- 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),
41
- ...props,
42
- children: [
43
- children,
44
- /* @__PURE__ */ jsx2(SelectPrimitive.Icon, {
45
- render: /* @__PURE__ */ jsx2(ChevronDownIcon, {
46
- className: "text-muted-foreground pointer-events-none size-4"
47
- })
48
- })
49
- ]
50
- });
51
- }
52
- function SelectContent({
53
- className,
54
- children,
55
- side = "bottom",
56
- sideOffset = 4,
57
- align = "start",
58
- alignOffset = 0,
59
- alignItemWithTrigger = false,
60
- ...props
61
- }) {
62
- return /* @__PURE__ */ jsx2(SelectPrimitive.Portal, {
63
- children: /* @__PURE__ */ jsx2(SelectPrimitive.Positioner, {
64
- side,
65
- sideOffset,
66
- align,
67
- alignOffset,
68
- alignItemWithTrigger,
69
- className: "isolate z-50",
70
- children: /* @__PURE__ */ jsxs(SelectPrimitive.Popup, {
71
- "data-slot": "select-content",
72
- "data-align-trigger": alignItemWithTrigger,
73
- 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),
74
- ...props,
75
- children: [
76
- /* @__PURE__ */ jsx2(SelectScrollUpButton, {}),
77
- /* @__PURE__ */ jsx2(SelectPrimitive.List, {
78
- children
79
- }),
80
- /* @__PURE__ */ jsx2(SelectScrollDownButton, {})
81
- ]
82
- })
83
- })
84
- });
85
- }
86
- function SelectItem({
87
- className,
88
- children,
89
- ...props
90
- }) {
91
- return /* @__PURE__ */ jsxs(SelectPrimitive.Item, {
92
- "data-slot": "select-item",
93
- 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),
94
- ...props,
95
- children: [
96
- /* @__PURE__ */ jsx2(SelectPrimitive.ItemText, {
97
- className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap",
98
- children
99
- }),
100
- /* @__PURE__ */ jsx2(SelectPrimitive.ItemIndicator, {
101
- render: /* @__PURE__ */ jsx2("span", {
102
- className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center"
103
- }),
104
- children: /* @__PURE__ */ jsx2(CheckIcon, {
105
- className: "pointer-events-none"
106
- })
107
- })
108
- ]
109
- });
110
- }
111
- function SelectScrollUpButton({
112
- className,
113
- ...props
114
- }) {
115
- return /* @__PURE__ */ jsx2(SelectPrimitive.ScrollUpArrow, {
116
- "data-slot": "select-scroll-up-button",
117
- 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),
118
- ...props,
119
- children: /* @__PURE__ */ jsx2(ChevronUpIcon, {})
120
- });
121
- }
122
- function SelectScrollDownButton({
123
- className,
124
- ...props
125
- }) {
126
- return /* @__PURE__ */ jsx2(SelectPrimitive.ScrollDownArrow, {
127
- "data-slot": "select-scroll-down-button",
128
- 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),
129
- ...props,
130
- children: /* @__PURE__ */ jsx2(ChevronDownIcon, {})
131
- });
132
- }
133
-
134
- // ../../src/components/editing-locale-switcher/react.tsx
3
+ import { Label } from "@/components/ui/label";
4
+ import {
5
+ Select,
6
+ SelectContent,
7
+ SelectItem,
8
+ SelectTrigger,
9
+ SelectValue
10
+ } from "@/components/ui/select";
135
11
  import {
136
12
  useKrakstackLocale,
137
13
  useKrakstackLocales
@@ -201,7 +77,7 @@ var update = Component.define(editingLocaleSwitcherOptions).update({
201
77
  });
202
78
 
203
79
  // ../../src/components/editing-locale-switcher/react.tsx
204
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
80
+ import { jsx, jsxs } from "react/jsx-runtime";
205
81
  function EditingLocaleSwitcher({
206
82
  classes: classOverrides,
207
83
  locale: localeOverride,
@@ -218,7 +94,7 @@ function EditingLocaleSwitcher({
218
94
  value,
219
95
  label: labels.localeName(value)
220
96
  }));
221
- return /* @__PURE__ */ jsxs2(Select, {
97
+ return /* @__PURE__ */ jsxs(Select, {
222
98
  items: localeOptions,
223
99
  value,
224
100
  onValueChange: (nextValue) => {
@@ -226,28 +102,28 @@ function EditingLocaleSwitcher({
226
102
  onValueChange(nextValue);
227
103
  },
228
104
  children: [
229
- /* @__PURE__ */ jsxs2(SelectTrigger, {
105
+ /* @__PURE__ */ jsxs(SelectTrigger, {
230
106
  id: "editing-locale",
231
107
  className: editingLocaleSwitcherClasses.root,
232
108
  children: [
233
- /* @__PURE__ */ jsxs2(Label, {
109
+ /* @__PURE__ */ jsxs(Label, {
234
110
  htmlFor: "editing-locale",
235
111
  className: "text-muted-foreground text-sm",
236
112
  children: [
237
- /* @__PURE__ */ jsx3(SquarePen, {
113
+ /* @__PURE__ */ jsx(SquarePen, {
238
114
  className: "size-4 sm:hidden"
239
115
  }),
240
- /* @__PURE__ */ jsx3("div", {
116
+ /* @__PURE__ */ jsx("div", {
241
117
  className: "sr-only sm:not-sr-only",
242
118
  children: labels.label
243
119
  })
244
120
  ]
245
121
  }),
246
- /* @__PURE__ */ jsx3(SelectValue, {})
122
+ /* @__PURE__ */ jsx(SelectValue, {})
247
123
  ]
248
124
  }),
249
- /* @__PURE__ */ jsx3(SelectContent, {
250
- children: localeOptions.map(({ value, label }) => /* @__PURE__ */ jsx3(SelectItem, {
125
+ /* @__PURE__ */ jsx(SelectContent, {
126
+ children: localeOptions.map(({ value, label }) => /* @__PURE__ */ jsx(SelectItem, {
251
127
  value,
252
128
  children: label
253
129
  }, value))