laif-ds 0.1.32 → 0.1.34

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 (52) hide show
  1. package/dist/components/ui/accordion.js +2 -7
  2. package/dist/components/ui/alert-dialog.js +10 -37
  3. package/dist/components/ui/alert.js +1 -5
  4. package/dist/components/ui/app-multiple-select-dropdown.js +120 -116
  5. package/dist/components/ui/app-select.js +9 -1
  6. package/dist/components/ui/app-sidebar.js +9 -23
  7. package/dist/components/ui/aspect-ratio.js +1 -3
  8. package/dist/components/ui/async-select.js +80 -64
  9. package/dist/components/ui/audio-visualizer.js +3 -2
  10. package/dist/components/ui/button.js +45 -5
  11. package/dist/components/ui/card.js +7 -2
  12. package/dist/components/ui/charts/circular.js +1 -1
  13. package/dist/components/ui/chat-message.js +34 -16
  14. package/dist/components/ui/chat.js +4 -4
  15. package/dist/components/ui/command.js +1 -1
  16. package/dist/components/ui/data-cross-table.js +33 -9
  17. package/dist/components/ui/data-table.js +4 -4
  18. package/dist/components/ui/date-picker.js +2 -2
  19. package/dist/components/ui/dropdown-menu.js +7 -7
  20. package/dist/components/ui/file-preview.js +9 -9
  21. package/dist/components/ui/gantt/components/Chart/Bars/Bars.js +25 -3
  22. package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarItem/BarItem.js +32 -13
  23. package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsItems/BarItems.js +7 -1
  24. package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsRow.js +6 -1
  25. package/dist/components/ui/gantt/components/Chart/Chart.js +19 -3
  26. package/dist/components/ui/gantt/components/Chart/Scale/Scale.js +80 -71
  27. package/dist/components/ui/gantt/components/Chart/Tree/Tree.js +72 -54
  28. package/dist/components/ui/gantt/components/Controls/Controls.js +4 -2
  29. package/dist/components/ui/gantt/hooks/useGanttCalculate.js +11 -1
  30. package/dist/components/ui/gantt/utils/getWholeWidth.js +4 -1
  31. package/dist/components/ui/gantt/utils/transformData.js +7 -4
  32. package/dist/components/ui/input-selector.js +5 -2
  33. package/dist/components/ui/input.js +41 -46
  34. package/dist/components/ui/interrupt-prompt.js +2 -2
  35. package/dist/components/ui/markdown-renderer.js +2 -2
  36. package/dist/components/ui/message-input.js +12 -10
  37. package/dist/components/ui/multiple-selector.js +44 -31
  38. package/dist/components/ui/prompt-suggestions.js +2 -2
  39. package/dist/components/ui/resizable.js +1 -1
  40. package/dist/components/ui/select.js +6 -10
  41. package/dist/components/ui/sidebar.js +27 -19
  42. package/dist/components/ui/slider.js +103 -89
  43. package/dist/components/ui/table-skeleton.js +29 -11
  44. package/dist/components/ui/table.js +4 -1
  45. package/dist/components/ui/tabs.js +1 -1
  46. package/dist/components/ui/theme-switcher.js +2 -7
  47. package/dist/components/ui/typing-indicator.js +4 -4
  48. package/dist/components/ui/typo.js +1 -8
  49. package/dist/hooks/use-mobile.js +3 -1
  50. package/dist/index.d.ts +9 -8
  51. package/dist/styles.css +1 -1
  52. package/package.json +3 -1
@@ -65,7 +65,9 @@ function Ee({
65
65
  const s = await l(a);
66
66
  P(s), p(s);
67
67
  } catch (s) {
68
- h(s instanceof Error ? s.message : "Failed to fetch options");
68
+ h(
69
+ s instanceof Error ? s.message : "Failed to fetch options"
70
+ );
69
71
  } finally {
70
72
  u(!1);
71
73
  }
@@ -77,28 +79,35 @@ function Ee({
77
79
  const s = await l(g);
78
80
  P(s), p(s);
79
81
  } catch (s) {
80
- h(s instanceof Error ? s.message : "Failed to fetch options");
82
+ h(
83
+ s instanceof Error ? s.message : "Failed to fetch options"
84
+ );
81
85
  } finally {
82
86
  u(!1);
83
87
  }
84
88
  };
85
- f && d ? d && p(g ? T.filter((s) => x ? x(s, g) : !0) : T) : t();
89
+ f && d ? d && p(
90
+ g ? T.filter(
91
+ (s) => x ? x(s, g) : !0
92
+ ) : T
93
+ ) : t();
86
94
  }, [l, g, f, d, x]);
87
- const Y = F((t) => {
88
- const s = v && t === C ? "" : t;
89
- S(s), L(o.find((_) => i(_) === s) || null), m(s), N(!1);
90
- }, [C, m, v, o, i]), Z = F((t) => {
91
- t.stopPropagation(), t.preventDefault(), S(""), L(null), m(""), N(!1);
92
- }, [m]), I = V.useId();
95
+ const Y = F(
96
+ (t) => {
97
+ const s = v && t === C ? "" : t;
98
+ S(s), L(
99
+ o.find((_) => i(_) === s) || null
100
+ ), m(s), N(!1);
101
+ },
102
+ [C, m, v, o, i]
103
+ ), Z = F(
104
+ (t) => {
105
+ t.stopPropagation(), t.preventDefault(), S(""), L(null), m(""), N(!1);
106
+ },
107
+ [m]
108
+ ), I = V.useId();
93
109
  return /* @__PURE__ */ n("div", { className: "space-y-1.5", children: [
94
- c && /* @__PURE__ */ e(
95
- ne,
96
- {
97
- htmlFor: I,
98
- className: U,
99
- children: c
100
- }
101
- ),
110
+ c && /* @__PURE__ */ e(ne, { htmlFor: I, className: U, children: c }),
102
111
  /* @__PURE__ */ n(le, { open: E, onOpenChange: N, children: [
103
112
  /* @__PURE__ */ e(ce, { asChild: !0, children: /* @__PURE__ */ e(
104
113
  se,
@@ -109,19 +118,19 @@ function Ee({
109
118
  "aria-expanded": E,
110
119
  className: D(
111
120
  he({ size: K }),
112
- j && "opacity-50 cursor-not-allowed",
121
+ j && "cursor-not-allowed opacity-50",
113
122
  H,
114
123
  "font-normal"
115
124
  ),
116
125
  style: { width: k },
117
126
  disabled: j,
118
- children: /* @__PURE__ */ n("div", { className: "flex-1 flex items-center justify-between overflow-hidden", children: [
127
+ children: /* @__PURE__ */ n("div", { className: "flex flex-1 items-center justify-between overflow-hidden", children: [
119
128
  z ? /* @__PURE__ */ e("div", { className: "truncate", children: B(z) }) : /* @__PURE__ */ e("span", { className: "text-d-muted-foreground hover:text-d-foreground", children: X }),
120
129
  /* @__PURE__ */ n("div", { className: "flex items-center gap-1", children: [
121
130
  v && z && /* @__PURE__ */ e(
122
131
  "div",
123
132
  {
124
- className: "flex items-center justify-center rounded-full bg-d-secondary/20 hover:bg-d-secondary/30 p-1 cursor-pointer z-20 border",
133
+ className: "bg-d-secondary/20 hover:bg-d-secondary/30 z-20 flex cursor-pointer items-center justify-center rounded-full border p-1",
125
134
  onClick: Z,
126
135
  onMouseDown: (t) => t.preventDefault(),
127
136
  "aria-label": "Clear selection",
@@ -133,55 +142,62 @@ function Ee({
133
142
  ] })
134
143
  }
135
144
  ) }),
136
- /* @__PURE__ */ e(de, { style: { width: k }, className: D("p-0", q), children: /* @__PURE__ */ n(oe, { shouldFilter: !1, children: [
137
- /* @__PURE__ */ n("div", { className: "relative border-b w-full", children: [
138
- /* @__PURE__ */ e(
139
- re,
140
- {
141
- placeholder: `Search ${typeof c == "string" ? c.toLowerCase() : "options"}...`,
142
- value: O,
143
- onValueChange: (t) => {
144
- W(t);
145
- }
146
- }
147
- ),
148
- w && o.length > 0 && /* @__PURE__ */ e("div", { className: "absolute right-2 top-1/2 transform -translate-y-1/2 flex items-center", children: /* @__PURE__ */ e(pe, { className: "h-4 w-4 animate-spin" }) })
149
- ] }),
150
- /* @__PURE__ */ n(ae, { children: [
151
- b && /* @__PURE__ */ e("div", { className: "p-3 text-d-destructive text-center", children: b }),
152
- w && o.length === 0 && (R || /* @__PURE__ */ e(ge, {})),
153
- !w && !b && o.length === 0 && (G || /* @__PURE__ */ e(ie, { children: J ?? `No ${typeof c == "string" ? c.toLowerCase() : "options"} found.` })),
154
- /* @__PURE__ */ e(M, { children: o.map((t) => /* @__PURE__ */ n(
155
- $,
156
- {
157
- value: i(t),
158
- onSelect: Y,
159
- children: [
160
- A(t),
161
- /* @__PURE__ */ e(
162
- ue,
163
- {
164
- className: D(
165
- "ml-auto h-3 w-3",
166
- C === i(t) ? "opacity-100" : "opacity-0"
167
- )
145
+ /* @__PURE__ */ e(
146
+ de,
147
+ {
148
+ style: { width: k },
149
+ className: D("p-0", q),
150
+ children: /* @__PURE__ */ n(oe, { shouldFilter: !1, children: [
151
+ /* @__PURE__ */ n("div", { className: "relative w-full border-b", children: [
152
+ /* @__PURE__ */ e(
153
+ re,
154
+ {
155
+ placeholder: `Search ${typeof c == "string" ? c.toLowerCase() : "options"}...`,
156
+ value: O,
157
+ onValueChange: (t) => {
158
+ W(t);
168
159
  }
169
- )
170
- ]
171
- },
172
- i(t)
173
- )) })
174
- ] })
175
- ] }) })
160
+ }
161
+ ),
162
+ w && o.length > 0 && /* @__PURE__ */ e("div", { className: "absolute top-1/2 right-2 flex -translate-y-1/2 transform items-center", children: /* @__PURE__ */ e(pe, { className: "h-4 w-4 animate-spin" }) })
163
+ ] }),
164
+ /* @__PURE__ */ n(ae, { children: [
165
+ b && /* @__PURE__ */ e("div", { className: "text-d-destructive p-3 text-center", children: b }),
166
+ w && o.length === 0 && (R || /* @__PURE__ */ e(ge, {})),
167
+ !w && !b && o.length === 0 && (G || /* @__PURE__ */ e(ie, { children: J ?? `No ${typeof c == "string" ? c.toLowerCase() : "options"} found.` })),
168
+ /* @__PURE__ */ e(M, { children: o.map((t) => /* @__PURE__ */ n(
169
+ $,
170
+ {
171
+ value: i(t),
172
+ onSelect: Y,
173
+ children: [
174
+ A(t),
175
+ /* @__PURE__ */ e(
176
+ ue,
177
+ {
178
+ className: D(
179
+ "ml-auto h-3 w-3",
180
+ C === i(t) ? "opacity-100" : "opacity-0"
181
+ )
182
+ }
183
+ )
184
+ ]
185
+ },
186
+ i(t)
187
+ )) })
188
+ ] })
189
+ ] })
190
+ }
191
+ )
176
192
  ] })
177
193
  ] });
178
194
  }
179
195
  function ge() {
180
- return /* @__PURE__ */ e(M, { children: [1, 2, 3].map((l) => /* @__PURE__ */ e($, { disabled: !0, children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2 w-full", children: [
181
- /* @__PURE__ */ e("div", { className: "h-6 w-6 rounded-full animate-pulse bg-d-secondary" }),
182
- /* @__PURE__ */ n("div", { className: "flex flex-col flex-1 gap-1", children: [
183
- /* @__PURE__ */ e("div", { className: "h-4 w-24 animate-pulse bg-d-secondary rounded" }),
184
- /* @__PURE__ */ e("div", { className: "h-3 w-16 animate-pulse bg-d-secondary rounded" })
196
+ return /* @__PURE__ */ e(M, { children: [1, 2, 3].map((l) => /* @__PURE__ */ e($, { disabled: !0, children: /* @__PURE__ */ n("div", { className: "flex w-full items-center gap-2", children: [
197
+ /* @__PURE__ */ e("div", { className: "bg-d-secondary h-6 w-6 animate-pulse rounded-full" }),
198
+ /* @__PURE__ */ n("div", { className: "flex flex-1 flex-col gap-1", children: [
199
+ /* @__PURE__ */ e("div", { className: "bg-d-secondary h-4 w-24 animate-pulse rounded" }),
200
+ /* @__PURE__ */ e("div", { className: "bg-d-secondary h-3 w-16 animate-pulse rounded" })
185
201
  ] })
186
202
  ] }) }, l)) });
187
203
  }
@@ -28,7 +28,8 @@ function F({
28
28
  u && l ? C() : R();
29
29
  }, [u, l]), w(() => {
30
30
  const e = () => {
31
- if (typeof window > "u" || !a.current || !h.current) return;
31
+ if (typeof window > "u" || !a.current || !h.current)
32
+ return;
32
33
  const t = h.current, n = a.current, o = window.devicePixelRatio || 1, r = t.getBoundingClientRect();
33
34
  n.width = (r.width - 2) * o, n.height = (r.height - 2) * o, n.style.width = `${r.width - 2}px`, n.style.height = `${r.height - 2}px`;
34
35
  };
@@ -83,7 +84,7 @@ function F({
83
84
  "div",
84
85
  {
85
86
  ref: h,
86
- className: "h-full w-full cursor-pointer rounded-lg bg-d-background/80 backdrop-blur",
87
+ className: "bg-d-background/80 h-full w-full cursor-pointer rounded-lg backdrop-blur",
87
88
  onClick: S,
88
89
  children: /* @__PURE__ */ g("canvas", { ref: a, className: "h-full w-full" })
89
90
  }
@@ -64,12 +64,52 @@ function k({
64
64
  )
65
65
  }
66
66
  ),
67
- m ? /* @__PURE__ */ l("svg", { className: "animate-spin -ml-1 mr-1", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: e === "sm" ? 14 : e === "lg" ? 20 : 16, height: e === "sm" ? 14 : e === "lg" ? 20 : 16, children: [
68
- /* @__PURE__ */ r("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
69
- /* @__PURE__ */ r("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
70
- ] }) : n && /* @__PURE__ */ r(u, { name: n, size: e === "default" ? "md" : e === "sm" ? "xs" : "sm" }),
67
+ m ? /* @__PURE__ */ l(
68
+ "svg",
69
+ {
70
+ className: "mr-1 -ml-1 animate-spin",
71
+ xmlns: "http://www.w3.org/2000/svg",
72
+ fill: "none",
73
+ viewBox: "0 0 24 24",
74
+ width: e === "sm" ? 14 : e === "lg" ? 20 : 16,
75
+ height: e === "sm" ? 14 : e === "lg" ? 20 : 16,
76
+ children: [
77
+ /* @__PURE__ */ r(
78
+ "circle",
79
+ {
80
+ className: "opacity-25",
81
+ cx: "12",
82
+ cy: "12",
83
+ r: "10",
84
+ stroke: "currentColor",
85
+ strokeWidth: "4"
86
+ }
87
+ ),
88
+ /* @__PURE__ */ r(
89
+ "path",
90
+ {
91
+ className: "opacity-75",
92
+ fill: "currentColor",
93
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
94
+ }
95
+ )
96
+ ]
97
+ }
98
+ ) : n && /* @__PURE__ */ r(
99
+ u,
100
+ {
101
+ name: n,
102
+ size: e === "default" ? "md" : e === "sm" ? "xs" : "sm"
103
+ }
104
+ ),
71
105
  t.children,
72
- s && /* @__PURE__ */ r(u, { name: s, size: e === "default" ? "md" : e === "sm" ? "xs" : "sm" })
106
+ s && /* @__PURE__ */ r(
107
+ u,
108
+ {
109
+ name: s,
110
+ size: e === "default" ? "md" : e === "sm" ? "xs" : "sm"
111
+ }
112
+ )
73
113
  ]
74
114
  }
75
115
  );
@@ -2,7 +2,9 @@
2
2
  import { jsx as r } from "react/jsx-runtime";
3
3
  import * as n from "react";
4
4
  import { cn as o } from "../../lib/utils.js";
5
- const s = n.createContext({ size: "default" }), d = {
5
+ const s = n.createContext({
6
+ size: "default"
7
+ }), d = {
6
8
  sm: {
7
9
  py: "py-3",
8
10
  px: "px-3",
@@ -88,7 +90,10 @@ function g({ className: a, ...t }) {
88
90
  "div",
89
91
  {
90
92
  "data-slot": "card-footer",
91
- className: o(`flex items-center ${d[e].px} [.border-t]:pt-6`, a),
93
+ className: o(
94
+ `flex items-center ${d[e].px} [.border-t]:pt-6`,
95
+ a
96
+ ),
92
97
  ...t
93
98
  }
94
99
  );
@@ -61,7 +61,7 @@ function v({
61
61
  "div",
62
62
  {
63
63
  className: a(
64
- "absolute inset-0 flex items-center justify-center text-md",
64
+ "text-md absolute inset-0 flex items-center justify-center",
65
65
  h
66
66
  ),
67
67
  children: o ? o(t) : t
@@ -74,14 +74,20 @@ const b = C(
74
74
  className: i("flex flex-col", t ? "items-end" : "items-start"),
75
75
  children: [
76
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 }) }) }),
77
+ /* @__PURE__ */ e("div", { className: i(b({ isUser: t, animation: d })), children: /* @__PURE__ */ e(
78
+ h,
79
+ {
80
+ fallback: /* @__PURE__ */ e("div", { className: "text-d-secondary-foreground", children: "Caricamento..." }),
81
+ children: /* @__PURE__ */ e(x, { children: a })
82
+ }
83
+ ) }),
78
84
  c && r ? /* @__PURE__ */ e(
79
85
  "time",
80
86
  {
81
87
  dateTime: r.toISOString(),
82
88
  className: i(
83
89
  "mt-1 block px-1 text-xs opacity-50",
84
- d !== "none" && "duration-500 animate-in fade-in-0"
90
+ d !== "none" && "animate-in fade-in-0 duration-500"
85
91
  ),
86
92
  children: g
87
93
  }
@@ -97,8 +103,14 @@ const b = C(
97
103
  ),
98
104
  children: [
99
105
  /* @__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-d-foreground opacity-0 transition-opacity group-hover/message:opacity-100", children: m }) : null
106
+ /* @__PURE__ */ e(
107
+ h,
108
+ {
109
+ fallback: /* @__PURE__ */ e("div", { className: "text-d-secondary-foreground", children: "Caricamento..." }),
110
+ children: /* @__PURE__ */ e(x, { children: n.text })
111
+ }
112
+ ),
113
+ m ? /* @__PURE__ */ e("div", { className: "bg-d-background text-d-foreground absolute right-2 -bottom-4 flex space-x-1 rounded-lg border p-1 opacity-0 transition-opacity group-hover/message:opacity-100", children: m }) : null
102
114
  ] }),
103
115
  c && r ? /* @__PURE__ */ e(
104
116
  "time",
@@ -106,7 +118,7 @@ const b = C(
106
118
  dateTime: r.toISOString(),
107
119
  className: i(
108
120
  "mt-1 block px-1 text-xs opacity-50",
109
- d !== "none" && "duration-500 animate-in fade-in-0"
121
+ d !== "none" && "animate-in fade-in-0 duration-500"
110
122
  ),
111
123
  children: g
112
124
  }
@@ -122,8 +134,14 @@ const b = C(
122
134
  `tool-${o}`
123
135
  ) : 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
136
  /* @__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
137
+ /* @__PURE__ */ e(
138
+ h,
139
+ {
140
+ fallback: /* @__PURE__ */ e("div", { className: "text-d-secondary-foreground", children: "Caricamento..." }),
141
+ children: /* @__PURE__ */ e(x, { children: a })
142
+ }
143
+ ),
144
+ m ? /* @__PURE__ */ e("div", { className: "bg-d-background text-foreground absolute right-2 -bottom-4 flex space-x-1 rounded-lg border p-1 opacity-0 transition-opacity group-hover/message:opacity-100", children: m }) : null
127
145
  ] }),
128
146
  c && r ? /* @__PURE__ */ e(
129
147
  "time",
@@ -131,7 +149,7 @@ const b = C(
131
149
  dateTime: r.toISOString(),
132
150
  className: i(
133
151
  "mt-1 block px-1 text-xs opacity-50",
134
- d !== "none" && "duration-500 animate-in fade-in-0"
152
+ d !== "none" && "animate-in fade-in-0 duration-500"
135
153
  ),
136
154
  children: g
137
155
  }
@@ -149,9 +167,9 @@ const L = ({ part: s }) => {
149
167
  {
150
168
  open: a,
151
169
  onOpenChange: r,
152
- className: "group w-full overflow-hidden rounded-lg border bg-d-secondary/50",
170
+ className: "group bg-d-secondary/50 w-full overflow-hidden rounded-lg border",
153
171
  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-d-foreground", children: [
172
+ /* @__PURE__ */ e("div", { className: "flex items-center p-2", children: /* @__PURE__ */ e(S, { asChild: !0, children: /* @__PURE__ */ l("button", { className: "text-d-secondary-foreground hover:text-d-foreground flex items-center gap-2 text-sm", children: [
155
173
  /* @__PURE__ */ e(B, { className: "h-4 w-4 transition-transform group-data-[state=open]:rotate-90" }),
156
174
  /* @__PURE__ */ e("span", { children: "Thinking" })
157
175
  ] }) }) }),
@@ -166,7 +184,7 @@ const L = ({ part: s }) => {
166
184
  },
167
185
  transition: { duration: 0.3, ease: [0.04, 0.62, 0.23, 0.98] },
168
186
  className: "border-t",
169
- children: /* @__PURE__ */ e("div", { className: "p-2", children: /* @__PURE__ */ e("div", { className: "whitespace-pre-wrap text-xs", children: s.reasoning }) })
187
+ children: /* @__PURE__ */ e("div", { className: "p-2", children: /* @__PURE__ */ e("div", { className: "text-xs whitespace-pre-wrap", children: s.reasoning }) })
170
188
  }
171
189
  ) })
172
190
  ]
@@ -181,7 +199,7 @@ function y({
181
199
  return /* @__PURE__ */ l(
182
200
  "div",
183
201
  {
184
- className: "flex items-center gap-2 rounded-lg border bg-d-secondary/50 px-3 py-2 text-sm text-d-secondary-foreground",
202
+ className: "bg-d-secondary/50 text-d-secondary-foreground flex items-center gap-2 rounded-lg border px-3 py-2 text-sm",
185
203
  children: [
186
204
  /* @__PURE__ */ e(M, { className: "h-4 w-4" }),
187
205
  /* @__PURE__ */ l("span", { children: [
@@ -203,7 +221,7 @@ function y({
203
221
  return /* @__PURE__ */ l(
204
222
  "div",
205
223
  {
206
- className: "flex items-center gap-2 rounded-lg border bg-d-secondary/50 px-3 py-2 text-sm text-d-secondary-foreground",
224
+ className: "bg-d-secondary/50 text-d-secondary-foreground flex items-center gap-2 rounded-lg border px-3 py-2 text-sm",
207
225
  children: [
208
226
  /* @__PURE__ */ e($, { className: "h-4 w-4" }),
209
227
  /* @__PURE__ */ l("span", { children: [
@@ -225,9 +243,9 @@ function y({
225
243
  return /* @__PURE__ */ l(
226
244
  "div",
227
245
  {
228
- className: "flex flex-col gap-1.5 rounded-lg border bg-d-secondary/50 px-3 py-2 text-sm",
246
+ className: "bg-d-secondary/50 flex flex-col gap-1.5 rounded-lg border px-3 py-2 text-sm",
229
247
  children: [
230
- /* @__PURE__ */ l("div", { className: "flex items-center gap-2 text-d-secondary-foreground", children: [
248
+ /* @__PURE__ */ l("div", { className: "text-d-secondary-foreground flex items-center gap-2", children: [
231
249
  /* @__PURE__ */ e(R, { className: "h-4 w-4" }),
232
250
  /* @__PURE__ */ l("span", { children: [
233
251
  "Result from",
@@ -239,7 +257,7 @@ function y({
239
257
  ] })
240
258
  ] })
241
259
  ] }),
242
- /* @__PURE__ */ e("pre", { className: "overflow-x-auto whitespace-pre-wrap text-d-foreground", children: JSON.stringify(a.result, null, 2) })
260
+ /* @__PURE__ */ e("pre", { className: "text-d-foreground overflow-x-auto whitespace-pre-wrap", children: JSON.stringify(a.result, null, 2) })
243
261
  ]
244
262
  },
245
263
  r
@@ -169,17 +169,17 @@ function K({
169
169
  return /* @__PURE__ */ y(
170
170
  "div",
171
171
  {
172
- className: "flex-1 relative overflow-y-auto pb-4",
172
+ className: "relative flex-1 overflow-y-auto pb-4",
173
173
  ref: a,
174
174
  onScroll: l,
175
175
  onTouchStart: f,
176
176
  children: [
177
177
  /* @__PURE__ */ t("div", { className: "max-w-full", children: n }),
178
- !c && /* @__PURE__ */ t("div", { className: "pointer-events-none absolute bottom-0 left-0 right-0 flex items-end justify-end", children: /* @__PURE__ */ t("div", { className: "sticky bottom-0 left-0 flex w-full justify-end", children: /* @__PURE__ */ t(
178
+ !c && /* @__PURE__ */ t("div", { className: "pointer-events-none absolute right-0 bottom-0 left-0 flex items-end justify-end", children: /* @__PURE__ */ t("div", { className: "sticky bottom-0 left-0 flex w-full justify-end", children: /* @__PURE__ */ t(
179
179
  N,
180
180
  {
181
181
  onClick: u,
182
- className: "pointer-events-auto h-8 w-8 rounded-full ease-in-out animate-in fade-in-0 slide-in-from-bottom-1",
182
+ className: "animate-in fade-in-0 slide-in-from-bottom-1 pointer-events-auto h-8 w-8 rounded-full ease-in-out",
183
183
  size: "icon",
184
184
  variant: "ghost",
185
185
  children: /* @__PURE__ */ t(H, { className: "h-4 w-4" })
@@ -193,7 +193,7 @@ const I = g(({ className: e, ...n }, a) => /* @__PURE__ */ t(
193
193
  "div",
194
194
  {
195
195
  ref: a,
196
- className: B("flex flex-col max-h-full w-full h-full", e),
196
+ className: B("flex h-full max-h-full w-full flex-col", e),
197
197
  ...n
198
198
  }
199
199
  ));
@@ -31,7 +31,7 @@ function v({
31
31
  /* @__PURE__ */ o(i, { children: e }),
32
32
  /* @__PURE__ */ o(l, { children: t })
33
33
  ] }),
34
- /* @__PURE__ */ o(p, { className: "overflow-hidden p-0", children: /* @__PURE__ */ o(g, { className: "[&_[cmdk-group-heading]]:text-d-secondary-foreground **:data-[slot=command-d-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-d-input-wrapper]_svg]:h-5 [&_[cmdk-d-input-wrapper]_svg]:w-5 [&_[cmdk-d-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: r }) })
34
+ /* @__PURE__ */ o(p, { className: "overflow-hidden p-0", children: /* @__PURE__ */ o(g, { className: "[&_[cmdk-group-heading]]:text-d-secondary-foreground **:data-[slot=command-d-input-wrapper]:h-12 [&_[cmdk-d-input-wrapper]_svg]:h-5 [&_[cmdk-d-input-wrapper]_svg]:w-5 [&_[cmdk-d-input]]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: r }) })
35
35
  ] });
36
36
  }
37
37
  function y({
@@ -7,7 +7,11 @@ import { Button as j } from "./button.js";
7
7
  import { TooltipProvider as q, Tooltip as G, TooltipTrigger as J, TooltipContent as K } from "./tooltip.js";
8
8
  import { TableRow as T, TableCell as A, Table as Q, TableHeader as X, TableHead as Y, TableBody as Z } from "./table.js";
9
9
  import { getSortedRowModel as _, getCoreRowModel as W } from "../../node_modules/@tanstack/table-core/build/lib/index.js";
10
- function v({ text: c, maxLength: a, className: h = "" }) {
10
+ function v({
11
+ text: c,
12
+ maxLength: a,
13
+ className: h = ""
14
+ }) {
11
15
  return !c || c.length <= a ? /* @__PURE__ */ o("div", { className: h, children: c }) : /* @__PURE__ */ o(q, { children: /* @__PURE__ */ b(G, { children: [
12
16
  /* @__PURE__ */ o(J, { asChild: !0, children: /* @__PURE__ */ b("div", { className: `truncate ${h} cursor-pointer`, children: [
13
17
  c.substring(0, a),
@@ -49,13 +53,20 @@ function ie({
49
53
  id: "cross-header",
50
54
  header: () => /* @__PURE__ */ b("div", { className: "relative", children: [
51
55
  /* @__PURE__ */ o("div", { className: "absolute top-0 left-2 text-xs", children: x }),
52
- /* @__PURE__ */ o("div", { className: "absolute bottom-0 right-2 text-xs", children: w })
56
+ /* @__PURE__ */ o("div", { className: "absolute right-2 bottom-0 text-xs", children: w })
53
57
  ] }),
54
58
  accessorFn: (r) => r.item,
55
59
  cell: (r) => {
56
60
  const e = r.getValue();
57
61
  if (!a)
58
- return /* @__PURE__ */ o(v, { text: e, maxLength: g, className: "text-left" });
62
+ return /* @__PURE__ */ o(
63
+ v,
64
+ {
65
+ text: e,
66
+ maxLength: g,
67
+ className: "text-left"
68
+ }
69
+ );
59
70
  const t = p === e;
60
71
  return /* @__PURE__ */ o(
61
72
  j,
@@ -86,7 +97,14 @@ function ie({
86
97
  onClick: a ? () => e.toggleSorting(e.getIsSorted() === "asc") : void 0,
87
98
  children: /* @__PURE__ */ o(v, { text: r, maxLength: g })
88
99
  }
89
- ) : /* @__PURE__ */ o(v, { text: r, maxLength: g, className: "font-medium" }),
100
+ ) : /* @__PURE__ */ o(
101
+ v,
102
+ {
103
+ text: r,
104
+ maxLength: g,
105
+ className: "font-medium"
106
+ }
107
+ ),
90
108
  sortingFn: (e, t, s) => {
91
109
  let l = e.getValue(s), i = t.getValue(s);
92
110
  return l == null && i == null ? 0 : l == null ? 1 : i == null ? -1 : (l && typeof l == "object" && "value" in l && (l = l.value), i && typeof i == "object" && "value" in i && (i = i.value), typeof l == "number" && typeof i == "number" ? l - i : String(l).localeCompare(String(i)));
@@ -94,11 +112,17 @@ function ie({
94
112
  //NOTE Cell is responsible for rendering the cell of his column
95
113
  cell: (e) => {
96
114
  const t = e.getValue();
97
- return t ? t.render ? t.render(t.fromId, t.toId) : /* @__PURE__ */ o("div", { children: t.value }) : null;
115
+ return t ? t.render ? t.render(t.fromId, t.toId, t.id) : /* @__PURE__ */ o("div", { children: t.value }) : null;
98
116
  }
99
117
  });
100
118
  }), n;
101
- }, [u, x, w, p, a]), E = S(() => m.map((n, r) => {
119
+ }, [
120
+ u,
121
+ x,
122
+ w,
123
+ p,
124
+ a
125
+ ]), E = S(() => m.map((n, r) => {
102
126
  const e = { item: n };
103
127
  return u.forEach((t) => {
104
128
  var l;
@@ -136,16 +160,16 @@ function ie({
136
160
  style: { boxShadow: s, width: `${R}px` }
137
161
  };
138
162
  };
139
- return /* @__PURE__ */ o("div", { className: `w-[900px] ${N || ""}`, children: /* @__PURE__ */ o("div", { className: "rounded-md border overflow-auto max-h-[600px]", children: /* @__PURE__ */ b(Q, { className: "w-full table-fixed relative border-collapse", children: [
163
+ return /* @__PURE__ */ o("div", { className: `w-[900px] ${N || ""}`, children: /* @__PURE__ */ o("div", { className: "max-h-[600px] overflow-auto rounded-md border", children: /* @__PURE__ */ b(Q, { className: "relative w-full table-fixed border-collapse", children: [
140
164
  /* @__PURE__ */ o(
141
165
  X,
142
166
  {
143
- className: "sticky top-0 z-20 bg-d-secondary",
167
+ className: "bg-d-secondary sticky top-0 z-20",
144
168
  style: { boxShadow: "0 1px 0 0 var(--d-border)" },
145
169
  children: z.getHeaderGroups().map((n) => /* @__PURE__ */ o(
146
170
  T,
147
171
  {
148
- className: "sticky top-0 z-20 bg-d-secondary",
172
+ className: "bg-d-secondary sticky top-0 z-20",
149
173
  children: n.headers.map((r) => {
150
174
  const e = O(r);
151
175
  return /* @__PURE__ */ o(
@@ -70,7 +70,7 @@ function se({
70
70
  const t = o.getFilteredSelectedRowModel().rows.map((e) => e.original);
71
71
  c(t);
72
72
  }
73
- }, [o, c, a, f]), /* @__PURE__ */ d("div", { className: L("w-full h-full", k), children: [
73
+ }, [o, c, a, f]), /* @__PURE__ */ d("div", { className: L("h-full w-full", k), children: [
74
74
  s && /* @__PURE__ */ l("div", { className: "flex items-center py-4", children: /* @__PURE__ */ l(
75
75
  E,
76
76
  {
@@ -91,7 +91,7 @@ function se({
91
91
  /* @__PURE__ */ l(q, { children: o.getHeaderGroups().map((t) => /* @__PURE__ */ l(r, { children: t.headers.map((e) => /* @__PURE__ */ l(
92
92
  J,
93
93
  {
94
- className: `${e.column.columnDef.sticky ? "sticky left-0 z-10 bg-d-background" : ""}`,
94
+ className: `${e.column.columnDef.sticky ? "bg-d-background sticky left-0 z-10" : ""}`,
95
95
  children: e.isPlaceholder ? null : b(
96
96
  e.column.columnDef.header,
97
97
  e.getContext()
@@ -102,7 +102,7 @@ function se({
102
102
  /* @__PURE__ */ l(K, { children: C ? Array.from({ length: g.length || 8 }).map((t, e) => /* @__PURE__ */ l(r, { children: o.getHeaderGroups()[0].headers.map((P, I) => /* @__PURE__ */ l(
103
103
  m,
104
104
  {
105
- className: `w-full ${P.column.columnDef.sticky ? "sticky left-0 z-10 bg-d-background" : ""}`,
105
+ className: `w-full ${P.column.columnDef.sticky ? "bg-d-background sticky left-0 z-10" : ""}`,
106
106
  children: /* @__PURE__ */ l(O, { className: "h-6 w-full" })
107
107
  },
108
108
  `skeleton-cell-${e}-${I}`
@@ -113,7 +113,7 @@ function se({
113
113
  children: t.getVisibleCells().map((e) => /* @__PURE__ */ l(
114
114
  m,
115
115
  {
116
- className: `${e.column.columnDef.sticky ? "sticky left-0 z-10 bg-d-background" : ""}`,
116
+ className: `${e.column.columnDef.sticky ? "bg-d-background sticky left-0 z-10" : ""}`,
117
117
  children: b(
118
118
  e.column.columnDef.cell,
119
119
  e.getContext()
@@ -30,9 +30,9 @@ function k({
30
30
  variant: m,
31
31
  size: n,
32
32
  className: g(
33
- "flex items-center justify-between whitespace-nowrap border border-d-input text-d-foreground hover:bg-d-accent bg-d-transparent px-3 py-2 shadow-sm ring-offset-background data-[placeholder]:text-d-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 font-normal",
33
+ "border-d-input text-d-foreground hover:bg-d-accent bg-d-transparent ring-offset-background data-[placeholder]:text-d-muted-foreground focus:ring-ring flex items-center justify-between border px-3 py-2 font-normal whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
34
34
  !o && "text-d-muted-foreground",
35
- t && "opacity-50 cursor-not-allowed",
35
+ t && "cursor-not-allowed opacity-50",
36
36
  f,
37
37
  n === "sm" && "text-xs",
38
38
  n === "lg" && "text-lg"