@arcadeai/design-system 3.36.2 → 3.37.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.
@@ -1,12 +1,13 @@
1
- import { jsx as r, jsxs as a } from "react/jsx-runtime";
1
+ import { jsx as r, jsxs as n, Fragment as S } from "react/jsx-runtime";
2
2
  import { c as y } from "../../../index-UgeK3A8s.js";
3
- import { Table as A, Code as T, Wrench as C, TriangleAlert as v, CheckCircle2 as S, Loader2 as V } from "lucide-react";
4
- import * as c from "react";
5
- import { Accordion as j, AccordionContent as z, AccordionItem as I, AccordionTrigger as O } from "../atoms/accordion.js";
6
- import { CopyButton as E } from "../atoms/copy-button.js";
7
- import { JsonHighlight as N } from "../atoms/json-highlight.js";
8
- import { cn as l } from "../../../lib/utils.js";
9
- const J = y(
3
+ import { Table as z, Code as V, TriangleAlert as w, ChevronRight as h, Wrench as j, CheckCircle2 as I, Loader2 as E } from "lucide-react";
4
+ import * as l from "react";
5
+ import { Accordion as O, AccordionContent as R, AccordionItem as J, AccordionTrigger as $ } from "../atoms/accordion.js";
6
+ import { Collapsible as D, CollapsibleTrigger as H, CollapsibleContent as F } from "../atoms/collapsible.js";
7
+ import { CopyButton as k } from "../atoms/copy-button.js";
8
+ import { JsonHighlight as v } from "../atoms/json-highlight.js";
9
+ import { cn as c } from "../../../lib/utils.js";
10
+ const M = y(
10
11
  "font-mono text-xs transition-colors",
11
12
  {
12
13
  variants: {
@@ -18,7 +19,7 @@ const J = y(
18
19
  },
19
20
  defaultVariants: { state: "calling" }
20
21
  }
21
- ), R = y(
22
+ ), B = y(
22
23
  "absolute -top-0.5 right-0 size-2 shrink-0 rounded-full ring-2 ring-background",
23
24
  {
24
25
  variants: {
@@ -31,10 +32,10 @@ const J = y(
31
32
  defaultVariants: { state: "calling" }
32
33
  }
33
34
  );
34
- function $(e, t = 140) {
35
+ function L(e, t = 140) {
35
36
  return e.length > t ? `${e.slice(0, t).trimEnd()}...` : e;
36
37
  }
37
- function w(e) {
38
+ function C(e) {
38
39
  if (typeof e == "string")
39
40
  try {
40
41
  return JSON.stringify(JSON.parse(e), null, 2);
@@ -43,7 +44,7 @@ function w(e) {
43
44
  }
44
45
  return JSON.stringify(e, null, 2) ?? "null";
45
46
  }
46
- function D(e) {
47
+ function P(e) {
47
48
  if (typeof e == "string") {
48
49
  try {
49
50
  const t = JSON.parse(e);
@@ -56,9 +57,9 @@ function D(e) {
56
57
  }
57
58
  return typeof e == "object" && e !== null && !Array.isArray(e) ? e : { value: e };
58
59
  }
59
- function H(e) {
60
+ function W(e) {
60
61
  if (typeof e == "string")
61
- return $(e.replace(/\s+/g, " "));
62
+ return L(e.replace(/\s+/g, " "));
62
63
  if (typeof e == "number" || typeof e == "boolean" || e === null || e === void 0)
63
64
  return String(e);
64
65
  if (Array.isArray(e))
@@ -69,100 +70,154 @@ function H(e) {
69
70
  }
70
71
  return String(e);
71
72
  }
72
- function M(e) {
73
+ function _(e) {
73
74
  return typeof e == "string" && e.length > 180 || Array.isArray(e) || typeof e == "object" && e !== null;
74
75
  }
75
- function h({
76
+ function x({
76
77
  activeView: e,
77
78
  panelView: t,
78
79
  children: o,
79
- lazy: i = !1
80
+ lazy: a = !1
80
81
  }) {
81
- const s = e === t, [d, n] = c.useState(s || !i);
82
- return c.useEffect(() => {
83
- s && n(!0);
84
- }, [s]), d ? /* @__PURE__ */ r("div", { className: l(!s && "hidden"), children: o }) : null;
82
+ const s = e === t, [d, i] = l.useState(s || !a);
83
+ return l.useEffect(() => {
84
+ s && i(!0);
85
+ }, [s]), d ? /* @__PURE__ */ r("div", { className: c(!s && "hidden"), children: o }) : null;
85
86
  }
86
- function B({ label: e, value: t }) {
87
- const [, o] = c.useTransition(), [i, s] = c.useState(!1), d = M(t);
88
- return /* @__PURE__ */ a("div", { className: "grid gap-1 px-3 py-2.5 sm:grid-cols-[minmax(0,8rem)_minmax(0,1fr)] sm:gap-3", children: [
87
+ function q({ label: e, value: t }) {
88
+ const [, o] = l.useTransition(), [a, s] = l.useState(!1), d = _(t);
89
+ return /* @__PURE__ */ n("div", { className: "grid gap-1 px-3 py-2.5 sm:grid-cols-[minmax(0,8rem)_minmax(0,1fr)] sm:gap-3", children: [
89
90
  /* @__PURE__ */ r("dt", { className: "font-medium text-[11px] text-muted-foreground uppercase tracking-[0.08em]", children: e }),
90
- /* @__PURE__ */ a("dd", { className: "min-w-0 space-y-2 text-foreground/90 text-xs", children: [
91
- /* @__PURE__ */ r("span", { className: "wrap-break-word block whitespace-pre-wrap", children: H(t) }),
91
+ /* @__PURE__ */ n("dd", { className: "min-w-0 space-y-2 text-foreground/90 text-xs", children: [
92
+ /* @__PURE__ */ r("span", { className: "wrap-break-word block whitespace-pre-wrap", children: W(t) }),
92
93
  d && /* @__PURE__ */ r(
93
94
  "button",
94
95
  {
95
96
  className: "inline-flex items-center rounded-md border border-border/60 px-2 py-1 font-medium text-[11px] text-muted-foreground transition-colors hover:bg-muted/40 hover:text-foreground dark:border-white/10",
96
- onClick: () => o(() => s((n) => !n)),
97
+ onClick: () => o(() => s((i) => !i)),
97
98
  type: "button",
98
- children: i ? "Show less" : "Show more"
99
+ children: a ? "Show less" : "Show more"
99
100
  }
100
101
  ),
101
- i && /* @__PURE__ */ r(
102
- N,
102
+ a && /* @__PURE__ */ r(
103
+ v,
103
104
  {
104
105
  className: "rounded-lg border border-border/60 bg-background/80 dark:border-white/10",
105
- code: w(t)
106
+ code: C(t)
106
107
  }
107
108
  )
108
109
  ] })
109
110
  ] });
110
111
  }
111
- const F = c.memo(function({ value: t }) {
112
- const o = c.useMemo(
113
- () => Object.entries(D(t)),
112
+ const G = l.memo(function({ value: t }) {
113
+ const o = l.useMemo(
114
+ () => Object.entries(P(t)),
114
115
  [t]
115
116
  );
116
- return /* @__PURE__ */ r("div", { className: "overflow-hidden rounded-lg border border-border/60 bg-background/80 dark:border-white/10", children: /* @__PURE__ */ r("dl", { className: "divide-y divide-border/50 dark:divide-white/10", children: o.map(([i, s]) => /* @__PURE__ */ r(B, { label: i, value: s }, i)) }) });
117
- }), x = c.memo(function({
117
+ return /* @__PURE__ */ r("div", { className: "overflow-hidden rounded-lg border border-border/60 bg-background/80 dark:border-white/10", children: /* @__PURE__ */ r("dl", { className: "divide-y divide-border/50 dark:divide-white/10", children: o.map(([a, s]) => /* @__PURE__ */ r(q, { label: a, value: s }, a)) }) });
118
+ }), N = l.memo(function({
118
119
  label: t,
119
120
  value: o,
120
- view: i = "table",
121
+ view: a = "table",
121
122
  className: s,
122
123
  ...d
123
124
  }) {
124
- const n = c.useMemo(() => w(o), [o]);
125
- return /* @__PURE__ */ a("section", { className: l("space-y-2", s), ...d, children: [
126
- /* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-3", children: [
125
+ const i = l.useMemo(() => C(o), [o]);
126
+ return /* @__PURE__ */ n("section", { className: c("space-y-2", s), ...d, children: [
127
+ /* @__PURE__ */ n("div", { className: "flex items-center justify-between gap-3", children: [
127
128
  /* @__PURE__ */ r("h4", { className: "font-medium text-foreground text-xs", children: t }),
128
129
  /* @__PURE__ */ r(
129
- E,
130
+ k,
130
131
  {
131
132
  className: "size-7 shrink-0 text-muted-foreground hover:text-foreground",
132
- content: n,
133
+ content: i,
133
134
  size: "icon",
134
135
  variant: "ghost"
135
136
  }
136
137
  )
137
138
  ] }),
138
- /* @__PURE__ */ r(h, { activeView: i, panelView: "table", children: /* @__PURE__ */ r(F, { value: o }) }),
139
- /* @__PURE__ */ r(h, { activeView: i, lazy: !0, panelView: "code", children: /* @__PURE__ */ r(
140
- N,
139
+ /* @__PURE__ */ r(x, { activeView: a, panelView: "table", children: /* @__PURE__ */ r(G, { value: o }) }),
140
+ /* @__PURE__ */ r(x, { activeView: a, lazy: !0, panelView: "code", children: /* @__PURE__ */ r(
141
+ v,
141
142
  {
142
143
  className: "rounded-lg border border-border/60 bg-background/80 dark:border-white/10",
143
- code: n
144
+ code: i
144
145
  }
145
146
  ) })
146
147
  ] });
147
148
  });
148
- function Q({ className: e, ...t }) {
149
+ function K({
150
+ title: e,
151
+ description: t,
152
+ details: o
153
+ }) {
154
+ return /* @__PURE__ */ n(
155
+ D,
156
+ {
157
+ className: "rounded-lg border border-destructive/25 bg-destructive/[0.04] dark:border-destructive/20 dark:bg-destructive/[0.06]",
158
+ "data-slot": "tool-call-error-notice",
159
+ disabled: !o,
160
+ children: [
161
+ /* @__PURE__ */ n(
162
+ H,
163
+ {
164
+ className: c(
165
+ "group flex w-full items-start gap-2.5 px-3 py-2.5 text-left",
166
+ o && "cursor-pointer"
167
+ ),
168
+ children: [
169
+ /* @__PURE__ */ r(w, { className: "mt-0.5 size-3.5 shrink-0 text-destructive" }),
170
+ /* @__PURE__ */ n("div", { className: "min-w-0 flex-1 space-y-0.5", children: [
171
+ /* @__PURE__ */ r("p", { className: "font-medium text-foreground text-sm", children: e }),
172
+ /* @__PURE__ */ r("p", { className: "text-muted-foreground text-xs", children: t })
173
+ ] }),
174
+ o && /* @__PURE__ */ n(S, { children: [
175
+ /* @__PURE__ */ n("span", { className: "mt-0.5 inline-flex shrink-0 items-center gap-1 text-[11px] text-muted-foreground group-data-[state=open]:hidden", children: [
176
+ "Details",
177
+ /* @__PURE__ */ r(h, { className: "size-3" })
178
+ ] }),
179
+ /* @__PURE__ */ n("span", { className: "mt-0.5 hidden shrink-0 items-center gap-1 text-[11px] text-muted-foreground group-data-[state=open]:inline-flex", children: [
180
+ "Hide",
181
+ /* @__PURE__ */ r(h, { className: "size-3 rotate-90" })
182
+ ] })
183
+ ] })
184
+ ]
185
+ }
186
+ ),
187
+ o && /* @__PURE__ */ r(F, { children: /* @__PURE__ */ n("div", { className: "relative rounded-b-lg border-border/50 border-t bg-card px-3 py-2.5 dark:border-white/10", children: [
188
+ /* @__PURE__ */ r(
189
+ k,
190
+ {
191
+ className: "absolute top-2 right-2 size-6 text-muted-foreground/60 hover:text-muted-foreground",
192
+ content: o,
193
+ size: "icon",
194
+ variant: "ghost"
195
+ }
196
+ ),
197
+ /* @__PURE__ */ r("pre", { className: "wrap-break-word overflow-auto whitespace-pre-wrap pr-8 font-mono text-[11px] text-muted-foreground leading-relaxed", children: o })
198
+ ] }) })
199
+ ]
200
+ }
201
+ );
202
+ }
203
+ function oe({ className: e, ...t }) {
149
204
  return /* @__PURE__ */ r(
150
- j,
205
+ O,
151
206
  {
152
- className: l("w-full", e),
207
+ className: c("w-full", e),
153
208
  "data-slot": "tool-call-accordion",
154
209
  ...t
155
210
  }
156
211
  );
157
212
  }
158
- function U({
213
+ function ne({
159
214
  className: e,
160
215
  ...t
161
216
  }) {
162
217
  return /* @__PURE__ */ r(
163
- I,
218
+ J,
164
219
  {
165
- className: l(
220
+ className: c(
166
221
  "w-full overflow-hidden rounded-xl border border-border/50 bg-card/75 shadow-sm last:border-b dark:border-white/10 dark:shadow-black/20",
167
222
  e
168
223
  ),
@@ -171,57 +226,57 @@ function U({
171
226
  }
172
227
  );
173
228
  }
174
- function X({
229
+ function ie({
175
230
  className: e,
176
231
  state: t,
177
232
  toolName: o,
178
- icon: i,
233
+ icon: a,
179
234
  showStateIndicator: s = !0,
180
235
  ...d
181
236
  }) {
182
- const n = t ?? "calling", m = i ?? /* @__PURE__ */ r(C, { className: "size-3.5 text-muted-foreground" }), g = {
183
- calling: /* @__PURE__ */ r(V, { className: "size-3 shrink-0 animate-spin text-orange-500" }),
184
- complete: /* @__PURE__ */ r(S, { className: "size-3 shrink-0 text-green-500" }),
185
- error: /* @__PURE__ */ r(v, { className: "size-3 shrink-0 text-destructive" })
237
+ const i = t ?? "calling", m = a ?? /* @__PURE__ */ r(j, { className: "size-3.5 text-muted-foreground" }), g = {
238
+ calling: /* @__PURE__ */ r(E, { className: "size-3 shrink-0 animate-spin text-orange-500" }),
239
+ complete: /* @__PURE__ */ r(I, { className: "size-3 shrink-0 text-green-500" }),
240
+ error: /* @__PURE__ */ r(w, { className: "size-3 shrink-0 text-destructive" })
186
241
  }, f = {
187
242
  calling: "Running",
188
243
  complete: "Completed",
189
244
  error: "Failed"
190
245
  };
191
- return /* @__PURE__ */ a(
192
- O,
246
+ return /* @__PURE__ */ n(
247
+ $,
193
248
  {
194
- className: l(
249
+ className: c(
195
250
  "items-center gap-3 px-3 py-3 hover:bg-muted/15 hover:no-underline [&>svg]:translate-y-0 [&>svg]:self-center",
196
- J({ state: n }),
251
+ M({ state: i }),
197
252
  e
198
253
  ),
199
254
  "data-slot": "tool-call-accordion-trigger",
200
255
  ...d,
201
256
  children: [
202
- /* @__PURE__ */ a("div", { className: "relative shrink-0", children: [
257
+ /* @__PURE__ */ n("div", { className: "relative shrink-0", children: [
203
258
  /* @__PURE__ */ r("div", { className: "flex size-8 items-center justify-center rounded-full bg-muted/45 ring-1 ring-border/50", children: m }),
204
259
  s && /* @__PURE__ */ r(
205
260
  "span",
206
261
  {
207
262
  "aria-hidden": "true",
208
- className: R({
209
- state: n
263
+ className: B({
264
+ state: i
210
265
  })
211
266
  }
212
267
  )
213
268
  ] }),
214
269
  /* @__PURE__ */ r("div", { className: "min-w-0 flex-1 text-left", children: /* @__PURE__ */ r("span", { className: "block truncate text-foreground text-xs", children: o }) }),
215
- /* @__PURE__ */ a(
270
+ /* @__PURE__ */ n(
216
271
  "span",
217
272
  {
218
- className: l(
273
+ className: c(
219
274
  "inline-flex shrink-0 items-center gap-1.5 self-center text-[11px] text-muted-foreground leading-none",
220
- n === "error" && "text-destructive"
275
+ i === "error" && "text-destructive"
221
276
  ),
222
277
  children: [
223
- g[n],
224
- f[n]
278
+ g[i],
279
+ f[i]
225
280
  ]
226
281
  }
227
282
  )
@@ -229,73 +284,75 @@ function X({
229
284
  }
230
285
  );
231
286
  }
232
- function Y({
287
+ function ae({
233
288
  className: e,
234
289
  children: t,
235
290
  view: o,
236
- onViewChange: i,
291
+ onViewChange: a,
237
292
  showViewToggle: s = !0,
238
293
  args: d,
239
- result: n,
240
- ...m
294
+ result: i,
295
+ errorNotice: m,
296
+ ...g
241
297
  }) {
242
- const [g, f] = c.useState("table"), [, k] = c.useTransition(), u = o ?? g, b = (p) => {
243
- i?.(p), o === void 0 && k(() => f(p));
298
+ const [f, T] = l.useState("table"), [, A] = l.useTransition(), u = o ?? f, p = (b) => {
299
+ a?.(b), o === void 0 && A(() => T(b));
244
300
  };
245
301
  return /* @__PURE__ */ r(
246
- z,
302
+ R,
247
303
  {
248
304
  className: "w-full border-border/50 border-t bg-muted/10 dark:border-white/10",
249
305
  "data-slot": "tool-call-accordion-content",
250
- ...m,
251
- children: /* @__PURE__ */ a("div", { className: l("space-y-3 overflow-auto px-3 py-3", e), children: [
252
- s && /* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-3", children: [
306
+ ...g,
307
+ children: /* @__PURE__ */ n("div", { className: c("space-y-3 overflow-auto px-3 py-3", e), children: [
308
+ s && /* @__PURE__ */ n("div", { className: "flex items-center justify-between gap-3", children: [
253
309
  /* @__PURE__ */ r("p", { className: "truncate text-[11px] text-muted-foreground", children: "Inspect payload and response" }),
254
- /* @__PURE__ */ a("div", { className: "inline-flex shrink-0 items-center gap-0.5 rounded-lg border border-border/60 bg-background/70 p-0.5 shadow-sm dark:border-white/10", children: [
255
- /* @__PURE__ */ a(
310
+ /* @__PURE__ */ n("div", { className: "inline-flex shrink-0 items-center gap-0.5 rounded-lg border border-border/60 bg-background/70 p-0.5 shadow-sm dark:border-white/10", children: [
311
+ /* @__PURE__ */ n(
256
312
  "button",
257
313
  {
258
- className: l(
314
+ className: c(
259
315
  "inline-flex h-6.5 items-center justify-center gap-1.5 rounded-md px-2.5 text-[11px] transition-colors",
260
316
  u === "table" ? "bg-background text-foreground shadow-sm ring-1 ring-border/60" : "text-muted-foreground hover:bg-background/60 hover:text-foreground"
261
317
  ),
262
- onClick: () => b("table"),
318
+ onClick: () => p("table"),
263
319
  type: "button",
264
320
  children: [
265
- /* @__PURE__ */ r(A, { className: "size-3.5" }),
321
+ /* @__PURE__ */ r(z, { className: "size-3.5" }),
266
322
  "Table"
267
323
  ]
268
324
  }
269
325
  ),
270
- /* @__PURE__ */ a(
326
+ /* @__PURE__ */ n(
271
327
  "button",
272
328
  {
273
- className: l(
329
+ className: c(
274
330
  "inline-flex h-6.5 items-center justify-center gap-1.5 rounded-md px-2.5 text-[11px] transition-colors",
275
331
  u === "code" ? "bg-background text-foreground shadow-sm ring-1 ring-border/60" : "text-muted-foreground hover:bg-background/60 hover:text-foreground"
276
332
  ),
277
- onClick: () => b("code"),
333
+ onClick: () => p("code"),
278
334
  type: "button",
279
335
  children: [
280
- /* @__PURE__ */ r(T, { className: "size-3.5" }),
336
+ /* @__PURE__ */ r(V, { className: "size-3.5" }),
281
337
  "JSON"
282
338
  ]
283
339
  }
284
340
  )
285
341
  ] })
286
342
  ] }),
287
- /* @__PURE__ */ a("div", { className: "space-y-3", children: [
343
+ /* @__PURE__ */ n("div", { className: "space-y-3", children: [
288
344
  t,
289
- d !== void 0 && /* @__PURE__ */ r(x, { label: "Parameters", value: d, view: u }),
290
- n !== void 0 && /* @__PURE__ */ r(x, { label: "Response", value: n, view: u })
345
+ m && /* @__PURE__ */ r(K, { ...m }),
346
+ d !== void 0 && /* @__PURE__ */ r(N, { label: "Parameters", value: d, view: u }),
347
+ i !== void 0 && /* @__PURE__ */ r(N, { label: "Response", value: i, view: u })
291
348
  ] })
292
349
  ] })
293
350
  }
294
351
  );
295
352
  }
296
353
  export {
297
- Q as ToolCallAccordion,
298
- Y as ToolCallAccordionContent,
299
- U as ToolCallAccordionItem,
300
- X as ToolCallAccordionTrigger
354
+ oe as ToolCallAccordion,
355
+ ae as ToolCallAccordionContent,
356
+ ne as ToolCallAccordionItem,
357
+ ie as ToolCallAccordionTrigger
301
358
  };
@@ -1 +1 @@
1
- {"version":3,"file":"chat-template-skeletons.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/templates/chat-template-skeletons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAcpC,MAAM,MAAM,uBAAuB,GAAG,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;AAErE,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,uBAAuB,2CAYzB;AAID,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAEhE,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,qBAAqB,2CAevB;AAkBD,MAAM,MAAM,uBAAuB,GAAG,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;AAErE,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,uBAAuB,2CAyBzB;AAID,MAAM,MAAM,wBAAwB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAEnE,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,wBAAwB,2CA8C1B;AAID,MAAM,MAAM,wBAAwB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAEnE,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,wBAAwB,2CAQ1B"}
1
+ {"version":3,"file":"chat-template-skeletons.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/templates/chat-template-skeletons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAepC,MAAM,MAAM,uBAAuB,GAAG,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;AAErE,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,uBAAuB,2CAYzB;AAID,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAEhE,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,qBAAqB,2CAevB;AAID,MAAM,MAAM,uBAAuB,GAAG,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;AAErE,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,uBAAuB,2CAyBzB;AAID,MAAM,MAAM,wBAAwB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAEnE,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,wBAAwB,2CA8C1B;AAID,MAAM,MAAM,wBAAwB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAEnE,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,wBAAwB,2CAQ1B"}
@@ -1,61 +1,53 @@
1
1
  import { jsx as e, jsxs as a } from "react/jsx-runtime";
2
2
  import { Skeleton as l } from "../atoms/skeleton.js";
3
- import { ChatTemplateOverview as o, ChatTemplate as t, ChatTemplateFooter as i, ChatTemplateSuggestions as h, ChatTemplateHeader as p, ChatTemplateHeaderGroup as n } from "./chat-template.js";
4
- import { cn as m } from "../../../lib/utils.js";
5
- function f({
3
+ import { SuggestionCardSkeleton as o } from "../molecules/suggestion-card.js";
4
+ import { ChatTemplateOverview as c, ChatTemplate as i, ChatTemplateFooter as h, ChatTemplateSuggestions as p, ChatTemplateHeader as f, ChatTemplateHeaderGroup as n } from "./chat-template.js";
5
+ import { cn as r } from "../../../lib/utils.js";
6
+ function u({
6
7
  className: s,
7
8
  ...d
8
9
  }) {
9
- return /* @__PURE__ */ a(p, { className: s, ...d, children: [
10
+ return /* @__PURE__ */ a(f, { className: s, ...d, children: [
10
11
  /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(l, { className: "h-7 w-7 rounded-md" }) }),
11
12
  /* @__PURE__ */ e("div", { className: "flex-1" }),
12
13
  /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(l, { className: "h-9 w-9 rounded-md sm:w-[88px]" }) })
13
14
  ] });
14
15
  }
15
- function u({
16
+ function x({
16
17
  className: s,
17
18
  ...d
18
19
  }) {
19
20
  return /* @__PURE__ */ e(
20
21
  "div",
21
22
  {
22
- className: m(
23
+ className: r(
23
24
  "flex min-w-0 flex-1 flex-col gap-6 overflow-y-auto pt-4",
24
25
  s
25
26
  ),
26
27
  ...d,
27
- children: /* @__PURE__ */ a(o, { children: [
28
+ children: /* @__PURE__ */ a(c, { children: [
28
29
  /* @__PURE__ */ e(l, { className: "mx-auto mb-2 h-8 w-40 rounded-lg sm:mb-4 sm:h-9 sm:w-48 md:h-[44px] md:w-56" }),
29
30
  /* @__PURE__ */ e(l, { className: "mx-auto mb-4 h-7 w-56 rounded-lg sm:mb-8 sm:h-8 sm:w-72 md:h-[44px] md:w-96" })
30
31
  ] })
31
32
  }
32
33
  );
33
34
  }
34
- function x() {
35
- return /* @__PURE__ */ a("div", { className: "flex w-full flex-col gap-2 rounded-2xl border bg-card p-4 shadow-xs", children: [
36
- /* @__PURE__ */ e(l, { className: "h-8 w-8 rounded-xl sm:h-10 sm:w-10" }),
37
- /* @__PURE__ */ a("div", { className: "space-y-2 pt-2", children: [
38
- /* @__PURE__ */ e(l, { className: "h-4 w-3/4" }),
39
- /* @__PURE__ */ e(l, { className: "h-3 w-1/2" })
40
- ] })
41
- ] });
42
- }
43
35
  function N({
44
36
  className: s,
45
37
  ...d
46
38
  }) {
47
- return /* @__PURE__ */ a(i, { className: s, ...d, children: [
48
- /* @__PURE__ */ e(h, { children: Array.from({ length: 5 }).map((c, r) => /* @__PURE__ */ e(
39
+ return /* @__PURE__ */ a(h, { className: s, ...d, children: [
40
+ /* @__PURE__ */ e(p, { children: Array.from({ length: 5 }).map((t, m) => /* @__PURE__ */ e(
49
41
  "div",
50
42
  {
51
- className: m(
43
+ className: r(
52
44
  "col-span-12 sm:col-span-6",
53
- r < 3 ? "md:col-span-4" : "md:col-span-6",
54
- r > 1 && "hidden sm:block"
45
+ m < 3 ? "md:col-span-4" : "md:col-span-6",
46
+ m > 1 && "hidden sm:block"
55
47
  ),
56
- children: /* @__PURE__ */ e(x, {})
48
+ children: /* @__PURE__ */ e(o, {})
57
49
  },
58
- `suggestion-skeleton-${r.toString()}`
50
+ `suggestion-skeleton-${m.toString()}`
59
51
  )) }),
60
52
  /* @__PURE__ */ a("div", { className: "rounded-lg border bg-background p-2 shadow-xs", children: [
61
53
  /* @__PURE__ */ e(l, { className: "h-[44px] w-full rounded-md" }),
@@ -63,14 +55,14 @@ function N({
63
55
  ] })
64
56
  ] });
65
57
  }
66
- function C({
58
+ function k({
67
59
  className: s,
68
60
  ...d
69
61
  }) {
70
62
  return /* @__PURE__ */ a(
71
63
  "div",
72
64
  {
73
- className: m(
65
+ className: r(
74
66
  "flex w-(--sidebar-width) shrink-0 flex-col bg-sidebar p-2",
75
67
  s
76
68
  ),
@@ -82,7 +74,7 @@ function C({
82
74
  ] }),
83
75
  /* @__PURE__ */ a("div", { className: "flex-1 overflow-hidden py-2", children: [
84
76
  /* @__PURE__ */ e("div", { className: "px-2 py-1", children: /* @__PURE__ */ e(l, { className: "mb-2 h-3 w-12" }) }),
85
- /* @__PURE__ */ e("div", { className: "flex flex-col gap-0.5", children: Array.from({ length: 6 }).map((c, r) => /* @__PURE__ */ e(
77
+ /* @__PURE__ */ e("div", { className: "flex flex-col gap-0.5", children: Array.from({ length: 6 }).map((t, m) => /* @__PURE__ */ e(
86
78
  "div",
87
79
  {
88
80
  className: "flex h-8 items-center gap-2 rounded-md px-2",
@@ -90,11 +82,11 @@ function C({
90
82
  l,
91
83
  {
92
84
  className: "h-4 flex-1",
93
- style: { maxWidth: `${55 + r * 17 % 35}%` }
85
+ style: { maxWidth: `${55 + m * 17 % 35}%` }
94
86
  }
95
87
  )
96
88
  },
97
- `skeleton-row-${r.toString()}`
89
+ `skeleton-row-${m.toString()}`
98
90
  )) })
99
91
  ] }),
100
92
  /* @__PURE__ */ e("div", { className: "mt-auto p-2", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2 rounded-lg p-2", children: [
@@ -108,20 +100,20 @@ function C({
108
100
  }
109
101
  );
110
102
  }
111
- function k({
103
+ function S({
112
104
  className: s,
113
105
  ...d
114
106
  }) {
115
- return /* @__PURE__ */ a(t, { className: s, ...d, children: [
116
- /* @__PURE__ */ e(f, {}),
107
+ return /* @__PURE__ */ a(i, { className: s, ...d, children: [
117
108
  /* @__PURE__ */ e(u, {}),
109
+ /* @__PURE__ */ e(x, {}),
118
110
  /* @__PURE__ */ e(N, {})
119
111
  ] });
120
112
  }
121
113
  export {
122
- u as ChatBodySkeleton,
123
- k as ChatContentSkeleton,
114
+ x as ChatBodySkeleton,
115
+ S as ChatContentSkeleton,
124
116
  N as ChatFooterSkeleton,
125
- f as ChatHeaderSkeleton,
126
- C as ChatSidebarSkeleton
117
+ u as ChatHeaderSkeleton,
118
+ k as ChatSidebarSkeleton
127
119
  };