@devalok/shilp-sutra 0.24.0 → 0.25.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/dist/_chunks/framer.js +946 -672
- package/dist/_chunks/keybinding.js +19 -0
- package/dist/_chunks/stat-row.js +455 -0
- package/dist/_chunks/tiptap.js +1 -1
- package/dist/_chunks/vendor-client.js +1 -1
- package/dist/_chunks/vendor-utils.js +1311 -1168
- package/dist/ai/ai-command-provider.d.ts +23 -0
- package/dist/ai/ai-command-provider.d.ts.map +1 -0
- package/dist/ai/ai-command-provider.js +20 -0
- package/dist/ai/block-renderer.d.ts +12 -0
- package/dist/ai/block-renderer.d.ts.map +1 -0
- package/dist/ai/block-renderer.js +54 -0
- package/dist/ai/blocks/block-table.d.ts +6 -0
- package/dist/ai/blocks/block-table.d.ts.map +1 -0
- package/dist/ai/blocks/confirm.d.ts +6 -0
- package/dist/ai/blocks/confirm.d.ts.map +1 -0
- package/dist/ai/blocks/divider.d.ts +6 -0
- package/dist/ai/blocks/divider.d.ts.map +1 -0
- package/dist/ai/blocks/error.d.ts +6 -0
- package/dist/ai/blocks/error.d.ts.map +1 -0
- package/dist/ai/blocks/index.d.ts +11 -0
- package/dist/ai/blocks/index.d.ts.map +1 -0
- package/dist/ai/blocks/index.js +13 -0
- package/dist/ai/blocks/info.d.ts +8 -0
- package/dist/ai/blocks/info.d.ts.map +1 -0
- package/dist/ai/blocks/loading.d.ts +6 -0
- package/dist/ai/blocks/loading.d.ts.map +1 -0
- package/dist/ai/blocks/stat-row.d.ts +6 -0
- package/dist/ai/blocks/stat-row.d.ts.map +1 -0
- package/dist/ai/blocks/success.d.ts +6 -0
- package/dist/ai/blocks/success.d.ts.map +1 -0
- package/dist/ai/blocks/text.d.ts +8 -0
- package/dist/ai/blocks/text.d.ts.map +1 -0
- package/dist/ai/command-bar.d.ts +40 -0
- package/dist/ai/command-bar.d.ts.map +1 -0
- package/dist/ai/command-bar.js +545 -0
- package/dist/ai/conversation.d.ts +20 -0
- package/dist/ai/conversation.d.ts.map +1 -0
- package/dist/ai/conversation.js +255 -0
- package/dist/ai/devadoot-icon.d.ts +23 -0
- package/dist/ai/devadoot-icon.d.ts.map +1 -0
- package/dist/ai/index.d.ts +22 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +170 -0
- package/dist/ai/types.d.ts +81 -0
- package/dist/ai/types.d.ts.map +1 -0
- package/dist/composed/avatar-group.js +1 -1
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +155 -167
- package/dist/composed/content-card.js +1 -1
- package/dist/composed/priority-indicator.js +1 -1
- package/dist/composed/status-badge.js +1 -1
- package/dist/tailwind/index.cjs +1 -1
- package/dist/tailwind/preset.js +1 -1
- package/dist/ui/alert.js +1 -1
- package/dist/ui/avatar.js +1 -1
- package/dist/ui/badge.js +1 -1
- package/dist/ui/banner.js +4 -4
- package/dist/ui/button.js +7 -7
- package/dist/ui/card.js +7 -7
- package/dist/ui/chip.js +1 -1
- package/dist/ui/input.js +5 -5
- package/dist/ui/lib/keybinding.d.ts +8 -0
- package/dist/ui/lib/keybinding.d.ts.map +1 -0
- package/dist/ui/lib/motion.d.ts +4 -0
- package/dist/ui/lib/motion.d.ts.map +1 -1
- package/dist/ui/lib/motion.js +18 -14
- package/dist/ui/lib/utils.js +1 -1
- package/dist/ui/progress.js +1 -1
- package/dist/ui/segmented-control.js +1 -1
- package/dist/ui/select.js +1 -1
- package/dist/ui/sheet.js +6 -6
- package/dist/ui/sidebar.js +1 -1
- package/dist/ui/skeleton.js +4 -4
- package/dist/ui/tabs.js +1 -1
- package/dist/ui/text.js +1 -1
- package/dist/ui/textarea.js +1 -1
- package/dist/ui/toggle.js +1 -1
- package/llms-full.txt +1 -1
- package/llms.txt +42 -0
- package/package.json +733 -699
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
function u() {
|
|
3
|
+
var s;
|
|
4
|
+
if (typeof navigator > "u") return !1;
|
|
5
|
+
const t = ((s = navigator.userAgentData) == null ? void 0 : s.platform) ?? navigator.userAgent;
|
|
6
|
+
return /mac|iphone|ipad|ipod/i.test(t);
|
|
7
|
+
}
|
|
8
|
+
function d(t, s) {
|
|
9
|
+
const n = s.toLowerCase().split("+"), c = n[n.length - 1], e = new Set(n.slice(0, -1)), i = u(), f = e.has("mod"), a = e.has("ctrl") || !i && f, r = e.has("meta") || i && f, o = e.has("shift"), l = e.has("alt");
|
|
10
|
+
return a && !t.ctrlKey || r && !t.metaKey || o && !t.shiftKey || l && !t.altKey || !a && !r && t.ctrlKey || !r && !a && t.metaKey || !o && t.shiftKey || !l && t.altKey ? !1 : t.key.toLowerCase() === c;
|
|
11
|
+
}
|
|
12
|
+
function y(t) {
|
|
13
|
+
return t ? "⌘" : "Ctrl";
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
y as a,
|
|
17
|
+
u as g,
|
|
18
|
+
d as m
|
|
19
|
+
};
|
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
3
|
+
import * as l from "react";
|
|
4
|
+
import D from "react-markdown";
|
|
5
|
+
import L from "remark-gfm";
|
|
6
|
+
import { cn as p } from "../ui/lib/utils.js";
|
|
7
|
+
import { springs as U, tweens as P } from "../ui/lib/motion.js";
|
|
8
|
+
import { u as y } from "./motion-provider.js";
|
|
9
|
+
import { Table as j, TableCaption as z, TableHeader as W, TableRow as X, TableHead as _, TableBody as $, TableCell as H } from "../ui/table.js";
|
|
10
|
+
import { Badge as I } from "../ui/badge.js";
|
|
11
|
+
import { m as x } from "./framer.js";
|
|
12
|
+
import { Button as C } from "../ui/button.js";
|
|
13
|
+
import { Collapsible as O, CollapsibleTrigger as V, CollapsibleContent as F } from "../ui/collapsible.js";
|
|
14
|
+
import { Alert as w } from "../ui/alert.js";
|
|
15
|
+
import { IconCircle as G, IconCircleX as K, IconCircleCheck as q } from "@tabler/icons-react";
|
|
16
|
+
import { Skeleton as J } from "../ui/skeleton.js";
|
|
17
|
+
import { Separator as M } from "../ui/separator.js";
|
|
18
|
+
import { StatCard as R } from "../ui/stat-card.js";
|
|
19
|
+
const ge = l.memo(function({
|
|
20
|
+
data: r,
|
|
21
|
+
confidence: t
|
|
22
|
+
}) {
|
|
23
|
+
return /* @__PURE__ */ e(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
className: p(
|
|
27
|
+
"prose prose-sm",
|
|
28
|
+
"text-surface-fg",
|
|
29
|
+
"prose-headings:text-surface-fg",
|
|
30
|
+
"prose-a:text-accent-11 prose-a:underline",
|
|
31
|
+
"prose-code:text-accent-11 prose-code:bg-surface-raised prose-code:rounded prose-code:px-1",
|
|
32
|
+
"prose-strong:text-surface-fg",
|
|
33
|
+
t === "low" && "border-l-2 border-warning-7 pl-3"
|
|
34
|
+
),
|
|
35
|
+
children: /* @__PURE__ */ e(D, { remarkPlugins: [L], children: r.content })
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
});
|
|
39
|
+
function Q(i, r) {
|
|
40
|
+
if (r.variant === "badge") {
|
|
41
|
+
if (i && typeof i == "object" && "label" in i) {
|
|
42
|
+
const t = i;
|
|
43
|
+
return /* @__PURE__ */ e(I, { variant: "subtle", size: "sm", color: t.color, children: t.label });
|
|
44
|
+
}
|
|
45
|
+
return /* @__PURE__ */ e(I, { variant: "subtle", size: "sm", children: String(i ?? "") });
|
|
46
|
+
}
|
|
47
|
+
return String(i ?? "");
|
|
48
|
+
}
|
|
49
|
+
function Y(i, r, t) {
|
|
50
|
+
return !r || !t ? i : [...i].sort((s, n) => {
|
|
51
|
+
const c = s[r], a = n[r], m = String(c ?? ""), v = String(a ?? ""), f = Number(c), g = Number(a);
|
|
52
|
+
if (!Number.isNaN(f) && !Number.isNaN(g))
|
|
53
|
+
return t === "asc" ? f - g : g - f;
|
|
54
|
+
const o = m.localeCompare(v);
|
|
55
|
+
return t === "asc" ? o : -o;
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
const xe = l.memo(function({
|
|
59
|
+
data: r,
|
|
60
|
+
confidence: t
|
|
61
|
+
}) {
|
|
62
|
+
const { reducedMotion: s } = y(), [n, c] = l.useState(null), [a, m] = l.useState(null), v = l.useCallback(
|
|
63
|
+
(o) => {
|
|
64
|
+
r.sortable && (n !== o ? (c(o), m("asc")) : a === "asc" ? m("desc") : a === "desc" && (c(null), m(null)));
|
|
65
|
+
},
|
|
66
|
+
[r.sortable, n, a]
|
|
67
|
+
), f = r.columns ?? [], g = Y(r.rows ?? [], n, a);
|
|
68
|
+
return /* @__PURE__ */ e(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
className: p(
|
|
72
|
+
"overflow-x-auto",
|
|
73
|
+
t === "low" && "border-l-2 border-warning-7 pl-3"
|
|
74
|
+
),
|
|
75
|
+
children: /* @__PURE__ */ d(j, { children: [
|
|
76
|
+
r.caption && /* @__PURE__ */ e(z, { children: r.caption }),
|
|
77
|
+
/* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(X, { children: f.map((o) => {
|
|
78
|
+
const h = n === o.key, k = h ? a === "asc" ? "ascending" : "descending" : void 0;
|
|
79
|
+
return /* @__PURE__ */ e(
|
|
80
|
+
_,
|
|
81
|
+
{
|
|
82
|
+
className: p(
|
|
83
|
+
o.variant === "number" && "text-right",
|
|
84
|
+
r.sortable && "cursor-pointer select-none"
|
|
85
|
+
),
|
|
86
|
+
onClick: r.sortable ? () => v(o.key) : void 0,
|
|
87
|
+
"aria-sort": k,
|
|
88
|
+
children: /* @__PURE__ */ d("span", { className: "inline-flex items-center gap-1", children: [
|
|
89
|
+
o.label,
|
|
90
|
+
h && a === "asc" && /* @__PURE__ */ e("span", { "aria-hidden": "true", children: "▲" }),
|
|
91
|
+
h && a === "desc" && /* @__PURE__ */ e("span", { "aria-hidden": "true", children: "▼" })
|
|
92
|
+
] })
|
|
93
|
+
},
|
|
94
|
+
o.key
|
|
95
|
+
);
|
|
96
|
+
}) }) }),
|
|
97
|
+
/* @__PURE__ */ e($, { children: g.map((o, h) => {
|
|
98
|
+
const k = typeof o.id == "string" || typeof o.id == "number" ? String(o.id) : `row-${h}`, u = s ? "tr" : x.tr, N = s ? {} : {
|
|
99
|
+
initial: { opacity: 0, y: 6 },
|
|
100
|
+
animate: { opacity: 1, y: 0 },
|
|
101
|
+
transition: { ...U.responsive, delay: h * 0.03 }
|
|
102
|
+
};
|
|
103
|
+
return /* @__PURE__ */ e(
|
|
104
|
+
u,
|
|
105
|
+
{
|
|
106
|
+
className: "hover:bg-surface-raised-hover transition-colors",
|
|
107
|
+
...N,
|
|
108
|
+
children: f.map((b) => /* @__PURE__ */ e(
|
|
109
|
+
H,
|
|
110
|
+
{
|
|
111
|
+
className: p(
|
|
112
|
+
"text-ds-sm py-ds-02b px-ds-04",
|
|
113
|
+
b.variant === "number" && "text-right tabular-nums font-medium"
|
|
114
|
+
),
|
|
115
|
+
children: Q(o[b.key], b)
|
|
116
|
+
},
|
|
117
|
+
b.key
|
|
118
|
+
))
|
|
119
|
+
},
|
|
120
|
+
k
|
|
121
|
+
);
|
|
122
|
+
}) })
|
|
123
|
+
] })
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
}), ve = l.memo(function({
|
|
127
|
+
data: r,
|
|
128
|
+
confidence: t,
|
|
129
|
+
onAction: s
|
|
130
|
+
}) {
|
|
131
|
+
const n = l.useCallback(() => {
|
|
132
|
+
s == null || s(r.actionId, "confirm");
|
|
133
|
+
}, [r.actionId, s]), c = l.useCallback(() => {
|
|
134
|
+
s == null || s(r.actionId, "cancel");
|
|
135
|
+
}, [r.actionId, s]);
|
|
136
|
+
return /* @__PURE__ */ d(
|
|
137
|
+
"div",
|
|
138
|
+
{
|
|
139
|
+
className: p(
|
|
140
|
+
t === "low" && "border-l-2 border-warning-7 pl-3"
|
|
141
|
+
),
|
|
142
|
+
children: [
|
|
143
|
+
r.description && /* @__PURE__ */ e("p", { className: "text-ds-sm text-surface-fg-muted mb-3", children: r.description }),
|
|
144
|
+
/* @__PURE__ */ d("div", { className: "flex items-center gap-3", children: [
|
|
145
|
+
/* @__PURE__ */ e(
|
|
146
|
+
C,
|
|
147
|
+
{
|
|
148
|
+
variant: "solid",
|
|
149
|
+
color: r.destructive ? "error" : void 0,
|
|
150
|
+
onClick: n,
|
|
151
|
+
children: r.label
|
|
152
|
+
}
|
|
153
|
+
),
|
|
154
|
+
/* @__PURE__ */ e(C, { variant: "ghost", onClick: c, children: "Cancel" })
|
|
155
|
+
] }),
|
|
156
|
+
r.rationale && /* @__PURE__ */ d(O, { className: "mt-3", children: [
|
|
157
|
+
/* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ e(
|
|
158
|
+
"button",
|
|
159
|
+
{
|
|
160
|
+
type: "button",
|
|
161
|
+
className: "text-ds-xs text-surface-fg-subtle underline cursor-pointer",
|
|
162
|
+
children: "Why this action?"
|
|
163
|
+
}
|
|
164
|
+
) }),
|
|
165
|
+
/* @__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 }) })
|
|
166
|
+
] })
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
}), Z = 5e3, ke = l.memo(function({
|
|
171
|
+
data: r,
|
|
172
|
+
blockId: t,
|
|
173
|
+
confidence: s,
|
|
174
|
+
onAction: n
|
|
175
|
+
}) {
|
|
176
|
+
const { reducedMotion: c } = y(), a = c, m = r.undoTimeout ?? Z, [v, f] = l.useState(m), [g, o] = l.useState(!!r.undoable);
|
|
177
|
+
l.useEffect(() => {
|
|
178
|
+
if (!r.undoable) return;
|
|
179
|
+
const B = setInterval(() => {
|
|
180
|
+
f((E) => {
|
|
181
|
+
const T = E - 100;
|
|
182
|
+
return T <= 0 ? (clearInterval(B), o(!1), 0) : T;
|
|
183
|
+
});
|
|
184
|
+
}, 100);
|
|
185
|
+
return () => clearInterval(B);
|
|
186
|
+
}, [r.undoable, m]);
|
|
187
|
+
const h = l.useCallback(() => {
|
|
188
|
+
n == null || n(t || "unknown", "undo");
|
|
189
|
+
}, [t, n]), k = Math.ceil(v / 1e3), u = 20, N = 2, b = (u - N) / 2, S = 2 * Math.PI * b;
|
|
190
|
+
return /* @__PURE__ */ d(
|
|
191
|
+
"div",
|
|
192
|
+
{
|
|
193
|
+
className: p(
|
|
194
|
+
s === "low" && "border-l-2 border-warning-7 pl-3"
|
|
195
|
+
),
|
|
196
|
+
children: [
|
|
197
|
+
/* @__PURE__ */ e(
|
|
198
|
+
w,
|
|
199
|
+
{
|
|
200
|
+
color: "success",
|
|
201
|
+
variant: "subtle",
|
|
202
|
+
title: r.title,
|
|
203
|
+
children: r.message
|
|
204
|
+
}
|
|
205
|
+
),
|
|
206
|
+
g && r.undoable && /* @__PURE__ */ e("div", { className: "mt-2 flex items-center gap-2", children: /* @__PURE__ */ e(
|
|
207
|
+
C,
|
|
208
|
+
{
|
|
209
|
+
variant: "ghost",
|
|
210
|
+
size: "sm",
|
|
211
|
+
onClick: h,
|
|
212
|
+
"aria-label": `Undo action, ${k} seconds remaining`,
|
|
213
|
+
children: /* @__PURE__ */ d("span", { className: "flex items-center gap-1.5", children: [
|
|
214
|
+
/* @__PURE__ */ d(
|
|
215
|
+
"svg",
|
|
216
|
+
{
|
|
217
|
+
width: u,
|
|
218
|
+
height: u,
|
|
219
|
+
viewBox: `0 0 ${u} ${u}`,
|
|
220
|
+
className: "shrink-0 -rotate-90",
|
|
221
|
+
"aria-hidden": "true",
|
|
222
|
+
children: [
|
|
223
|
+
/* @__PURE__ */ e(
|
|
224
|
+
"circle",
|
|
225
|
+
{
|
|
226
|
+
cx: u / 2,
|
|
227
|
+
cy: u / 2,
|
|
228
|
+
r: b,
|
|
229
|
+
fill: "none",
|
|
230
|
+
stroke: "currentColor",
|
|
231
|
+
strokeWidth: N,
|
|
232
|
+
opacity: 0.2
|
|
233
|
+
}
|
|
234
|
+
),
|
|
235
|
+
/* @__PURE__ */ e(
|
|
236
|
+
x.circle,
|
|
237
|
+
{
|
|
238
|
+
cx: u / 2,
|
|
239
|
+
cy: u / 2,
|
|
240
|
+
r: b,
|
|
241
|
+
fill: "none",
|
|
242
|
+
stroke: "currentColor",
|
|
243
|
+
strokeWidth: N,
|
|
244
|
+
strokeDasharray: S,
|
|
245
|
+
initial: a ? void 0 : { strokeDashoffset: 0 },
|
|
246
|
+
animate: {
|
|
247
|
+
strokeDashoffset: S
|
|
248
|
+
},
|
|
249
|
+
transition: a ? { duration: 0 } : {
|
|
250
|
+
duration: m / 1e3,
|
|
251
|
+
ease: "linear"
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
)
|
|
255
|
+
]
|
|
256
|
+
}
|
|
257
|
+
),
|
|
258
|
+
"Undo"
|
|
259
|
+
] })
|
|
260
|
+
}
|
|
261
|
+
) })
|
|
262
|
+
]
|
|
263
|
+
}
|
|
264
|
+
);
|
|
265
|
+
}), Ne = l.memo(function({
|
|
266
|
+
data: r,
|
|
267
|
+
confidence: t
|
|
268
|
+
}) {
|
|
269
|
+
return /* @__PURE__ */ d(
|
|
270
|
+
"div",
|
|
271
|
+
{
|
|
272
|
+
className: p(
|
|
273
|
+
t === "low" && "border-l-2 border-warning-7 pl-3"
|
|
274
|
+
),
|
|
275
|
+
children: [
|
|
276
|
+
/* @__PURE__ */ e(w, { color: "error", variant: "subtle", title: r.title, children: /* @__PURE__ */ e("div", { className: "prose prose-sm", children: /* @__PURE__ */ e(D, { remarkPlugins: [L], children: r.message }) }) }),
|
|
277
|
+
r.suggestion && /* @__PURE__ */ e("p", { className: "mt-2 text-ds-sm text-surface-fg-muted", children: r.suggestion })
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
);
|
|
281
|
+
}), ye = l.memo(function({
|
|
282
|
+
data: r
|
|
283
|
+
}) {
|
|
284
|
+
return /* @__PURE__ */ e(w, { color: "info", variant: "subtle", children: r.message });
|
|
285
|
+
});
|
|
286
|
+
function A() {
|
|
287
|
+
return /* @__PURE__ */ e(
|
|
288
|
+
x.span,
|
|
289
|
+
{
|
|
290
|
+
className: "inline-block h-4 w-4 rounded-full border-2 border-current border-t-transparent text-accent-9",
|
|
291
|
+
animate: { rotate: 360 },
|
|
292
|
+
transition: { repeat: 1 / 0, duration: 1, ease: "linear" },
|
|
293
|
+
"aria-hidden": "true",
|
|
294
|
+
"data-testid": "step-spinner"
|
|
295
|
+
}
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
function ee({ status: i }) {
|
|
299
|
+
switch (i) {
|
|
300
|
+
case "done":
|
|
301
|
+
return /* @__PURE__ */ e(
|
|
302
|
+
q,
|
|
303
|
+
{
|
|
304
|
+
className: "h-4 w-4 text-success-11",
|
|
305
|
+
"aria-hidden": "true",
|
|
306
|
+
"data-testid": "step-icon-done"
|
|
307
|
+
}
|
|
308
|
+
);
|
|
309
|
+
case "active":
|
|
310
|
+
return /* @__PURE__ */ e(A, {});
|
|
311
|
+
case "error":
|
|
312
|
+
return /* @__PURE__ */ e(
|
|
313
|
+
K,
|
|
314
|
+
{
|
|
315
|
+
className: "h-4 w-4 text-error-11",
|
|
316
|
+
"aria-hidden": "true",
|
|
317
|
+
"data-testid": "step-icon-error"
|
|
318
|
+
}
|
|
319
|
+
);
|
|
320
|
+
case "pending":
|
|
321
|
+
default:
|
|
322
|
+
return /* @__PURE__ */ e(
|
|
323
|
+
G,
|
|
324
|
+
{
|
|
325
|
+
className: "h-4 w-4 text-surface-fg-subtle opacity-50",
|
|
326
|
+
"aria-hidden": "true",
|
|
327
|
+
"data-testid": "step-icon-pending"
|
|
328
|
+
}
|
|
329
|
+
);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
const Ce = l.memo(function({
|
|
333
|
+
data: r
|
|
334
|
+
}) {
|
|
335
|
+
const { reducedMotion: t } = y(), s = t;
|
|
336
|
+
if (r.lines != null) {
|
|
337
|
+
const n = Math.max(1, r.lines);
|
|
338
|
+
return /* @__PURE__ */ d(
|
|
339
|
+
"div",
|
|
340
|
+
{
|
|
341
|
+
role: "status",
|
|
342
|
+
"aria-busy": "true",
|
|
343
|
+
"aria-label": "Loading",
|
|
344
|
+
className: "flex flex-col gap-2",
|
|
345
|
+
children: [
|
|
346
|
+
Array.from({ length: n }).map((c, a) => /* @__PURE__ */ e(
|
|
347
|
+
J,
|
|
348
|
+
{
|
|
349
|
+
animation: "shimmer",
|
|
350
|
+
className: p(
|
|
351
|
+
"h-4",
|
|
352
|
+
a === n - 1 ? "w-3/5" : "w-full"
|
|
353
|
+
)
|
|
354
|
+
},
|
|
355
|
+
a
|
|
356
|
+
)),
|
|
357
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: "Loading" })
|
|
358
|
+
]
|
|
359
|
+
}
|
|
360
|
+
);
|
|
361
|
+
}
|
|
362
|
+
return r.steps ? /* @__PURE__ */ d(
|
|
363
|
+
"div",
|
|
364
|
+
{
|
|
365
|
+
role: "status",
|
|
366
|
+
"aria-busy": "true",
|
|
367
|
+
"aria-label": "Processing",
|
|
368
|
+
className: "flex flex-col gap-2",
|
|
369
|
+
children: [
|
|
370
|
+
r.steps.map((n, c) => /* @__PURE__ */ d(
|
|
371
|
+
x.div,
|
|
372
|
+
{
|
|
373
|
+
className: "flex items-center gap-2",
|
|
374
|
+
initial: s ? void 0 : { opacity: 0, x: -8 },
|
|
375
|
+
animate: { opacity: 1, x: 0 },
|
|
376
|
+
transition: s ? { duration: 0 } : { duration: 0.2, delay: c * 0.06 },
|
|
377
|
+
children: [
|
|
378
|
+
/* @__PURE__ */ e(ee, { status: n.status }),
|
|
379
|
+
/* @__PURE__ */ e(
|
|
380
|
+
"span",
|
|
381
|
+
{
|
|
382
|
+
className: p(
|
|
383
|
+
"text-ds-sm",
|
|
384
|
+
n.status === "done" || n.status === "active" ? "text-surface-fg" : "text-surface-fg-subtle"
|
|
385
|
+
),
|
|
386
|
+
children: n.label
|
|
387
|
+
}
|
|
388
|
+
)
|
|
389
|
+
]
|
|
390
|
+
},
|
|
391
|
+
n.id
|
|
392
|
+
)),
|
|
393
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: "Processing" })
|
|
394
|
+
]
|
|
395
|
+
}
|
|
396
|
+
) : /* @__PURE__ */ e("div", { role: "status", "aria-busy": "true", "aria-label": "Loading", children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Loading" }) });
|
|
397
|
+
}), we = l.memo(function(r) {
|
|
398
|
+
const { reducedMotion: t } = y();
|
|
399
|
+
return t ? /* @__PURE__ */ e(M, {}) : /* @__PURE__ */ e(
|
|
400
|
+
x.div,
|
|
401
|
+
{
|
|
402
|
+
initial: { scaleX: 0 },
|
|
403
|
+
animate: { scaleX: 1 },
|
|
404
|
+
style: { originX: 0.5 },
|
|
405
|
+
transition: P.elegant,
|
|
406
|
+
children: /* @__PURE__ */ e(M, {})
|
|
407
|
+
}
|
|
408
|
+
);
|
|
409
|
+
}), Se = l.memo(function({
|
|
410
|
+
data: r
|
|
411
|
+
}) {
|
|
412
|
+
const { reducedMotion: t } = y(), s = r.stats ?? [];
|
|
413
|
+
return s.length === 0 ? null : /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-ds-05", children: s.map((n, c) => {
|
|
414
|
+
const a = n.change ? {
|
|
415
|
+
value: n.change.value,
|
|
416
|
+
direction: n.change.direction
|
|
417
|
+
} : void 0;
|
|
418
|
+
return t ? /* @__PURE__ */ e("div", { className: "flex-1 min-w-[140px]", children: /* @__PURE__ */ e(
|
|
419
|
+
R,
|
|
420
|
+
{
|
|
421
|
+
label: n.label,
|
|
422
|
+
value: n.value,
|
|
423
|
+
delta: a
|
|
424
|
+
}
|
|
425
|
+
) }, n.label) : /* @__PURE__ */ e(
|
|
426
|
+
x.div,
|
|
427
|
+
{
|
|
428
|
+
className: "flex-1 min-w-[140px]",
|
|
429
|
+
initial: { opacity: 0, y: 8 },
|
|
430
|
+
animate: { opacity: 1, y: 0 },
|
|
431
|
+
transition: { ...U.responsive, delay: c * 0.08 },
|
|
432
|
+
children: /* @__PURE__ */ e(
|
|
433
|
+
R,
|
|
434
|
+
{
|
|
435
|
+
label: n.label,
|
|
436
|
+
value: n.value,
|
|
437
|
+
delta: a
|
|
438
|
+
}
|
|
439
|
+
)
|
|
440
|
+
},
|
|
441
|
+
n.label
|
|
442
|
+
);
|
|
443
|
+
}) });
|
|
444
|
+
});
|
|
445
|
+
export {
|
|
446
|
+
xe as B,
|
|
447
|
+
ve as C,
|
|
448
|
+
we as D,
|
|
449
|
+
Ne as E,
|
|
450
|
+
ye as I,
|
|
451
|
+
Ce as L,
|
|
452
|
+
Se as S,
|
|
453
|
+
ge as T,
|
|
454
|
+
ke as a
|
|
455
|
+
};
|
package/dist/_chunks/tiptap.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import $, { useRef as xl, useState as xs, useDebugValue as Ms, useEffect as Cs, forwardRef as Ml, useLayoutEffect as Cl, createRef as wl, memo as Tl, createElement as Ol, createContext as ws, version as Xr, useContext as El } from "react";
|
|
3
3
|
import vl, { flushSync as Nl } from "react-dom";
|
|
4
|
-
import {
|
|
4
|
+
import { aq as Zr, ar as Al, as as Dl, at as Ts, au as Os, av as Qr, aw as Rl, ax as Il } from "./vendor-utils.js";
|
|
5
5
|
function Es(n, e, t) {
|
|
6
6
|
for (let r = 0; ; r++) {
|
|
7
7
|
if (r == n.childCount || r == e.childCount)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as S from "react";
|
|
3
3
|
import v, { useState as Dn, useLayoutEffect as Nn } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { an as mt, ao as Je, ap as Pn } from "./vendor-utils.js";
|
|
5
5
|
import * as Ln from "react-dom";
|
|
6
6
|
import Bn from "react-dom";
|
|
7
7
|
var qt = "right-scroll-bar-position", Kt = "width-before-scroll-bar", _n = "with-scroll-bars-hidden", In = "--removed-body-scroll-bar-size";
|