@actioneer/ads 1.0.6 → 1.0.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 (74) hide show
  1. package/DESIGN.md +80 -86
  2. package/README.md +6 -0
  3. package/components/ai-elements/chart.js +20 -20
  4. package/components/ai-elements/inline-citation.js +50 -50
  5. package/components/ai-elements/message.js +1 -1
  6. package/components/ai-elements/tool.js +5 -5
  7. package/components/alert.d.ts +5 -4
  8. package/components/alert.js +91 -79
  9. package/components/answer.js +1 -1
  10. package/components/assistant-ui/action-bar.js +1 -1
  11. package/components/assistant-ui/attachment.js +68 -49
  12. package/components/assistant-ui/composer-add-context.js +1 -1
  13. package/components/assistant-ui/composer-trigger-popover.js +1 -1
  14. package/components/assistant-ui/composer.js +13 -13
  15. package/components/assistant-ui/message-timing.js +6 -6
  16. package/components/assistant-ui/selection-toolbar.js +5 -5
  17. package/components/assistant-ui/sources.js +15 -15
  18. package/components/assistant-ui/tooltip-icon-button.js +18 -14
  19. package/components/audio-waveform.d.ts +21 -8
  20. package/components/audio-waveform.js +371 -94
  21. package/components/autocomplete.js +9 -9
  22. package/components/breadcrumbs.js +32 -38
  23. package/components/button.js +83 -73
  24. package/components/card.js +1 -1
  25. package/components/chart.js +732 -673
  26. package/components/chip.js +37 -35
  27. package/components/command-palette.js +12 -12
  28. package/components/connector-card.d.ts +1 -2
  29. package/components/connector-card.js +17 -17
  30. package/components/date-range-picker.js +1 -2
  31. package/components/drawer.js +9 -10
  32. package/components/dropdown.js +1 -1
  33. package/components/empty-state.d.ts +2 -0
  34. package/components/empty-state.js +17 -15
  35. package/components/field.js +9 -10
  36. package/components/file-dropzone.d.ts +6 -3
  37. package/components/file-dropzone.js +72 -60
  38. package/components/infinite-canvas.js +9 -9
  39. package/components/modal.js +1 -1
  40. package/components/page-body.js +8 -8
  41. package/components/popover.js +11 -11
  42. package/components/progress-circle.d.ts +1 -1
  43. package/components/progress-circle.js +57 -48
  44. package/components/radio.d.ts +1 -1
  45. package/components/radio.js +53 -53
  46. package/components/segmented.d.ts +1 -0
  47. package/components/segmented.js +34 -36
  48. package/components/select.js +2 -2
  49. package/components/selection-action-bar.js +32 -31
  50. package/components/setting-row.js +10 -10
  51. package/components/sidebar.js +74 -73
  52. package/components/slider.js +5 -5
  53. package/components/stepper.d.ts +1 -1
  54. package/components/stepper.js +1 -1
  55. package/components/switch.js +10 -10
  56. package/components/table.d.ts +17 -5
  57. package/components/table.js +559 -405
  58. package/components/tabs.js +41 -35
  59. package/components/timeline.js +3 -3
  60. package/components/toast.js +53 -56
  61. package/components/ui/button.js +4 -4
  62. package/components/ui/dialog.js +1 -1
  63. package/components/viz-charts.js +263 -221
  64. package/examples/README.md +30 -0
  65. package/examples/agents-screen.tsx +477 -0
  66. package/examples/settings-screen.tsx +90 -0
  67. package/examples/workspace-header.tsx +71 -0
  68. package/lib/icons.d.ts +8 -0
  69. package/lib/icons.js +171 -118
  70. package/llms.txt +16 -16
  71. package/manifest.json +178 -54
  72. package/package.json +1 -1
  73. package/styles.css +60 -72
  74. package/theme.css +55 -63
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- var E = Object.defineProperty;
3
- var P = (a, t, r) => t in a ? E(a, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : a[t] = r;
4
- var A = (a, t, r) => P(a, typeof t != "symbol" ? t + "" : t, r);
2
+ var P = Object.defineProperty;
3
+ var U = (a, t, r) => t in a ? P(a, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : a[t] = r;
4
+ var A = (a, t, r) => U(a, typeof t != "symbol" ? t + "" : t, r);
5
5
  import { jsx as e, jsxs as i, Fragment as N } from "react/jsx-runtime";
6
- import { useRef as w, useState as C, useEffect as U } from "react";
7
- import { Plus as _, FileText as h, WarningCircle as R, At as L, Bolt as S, Close as T } from "../../lib/icons.js";
6
+ import { useRef as w, useState as C, useEffect as _ } from "react";
7
+ import { Plus as E, FileText as h, WarningCircle as R, At as L, Bolt as S, Close as T } from "../../lib/icons.js";
8
8
  import { Spinner as v } from "../spinner.js";
9
9
  import { CONTEXT_MIME as D } from "./composer-add-context.js";
10
10
  import { HARNESS_MIME as F } from "./composer-harness.js";
@@ -13,11 +13,11 @@ import { useShallow as H } from "zustand/shallow";
13
13
  import { Tooltip as $, TooltipTrigger as q, TooltipContent as B } from "../ui/tooltip.js";
14
14
  import { Dialog as G, DialogTrigger as W, DialogContent as X, DialogTitle as Y } from "../ui/dialog.js";
15
15
  import { Avatar as J, AvatarImage as K, AvatarFallback as Q } from "../ui/avatar.js";
16
- import { TooltipIconButton as f } from "./tooltip-icon-button.js";
17
- import { cn as p } from "../../lib/cn.js";
16
+ import { TooltipIconButton as g } from "./tooltip-icon-button.js";
17
+ import { cn as m } from "../../lib/cn.js";
18
18
  const V = (a) => {
19
19
  const [t, r] = C(void 0);
20
- return U(() => {
20
+ return _(() => {
21
21
  if (!a) {
22
22
  r(void 0);
23
23
  return;
@@ -30,10 +30,10 @@ const V = (a) => {
30
30
  }, k = () => {
31
31
  const { file: a, src: t } = l(
32
32
  H((r) => {
33
- var c, m;
33
+ var c, d;
34
34
  if (r.attachment.type !== "image") return {};
35
35
  if (r.attachment.file) return { file: r.attachment.file };
36
- const n = (m = (c = r.attachment.content) == null ? void 0 : c.filter((d) => d.type === "image")[0]) == null ? void 0 : m.image;
36
+ const n = (d = (c = r.attachment.content) == null ? void 0 : c.filter((u) => u.type === "image")[0]) == null ? void 0 : d.image;
37
37
  return n ? { src: n } : {};
38
38
  })
39
39
  );
@@ -60,7 +60,7 @@ const V = (a) => {
60
60
  {
61
61
  src: a,
62
62
  alt: "Attachment preview",
63
- className: p(
63
+ className: m(
64
64
  "block h-auto max-h-[80vh] w-auto max-w-full object-contain",
65
65
  t ? "aui-attachment-preview-image-loaded" : "aui-attachment-preview-image-loading absolute invisible"
66
66
  ),
@@ -100,7 +100,7 @@ const V = (a) => {
100
100
  /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(h, { className: "aui-attachment-tile-fallback-icon text-muted-foreground size-8" }) })
101
101
  ] });
102
102
  }, I = () => {
103
- const t = O().attachment.source !== "message", r = l((o) => o.attachment.contentType === D), n = l((o) => o.attachment.contentType === F), c = l((o) => o.attachment.type === "image"), m = l((o) => {
103
+ const t = O().attachment.source !== "message", r = l((o) => o.attachment.contentType === D), n = l((o) => o.attachment.contentType === F), c = l((o) => o.attachment.type === "image"), d = l((o) => {
104
104
  const y = o.attachment.type;
105
105
  switch (y) {
106
106
  case "image":
@@ -112,14 +112,14 @@ const V = (a) => {
112
112
  default:
113
113
  return y;
114
114
  }
115
- }), d = l(
115
+ }), u = l(
116
116
  (o) => o.attachment.status.type === "running" ? "uploading" : o.attachment.status.type === "incomplete" && o.attachment.status.reason === "error" ? "error" : void 0
117
- ), g = d === "uploading", u = d === "error";
117
+ ), f = u === "uploading", p = u === "error";
118
118
  return r ? /* @__PURE__ */ e(ae, { isComposer: t }) : n ? /* @__PURE__ */ e(ne, { isComposer: t }) : c ? /* @__PURE__ */ i($, { children: [
119
119
  /* @__PURE__ */ i(
120
120
  s.Root,
121
121
  {
122
- className: p(
122
+ className: m(
123
123
  "aui-attachment-root relative",
124
124
  c && !t && "aui-attachment-root-message only:*:first:size-24"
125
125
  ),
@@ -127,16 +127,16 @@ const V = (a) => {
127
127
  /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(q, { asChild: !0, children: /* @__PURE__ */ i(
128
128
  "div",
129
129
  {
130
- className: p(
130
+ className: m(
131
131
  "aui-attachment-tile bg-muted relative size-14 cursor-pointer overflow-hidden rounded-sm border transition-opacity hover:opacity-75",
132
- u && "border-destructive"
132
+ p && "border-destructive"
133
133
  ),
134
134
  role: "button",
135
135
  tabIndex: 0,
136
- "aria-label": `${m} attachment${u ? ", upload failed" : g ? ", uploading" : ""}`,
136
+ "aria-label": `${d} attachment${p ? ", upload failed" : f ? ", uploading" : ""}`,
137
137
  children: [
138
138
  /* @__PURE__ */ e(te, {}),
139
- g && /* @__PURE__ */ e(
139
+ f && /* @__PURE__ */ e(
140
140
  "div",
141
141
  {
142
142
  "aria-hidden": "true",
@@ -153,7 +153,7 @@ const V = (a) => {
153
153
  )
154
154
  }
155
155
  ),
156
- u && /* @__PURE__ */ e(
156
+ p && /* @__PURE__ */ e(
157
157
  "div",
158
158
  {
159
159
  "aria-hidden": "true",
@@ -173,22 +173,26 @@ const V = (a) => {
173
173
  re,
174
174
  {
175
175
  isComposer: t,
176
- typeLabel: m,
177
- isUploading: g,
178
- isError: u
176
+ typeLabel: d,
177
+ isUploading: f,
178
+ isError: p
179
179
  }
180
180
  );
181
181
  }, x = ({
182
- label: a = "Remove attachment"
182
+ label: a = "Remove attachment",
183
+ className: t
183
184
  }) => /* @__PURE__ */ e(s.Remove, { asChild: !0, children: /* @__PURE__ */ e(
184
185
  "button",
185
186
  {
186
187
  type: "button",
187
188
  "aria-label": a,
188
- className: "flex size-5 shrink-0 items-center justify-center rounded text-muted-foreground outline-none transition-colors hover:bg-foreground/10 hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring [&_svg]:size-3.5",
189
- children: /* @__PURE__ */ e(T, {})
189
+ className: m(
190
+ "flex size-4 shrink-0 items-center justify-center rounded-xs bg-current/10 outline-none transition-[background-color,transform] duration-150 ease-out hover:bg-current/20 active:scale-[0.97] active:bg-current/20 focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none [&_svg]:size-2.5",
191
+ t
192
+ ),
193
+ children: /* @__PURE__ */ e(T, { weight: "bold" })
190
194
  }
191
- ) }), ae = ({ isComposer: a }) => /* @__PURE__ */ e(s.Root, { className: "aui-attachment-root", children: /* @__PURE__ */ i("div", { className: "inline-flex max-w-[15rem] items-center gap-1.5 rounded-md bg-muted py-1 pe-1 ps-2 text-s text-foreground", children: [
195
+ ) }), ae = ({ isComposer: a }) => /* @__PURE__ */ e(s.Root, { className: "aui-attachment-root", children: /* @__PURE__ */ i("div", { className: "inline-flex max-w-[15rem] items-center gap-1.5 rounded-md bg-wg2 py-1 pe-1 ps-2 text-s text-foreground", children: [
192
196
  /* @__PURE__ */ e(L, { className: "size-3.5 shrink-0 text-muted-foreground" }),
193
197
  /* @__PURE__ */ e("span", { className: "truncate", children: /* @__PURE__ */ e(s.Name, {}) }),
194
198
  a && /* @__PURE__ */ e(x, { label: "Remove context" })
@@ -199,27 +203,42 @@ const V = (a) => {
199
203
  /* @__PURE__ */ e(s.Name, {})
200
204
  ] }),
201
205
  a && /* @__PURE__ */ e(x, { label: "Remove harness" })
202
- ] }) }), re = ({ isComposer: a, typeLabel: t, isUploading: r, isError: n }) => /* @__PURE__ */ e(s.Root, { className: "aui-attachment-root", children: /* @__PURE__ */ i("div", { className: "flex w-56 max-w-full items-center gap-2.5 rounded-lg bg-muted p-1.5", children: [
203
- /* @__PURE__ */ e(
204
- "div",
205
- {
206
- className: p(
207
- "flex size-9 shrink-0 items-center justify-center rounded-md bg-background text-muted-foreground [&_svg]:size-4.5",
208
- n && "text-destructive"
206
+ ] }) }), re = ({ isComposer: a, typeLabel: t, isUploading: r, isError: n }) => /* @__PURE__ */ e(s.Root, { className: "aui-attachment-root", children: /* @__PURE__ */ i(
207
+ "div",
208
+ {
209
+ className: m(
210
+ "flex w-56 max-w-full items-center gap-2.5 rounded-lg p-1.5",
211
+ n ? "bg-danger-50" : "bg-wg2"
212
+ ),
213
+ children: [
214
+ /* @__PURE__ */ e(
215
+ "div",
216
+ {
217
+ className: m(
218
+ "ms-1 flex h-9 w-5 shrink-0 items-center justify-center text-muted-foreground [&_svg]:size-4.5",
219
+ n && "text-destructive"
220
+ ),
221
+ children: r ? /* @__PURE__ */ e(v, { variant: "upload", size: "sm", "aria-hidden": !0 }) : n ? /* @__PURE__ */ e(R, {}) : /* @__PURE__ */ e(h, {})
222
+ }
209
223
  ),
210
- children: r ? /* @__PURE__ */ e(v, { variant: "upload", size: "sm", "aria-hidden": !0 }) : n ? /* @__PURE__ */ e(R, {}) : /* @__PURE__ */ e(h, {})
211
- }
212
- ),
213
- /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
214
- /* @__PURE__ */ e("div", { className: "truncate text-s font-medium leading-tight text-foreground", children: /* @__PURE__ */ e(s.Name, {}) }),
215
- /* @__PURE__ */ e("div", { className: "truncate text-s leading-tight text-muted-foreground", children: n ? "Upload failed" : r ? "Uploading…" : t })
216
- ] }),
217
- a && /* @__PURE__ */ e(x, { label: "Remove file" })
218
- ] }) }), ie = () => /* @__PURE__ */ e(s.Remove, { asChild: !0, children: /* @__PURE__ */ e(
219
- f,
224
+ /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
225
+ /* @__PURE__ */ e("div", { className: "truncate text-s font-medium leading-tight text-foreground", children: /* @__PURE__ */ e(s.Name, {}) }),
226
+ /* @__PURE__ */ e("div", { className: "truncate text-s leading-tight text-muted-foreground", children: n ? "Upload failed" : r ? "Uploading…" : t })
227
+ ] }),
228
+ a && /* @__PURE__ */ e(
229
+ x,
230
+ {
231
+ label: "Remove file",
232
+ className: n ? "text-danger-700" : "text-foreground"
233
+ }
234
+ )
235
+ ]
236
+ }
237
+ ) }), ie = () => /* @__PURE__ */ e(s.Remove, { asChild: !0, children: /* @__PURE__ */ e(
238
+ g,
220
239
  {
221
240
  tooltip: "Remove file",
222
- className: "aui-attachment-tile-remove text-muted-foreground hover:[&_svg]:text-destructive absolute end-1.5 top-1.5 size-3.5 rounded-full bg-card opacity-100 shadow-100 hover:bg-card! [&_svg]:text-foreground",
241
+ className: "aui-attachment-tile-remove text-muted-foreground hover:[&_svg]:text-destructive absolute end-1.5 top-1.5 size-3.5 rounded-full bg-card opacity-100 hover:bg-card! [&_svg]:text-foreground",
223
242
  side: "top",
224
243
  children: /* @__PURE__ */ e(T, { className: "aui-attachment-remove-icon size-3" })
225
244
  }
@@ -228,7 +247,7 @@ const V = (a) => {
228
247
  // with the question rather than trailing off the right edge.
229
248
  /* @__PURE__ */ e("div", { className: "aui-user-message-attachments-end mt-2.5 flex w-full flex-row flex-wrap justify-start gap-2 empty:hidden", children: /* @__PURE__ */ e(M.Attachments, { children: () => /* @__PURE__ */ e(I, {}) }) })
230
249
  ), Re = () => /* @__PURE__ */ e("div", { className: "aui-composer-attachments flex w-full flex-row items-center gap-2 overflow-x-auto empty:hidden", children: /* @__PURE__ */ e(z.Attachments, { children: () => /* @__PURE__ */ e(I, {}) }) }), Te = () => /* @__PURE__ */ e(z.AddAttachment, { asChild: !0, children: /* @__PURE__ */ e(
231
- f,
250
+ g,
232
251
  {
233
252
  tooltip: "Add Attachment",
234
253
  side: "bottom",
@@ -236,7 +255,7 @@ const V = (a) => {
236
255
  size: "icon",
237
256
  className: "aui-composer-add-attachment hover:bg-muted-foreground/15 size-7 rounded-full p-1 font-medium",
238
257
  "aria-label": "Add Attachment",
239
- children: /* @__PURE__ */ e(_, { className: "aui-attachment-add-icon size-4.5 stroke-[1.5px]" })
258
+ children: /* @__PURE__ */ e(E, { className: "aui-attachment-add-icon size-4.5 stroke-[1.5px]" })
240
259
  }
241
260
  ) }), oe = "image/png,image/jpeg,image/webp,image/gif", se = /* @__PURE__ */ new Set([
242
261
  "image/png",
@@ -320,7 +339,7 @@ const je = () => {
320
339
  }
321
340
  ),
322
341
  /* @__PURE__ */ e(
323
- f,
342
+ g,
324
343
  {
325
344
  tooltip: "Upload image or file",
326
345
  side: "top",
@@ -356,7 +375,7 @@ const je = () => {
356
375
  }
357
376
  ),
358
377
  /* @__PURE__ */ e(
359
- f,
378
+ g,
360
379
  {
361
380
  tooltip: "Attach business documents",
362
381
  side: "top",
@@ -89,7 +89,7 @@ function fe() {
89
89
  visibility: d ? "visible" : "hidden",
90
90
  transformOrigin: "bottom left"
91
91
  },
92
- className: "z-50 w-72 rounded-xl border border-border bg-elevated p-1 text-foreground shadow-elevation outline-none",
92
+ className: "z-50 w-72 rounded-xl border border-border bg-elevated p-1 text-foreground outline-none",
93
93
  children: [
94
94
  l ? /* @__PURE__ */ m("div", { className: "mb-0.5 flex items-center gap-1 px-1", children: [
95
95
  /* @__PURE__ */ n(
@@ -109,7 +109,7 @@ const _ = ({
109
109
  {
110
110
  "data-slot": "composer-trigger-popover",
111
111
  className: I(
112
- "aui-composer-trigger-popover bg-popover text-popover-foreground absolute start-0 bottom-full z-50 mb-2 w-64 overflow-hidden rounded-xl border shadow-300",
112
+ "aui-composer-trigger-popover bg-popover text-popover-foreground absolute start-0 bottom-full z-50 mb-2 w-64 overflow-hidden rounded-xl border shadow-float",
113
113
  p
114
114
  ),
115
115
  ...g,
@@ -69,7 +69,7 @@ const Z = ({
69
69
  l(t);
70
70
  }, g = () => {
71
71
  window.clearTimeout(i), i = window.setTimeout(c, 0);
72
- }, w = () => {
72
+ }, b = () => {
73
73
  m.current = o.value.length > 0 || document.activeElement === o;
74
74
  }, z = (t, d) => {
75
75
  n(t), o.value = t, o.dispatchEvent(new Event("input", { bubbles: !0 })), l(t.length > 0), window.setTimeout(() => {
@@ -89,11 +89,11 @@ const Z = ({
89
89
  }
90
90
  g();
91
91
  }
92
- }, b = (t) => {
92
+ }, w = (t) => {
93
93
  (t.metaKey || t.ctrlKey) && !t.altKey && t.key.toLowerCase() === "a" && (t.preventDefault(), o.select());
94
94
  };
95
- return c(), o.addEventListener("beforeinput", E), o.addEventListener("input", c), o.addEventListener("focus", w), o.addEventListener("blur", w), o.addEventListener("keydown", b), () => {
96
- window.clearTimeout(i), o.removeEventListener("beforeinput", E), o.removeEventListener("input", c), o.removeEventListener("focus", w), o.removeEventListener("blur", w), o.removeEventListener("keydown", b);
95
+ return c(), o.addEventListener("beforeinput", E), o.addEventListener("input", c), o.addEventListener("focus", b), o.addEventListener("blur", b), o.addEventListener("keydown", w), () => {
96
+ window.clearTimeout(i), o.removeEventListener("beforeinput", E), o.removeEventListener("input", c), o.removeEventListener("focus", b), o.removeEventListener("blur", b), o.removeEventListener("keydown", w);
97
97
  };
98
98
  }, [o, n]), u.useEffect(() => {
99
99
  var E;
@@ -106,25 +106,25 @@ const Z = ({
106
106
  return;
107
107
  }
108
108
  let i = !1, l = 0, c, g;
109
- const w = (b) => new Promise((t) => {
110
- c = window.setTimeout(t, b);
109
+ const b = (w) => new Promise((t) => {
110
+ c = window.setTimeout(t, w);
111
111
  }), z = () => i;
112
112
  return (async () => {
113
113
  for (; !i; ) {
114
- for (; m.current && !i; ) await w(100);
114
+ for (; m.current && !i; ) await b(100);
115
115
  if (i) return;
116
- const b = r[l];
116
+ const w = r[l];
117
117
  x("");
118
118
  const { promise: t, cancel: d } = W(
119
- b,
120
- J(b),
119
+ w,
120
+ J(w),
121
121
  x,
122
122
  z,
123
123
  () => m.current
124
124
  );
125
125
  if (g = d, await t, g = void 0, i) return;
126
126
  if (!m.current) {
127
- if (await w(G), i) return;
127
+ if (await b(G), i) return;
128
128
  l = (l + 1) % r.length;
129
129
  }
130
130
  }
@@ -174,7 +174,7 @@ const pe = ({
174
174
  var f;
175
175
  n.target.closest("button, a, input, textarea, [role='button']") || (f = n.currentTarget.querySelector("textarea")) == null || f.focus();
176
176
  },
177
- className: "border-wg2 data-[dragging=true]:border-ring focus-within:border-field-focus relative flex w-full flex-col gap-2 rounded-(--composer-radius) border bg-(--composer-bg) p-(--composer-padding) shadow-400 transition-[border-color,box-shadow] data-[dragging=true]:border-dashed data-[dragging=true]:bg-action-primary-soft",
177
+ className: "border-wg2 data-[dragging=true]:border-ring focus-within:border-field-focus relative flex w-full flex-col gap-2 rounded-(--composer-radius) border bg-(--composer-bg) p-(--composer-padding) shadow-float transition-[border-color,box-shadow] data-[dragging=true]:border-dashed data-[dragging=true]:bg-action-primary-soft",
178
178
  children: [
179
179
  /* @__PURE__ */ e(K, { className: "mx-0 mt-0" }),
180
180
  /* @__PURE__ */ e(k, {}),
@@ -250,7 +250,7 @@ const pe = ({
250
250
  {
251
251
  "data-slot": "aui_edit-composer-wrapper",
252
252
  className: "flex flex-col px-2 [contain-intrinsic-size:auto_200px] [content-visibility:auto]",
253
- children: /* @__PURE__ */ p(a.Root, { className: "aui-edit-composer-root border-border/60 focus-within:border-field-focus ms-auto flex w-full max-w-[85%] flex-col rounded-(--composer-radius) border bg-(--composer-bg) shadow-200", children: [
253
+ children: /* @__PURE__ */ p(a.Root, { className: "aui-edit-composer-root border-border/60 focus-within:border-field-focus ms-auto flex w-full max-w-[85%] flex-col rounded-(--composer-radius) border bg-(--composer-bg)", children: [
254
254
  /* @__PURE__ */ e(
255
255
  a.Input,
256
256
  {
@@ -3,7 +3,7 @@ import { jsxs as n, jsx as t } from "react/jsx-runtime";
3
3
  import { useMessageTiming as a } from "@assistant-ui/react";
4
4
  import { Tooltip as i, TooltipTrigger as l, TooltipContent as m } from "../ui/tooltip.js";
5
5
  import { cn as d } from "../../lib/cn.js";
6
- const r = (s) => s === void 0 ? "—" : s < 1e3 ? `${Math.round(s)}ms` : `${(s / 1e3).toFixed(2)}s`, g = ({ className: s, side: o = "right" }) => {
6
+ const o = (s) => s === void 0 ? "—" : s < 1e3 ? `${Math.round(s)}ms` : `${(s / 1e3).toFixed(2)}s`, g = ({ className: s, side: r = "right" }) => {
7
7
  const e = a();
8
8
  return (e == null ? void 0 : e.totalStreamTime) === void 0 ? null : /* @__PURE__ */ n(i, { children: [
9
9
  /* @__PURE__ */ t(l, { asChild: !0, children: /* @__PURE__ */ t(
@@ -16,24 +16,24 @@ const r = (s) => s === void 0 ? "—" : s < 1e3 ? `${Math.round(s)}ms` : `${(s /
16
16
  "text-muted-foreground hover:bg-accent hover:text-accent-foreground flex items-center rounded-md p-1 font-mono text-s tabular-nums transition-colors",
17
17
  s
18
18
  ),
19
- children: r(e.totalStreamTime)
19
+ children: o(e.totalStreamTime)
20
20
  }
21
21
  ) }),
22
22
  /* @__PURE__ */ t(
23
23
  m,
24
24
  {
25
- side: o,
25
+ side: r,
26
26
  sideOffset: 8,
27
27
  "data-slot": "message-timing-popover",
28
- className: "bg-popover text-popover-foreground rounded-lg border px-3 py-2 shadow-300 [&_span>svg]:hidden!",
28
+ className: "bg-popover text-popover-foreground rounded-lg border px-3 py-2 shadow-float [&_span>svg]:hidden!",
29
29
  children: /* @__PURE__ */ n("div", { className: "grid min-w-35 gap-1.5 text-xs", children: [
30
30
  e.firstTokenTime !== void 0 && /* @__PURE__ */ n("div", { className: "flex items-center justify-between gap-4", children: [
31
31
  /* @__PURE__ */ t("span", { className: "text-muted-foreground", children: "First token" }),
32
- /* @__PURE__ */ t("span", { className: "font-mono tabular-nums", children: r(e.firstTokenTime) })
32
+ /* @__PURE__ */ t("span", { className: "font-mono tabular-nums", children: o(e.firstTokenTime) })
33
33
  ] }),
34
34
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between gap-4", children: [
35
35
  /* @__PURE__ */ t("span", { className: "text-muted-foreground", children: "Total" }),
36
- /* @__PURE__ */ t("span", { className: "font-mono tabular-nums", children: r(e.totalStreamTime) })
36
+ /* @__PURE__ */ t("span", { className: "font-mono tabular-nums", children: o(e.totalStreamTime) })
37
37
  ] }),
38
38
  e.tokensPerSecond !== void 0 && /* @__PURE__ */ n("div", { className: "flex items-center justify-between gap-4", children: [
39
39
  /* @__PURE__ */ t("span", { className: "text-muted-foreground", children: "Speed" }),
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsxs as l, jsx as t, Fragment as p } from "react/jsx-runtime";
3
- import { memo as f } from "react";
3
+ import { memo as x } from "react";
4
4
  import { SelectionToolbarPrimitive as m } from "@assistant-ui/react";
5
5
  import { Quote as y, Copy as S } from "../../lib/icons.js";
6
6
  import { cn as i } from "../../lib/cn.js";
@@ -13,7 +13,7 @@ function d({
13
13
  {
14
14
  "data-slot": "selection-toolbar",
15
15
  className: i(
16
- "bg-popover flex items-center gap-1 rounded-lg border px-1 py-1 shadow-300",
16
+ "bg-popover flex items-center gap-1 rounded-lg border px-1 py-1 shadow-float",
17
17
  o
18
18
  ),
19
19
  ...e
@@ -56,11 +56,11 @@ function b({
56
56
  "text-popover-foreground hover:bg-accent flex items-center gap-1.5 rounded-md px-2.5 py-1 text-sm transition-colors",
57
57
  o
58
58
  ),
59
- onClick: (x) => {
59
+ onClick: (f) => {
60
60
  var a, c, s;
61
61
  (c = navigator.clipboard) == null || c.writeText(
62
62
  ((a = window.getSelection()) == null ? void 0 : a.toString()) ?? ""
63
- ), (s = window.getSelection()) == null || s.removeAllRanges(), r == null || r(x);
63
+ ), (s = window.getSelection()) == null || s.removeAllRanges(), r == null || r(f);
64
64
  },
65
65
  ...g,
66
66
  children: e ?? /* @__PURE__ */ l(p, { children: [
@@ -76,7 +76,7 @@ const v = ({
76
76
  }) => /* @__PURE__ */ l(d, { className: o, ...e, children: [
77
77
  /* @__PURE__ */ t(u, {}),
78
78
  /* @__PURE__ */ t(b, {})
79
- ] }), n = f(
79
+ ] }), n = x(
80
80
  v
81
81
  );
82
82
  n.displayName = "SelectionToolbar";
@@ -13,18 +13,18 @@ const m = (e) => {
13
13
  }, y = (e) => `https://icons.duckduckgo.com/ip3/${e}.ico`;
14
14
  function d({
15
15
  url: e,
16
- className: o,
17
- faviconUrl: n = y,
16
+ className: n,
17
+ faviconUrl: o = y,
18
18
  ...c
19
19
  }) {
20
- const i = m(e), s = n(i), [h, p] = x(void 0);
20
+ const i = m(e), s = o(i), [h, p] = x(void 0);
21
21
  return h === s ? /* @__PURE__ */ r(
22
22
  "span",
23
23
  {
24
24
  "data-slot": "source-icon-fallback",
25
25
  className: t(
26
26
  "bg-muted flex size-3 shrink-0 items-center justify-center rounded-sm text-xs font-medium",
27
- o
27
+ n
28
28
  ),
29
29
  ...c,
30
30
  children: i.charAt(0).toUpperCase() || "?"
@@ -35,40 +35,40 @@ function d({
35
35
  "data-slot": "source-icon",
36
36
  src: s,
37
37
  alt: "",
38
- className: t("size-3 shrink-0 rounded-sm", o),
38
+ className: t("size-3 shrink-0 rounded-sm", n),
39
39
  onError: () => p(s),
40
40
  ...c
41
41
  }
42
42
  );
43
43
  }
44
- function a({ className: e, ...o }) {
44
+ function a({ className: e, ...n }) {
45
45
  return /* @__PURE__ */ r(
46
46
  "span",
47
47
  {
48
48
  "data-slot": "source-title",
49
49
  className: t("max-w-37.5 truncate", e),
50
- ...o
50
+ ...n
51
51
  }
52
52
  );
53
53
  }
54
- function N({ className: e, ...o }) {
54
+ function N({ className: e, ...n }) {
55
55
  return /* @__PURE__ */ r(
56
56
  "span",
57
57
  {
58
58
  "data-slot": "source-document-icon",
59
59
  className: t(
60
- "text-muted-foreground flex size-3 shrink-0 items-center justify-center",
60
+ "text-current flex size-3 shrink-0 items-center justify-center",
61
61
  e
62
62
  ),
63
- ...o,
63
+ ...n,
64
64
  children: /* @__PURE__ */ r(b, { className: "size-3" })
65
65
  }
66
66
  );
67
67
  }
68
68
  function f({
69
69
  className: e,
70
- variant: o,
71
- size: n,
70
+ variant: n,
71
+ size: o,
72
72
  target: c = "_blank",
73
73
  rel: i = "noopener noreferrer",
74
74
  ...s
@@ -78,7 +78,7 @@ function f({
78
78
  {
79
79
  "data-slot": "source",
80
80
  className: t(
81
- v({ variant: o, size: n }),
81
+ v({ variant: n, size: o }),
82
82
  "focus-visible:border-ring focus-visible:ring-ring/50 cursor-pointer outline-none focus-visible:ring-[3px]",
83
83
  e
84
84
  ),
@@ -90,10 +90,10 @@ function f({
90
90
  }
91
91
  const k = (e) => {
92
92
  if (e.sourceType === "url" && e.url) {
93
- const o = m(e.url), n = e.title || o;
93
+ const n = m(e.url), o = e.title || n;
94
94
  return /* @__PURE__ */ l(f, { href: e.url, children: [
95
95
  /* @__PURE__ */ r(d, { url: e.url }),
96
- /* @__PURE__ */ r(a, { children: n })
96
+ /* @__PURE__ */ r(a, { children: o })
97
97
  ] });
98
98
  }
99
99
  return e.sourceType === "document" ? /* @__PURE__ */ r(
@@ -1,29 +1,33 @@
1
1
  "use client";
2
- import { jsx as o, jsxs as r } from "react/jsx-runtime";
3
- import { forwardRef as s } from "react";
4
- import { Slot as c } from "radix-ui";
5
- import { TooltipProvider as m, Tooltip as p, TooltipTrigger as d, TooltipContent as u } from "../ui/tooltip.js";
6
- import { Button as f } from "../ui/button.js";
7
- import { cn as h } from "../../lib/cn.js";
8
- const T = s(({ children: i, tooltip: t, side: n = "bottom", className: e, ...l }, a) => /* @__PURE__ */ o(m, { delayDuration: 0, children: /* @__PURE__ */ r(p, { children: [
9
- /* @__PURE__ */ o(d, { asChild: !0, children: /* @__PURE__ */ r(
10
- f,
2
+ import { jsx as o, jsxs as t } from "react/jsx-runtime";
3
+ import { forwardRef as c } from "react";
4
+ import { Slot as m } from "radix-ui";
5
+ import { TooltipProvider as s, Tooltip as p, TooltipTrigger as d, TooltipContent as u } from "../ui/tooltip.js";
6
+ import { Button as h } from "../ui/button.js";
7
+ import { cn as f } from "../../lib/cn.js";
8
+ import { IconHoverFillContext as v } from "../../lib/icons.js";
9
+ const T = c(({ children: i, tooltip: r, side: e = "bottom", className: n, ...l }, a) => /* @__PURE__ */ o(s, { delayDuration: 0, children: /* @__PURE__ */ t(p, { children: [
10
+ /* @__PURE__ */ o(d, { asChild: !0, children: /* @__PURE__ */ t(
11
+ h,
11
12
  {
12
13
  variant: "ghost",
13
14
  size: "icon",
15
+ "data-icon-hover-fill": !0,
14
16
  ...l,
15
- className: h(
17
+ className: f(
16
18
  "aui-button-icon size-6 p-1 active:scale-90",
17
- e
19
+ // No hover background: the icon fills and turns brand teal.
20
+ "hover:bg-transparent hover:text-action-primary",
21
+ n
18
22
  ),
19
23
  ref: a,
20
24
  children: [
21
- /* @__PURE__ */ o(c.Slottable, { children: i }),
22
- /* @__PURE__ */ o("span", { className: "aui-sr-only sr-only", children: t })
25
+ /* @__PURE__ */ o(m.Slottable, { children: /* @__PURE__ */ o(v.Provider, { value: !0, children: i }) }),
26
+ /* @__PURE__ */ o("span", { className: "aui-sr-only sr-only", children: r })
23
27
  ]
24
28
  }
25
29
  ) }),
26
- /* @__PURE__ */ o(u, { side: n, children: t })
30
+ /* @__PURE__ */ o(u, { side: e, children: r })
27
31
  ] }) }));
28
32
  T.displayName = "TooltipIconButton";
29
33
  export {
@@ -2,29 +2,42 @@ import * as React from "react";
2
2
  /**
3
3
  * AudioWaveform — the ADS recording player (ported from the voice product's
4
4
  * call panel). One waveform with play/seek, hover scrubbing, and a download
5
- * action; controls are ADS Buttons and the elapsed time lives ON the play
6
- * control (0:00 at rest — no separate time strip).
5
+ * action, in one of two looks:
6
+ *
7
+ * - `look="minimal"` (default) — a voice-note player: everything sits in one
8
+ * WG2 pill (no border, no shadow). A round ink play/pause control leads, a
9
+ * single-tone run of 3px pill bars follows (unplayed WG7, played WG12, the
10
+ * hovered seek range previews in WG8 with a time bubble), then a mono
11
+ * `elapsed / total` readout and an icon-only download.
12
+ * wavesurfer.js decodes and plays the audio; the bars are drawn as token-
13
+ * filled SVG so they follow the theme without resolving colors.
14
+ * - `look="classic"` — the original call-panel player: wavesurfer draws the
15
+ * waveform, the elapsed time lives ON the play Button (0:00 at rest), and
16
+ * `topLabel` / `bottomLabel` chips name the halves of a stereo recording.
7
17
  *
8
18
  * Speaker-split mode: for two-channel conversation audio (channel 0 = agent,
9
19
  * channel 1 = the caller) the agent's energy draws ABOVE the centerline and
10
20
  * the caller's BELOW it, so turn-taking reads at a glance — one waveform,
11
- * never two stacked lanes. Enabled automatically when `channels > 1`;
12
- * label the halves with `topLabel` / `bottomLabel` (default Agent / User).
21
+ * never two stacked lanes. Enabled automatically when `channels > 1`.
13
22
  *
14
- * Colors ride the theme tokens (waveform = muted-foreground, progress =
15
- * foreground) — never hardcoded.
23
+ * Colors ride the theme tokens — never hardcoded.
16
24
  */
25
+ export type AudioWaveformLook = "minimal" | "classic";
17
26
  export interface AudioWaveformProps {
18
27
  /** Audio source URL (same-origin or CORS-served). */
19
28
  src: string;
20
- /** Known duration — lets the waveform render its scale before decode. */
29
+ /** Known duration — lets the player show its length before decode. */
21
30
  durationSeconds?: number;
22
31
  contentType?: string;
23
32
  /** >1 enables speaker-split rendering (ch0 above, ch1 below). */
24
33
  channels?: number;
34
+ /** Name of the upper (channel 0) half. Visible in the classic look; part of the seek label in minimal. */
25
35
  topLabel?: string;
36
+ /** Name of the lower (channel 1) half. Visible in the classic look; part of the seek label in minimal. */
26
37
  bottomLabel?: string;
27
38
  downloadName?: string;
39
+ /** Visual treatment. `minimal` (default) is the voice-note pill; `classic` keeps the original player. */
40
+ look?: AudioWaveformLook;
28
41
  className?: string;
29
42
  }
30
- export declare function AudioWaveform({ src, durationSeconds, contentType, channels, topLabel, bottomLabel, downloadName, className, }: AudioWaveformProps): React.JSX.Element;
43
+ export declare function AudioWaveform({ look, ...props }: AudioWaveformProps): React.JSX.Element;