@actioneer/ads 0.2.3 → 0.3.0

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 (70) hide show
  1. package/components/ai-elements/chain-of-thought.d.ts +88 -19
  2. package/components/ai-elements/chain-of-thought.js +358 -149
  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 -1
  6. package/components/ai-elements/message.d.ts +19 -4
  7. package/components/ai-elements/message.js +177 -130
  8. package/components/ai-elements/research-activity.d.ts +45 -0
  9. package/components/ai-elements/research-activity.js +260 -0
  10. package/components/ai-elements/task-progress.js +69 -66
  11. package/components/ai-elements/tool.js +42 -38
  12. package/components/answer.d.ts +19 -0
  13. package/components/answer.js +363 -300
  14. package/components/assistant-ui/attachment.js +5 -1
  15. package/components/assistant-ui/composer-deep-research.js +44 -29
  16. package/components/assistant-ui/composer-harness.js +55 -38
  17. package/components/assistant-ui/composer.js +16 -16
  18. package/components/assistant-ui/index.d.ts +0 -1
  19. package/components/assistant-ui/message.d.ts +7 -0
  20. package/components/assistant-ui/message.js +64 -51
  21. package/components/assistant-ui/primitives.d.ts +1 -1
  22. package/components/assistant-ui/thread-context.d.ts +2 -0
  23. package/components/assistant-ui/thread.js +34 -32
  24. package/components/brand-texture.d.ts +37 -0
  25. package/components/brand-texture.js +54 -0
  26. package/components/chart.d.ts +64 -2
  27. package/components/chart.js +717 -456
  28. package/components/code-block.d.ts +36 -0
  29. package/components/code-block.js +136 -0
  30. package/components/command-palette.d.ts +43 -0
  31. package/components/command-palette.js +146 -0
  32. package/components/drawer.d.ts +1 -1
  33. package/components/file-dropzone.d.ts +32 -0
  34. package/components/file-dropzone.js +134 -0
  35. package/components/index.d.ts +11 -0
  36. package/components/index.js +480 -430
  37. package/components/infinite-canvas.d.ts +50 -0
  38. package/components/infinite-canvas.js +215 -0
  39. package/components/page-header.d.ts +22 -0
  40. package/components/page-header.js +52 -0
  41. package/components/resizable-panel.d.ts +29 -0
  42. package/components/resizable-panel.js +102 -0
  43. package/components/reveal.d.ts +36 -0
  44. package/components/reveal.js +35 -0
  45. package/components/scroll-area.d.ts +19 -0
  46. package/components/scroll-area.js +57 -0
  47. package/components/setting-row.d.ts +35 -0
  48. package/components/setting-row.js +86 -0
  49. package/components/sidebar.d.ts +4 -1
  50. package/components/sidebar.js +134 -132
  51. package/components/stepper.d.ts +32 -0
  52. package/components/stepper.js +113 -0
  53. package/components/table.js +16 -15
  54. package/components/tabs.js +1 -1
  55. package/hooks/agents-ui/voice-visualizer-types.js +1 -0
  56. package/lib/icons.d.ts +24 -0
  57. package/lib/icons.js +100 -110
  58. package/lib/motion.d.ts +5 -3
  59. package/lib/motion.js +46 -20
  60. package/lib/router.js +19 -0
  61. package/lib/utils.js +5 -0
  62. package/llms.txt +143 -39
  63. package/manifest.json +1232 -100
  64. package/package.json +2 -2
  65. package/styles.css +71 -28
  66. package/theme.css +19 -15
  67. package/components/ai-elements/reasoning.d.ts +0 -26
  68. package/components/ai-elements/reasoning.js +0 -131
  69. package/components/assistant-ui/smart-message-text.d.ts +0 -15
  70. package/components/assistant-ui/smart-message-text.js +0 -29
@@ -1,65 +1,102 @@
1
1
  "use client";
2
- import { jsx as r, jsxs as f, Fragment as N } from "react/jsx-runtime";
2
+ import { jsx as r, jsxs as h, Fragment as w } from "react/jsx-runtime";
3
3
  import * as o from "react";
4
- import { cva as M } from "class-variance-authority";
5
- import { cn as l } from "../../lib/cn.js";
6
- import { Button as p } from "../button.js";
7
- import { Avatar as w } from "../avatar.js";
8
- import { Tooltip as x } from "../tooltip.js";
4
+ import { cva as x } from "class-variance-authority";
5
+ import { cn as i } from "../../lib/cn.js";
6
+ import { Button as f } from "../button.js";
7
+ import { Avatar as M } from "../avatar.js";
8
+ import { Tooltip as b } from "../tooltip.js";
9
9
  import { ChevronLeft as B, ChevronRight as R, Paperclip as A, Close as C } from "../../lib/icons.js";
10
- const z = o.forwardRef(
11
- ({ className: e, from: t, ...s }, a) => /* @__PURE__ */ r(
10
+ const z = x("group flex w-full max-w-[95%] flex-col gap-2", {
11
+ variants: {
12
+ align: {
13
+ start: "is-align-start mr-auto items-start",
14
+ end: "is-align-end ml-auto items-end"
15
+ }
16
+ },
17
+ defaultVariants: { align: "start" }
18
+ }), k = o.forwardRef(
19
+ ({ align: e, className: t, from: a, ...s }, n) => /* @__PURE__ */ r(
12
20
  "div",
13
21
  {
14
- ref: a,
15
- className: l(
16
- "group flex w-full max-w-[95%] flex-col gap-2",
17
- t === "user" ? "is-user ml-auto justify-end" : "is-assistant",
18
- e
22
+ ref: n,
23
+ className: i(
24
+ z({ align: e ?? "start" }),
25
+ a === "user" ? "is-user" : "is-assistant",
26
+ t
19
27
  ),
20
28
  ...s
21
29
  }
22
30
  )
23
31
  );
24
- z.displayName = "Message";
25
- const k = M(
26
- "flex w-fit max-w-full min-w-0 flex-col gap-2 overflow-hidden text-base",
32
+ k.displayName = "Message";
33
+ const P = x(
34
+ "flex max-w-full min-w-0 flex-col gap-2 overflow-hidden text-base",
27
35
  {
28
36
  variants: {
29
37
  variant: {
30
38
  // Contained: the user turn reads as a quiet filled bubble; the
31
39
  // assistant turn is plain full-width text.
32
- contained: "group-[.is-user]:ml-auto group-[.is-user]:rounded-xl group-[.is-user]:bg-muted group-[.is-user]:px-4 group-[.is-user]:py-2.5 group-[.is-user]:text-foreground group-[.is-assistant]:text-foreground",
40
+ contained: "w-fit group-[.is-user]:rounded-xl group-[.is-user]:bg-muted group-[.is-user]:px-4 group-[.is-user]:py-2.5 group-[.is-user]:text-foreground group-[.is-assistant]:text-foreground",
33
41
  // Flat: the user turn steps to a recessed tint (no bubble); the
34
42
  // assistant turn is full-width plain text — a cleaner, modern look.
35
- flat: "group-[.is-user]:ml-auto group-[.is-user]:rounded-lg group-[.is-user]:bg-surface group-[.is-user]:px-3 group-[.is-user]:py-2 group-[.is-user]:text-foreground group-[.is-assistant]:text-foreground"
43
+ flat: "w-fit group-[.is-user]:rounded-lg group-[.is-user]:bg-surface group-[.is-user]:px-3 group-[.is-user]:py-2 group-[.is-user]:text-foreground group-[.is-assistant]:text-foreground",
44
+ // Plain: no fill, radius, or padding. Pair `align="start"` with a
45
+ // user turn for the clean, left-aligned prompt treatment.
46
+ plain: "w-full text-foreground group-[.is-user]:text-lg",
47
+ // Request: the user turn is a brief put forward for research, not a
48
+ // chat utterance — no fill, no rule, full width, set large and light
49
+ // so it leads the turn on size alone. The answer below is its body.
50
+ // `text-2xl` (26px) is the TOP of the type scale — the request must
51
+ // outrank every heading around it, including a `Heading level={1}`
52
+ // page title, or it stops reading as the thing being asked.
53
+ // `gap-4` sets the question-to-MessageMeta distance (16px): the
54
+ // parameters read as part of the request, and the thread's own
55
+ // turn gap (32px) is the larger break before the answer.
56
+ request: "w-full text-foreground group-[.is-user]:gap-4 group-[.is-user]:text-2xl group-[.is-user]:leading-snug"
36
57
  }
37
58
  },
38
- defaultVariants: { variant: "contained" }
59
+ defaultVariants: { variant: "request" }
39
60
  }
40
- ), P = o.forwardRef(({ children: e, className: t, variant: s, ...a }, n) => /* @__PURE__ */ r(
61
+ ), T = o.forwardRef(({ children: e, className: t, variant: a, ...s }, n) => /* @__PURE__ */ r(
41
62
  "div",
42
63
  {
43
64
  ref: n,
44
- className: l(k({ variant: s }), t),
45
- ...a,
65
+ className: i(P({ variant: a }), t),
66
+ ...s,
46
67
  children: e
47
68
  }
48
69
  ));
49
- P.displayName = "MessageContent";
50
- const T = o.forwardRef(({ src: e, name: t, className: s, ...a }, n) => /* @__PURE__ */ r(
51
- w,
70
+ T.displayName = "MessageContent";
71
+ const j = o.forwardRef(
72
+ ({ className: e, ...t }, a) => /* @__PURE__ */ r(
73
+ "div",
74
+ {
75
+ ref: a,
76
+ "data-slot": "message-meta",
77
+ className: i(
78
+ "flex flex-wrap items-center gap-x-2 gap-y-1.5",
79
+ "text-xs font-normal leading-normal tracking-normal text-tertiary",
80
+ e
81
+ ),
82
+ ...t
83
+ }
84
+ )
85
+ );
86
+ j.displayName = "MessageMeta";
87
+ const V = o.forwardRef(({ src: e, name: t, className: a, ...s }, n) => /* @__PURE__ */ r(
88
+ M,
52
89
  {
53
90
  ref: n,
54
91
  src: e,
55
92
  name: t,
56
93
  size: "sm",
57
- className: l("ring-2 ring-background", s),
58
- ...a
94
+ className: i("ring-2 ring-background", a),
95
+ ...s
59
96
  }
60
97
  ));
61
- T.displayName = "MessageAvatar";
62
- const j = l(
98
+ V.displayName = "MessageAvatar";
99
+ const S = i(
63
100
  "size-full text-base leading-relaxed text-foreground",
64
101
  "[&>*:first-child]:mt-0 [&>*:last-child]:mb-0",
65
102
  "[&_p]:my-2",
@@ -70,83 +107,89 @@ const j = l(
70
107
  "[&_a]:font-medium [&_a]:underline [&_a]:underline-offset-2",
71
108
  "[&_code]:rounded-xs [&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:text-xs [&_code]:tabular-nums",
72
109
  "[&_pre]:my-3 [&_pre]:overflow-x-auto [&_pre]:rounded-lg [&_pre]:bg-surface [&_pre]:p-3 [&_pre]:text-xs [&_pre_code]:bg-transparent [&_pre_code]:p-0",
73
- "[&_table]:my-3 [&_table]:w-full [&_table]:text-xs [&_th]:px-2 [&_th]:py-1.5 [&_th]:text-left [&_th]:font-bold [&_td]:px-2 [&_td]:py-1.5 [&_thead]:text-secondary"
74
- ), S = o.memo(
110
+ // Markdown tables only. Scoped off `[data-slot=table]` so a composed ADS
111
+ // <Table> nested in a response keeps its own padding and per-column
112
+ // alignment — unscoped, these descendant rules silently beat it.
113
+ "[&_table:not([data-slot=table])]:my-3 [&_table:not([data-slot=table])]:w-full [&_table:not([data-slot=table])]:text-xs",
114
+ "[&_table:not([data-slot=table])_th]:px-2 [&_table:not([data-slot=table])_th]:py-1.5 [&_table:not([data-slot=table])_th]:text-left [&_table:not([data-slot=table])_th]:font-bold",
115
+ "[&_table:not([data-slot=table])_td]:px-2 [&_table:not([data-slot=table])_td]:py-1.5",
116
+ "[&_table:not([data-slot=table])_thead]:text-secondary"
117
+ ), W = o.memo(
75
118
  o.forwardRef(
76
- ({ className: e, children: t, ...s }, a) => /* @__PURE__ */ r("div", { ref: a, className: l(j, e), ...s, children: t })
119
+ ({ className: e, children: t, ...a }, s) => /* @__PURE__ */ r("div", { ref: s, className: i(S, e), ...a, children: t })
77
120
  ),
78
121
  (e, t) => e.children === t.children
79
122
  );
80
- S.displayName = "MessageResponse";
81
- const V = o.forwardRef(({ className: e, children: t, ...s }, a) => /* @__PURE__ */ r(
123
+ W.displayName = "MessageResponse";
124
+ const q = o.forwardRef(({ className: e, children: t, ...a }, s) => /* @__PURE__ */ r(
82
125
  "div",
83
126
  {
84
- ref: a,
85
- className: l("flex items-center gap-1", e),
86
- ...s,
127
+ ref: s,
128
+ className: i("flex items-center gap-1", e),
129
+ ...a,
87
130
  children: t
88
131
  }
89
132
  ));
90
- V.displayName = "MessageActions";
91
- const W = o.forwardRef(
92
- ({ tooltip: e, children: t, label: s, variant: a = "ghost", size: n = "icon-sm", ...i }, d) => {
93
- const c = /* @__PURE__ */ f(p, { ref: d, size: n, type: "button", variant: a, ...i, children: [
133
+ q.displayName = "MessageActions";
134
+ const E = o.forwardRef(
135
+ ({ tooltip: e, children: t, label: a, variant: s = "ghost", size: n = "icon-sm", ...l }, d) => {
136
+ const c = /* @__PURE__ */ h(f, { ref: d, size: n, type: "button", variant: s, ...l, children: [
94
137
  t,
95
- /* @__PURE__ */ r("span", { className: "sr-only", children: s || e })
138
+ /* @__PURE__ */ r("span", { className: "sr-only", children: a || e })
96
139
  ] });
97
- return e ? /* @__PURE__ */ r(x, { content: e, children: c }) : c;
140
+ return e ? /* @__PURE__ */ r(b, { content: e, children: c }) : c;
98
141
  }
99
142
  );
100
- W.displayName = "MessageAction";
101
- const _ = o.createContext(null), m = () => {
143
+ E.displayName = "MessageAction";
144
+ const _ = o.createContext(null), g = () => {
102
145
  const e = o.useContext(_);
103
146
  if (!e)
104
147
  throw new Error(
105
148
  "MessageBranch components must be used within MessageBranch"
106
149
  );
107
150
  return e;
108
- }, E = o.forwardRef(({ defaultBranch: e = 0, onBranchChange: t, className: s, ...a }, n) => {
109
- const [i, d] = o.useState(e), [c, g] = o.useState([]), h = (u) => {
151
+ }, I = o.forwardRef(({ defaultBranch: e = 0, onBranchChange: t, className: a, ...s }, n) => {
152
+ const [l, d] = o.useState(e), [c, m] = o.useState([]), p = (u) => {
110
153
  d(u), t == null || t(u);
111
- }, b = () => {
112
- const u = i > 0 ? i - 1 : c.length - 1;
113
- h(u);
154
+ }, v = () => {
155
+ const u = l > 0 ? l - 1 : c.length - 1;
156
+ p(u);
114
157
  }, y = () => {
115
- const u = i < c.length - 1 ? i + 1 : 0;
116
- h(u);
117
- }, v = {
118
- currentBranch: i,
158
+ const u = l < c.length - 1 ? l + 1 : 0;
159
+ p(u);
160
+ }, N = {
161
+ currentBranch: l,
119
162
  totalBranches: c.length,
120
- goToPrevious: b,
163
+ goToPrevious: v,
121
164
  goToNext: y,
122
165
  branches: c,
123
- setBranches: g
166
+ setBranches: m
124
167
  };
125
- return /* @__PURE__ */ r(_.Provider, { value: v, children: /* @__PURE__ */ r(
168
+ return /* @__PURE__ */ r(_.Provider, { value: N, children: /* @__PURE__ */ r(
126
169
  "div",
127
170
  {
128
171
  ref: n,
129
- className: l("grid w-full gap-2 [&>div]:pb-0", s),
130
- ...a
172
+ className: i("grid w-full gap-2 [&>div]:pb-0", a),
173
+ ...s
131
174
  }
132
175
  ) });
133
176
  });
134
- E.displayName = "MessageBranch";
135
- const I = ({
177
+ I.displayName = "MessageBranch";
178
+ const L = ({
136
179
  children: e,
137
180
  ...t
138
181
  }) => {
139
- const { currentBranch: s, setBranches: a, branches: n } = m(), i = o.Children.toArray(
182
+ const { currentBranch: a, setBranches: s, branches: n } = g(), l = o.Children.toArray(
140
183
  e
141
184
  );
142
185
  return o.useEffect(() => {
143
- n.length !== i.length && a(i);
144
- }, [i, n, a]), /* @__PURE__ */ r(N, { children: i.map((d, c) => /* @__PURE__ */ r(
186
+ n.length !== l.length && s(l);
187
+ }, [l, n, s]), /* @__PURE__ */ r(w, { children: l.map((d, c) => /* @__PURE__ */ r(
145
188
  "div",
146
189
  {
147
- className: l(
190
+ className: i(
148
191
  "grid gap-2 overflow-hidden [&>div]:pb-0",
149
- c === s ? "block" : "hidden"
192
+ c === a ? "block" : "hidden"
150
193
  ),
151
194
  ...t,
152
195
  children: d
@@ -154,28 +197,28 @@ const I = ({
154
197
  d.key
155
198
  )) });
156
199
  };
157
- I.displayName = "MessageBranchContent";
158
- const L = o.forwardRef(({ className: e, from: t, ...s }, a) => {
159
- const { totalBranches: n } = m();
200
+ L.displayName = "MessageBranchContent";
201
+ const F = o.forwardRef(({ className: e, from: t, ...a }, s) => {
202
+ const { totalBranches: n } = g();
160
203
  return n <= 1 ? null : /* @__PURE__ */ r(
161
204
  "div",
162
205
  {
163
- ref: a,
164
- className: l("inline-flex items-center gap-0.5", e),
165
- ...s
206
+ ref: s,
207
+ className: i("inline-flex items-center gap-0.5", e),
208
+ ...a
166
209
  }
167
210
  );
168
211
  });
169
- L.displayName = "MessageBranchSelector";
170
- const F = o.forwardRef(({ children: e, ...t }, s) => {
171
- const { goToPrevious: a, totalBranches: n } = m();
212
+ F.displayName = "MessageBranchSelector";
213
+ const D = o.forwardRef(({ children: e, ...t }, a) => {
214
+ const { goToPrevious: s, totalBranches: n } = g();
172
215
  return /* @__PURE__ */ r(
173
- p,
216
+ f,
174
217
  {
175
- ref: s,
218
+ ref: a,
176
219
  "aria-label": "Previous branch",
177
220
  disabled: n <= 1,
178
- onClick: a,
221
+ onClick: s,
179
222
  size: "icon-sm",
180
223
  type: "button",
181
224
  variant: "ghost",
@@ -184,16 +227,16 @@ const F = o.forwardRef(({ children: e, ...t }, s) => {
184
227
  }
185
228
  );
186
229
  });
187
- F.displayName = "MessageBranchPrevious";
188
- const q = o.forwardRef(({ children: e, ...t }, s) => {
189
- const { goToNext: a, totalBranches: n } = m();
230
+ D.displayName = "MessageBranchPrevious";
231
+ const G = o.forwardRef(({ children: e, ...t }, a) => {
232
+ const { goToNext: s, totalBranches: n } = g();
190
233
  return /* @__PURE__ */ r(
191
- p,
234
+ f,
192
235
  {
193
- ref: s,
236
+ ref: a,
194
237
  "aria-label": "Next branch",
195
238
  disabled: n <= 1,
196
- onClick: a,
239
+ onClick: s,
197
240
  size: "icon-sm",
198
241
  type: "button",
199
242
  variant: "ghost",
@@ -202,39 +245,39 @@ const q = o.forwardRef(({ children: e, ...t }, s) => {
202
245
  }
203
246
  );
204
247
  });
205
- q.displayName = "MessageBranchNext";
206
- const D = o.forwardRef(({ className: e, ...t }, s) => {
207
- const { currentBranch: a, totalBranches: n } = m();
208
- return /* @__PURE__ */ f(
248
+ G.displayName = "MessageBranchNext";
249
+ const H = o.forwardRef(({ className: e, ...t }, a) => {
250
+ const { currentBranch: s, totalBranches: n } = g();
251
+ return /* @__PURE__ */ h(
209
252
  "span",
210
253
  {
211
- ref: s,
212
- className: l(
254
+ ref: a,
255
+ className: i(
213
256
  "px-1.5 text-xs tabular-nums text-tertiary select-none",
214
257
  e
215
258
  ),
216
259
  ...t,
217
260
  children: [
218
- a + 1,
261
+ s + 1,
219
262
  " of ",
220
263
  n
221
264
  ]
222
265
  }
223
266
  );
224
267
  });
225
- D.displayName = "MessageBranchPage";
226
- const G = o.forwardRef(({ data: e, className: t, onRemove: s, ...a }, n) => {
227
- var g;
228
- const i = e.filename || "", d = !!((g = e.mediaType) != null && g.startsWith("image/") && e.url), c = i || (d ? "Image" : "Attachment");
229
- return /* @__PURE__ */ f(
268
+ H.displayName = "MessageBranchPage";
269
+ const J = o.forwardRef(({ data: e, className: t, onRemove: a, ...s }, n) => {
270
+ var m;
271
+ const l = e.filename || "", d = !!((m = e.mediaType) != null && m.startsWith("image/") && e.url), c = l || (d ? "Image" : "Attachment");
272
+ return /* @__PURE__ */ h(
230
273
  "div",
231
274
  {
232
275
  ref: n,
233
- className: l(
276
+ className: i(
234
277
  "group/attachment relative size-24 overflow-hidden rounded-lg bg-muted",
235
278
  t
236
279
  ),
237
- ...a,
280
+ ...s,
238
281
  children: [
239
282
  d ? /* @__PURE__ */ r(
240
283
  "img",
@@ -243,17 +286,17 @@ const G = o.forwardRef(({ data: e, className: t, onRemove: s, ...a }, n) => {
243
286
  className: "size-full object-cover",
244
287
  src: e.url
245
288
  }
246
- ) : /* @__PURE__ */ r(x, { content: c, children: /* @__PURE__ */ r("div", { className: "flex size-full items-center justify-center text-muted-foreground", children: /* @__PURE__ */ r(A, { className: "size-4" }) }) }),
247
- s && /* @__PURE__ */ r(
248
- p,
289
+ ) : /* @__PURE__ */ r(b, { content: c, children: /* @__PURE__ */ r("div", { className: "flex size-full items-center justify-center text-muted-foreground", children: /* @__PURE__ */ r(A, { className: "size-4" }) }) }),
290
+ a && /* @__PURE__ */ r(
291
+ f,
249
292
  {
250
293
  "aria-label": "Remove attachment",
251
- className: l(
294
+ className: i(
252
295
  "absolute top-1.5 right-1.5 size-6 rounded-full p-0 opacity-0 transition-opacity group-hover/attachment:opacity-100",
253
296
  d && "bg-elevated/80 backdrop-blur-sm hover:bg-elevated"
254
297
  ),
255
- onClick: (h) => {
256
- h.stopPropagation(), s();
298
+ onClick: (p) => {
299
+ p.stopPropagation(), a();
257
300
  },
258
301
  size: "icon-xs",
259
302
  type: "button",
@@ -265,44 +308,48 @@ const G = o.forwardRef(({ data: e, className: t, onRemove: s, ...a }, n) => {
265
308
  }
266
309
  );
267
310
  });
268
- G.displayName = "MessageAttachment";
269
- const H = o.forwardRef(({ children: e, className: t, ...s }, a) => e ? /* @__PURE__ */ r(
311
+ J.displayName = "MessageAttachment";
312
+ const K = o.forwardRef(({ children: e, className: t, ...a }, s) => e ? /* @__PURE__ */ r(
270
313
  "div",
271
314
  {
272
- ref: a,
273
- className: l("ml-auto flex w-fit flex-wrap items-start gap-2", t),
274
- ...s,
315
+ ref: s,
316
+ className: i(
317
+ "flex w-fit flex-wrap items-start gap-2 group-[.is-align-start]:mr-auto group-[.is-align-end]:ml-auto",
318
+ t
319
+ ),
320
+ ...a,
275
321
  children: e
276
322
  }
277
323
  ) : null);
278
- H.displayName = "MessageAttachments";
279
- const J = o.forwardRef(({ className: e, children: t, ...s }, a) => /* @__PURE__ */ r(
324
+ K.displayName = "MessageAttachments";
325
+ const O = o.forwardRef(({ className: e, children: t, ...a }, s) => /* @__PURE__ */ r(
280
326
  "div",
281
327
  {
282
- ref: a,
283
- className: l(
328
+ ref: s,
329
+ className: i(
284
330
  "mt-3 flex w-full items-center justify-between gap-4",
285
331
  e
286
332
  ),
287
- ...s,
333
+ ...a,
288
334
  children: t
289
335
  }
290
336
  ));
291
- J.displayName = "MessageToolbar";
337
+ O.displayName = "MessageToolbar";
292
338
  export {
293
- z as Message,
294
- W as MessageAction,
295
- V as MessageActions,
296
- G as MessageAttachment,
297
- H as MessageAttachments,
298
- T as MessageAvatar,
299
- E as MessageBranch,
300
- I as MessageBranchContent,
301
- q as MessageBranchNext,
302
- D as MessageBranchPage,
303
- F as MessageBranchPrevious,
304
- L as MessageBranchSelector,
305
- P as MessageContent,
306
- S as MessageResponse,
307
- J as MessageToolbar
339
+ k as Message,
340
+ E as MessageAction,
341
+ q as MessageActions,
342
+ J as MessageAttachment,
343
+ K as MessageAttachments,
344
+ V as MessageAvatar,
345
+ I as MessageBranch,
346
+ L as MessageBranchContent,
347
+ G as MessageBranchNext,
348
+ H as MessageBranchPage,
349
+ D as MessageBranchPrevious,
350
+ F as MessageBranchSelector,
351
+ T as MessageContent,
352
+ j as MessageMeta,
353
+ W as MessageResponse,
354
+ O as MessageToolbar
308
355
  };
@@ -0,0 +1,45 @@
1
+ import * as React from "react";
2
+ export type ResearchActivityStatus = "active" | "complete";
3
+ export interface ResearchActivityProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
4
+ status: ResearchActivityStatus;
5
+ /** Consumer-formatted elapsed or total time, for example `0:36`. */
6
+ elapsed: React.ReactNode;
7
+ sourceCount: number;
8
+ /** Consumer-formatted time to the first useful result. */
9
+ firstInsight?: React.ReactNode;
10
+ /**
11
+ * What the agent is doing right now, e.g. "Querying NPA movement". When
12
+ * provided, the active state renders as a single live line that morphs
13
+ * between steps — the trace stays behind a click instead of stacking above
14
+ * the answer. Without it, the active trace opens in full (legacy behavior).
15
+ */
16
+ activity?: React.ReactNode;
17
+ /** Keys the live-line morph. Required when `activity` is not a string. */
18
+ activityKey?: string | number;
19
+ /** 1-based position of the current step — renders a quiet "3 of 7" before the elapsed time. */
20
+ stepIndex?: number;
21
+ /** Total planned steps; the counter renders only when both are provided. */
22
+ stepCount?: number;
23
+ /** Replaces the generated completed summary. */
24
+ summary?: React.ReactNode;
25
+ /**
26
+ * Pin the summary/live line to the top of the scroll container while the
27
+ * trace beneath it scrolls. For long open traces, where the line would
28
+ * otherwise scroll away exactly when the run is still moving.
29
+ */
30
+ sticky?: boolean;
31
+ /** Controlled disclosure of the trace. */
32
+ open?: boolean;
33
+ /** Initial disclosure state. */
34
+ defaultOpen?: boolean;
35
+ onOpenChange?: (open: boolean) => void;
36
+ children: React.ReactNode;
37
+ }
38
+ /**
39
+ * Streaming research disclosure. With an `activity`, the run reads as a single
40
+ * live line — the current step morphing in place while the full trace waits
41
+ * one click away — and completion settles the same line into a source/timing
42
+ * summary. A reader's expand/collapse choice sticks across the transition.
43
+ * Without an `activity`, the active trace stays fully open (legacy behavior).
44
+ */
45
+ export declare const ResearchActivity: React.ForwardRefExoticComponent<ResearchActivityProps & React.RefAttributes<HTMLDivElement>>;