@devalok/shilp-sutra 0.30.0 → 0.32.0
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/README.md +82 -239
- package/dist/_chunks/badge-group.js +123 -171
- package/dist/_chunks/document-preview.js +92 -0
- package/dist/_chunks/file-preview.js +511 -0
- package/dist/_chunks/image-preview.js +90 -0
- package/dist/_chunks/primitives.js +109 -109
- package/dist/_chunks/stat-row.js +144 -124
- package/dist/_chunks/use-calendar.js +558 -490
- package/dist/ai/block-renderer.d.ts +2 -1
- package/dist/ai/block-renderer.d.ts.map +1 -1
- package/dist/ai/block-renderer.js +30 -29
- package/dist/ai/blocks/block-table.d.ts.map +1 -1
- package/dist/ai/blocks/confirm.d.ts.map +1 -1
- package/dist/ai/blocks/divider.d.ts.map +1 -1
- package/dist/ai/blocks/error.d.ts.map +1 -1
- package/dist/ai/blocks/info.d.ts.map +1 -1
- package/dist/ai/blocks/loading.d.ts.map +1 -1
- package/dist/ai/blocks/stat-row.d.ts.map +1 -1
- package/dist/ai/blocks/success.d.ts.map +1 -1
- package/dist/ai/blocks/text.d.ts.map +1 -1
- package/dist/ai/command-bar.d.ts +18 -0
- package/dist/ai/command-bar.d.ts.map +1 -1
- package/dist/ai/command-bar.js +126 -125
- package/dist/ai/conversation.d.ts +13 -1
- package/dist/ai/conversation.d.ts.map +1 -1
- package/dist/ai/conversation.js +78 -78
- package/dist/ai/types.d.ts +0 -1
- package/dist/ai/types.d.ts.map +1 -1
- package/dist/ai/types.js +1 -0
- package/dist/composed/bulk-action-bar.d.ts +6 -4
- package/dist/composed/bulk-action-bar.d.ts.map +1 -1
- package/dist/composed/bulk-action-bar.js +102 -58
- package/dist/composed/command-palette.d.ts +9 -0
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +68 -68
- package/dist/composed/confirm-dialog.d.ts +1 -1
- package/dist/composed/confirm-dialog.d.ts.map +1 -1
- package/dist/composed/confirm-dialog.js +10 -10
- package/dist/composed/content-card.d.ts.map +1 -1
- package/dist/composed/date-picker/date-picker.d.ts +11 -1
- package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/month-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/year-picker.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.d.ts +1 -1
- package/dist/composed/deadline-indicator.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.js +39 -36
- package/dist/composed/emoji-picker.d.ts +6 -0
- package/dist/composed/emoji-picker.d.ts.map +1 -1
- package/dist/composed/emoji-picker.js +22 -20
- package/dist/composed/error-boundary.d.ts +21 -1
- package/dist/composed/error-boundary.d.ts.map +1 -1
- package/dist/composed/error-boundary.js +47 -32
- package/dist/composed/file-preview/audio-preview.d.ts +7 -0
- package/dist/composed/file-preview/audio-preview.d.ts.map +1 -0
- package/dist/composed/file-preview/document-preview.d.ts +7 -0
- package/dist/composed/file-preview/document-preview.d.ts.map +1 -0
- package/dist/composed/file-preview/embed-preview.d.ts +7 -0
- package/dist/composed/file-preview/embed-preview.d.ts.map +1 -0
- package/dist/composed/file-preview/image-preview.d.ts +7 -0
- package/dist/composed/file-preview/image-preview.d.ts.map +1 -0
- package/dist/composed/file-preview/shared.d.ts +20 -0
- package/dist/composed/file-preview/shared.d.ts.map +1 -0
- package/dist/composed/file-preview/video-preview.d.ts +6 -0
- package/dist/composed/file-preview/video-preview.d.ts.map +1 -0
- package/dist/composed/file-preview.d.ts.map +1 -1
- package/dist/composed/file-preview.js +10 -662
- package/dist/composed/filter-bar.d.ts +10 -2
- package/dist/composed/filter-bar.d.ts.map +1 -1
- package/dist/composed/filter-bar.js +42 -43
- package/dist/composed/form-section.d.ts +1 -1
- package/dist/composed/form-section.d.ts.map +1 -1
- package/dist/composed/form-section.js +22 -21
- package/dist/composed/index.d.ts +2 -2
- package/dist/composed/index.d.ts.map +1 -1
- package/dist/composed/index.js +58 -57
- package/dist/composed/inline-edit.d.ts +1 -1
- package/dist/composed/inline-edit.d.ts.map +1 -1
- package/dist/composed/inline-edit.js +33 -32
- package/dist/composed/lib/string-utils.d.ts.map +1 -1
- package/dist/composed/loading-skeleton.d.ts.map +1 -1
- package/dist/composed/markdown-viewer.d.ts +1 -1
- package/dist/composed/markdown-viewer.d.ts.map +1 -1
- package/dist/composed/markdown-viewer.js +60 -59
- package/dist/composed/master-detail.d.ts +11 -7
- package/dist/composed/master-detail.d.ts.map +1 -1
- package/dist/composed/master-detail.js +123 -84
- package/dist/composed/page-header.d.ts.map +1 -1
- package/dist/composed/page-skeletons.d.ts.map +1 -1
- package/dist/composed/priority-indicator.d.ts +1 -0
- package/dist/composed/priority-indicator.js +1 -0
- package/dist/composed/responsive-overlay.d.ts +8 -0
- package/dist/composed/responsive-overlay.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.d.ts +11 -3
- package/dist/composed/rich-text-editor.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.js +21 -20
- package/dist/composed/schedule-view.d.ts +9 -1
- package/dist/composed/schedule-view.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +8 -4
- package/dist/hooks/use-touch-device.d.ts +12 -0
- package/dist/hooks/use-touch-device.d.ts.map +1 -0
- package/dist/hooks/use-touch-device.js +13 -0
- package/dist/hooks/use-viewport-height.d.ts +11 -0
- package/dist/hooks/use-viewport-height.d.ts.map +1 -0
- package/dist/hooks/use-viewport-height.js +16 -0
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +72 -63
- package/dist/shell/command-registry.d.ts.map +1 -1
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +77 -77
- package/dist/shell/top-bar.d.ts +2 -2
- package/dist/shell/top-bar.d.ts.map +1 -1
- package/dist/shell/top-bar.js +61 -60
- package/dist/tailwind/index.cjs +51 -7
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +51 -7
- package/dist/tokens/primitives.css +3 -1
- package/dist/tokens/semantic.css +16 -13
- package/dist/tokens/typography.css +33 -4
- package/dist/ui/alert.d.ts +1 -0
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +42 -37
- package/dist/ui/autocomplete.d.ts.map +1 -1
- package/dist/ui/autocomplete.js +38 -39
- package/dist/ui/badge.d.ts +110 -2
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/banner.js +8 -7
- package/dist/ui/button.d.ts +2 -2
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +54 -74
- package/dist/ui/card.d.ts +5 -1
- package/dist/ui/card.d.ts.map +1 -1
- package/dist/ui/card.js +111 -79
- package/dist/ui/charts/area-chart.d.ts +2 -0
- package/dist/ui/charts/area-chart.d.ts.map +1 -1
- package/dist/ui/charts/bar-chart.d.ts +2 -0
- package/dist/ui/charts/bar-chart.d.ts.map +1 -1
- package/dist/ui/charts/chart-container.d.ts +2 -0
- package/dist/ui/charts/chart-container.d.ts.map +1 -1
- package/dist/ui/charts/index.js +583 -577
- package/dist/ui/charts/line-chart.d.ts +2 -0
- package/dist/ui/charts/line-chart.d.ts.map +1 -1
- package/dist/ui/charts/pie-chart.d.ts +2 -0
- package/dist/ui/charts/pie-chart.d.ts.map +1 -1
- package/dist/ui/charts/radar-chart.d.ts +2 -0
- package/dist/ui/charts/radar-chart.d.ts.map +1 -1
- package/dist/ui/checkbox.d.ts +2 -0
- package/dist/ui/checkbox.d.ts.map +1 -1
- package/dist/ui/checkbox.js +36 -27
- package/dist/ui/code.d.ts.map +1 -1
- package/dist/ui/color-input.js +5 -5
- package/dist/ui/combobox.d.ts +6 -1
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +1 -1
- package/dist/ui/container.d.ts.map +1 -1
- package/dist/ui/context-menu.js +1 -1
- package/dist/ui/data-table-body.d.ts +12 -0
- package/dist/ui/data-table-body.d.ts.map +1 -0
- package/dist/ui/data-table-body.js +219 -0
- package/dist/ui/data-table-bulk-actions.d.ts +19 -0
- package/dist/ui/data-table-bulk-actions.d.ts.map +1 -0
- package/dist/ui/data-table-bulk-actions.js +61 -0
- package/dist/ui/data-table-card.d.ts +9 -0
- package/dist/ui/data-table-card.d.ts.map +1 -0
- package/dist/ui/data-table-card.js +73 -0
- package/dist/ui/data-table-context.d.ts +62 -0
- package/dist/ui/data-table-context.d.ts.map +1 -0
- package/dist/ui/data-table-context.js +48 -0
- package/dist/ui/data-table-header.d.ts +10 -0
- package/dist/ui/data-table-header.d.ts.map +1 -0
- package/dist/ui/data-table-header.js +141 -0
- package/dist/ui/data-table-pagination.d.ts +13 -0
- package/dist/ui/data-table-pagination.d.ts.map +1 -0
- package/dist/ui/data-table-pagination.js +84 -0
- package/dist/ui/data-table.d.ts +11 -9
- package/dist/ui/data-table.d.ts.map +1 -1
- package/dist/ui/data-table.js +258 -573
- package/dist/ui/dialog.d.ts +6 -2
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +84 -82
- package/dist/ui/dropdown-menu.js +1 -1
- package/dist/ui/hover-card.d.ts +7 -0
- package/dist/ui/hover-card.d.ts.map +1 -1
- package/dist/ui/hover-card.js +3 -3
- package/dist/ui/icon-group.d.ts +2 -4
- package/dist/ui/icon-group.d.ts.map +1 -1
- package/dist/ui/icon-group.js +22 -23
- package/dist/ui/index.d.ts +1 -2
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +94 -99
- package/dist/ui/label.js +1 -1
- package/dist/ui/lib/bottom-sheet.d.ts +16 -0
- package/dist/ui/lib/bottom-sheet.d.ts.map +1 -0
- package/dist/ui/lib/date-utils.d.ts.map +1 -1
- package/dist/ui/lib/motion.d.ts.map +1 -1
- package/dist/ui/lib/utils.d.ts.map +1 -1
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +64 -73
- package/dist/ui/navigation-menu.d.ts.map +1 -1
- package/dist/ui/navigation-menu.js +40 -44
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js +19 -17
- package/dist/ui/popover.d.ts.map +1 -1
- package/dist/ui/popover.js +107 -32
- package/dist/ui/progress-ring.d.ts.map +1 -1
- package/dist/ui/progress-ring.js +80 -80
- package/dist/ui/progress.js +4 -4
- package/dist/ui/radio.d.ts +5 -2
- package/dist/ui/radio.d.ts.map +1 -1
- package/dist/ui/radio.js +29 -20
- package/dist/ui/search-input.d.ts.map +1 -1
- package/dist/ui/search-input.js +13 -12
- package/dist/ui/segmented-control.d.ts +6 -108
- package/dist/ui/segmented-control.d.ts.map +1 -1
- package/dist/ui/segmented-control.js +86 -272
- package/dist/ui/select.d.ts +3 -1
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +83 -71
- package/dist/ui/separator.js +5 -5
- package/dist/ui/sheet.d.ts +2 -0
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +102 -84
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +200 -175
- package/dist/ui/skeleton.d.ts.map +1 -1
- package/dist/ui/slider.js +14 -14
- package/dist/ui/stack.d.ts.map +1 -1
- package/dist/ui/status-dot.js +8 -8
- package/dist/ui/stepper.d.ts.map +1 -1
- package/dist/ui/stepper.js +33 -31
- package/dist/ui/switch.js +3 -3
- package/dist/ui/table.d.ts.map +1 -1
- package/dist/ui/tabs.d.ts +7 -0
- package/dist/ui/tabs.d.ts.map +1 -1
- package/dist/ui/tabs.js +102 -76
- package/dist/ui/text.d.ts.map +1 -1
- package/dist/ui/toast-types.d.ts +0 -1
- package/dist/ui/toast-types.d.ts.map +1 -1
- package/dist/ui/toast-types.js +0 -1
- package/dist/ui/toast.d.ts.map +1 -1
- package/dist/ui/toast.js +156 -150
- package/dist/ui/toggle-group.js +1 -1
- package/dist/ui/toggle.js +1 -1
- package/dist/ui/tooltip.js +3 -3
- package/dist/ui/visually-hidden.d.ts.map +1 -1
- package/docs/components/ui/alert.md +3 -0
- package/docs/components/ui/badge.md +3 -0
- package/docs/components/ui/card.md +4 -0
- package/docs/components/ui/data-table-body.md +13 -0
- package/docs/components/ui/data-table-bulk-actions.md +13 -0
- package/docs/components/ui/data-table-card.md +13 -0
- package/docs/components/ui/data-table-context.md +13 -0
- package/docs/components/ui/data-table-header.md +13 -0
- package/docs/components/ui/data-table-pagination.md +13 -0
- package/docs/components/ui/select.md +4 -0
- package/docs/components/ui/tabs.md +4 -0
- package/llms-full.txt +97 -48
- package/llms.txt +46 -1
- package/package.json +37 -7
- package/dist/ui/chip.d.ts +0 -19
- package/dist/ui/chip.d.ts.map +0 -1
- package/dist/ui/chip.js +0 -14
- package/dist/ui/lib/use-ripple.d.ts +0 -14
- package/dist/ui/lib/use-ripple.d.ts.map +0 -1
package/dist/_chunks/stat-row.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as e, jsxs as
|
|
2
|
+
import { jsx as e, jsxs as m } from "react/jsx-runtime";
|
|
3
3
|
import * as a from "react";
|
|
4
4
|
import L from "react-markdown";
|
|
5
|
-
import
|
|
5
|
+
import E from "remark-gfm";
|
|
6
6
|
import { cn as p } from "../ui/lib/utils.js";
|
|
7
|
-
import { springs as
|
|
7
|
+
import { springs as U, tweens as P } from "../ui/lib/motion.js";
|
|
8
8
|
import { u as y } from "./motion-provider.js";
|
|
9
9
|
import { Table as j, TableCaption as W, TableHeader as X, TableRow as _, TableHead as $, TableBody as H, TableCell as O } from "../ui/table.js";
|
|
10
|
-
import { B as
|
|
10
|
+
import { B as R } from "./badge-group.js";
|
|
11
11
|
import { m as x } from "./framer.js";
|
|
12
|
-
import { Button as
|
|
13
|
-
import { Collapsible as V, CollapsibleTrigger as
|
|
14
|
-
import { Alert as
|
|
15
|
-
import { IconCircle as
|
|
12
|
+
import { Button as B } from "../ui/button.js";
|
|
13
|
+
import { Collapsible as V, CollapsibleTrigger as K, CollapsibleContent as F } from "../ui/collapsible.js";
|
|
14
|
+
import { Alert as S } from "../ui/alert.js";
|
|
15
|
+
import { IconCircle as G, IconCircleX as q, IconCircleCheck as J } from "@tabler/icons-react";
|
|
16
16
|
import { Icon as C } from "../ui/icon.js";
|
|
17
17
|
import { Skeleton as Q } from "../ui/skeleton.js";
|
|
18
|
-
import { Separator as
|
|
19
|
-
import { StatCard as
|
|
20
|
-
const
|
|
18
|
+
import { Separator as D } from "../ui/separator.js";
|
|
19
|
+
import { StatCard as M } from "../ui/stat-card.js";
|
|
20
|
+
const Y = a.memo(function({
|
|
21
21
|
data: r,
|
|
22
22
|
confidence: t
|
|
23
23
|
}) {
|
|
@@ -33,39 +33,40 @@ const ve = a.memo(function({
|
|
|
33
33
|
"prose-strong:text-surface-fg",
|
|
34
34
|
t === "low" && "border-l-2 border-warning-7 pl-3"
|
|
35
35
|
),
|
|
36
|
-
children: /* @__PURE__ */ e(L, { remarkPlugins: [
|
|
36
|
+
children: /* @__PURE__ */ e(L, { remarkPlugins: [E], children: r.content })
|
|
37
37
|
}
|
|
38
38
|
);
|
|
39
39
|
});
|
|
40
|
-
|
|
40
|
+
Y.displayName = "TextBlock";
|
|
41
|
+
function Z(s, r) {
|
|
41
42
|
if (r.variant === "badge") {
|
|
42
43
|
if (s && typeof s == "object" && "label" in s) {
|
|
43
44
|
const t = s;
|
|
44
|
-
return /* @__PURE__ */ e(
|
|
45
|
+
return /* @__PURE__ */ e(R, { variant: "subtle", size: "sm", color: t.color, children: t.label });
|
|
45
46
|
}
|
|
46
|
-
return /* @__PURE__ */ e(
|
|
47
|
+
return /* @__PURE__ */ e(R, { variant: "subtle", size: "sm", children: String(s ?? "") });
|
|
47
48
|
}
|
|
48
49
|
return String(s ?? "");
|
|
49
50
|
}
|
|
50
|
-
function
|
|
51
|
-
return !r || !t ? s : [...s].sort((
|
|
52
|
-
const
|
|
51
|
+
function A(s, r, t) {
|
|
52
|
+
return !r || !t ? s : [...s].sort((l, n) => {
|
|
53
|
+
const d = l[r], o = n[r], u = String(d ?? ""), k = String(o ?? ""), f = Number(d), g = Number(o);
|
|
53
54
|
if (!Number.isNaN(f) && !Number.isNaN(g))
|
|
54
55
|
return t === "asc" ? f - g : g - f;
|
|
55
|
-
const
|
|
56
|
-
return t === "asc" ?
|
|
56
|
+
const i = u.localeCompare(k);
|
|
57
|
+
return t === "asc" ? i : -i;
|
|
57
58
|
});
|
|
58
59
|
}
|
|
59
|
-
const
|
|
60
|
+
const ee = a.memo(function({
|
|
60
61
|
data: r,
|
|
61
62
|
confidence: t
|
|
62
63
|
}) {
|
|
63
|
-
const { reducedMotion:
|
|
64
|
-
(
|
|
65
|
-
r.sortable && (n !==
|
|
64
|
+
const { reducedMotion: l } = y(), [n, d] = a.useState(null), [o, u] = a.useState(null), k = a.useCallback(
|
|
65
|
+
(i) => {
|
|
66
|
+
r.sortable && (n !== i ? (d(i), u("asc")) : o === "asc" ? u("desc") : o === "desc" && (d(null), u(null)));
|
|
66
67
|
},
|
|
67
|
-
[r.sortable, n,
|
|
68
|
-
), f = r.columns ?? [], g =
|
|
68
|
+
[r.sortable, n, o]
|
|
69
|
+
), f = r.columns ?? [], g = A(r.rows ?? [], n, o);
|
|
69
70
|
return /* @__PURE__ */ e(
|
|
70
71
|
"div",
|
|
71
72
|
{
|
|
@@ -73,36 +74,41 @@ const ke = a.memo(function({
|
|
|
73
74
|
"overflow-x-auto",
|
|
74
75
|
t === "low" && "border-l-2 border-warning-7 pl-3"
|
|
75
76
|
),
|
|
76
|
-
children: /* @__PURE__ */
|
|
77
|
+
children: /* @__PURE__ */ m(j, { children: [
|
|
77
78
|
r.caption && /* @__PURE__ */ e(W, { children: r.caption }),
|
|
78
|
-
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(_, { children: f.map((
|
|
79
|
-
const h = n ===
|
|
79
|
+
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(_, { children: f.map((i) => {
|
|
80
|
+
const h = n === i.key, v = r.sortable ? h ? o === "asc" ? "ascending" : "descending" : "none" : void 0;
|
|
80
81
|
return /* @__PURE__ */ e(
|
|
81
82
|
$,
|
|
82
83
|
{
|
|
84
|
+
role: "columnheader",
|
|
83
85
|
className: p(
|
|
84
|
-
|
|
86
|
+
i.variant === "number" && "text-right",
|
|
85
87
|
r.sortable && "cursor-pointer select-none"
|
|
86
88
|
),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
tabIndex: r.sortable ? 0 : void 0,
|
|
90
|
+
onClick: r.sortable ? () => k(i.key) : void 0,
|
|
91
|
+
onKeyDown: r.sortable ? (c) => {
|
|
92
|
+
(c.key === "Enter" || c.key === " ") && (c.preventDefault(), k(i.key));
|
|
93
|
+
} : void 0,
|
|
94
|
+
"aria-sort": v,
|
|
95
|
+
children: /* @__PURE__ */ m("span", { className: "inline-flex items-center gap-1", children: [
|
|
96
|
+
i.label,
|
|
97
|
+
h && o === "asc" && /* @__PURE__ */ e("span", { "aria-hidden": "true", children: "▲" }),
|
|
98
|
+
h && o === "desc" && /* @__PURE__ */ e("span", { "aria-hidden": "true", children: "▼" })
|
|
93
99
|
] })
|
|
94
100
|
},
|
|
95
|
-
|
|
101
|
+
i.key
|
|
96
102
|
);
|
|
97
103
|
}) }) }),
|
|
98
|
-
/* @__PURE__ */ e(H, { children: g.map((
|
|
99
|
-
const
|
|
104
|
+
/* @__PURE__ */ e(H, { children: g.map((i, h) => {
|
|
105
|
+
const v = typeof i.id == "string" || typeof i.id == "number" ? String(i.id) : `row-${h}`, c = l ? "tr" : x.tr, N = l ? {} : {
|
|
100
106
|
initial: { opacity: 0, y: 6 },
|
|
101
107
|
animate: { opacity: 1, y: 0 },
|
|
102
|
-
transition: { ...
|
|
108
|
+
transition: { ...U.responsive, delay: h * 0.03 }
|
|
103
109
|
};
|
|
104
110
|
return /* @__PURE__ */ e(
|
|
105
|
-
|
|
111
|
+
c,
|
|
106
112
|
{
|
|
107
113
|
className: "hover:bg-surface-raised-hover transition-colors",
|
|
108
114
|
...N,
|
|
@@ -113,28 +119,30 @@ const ke = a.memo(function({
|
|
|
113
119
|
"text-ds-sm py-ds-02b px-ds-04",
|
|
114
120
|
b.variant === "number" && "text-right tabular-nums font-medium"
|
|
115
121
|
),
|
|
116
|
-
children:
|
|
122
|
+
children: Z(i[b.key], b)
|
|
117
123
|
},
|
|
118
124
|
b.key
|
|
119
125
|
))
|
|
120
126
|
},
|
|
121
|
-
|
|
127
|
+
v
|
|
122
128
|
);
|
|
123
129
|
}) })
|
|
124
130
|
] })
|
|
125
131
|
}
|
|
126
132
|
);
|
|
127
|
-
})
|
|
133
|
+
});
|
|
134
|
+
ee.displayName = "BlockTable";
|
|
135
|
+
const re = a.memo(function({
|
|
128
136
|
data: r,
|
|
129
137
|
confidence: t,
|
|
130
|
-
onAction:
|
|
138
|
+
onAction: l
|
|
131
139
|
}) {
|
|
132
140
|
const n = a.useCallback(() => {
|
|
133
|
-
|
|
134
|
-
}, [r.actionId,
|
|
135
|
-
|
|
136
|
-
}, [r.actionId,
|
|
137
|
-
return /* @__PURE__ */
|
|
141
|
+
l?.(r.actionId, "confirm");
|
|
142
|
+
}, [r.actionId, l]), d = a.useCallback(() => {
|
|
143
|
+
l?.(r.actionId, "cancel");
|
|
144
|
+
}, [r.actionId, l]);
|
|
145
|
+
return /* @__PURE__ */ m(
|
|
138
146
|
"div",
|
|
139
147
|
{
|
|
140
148
|
className: p(
|
|
@@ -142,9 +150,9 @@ const ke = a.memo(function({
|
|
|
142
150
|
),
|
|
143
151
|
children: [
|
|
144
152
|
r.description && /* @__PURE__ */ e("p", { className: "text-ds-sm text-surface-fg-muted mb-3", children: r.description }),
|
|
145
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ m("div", { className: "flex items-center gap-3", children: [
|
|
146
154
|
/* @__PURE__ */ e(
|
|
147
|
-
|
|
155
|
+
B,
|
|
148
156
|
{
|
|
149
157
|
variant: "solid",
|
|
150
158
|
color: r.destructive ? "error" : void 0,
|
|
@@ -152,10 +160,10 @@ const ke = a.memo(function({
|
|
|
152
160
|
children: r.label
|
|
153
161
|
}
|
|
154
162
|
),
|
|
155
|
-
/* @__PURE__ */ e(
|
|
163
|
+
/* @__PURE__ */ e(B, { variant: "ghost", onClick: d, children: "Cancel" })
|
|
156
164
|
] }),
|
|
157
|
-
r.rationale && /* @__PURE__ */
|
|
158
|
-
/* @__PURE__ */ e(
|
|
165
|
+
r.rationale && /* @__PURE__ */ m(V, { className: "mt-3", children: [
|
|
166
|
+
/* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ e(
|
|
159
167
|
"button",
|
|
160
168
|
{
|
|
161
169
|
type: "button",
|
|
@@ -163,40 +171,42 @@ const ke = a.memo(function({
|
|
|
163
171
|
children: "Why this action?"
|
|
164
172
|
}
|
|
165
173
|
) }),
|
|
166
|
-
/* @__PURE__ */ e(
|
|
174
|
+
/* @__PURE__ */ e(F, { children: /* @__PURE__ */ e("p", { className: "text-ds-sm text-surface-fg-muted mt-2 p-3 bg-surface-raised rounded-ds-lg", children: r.rationale }) })
|
|
167
175
|
] })
|
|
168
176
|
]
|
|
169
177
|
}
|
|
170
178
|
);
|
|
171
|
-
})
|
|
179
|
+
});
|
|
180
|
+
re.displayName = "ConfirmBlock";
|
|
181
|
+
const ne = 5e3, te = a.memo(function({
|
|
172
182
|
data: r,
|
|
173
183
|
blockId: t,
|
|
174
|
-
confidence:
|
|
184
|
+
confidence: l,
|
|
175
185
|
onAction: n
|
|
176
186
|
}) {
|
|
177
|
-
const { reducedMotion:
|
|
187
|
+
const { reducedMotion: d } = y(), o = d, u = r.undoTimeout ?? ne, [k, f] = a.useState(u), [g, i] = a.useState(!!r.undoable);
|
|
178
188
|
a.useEffect(() => {
|
|
179
189
|
if (!r.undoable) return;
|
|
180
190
|
const T = setInterval(() => {
|
|
181
|
-
f((
|
|
182
|
-
const I =
|
|
183
|
-
return I <= 0 ? (clearInterval(T),
|
|
191
|
+
f((z) => {
|
|
192
|
+
const I = z - 100;
|
|
193
|
+
return I <= 0 ? (clearInterval(T), i(!1), 0) : I;
|
|
184
194
|
});
|
|
185
195
|
}, 100);
|
|
186
196
|
return () => clearInterval(T);
|
|
187
|
-
}, [r.undoable,
|
|
197
|
+
}, [r.undoable, u]);
|
|
188
198
|
const h = a.useCallback(() => {
|
|
189
199
|
n?.(t || "unknown", "undo");
|
|
190
|
-
}, [t, n]),
|
|
191
|
-
return /* @__PURE__ */
|
|
200
|
+
}, [t, n]), v = Math.ceil(k / 1e3), c = 20, N = 2, b = (c - N) / 2, w = 2 * Math.PI * b;
|
|
201
|
+
return /* @__PURE__ */ m(
|
|
192
202
|
"div",
|
|
193
203
|
{
|
|
194
204
|
className: p(
|
|
195
|
-
|
|
205
|
+
l === "low" && "border-l-2 border-warning-7 pl-3"
|
|
196
206
|
),
|
|
197
207
|
children: [
|
|
198
208
|
/* @__PURE__ */ e(
|
|
199
|
-
|
|
209
|
+
S,
|
|
200
210
|
{
|
|
201
211
|
color: "success",
|
|
202
212
|
variant: "subtle",
|
|
@@ -205,27 +215,27 @@ const ke = a.memo(function({
|
|
|
205
215
|
}
|
|
206
216
|
),
|
|
207
217
|
g && r.undoable && /* @__PURE__ */ e("div", { className: "mt-2 flex items-center gap-2", children: /* @__PURE__ */ e(
|
|
208
|
-
|
|
218
|
+
B,
|
|
209
219
|
{
|
|
210
220
|
variant: "ghost",
|
|
211
221
|
size: "sm",
|
|
212
222
|
onClick: h,
|
|
213
|
-
"aria-label": `Undo action, ${
|
|
214
|
-
children: /* @__PURE__ */
|
|
215
|
-
/* @__PURE__ */
|
|
223
|
+
"aria-label": `Undo action, ${v} seconds remaining`,
|
|
224
|
+
children: /* @__PURE__ */ m("span", { className: "flex items-center gap-1.5", children: [
|
|
225
|
+
/* @__PURE__ */ m(
|
|
216
226
|
"svg",
|
|
217
227
|
{
|
|
218
|
-
width:
|
|
219
|
-
height:
|
|
220
|
-
viewBox: `0 0 ${
|
|
228
|
+
width: c,
|
|
229
|
+
height: c,
|
|
230
|
+
viewBox: `0 0 ${c} ${c}`,
|
|
221
231
|
className: "shrink-0 -rotate-90",
|
|
222
232
|
"aria-hidden": "true",
|
|
223
233
|
children: [
|
|
224
234
|
/* @__PURE__ */ e(
|
|
225
235
|
"circle",
|
|
226
236
|
{
|
|
227
|
-
cx:
|
|
228
|
-
cy:
|
|
237
|
+
cx: c / 2,
|
|
238
|
+
cy: c / 2,
|
|
229
239
|
r: b,
|
|
230
240
|
fill: "none",
|
|
231
241
|
stroke: "currentColor",
|
|
@@ -236,19 +246,19 @@ const ke = a.memo(function({
|
|
|
236
246
|
/* @__PURE__ */ e(
|
|
237
247
|
x.circle,
|
|
238
248
|
{
|
|
239
|
-
cx:
|
|
240
|
-
cy:
|
|
249
|
+
cx: c / 2,
|
|
250
|
+
cy: c / 2,
|
|
241
251
|
r: b,
|
|
242
252
|
fill: "none",
|
|
243
253
|
stroke: "currentColor",
|
|
244
254
|
strokeWidth: N,
|
|
245
|
-
strokeDasharray:
|
|
246
|
-
initial:
|
|
255
|
+
strokeDasharray: w,
|
|
256
|
+
initial: o ? void 0 : { strokeDashoffset: 0 },
|
|
247
257
|
animate: {
|
|
248
|
-
strokeDashoffset:
|
|
258
|
+
strokeDashoffset: w
|
|
249
259
|
},
|
|
250
|
-
transition:
|
|
251
|
-
duration:
|
|
260
|
+
transition: o ? { duration: 0 } : {
|
|
261
|
+
duration: u / 1e3,
|
|
252
262
|
ease: "linear"
|
|
253
263
|
}
|
|
254
264
|
}
|
|
@@ -263,28 +273,33 @@ const ke = a.memo(function({
|
|
|
263
273
|
]
|
|
264
274
|
}
|
|
265
275
|
);
|
|
266
|
-
})
|
|
276
|
+
});
|
|
277
|
+
te.displayName = "SuccessBlock";
|
|
278
|
+
const se = a.memo(function({
|
|
267
279
|
data: r,
|
|
268
280
|
confidence: t
|
|
269
281
|
}) {
|
|
270
|
-
return /* @__PURE__ */
|
|
282
|
+
return /* @__PURE__ */ m(
|
|
271
283
|
"div",
|
|
272
284
|
{
|
|
273
285
|
className: p(
|
|
274
286
|
t === "low" && "border-l-2 border-warning-7 pl-3"
|
|
275
287
|
),
|
|
276
288
|
children: [
|
|
277
|
-
/* @__PURE__ */ e(
|
|
289
|
+
/* @__PURE__ */ e(S, { color: "error", variant: "subtle", title: r.title, children: /* @__PURE__ */ e("div", { className: "prose prose-sm", children: /* @__PURE__ */ e(L, { remarkPlugins: [E], children: r.message }) }) }),
|
|
278
290
|
r.suggestion && /* @__PURE__ */ e("p", { className: "mt-2 text-ds-sm text-surface-fg-muted", children: r.suggestion })
|
|
279
291
|
]
|
|
280
292
|
}
|
|
281
293
|
);
|
|
282
|
-
})
|
|
294
|
+
});
|
|
295
|
+
se.displayName = "ErrorBlock";
|
|
296
|
+
const oe = a.memo(function({
|
|
283
297
|
data: r
|
|
284
298
|
}) {
|
|
285
|
-
return /* @__PURE__ */ e(
|
|
299
|
+
return /* @__PURE__ */ e(S, { color: "info", variant: "subtle", role: "status", children: r.message });
|
|
286
300
|
});
|
|
287
|
-
|
|
301
|
+
oe.displayName = "InfoBlock";
|
|
302
|
+
function ie() {
|
|
288
303
|
return /* @__PURE__ */ e(
|
|
289
304
|
x.span,
|
|
290
305
|
{
|
|
@@ -296,25 +311,25 @@ function ee() {
|
|
|
296
311
|
}
|
|
297
312
|
);
|
|
298
313
|
}
|
|
299
|
-
function
|
|
314
|
+
function ae({ status: s }) {
|
|
300
315
|
switch (s) {
|
|
301
316
|
case "done":
|
|
302
317
|
return /* @__PURE__ */ e("span", { "data-testid": "step-icon-done", children: /* @__PURE__ */ e(C, { icon: J, size: "sm", className: "text-success-11" }) });
|
|
303
318
|
case "active":
|
|
304
|
-
return /* @__PURE__ */ e(
|
|
319
|
+
return /* @__PURE__ */ e(ie, {});
|
|
305
320
|
case "error":
|
|
306
321
|
return /* @__PURE__ */ e("span", { "data-testid": "step-icon-error", children: /* @__PURE__ */ e(C, { icon: q, size: "sm", className: "text-error-11" }) });
|
|
307
322
|
default:
|
|
308
|
-
return /* @__PURE__ */ e("span", { "data-testid": "step-icon-pending", children: /* @__PURE__ */ e(C, { icon:
|
|
323
|
+
return /* @__PURE__ */ e("span", { "data-testid": "step-icon-pending", children: /* @__PURE__ */ e(C, { icon: G, size: "sm", className: "text-surface-fg-subtle opacity-50" }) });
|
|
309
324
|
}
|
|
310
325
|
}
|
|
311
|
-
const
|
|
326
|
+
const le = a.memo(function({
|
|
312
327
|
data: r
|
|
313
328
|
}) {
|
|
314
|
-
const { reducedMotion: t } = y(),
|
|
329
|
+
const { reducedMotion: t } = y(), l = t;
|
|
315
330
|
if (r.lines != null) {
|
|
316
331
|
const n = Math.max(1, r.lines);
|
|
317
|
-
return /* @__PURE__ */
|
|
332
|
+
return /* @__PURE__ */ m(
|
|
318
333
|
"div",
|
|
319
334
|
{
|
|
320
335
|
role: "status",
|
|
@@ -322,23 +337,23 @@ const we = a.memo(function({
|
|
|
322
337
|
"aria-label": "Loading",
|
|
323
338
|
className: "flex flex-col gap-2",
|
|
324
339
|
children: [
|
|
325
|
-
Array.from({ length: n }).map((
|
|
340
|
+
Array.from({ length: n }).map((d, o) => /* @__PURE__ */ e(
|
|
326
341
|
Q,
|
|
327
342
|
{
|
|
328
343
|
animation: "shimmer",
|
|
329
344
|
className: p(
|
|
330
345
|
"h-4",
|
|
331
|
-
|
|
346
|
+
o === n - 1 ? "w-3/5" : "w-full"
|
|
332
347
|
)
|
|
333
348
|
},
|
|
334
|
-
|
|
349
|
+
o
|
|
335
350
|
)),
|
|
336
351
|
/* @__PURE__ */ e("span", { className: "sr-only", children: "Loading" })
|
|
337
352
|
]
|
|
338
353
|
}
|
|
339
354
|
);
|
|
340
355
|
}
|
|
341
|
-
return r.steps ? /* @__PURE__ */
|
|
356
|
+
return r.steps ? /* @__PURE__ */ m(
|
|
342
357
|
"div",
|
|
343
358
|
{
|
|
344
359
|
role: "status",
|
|
@@ -346,15 +361,15 @@ const we = a.memo(function({
|
|
|
346
361
|
"aria-label": "Processing",
|
|
347
362
|
className: "flex flex-col gap-2",
|
|
348
363
|
children: [
|
|
349
|
-
r.steps.map((n,
|
|
364
|
+
r.steps.map((n, d) => /* @__PURE__ */ m(
|
|
350
365
|
x.div,
|
|
351
366
|
{
|
|
352
367
|
className: "flex items-center gap-2",
|
|
353
|
-
initial:
|
|
368
|
+
initial: l ? void 0 : { opacity: 0, x: -8 },
|
|
354
369
|
animate: { opacity: 1, x: 0 },
|
|
355
|
-
transition:
|
|
370
|
+
transition: l ? { duration: 0 } : { duration: 0.2, delay: d * 0.06 },
|
|
356
371
|
children: [
|
|
357
|
-
/* @__PURE__ */ e(
|
|
372
|
+
/* @__PURE__ */ e(ae, { status: n.status }),
|
|
358
373
|
/* @__PURE__ */ e(
|
|
359
374
|
"span",
|
|
360
375
|
{
|
|
@@ -373,33 +388,37 @@ const we = a.memo(function({
|
|
|
373
388
|
]
|
|
374
389
|
}
|
|
375
390
|
) : /* @__PURE__ */ e("div", { role: "status", "aria-busy": "true", "aria-label": "Loading", children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Loading" }) });
|
|
376
|
-
})
|
|
391
|
+
});
|
|
392
|
+
le.displayName = "LoadingBlock";
|
|
393
|
+
const ce = a.memo(function(r) {
|
|
377
394
|
const { reducedMotion: t } = y();
|
|
378
|
-
return t ? /* @__PURE__ */ e(
|
|
395
|
+
return t ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(
|
|
379
396
|
x.div,
|
|
380
397
|
{
|
|
381
398
|
initial: { scaleX: 0 },
|
|
382
399
|
animate: { scaleX: 1 },
|
|
383
400
|
style: { originX: 0.5 },
|
|
384
401
|
transition: P.elegant,
|
|
385
|
-
children: /* @__PURE__ */ e(
|
|
402
|
+
children: /* @__PURE__ */ e(D, {})
|
|
386
403
|
}
|
|
387
404
|
);
|
|
388
|
-
})
|
|
405
|
+
});
|
|
406
|
+
ce.displayName = "DividerBlock";
|
|
407
|
+
const de = a.memo(function({
|
|
389
408
|
data: r
|
|
390
409
|
}) {
|
|
391
|
-
const { reducedMotion: t } = y(),
|
|
392
|
-
return
|
|
393
|
-
const
|
|
410
|
+
const { reducedMotion: t } = y(), l = r.stats ?? [];
|
|
411
|
+
return l.length === 0 ? null : /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-ds-05", children: l.map((n, d) => {
|
|
412
|
+
const o = n.change ? {
|
|
394
413
|
value: n.change.value,
|
|
395
414
|
direction: n.change.direction
|
|
396
415
|
} : void 0;
|
|
397
416
|
return t ? /* @__PURE__ */ e("div", { className: "flex-1 min-w-[140px]", children: /* @__PURE__ */ e(
|
|
398
|
-
|
|
417
|
+
M,
|
|
399
418
|
{
|
|
400
419
|
label: n.label,
|
|
401
420
|
value: n.value,
|
|
402
|
-
delta:
|
|
421
|
+
delta: o
|
|
403
422
|
}
|
|
404
423
|
) }, n.label) : /* @__PURE__ */ e(
|
|
405
424
|
x.div,
|
|
@@ -407,13 +426,13 @@ const we = a.memo(function({
|
|
|
407
426
|
className: "flex-1 min-w-[140px]",
|
|
408
427
|
initial: { opacity: 0, y: 8 },
|
|
409
428
|
animate: { opacity: 1, y: 0 },
|
|
410
|
-
transition: { ...
|
|
429
|
+
transition: { ...U.responsive, delay: d * 0.08 },
|
|
411
430
|
children: /* @__PURE__ */ e(
|
|
412
|
-
|
|
431
|
+
M,
|
|
413
432
|
{
|
|
414
433
|
label: n.label,
|
|
415
434
|
value: n.value,
|
|
416
|
-
delta:
|
|
435
|
+
delta: o
|
|
417
436
|
}
|
|
418
437
|
)
|
|
419
438
|
},
|
|
@@ -421,14 +440,15 @@ const we = a.memo(function({
|
|
|
421
440
|
);
|
|
422
441
|
}) });
|
|
423
442
|
});
|
|
443
|
+
de.displayName = "StatRowBlock";
|
|
424
444
|
export {
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
445
|
+
ee as B,
|
|
446
|
+
re as C,
|
|
447
|
+
ce as D,
|
|
448
|
+
se as E,
|
|
449
|
+
oe as I,
|
|
450
|
+
le as L,
|
|
451
|
+
de as S,
|
|
452
|
+
Y as T,
|
|
453
|
+
te as a
|
|
434
454
|
};
|