@actioneer/ads 0.5.6 → 0.5.8

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 (149) hide show
  1. package/bin/ads-init.mjs +6 -0
  2. package/components/accordion.js +50 -48
  3. package/components/agent-icon.d.ts +12 -0
  4. package/components/agent-icon.js +135 -121
  5. package/components/ai-elements/chain-of-thought-icon.d.ts +10 -12
  6. package/components/ai-elements/chain-of-thought-icon.js +341 -201
  7. package/components/ai-elements/chain-of-thought.d.ts +2 -2
  8. package/components/ai-elements/chain-of-thought.js +108 -108
  9. package/components/ai-elements/chart.js +16 -14
  10. package/components/ai-elements/inline-citation.js +41 -41
  11. package/components/ai-elements/message.js +4 -4
  12. package/components/ai-elements/queue.js +7 -7
  13. package/components/ai-elements/research-activity.js +114 -114
  14. package/components/ai-elements/shimmer.d.ts +2 -2
  15. package/components/ai-elements/speech-input.js +28 -28
  16. package/components/ai-elements/task-progress.js +26 -16
  17. package/components/ai-elements/task.js +17 -17
  18. package/components/ai-elements/tool.js +6 -6
  19. package/components/ai-elements/transcript.js +6 -5
  20. package/components/ai-elements/voice.js +1 -1
  21. package/components/alert.js +10 -10
  22. package/components/answer-sources.d.ts +42 -0
  23. package/components/answer-sources.js +111 -0
  24. package/components/answer.js +115 -114
  25. package/components/assistant-ui/action-bar.js +94 -48
  26. package/components/assistant-ui/attachment.js +131 -103
  27. package/components/assistant-ui/badge.d.ts +1 -1
  28. package/components/assistant-ui/badge.js +17 -17
  29. package/components/assistant-ui/chain-of-thought.d.ts +1 -1
  30. package/components/assistant-ui/composer-add-context.js +9 -9
  31. package/components/assistant-ui/composer-deep-research.js +5 -5
  32. package/components/assistant-ui/composer-harness.js +12 -9
  33. package/components/assistant-ui/composer-trigger-popover.js +45 -34
  34. package/components/assistant-ui/composer.js +59 -59
  35. package/components/assistant-ui/error.js +14 -14
  36. package/components/assistant-ui/file.d.ts +1 -1
  37. package/components/assistant-ui/image.d.ts +1 -1
  38. package/components/assistant-ui/image.js +113 -103
  39. package/components/assistant-ui/markdown-text.js +18 -18
  40. package/components/assistant-ui/message.js +46 -45
  41. package/components/assistant-ui/quote.js +1 -1
  42. package/components/assistant-ui/reasoning.d.ts +1 -1
  43. package/components/assistant-ui/reasoning.js +66 -77
  44. package/components/assistant-ui/suggestions.js +4 -4
  45. package/components/assistant-ui/thread-context.d.ts +2 -0
  46. package/components/assistant-ui/thread.js +41 -40
  47. package/components/assistant-ui/tool-fallback.js +60 -63
  48. package/components/assistant-ui/tool-group.d.ts +1 -1
  49. package/components/assistant-ui/tool-group.js +36 -42
  50. package/components/audio-waveform.js +25 -24
  51. package/components/autocomplete.d.ts +1 -0
  52. package/components/autocomplete.js +45 -43
  53. package/components/avatar.js +30 -30
  54. package/components/badge.d.ts +1 -1
  55. package/components/breadcrumbs.js +2 -2
  56. package/components/button.d.ts +2 -2
  57. package/components/button.js +22 -20
  58. package/components/card.js +8 -8
  59. package/components/carousel.js +105 -104
  60. package/components/chart.js +9 -7
  61. package/components/checkbox.js +74 -38
  62. package/components/chip.d.ts +1 -1
  63. package/components/code-block.js +3 -3
  64. package/components/collapsible.js +67 -23
  65. package/components/connector-card.js +6 -6
  66. package/components/drawer.d.ts +15 -10
  67. package/components/drawer.js +78 -77
  68. package/components/dropdown.d.ts +3 -1
  69. package/components/dropdown.js +88 -79
  70. package/components/empty-state.d.ts +4 -4
  71. package/components/empty-state.js +7 -7
  72. package/components/field.d.ts +4 -0
  73. package/components/field.js +45 -34
  74. package/components/file-dropzone.js +12 -12
  75. package/components/index.d.ts +4 -0
  76. package/components/index.js +584 -553
  77. package/components/infinite-canvas.js +1 -1
  78. package/components/input-field.js +51 -46
  79. package/components/input.js +20 -20
  80. package/components/link.js +9 -9
  81. package/components/modal.js +105 -73
  82. package/components/navbar.d.ts +1 -1
  83. package/components/navbar.js +1 -1
  84. package/components/number-field.js +38 -29
  85. package/components/page-header.js +12 -12
  86. package/components/pagination.js +19 -19
  87. package/components/panel.js +2 -2
  88. package/components/pixel-blast-svg.js +3 -3
  89. package/components/pixel-icon.d.ts +3 -1
  90. package/components/pixel-icon.js +294 -215
  91. package/components/popover.d.ts +1 -1
  92. package/components/popover.js +66 -64
  93. package/components/progress-circle.js +36 -32
  94. package/components/progress.js +28 -24
  95. package/components/radio.js +59 -49
  96. package/components/resizable-panel.js +1 -1
  97. package/components/reveal.d.ts +2 -2
  98. package/components/ripple.d.ts +3 -3
  99. package/components/scroll-area.js +17 -16
  100. package/components/segmented.d.ts +4 -1
  101. package/components/segmented.js +26 -25
  102. package/components/select.d.ts +2 -0
  103. package/components/select.js +61 -57
  104. package/components/setting-row.js +45 -42
  105. package/components/sidebar.d.ts +2 -2
  106. package/components/sidebar.js +131 -127
  107. package/components/skeleton.js +5 -5
  108. package/components/spinner.d.ts +13 -4
  109. package/components/spinner.js +42 -42
  110. package/components/stepper.js +21 -21
  111. package/components/switch.js +52 -32
  112. package/components/table.d.ts +24 -7
  113. package/components/table.js +457 -220
  114. package/components/tabs.js +149 -137
  115. package/components/textarea.js +1 -2
  116. package/components/toast.js +66 -66
  117. package/components/tooltip.js +2 -2
  118. package/components/tree.js +62 -51
  119. package/components/typography.d.ts +2 -1
  120. package/components/typography.js +33 -32
  121. package/components/ui/button.d.ts +2 -2
  122. package/components/ui/button.js +19 -19
  123. package/components/ui/collapsible.d.ts +1 -5
  124. package/components/ui/dialog.d.ts +3 -3
  125. package/components/ui/dialog.js +95 -58
  126. package/components/ui/tooltip.d.ts +2 -2
  127. package/components/ui/tooltip.js +67 -33
  128. package/components/viz-charts.js +95 -95
  129. package/demo/components/add-to-artifact.js +341 -0
  130. package/demo/lib/artifact-library.js +134 -0
  131. package/fonts/aribau-grotesk-medium.woff2 +0 -0
  132. package/fonts/aribau-grotesk-regular.woff2 +0 -0
  133. package/fonts.css +11 -11
  134. package/hooks/agents-ui/use-agent-audio-visualizer-aura.js +17 -16
  135. package/hooks/agents-ui/use-agent-audio-visualizer-wave.js +21 -20
  136. package/lib/icons.d.ts +12 -0
  137. package/lib/icons.js +107 -104
  138. package/lib/motion.d.ts +42 -39
  139. package/lib/motion.js +112 -52
  140. package/lib/spinner-mark.d.ts +9 -0
  141. package/lib/spinner-mark.js +98 -0
  142. package/llms.txt +69 -26
  143. package/manifest.json +344 -42
  144. package/package.json +1 -1
  145. package/styles.css +175 -161
  146. package/theme.css +104 -128
  147. package/components/ui/collapsible.js +0 -35
  148. package/fonts/aribau-grotesk-500.otf +0 -0
  149. package/fonts/aribau-grotesk-600.woff2 +0 -0
@@ -1,11 +1,12 @@
1
1
  "use client";
2
- import { jsxs as u, jsx as a, Fragment as U } from "react/jsx-runtime";
3
- import { memo as E, useRef as D, useState as p, useEffect as b } from "react";
4
- import { createPortal as F } from "react-dom";
5
- import { cva as O } from "class-variance-authority";
6
- import { Image as P, ImageOff as A, Download as L, Copy as S, Loader as B, WarningCircle as W, Refresh as G } from "../../lib/icons.js";
7
- import { cn as c } from "../../lib/cn.js";
8
- const K = (e) => {
2
+ import { jsxs as g, jsx as a, Fragment as E } from "react/jsx-runtime";
3
+ import { memo as D, useRef as F, useState as p, useEffect as b } from "react";
4
+ import { createPortal as O } from "react-dom";
5
+ import { cva as P } from "class-variance-authority";
6
+ import { ImageOff as S, Download as A, Copy as L, WarningCircle as B, Refresh as W } from "../../lib/icons.js";
7
+ import { cn as d } from "../../lib/cn.js";
8
+ import { Spinner as w } from "../spinner.js";
9
+ const G = (e) => {
9
10
  switch (e) {
10
11
  case "image/png":
11
12
  return "png";
@@ -21,27 +22,27 @@ const K = (e) => {
21
22
  default:
22
23
  return "png";
23
24
  }
24
- }, I = (e) => {
25
+ }, z = (e) => {
25
26
  var r;
26
27
  const [t, n] = e.split(","), i = ((r = t == null ? void 0 : t.match(/data:([^;]+)/)) == null ? void 0 : r[1]) ?? "application/octet-stream";
27
28
  if (!/;base64/i.test(t ?? ""))
28
29
  return new Blob([decodeURIComponent(n ?? "")], { type: i });
29
- const s = atob(n ?? ""), o = new Uint8Array(s.length);
30
- for (let m = 0; m < s.length; m++) o[m] = s.charCodeAt(m);
30
+ const l = atob(n ?? ""), o = new Uint8Array(l.length);
31
+ for (let s = 0; s < l.length; s++) o[s] = l.charCodeAt(s);
31
32
  return new Blob([o], { type: i });
32
33
  }, N = (e) => {
33
34
  var t;
34
35
  return (t = e.match(/^data:([^;,]+)/)) == null ? void 0 : t[1];
35
- }, M = (e) => {
36
+ }, K = (e) => {
36
37
  if (typeof document > "u") return;
37
- const t = K(N(e.image)), n = e.filename ?? `image.${t}`, s = e.image.startsWith("data:") ? URL.createObjectURL(I(e.image)) : null, o = s ?? e.image, r = document.createElement("a");
38
- r.href = o, r.download = n, r.rel = "noopener", document.body.appendChild(r), r.click(), document.body.removeChild(r), s && URL.revokeObjectURL(s);
39
- }, T = async (e) => {
38
+ const t = G(N(e.image)), n = e.filename ?? `image.${t}`, l = e.image.startsWith("data:") ? URL.createObjectURL(z(e.image)) : null, o = l ?? e.image, r = document.createElement("a");
39
+ r.href = o, r.download = n, r.rel = "noopener", document.body.appendChild(r), r.click(), document.body.removeChild(r), l && URL.revokeObjectURL(l);
40
+ }, M = async (e) => {
40
41
  if (typeof navigator > "u" || !navigator.clipboard || typeof ClipboardItem > "u")
41
42
  throw new Error("Clipboard API is not available in this environment.");
42
- const t = e.image.startsWith("data:") ? I(e.image) : await fetch(e.image).then((i) => i.blob()), n = N(e.image) ?? t.type ?? "image/png";
43
+ const t = e.image.startsWith("data:") ? z(e.image) : await fetch(e.image).then((i) => i.blob()), n = N(e.image) ?? t.type ?? "image/png";
43
44
  await navigator.clipboard.write([new ClipboardItem({ [n]: t })]);
44
- }, V = O(
45
+ }, T = P(
45
46
  "aui-image-root relative overflow-hidden rounded-lg",
46
47
  {
47
48
  variants: {
@@ -68,7 +69,7 @@ function h({
68
69
  variant: t,
69
70
  size: n,
70
71
  children: i,
71
- ...s
72
+ ...l
72
73
  }) {
73
74
  return /* @__PURE__ */ a(
74
75
  "div",
@@ -76,62 +77,70 @@ function h({
76
77
  "data-slot": "image-root",
77
78
  "data-variant": t,
78
79
  "data-size": n,
79
- className: c(V({ variant: t, size: n, className: e })),
80
- ...s,
80
+ className: d(T({ variant: t, size: n, className: e })),
81
+ ...l,
81
82
  children: i
82
83
  }
83
84
  );
84
85
  }
85
- function z({
86
+ function C({
86
87
  className: e,
87
88
  containerClassName: t,
88
89
  onLoad: n,
89
90
  onError: i,
90
- alt: s = "Image content",
91
+ alt: l = "Image content",
91
92
  src: o,
92
93
  ...r
93
94
  }) {
94
- const m = D(null), [f, l] = p(void 0), [y, R] = p(void 0), w = f === o, x = y === o;
95
+ const s = F(null), [f, m] = p(void 0), [y, U] = p(void 0), x = f === o, I = y === o;
95
96
  return b(() => {
96
- var g;
97
- typeof o == "string" && ((g = m.current) != null && g.complete) && m.current.naturalWidth > 0 && l(o);
98
- }, [o]), /* @__PURE__ */ u(
97
+ var u;
98
+ typeof o == "string" && ((u = s.current) != null && u.complete) && s.current.naturalWidth > 0 && m(o);
99
+ }, [o]), /* @__PURE__ */ g(
99
100
  "div",
100
101
  {
101
102
  "data-slot": "image-preview",
102
- className: c("relative min-h-32", t),
103
+ className: d("relative min-h-32", t),
103
104
  children: [
104
- !w && !x && /* @__PURE__ */ a(
105
+ !x && !I && /* @__PURE__ */ a(
105
106
  "div",
106
107
  {
107
108
  "data-slot": "image-preview-loading",
108
109
  className: "bg-muted/50 absolute inset-0 flex items-center justify-center",
109
- children: /* @__PURE__ */ a(P, { className: "text-muted-foreground size-8 animate-pulse" })
110
+ children: /* @__PURE__ */ a(
111
+ w,
112
+ {
113
+ variant: "content",
114
+ size: "md",
115
+ color: "muted",
116
+ label: "Loading image"
117
+ }
118
+ )
110
119
  }
111
120
  ),
112
- x ? /* @__PURE__ */ a(
121
+ I ? /* @__PURE__ */ a(
113
122
  "div",
114
123
  {
115
124
  "data-slot": "image-preview-error",
116
125
  className: "bg-muted/50 flex min-h-32 items-center justify-center p-4",
117
- children: /* @__PURE__ */ a(A, { className: "text-muted-foreground size-8" })
126
+ children: /* @__PURE__ */ a(S, { className: "text-muted-foreground size-8" })
118
127
  }
119
128
  ) : /* @__PURE__ */ a(
120
129
  "img",
121
130
  {
122
- ref: m,
131
+ ref: s,
123
132
  src: o,
124
- alt: s,
125
- className: c(
133
+ alt: l,
134
+ className: d(
126
135
  "block h-auto w-full object-contain",
127
- !w && "invisible",
136
+ !x && "invisible",
128
137
  e
129
138
  ),
130
- onLoad: (g) => {
131
- typeof o == "string" && l(o), n == null || n(g);
139
+ onLoad: (u) => {
140
+ typeof o == "string" && m(o), n == null || n(u);
132
141
  },
133
- onError: (g) => {
134
- typeof o == "string" && R(o), i == null || i(g);
142
+ onError: (u) => {
143
+ typeof o == "string" && U(o), i == null || i(u);
135
144
  },
136
145
  ...r
137
146
  }
@@ -149,7 +158,7 @@ function v({
149
158
  "span",
150
159
  {
151
160
  "data-slot": "image-filename",
152
- className: c(
161
+ className: d(
153
162
  "text-muted-foreground block truncate px-2 py-1.5 text-xs",
154
163
  e
155
164
  ),
@@ -158,30 +167,30 @@ function v({
158
167
  }
159
168
  ) : null;
160
169
  }
161
- function C({ src: e, alt: t = "Image preview", children: n }) {
162
- const [i, s] = p(!1), [o, r] = p(!1);
170
+ function j({ src: e, alt: t = "Image preview", children: n }) {
171
+ const [i, l] = p(!1), [o, r] = p(!1);
163
172
  b(() => {
164
- s(!0);
173
+ l(!0);
165
174
  }, []);
166
- const m = () => r(!0), f = () => r(!1);
175
+ const s = () => r(!0), f = () => r(!1);
167
176
  return b(() => {
168
177
  if (!o) return;
169
- const l = (y) => {
178
+ const m = (y) => {
170
179
  y.key === "Escape" && r(!1);
171
180
  };
172
- return document.addEventListener("keydown", l), () => document.removeEventListener("keydown", l);
181
+ return document.addEventListener("keydown", m), () => document.removeEventListener("keydown", m);
173
182
  }, [o]), b(() => {
174
183
  if (!o) return;
175
- const l = document.body.style.overflow;
184
+ const m = document.body.style.overflow;
176
185
  return document.body.style.overflow = "hidden", () => {
177
- document.body.style.overflow = l;
186
+ document.body.style.overflow = m;
178
187
  };
179
- }, [o]), /* @__PURE__ */ u(U, { children: [
188
+ }, [o]), /* @__PURE__ */ g(E, { children: [
180
189
  /* @__PURE__ */ a(
181
190
  "div",
182
191
  {
183
- onClick: m,
184
- onKeyDown: (l) => l.key === "Enter" && m(),
192
+ onClick: s,
193
+ onKeyDown: (m) => m.key === "Enter" && s(),
185
194
  role: "button",
186
195
  tabIndex: 0,
187
196
  className: "aui-image-zoom-trigger cursor-zoom-in",
@@ -189,16 +198,16 @@ function C({ src: e, alt: t = "Image preview", children: n }) {
189
198
  children: n
190
199
  }
191
200
  ),
192
- i && o && F(
201
+ i && o && O(
193
202
  /* @__PURE__ */ a(
194
203
  "div",
195
204
  {
196
205
  "data-slot": "image-zoom-overlay",
197
206
  role: "button",
198
207
  tabIndex: 0,
199
- className: "aui-image-zoom-overlay fade-in animate-in fixed inset-0 z-50 flex items-center justify-center bg-black/80 duration-(--duration-normal)",
208
+ className: "aui-image-zoom-overlay fade-in animate-in fixed inset-0 z-50 flex items-center justify-center bg-black/80 duration-200",
200
209
  onClick: f,
201
- onKeyDown: (l) => l.key === "Enter" && f(),
210
+ onKeyDown: (m) => m.key === "Enter" && f(),
202
211
  "aria-label": "Close zoomed image",
203
212
  children: /* @__PURE__ */ a(
204
213
  "img",
@@ -206,9 +215,9 @@ function C({ src: e, alt: t = "Image preview", children: n }) {
206
215
  "data-slot": "image-zoom-content",
207
216
  src: e,
208
217
  alt: t,
209
- className: "aui-image-zoom-content fade-in zoom-in-95 animate-in max-h-[90vh] max-w-[90vw] cursor-zoom-out object-contain duration-(--duration-normal)",
210
- onClick: (l) => {
211
- l.stopPropagation(), f();
218
+ className: "aui-image-zoom-content fade-in zoom-in-95 animate-in max-h-[90vh] max-w-[90vw] cursor-zoom-out object-contain duration-200",
219
+ onClick: (m) => {
220
+ m.stopPropagation(), f();
212
221
  }
213
222
  }
214
223
  )
@@ -218,43 +227,48 @@ function C({ src: e, alt: t = "Image preview", children: n }) {
218
227
  )
219
228
  ] });
220
229
  }
221
- function j({ className: e }) {
222
- return /* @__PURE__ */ u(
230
+ function k({ className: e }) {
231
+ return /* @__PURE__ */ a(
223
232
  "div",
224
233
  {
225
234
  "data-slot": "image-generating",
226
- className: c(
235
+ className: d(
227
236
  "bg-muted/50 flex min-h-32 items-center justify-center p-4",
228
237
  e
229
238
  ),
230
- children: [
231
- /* @__PURE__ */ a(B, { className: "text-muted-foreground size-8 animate-spin" }),
232
- /* @__PURE__ */ a("span", { className: "sr-only", children: "Generating image…" })
233
- ]
239
+ children: /* @__PURE__ */ a(
240
+ w,
241
+ {
242
+ variant: "surface",
243
+ size: "lg",
244
+ color: "muted",
245
+ label: "Generating image"
246
+ }
247
+ )
234
248
  }
235
249
  );
236
250
  }
237
- function k({
251
+ function R({
238
252
  className: e,
239
253
  reason: t
240
254
  }) {
241
- return /* @__PURE__ */ u(
255
+ return /* @__PURE__ */ g(
242
256
  "div",
243
257
  {
244
258
  "data-slot": "image-content-filter-error",
245
- className: c(
259
+ className: d(
246
260
  "bg-muted/50 flex min-h-32 flex-col items-center justify-center gap-2 p-4 text-center",
247
261
  e
248
262
  ),
249
263
  children: [
250
- /* @__PURE__ */ a(W, { className: "text-muted-foreground size-8" }),
264
+ /* @__PURE__ */ a(B, { className: "text-muted-foreground size-8" }),
251
265
  /* @__PURE__ */ a("p", { className: "text-sm font-medium", children: "Image could not be generated" }),
252
266
  t && /* @__PURE__ */ a("p", { className: "text-muted-foreground text-xs", children: t })
253
267
  ]
254
268
  }
255
269
  );
256
270
  }
257
- function Z({
271
+ function V({
258
272
  onRegenerate: e
259
273
  }) {
260
274
  const [t, n] = p(!1);
@@ -273,32 +287,28 @@ function Z({
273
287
  disabled: t,
274
288
  "data-slot": "image-regenerate",
275
289
  "aria-label": "Regenerate image",
290
+ "aria-busy": t || void 0,
276
291
  className: "hover:bg-muted inline-flex size-7 items-center justify-center rounded disabled:opacity-50",
277
- children: /* @__PURE__ */ a(
278
- G,
279
- {
280
- className: c("size-4", t && "animate-spin")
281
- }
282
- )
292
+ children: t ? /* @__PURE__ */ a(w, { variant: "action", size: "sm", "aria-hidden": !0 }) : /* @__PURE__ */ a(W, { className: "size-4" })
283
293
  }
284
294
  );
285
295
  }
286
- function $({ part: e, onRegenerate: t, className: n }) {
287
- return /* @__PURE__ */ u(
296
+ function Z({ part: e, onRegenerate: t, className: n }) {
297
+ return /* @__PURE__ */ g(
288
298
  "div",
289
299
  {
290
300
  "data-slot": "image-actions",
291
- className: c("flex items-center gap-1 p-1", n),
301
+ className: d("flex items-center gap-1 p-1", n),
292
302
  children: [
293
303
  /* @__PURE__ */ a(
294
304
  "button",
295
305
  {
296
306
  type: "button",
297
- onClick: () => M(e),
307
+ onClick: () => K(e),
298
308
  "data-slot": "image-download",
299
309
  "aria-label": "Download image",
300
310
  className: "hover:bg-muted inline-flex size-7 items-center justify-center rounded",
301
- children: /* @__PURE__ */ a(L, { className: "size-4" })
311
+ children: /* @__PURE__ */ a(A, { className: "size-4" })
302
312
  }
303
313
  ),
304
314
  /* @__PURE__ */ a(
@@ -306,46 +316,46 @@ function $({ part: e, onRegenerate: t, className: n }) {
306
316
  {
307
317
  type: "button",
308
318
  onClick: () => {
309
- T(e).catch(() => {
319
+ M(e).catch(() => {
310
320
  });
311
321
  },
312
322
  "data-slot": "image-copy",
313
323
  "aria-label": "Copy image",
314
324
  className: "hover:bg-muted inline-flex size-7 items-center justify-center rounded",
315
- children: /* @__PURE__ */ a(S, { className: "size-4" })
325
+ children: /* @__PURE__ */ a(L, { className: "size-4" })
316
326
  }
317
327
  ),
318
- t && /* @__PURE__ */ a(Z, { onRegenerate: t })
328
+ t && /* @__PURE__ */ a(V, { onRegenerate: t })
319
329
  ]
320
330
  }
321
331
  );
322
332
  }
323
- const q = (e) => {
333
+ const $ = (e) => {
324
334
  const { image: t, filename: n, status: i } = e;
325
- return (i == null ? void 0 : i.type) === "running" ? /* @__PURE__ */ u(h, { children: [
326
- /* @__PURE__ */ a(j, {}),
335
+ return (i == null ? void 0 : i.type) === "running" ? /* @__PURE__ */ g(h, { children: [
336
+ /* @__PURE__ */ a(k, {}),
327
337
  /* @__PURE__ */ a(v, { children: n })
328
- ] }) : (i == null ? void 0 : i.type) === "incomplete" && i.reason === "content-filter" ? /* @__PURE__ */ a(h, { children: /* @__PURE__ */ a(k, { reason: "The provider blocked this image." }) }) : /* @__PURE__ */ u(h, { children: [
329
- /* @__PURE__ */ a(C, { src: t, alt: n || "Image content", children: /* @__PURE__ */ a(z, { src: t, alt: n || "Image content" }) }),
338
+ ] }) : (i == null ? void 0 : i.type) === "incomplete" && i.reason === "content-filter" ? /* @__PURE__ */ a(h, { children: /* @__PURE__ */ a(R, { reason: "The provider blocked this image." }) }) : /* @__PURE__ */ g(h, { children: [
339
+ /* @__PURE__ */ a(j, { src: t, alt: n || "Image content", children: /* @__PURE__ */ a(C, { src: t, alt: n || "Image content" }) }),
330
340
  /* @__PURE__ */ a(v, { children: n })
331
341
  ] });
332
- }, d = E(q);
333
- d.displayName = "Image";
334
- d.Root = h;
335
- d.Preview = z;
336
- d.Filename = v;
337
- d.Zoom = C;
338
- d.Actions = $;
339
- d.Generating = j;
340
- d.ContentFilterError = k;
342
+ }, c = D($);
343
+ c.displayName = "Image";
344
+ c.Root = h;
345
+ c.Preview = C;
346
+ c.Filename = v;
347
+ c.Zoom = j;
348
+ c.Actions = Z;
349
+ c.Generating = k;
350
+ c.ContentFilterError = R;
341
351
  export {
342
- d as Image,
343
- $ as ImageActions,
344
- k as ImageContentFilterError,
352
+ c as Image,
353
+ Z as ImageActions,
354
+ R as ImageContentFilterError,
345
355
  v as ImageFilename,
346
- j as ImageGenerating,
347
- z as ImagePreview,
356
+ k as ImageGenerating,
357
+ C as ImagePreview,
348
358
  h as ImageRoot,
349
- C as ImageZoom,
350
- V as imageVariants
359
+ j as ImageZoom,
360
+ T as imageVariants
351
361
  };
@@ -1,14 +1,14 @@
1
1
  "use client";
2
- import { jsx as o, jsxs as d } from "react/jsx-runtime";
2
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
3
3
  import "@assistant-ui/react-markdown/styles/dot.css";
4
- import { unstable_memoizeMarkdownComponents as i, useIsMarkdownCodeBlock as l, MarkdownTextPrimitive as n } from "@assistant-ui/react-markdown";
4
+ import { unstable_memoizeMarkdownComponents as i, useIsMarkdownCodeBlock as n, MarkdownTextPrimitive as l } from "@assistant-ui/react-markdown";
5
5
  import u from "remark-gfm";
6
- import { memo as c, useState as b } from "react";
7
- import { Copy as p, Check as f } from "../../lib/icons.js";
6
+ import { memo as c, useState as p } from "react";
7
+ import { Copy as b, Check as f } from "../../lib/icons.js";
8
8
  import { TooltipIconButton as x } from "./tooltip-icon-button.js";
9
9
  import { cn as r } from "../../lib/cn.js";
10
10
  const h = () => /* @__PURE__ */ o(
11
- n,
11
+ l,
12
12
  {
13
13
  remarkPlugins: [u],
14
14
  className: "aui-md",
@@ -17,21 +17,21 @@ const h = () => /* @__PURE__ */ o(
17
17
  }
18
18
  ), q = c(h), g = ({ language: t, code: e }) => {
19
19
  const { isCopied: a, copyToClipboard: m } = N();
20
- return /* @__PURE__ */ d("div", { className: "aui-code-header-root border-border/50 bg-muted/50 mt-3 flex items-center justify-between rounded-t-xl border border-b-0 px-3.5 py-1.5 text-xs", children: [
20
+ return /* @__PURE__ */ s("div", { className: "aui-code-header-root border-border/50 bg-muted/50 mt-3 flex items-center justify-between rounded-t-xl border border-b-0 px-3.5 py-1.5 text-xs", children: [
21
21
  /* @__PURE__ */ o("span", { className: "aui-code-header-language text-muted-foreground font-medium lowercase", children: t }),
22
- /* @__PURE__ */ d(x, { tooltip: "Copy", onClick: () => {
22
+ /* @__PURE__ */ s(x, { tooltip: "Copy", onClick: () => {
23
23
  !e || a || m(e);
24
24
  }, children: [
25
- !a && /* @__PURE__ */ o(p, { className: "animate-in zoom-in-95 fade-in duration-(--duration-fast) ease-out motion-reduce:animate-none" }),
26
- a && /* @__PURE__ */ o(f, { className: "animate-in zoom-in-95 fade-in duration-(--duration-normal) ease-out motion-reduce:animate-none" })
25
+ !a && /* @__PURE__ */ o(b, { className: "animate-in zoom-in-95 fade-in duration-150 ease-out motion-reduce:animate-none" }),
26
+ a && /* @__PURE__ */ o(f, { className: "animate-in zoom-in-95 fade-in duration-200 ease-out motion-reduce:animate-none" })
27
27
  ] })
28
28
  ] });
29
29
  }, N = ({
30
30
  copiedDuration: t = 3e3
31
31
  } = {}) => {
32
- const [e, a] = b(!1);
33
- return { isCopied: e, copyToClipboard: (s) => {
34
- !s || typeof navigator > "u" || !navigator.clipboard || navigator.clipboard.writeText(s).then(
32
+ const [e, a] = p(!1);
33
+ return { isCopied: e, copyToClipboard: (d) => {
34
+ !d || typeof navigator > "u" || !navigator.clipboard || navigator.clipboard.writeText(d).then(
35
35
  () => {
36
36
  a(!0), setTimeout(() => a(!1), t);
37
37
  },
@@ -44,7 +44,7 @@ const h = () => /* @__PURE__ */ o(
44
44
  "h1",
45
45
  {
46
46
  className: r(
47
- "aui-md-h1 mt-5 mb-2 scroll-m-20 text-lg font-semibold first:mt-0 last:mb-0",
47
+ "aui-md-h1 mt-5 mb-2 scroll-m-20 text-lg font-medium first:mt-0 last:mb-0",
48
48
  t
49
49
  ),
50
50
  ...e
@@ -54,7 +54,7 @@ const h = () => /* @__PURE__ */ o(
54
54
  "h2",
55
55
  {
56
56
  className: r(
57
- "aui-md-h2 mt-5 mb-2 scroll-m-20 text-lg font-semibold first:mt-0 last:mb-0",
57
+ "aui-md-h2 mt-5 mb-2 scroll-m-20 text-lg font-medium first:mt-0 last:mb-0",
58
58
  t
59
59
  ),
60
60
  ...e
@@ -64,7 +64,7 @@ const h = () => /* @__PURE__ */ o(
64
64
  "h3",
65
65
  {
66
66
  className: r(
67
- "aui-md-h3 mt-4 mb-1.5 scroll-m-20 text-base font-semibold first:mt-0 last:mb-0",
67
+ "aui-md-h3 mt-4 mb-1.5 scroll-m-20 text-base font-medium first:mt-0 last:mb-0",
68
68
  t
69
69
  ),
70
70
  ...e
@@ -84,7 +84,7 @@ const h = () => /* @__PURE__ */ o(
84
84
  "h5",
85
85
  {
86
86
  className: r(
87
- "aui-md-h5 mt-3 mb-1 text-xs font-semibold first:mt-0 last:mb-0",
87
+ "aui-md-h5 mt-3 mb-1 text-xs font-medium first:mt-0 last:mb-0",
88
88
  t
89
89
  ),
90
90
  ...e
@@ -201,7 +201,7 @@ const h = () => /* @__PURE__ */ o(
201
201
  strong: ({ className: t, ...e }) => /* @__PURE__ */ o(
202
202
  "strong",
203
203
  {
204
- className: r("aui-md-strong font-semibold", t),
204
+ className: r("aui-md-strong font-medium", t),
205
205
  ...e
206
206
  }
207
207
  ),
@@ -223,7 +223,7 @@ const h = () => /* @__PURE__ */ o(
223
223
  }
224
224
  ),
225
225
  code: function({ className: e, ...a }) {
226
- const m = l();
226
+ const m = n();
227
227
  return /* @__PURE__ */ o(
228
228
  "code",
229
229
  {