@actioneer/ads 0.2.4 → 0.3.1

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 (62) hide show
  1. package/components/ai-elements/chain-of-thought.d.ts +88 -6
  2. package/components/ai-elements/chain-of-thought.js +370 -107
  3. package/components/ai-elements/chart.d.ts +30 -0
  4. package/components/ai-elements/chart.js +303 -0
  5. package/components/ai-elements/index.d.ts +2 -0
  6. package/components/ai-elements/message.d.ts +12 -2
  7. package/components/ai-elements/message.js +133 -100
  8. package/components/ai-elements/research-activity.d.ts +62 -0
  9. package/components/ai-elements/research-activity.js +278 -0
  10. package/components/ai-elements/task.d.ts +7 -3
  11. package/components/ai-elements/task.js +84 -52
  12. package/components/ai-elements/tool.js +39 -35
  13. package/components/ai-elements/voice.d.ts +7 -1
  14. package/components/ai-elements/voice.js +234 -180
  15. package/components/alert.js +28 -16
  16. package/components/answer.d.ts +16 -0
  17. package/components/answer.js +273 -249
  18. package/components/assistant-ui/attachment.js +5 -1
  19. package/components/assistant-ui/composer-deep-research.js +44 -29
  20. package/components/assistant-ui/composer-harness.js +45 -27
  21. package/components/assistant-ui/composer.js +16 -16
  22. package/components/assistant-ui/index.d.ts +0 -1
  23. package/components/assistant-ui/message.d.ts +7 -0
  24. package/components/assistant-ui/message.js +36 -36
  25. package/components/assistant-ui/thread.js +1 -1
  26. package/components/brand-texture.d.ts +37 -0
  27. package/components/brand-texture.js +54 -0
  28. package/components/code-block.d.ts +42 -0
  29. package/components/code-block.js +235 -0
  30. package/components/drawer.d.ts +1 -1
  31. package/components/file-dropzone.d.ts +32 -0
  32. package/components/file-dropzone.js +134 -0
  33. package/components/index.d.ts +10 -0
  34. package/components/index.js +482 -433
  35. package/components/infinite-canvas.d.ts +50 -0
  36. package/components/infinite-canvas.js +215 -0
  37. package/components/page-header.d.ts +22 -0
  38. package/components/page-header.js +52 -0
  39. package/components/resizable-panel.d.ts +29 -0
  40. package/components/resizable-panel.js +102 -0
  41. package/components/reveal.d.ts +36 -0
  42. package/components/reveal.js +35 -0
  43. package/components/scroll-area.d.ts +19 -0
  44. package/components/scroll-area.js +57 -0
  45. package/components/setting-row.d.ts +35 -0
  46. package/components/setting-row.js +86 -0
  47. package/components/sidebar.js +131 -131
  48. package/components/stepper.d.ts +40 -0
  49. package/components/stepper.js +102 -0
  50. package/components/table.js +16 -15
  51. package/components/tabs.js +1 -1
  52. package/lib/icons.d.ts +12 -0
  53. package/lib/icons.js +98 -95
  54. package/lib/motion.d.ts +7 -3
  55. package/lib/motion.js +29 -27
  56. package/llms.txt +123 -28
  57. package/manifest.json +883 -68
  58. package/package.json +2 -2
  59. package/styles.css +179 -30
  60. package/theme.css +29 -17
  61. package/components/assistant-ui/smart-message-text.d.ts +0 -15
  62. package/components/assistant-ui/smart-message-text.js +0 -29
@@ -0,0 +1,278 @@
1
+ "use client";
2
+ import { jsxs as r, jsx as e, Fragment as P } from "react/jsx-runtime";
3
+ import * as s from "react";
4
+ import { MotionConfig as I, AnimatePresence as O, motion as ee } from "motion/react";
5
+ import { cva as te } from "class-variance-authority";
6
+ import { Collapsible as re, CollapsibleTrigger as M, CollapsibleContent as ae } from "../collapsible.js";
7
+ import { Spinner as T } from "../spinner.js";
8
+ import { Sparkles as V, ChevronDown as B } from "../../lib/icons.js";
9
+ import { EASE_OUT as D } from "../../lib/motion.js";
10
+ import { cn as l } from "../../lib/cn.js";
11
+ import { Shimmer as F } from "./shimmer.js";
12
+ const ie = te("w-full", {
13
+ variants: {
14
+ status: {
15
+ active: "text-foreground",
16
+ complete: "text-secondary"
17
+ }
18
+ }
19
+ }), se = {
20
+ initial: {
21
+ opacity: 0,
22
+ transform: "translate3d(0, 7px, 0)",
23
+ filter: "blur(2px)"
24
+ },
25
+ animate: {
26
+ opacity: 1,
27
+ transform: "translate3d(0, 0, 0)",
28
+ filter: "blur(0px)",
29
+ transition: { duration: 0.18, ease: D }
30
+ },
31
+ exit: {
32
+ opacity: 0,
33
+ transform: "translate3d(0, -7px, 0)",
34
+ filter: "blur(2px)",
35
+ transition: { duration: 0.12, ease: D }
36
+ }
37
+ };
38
+ function K({
39
+ elapsed: t,
40
+ firstInsight: n,
41
+ sourceCount: d
42
+ }) {
43
+ return /* @__PURE__ */ r("span", { className: "flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1", children: [
44
+ /* @__PURE__ */ r("span", { children: [
45
+ "Researched ",
46
+ d,
47
+ " ",
48
+ d === 1 ? "source" : "sources"
49
+ ] }),
50
+ /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "text-tertiary", children: "·" }),
51
+ /* @__PURE__ */ e("span", { className: "text-xs text-tertiary tabular-nums", children: t }),
52
+ n != null && /* @__PURE__ */ r(P, { children: [
53
+ /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "text-tertiary", children: "·" }),
54
+ /* @__PURE__ */ r("span", { className: "text-xs text-tertiary", children: [
55
+ "first insight",
56
+ " ",
57
+ /* @__PURE__ */ e("span", { className: "tabular-nums", children: n })
58
+ ] })
59
+ ] })
60
+ ] });
61
+ }
62
+ const ne = s.forwardRef(
63
+ ({
64
+ status: t,
65
+ elapsed: n,
66
+ sourceCount: d,
67
+ firstInsight: w,
68
+ sticky: p = !1,
69
+ collapsible: h = !0,
70
+ activityPlacement: U = "top",
71
+ activity: c,
72
+ activityKey: _,
73
+ stepIndex: R,
74
+ stepCount: S,
75
+ summary: x,
76
+ open: k,
77
+ defaultOpen: $ = !1,
78
+ onOpenChange: a,
79
+ children: q,
80
+ className: G,
81
+ role: H,
82
+ "aria-label": J,
83
+ "aria-busy": Q,
84
+ ...W
85
+ }, X) => {
86
+ const m = k !== void 0, i = c != null, [Y, y] = s.useState(
87
+ !i && t === "active" || $
88
+ ), z = s.useRef(t), N = s.useRef(!1), E = s.useRef(null), b = s.useRef(null), g = m ? k : Y, v = !i && t === "active" || g, f = U === "bottom" && v;
89
+ s.useLayoutEffect(() => {
90
+ var L, j;
91
+ const u = z.current;
92
+ if (z.current = t, t === "active") {
93
+ u !== "active" && (N.current = !1), u !== "active" && !i && !m && y(!0);
94
+ return;
95
+ }
96
+ if (u !== "active" || N.current && i) return;
97
+ const A = document.activeElement;
98
+ A && ((L = E.current) != null && L.contains(A)) && ((j = b.current) == null || j.focus()), m || y(!1), a == null || a(!1);
99
+ }, [i, m, a, t]);
100
+ const Z = s.useCallback(
101
+ (u) => {
102
+ !i && t !== "complete" || (N.current = !0, m || y(u), a == null || a(u));
103
+ },
104
+ [i, m, a, t]
105
+ ), o = t === "active", C = o ? `activity-${_ ?? (typeof c == "string" ? c : "current")}` : "summary";
106
+ return /* @__PURE__ */ r(
107
+ re,
108
+ {
109
+ ref: X,
110
+ open: v,
111
+ onOpenChange: Z,
112
+ role: H ?? "region",
113
+ "aria-label": J ?? "Research activity",
114
+ "aria-busy": Q ?? (o || void 0),
115
+ ...W,
116
+ "data-slot": "research-activity",
117
+ "data-status": t,
118
+ className: l(
119
+ ie({ status: t }),
120
+ f && "flex flex-col",
121
+ G
122
+ ),
123
+ children: [
124
+ /* @__PURE__ */ e("span", { className: "sr-only", "aria-live": "polite", "aria-atomic": "true", children: o ? "Research in progress" : "Research complete" }),
125
+ i ? /* @__PURE__ */ e(M, { asChild: !0, children: /* @__PURE__ */ r(
126
+ "button",
127
+ {
128
+ ref: b,
129
+ type: "button",
130
+ "data-slot": "research-activity-trigger",
131
+ className: l(
132
+ "group/research-trigger flex min-h-9 w-full cursor-pointer items-center gap-2.5 rounded-sm py-1 text-left text-sm outline-none",
133
+ "transition-[color,transform] duration-(--duration-fast) ease-out hover:text-primary active:scale-(--scale-press)",
134
+ "focus-visible:ring-3 focus-visible:ring-ring motion-reduce:transition-none",
135
+ p && "sticky z-10 bg-background",
136
+ p && (f ? "bottom-0" : "top-0"),
137
+ f && "order-last mt-3"
138
+ ),
139
+ children: [
140
+ /* @__PURE__ */ r("span", { className: "sr-only", children: [
141
+ v ? "Collapse" : "Expand",
142
+ " research activity:",
143
+ " "
144
+ ] }),
145
+ /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "flex size-4 shrink-0 items-center justify-center", children: o ? /* @__PURE__ */ e(T, { size: "sm", color: "current", role: "presentation" }) : /* @__PURE__ */ e(V, { className: "size-4" }) }),
146
+ /* @__PURE__ */ e(I, { reducedMotion: "user", children: /* @__PURE__ */ e("span", { className: "relative h-5 min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ e(O, { initial: !1, children: /* @__PURE__ */ e(
147
+ ee.span,
148
+ {
149
+ variants: se,
150
+ initial: "initial",
151
+ animate: "animate",
152
+ exit: "exit",
153
+ className: "absolute inset-0 flex items-center truncate whitespace-nowrap",
154
+ children: o ? typeof c == "string" ? /* @__PURE__ */ e(F, { as: "span", className: "truncate text-sm", children: c }) : c : x !== void 0 ? x : /* @__PURE__ */ e(
155
+ K,
156
+ {
157
+ elapsed: n,
158
+ firstInsight: w,
159
+ sourceCount: d
160
+ }
161
+ )
162
+ },
163
+ C
164
+ ) }) }) }),
165
+ o && /* @__PURE__ */ r("span", { className: l(
166
+ "shrink-0 text-xs text-tertiary tabular-nums",
167
+ // Reserve the caret slot (size-4 + gap-2) so trailing metadata
168
+ // keeps the same right edge as sibling rows that show a caret.
169
+ !h && "pe-6"
170
+ ), children: [
171
+ R != null && S != null && /* @__PURE__ */ r(P, { children: [
172
+ /* @__PURE__ */ e("span", { className: "sr-only", children: "Step " }),
173
+ R,
174
+ " of ",
175
+ S,
176
+ /* @__PURE__ */ e("span", { "aria-hidden": !0, children: " · " })
177
+ ] }),
178
+ /* @__PURE__ */ e("span", { className: "sr-only", children: "Elapsed " }),
179
+ n
180
+ ] }),
181
+ h && /* @__PURE__ */ e(
182
+ B,
183
+ {
184
+ "aria-hidden": !0,
185
+ className: l(
186
+ "size-4 shrink-0 text-tertiary transition-transform duration-(--duration-normal) ease-out motion-reduce:transition-none",
187
+ v && "rotate-180"
188
+ )
189
+ }
190
+ )
191
+ ]
192
+ }
193
+ ) }) : o ? /* @__PURE__ */ r(
194
+ "div",
195
+ {
196
+ "data-slot": "research-activity-header",
197
+ className: "flex min-h-9 w-full items-center gap-2.5 py-1 text-left",
198
+ children: [
199
+ /* @__PURE__ */ e(
200
+ T,
201
+ {
202
+ size: "sm",
203
+ color: "current",
204
+ role: "presentation",
205
+ "aria-hidden": !0
206
+ }
207
+ ),
208
+ /* @__PURE__ */ e(F, { as: "span", className: "text-sm", children: "Researching…" }),
209
+ /* @__PURE__ */ r("span", { className: l(
210
+ "ml-auto shrink-0 text-xs text-tertiary tabular-nums",
211
+ !h && "pe-6"
212
+ ), children: [
213
+ /* @__PURE__ */ e("span", { className: "sr-only", children: "Elapsed " }),
214
+ n
215
+ ] })
216
+ ]
217
+ }
218
+ ) : /* @__PURE__ */ e(M, { asChild: !0, children: /* @__PURE__ */ r(
219
+ "button",
220
+ {
221
+ ref: b,
222
+ type: "button",
223
+ "data-slot": "research-activity-trigger",
224
+ className: l(
225
+ "group/research-trigger flex min-h-9 w-full cursor-pointer items-center gap-2 rounded-sm py-1 text-left text-sm outline-none",
226
+ "transition-[color,transform] duration-(--duration-fast) ease-out hover:text-primary active:scale-(--scale-press)",
227
+ "focus-visible:ring-3 focus-visible:ring-ring motion-reduce:transition-none",
228
+ p && "sticky z-10 bg-background",
229
+ p && (f ? "bottom-0" : "top-0"),
230
+ f && "order-last mt-3"
231
+ ),
232
+ children: [
233
+ /* @__PURE__ */ r("span", { className: "sr-only", children: [
234
+ g ? "Collapse" : "Expand",
235
+ " research activity:",
236
+ " "
237
+ ] }),
238
+ /* @__PURE__ */ e(V, { "aria-hidden": !0, className: "size-4 shrink-0" }),
239
+ /* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children: x !== void 0 ? x : /* @__PURE__ */ e(
240
+ K,
241
+ {
242
+ elapsed: n,
243
+ firstInsight: w,
244
+ sourceCount: d
245
+ }
246
+ ) }),
247
+ h && /* @__PURE__ */ e(
248
+ B,
249
+ {
250
+ "aria-hidden": !0,
251
+ className: l(
252
+ "size-4 shrink-0 text-tertiary transition-transform duration-(--duration-normal) ease-out motion-reduce:transition-none",
253
+ g && "rotate-180"
254
+ )
255
+ }
256
+ )
257
+ ]
258
+ }
259
+ ) }),
260
+ /* @__PURE__ */ e(
261
+ ae,
262
+ {
263
+ ref: E,
264
+ forceMount: !0,
265
+ "data-slot": "research-activity-content",
266
+ className: "mt-3 overflow-hidden text-foreground outline-none data-[state=closed]:hidden",
267
+ children: q
268
+ }
269
+ )
270
+ ]
271
+ }
272
+ );
273
+ }
274
+ );
275
+ ne.displayName = "ResearchActivity";
276
+ export {
277
+ ne as ResearchActivity
278
+ };
@@ -1,4 +1,4 @@
1
- import { ComponentProps } from 'react';
1
+ import { ComponentProps, ReactNode } from 'react';
2
2
  import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../collapsible';
3
3
  /**
4
4
  * Task — a collapsible list of the steps an agent took to accomplish a goal
@@ -18,14 +18,18 @@ export declare const TaskItem: {
18
18
  };
19
19
  export type TaskProps = ComponentProps<typeof Collapsible>;
20
20
  export declare const Task: {
21
- ({ defaultOpen, className, ...props }: TaskProps): import("react").JSX.Element;
21
+ ({ defaultOpen, className, open, children, ...props }: TaskProps): import("react").JSX.Element;
22
22
  displayName: string;
23
23
  };
24
24
  export type TaskTriggerProps = ComponentProps<typeof CollapsibleTrigger> & {
25
25
  title: string;
26
+ /** Leading icon. Defaults to the search glyph. */
27
+ icon?: ReactNode;
28
+ /** Trailing metadata — counts, elapsed time. */
29
+ endContent?: ReactNode;
26
30
  };
27
31
  export declare const TaskTrigger: {
28
- ({ children, className, title, ...props }: TaskTriggerProps): import("react").JSX.Element;
32
+ ({ children, className, title, icon, endContent, ...props }: TaskTriggerProps): import("react").JSX.Element;
29
33
  displayName: string;
30
34
  };
31
35
  export type TaskContentProps = ComponentProps<typeof CollapsibleContent>;
@@ -1,73 +1,105 @@
1
1
  "use client";
2
- import { jsx as a, jsxs as r } from "react/jsx-runtime";
3
- import { Collapsible as i, CollapsibleContent as l, CollapsibleTrigger as d } from "../collapsible.js";
4
- import { Search as m, ChevronDown as c } from "../../lib/icons.js";
5
- import { cn as o } from "../../lib/cn.js";
6
- const p = ({
7
- children: e,
8
- className: t,
2
+ import { jsx as e, jsxs as o } from "react/jsx-runtime";
3
+ import { createContext as m, useContext as d } from "react";
4
+ import { motion as u } from "motion/react";
5
+ import { EASE_DISCLOSURE as p } from "../../lib/motion.js";
6
+ import { Collapsible as h, CollapsibleContent as f, CollapsibleTrigger as x } from "../collapsible.js";
7
+ import { Search as g, ChevronDown as N } from "../../lib/icons.js";
8
+ import { cn as i } from "../../lib/cn.js";
9
+ const l = m(!0), k = ({
10
+ children: t,
11
+ className: a,
9
12
  ...s
10
- }) => /* @__PURE__ */ a(
13
+ }) => /* @__PURE__ */ e(
11
14
  "div",
12
15
  {
13
- className: o(
16
+ className: i(
14
17
  "inline-flex items-center gap-1 rounded-md bg-fill px-1.5 py-0.5 text-xs text-fill-foreground",
15
- t
18
+ a
16
19
  ),
17
20
  ...s,
18
- children: e
21
+ children: t
19
22
  }
20
23
  );
21
- p.displayName = "TaskItemFile";
22
- const u = ({ children: e, className: t, ...s }) => /* @__PURE__ */ a("div", { className: o("text-base text-secondary", t), ...s, children: e });
23
- u.displayName = "TaskItem";
24
- const f = ({ defaultOpen: e = !0, className: t, ...s }) => /* @__PURE__ */ a(i, { className: o(t), defaultOpen: e, ...s });
25
- f.displayName = "Task";
26
- const g = ({
27
- children: e,
28
- className: t,
24
+ k.displayName = "TaskItemFile";
25
+ const v = ({ children: t, className: a, ...s }) => /* @__PURE__ */ e("div", { className: i("text-base text-secondary", a), ...s, children: t });
26
+ v.displayName = "TaskItem";
27
+ const T = ({
28
+ defaultOpen: t = !0,
29
+ className: a,
30
+ open: s,
31
+ children: n,
32
+ ...r
33
+ }) => /* @__PURE__ */ e(
34
+ h,
35
+ {
36
+ className: i(a),
37
+ defaultOpen: t,
38
+ open: s,
39
+ ...r,
40
+ children: /* @__PURE__ */ e(l.Provider, { value: s ?? t, children: n })
41
+ }
42
+ );
43
+ T.displayName = "Task";
44
+ const y = ({
45
+ children: t,
46
+ className: a,
29
47
  title: s,
30
- ...n
31
- }) => /* @__PURE__ */ a(d, { asChild: !0, className: o("group", t), ...n, children: e ?? /* @__PURE__ */ r(
48
+ icon: n,
49
+ endContent: r,
50
+ ...c
51
+ }) => /* @__PURE__ */ e(x, { asChild: !0, className: i("group", a), ...c, children: t ?? /* @__PURE__ */ o(
32
52
  "button",
33
53
  {
34
54
  type: "button",
35
55
  className: "flex w-full cursor-pointer items-center gap-2 rounded-sm text-base text-secondary outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring motion-reduce:transition-none",
36
56
  children: [
37
- /* @__PURE__ */ a(m, { className: "size-4 shrink-0", "aria-hidden": !0 }),
38
- /* @__PURE__ */ a("span", { className: "text-base", children: s }),
39
- /* @__PURE__ */ a(
40
- c,
41
- {
42
- className: "size-4 shrink-0 transition-transform duration-(--duration-fast) ease-out group-data-[state=open]:rotate-180 motion-reduce:transition-none",
43
- "aria-hidden": !0
44
- }
45
- )
57
+ /* @__PURE__ */ e("span", { className: "flex size-4 shrink-0 items-center justify-center [&>svg]:size-4", "aria-hidden": !0, children: n ?? /* @__PURE__ */ e(g, { className: "size-4 shrink-0" }) }),
58
+ /* @__PURE__ */ e("span", { className: "text-base", children: s }),
59
+ /* @__PURE__ */ o("span", { className: "ml-auto flex shrink-0 items-center gap-2", children: [
60
+ r != null && /* @__PURE__ */ e("span", { className: "text-xs text-tertiary tabular-nums", children: r }),
61
+ /* @__PURE__ */ e(
62
+ N,
63
+ {
64
+ className: "size-4 shrink-0 transition-transform duration-(--duration-fast) ease-out group-data-[state=open]:rotate-180 motion-reduce:transition-none",
65
+ "aria-hidden": !0
66
+ }
67
+ )
68
+ ] })
46
69
  ]
47
70
  }
48
71
  ) });
49
- g.displayName = "TaskTrigger";
50
- const x = ({
51
- children: e,
52
- className: t,
72
+ y.displayName = "TaskTrigger";
73
+ const b = ({
74
+ children: t,
75
+ className: a,
53
76
  ...s
54
- }) => /* @__PURE__ */ a(
55
- l,
56
- {
57
- className: o(
58
- "overflow-hidden text-foreground outline-none",
59
- "data-[state=closed]:pointer-events-none",
60
- t
61
- ),
62
- ...s,
63
- children: /* @__PURE__ */ a("div", { className: "mt-4 space-y-2 border-l-2 border-border pl-4", children: e })
64
- }
65
- );
66
- x.displayName = "TaskContent";
77
+ }) => {
78
+ const n = d(l);
79
+ return /* @__PURE__ */ e(f, { forceMount: !0, asChild: !0, ...s, children: /* @__PURE__ */ e(
80
+ u.div,
81
+ {
82
+ initial: !1,
83
+ animate: n ? "open" : "closed",
84
+ variants: {
85
+ open: { height: "auto", opacity: 1 },
86
+ closed: { height: 0, opacity: 0 }
87
+ },
88
+ transition: { duration: n ? 0.28 : 0.2, ease: p },
89
+ className: i(
90
+ "overflow-hidden text-foreground outline-none",
91
+ "data-[state=closed]:pointer-events-none",
92
+ a
93
+ ),
94
+ children: /* @__PURE__ */ e("div", { className: "mt-2 ml-2", children: t })
95
+ }
96
+ ) });
97
+ };
98
+ b.displayName = "TaskContent";
67
99
  export {
68
- f as Task,
69
- x as TaskContent,
70
- u as TaskItem,
71
- p as TaskItemFile,
72
- g as TaskTrigger
100
+ T as Task,
101
+ b as TaskContent,
102
+ v as TaskItem,
103
+ k as TaskItemFile,
104
+ y as TaskTrigger
73
105
  };
@@ -4,49 +4,53 @@ import { isValidElement as c } from "react";
4
4
  import { Collapsible as u, CollapsibleContent as m, CollapsibleTrigger as p } from "../collapsible.js";
5
5
  import { Badge as f } from "../badge.js";
6
6
  import { Wrench as g, ChevronDown as h, CloseCircle as x, CheckCircle as b, Clock as N, CircleDashed as v } from "../../lib/icons.js";
7
- import { cn as t } from "../../lib/cn.js";
8
- const y = ({ className: e, ...n }) => /* @__PURE__ */ o(
7
+ import { cn as n } from "../../lib/cn.js";
8
+ const w = ({ className: e, ...t }) => /* @__PURE__ */ o(
9
9
  u,
10
10
  {
11
- className: t(
11
+ className: n(
12
12
  "not-prose group/tool w-full overflow-hidden rounded-xl bg-card",
13
13
  e
14
14
  ),
15
- ...n
15
+ ...t
16
16
  }
17
17
  );
18
- y.displayName = "Tool";
19
- const w = {
18
+ w.displayName = "Tool";
19
+ const y = {
20
20
  "input-streaming": { label: "Pending", color: "default", icon: v },
21
21
  "input-available": { label: "Running", color: "info", icon: N, pulse: !0 },
22
22
  "output-available": { label: "Completed", color: "success", icon: b },
23
23
  "output-error": { label: "Error", color: "danger", icon: x }
24
24
  }, C = ({ state: e }) => {
25
- const { label: n, color: r, icon: a, pulse: i } = w[e];
25
+ const { label: t, color: r, icon: a, pulse: i } = y[e];
26
26
  return /* @__PURE__ */ l(f, { variant: "soft", color: r, children: [
27
27
  /* @__PURE__ */ o(
28
28
  a,
29
29
  {
30
- className: t(
30
+ className: n(
31
31
  "size-3",
32
32
  i && "animate-pulse motion-reduce:animate-none"
33
33
  ),
34
34
  "aria-hidden": !0
35
35
  }
36
36
  ),
37
- n
37
+ t
38
38
  ] });
39
- }, T = ({
39
+ };
40
+ function T(e) {
41
+ return e.split("-").slice(1).join("-") || e;
42
+ }
43
+ const S = ({
40
44
  className: e,
41
- title: n,
45
+ title: t,
42
46
  type: r,
43
47
  state: a,
44
48
  ...i
45
49
  }) => /* @__PURE__ */ l(
46
50
  p,
47
51
  {
48
- className: t(
49
- "group/tool-header flex w-full items-center justify-between gap-4 px-4 py-3 text-left transition-colors hover:bg-muted motion-reduce:transition-none",
52
+ className: n(
53
+ "group/tool-header flex w-full items-center justify-between gap-4 py-3 text-left transition-colors hover:text-primary motion-reduce:transition-none",
50
54
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
51
55
  e
52
56
  ),
@@ -54,7 +58,7 @@ const w = {
54
58
  children: [
55
59
  /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
56
60
  /* @__PURE__ */ o(g, { className: "size-4 shrink-0 text-tertiary", "aria-hidden": !0 }),
57
- /* @__PURE__ */ o("span", { className: "font-medium text-base", children: n ?? r.split("-").slice(1).join("-") }),
61
+ /* @__PURE__ */ o("span", { className: "font-medium text-base", children: t ?? T(r) }),
58
62
  /* @__PURE__ */ o(C, { state: a })
59
63
  ] }),
60
64
  /* @__PURE__ */ o(
@@ -67,50 +71,50 @@ const w = {
67
71
  ]
68
72
  }
69
73
  );
70
- T.displayName = "ToolHeader";
71
- const S = ({ className: e, ...n }) => /* @__PURE__ */ o(
74
+ S.displayName = "ToolHeader";
75
+ const j = ({ className: e, ...t }) => /* @__PURE__ */ o(
72
76
  m,
73
77
  {
74
- className: t(
78
+ className: n(
75
79
  "overflow-hidden text-foreground outline-none",
76
80
  "data-[state=closed]:pointer-events-none",
77
81
  e
78
82
  ),
79
- ...n
83
+ ...t
80
84
  }
81
85
  );
82
- S.displayName = "ToolContent";
86
+ j.displayName = "ToolContent";
83
87
  const s = ({
84
88
  code: e,
85
- className: n
89
+ className: t
86
90
  }) => /* @__PURE__ */ o(
87
91
  "pre",
88
92
  {
89
- className: t(
93
+ className: n(
90
94
  "overflow-x-auto rounded-md bg-surface p-3 text-xs leading-relaxed text-foreground tabular-nums",
91
- n
95
+ t
92
96
  ),
93
97
  children: /* @__PURE__ */ o("code", { children: e })
94
98
  }
95
- ), d = ({ children: e }) => /* @__PURE__ */ o("h4", { className: "text-xs font-medium uppercase tracking-wide text-tertiary", children: e }), j = ({ className: e, input: n, ...r }) => /* @__PURE__ */ l("div", { className: t("space-y-2 overflow-hidden p-4", e), ...r, children: [
99
+ ), d = ({ children: e }) => /* @__PURE__ */ o("h4", { className: "text-xs font-medium uppercase tracking-wide text-tertiary", children: e }), k = ({ className: e, input: t, ...r }) => /* @__PURE__ */ l("div", { className: n("space-y-2 overflow-hidden p-4", e), ...r, children: [
96
100
  /* @__PURE__ */ o(d, { children: "Parameters" }),
97
- /* @__PURE__ */ o(s, { code: JSON.stringify(n, null, 2) })
101
+ /* @__PURE__ */ o(s, { code: JSON.stringify(t, null, 2) })
98
102
  ] });
99
- j.displayName = "ToolInput";
100
- const k = (e) => typeof e == "object" && e !== null && !c(e) ? /* @__PURE__ */ o(s, { code: JSON.stringify(e, null, 2) }) : typeof e == "string" ? /* @__PURE__ */ o("div", { className: "rounded-md bg-surface p-3 text-xs leading-relaxed text-foreground whitespace-pre-wrap", children: e }) : e, O = ({
103
+ k.displayName = "ToolInput";
104
+ const O = (e) => typeof e == "object" && e !== null && !c(e) ? /* @__PURE__ */ o(s, { code: JSON.stringify(e, null, 2) }) : typeof e == "string" ? /* @__PURE__ */ o("div", { className: "rounded-md bg-surface p-3 text-xs leading-relaxed text-foreground whitespace-pre-wrap", children: e }) : e, P = ({
101
105
  className: e,
102
- output: n,
106
+ output: t,
103
107
  errorText: r,
104
108
  ...a
105
- }) => n || r ? /* @__PURE__ */ l("div", { className: t("space-y-2 p-4", e), ...a, children: [
109
+ }) => t || r ? /* @__PURE__ */ l("div", { className: n("space-y-2 p-4", e), ...a, children: [
106
110
  /* @__PURE__ */ o(d, { children: r ? "Error" : "Result" }),
107
- r ? /* @__PURE__ */ o("div", { className: "rounded-md bg-danger-50 p-3 text-xs leading-relaxed text-danger-700 whitespace-pre-wrap", children: r }) : /* @__PURE__ */ o("div", { className: "overflow-x-auto text-xs text-foreground [&_table]:w-full", children: k(n) })
111
+ r ? /* @__PURE__ */ o("div", { className: "rounded-md bg-danger-50 p-3 text-xs leading-relaxed text-danger-700 whitespace-pre-wrap", children: r }) : /* @__PURE__ */ o("div", { className: "overflow-x-auto text-xs text-foreground [&_table]:w-full", children: O(t) })
108
112
  ] }) : null;
109
- O.displayName = "ToolOutput";
113
+ P.displayName = "ToolOutput";
110
114
  export {
111
- y as Tool,
112
- S as ToolContent,
113
- T as ToolHeader,
114
- j as ToolInput,
115
- O as ToolOutput
115
+ w as Tool,
116
+ j as ToolContent,
117
+ S as ToolHeader,
118
+ k as ToolInput,
119
+ P as ToolOutput
116
120
  };
@@ -14,7 +14,7 @@ import * as React from "react";
14
14
  */
15
15
  export type VoiceState = "idle" | "connecting" | "listening" | "thinking" | "speaking" | "muted" | "asleep";
16
16
  export type VoiceVariant = "orb" | "aura" | "wave";
17
- export declare const VOICE_PALETTES: readonly ["default", "blue", "violet", "emerald", "sunset"];
17
+ export declare const VOICE_PALETTES: readonly ["default", "identity", "mono", "blue", "violet", "emerald", "sunset"];
18
18
  export type VoicePalette = (typeof VOICE_PALETTES)[number];
19
19
  /** Backwards-compatible name for the palette type originally used by Orb. */
20
20
  export type VoiceOrbPalette = VoicePalette;
@@ -30,6 +30,12 @@ export interface VoiceProps extends React.HTMLAttributes<HTMLDivElement> {
30
30
  volume?: number;
31
31
  /** Shared shader colorway. Default "default". */
32
32
  palette?: VoiceOrbPalette;
33
+ /**
34
+ * Optional identity. Two orbs given different seeds render distinguishable
35
+ * patterns, so a list of agents/voices reads as distinct rather than
36
+ * repeated. Omit for the generic orb.
37
+ */
38
+ seed?: string | number;
33
39
  /** Fired once on mount (API parity with the old Persona `onReady`). */
34
40
  onReady?: () => void;
35
41
  "aria-label"?: string;