@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.
- package/CHANGELOG.md +13 -1
- package/README.md +23 -9
- package/dist/components/agent/react.js +226 -1072
- package/dist/components/app-switcher/html.js +10 -53
- package/dist/components/app-switcher/react.js +29 -139
- package/dist/components/async-action-button/html.js +3 -34
- package/dist/components/async-action-button/react.d.ts +1 -1
- package/dist/components/async-action-button/react.js +8 -54
- package/dist/components/audit-log-table/react.js +555 -1265
- package/dist/components/bulk-list-input/html.js +3 -40
- package/dist/components/bulk-list-input/react.d.ts +1 -1
- package/dist/components/bulk-list-input/react.js +6 -59
- package/dist/components/code-block/html.js +1 -35
- package/dist/components/code-block/react.js +12 -59
- package/dist/components/color-input/html.js +2 -19
- package/dist/components/color-input/react.js +6 -97
- package/dist/components/copy-button/html.js +1 -35
- package/dist/components/copy-button/react.d.ts +1 -1
- package/dist/components/copy-button/react.js +7 -54
- package/dist/components/copy-value/html.js +11 -52
- package/dist/components/copy-value/react.js +25 -165
- package/dist/components/cron-input/html.js +2 -18
- package/dist/components/cron-input/react.js +15 -30
- package/dist/components/danger-confirmation/html.js +11 -57
- package/dist/components/danger-confirmation/react.js +26 -187
- package/dist/components/data-table/html.d.ts +12 -12
- package/dist/components/data-table/html.js +200 -174
- package/dist/components/data-table/react.js +549 -1259
- package/dist/components/date-input/html.js +19 -74
- package/dist/components/date-input/react.d.ts +1 -1
- package/dist/components/date-input/react.js +28 -313
- package/dist/components/docs/classes.d.ts +15 -0
- package/dist/components/docs/html.d.ts +55 -0
- package/dist/components/docs/html.js +837 -0
- package/dist/components/docs/index.d.ts +49 -0
- package/dist/components/docs/react.d.ts +10 -0
- package/dist/components/docs/react.js +949 -0
- package/dist/components/docs/schema.d.ts +49 -0
- package/dist/components/editable-text/html.js +6 -52
- package/dist/components/editable-text/react.js +13 -83
- package/dist/components/editing-locale-switcher/html.d.ts +2 -2
- package/dist/components/editing-locale-switcher/html.js +13 -43
- package/dist/components/editing-locale-switcher/react.js +17 -141
- package/dist/components/effect-form/react.js +249 -812
- package/dist/components/email-composer/react.js +62 -279
- package/dist/components/email-editor/html.js +13 -58
- package/dist/components/email-editor/react.js +187 -483
- package/dist/components/error-component/html.js +2 -47
- package/dist/components/error-component/react.js +33 -137
- package/dist/components/file-input/html.js +9 -40
- package/dist/components/file-input/react.js +39 -208
- package/dist/components/form/react.js +212 -777
- package/dist/components/icon-input/html.js +9 -56
- package/dist/components/icon-input/react.js +43 -143
- package/dist/components/image-crop-editor/html.js +1 -35
- package/dist/components/image-crop-editor/react.js +21 -66
- package/dist/components/locale-switcher/html.js +8 -55
- package/dist/components/locale-switcher/react.js +21 -146
- package/dist/components/map-menu/html.d.ts +8 -8
- package/dist/components/map-menu/html.js +13 -72
- package/dist/components/map-menu/react.js +92 -309
- package/dist/components/markdown/html.js +1 -35
- package/dist/components/markdown/react.js +20 -64
- package/dist/components/notification-menu/html.js +14 -50
- package/dist/components/notification-menu/react.js +73 -343
- package/dist/components/pagination/html.js +17 -73
- package/dist/components/pagination/react.js +37 -200
- package/dist/components/phone-number-input/html.js +19 -57
- package/dist/components/phone-number-input/react.d.ts +1 -1
- package/dist/components/phone-number-input/react.js +43 -142
- package/dist/components/presence-transition/index.d.ts +2 -2
- package/dist/components/registry-previews/component-example.js +26 -126
- package/dist/components/rich-text-editor/html.d.ts +12 -12
- package/dist/components/rich-text-editor/html.js +12 -85
- package/dist/components/rich-text-editor/react.js +55 -272
- package/dist/components/search-menu/classes.d.ts +2 -0
- package/dist/components/search-menu/html.d.ts +2 -0
- package/dist/components/search-menu/html.js +40 -73
- package/dist/components/search-menu/index.d.ts +27 -2
- package/dist/components/search-menu/react.d.ts +1 -1
- package/dist/components/search-menu/react.js +59 -280
- package/dist/components/search-menu/schema.d.ts +1 -0
- package/dist/components/select-with-custom-input/html.d.ts +2 -2
- package/dist/components/select-with-custom-input/html.js +13 -48
- package/dist/components/select-with-custom-input/react.js +22 -146
- package/dist/components/sidebar-layout/html.d.ts +16 -6
- package/dist/components/sidebar-layout/html.js +83 -69
- package/dist/components/sidebar-layout/index.d.ts +16 -0
- package/dist/components/sidebar-layout/react.js +105 -698
- package/dist/components/stats-card/react.js +13 -58
- package/dist/components/support/html.js +14 -69
- package/dist/components/support/react.js +74 -320
- package/dist/components/theme-switcher/html.js +11 -55
- package/dist/components/theme-switcher/react.js +28 -152
- package/dist/components/time-input/html.d.ts +2 -2
- package/dist/components/time-input/html.js +8 -53
- package/dist/components/time-input/react.js +34 -188
- package/dist/components/timezone-input/html.js +11 -67
- package/dist/components/timezone-input/react.js +41 -143
- package/dist/components/toast/html.d.ts +6 -6
- package/dist/components/toast/html.js +13 -46
- package/dist/components/tracking-notice/react.js +39 -188
- package/dist/components/unsaved-changes-guard/html.js +9 -43
- package/dist/components/unsaved-changes-guard/react.js +19 -169
- package/dist/components/upload-attachment/html.d.ts +4 -4
- package/dist/components/upload-attachment/html.js +4 -35
- package/dist/components/upload-attachment/react.js +25 -164
- package/dist/components/virtualized-combobox/html.js +10 -35
- package/dist/components/virtualized-combobox/react.js +28 -129
- package/dist/components/webhook-delivery-table/html.js +211 -184
- package/dist/components/webhook-delivery-table/react.js +585 -1362
- package/dist/lib/docs.integrations.server.js +150 -202
- package/dist/lib/docs.js +305 -1085
- package/dist/lib/docs.server.js +134 -186
- package/dist/lib/documentation-toolkit.js +144 -196
- package/dist/services/agent/client/index.js +226 -1072
- package/dist/services/notification/client/index.js +73 -343
- package/dist/services/notification/public.js +73 -343
- package/package.json +5 -13
- package/dist/components/effectcn/alert-dialog.d.ts +0 -13
- package/dist/components/effectcn/button.d.ts +0 -31
- package/dist/components/effectcn/calendar.d.ts +0 -12
- package/dist/components/effectcn/checkbox.d.ts +0 -10
- package/dist/components/effectcn/combobox.d.ts +0 -25
- package/dist/components/effectcn/dialog.d.ts +0 -19
- package/dist/components/effectcn/field.d.ts +0 -11
- package/dist/components/effectcn/file-drop.d.ts +0 -8
- package/dist/components/effectcn/input.d.ts +0 -26
- package/dist/components/effectcn/menu.d.ts +0 -85
- package/dist/components/effectcn/menubar.d.ts +0 -8
- package/dist/components/effectcn/popover.d.ts +0 -18
- package/dist/components/effectcn/scroll-area.d.ts +0 -12
- package/dist/components/effectcn/select.d.ts +0 -68
- package/dist/components/effectcn/toast.d.ts +0 -29
- package/dist/components/ui/alert-dialog.d.ts +0 -18
- package/dist/components/ui/alert.d.ts +0 -10
- package/dist/components/ui/attachment.d.ts +0 -23
- package/dist/components/ui/badge.d.ts +0 -7
- package/dist/components/ui/bubble.d.ts +0 -16
- package/dist/components/ui/button.d.ts +0 -8
- package/dist/components/ui/calendar.d.ts +0 -10
- package/dist/components/ui/card.d.ts +0 -11
- package/dist/components/ui/checkbox.d.ts +0 -3
- package/dist/components/ui/collapsible.d.ts +0 -5
- package/dist/components/ui/command.d.ts +0 -18
- package/dist/components/ui/dialog.d.ts +0 -17
- package/dist/components/ui/dropdown-menu.d.ts +0 -29
- package/dist/components/ui/empty.d.ts +0 -11
- package/dist/components/ui/field.d.ts +0 -24
- package/dist/components/ui/input-group.d.ts +0 -17
- package/dist/components/ui/input.d.ts +0 -3
- package/dist/components/ui/item.d.ts +0 -22
- package/dist/components/ui/label.d.ts +0 -3
- package/dist/components/ui/menubar.d.ts +0 -29
- package/dist/components/ui/message-scroller.d.ts +0 -10
- package/dist/components/ui/message.d.ts +0 -10
- package/dist/components/ui/popover.d.ts +0 -9
- package/dist/components/ui/scroll-area.d.ts +0 -4
- package/dist/components/ui/select.d.ts +0 -15
- package/dist/components/ui/select.js +0 -159
- package/dist/components/ui/separator.d.ts +0 -3
- package/dist/components/ui/sheet.d.ts +0 -14
- package/dist/components/ui/sidebar.d.ts +0 -63
- package/dist/components/ui/skeleton.d.ts +0 -2
- package/dist/components/ui/table.d.ts +0 -10
- package/dist/components/ui/tabs.d.ts +0 -10
- package/dist/components/ui/textarea.d.ts +0 -3
- package/dist/components/ui/tooltip.d.ts +0 -6
- package/dist/components/ui/trace.d.ts +0 -18
- package/dist/lib/effectcn-form.d.ts +0 -3
- package/dist/lib/effectcn-form.js +0 -54
|
@@ -2,53 +2,8 @@
|
|
|
2
2
|
import { Effect as Effect2, Redacted as Redacted2 } from "effect";
|
|
3
3
|
import { Mount } from "effect/ui";
|
|
4
4
|
import { Html } from "effect/ui/html";
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
51
|
-
// ../../src/components/error-component/html.ts
|
|
5
|
+
import { Button, buttonVariants } from "@/components/effectcn/button";
|
|
6
|
+
import { inputVariants } from "@/components/effectcn/input";
|
|
52
7
|
import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
|
|
53
8
|
import {
|
|
54
9
|
Check,
|
|
@@ -7,56 +7,10 @@ import { CircleAlert, RefreshCw } from "lucide-react";
|
|
|
7
7
|
import { useState as useState2 } from "react";
|
|
8
8
|
import { Option, Schema as Schema5 } from "effect";
|
|
9
9
|
import { HttpClientError, HttpTraceContext } from "effect/http";
|
|
10
|
-
|
|
11
|
-
// ../../src/components/ui/button.tsx
|
|
12
|
-
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
13
|
-
import { cva } from "class-variance-authority";
|
|
14
|
-
|
|
15
|
-
// ../../src/lib/utils.ts
|
|
16
|
-
import { cn } from "cn";
|
|
17
|
-
|
|
18
|
-
// ../../src/components/ui/button.tsx
|
|
19
|
-
import { jsx } from "react/jsx-runtime";
|
|
20
|
-
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", {
|
|
21
|
-
variants: {
|
|
22
|
-
variant: {
|
|
23
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
24
|
-
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",
|
|
25
|
-
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",
|
|
26
|
-
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
27
|
-
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",
|
|
28
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
29
|
-
},
|
|
30
|
-
size: {
|
|
31
|
-
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",
|
|
32
|
-
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",
|
|
33
|
-
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",
|
|
34
|
-
lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
35
|
-
icon: "size-9",
|
|
36
|
-
"icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
37
|
-
"icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
|
|
38
|
-
"icon-lg": "size-10"
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
defaultVariants: {
|
|
42
|
-
variant: "default",
|
|
43
|
-
size: "default"
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
function Button({
|
|
47
|
-
className,
|
|
48
|
-
variant = "default",
|
|
49
|
-
size = "default",
|
|
50
|
-
...props
|
|
51
|
-
}) {
|
|
52
|
-
return /* @__PURE__ */ jsx(ButtonPrimitive, {
|
|
53
|
-
"data-slot": "button",
|
|
54
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
55
|
-
...props
|
|
56
|
-
});
|
|
57
|
-
}
|
|
10
|
+
import { Button as Button2, buttonVariants } from "@/components/ui/button";
|
|
58
11
|
|
|
59
12
|
// ../../src/components/copy-button/react.tsx
|
|
13
|
+
import { Button } from "@/components/ui/button";
|
|
60
14
|
import { Check, Copy, TriangleAlert } from "lucide-react";
|
|
61
15
|
import { Redacted as Redacted2 } from "effect";
|
|
62
16
|
import { Component as Component2 } from "effect/ui";
|
|
@@ -159,7 +113,7 @@ var copyButtonStatus = (status, copy, description) => {
|
|
|
159
113
|
};
|
|
160
114
|
|
|
161
115
|
// ../../src/components/copy-button/react.tsx
|
|
162
|
-
import { jsx
|
|
116
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
163
117
|
"use client";
|
|
164
118
|
function CopyButton({
|
|
165
119
|
value,
|
|
@@ -217,22 +171,22 @@ function CopyButton({
|
|
|
217
171
|
size: size ?? defaultSize,
|
|
218
172
|
...props,
|
|
219
173
|
children: [
|
|
220
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ jsx("span", {
|
|
221
175
|
"aria-live": "polite",
|
|
222
176
|
className: "sr-only",
|
|
223
177
|
role: "status",
|
|
224
178
|
children: copyButtonStatus(status, labels, valueDescription)
|
|
225
179
|
}),
|
|
226
|
-
status === "copied" ? /* @__PURE__ */
|
|
180
|
+
status === "copied" ? /* @__PURE__ */ jsx(Check, {
|
|
227
181
|
"aria-hidden": "true"
|
|
228
182
|
}) : null,
|
|
229
|
-
status === "failed" ? /* @__PURE__ */
|
|
183
|
+
status === "failed" ? /* @__PURE__ */ jsx(TriangleAlert, {
|
|
230
184
|
"aria-hidden": "true"
|
|
231
185
|
}) : null,
|
|
232
|
-
status === "idle" ? /* @__PURE__ */
|
|
186
|
+
status === "idle" ? /* @__PURE__ */ jsx(Copy, {
|
|
233
187
|
"aria-hidden": "true"
|
|
234
188
|
}) : null,
|
|
235
|
-
isLarge ? /* @__PURE__ */
|
|
189
|
+
isLarge ? /* @__PURE__ */ jsx("span", {
|
|
236
190
|
children: labels.copy
|
|
237
191
|
}) : null
|
|
238
192
|
]
|
|
@@ -242,77 +196,19 @@ function CopyButton({
|
|
|
242
196
|
// ../../src/components/ui/copy-button.tsx
|
|
243
197
|
"use client";
|
|
244
198
|
|
|
245
|
-
// ../../src/components/
|
|
246
|
-
import {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
199
|
+
// ../../src/components/error-component/react.tsx
|
|
200
|
+
import { Textarea } from "@/components/ui/textarea";
|
|
201
|
+
import {
|
|
202
|
+
Empty,
|
|
203
|
+
EmptyContent,
|
|
204
|
+
EmptyDescription,
|
|
205
|
+
EmptyHeader,
|
|
206
|
+
EmptyMedia,
|
|
207
|
+
EmptyTitle
|
|
208
|
+
} from "@/components/ui/empty";
|
|
254
209
|
|
|
255
|
-
// ../../src/
|
|
256
|
-
import {
|
|
257
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
258
|
-
function Empty({ className, ...props }) {
|
|
259
|
-
return /* @__PURE__ */ jsx4("div", {
|
|
260
|
-
"data-slot": "empty",
|
|
261
|
-
className: cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-lg border-dashed p-12 text-center text-balance", className),
|
|
262
|
-
...props
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
function EmptyHeader({ className, ...props }) {
|
|
266
|
-
return /* @__PURE__ */ jsx4("div", {
|
|
267
|
-
"data-slot": "empty-header",
|
|
268
|
-
className: cn("flex max-w-sm flex-col items-center gap-2", className),
|
|
269
|
-
...props
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
|
-
var emptyMediaVariants = cva2("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
273
|
-
variants: {
|
|
274
|
-
variant: {
|
|
275
|
-
default: "bg-transparent",
|
|
276
|
-
icon: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6"
|
|
277
|
-
}
|
|
278
|
-
},
|
|
279
|
-
defaultVariants: {
|
|
280
|
-
variant: "default"
|
|
281
|
-
}
|
|
282
|
-
});
|
|
283
|
-
function EmptyMedia({
|
|
284
|
-
className,
|
|
285
|
-
variant = "default",
|
|
286
|
-
...props
|
|
287
|
-
}) {
|
|
288
|
-
return /* @__PURE__ */ jsx4("div", {
|
|
289
|
-
"data-slot": "empty-icon",
|
|
290
|
-
"data-variant": variant,
|
|
291
|
-
className: cn(emptyMediaVariants({ variant, className })),
|
|
292
|
-
...props
|
|
293
|
-
});
|
|
294
|
-
}
|
|
295
|
-
function EmptyTitle({ className, ...props }) {
|
|
296
|
-
return /* @__PURE__ */ jsx4("div", {
|
|
297
|
-
"data-slot": "empty-title",
|
|
298
|
-
className: cn("text-lg font-medium tracking-tight", className),
|
|
299
|
-
...props
|
|
300
|
-
});
|
|
301
|
-
}
|
|
302
|
-
function EmptyDescription({ className, ...props }) {
|
|
303
|
-
return /* @__PURE__ */ jsx4("div", {
|
|
304
|
-
"data-slot": "empty-description",
|
|
305
|
-
className: cn("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
|
|
306
|
-
...props
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
function EmptyContent({ className, ...props }) {
|
|
310
|
-
return /* @__PURE__ */ jsx4("div", {
|
|
311
|
-
"data-slot": "empty-content",
|
|
312
|
-
className: cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance", className),
|
|
313
|
-
...props
|
|
314
|
-
});
|
|
315
|
-
}
|
|
210
|
+
// ../../src/lib/utils.ts
|
|
211
|
+
import { cn } from "cn";
|
|
316
212
|
|
|
317
213
|
// ../../src/components/error-component/react.tsx
|
|
318
214
|
import { useKrakstackLocale as useKrakstackLocale2 } from "@krak-stack/registry/krakstack-provider/react";
|
|
@@ -468,7 +364,7 @@ var update2 = Component3.define(errorComponentOptions).update({
|
|
|
468
364
|
});
|
|
469
365
|
|
|
470
366
|
// ../../src/components/error-component/react.tsx
|
|
471
|
-
import { jsx as
|
|
367
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
472
368
|
var TraceId = Schema5.String.check(Schema5.isPattern(/^(?!0+$)(?:[a-f0-9]{16}|[a-f0-9]{32})$/i)).annotate({ identifier: "ErrorTraceId" });
|
|
473
369
|
var decodeTraceId = Schema5.decodeUnknownOption(TraceId);
|
|
474
370
|
var getErrorTraceId = (error) => {
|
|
@@ -512,22 +408,22 @@ var ErrorComponent = ({
|
|
|
512
408
|
}, labels, locale, reportedAt);
|
|
513
409
|
const [copyResult, setCopyResult] = useState2(null);
|
|
514
410
|
const copyStatus = copyResult?.report === report ? copyResult.status : undefined;
|
|
515
|
-
return /* @__PURE__ */
|
|
411
|
+
return /* @__PURE__ */ jsx2("main", {
|
|
516
412
|
className: cn("flex min-h-[60vh] items-center justify-center p-6", className),
|
|
517
413
|
children: /* @__PURE__ */ jsxs2(Empty, {
|
|
518
414
|
children: [
|
|
519
415
|
/* @__PURE__ */ jsxs2(EmptyHeader, {
|
|
520
416
|
children: [
|
|
521
|
-
/* @__PURE__ */
|
|
417
|
+
/* @__PURE__ */ jsx2(EmptyMedia, {
|
|
522
418
|
variant: "icon",
|
|
523
|
-
children: /* @__PURE__ */
|
|
419
|
+
children: /* @__PURE__ */ jsx2(CircleAlert, {})
|
|
524
420
|
}),
|
|
525
|
-
/* @__PURE__ */
|
|
526
|
-
children: /* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ jsx2(EmptyTitle, {
|
|
422
|
+
children: /* @__PURE__ */ jsx2("h1", {
|
|
527
423
|
children: labels.title
|
|
528
424
|
})
|
|
529
425
|
}),
|
|
530
|
-
/* @__PURE__ */
|
|
426
|
+
/* @__PURE__ */ jsx2(EmptyDescription, {
|
|
531
427
|
children: errorMessage
|
|
532
428
|
})
|
|
533
429
|
]
|
|
@@ -537,16 +433,16 @@ var ErrorComponent = ({
|
|
|
537
433
|
/* @__PURE__ */ jsxs2("div", {
|
|
538
434
|
className: errorComponentClasses.actions,
|
|
539
435
|
children: [
|
|
540
|
-
retryable && /* @__PURE__ */ jsxs2(
|
|
436
|
+
retryable && /* @__PURE__ */ jsxs2(Button2, {
|
|
541
437
|
onClick: () => window.location.reload(),
|
|
542
438
|
children: [
|
|
543
|
-
/* @__PURE__ */
|
|
439
|
+
/* @__PURE__ */ jsx2(RefreshCw, {
|
|
544
440
|
"data-icon": "inline-start"
|
|
545
441
|
}),
|
|
546
442
|
labels.retry
|
|
547
443
|
]
|
|
548
444
|
}),
|
|
549
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ jsx2(Link, {
|
|
550
446
|
to: "/",
|
|
551
447
|
className: cn(buttonVariants({ variant: "outline" })),
|
|
552
448
|
children: labels.home
|
|
@@ -554,7 +450,7 @@ var ErrorComponent = ({
|
|
|
554
450
|
renderFeedback?.(report)
|
|
555
451
|
]
|
|
556
452
|
}),
|
|
557
|
-
/* @__PURE__ */
|
|
453
|
+
/* @__PURE__ */ jsx2(CopyButton, {
|
|
558
454
|
value: report,
|
|
559
455
|
copyVariant: "large",
|
|
560
456
|
locale,
|
|
@@ -569,10 +465,10 @@ var ErrorComponent = ({
|
|
|
569
465
|
onCopied: () => setCopyResult({ report, status: "copied" }),
|
|
570
466
|
onCopyError: () => setCopyResult({ report, status: "failed" })
|
|
571
467
|
}),
|
|
572
|
-
copyStatus === "failed" && /* @__PURE__ */
|
|
468
|
+
copyStatus === "failed" && /* @__PURE__ */ jsx2("p", {
|
|
573
469
|
children: labels.copyFailed
|
|
574
470
|
}),
|
|
575
|
-
copyStatus === "failed" && /* @__PURE__ */
|
|
471
|
+
copyStatus === "failed" && /* @__PURE__ */ jsx2(Textarea, {
|
|
576
472
|
"aria-label": labels.details,
|
|
577
473
|
readOnly: true,
|
|
578
474
|
value: report,
|
|
@@ -2,47 +2,13 @@
|
|
|
2
2
|
import { Effect, Redacted as Redacted2, Schema as Schema3, Stream } from "effect";
|
|
3
3
|
import { Component as Component2, Mount } from "effect/ui";
|
|
4
4
|
import { Html } from "effect/ui/html";
|
|
5
|
-
|
|
6
|
-
// ../../src/components/effectcn/button.ts
|
|
5
|
+
import { Button, buttonVariants } from "@/components/effectcn/button";
|
|
7
6
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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/file-drop.ts
|
|
40
|
-
var fileDropZoneClass = "group flex w-full flex-col items-center justify-center gap-1.5 rounded-lg border border-dashed border-input " + "bg-background px-6 py-8 text-center transition-colors duration-150 " + "data-[drag-over]:border-primary data-[drag-over]:bg-primary/5 " + "data-[disabled]:cursor-not-allowed data-[disabled]:bg-muted data-[disabled]:opacity-60";
|
|
41
|
-
var FileDropIcon = (h) => h.span.class("mb-1 inline-grid size-9 place-items-center rounded-full bg-muted text-muted-foreground " + "group-data-[drag-over]:text-primary [&_svg]:size-4.5");
|
|
42
|
-
var FileDropTitle = (h) => h.p.class("m-0 text-[13px] font-medium text-foreground");
|
|
43
|
-
var FileDropHint = (h, options = {}) => h.p.class(cn("text-muted-foreground m-0 text-xs", options.class));
|
|
44
|
-
|
|
45
|
-
// ../../src/components/file-input/html.ts
|
|
7
|
+
FileDropHint,
|
|
8
|
+
FileDropIcon,
|
|
9
|
+
FileDropTitle,
|
|
10
|
+
fileDropZoneClass
|
|
11
|
+
} from "@/components/effectcn/file-drop";
|
|
46
12
|
import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
|
|
47
13
|
import {
|
|
48
14
|
CloudUpload as UploadIcon,
|
|
@@ -52,6 +18,9 @@ import {
|
|
|
52
18
|
Trash2 as DeleteIcon
|
|
53
19
|
} from "@krak-stack/registry/lucide-effect";
|
|
54
20
|
|
|
21
|
+
// ../../src/lib/utils.ts
|
|
22
|
+
import { cn } from "cn";
|
|
23
|
+
|
|
55
24
|
// ../../src/components/file-input/classes.ts
|
|
56
25
|
var fileInputClasses = {
|
|
57
26
|
root: "grid min-w-0 gap-3"
|