@devalok/shilp-sutra 0.23.3 → 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.
Files changed (89) hide show
  1. package/dist/_chunks/framer.js +946 -672
  2. package/dist/_chunks/keybinding.js +19 -0
  3. package/dist/_chunks/stat-row.js +455 -0
  4. package/dist/_chunks/tiptap.js +1 -1
  5. package/dist/_chunks/vendor-client.js +1 -1
  6. package/dist/_chunks/vendor-utils.js +1311 -1168
  7. package/dist/ai/ai-command-provider.d.ts +23 -0
  8. package/dist/ai/ai-command-provider.d.ts.map +1 -0
  9. package/dist/ai/ai-command-provider.js +20 -0
  10. package/dist/ai/block-renderer.d.ts +12 -0
  11. package/dist/ai/block-renderer.d.ts.map +1 -0
  12. package/dist/ai/block-renderer.js +54 -0
  13. package/dist/ai/blocks/block-table.d.ts +6 -0
  14. package/dist/ai/blocks/block-table.d.ts.map +1 -0
  15. package/dist/ai/blocks/confirm.d.ts +6 -0
  16. package/dist/ai/blocks/confirm.d.ts.map +1 -0
  17. package/dist/ai/blocks/divider.d.ts +6 -0
  18. package/dist/ai/blocks/divider.d.ts.map +1 -0
  19. package/dist/ai/blocks/error.d.ts +6 -0
  20. package/dist/ai/blocks/error.d.ts.map +1 -0
  21. package/dist/ai/blocks/index.d.ts +11 -0
  22. package/dist/ai/blocks/index.d.ts.map +1 -0
  23. package/dist/ai/blocks/index.js +13 -0
  24. package/dist/ai/blocks/info.d.ts +8 -0
  25. package/dist/ai/blocks/info.d.ts.map +1 -0
  26. package/dist/ai/blocks/loading.d.ts +6 -0
  27. package/dist/ai/blocks/loading.d.ts.map +1 -0
  28. package/dist/ai/blocks/stat-row.d.ts +6 -0
  29. package/dist/ai/blocks/stat-row.d.ts.map +1 -0
  30. package/dist/ai/blocks/success.d.ts +6 -0
  31. package/dist/ai/blocks/success.d.ts.map +1 -0
  32. package/dist/ai/blocks/text.d.ts +8 -0
  33. package/dist/ai/blocks/text.d.ts.map +1 -0
  34. package/dist/ai/command-bar.d.ts +40 -0
  35. package/dist/ai/command-bar.d.ts.map +1 -0
  36. package/dist/ai/command-bar.js +545 -0
  37. package/dist/ai/conversation.d.ts +20 -0
  38. package/dist/ai/conversation.d.ts.map +1 -0
  39. package/dist/ai/conversation.js +255 -0
  40. package/dist/ai/devadoot-icon.d.ts +23 -0
  41. package/dist/ai/devadoot-icon.d.ts.map +1 -0
  42. package/dist/ai/index.d.ts +22 -0
  43. package/dist/ai/index.d.ts.map +1 -0
  44. package/dist/ai/index.js +170 -0
  45. package/dist/ai/types.d.ts +81 -0
  46. package/dist/ai/types.d.ts.map +1 -0
  47. package/dist/composed/avatar-group.js +1 -1
  48. package/dist/composed/command-palette.d.ts +32 -2
  49. package/dist/composed/command-palette.d.ts.map +1 -1
  50. package/dist/composed/command-palette.js +176 -140
  51. package/dist/composed/content-card.js +1 -1
  52. package/dist/composed/index.d.ts +1 -1
  53. package/dist/composed/index.d.ts.map +1 -1
  54. package/dist/composed/priority-indicator.js +1 -1
  55. package/dist/composed/status-badge.js +1 -1
  56. package/dist/shell/app-command-palette.d.ts +36 -5
  57. package/dist/shell/app-command-palette.d.ts.map +1 -1
  58. package/dist/shell/app-command-palette.js +158 -137
  59. package/dist/shell/index.d.ts +1 -1
  60. package/dist/shell/index.d.ts.map +1 -1
  61. package/dist/tailwind/index.cjs +1 -1
  62. package/dist/tailwind/preset.js +1 -1
  63. package/dist/ui/alert.js +1 -1
  64. package/dist/ui/avatar.js +1 -1
  65. package/dist/ui/badge.js +1 -1
  66. package/dist/ui/banner.js +4 -4
  67. package/dist/ui/button.js +7 -7
  68. package/dist/ui/card.js +7 -7
  69. package/dist/ui/chip.js +1 -1
  70. package/dist/ui/input.js +5 -5
  71. package/dist/ui/lib/keybinding.d.ts +8 -0
  72. package/dist/ui/lib/keybinding.d.ts.map +1 -0
  73. package/dist/ui/lib/motion.d.ts +4 -0
  74. package/dist/ui/lib/motion.d.ts.map +1 -1
  75. package/dist/ui/lib/motion.js +18 -14
  76. package/dist/ui/lib/utils.js +1 -1
  77. package/dist/ui/progress.js +1 -1
  78. package/dist/ui/segmented-control.js +1 -1
  79. package/dist/ui/select.js +1 -1
  80. package/dist/ui/sheet.js +6 -6
  81. package/dist/ui/sidebar.js +1 -1
  82. package/dist/ui/skeleton.js +4 -4
  83. package/dist/ui/tabs.js +1 -1
  84. package/dist/ui/text.js +1 -1
  85. package/dist/ui/textarea.js +1 -1
  86. package/dist/ui/toggle.js +1 -1
  87. package/llms-full.txt +1 -1
  88. package/llms.txt +45 -2
  89. package/package.json +733 -699
@@ -0,0 +1,545 @@
1
+ "use client";
2
+ import { jsxs as r, jsx as t, Fragment as Ie } from "react/jsx-runtime";
3
+ import * as a from "react";
4
+ import { Dialog as De, DialogPortal as _e, DialogOverlay as Ae, DialogContentRaw as Me, DialogTitle as Re, DialogDescription as Ee } from "../ui/dialog.js";
5
+ import { IconArrowUp as Le, IconArrowDown as Be, IconCornerDownLeft as ce, IconSearch as je, IconLoader2 as Fe, IconX as $e } from "@tabler/icons-react";
6
+ import { cn as u } from "../ui/lib/utils.js";
7
+ import { springs as le, tweens as Y } from "../ui/lib/motion.js";
8
+ import { VisuallyHidden as ze } from "../ui/visually-hidden.js";
9
+ import { u as ue } from "../_chunks/motion-provider.js";
10
+ import { g as Pe, m as Ke, a as Ve } from "../_chunks/keybinding.js";
11
+ import { m as x, A as Z } from "../_chunks/framer.js";
12
+ function qe({
13
+ active: n,
14
+ rounded: m,
15
+ reducedMotion: h,
16
+ children: f
17
+ }) {
18
+ return n ? h ? /* @__PURE__ */ t("div", { className: u("p-[1.5px] bg-accent-9", m), children: f }) : /* @__PURE__ */ r(
19
+ x.div,
20
+ {
21
+ className: u("relative p-[1.5px]", m),
22
+ style: {
23
+ background: "linear-gradient(var(--gradient-angle, 0deg), #D33163, #9B5DE5, #C850C0, #D33163)",
24
+ backgroundSize: "300% 300%"
25
+ },
26
+ animate: {
27
+ // Rotate the gradient angle — creates the flowing border effect
28
+ // Using CSS custom property animation via backgroundPosition as proxy
29
+ backgroundPosition: ["0% 0%", "100% 100%", "0% 0%"]
30
+ },
31
+ transition: {
32
+ backgroundPosition: {
33
+ duration: 4,
34
+ repeat: 1 / 0,
35
+ ease: "linear"
36
+ }
37
+ },
38
+ children: [
39
+ /* @__PURE__ */ t(
40
+ x.div,
41
+ {
42
+ className: u("absolute inset-0 -z-10", m),
43
+ style: {
44
+ background: "linear-gradient(var(--gradient-angle, 0deg), #D33163, #9B5DE5, #C850C0, #D33163)",
45
+ backgroundSize: "300% 300%",
46
+ filter: "blur(8px)"
47
+ },
48
+ animate: {
49
+ opacity: [0.3, 0.5, 0.3],
50
+ backgroundPosition: ["0% 0%", "100% 100%", "0% 0%"]
51
+ },
52
+ transition: {
53
+ opacity: { duration: 3, repeat: 1 / 0, ease: "easeInOut" },
54
+ backgroundPosition: { duration: 4, repeat: 1 / 0, ease: "linear" }
55
+ }
56
+ }
57
+ ),
58
+ f
59
+ ]
60
+ }
61
+ ) : /* @__PURE__ */ t(Ie, { children: f });
62
+ }
63
+ function Qe(n) {
64
+ return n.filterValue ? n.filterValue : typeof n.label == "string" ? n.label : "";
65
+ }
66
+ function Te(n) {
67
+ return typeof n.description == "string" ? n.description : "";
68
+ }
69
+ function Ge({
70
+ placeholders: n,
71
+ interval: m,
72
+ paused: h
73
+ }) {
74
+ const [f, y] = a.useState(0), { reducedMotion: V } = ue();
75
+ return a.useEffect(() => {
76
+ if (h || n.length <= 1) return;
77
+ const q = setInterval(() => {
78
+ y((c) => (c + 1) % n.length);
79
+ }, m);
80
+ return () => clearInterval(q);
81
+ }, [h, n.length, m]), V ? /* @__PURE__ */ t("span", { className: "pointer-events-none absolute text-surface-fg-subtle", children: n[f] }) : /* @__PURE__ */ t(Z, { mode: "wait", children: /* @__PURE__ */ t(
82
+ x.span,
83
+ {
84
+ initial: { opacity: 0, y: -4 },
85
+ animate: { opacity: 1, y: 0 },
86
+ exit: { opacity: 0, y: 4 },
87
+ transition: Y.fade,
88
+ className: "pointer-events-none absolute text-surface-fg-subtle",
89
+ children: n[f]
90
+ },
91
+ n[f]
92
+ ) });
93
+ }
94
+ const Se = a.forwardRef(
95
+ function({
96
+ onSubmit: m,
97
+ state: h = "idle",
98
+ groups: f = [],
99
+ onSearch: y,
100
+ emptyMessage: V = "No results found.",
101
+ emptyState: q,
102
+ variant: c = "hero",
103
+ placeholder: B = "Ask anything...",
104
+ placeholderInterval: fe = 5e3,
105
+ greeting: ee,
106
+ hints: Q,
107
+ agentName: te,
108
+ agentIcon: Oe,
109
+ open: se,
110
+ defaultOpen: me,
111
+ onOpenChange: j,
112
+ keybinding: M = "mod+j",
113
+ disabled: F = !1,
114
+ maxHeight: T = "320px",
115
+ children: w,
116
+ className: G,
117
+ ...S
118
+ }, O) {
119
+ const U = se !== void 0, [pe, be] = a.useState(me ?? !1), R = U ? se : pe, ae = a.useRef(R);
120
+ ae.current = R;
121
+ const N = a.useCallback(
122
+ (e) => {
123
+ const s = typeof e == "function" ? e(ae.current) : e;
124
+ U || be(s), j == null || j(s);
125
+ },
126
+ [U, j]
127
+ ), [i, k] = a.useState(""), [p, C] = a.useState(-1), [re, ge] = a.useState(""), [I, ne] = a.useState(!1), [H, xe] = a.useState(!1), E = a.useRef(null), oe = a.useRef(null), J = a.useId(), ie = `command-bar-listbox-${J}`, { reducedMotion: g } = ue(), $ = { duration: 0 }, he = a.useMemo(() => Pe(), []), z = a.useMemo(
128
+ () => Array.isArray(B) ? B : [B],
129
+ [B]
130
+ ), l = f.length > 0, v = a.useMemo(() => {
131
+ if (!l) return [];
132
+ if (!i.trim()) return f;
133
+ const e = i.toLowerCase();
134
+ return f.map((s) => ({
135
+ ...s,
136
+ items: s.items.filter(
137
+ (o) => Qe(o).toLowerCase().includes(e) || Te(o).toLowerCase().includes(e)
138
+ )
139
+ })).filter((s) => s.items.length > 0);
140
+ }, [f, i, l]), b = a.useMemo(
141
+ () => v.flatMap((e) => e.items),
142
+ [v]
143
+ ), ye = a.useMemo(() => {
144
+ const e = /* @__PURE__ */ new Map();
145
+ let s = 0;
146
+ for (const o of v)
147
+ for (const d of o.items)
148
+ e.set(d.id, s++);
149
+ return e;
150
+ }, [v]), ve = typeof T == "number" ? `${T}px` : T;
151
+ a.useEffect(() => {
152
+ if (c !== "floating" || M === !1) return;
153
+ const e = Array.isArray(M) ? M : [M];
154
+ function s(o) {
155
+ for (const d of e)
156
+ if (Ke(o, d)) {
157
+ o.preventDefault(), N((A) => !A);
158
+ return;
159
+ }
160
+ }
161
+ return document.addEventListener("keydown", s), () => document.removeEventListener("keydown", s);
162
+ }, [c, M, N]), a.useEffect(() => {
163
+ c === "floating" && R && (k(""), C(-1), requestAnimationFrame(() => {
164
+ var e;
165
+ (e = E.current) == null || e.focus();
166
+ }));
167
+ }, [c, R]), a.useEffect(() => {
168
+ var s;
169
+ if (p < 0) return;
170
+ const e = (s = oe.current) == null ? void 0 : s.querySelector(
171
+ `[data-command-index="${p}"]`
172
+ );
173
+ e == null || e.scrollIntoView({ block: "nearest" });
174
+ }, [p]);
175
+ const we = (e) => {
176
+ k(e), C(l && e.trim() ? 0 : -1), y == null || y(e);
177
+ }, de = a.useCallback(() => {
178
+ !i.trim() || F || (ge(i), m == null || m(i));
179
+ }, [i, F, m]), Ne = (e) => {
180
+ var s;
181
+ switch (e.key) {
182
+ case "ArrowDown": {
183
+ if (!l || b.length === 0) return;
184
+ e.preventDefault(), C(
185
+ (o) => o < b.length - 1 ? o + 1 : 0
186
+ );
187
+ break;
188
+ }
189
+ case "ArrowUp": {
190
+ l && b.length > 0 ? (e.preventDefault(), C(
191
+ (o) => o > 0 ? o - 1 : b.length - 1
192
+ )) : !l && !i && re && (e.preventDefault(), k(re));
193
+ break;
194
+ }
195
+ case "Enter": {
196
+ e.preventDefault(), e.metaKey || e.ctrlKey ? de() : l && p >= 0 && b[p] ? (b[p].onSelect(), c === "floating" && N(!1)) : de();
197
+ break;
198
+ }
199
+ case "Escape": {
200
+ e.preventDefault(), h === "responded" ? k("") : c === "floating" ? N(!1) : (s = E.current) == null || s.blur();
201
+ break;
202
+ }
203
+ }
204
+ }, ke = () => {
205
+ var e;
206
+ k(""), C(-1), (e = E.current) == null || e.focus();
207
+ };
208
+ a.useEffect(() => {
209
+ if (H) {
210
+ const e = setTimeout(() => xe(!1), 500);
211
+ return () => clearTimeout(e);
212
+ }
213
+ }, [H]), g || le.snappy;
214
+ const P = g ? $ : Y.fade, L = g ? { opacity: 1, scale: 1, y: 0 } : void 0, D = c === "inline", _ = h === "processing", Ce = h === "responded", W = () => /* @__PURE__ */ t(
215
+ qe,
216
+ {
217
+ active: _,
218
+ rounded: D ? "rounded-ds-md" : "rounded-ds-lg",
219
+ reducedMotion: g,
220
+ children: /* @__PURE__ */ r(
221
+ "div",
222
+ {
223
+ className: u(
224
+ "flex items-center gap-ds-04 border bg-surface-overlay transition-colors transition-shadow duration-fast-02 ease-productive-standard",
225
+ D ? "rounded-ds-md px-ds-04" : "rounded-ds-lg px-ds-05",
226
+ _ ? "border-transparent" : "border-surface-border-strong",
227
+ I && !_ && "border-accent-7 shadow-ring",
228
+ H && "animate-shake"
229
+ ),
230
+ children: [
231
+ /* @__PURE__ */ t(
232
+ je,
233
+ {
234
+ className: u(
235
+ "shrink-0 transition-colors duration-fast-02 ease-productive-standard",
236
+ D ? "h-ico-xs w-ico-xs" : "h-ico-sm w-ico-sm",
237
+ I ? "text-accent-9" : "text-surface-fg-subtle"
238
+ ),
239
+ stroke: 1.5
240
+ }
241
+ ),
242
+ /* @__PURE__ */ r("div", { className: "relative flex flex-1 items-center", children: [
243
+ !i && !I && z.length > 1 && /* @__PURE__ */ t(
244
+ Ge,
245
+ {
246
+ placeholders: z,
247
+ interval: fe,
248
+ paused: I || !!i
249
+ }
250
+ ),
251
+ /* @__PURE__ */ t(
252
+ "input",
253
+ {
254
+ ref: E,
255
+ value: i,
256
+ onChange: (e) => we(e.target.value),
257
+ onFocus: () => ne(!0),
258
+ onBlur: () => ne(!1),
259
+ onKeyDown: Ne,
260
+ placeholder: z.length === 1 || I ? z[0] : "",
261
+ readOnly: _,
262
+ disabled: F,
263
+ role: "combobox",
264
+ "aria-expanded": l && b.length > 0,
265
+ "aria-controls": l ? ie : void 0,
266
+ "aria-activedescendant": l && p >= 0 && b[p] ? `command-bar-item-${J}-${b[p].id}` : void 0,
267
+ "aria-autocomplete": l ? "list" : void 0,
268
+ "aria-label": te ? `Ask ${te}` : "AI Command Bar",
269
+ className: u(
270
+ "flex-1 bg-transparent text-surface-fg outline-none",
271
+ "placeholder:text-surface-fg-subtle",
272
+ D ? "h-9 text-ds-sm" : "h-12 text-ds-base",
273
+ _ && "cursor-wait",
274
+ F && "cursor-not-allowed opacity-50"
275
+ ),
276
+ autoComplete: "off",
277
+ autoCorrect: "off",
278
+ spellCheck: !1
279
+ }
280
+ )
281
+ ] }),
282
+ _ ? /* @__PURE__ */ t(
283
+ Fe,
284
+ {
285
+ className: u(
286
+ "shrink-0 animate-spin text-accent-9",
287
+ D ? "h-ico-xs w-ico-xs" : "h-ico-sm w-ico-sm"
288
+ ),
289
+ stroke: 1.5,
290
+ "data-testid": "command-bar-spinner"
291
+ }
292
+ ) : Ce ? /* @__PURE__ */ t(
293
+ "button",
294
+ {
295
+ type: "button",
296
+ onClick: ke,
297
+ className: "shrink-0 rounded-ds-sm p-ds-01 text-surface-fg-subtle transition-colors duration-fast-01 hover:bg-surface-raised-hover hover:text-surface-fg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9",
298
+ "aria-label": "Clear",
299
+ children: /* @__PURE__ */ t(
300
+ $e,
301
+ {
302
+ className: u(
303
+ D ? "h-ico-xs w-ico-xs" : "h-ico-sm w-ico-sm"
304
+ ),
305
+ stroke: 1.5
306
+ }
307
+ )
308
+ }
309
+ ) : c === "hero" ? /* @__PURE__ */ t(Z, { children: !I && /* @__PURE__ */ r(
310
+ x.kbd,
311
+ {
312
+ initial: L ?? { opacity: 0 },
313
+ animate: { opacity: 1 },
314
+ exit: g ? void 0 : { opacity: 0 },
315
+ transition: P,
316
+ className: "hidden shrink-0 select-none rounded-ds-md border border-surface-border-strong bg-surface-raised px-ds-02b py-ds-01 text-ds-sm font-medium text-surface-fg-subtle shadow-[inset_0_-1px_0_rgba(0,0,0,0.1)] sm:inline-flex",
317
+ children: [
318
+ Ve(he),
319
+ "J"
320
+ ]
321
+ }
322
+ ) }) : null
323
+ ]
324
+ }
325
+ )
326
+ }
327
+ ), X = () => !l || !(b.length > 0 || i.trim() && v.length === 0) && !i.trim() ? null : /* @__PURE__ */ r(
328
+ "div",
329
+ {
330
+ ref: oe,
331
+ id: ie,
332
+ role: "listbox",
333
+ "aria-label": "Command results",
334
+ className: "overflow-y-auto px-ds-03 py-ds-03",
335
+ style: { maxHeight: ve },
336
+ children: [
337
+ v.length === 0 && i.trim() && /* @__PURE__ */ t(
338
+ x.div,
339
+ {
340
+ initial: L ?? { opacity: 0 },
341
+ animate: { opacity: 1 },
342
+ transition: P,
343
+ className: "flex items-center justify-center py-ds-07",
344
+ children: q ?? /* @__PURE__ */ t("p", { className: "text-ds-md text-surface-fg-subtle", children: V })
345
+ }
346
+ ),
347
+ v.map((s, o) => /* @__PURE__ */ r(
348
+ x.div,
349
+ {
350
+ initial: L ?? { opacity: 0 },
351
+ animate: { opacity: 1 },
352
+ transition: g ? $ : { ...Y.fade, delay: o * 0.06 },
353
+ className: "mb-ds-02",
354
+ children: [
355
+ /* @__PURE__ */ t("div", { className: "px-ds-03 pb-ds-02 pt-ds-03", children: /* @__PURE__ */ t("span", { className: "text-ds-xs font-semibold uppercase tracking-wider text-surface-fg-subtle", children: s.label }) }),
356
+ s.items.map((d) => {
357
+ const A = ye.get(d.id) ?? 0, K = A === p;
358
+ return /* @__PURE__ */ r(
359
+ x.button,
360
+ {
361
+ id: `command-bar-item-${J}-${d.id}`,
362
+ type: "button",
363
+ role: "option",
364
+ "aria-selected": K,
365
+ "data-command-index": A,
366
+ initial: L ?? { opacity: 0, y: 4 },
367
+ animate: { opacity: 1, y: 0 },
368
+ transition: g ? $ : { ...le.snappy, delay: A * 0.03 },
369
+ onClick: () => {
370
+ d.onSelect(), c === "floating" && N(!1);
371
+ },
372
+ onMouseEnter: () => C(A),
373
+ className: u(
374
+ "flex w-full items-center gap-ds-04 rounded-ds-lg px-ds-03 py-ds-03 text-left transition-[color,background-color] duration-fast-02 ease-productive-standard",
375
+ K ? "bg-surface-raised-hover text-surface-fg" : "text-surface-fg-muted hover:bg-surface-raised"
376
+ ),
377
+ children: [
378
+ d.icon && /* @__PURE__ */ t(
379
+ "span",
380
+ {
381
+ className: u(
382
+ "[&>svg]:h-ico-sm [&>svg]:w-ico-sm shrink-0 transition-colors duration-fast-02 ease-productive-standard",
383
+ K ? "text-accent-11" : "text-surface-fg-subtle"
384
+ ),
385
+ "aria-hidden": "true",
386
+ children: d.icon
387
+ }
388
+ ),
389
+ /* @__PURE__ */ r("div", { className: "flex flex-1 flex-col", children: [
390
+ /* @__PURE__ */ t("span", { className: "text-ds-md", children: d.renderLabel ? d.renderLabel(i) : d.label }),
391
+ d.description && /* @__PURE__ */ t("span", { className: "text-ds-sm text-surface-fg-subtle", children: d.description })
392
+ ] }),
393
+ /* @__PURE__ */ t(Z, { children: K && /* @__PURE__ */ t(
394
+ x.span,
395
+ {
396
+ initial: g ? void 0 : { opacity: 0 },
397
+ animate: { opacity: 1 },
398
+ exit: g ? void 0 : { opacity: 0 },
399
+ transition: P,
400
+ className: "inline-flex shrink-0",
401
+ children: /* @__PURE__ */ t(
402
+ ce,
403
+ {
404
+ className: "h-ico-sm w-ico-sm text-surface-fg-subtle",
405
+ stroke: 1.5
406
+ }
407
+ )
408
+ }
409
+ ) })
410
+ ]
411
+ },
412
+ d.id
413
+ );
414
+ })
415
+ ]
416
+ },
417
+ s.label
418
+ ))
419
+ ]
420
+ }
421
+ );
422
+ return c === "hero" ? /* @__PURE__ */ r(
423
+ "div",
424
+ {
425
+ ref: O,
426
+ role: "search",
427
+ className: u(
428
+ "bg-surface-raised rounded-ds-xl shadow-raised p-ds-07",
429
+ G
430
+ ),
431
+ ...S,
432
+ children: [
433
+ ee && /* @__PURE__ */ t("p", { className: "text-ds-lg text-surface-fg-muted mb-ds-04", children: ee }),
434
+ W(),
435
+ X(),
436
+ Q && Q.length > 0 && /* @__PURE__ */ t("div", { className: "mt-ds-04 flex flex-wrap gap-ds-02b", children: Q.map((e) => /* @__PURE__ */ t(
437
+ "button",
438
+ {
439
+ type: "button",
440
+ onClick: () => {
441
+ var s;
442
+ k(e), y == null || y(e), (s = E.current) == null || s.focus();
443
+ },
444
+ className: "rounded-ds-md border border-surface-border-strong bg-surface-overlay px-ds-03 py-ds-01 text-ds-sm text-surface-fg-subtle transition-colors duration-fast-02 ease-productive-standard hover:bg-surface-raised-hover hover:text-surface-fg-muted",
445
+ children: e
446
+ },
447
+ e
448
+ )) }),
449
+ w && /* @__PURE__ */ t("div", { className: "mt-ds-05", children: w })
450
+ ]
451
+ }
452
+ ) : c === "inline" ? /* @__PURE__ */ r(
453
+ "div",
454
+ {
455
+ ref: O,
456
+ role: "search",
457
+ className: u("w-full", G),
458
+ ...S,
459
+ children: [
460
+ W(),
461
+ X(),
462
+ w && /* @__PURE__ */ t("div", { className: "mt-ds-03", children: w })
463
+ ]
464
+ }
465
+ ) : /* @__PURE__ */ t(De, { open: R, onOpenChange: (e) => {
466
+ N(e);
467
+ }, children: /* @__PURE__ */ r(_e, { children: [
468
+ /* @__PURE__ */ t(Ae, { className: "fixed inset-0 z-overlay bg-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0" }),
469
+ /* @__PURE__ */ r(
470
+ Me,
471
+ {
472
+ ref: O,
473
+ ...S,
474
+ className: u(
475
+ "fixed left-1/2 top-[20%] z-modal w-full max-w-[560px] -translate-x-1/2",
476
+ "overflow-hidden rounded-ds-xl border border-surface-border-strong bg-surface-overlay shadow-overlay",
477
+ "duration-moderate-02 data-[state=open]:animate-in data-[state=closed]:animate-out",
478
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
479
+ "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
480
+ "data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2",
481
+ "data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2",
482
+ G
483
+ ),
484
+ children: [
485
+ /* @__PURE__ */ r(ze, { children: [
486
+ /* @__PURE__ */ t(Re, { children: "AI Command Bar" }),
487
+ /* @__PURE__ */ t(Ee, { children: "Search commands or ask a question" })
488
+ ] }),
489
+ /* @__PURE__ */ t("div", { className: "p-ds-04", children: W() }),
490
+ X(),
491
+ w && /* @__PURE__ */ t("div", { className: "border-t border-surface-border-strong p-ds-04", children: w }),
492
+ /* @__PURE__ */ r(
493
+ x.div,
494
+ {
495
+ initial: L ?? { opacity: 0 },
496
+ animate: { opacity: 1 },
497
+ transition: P,
498
+ className: "flex items-center gap-ds-05 border-t border-surface-border-strong px-ds-05 py-ds-03",
499
+ children: [
500
+ l && /* @__PURE__ */ r("div", { className: "flex items-center gap-ds-02b", children: [
501
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-ds-01", children: [
502
+ /* @__PURE__ */ t("kbd", { className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded border border-surface-border-strong bg-surface-raised shadow-[inset_0_-1px_0_rgba(0,0,0,0.1)]", children: /* @__PURE__ */ t(
503
+ Le,
504
+ {
505
+ className: "h-ds-03 w-ds-03 text-surface-fg-subtle",
506
+ stroke: 2
507
+ }
508
+ ) }),
509
+ /* @__PURE__ */ t("kbd", { className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded border border-surface-border-strong bg-surface-raised shadow-[inset_0_-1px_0_rgba(0,0,0,0.1)]", children: /* @__PURE__ */ t(
510
+ Be,
511
+ {
512
+ className: "h-ds-03 w-ds-03 text-surface-fg-subtle",
513
+ stroke: 2
514
+ }
515
+ ) })
516
+ ] }),
517
+ /* @__PURE__ */ t("span", { className: "text-ds-xs text-surface-fg-subtle", children: "Navigate" })
518
+ ] }),
519
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-ds-02b", children: [
520
+ /* @__PURE__ */ t("kbd", { className: "inline-flex h-[20px] items-center justify-center rounded-ds-md border border-surface-border-strong bg-surface-raised px-ds-02b shadow-[inset_0_-1px_0_rgba(0,0,0,0.1)]", children: /* @__PURE__ */ t(
521
+ ce,
522
+ {
523
+ className: "h-ds-03 w-ds-03 text-surface-fg-subtle",
524
+ stroke: 2
525
+ }
526
+ ) }),
527
+ /* @__PURE__ */ t("span", { className: "text-ds-xs text-surface-fg-subtle", children: "Submit" })
528
+ ] }),
529
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-ds-02b", children: [
530
+ /* @__PURE__ */ t("kbd", { className: "inline-flex h-[20px] items-center justify-center rounded-ds-md border border-surface-border-strong bg-surface-raised px-ds-02b text-ds-xs font-medium text-surface-fg-subtle shadow-[inset_0_-1px_0_rgba(0,0,0,0.1)]", children: "Esc" }),
531
+ /* @__PURE__ */ t("span", { className: "text-ds-xs text-surface-fg-subtle", children: "Close" })
532
+ ] })
533
+ ]
534
+ }
535
+ )
536
+ ]
537
+ }
538
+ )
539
+ ] }) });
540
+ }
541
+ );
542
+ Se.displayName = "CommandBar";
543
+ export {
544
+ Se as CommandBar
545
+ };
@@ -0,0 +1,20 @@
1
+ "use client";
2
+ import { ConversationMessage, ProcessingStep, BlockComponentProps } from './types';
3
+ import * as React from 'react';
4
+ export interface AIConversationProps {
5
+ messages: ConversationMessage[];
6
+ isProcessing?: boolean;
7
+ processingSteps?: ProcessingStep[];
8
+ agent?: {
9
+ name: string;
10
+ icon?: React.ReactNode;
11
+ };
12
+ onAction?: (actionId: string, type: 'confirm' | 'cancel' | 'undo') => void;
13
+ customBlocks?: Record<string, React.ComponentType<BlockComponentProps<any>>>;
14
+ maxHeight?: string | number;
15
+ autoScroll?: boolean;
16
+ className?: string;
17
+ }
18
+ declare function AIConversation({ messages, isProcessing, processingSteps, agent: agentProp, onAction, customBlocks, maxHeight, autoScroll, className, }: AIConversationProps): import("react/jsx-runtime").JSX.Element;
19
+ export { AIConversation };
20
+ //# sourceMappingURL=conversation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/ai/conversation.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAa9B,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACpB,MAAM,SAAS,CAAA;AAIhB,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,mBAAmB,EAAE,CAAA;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;IAClC,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE,CAAA;IAChD,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,KAAK,IAAI,CAAA;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IAC5E,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA4ND,iBAAS,cAAc,CAAC,EACtB,QAAQ,EACR,YAAoB,EACpB,eAAe,EACf,KAAK,EAAE,SAAS,EAChB,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,UAAiB,EACjB,SAAS,GACV,EAAE,mBAAmB,2CAwHrB;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}