laif-ds 0.1.11 → 0.1.13

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 (61) hide show
  1. package/dist/components/ui/accordion.js +16 -16
  2. package/dist/components/ui/alert-dialog.js +2 -2
  3. package/dist/components/ui/alert.js +5 -5
  4. package/dist/components/ui/async-select.js +39 -39
  5. package/dist/components/ui/audio-visualizer.js +7 -7
  6. package/dist/components/ui/avatar.js +3 -3
  7. package/dist/components/ui/badge.js +12 -12
  8. package/dist/components/ui/breadcrumb.js +1 -1
  9. package/dist/components/ui/button.js +31 -28
  10. package/dist/components/ui/calendar.js +23 -23
  11. package/dist/components/ui/card.js +6 -6
  12. package/dist/components/ui/chart.js +40 -40
  13. package/dist/components/ui/chat-message.js +59 -59
  14. package/dist/components/ui/checkbox.js +7 -7
  15. package/dist/components/ui/command.js +35 -35
  16. package/dist/components/ui/context-menu.js +16 -16
  17. package/dist/components/ui/data-table.js +2 -2
  18. package/dist/components/ui/date-picker.js +14 -14
  19. package/dist/components/ui/dialog.js +11 -11
  20. package/dist/components/ui/drawer.js +5 -5
  21. package/dist/components/ui/file-preview.js +14 -14
  22. package/dist/components/ui/form.js +18 -18
  23. package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsRow.js +6 -6
  24. package/dist/components/ui/gantt/components/Chart/Tree/Tree.js +9 -9
  25. package/dist/components/ui/hover-card.js +5 -5
  26. package/dist/components/ui/input-otp.js +5 -5
  27. package/dist/components/ui/input-selector.js +11 -11
  28. package/dist/components/ui/input.js +25 -25
  29. package/dist/components/ui/interrupt-prompt.js +1 -1
  30. package/dist/components/ui/markdown-renderer.js +19 -19
  31. package/dist/components/ui/menubar.js +16 -16
  32. package/dist/components/ui/message-input.js +29 -29
  33. package/dist/components/ui/multiple-selector.js +92 -92
  34. package/dist/components/ui/navigation-menu.js +13 -13
  35. package/dist/components/ui/popover.js +1 -1
  36. package/dist/components/ui/progress.js +4 -4
  37. package/dist/components/ui/prompt-suggestions.js +9 -9
  38. package/dist/components/ui/radio-group.js +5 -5
  39. package/dist/components/ui/resizable.js +2 -2
  40. package/dist/components/ui/scroll-area.js +7 -7
  41. package/dist/components/ui/select.js +10 -10
  42. package/dist/components/ui/separator.js +3 -3
  43. package/dist/components/ui/sheet.js +8 -8
  44. package/dist/components/ui/sidebar.js +134 -134
  45. package/dist/components/ui/skeleton.js +1 -1
  46. package/dist/components/ui/switch.js +5 -5
  47. package/dist/components/ui/table.js +3 -3
  48. package/dist/components/ui/tabs.js +2 -2
  49. package/dist/components/ui/textarea.js +7 -7
  50. package/dist/components/ui/toaster.js +12 -12
  51. package/dist/components/ui/toggle.js +2 -2
  52. package/dist/components/ui/tooltip.js +2 -2
  53. package/dist/components/ui/typing-indicator.js +8 -8
  54. package/dist/components/ui/typo.js +9 -9
  55. package/dist/dist/components/ui/checkbox.js +5 -5
  56. package/dist/dist/components/ui/scroll-area.js +2 -2
  57. package/dist/dist/components/ui/table.js +1 -1
  58. package/dist/index.d.ts +3 -2
  59. package/dist/styles.css +1 -1
  60. package/dist/styles.v3.css +1 -1
  61. package/package.json +1 -1
@@ -13,7 +13,7 @@ function u({ className: a, size: t = "default", ...o }) {
13
13
  {
14
14
  "data-slot": "card",
15
15
  className: e(
16
- `bg-card text-card-foreground flex flex-col rounded-xl border shadow-sm ${s[t]}`,
16
+ `bg-d-card text-d-card-foreground flex flex-col rounded-xl border shadow-sm ${s[t]}`,
17
17
  a
18
18
  ),
19
19
  ...o
@@ -34,7 +34,7 @@ function x({ className: a, ...t }) {
34
34
  }
35
35
  );
36
36
  }
37
- function m({ className: a, ...t }) {
37
+ function f({ className: a, ...t }) {
38
38
  return /* @__PURE__ */ r(
39
39
  "div",
40
40
  {
@@ -44,12 +44,12 @@ function m({ className: a, ...t }) {
44
44
  }
45
45
  );
46
46
  }
47
- function f({ className: a, ...t }) {
47
+ function m({ className: a, ...t }) {
48
48
  return /* @__PURE__ */ r(
49
49
  "div",
50
50
  {
51
51
  "data-slot": "card-description",
52
- className: e("text-muted-foreground text-sm", a),
52
+ className: e("text-d-secondary-foreground text-sm", a),
53
53
  ...t
54
54
  }
55
55
  );
@@ -77,8 +77,8 @@ function C({ className: a, ...t }) {
77
77
  export {
78
78
  u as Card,
79
79
  g as CardContent,
80
- f as CardDescription,
80
+ m as CardDescription,
81
81
  C as CardFooter,
82
82
  x as CardHeader,
83
- m as CardTitle
83
+ f as CardTitle
84
84
  };
@@ -1,43 +1,43 @@
1
1
  "use client";
2
2
  import { jsx as s, jsxs as f, Fragment as T } from "react/jsx-runtime";
3
- import * as b from "react";
3
+ import * as p from "react";
4
4
  import { cn as u } from "../../lib/utils.js";
5
- import { Tooltip as I } from "../../node_modules/recharts/es6/component/Tooltip.js";
6
- import { Legend as P } from "../../node_modules/recharts/es6/component/Legend.js";
7
- import { ResponsiveContainer as S } from "../../node_modules/recharts/es6/component/ResponsiveContainer.js";
8
- const E = { light: "", dark: ".dark" }, N = b.createContext(null);
5
+ import { Tooltip as y } from "../../node_modules/recharts/es6/component/Tooltip.js";
6
+ import { Legend as I } from "../../node_modules/recharts/es6/component/Legend.js";
7
+ import { ResponsiveContainer as P } from "../../node_modules/recharts/es6/component/ResponsiveContainer.js";
8
+ const S = { light: "", dark: ".dark" }, N = p.createContext(null);
9
9
  function j() {
10
- const c = b.useContext(N);
10
+ const c = p.useContext(N);
11
11
  if (!c)
12
12
  throw new Error("useChart must be used within a <ChartContainer />");
13
13
  return c;
14
14
  }
15
- function z({
15
+ function q({
16
16
  id: c,
17
17
  className: r,
18
18
  children: n,
19
19
  config: t,
20
20
  ...a
21
21
  }) {
22
- const h = b.useId(), o = `chart-${c || h.replace(/:/g, "")}`;
22
+ const h = p.useId(), o = `chart-${c || h.replace(/:/g, "")}`;
23
23
  return /* @__PURE__ */ s(N.Provider, { value: { config: t }, children: /* @__PURE__ */ f(
24
24
  "div",
25
25
  {
26
26
  "data-slot": "chart",
27
27
  "data-chart": o,
28
28
  className: u(
29
- "[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
29
+ "[&_.recharts-cartesian-axis-tick_text]:fill-d-secondary-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-d-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-d-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-d-border [&_.recharts-radial-bar-background-sector]:fill-d-secondary [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-d-secondary [&_.recharts-reference-line_[stroke='#ccc']]:stroke-d-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
30
30
  r
31
31
  ),
32
32
  ...a,
33
33
  children: [
34
- /* @__PURE__ */ s(K, { id: o, config: t }),
35
- /* @__PURE__ */ s(S, { children: n })
34
+ /* @__PURE__ */ s(E, { id: o, config: t }),
35
+ /* @__PURE__ */ s(P, { children: n })
36
36
  ]
37
37
  }
38
38
  ) });
39
39
  }
40
- const K = ({ id: c, config: r }) => {
40
+ const E = ({ id: c, config: r }) => {
41
41
  const n = Object.entries(r).filter(
42
42
  ([, t]) => t.theme || t.color
43
43
  );
@@ -45,7 +45,7 @@ const K = ({ id: c, config: r }) => {
45
45
  "style",
46
46
  {
47
47
  dangerouslySetInnerHTML: {
48
- __html: Object.entries(E).map(
48
+ __html: Object.entries(S).map(
49
49
  ([t, a]) => `
50
50
  ${a} [data-chart=${c}] {
51
51
  ${n.map(([h, o]) => {
@@ -61,8 +61,8 @@ ${n.map(([h, o]) => {
61
61
  }
62
62
  }
63
63
  ) : null;
64
- }, A = I;
65
- function B({
64
+ }, z = y;
65
+ function A({
66
66
  active: c,
67
67
  payload: r,
68
68
  className: n,
@@ -75,13 +75,13 @@ function B({
75
75
  formatter: w,
76
76
  color: $,
77
77
  nameKey: L,
78
- labelKey: p
78
+ labelKey: m
79
79
  }) {
80
- const { config: m } = j(), C = b.useMemo(() => {
80
+ const { config: x } = j(), C = p.useMemo(() => {
81
81
  var v;
82
82
  if (a || !(r != null && r.length))
83
83
  return null;
84
- const [e] = r, _ = `${p || (e == null ? void 0 : e.dataKey) || (e == null ? void 0 : e.name) || "value"}`, g = k(m, e, _), d = !p && typeof o == "string" ? ((v = m[o]) == null ? void 0 : v.label) || o : g == null ? void 0 : g.label;
84
+ const [e] = r, _ = `${m || (e == null ? void 0 : e.dataKey) || (e == null ? void 0 : e.name) || "value"}`, g = k(x, e, _), d = !m && typeof o == "string" ? ((v = x[o]) == null ? void 0 : v.label) || o : g == null ? void 0 : g.label;
85
85
  return i ? /* @__PURE__ */ s("div", { className: u("font-medium", l), children: i(d, r) }) : d ? /* @__PURE__ */ s("div", { className: u("font-medium", l), children: d }) : null;
86
86
  }, [
87
87
  o,
@@ -89,28 +89,28 @@ function B({
89
89
  r,
90
90
  a,
91
91
  l,
92
- m,
93
- p
92
+ x,
93
+ m
94
94
  ]);
95
95
  if (!c || !(r != null && r.length))
96
96
  return null;
97
- const x = r.length === 1 && t !== "dot";
97
+ const b = r.length === 1 && t !== "dot";
98
98
  return /* @__PURE__ */ f(
99
99
  "div",
100
100
  {
101
101
  className: u(
102
- "border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",
102
+ "border-d-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",
103
103
  n
104
104
  ),
105
105
  children: [
106
- x ? null : C,
106
+ b ? null : C,
107
107
  /* @__PURE__ */ s("div", { className: "grid gap-1.5", children: r.map((e, _) => {
108
- const g = `${L || e.name || e.dataKey || "value"}`, d = k(m, e, g), v = $ || e.payload.fill || e.color;
108
+ const g = `${L || e.name || e.dataKey || "value"}`, d = k(x, e, g), v = $ || e.payload.fill || e.color;
109
109
  return /* @__PURE__ */ s(
110
110
  "div",
111
111
  {
112
112
  className: u(
113
- "[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",
113
+ "[&>svg]:text-d-secondary-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",
114
114
  t === "dot" && "items-center"
115
115
  ),
116
116
  children: w && (e == null ? void 0 : e.value) !== void 0 && e.name ? w(e.value, e.name, e, _, e.payload) : /* @__PURE__ */ f(T, { children: [
@@ -118,17 +118,17 @@ function B({
118
118
  "div",
119
119
  {
120
120
  className: u(
121
- "shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
121
+ "shrink-0 rounded-[2px] border-(--color-d-border) bg-(--color-bg)",
122
122
  {
123
123
  "h-2.5 w-2.5": t === "dot",
124
124
  "w-1": t === "line",
125
125
  "w-0 border-[1.5px] border-dashed bg-transparent": t === "dashed",
126
- "my-0.5": x && t === "dashed"
126
+ "my-0.5": b && t === "dashed"
127
127
  }
128
128
  ),
129
129
  style: {
130
130
  "--color-bg": v,
131
- "--color-border": v
131
+ "--color-d-border": v
132
132
  }
133
133
  }
134
134
  ),
@@ -137,12 +137,12 @@ function B({
137
137
  {
138
138
  className: u(
139
139
  "flex flex-1 justify-between leading-none",
140
- x ? "items-end" : "items-center"
140
+ b ? "items-end" : "items-center"
141
141
  ),
142
142
  children: [
143
143
  /* @__PURE__ */ f("div", { className: "grid gap-1.5", children: [
144
- x ? C : null,
145
- /* @__PURE__ */ s("span", { className: "text-muted-foreground", children: (d == null ? void 0 : d.label) || e.name })
144
+ b ? C : null,
145
+ /* @__PURE__ */ s("span", { className: "text-d-secondary-foreground", children: (d == null ? void 0 : d.label) || e.name })
146
146
  ] }),
147
147
  e.value && /* @__PURE__ */ s("span", { className: "text-foreground font-mono font-medium tabular-nums", children: e.value.toLocaleString() })
148
148
  ]
@@ -157,8 +157,8 @@ function B({
157
157
  }
158
158
  );
159
159
  }
160
- const D = P;
161
- function F({
160
+ const B = I;
161
+ function D({
162
162
  className: c,
163
163
  hideIcon: r = !1,
164
164
  payload: n,
@@ -180,7 +180,7 @@ function F({
180
180
  "div",
181
181
  {
182
182
  className: u(
183
- "[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"
183
+ "[&>svg]:text-d-secondary-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"
184
184
  ),
185
185
  children: [
186
186
  l != null && l.icon && !r ? /* @__PURE__ */ s(l.icon, {}) : /* @__PURE__ */ s(
@@ -209,10 +209,10 @@ function k(c, r, n) {
209
209
  return n in r && typeof r[n] == "string" ? a = r[n] : t && n in t && typeof t[n] == "string" && (a = t[n]), a in c ? c[a] : c[n];
210
210
  }
211
211
  export {
212
- z as ChartContainer,
213
- D as ChartLegend,
214
- F as ChartLegendContent,
215
- K as ChartStyle,
216
- A as ChartTooltip,
217
- B as ChartTooltipContent
212
+ q as ChartContainer,
213
+ B as ChartLegend,
214
+ D as ChartLegendContent,
215
+ E as ChartStyle,
216
+ z as ChartTooltip,
217
+ A as ChartTooltipContent
218
218
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { jsxs as l, jsx as e } from "react/jsx-runtime";
3
- import { useMemo as y, Suspense as h, useState as w } from "react";
3
+ import { useMemo as v, Suspense as h, useState as w } from "react";
4
4
  import { cva as C } from "../../node_modules/class-variance-authority/dist/index.js";
5
5
  import { motion as k } from "framer-motion";
6
- import { cn as n } from "../../lib/utils.js";
6
+ import { cn as i } from "../../lib/utils.js";
7
7
  import { Collapsible as U, CollapsibleTrigger as S, CollapsibleContent as T } from "./collapsible.js";
8
8
  import { FilePreview as O } from "./file-preview.js";
9
9
  import { MarkdownRenderer as x } from "./markdown-renderer.js";
@@ -17,8 +17,8 @@ const b = C(
17
17
  {
18
18
  variants: {
19
19
  isUser: {
20
- true: "bg-primary text-primary-foreground",
21
- false: "bg-muted text-foreground"
20
+ true: "bg-d-primary text-d-primary-foreground",
21
+ false: "bg-d-secondary text-foreground"
22
22
  },
23
23
  animation: {
24
24
  none: "",
@@ -51,35 +51,35 @@ const b = C(
51
51
  ]
52
52
  }
53
53
  ), Z = ({
54
- role: a,
55
- content: t,
54
+ role: s,
55
+ content: a,
56
56
  createdAt: r,
57
- showTimeStamp: m = !1,
57
+ showTimeStamp: c = !1,
58
58
  animation: d = "scale",
59
- actions: c,
60
- experimental_attachments: u,
61
- toolInvocations: f,
59
+ actions: m,
60
+ experimental_attachments: f,
61
+ toolInvocations: u,
62
62
  parts: p
63
63
  }) => {
64
- const N = y(() => u == null ? void 0 : u.map((i) => {
65
- const o = F(i.url);
66
- return new File([o], i.name ?? "Unknown");
67
- }), [u]), s = a === "user", g = r == null ? void 0 : r.toLocaleTimeString("en-US", {
64
+ const N = v(() => f == null ? void 0 : f.map((n) => {
65
+ const o = F(n.url);
66
+ return new File([o], n.name ?? "Unknown");
67
+ }), [f]), t = s === "user", g = r == null ? void 0 : r.toLocaleTimeString("en-US", {
68
68
  hour: "2-digit",
69
69
  minute: "2-digit"
70
70
  });
71
- return s ? /* @__PURE__ */ l(
71
+ return t ? /* @__PURE__ */ l(
72
72
  "div",
73
73
  {
74
- className: n("flex flex-col", s ? "items-end" : "items-start"),
74
+ className: i("flex flex-col", t ? "items-end" : "items-start"),
75
75
  children: [
76
- N ? /* @__PURE__ */ e("div", { className: "mb-1 flex flex-wrap gap-2", children: N.map((i, o) => /* @__PURE__ */ e(O, { file: i }, o)) }) : null,
77
- /* @__PURE__ */ e("div", { className: n(b({ isUser: s, animation: d })), children: /* @__PURE__ */ e(h, { fallback: /* @__PURE__ */ e("div", { className: "text-muted-foreground", children: "Caricamento..." }), children: /* @__PURE__ */ e(x, { children: t }) }) }),
78
- m && r ? /* @__PURE__ */ e(
76
+ N ? /* @__PURE__ */ e("div", { className: "mb-1 flex flex-wrap gap-2", children: N.map((n, o) => /* @__PURE__ */ e(O, { file: n }, o)) }) : null,
77
+ /* @__PURE__ */ e("div", { className: i(b({ isUser: t, animation: d })), children: /* @__PURE__ */ e(h, { fallback: /* @__PURE__ */ e("div", { className: "text-d-secondary-foreground", children: "Caricamento..." }), children: /* @__PURE__ */ e(x, { children: a }) }) }),
78
+ c && r ? /* @__PURE__ */ e(
79
79
  "time",
80
80
  {
81
81
  dateTime: r.toISOString(),
82
- className: n(
82
+ className: i(
83
83
  "mt-1 block px-1 text-xs opacity-50",
84
84
  d !== "none" && "duration-500 animate-in fade-in-0"
85
85
  ),
@@ -88,23 +88,23 @@ const b = C(
88
88
  ) : null
89
89
  ]
90
90
  }
91
- ) : p && p.length > 0 ? p.map((i, o) => i.type === "text" ? /* @__PURE__ */ l(
91
+ ) : p && p.length > 0 ? p.map((n, o) => n.type === "text" ? /* @__PURE__ */ l(
92
92
  "div",
93
93
  {
94
- className: n(
94
+ className: i(
95
95
  "flex flex-col",
96
- s ? "items-end" : "items-start"
96
+ t ? "items-end" : "items-start"
97
97
  ),
98
98
  children: [
99
- /* @__PURE__ */ l("div", { className: n(b({ isUser: s, animation: d })), children: [
100
- /* @__PURE__ */ e(h, { fallback: /* @__PURE__ */ e("div", { className: "text-muted-foreground", children: "Caricamento..." }), children: /* @__PURE__ */ e(x, { children: i.text }) }),
101
- c ? /* @__PURE__ */ e("div", { className: "absolute -bottom-4 right-2 flex space-x-1 rounded-lg border bg-background p-1 text-foreground opacity-0 transition-opacity group-hover/message:opacity-100", children: c }) : null
99
+ /* @__PURE__ */ l("div", { className: i(b({ isUser: t, animation: d })), children: [
100
+ /* @__PURE__ */ e(h, { fallback: /* @__PURE__ */ e("div", { className: "text-d-secondary-foreground", children: "Caricamento..." }), children: /* @__PURE__ */ e(x, { children: n.text }) }),
101
+ m ? /* @__PURE__ */ e("div", { className: "absolute -bottom-4 right-2 flex space-x-1 rounded-lg border bg-d-background p-1 text-foreground opacity-0 transition-opacity group-hover/message:opacity-100", children: m }) : null
102
102
  ] }),
103
- m && r ? /* @__PURE__ */ e(
103
+ c && r ? /* @__PURE__ */ e(
104
104
  "time",
105
105
  {
106
106
  dateTime: r.toISOString(),
107
- className: n(
107
+ className: i(
108
108
  "mt-1 block px-1 text-xs opacity-50",
109
109
  d !== "none" && "duration-500 animate-in fade-in-0"
110
110
  ),
@@ -114,22 +114,22 @@ const b = C(
114
114
  ]
115
115
  },
116
116
  `text-${o}`
117
- ) : i.type === "reasoning" ? /* @__PURE__ */ e(L, { part: i }, `reasoning-${o}`) : i.type === "tool-invocation" ? /* @__PURE__ */ e(
118
- v,
117
+ ) : n.type === "reasoning" ? /* @__PURE__ */ e(L, { part: n }, `reasoning-${o}`) : n.type === "tool-invocation" ? /* @__PURE__ */ e(
118
+ y,
119
119
  {
120
- toolInvocations: [i.toolInvocation]
120
+ toolInvocations: [n.toolInvocation]
121
121
  },
122
122
  `tool-${o}`
123
- ) : null) : f && f.length > 0 ? /* @__PURE__ */ e(v, { toolInvocations: f }) : /* @__PURE__ */ l("div", { className: n("flex flex-col", s ? "items-end" : "items-start"), children: [
124
- /* @__PURE__ */ l("div", { className: n(b({ isUser: s, animation: d })), children: [
125
- /* @__PURE__ */ e(h, { fallback: /* @__PURE__ */ e("div", { className: "text-muted-foreground", children: "Caricamento..." }), children: /* @__PURE__ */ e(x, { children: t }) }),
126
- c ? /* @__PURE__ */ e("div", { className: "absolute -bottom-4 right-2 flex space-x-1 rounded-lg border bg-background p-1 text-foreground opacity-0 transition-opacity group-hover/message:opacity-100", children: c }) : null
123
+ ) : null) : u && u.length > 0 ? /* @__PURE__ */ e(y, { toolInvocations: u }) : /* @__PURE__ */ l("div", { className: i("flex flex-col", t ? "items-end" : "items-start"), children: [
124
+ /* @__PURE__ */ l("div", { className: i(b({ isUser: t, animation: d })), children: [
125
+ /* @__PURE__ */ e(h, { fallback: /* @__PURE__ */ e("div", { className: "text-d-secondary-foreground", children: "Caricamento..." }), children: /* @__PURE__ */ e(x, { children: a }) }),
126
+ m ? /* @__PURE__ */ e("div", { className: "absolute -bottom-4 right-2 flex space-x-1 rounded-lg border bg-d-background p-1 text-foreground opacity-0 transition-opacity group-hover/message:opacity-100", children: m }) : null
127
127
  ] }),
128
- m && r ? /* @__PURE__ */ e(
128
+ c && r ? /* @__PURE__ */ e(
129
129
  "time",
130
130
  {
131
131
  dateTime: r.toISOString(),
132
- className: n(
132
+ className: i(
133
133
  "mt-1 block px-1 text-xs opacity-50",
134
134
  d !== "none" && "duration-500 animate-in fade-in-0"
135
135
  ),
@@ -138,20 +138,20 @@ const b = C(
138
138
  ) : null
139
139
  ] });
140
140
  };
141
- function F(a) {
142
- const t = a.split(",")[1], r = Buffer.from(t, "base64");
141
+ function F(s) {
142
+ const a = s.split(",")[1], r = Buffer.from(a, "base64");
143
143
  return new Uint8Array(r);
144
144
  }
145
- const L = ({ part: a }) => {
146
- const [t, r] = w(!1);
145
+ const L = ({ part: s }) => {
146
+ const [a, r] = w(!1);
147
147
  return /* @__PURE__ */ e("div", { className: "mb-2 flex flex-col items-start sm:max-w-[70%]", children: /* @__PURE__ */ l(
148
148
  U,
149
149
  {
150
- open: t,
150
+ open: a,
151
151
  onOpenChange: r,
152
- className: "group w-full overflow-hidden rounded-lg border bg-muted/50",
152
+ className: "group w-full overflow-hidden rounded-lg border bg-d-secondary/50",
153
153
  children: [
154
- /* @__PURE__ */ e("div", { className: "flex items-center p-2", children: /* @__PURE__ */ e(S, { asChild: !0, children: /* @__PURE__ */ l("button", { className: "flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground", children: [
154
+ /* @__PURE__ */ e("div", { className: "flex items-center p-2", children: /* @__PURE__ */ e(S, { asChild: !0, children: /* @__PURE__ */ l("button", { className: "flex items-center gap-2 text-sm text-d-secondary-foreground hover:text-foreground", children: [
155
155
  /* @__PURE__ */ e(B, { className: "h-4 w-4 transition-transform group-data-[state=open]:rotate-90" }),
156
156
  /* @__PURE__ */ e("span", { children: "Thinking" })
157
157
  ] }) }) }),
@@ -159,29 +159,29 @@ const L = ({ part: a }) => {
159
159
  k.div,
160
160
  {
161
161
  initial: !1,
162
- animate: t ? "open" : "closed",
162
+ animate: a ? "open" : "closed",
163
163
  variants: {
164
164
  open: { height: "auto", opacity: 1 },
165
165
  closed: { height: 0, opacity: 0 }
166
166
  },
167
167
  transition: { duration: 0.3, ease: [0.04, 0.62, 0.23, 0.98] },
168
168
  className: "border-t",
169
- children: /* @__PURE__ */ e("div", { className: "p-2", children: /* @__PURE__ */ e("div", { className: "whitespace-pre-wrap text-xs", children: a.reasoning }) })
169
+ children: /* @__PURE__ */ e("div", { className: "p-2", children: /* @__PURE__ */ e("div", { className: "whitespace-pre-wrap text-xs", children: s.reasoning }) })
170
170
  }
171
171
  ) })
172
172
  ]
173
173
  }
174
174
  ) });
175
175
  };
176
- function v({
177
- toolInvocations: a
176
+ function y({
177
+ toolInvocations: s
178
178
  }) {
179
- return a != null && a.length ? /* @__PURE__ */ e("div", { className: "flex flex-col items-start gap-2", children: a.map((t, r) => {
180
- if (t.state === "result" && t.result.__cancelled === !0)
179
+ return s != null && s.length ? /* @__PURE__ */ e("div", { className: "flex flex-col items-start gap-2", children: s.map((a, r) => {
180
+ if (a.state === "result" && a.result.__cancelled === !0)
181
181
  return /* @__PURE__ */ l(
182
182
  "div",
183
183
  {
184
- className: "flex items-center gap-2 rounded-lg border bg-muted/50 px-3 py-2 text-sm text-muted-foreground",
184
+ className: "flex items-center gap-2 rounded-lg border bg-d-secondary/50 px-3 py-2 text-sm text-d-secondary-foreground",
185
185
  children: [
186
186
  /* @__PURE__ */ e(M, { className: "h-4 w-4" }),
187
187
  /* @__PURE__ */ l("span", { children: [
@@ -189,7 +189,7 @@ function v({
189
189
  " ",
190
190
  /* @__PURE__ */ l("span", { className: "font-mono", children: [
191
191
  "`",
192
- t.toolName,
192
+ a.toolName,
193
193
  "`"
194
194
  ] })
195
195
  ] })
@@ -197,13 +197,13 @@ function v({
197
197
  },
198
198
  r
199
199
  );
200
- switch (t.state) {
200
+ switch (a.state) {
201
201
  case "partial-call":
202
202
  case "call":
203
203
  return /* @__PURE__ */ l(
204
204
  "div",
205
205
  {
206
- className: "flex items-center gap-2 rounded-lg border bg-muted/50 px-3 py-2 text-sm text-muted-foreground",
206
+ className: "flex items-center gap-2 rounded-lg border bg-d-secondary/50 px-3 py-2 text-sm text-d-secondary-foreground",
207
207
  children: [
208
208
  /* @__PURE__ */ e($, { className: "h-4 w-4" }),
209
209
  /* @__PURE__ */ l("span", { children: [
@@ -211,7 +211,7 @@ function v({
211
211
  " ",
212
212
  /* @__PURE__ */ l("span", { className: "font-mono", children: [
213
213
  "`",
214
- t.toolName,
214
+ a.toolName,
215
215
  "`"
216
216
  ] }),
217
217
  "..."
@@ -225,21 +225,21 @@ function v({
225
225
  return /* @__PURE__ */ l(
226
226
  "div",
227
227
  {
228
- className: "flex flex-col gap-1.5 rounded-lg border bg-muted/50 px-3 py-2 text-sm",
228
+ className: "flex flex-col gap-1.5 rounded-lg border bg-d-secondary/50 px-3 py-2 text-sm",
229
229
  children: [
230
- /* @__PURE__ */ l("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
230
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-2 text-d-secondary-foreground", children: [
231
231
  /* @__PURE__ */ e(R, { className: "h-4 w-4" }),
232
232
  /* @__PURE__ */ l("span", { children: [
233
233
  "Result from",
234
234
  " ",
235
235
  /* @__PURE__ */ l("span", { className: "font-mono", children: [
236
236
  "`",
237
- t.toolName,
237
+ a.toolName,
238
238
  "`"
239
239
  ] })
240
240
  ] })
241
241
  ] }),
242
- /* @__PURE__ */ e("pre", { className: "overflow-x-auto whitespace-pre-wrap text-foreground", children: JSON.stringify(t.result, null, 2) })
242
+ /* @__PURE__ */ e("pre", { className: "overflow-x-auto whitespace-pre-wrap text-foreground", children: JSON.stringify(a.result, null, 2) })
243
243
  ]
244
244
  },
245
245
  r
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as r } from "react/jsx-runtime";
3
- import { Root as t, Indicator as a } from "../../node_modules/@radix-ui/react-checkbox/dist/index.js";
4
- import { cn as o } from "../../lib/utils.js";
5
- import d from "../../node_modules/lucide-react/dist/esm/icons/check.js";
3
+ import { Root as t, Indicator as d } from "../../node_modules/@radix-ui/react-checkbox/dist/index.js";
4
+ import { cn as a } from "../../lib/utils.js";
5
+ import o from "../../node_modules/lucide-react/dist/esm/icons/check.js";
6
6
  function u({
7
7
  className: e,
8
8
  ...i
@@ -11,17 +11,17 @@ function u({
11
11
  t,
12
12
  {
13
13
  "data-slot": "checkbox",
14
- className: o(
15
- "peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
14
+ className: a(
15
+ "peer border-d-input dark:bg-d-input/30 data-[state=checked]:bg-d-primary data-[state=checked]:text-d-primary-foreground dark:data-[state=checked]:bg-d-primary data-[state=checked]:border-d-primary focus-visible:border-d-ring focus-visible:ring-d-ring/50 aria-invalid:ring-d-destructive/20 dark:aria-invalid:ring-d-destructive/40 aria-invalid:border-d-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
16
16
  e
17
17
  ),
18
18
  ...i,
19
19
  children: /* @__PURE__ */ r(
20
- a,
20
+ d,
21
21
  {
22
22
  "data-slot": "checkbox-indicator",
23
23
  className: "flex items-center justify-center text-current transition-none",
24
- children: /* @__PURE__ */ r(d, { className: "size-3.5" })
24
+ children: /* @__PURE__ */ r(o, { className: "size-3.5" })
25
25
  }
26
26
  )
27
27
  }