@actioneer/ads 0.5.4 → 0.5.5

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 (91) hide show
  1. package/components/accordion.js +15 -15
  2. package/components/agent-icon.d.ts +64 -0
  3. package/components/agent-icon.js +251 -0
  4. package/components/ai-elements/agent-trace.d.ts +8 -1
  5. package/components/ai-elements/agent-trace.js +164 -129
  6. package/components/ai-elements/chain-of-thought-icon.d.ts +42 -0
  7. package/components/ai-elements/chain-of-thought-icon.js +283 -0
  8. package/components/ai-elements/chain-of-thought.js +7 -7
  9. package/components/ai-elements/chart.js +38 -35
  10. package/components/ai-elements/index.d.ts +1 -0
  11. package/components/ai-elements/inline-citation.js +40 -40
  12. package/components/ai-elements/message.js +5 -5
  13. package/components/ai-elements/queue.js +1 -1
  14. package/components/ai-elements/research-activity.d.ts +2 -0
  15. package/components/ai-elements/research-activity.js +79 -81
  16. package/components/ai-elements/task-progress.js +2 -2
  17. package/components/ai-elements/tool.d.ts +4 -2
  18. package/components/ai-elements/tool.js +74 -54
  19. package/components/ai-elements/transcript.js +1 -1
  20. package/components/alert.js +1 -1
  21. package/components/answer.d.ts +2643 -311
  22. package/components/answer.js +1836 -425
  23. package/components/assistant-ui/answer-tool-ui.js +23 -28
  24. package/components/assistant-ui/chain-of-thought.d.ts +7 -2
  25. package/components/assistant-ui/composer-harness.js +20 -16
  26. package/components/assistant-ui/reasoning.js +35 -31
  27. package/components/assistant-ui/tool-fallback.js +125 -122
  28. package/components/assistant-ui/tool-group.d.ts +3 -1
  29. package/components/assistant-ui/tool-group.js +48 -43
  30. package/components/audio-waveform.js +14 -14
  31. package/components/autocomplete.js +52 -48
  32. package/components/avatar.js +58 -44
  33. package/components/badge.js +3 -3
  34. package/components/brand-texture.js +1 -1
  35. package/components/breadcrumbs.d.ts +27 -1
  36. package/components/breadcrumbs.js +94 -42
  37. package/components/button.js +15 -15
  38. package/components/carousel.js +10 -10
  39. package/components/chart.js +77 -77
  40. package/components/chip.js +3 -3
  41. package/components/code-block.d.ts +39 -17
  42. package/components/code-block.js +153 -104
  43. package/components/command-palette.js +27 -25
  44. package/components/connector-card.js +2 -2
  45. package/components/dropdown.js +65 -61
  46. package/components/empty-state.js +15 -15
  47. package/components/field.js +23 -23
  48. package/components/index.d.ts +4 -0
  49. package/components/index.js +523 -477
  50. package/components/infinite-canvas.js +60 -60
  51. package/components/kbd.js +6 -6
  52. package/components/link.js +6 -6
  53. package/components/modal.js +22 -20
  54. package/components/page-header.js +1 -1
  55. package/components/pagination.js +22 -22
  56. package/components/pixel-blast-svg.js +1 -1
  57. package/components/pixel-icon.d.ts +31 -0
  58. package/components/pixel-icon.js +733 -0
  59. package/components/popover.js +46 -42
  60. package/components/ripple.d.ts +29 -0
  61. package/components/ripple.js +17 -0
  62. package/components/segmented.js +24 -23
  63. package/components/select.js +71 -67
  64. package/components/selection-action-bar.js +22 -22
  65. package/components/sidebar.d.ts +11 -3
  66. package/components/sidebar.js +161 -148
  67. package/components/stepper.d.ts +2 -0
  68. package/components/stepper.js +80 -43
  69. package/components/table.d.ts +7 -0
  70. package/components/table.js +223 -155
  71. package/components/tabs.d.ts +3 -1
  72. package/components/tabs.js +165 -144
  73. package/components/textarea.js +10 -8
  74. package/components/toast.js +48 -46
  75. package/components/tooltip.js +61 -59
  76. package/components/tree.js +44 -41
  77. package/components/typography.d.ts +1 -1
  78. package/components/typography.js +25 -25
  79. package/components/viz-charts.js +133 -133
  80. package/fonts/aribau-grotesk-500.otf +0 -0
  81. package/fonts/aribau-grotesk-600.woff2 +0 -0
  82. package/fonts.css +6 -4
  83. package/lib/icons.d.ts +411 -402
  84. package/lib/icons.js +109 -107
  85. package/llms.txt +96 -8
  86. package/manifest.json +951 -54
  87. package/package.json +5 -5
  88. package/styles.css +206 -81
  89. package/theme.css +200 -77
  90. package/fonts/aribau-grotesk-400.otf +0 -0
  91. package/fonts/aribau-grotesk-700.otf +0 -0
@@ -1,83 +1,86 @@
1
1
  "use client";
2
- import { jsx as m, jsxs as M } from "react/jsx-runtime";
2
+ import { jsx as f, jsxs as E } from "react/jsx-runtime";
3
3
  import * as t from "react";
4
- import { MotionConfig as U, motion as E } from "motion/react";
5
- import { cva as S } from "class-variance-authority";
6
- import { cn as f } from "../lib/cn.js";
7
- import { EASE_OUT as k } from "../lib/motion.js";
8
- const V = t.createContext(null);
4
+ import { MotionConfig as O, motion as S } from "motion/react";
5
+ import { cva as L } from "class-variance-authority";
6
+ import { cn as b } from "../lib/cn.js";
7
+ import { EASE_OUT as V } from "../lib/motion.js";
8
+ const P = t.createContext(null);
9
9
  function I(o) {
10
- const e = t.useContext(V);
10
+ const e = t.useContext(P);
11
11
  if (!e)
12
12
  throw new Error(`<${o}> must be used within <Tabs>`);
13
13
  return e;
14
14
  }
15
- const O = t.forwardRef(
15
+ const B = t.forwardRef(
16
16
  ({
17
17
  className: o,
18
18
  value: e,
19
19
  defaultValue: a,
20
- onValueChange: s,
21
- variant: i = "primary",
22
- orientation: d = "horizontal",
23
- size: b = "md",
20
+ onValueChange: n,
21
+ variant: s = "primary",
22
+ orientation: l = "horizontal",
23
+ size: m = "md",
24
24
  children: $,
25
25
  ...j
26
- }, w) => {
27
- const x = e !== void 0, [z, R] = t.useState(a), c = t.useId(), v = t.useId(), y = t.useRef([]), h = t.useRef(/* @__PURE__ */ new Set()), N = x ? e : z, u = t.useCallback(
26
+ }, R) => {
27
+ const h = e !== void 0, [v, z] = t.useState(a), w = t.useId(), d = t.useId(), y = t.useRef([]), g = t.useRef(/* @__PURE__ */ new Set()), x = h ? e : v, T = t.useCallback(
28
28
  (r) => {
29
- x || R(r), s == null || s(r);
29
+ h || z(r), n == null || n(r);
30
30
  },
31
- [x, s]
32
- ), T = t.useCallback((r) => {
31
+ [h, n]
32
+ ), c = t.useCallback((r) => {
33
33
  y.current.includes(r) || y.current.push(r);
34
- }, []), l = t.useMemo(
34
+ }, []), A = t.useMemo(
35
35
  () => ({
36
- value: N,
37
- setValue: u,
38
- baseId: c,
39
- registerTab: T,
36
+ value: x,
37
+ setValue: T,
38
+ baseId: w,
39
+ registerTab: c,
40
40
  tabs: y,
41
- disabled: h,
42
- thumbId: v,
43
- variant: i,
44
- orientation: d,
45
- size: b
41
+ disabled: g,
42
+ thumbId: d,
43
+ variant: s,
44
+ orientation: l,
45
+ size: m
46
46
  }),
47
47
  [
48
- N,
49
- u,
50
- c,
48
+ x,
51
49
  T,
52
- v,
53
- i,
50
+ w,
51
+ c,
54
52
  d,
55
- b
53
+ s,
54
+ l,
55
+ m
56
56
  ]
57
57
  );
58
- return /* @__PURE__ */ m(V.Provider, { value: l, children: /* @__PURE__ */ m(
58
+ return /* @__PURE__ */ f(P.Provider, { value: A, children: /* @__PURE__ */ f(
59
59
  "div",
60
60
  {
61
- ref: w,
62
- "data-orientation": d,
63
- "data-variant": i,
64
- className: f(
61
+ ref: R,
62
+ "data-orientation": l,
63
+ "data-variant": s,
64
+ className: b(
65
65
  "flex gap-4",
66
- d === "horizontal" ? "flex-col" : "flex-row",
66
+ l === "horizontal" ? "flex-col" : "flex-row",
67
67
  o
68
68
  ),
69
69
  ...j,
70
- children: /* @__PURE__ */ m(U, { reducedMotion: "user", children: $ })
70
+ children: /* @__PURE__ */ f(O, { reducedMotion: "user", children: $ })
71
71
  }
72
72
  ) });
73
73
  }
74
74
  );
75
- O.displayName = "Tabs";
76
- const B = S("inline-flex", {
75
+ B.displayName = "Tabs";
76
+ const H = L("inline-flex", {
77
77
  variants: {
78
78
  variant: {
79
- primary: "bg-muted p-1 rounded-lg gap-1",
80
- secondary: "gap-0"
79
+ primary: "bg-surface p-1 rounded-lg gap-1",
80
+ secondary: "gap-0",
81
+ // Pill: separate rounded pills with a gap, no track — a single-select
82
+ // filter row (each pill can carry a `· N` count via Tab's `count`).
83
+ pill: "gap-1.5 flex-wrap"
81
84
  },
82
85
  orientation: {
83
86
  horizontal: "self-start flex-row items-center",
@@ -109,27 +112,27 @@ const B = S("inline-flex", {
109
112
  orientation: "horizontal",
110
113
  size: "md"
111
114
  }
112
- }), H = t.forwardRef(
115
+ }), _ = t.forwardRef(
113
116
  ({ className: o, ...e }, a) => {
114
- const { variant: s, orientation: i, size: d } = I("TabList");
115
- return /* @__PURE__ */ m(
117
+ const { variant: n, orientation: s, size: l } = I("TabList");
118
+ return /* @__PURE__ */ f(
116
119
  "div",
117
120
  {
118
121
  ref: a,
119
122
  role: "tablist",
120
- "aria-orientation": i,
121
- "data-orientation": i,
122
- "data-variant": s,
123
- className: f(B({ variant: s, orientation: i, size: d }), o),
123
+ "aria-orientation": s,
124
+ "data-orientation": s,
125
+ "data-variant": n,
126
+ className: b(H({ variant: n, orientation: s, size: l }), o),
124
127
  ...e
125
128
  }
126
129
  );
127
130
  }
128
131
  );
129
- H.displayName = "TabList";
130
- const _ = S(
131
- f(
132
- "relative inline-flex items-center whitespace-nowrap font-medium select-none",
132
+ _.displayName = "TabList";
133
+ const q = L(
134
+ b(
135
+ "relative inline-flex items-center whitespace-nowrap font-normal select-none",
133
136
  "transition-colors duration-(--duration-fast) cursor-pointer",
134
137
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
135
138
  "disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed"
@@ -138,7 +141,8 @@ const _ = S(
138
141
  variants: {
139
142
  variant: {
140
143
  primary: "justify-center rounded-md",
141
- secondary: ""
144
+ secondary: "",
145
+ pill: "justify-center rounded-full"
142
146
  },
143
147
  orientation: {
144
148
  horizontal: "",
@@ -160,6 +164,17 @@ const _ = S(
160
164
  { variant: "primary", size: "sm", className: "h-6 px-2.5" },
161
165
  { variant: "primary", size: "md", className: "h-8 px-3" },
162
166
  { variant: "primary", size: "lg", className: "h-9 px-4" },
167
+ // Pill — separate rounded pills; the active pill fills with foreground,
168
+ // inactive pills read as a quiet fill (no track, no sliding thumb).
169
+ { variant: "pill", size: "sm", className: "h-6 px-2.5 gap-1" },
170
+ { variant: "pill", size: "md", className: "h-7 px-3 gap-1" },
171
+ { variant: "pill", size: "lg", className: "h-8 px-3.5 gap-1.5" },
172
+ { variant: "pill", selected: !0, className: "bg-foreground text-background" },
173
+ {
174
+ variant: "pill",
175
+ selected: !1,
176
+ className: "bg-muted text-muted-foreground hover:bg-fill hover:text-foreground"
177
+ },
163
178
  // Secondary horizontal: -1px sits over the rail so the sliding
164
179
  // indicator overlaps it cleanly.
165
180
  {
@@ -207,131 +222,137 @@ const _ = S(
207
222
  selected: !1
208
223
  }
209
224
  }
210
- ), q = t.forwardRef(
211
- ({ className: o, value: e, isDisabled: a, children: s, onClick: i, onKeyDown: d, ...b }, $) => {
225
+ ), C = t.forwardRef(
226
+ ({ className: o, value: e, isDisabled: a, count: n, children: s, onClick: l, onKeyDown: m, ...$ }, j) => {
212
227
  const {
213
- value: j,
214
- setValue: w,
215
- baseId: x,
228
+ value: R,
229
+ setValue: h,
230
+ baseId: v,
216
231
  registerTab: z,
217
- tabs: R,
218
- disabled: c,
219
- thumbId: v,
220
- variant: y,
221
- orientation: h,
222
- size: N
223
- } = I("Tab"), u = j === e;
232
+ tabs: w,
233
+ disabled: d,
234
+ thumbId: y,
235
+ variant: g,
236
+ orientation: x,
237
+ size: T
238
+ } = I("Tab"), c = R === e;
224
239
  t.useEffect(() => {
225
240
  z(e);
226
241
  }, [z, e]), t.useEffect(() => {
227
- a ? c.current.add(e) : c.current.delete(e);
228
- }, [c, a, e]);
229
- const T = (l) => {
230
- if (d == null || d(l), l.defaultPrevented) return;
231
- const r = R.current, g = r.indexOf(e);
232
- if (g === -1) return;
233
- const L = h === "vertical" ? ["ArrowDown"] : ["ArrowRight", "ArrowDown"], P = h === "vertical" ? ["ArrowUp"] : ["ArrowLeft", "ArrowUp"];
234
- let n = null;
235
- if (L.includes(l.key)) {
236
- n = g;
242
+ a ? d.current.add(e) : d.current.delete(e);
243
+ }, [d, a, e]);
244
+ const A = (r) => {
245
+ if (m == null || m(r), r.defaultPrevented) return;
246
+ const u = w.current, N = u.indexOf(e);
247
+ if (N === -1) return;
248
+ const M = x === "vertical" ? ["ArrowDown"] : ["ArrowRight", "ArrowDown"], U = x === "vertical" ? ["ArrowUp"] : ["ArrowLeft", "ArrowUp"];
249
+ let i = null;
250
+ if (M.includes(r.key)) {
251
+ i = N;
237
252
  do
238
- n = (n + 1) % r.length;
239
- while (c.current.has(r[n]) && n !== g);
240
- } else if (P.includes(l.key)) {
241
- n = g;
253
+ i = (i + 1) % u.length;
254
+ while (d.current.has(u[i]) && i !== N);
255
+ } else if (U.includes(r.key)) {
256
+ i = N;
242
257
  do
243
- n = (n - 1 + r.length) % r.length;
244
- while (c.current.has(r[n]) && n !== g);
245
- } else if (l.key === "Home")
246
- n = r.findIndex((p) => !c.current.has(p));
247
- else if (l.key === "End") {
248
- for (let p = r.length - 1; p >= 0; p--)
249
- if (!c.current.has(r[p])) {
250
- n = p;
258
+ i = (i - 1 + u.length) % u.length;
259
+ while (d.current.has(u[i]) && i !== N);
260
+ } else if (r.key === "Home")
261
+ i = u.findIndex((p) => !d.current.has(p));
262
+ else if (r.key === "End") {
263
+ for (let p = u.length - 1; p >= 0; p--)
264
+ if (!d.current.has(u[p])) {
265
+ i = p;
251
266
  break;
252
267
  }
253
268
  }
254
- if (n !== null && n !== -1) {
255
- l.preventDefault();
256
- const p = r[n];
257
- w(p);
258
- const A = document.getElementById(`${x}-tab-${p}`);
259
- A == null || A.focus();
269
+ if (i !== null && i !== -1) {
270
+ r.preventDefault();
271
+ const p = u[i];
272
+ h(p);
273
+ const k = document.getElementById(`${v}-tab-${p}`);
274
+ k == null || k.focus();
260
275
  }
261
276
  };
262
- return /* @__PURE__ */ M(
277
+ return /* @__PURE__ */ E(
263
278
  "button",
264
279
  {
265
- ref: $,
280
+ ref: j,
266
281
  type: "button",
267
282
  role: "tab",
268
- id: `${x}-tab-${e}`,
269
- "aria-selected": u,
270
- "aria-controls": `${x}-panel-${e}`,
283
+ id: `${v}-tab-${e}`,
284
+ "aria-selected": c,
285
+ "aria-controls": `${v}-panel-${e}`,
271
286
  "aria-disabled": a || void 0,
272
287
  disabled: a,
273
- "data-selected": u || void 0,
288
+ "data-selected": c || void 0,
274
289
  "data-disabled": a || void 0,
275
- tabIndex: u && !a ? 0 : -1,
276
- className: f(
277
- _({ variant: y, orientation: h, size: N, selected: u }),
290
+ tabIndex: c && !a ? 0 : -1,
291
+ className: b(
292
+ q({ variant: g, orientation: x, size: T, selected: c }),
278
293
  o
279
294
  ),
280
- onClick: (l) => {
281
- i == null || i(l), a || w(e);
295
+ onClick: (r) => {
296
+ l == null || l(r), a || h(e);
282
297
  },
283
- onKeyDown: T,
284
- ...b,
298
+ onKeyDown: A,
299
+ ...$,
285
300
  children: [
286
- u && y === "primary" && /* @__PURE__ */ m(
287
- E.span,
301
+ c && g === "primary" && /* @__PURE__ */ f(
302
+ S.span,
288
303
  {
289
- layoutId: v,
304
+ layoutId: y,
290
305
  "aria-hidden": !0,
291
- transition: { duration: 0.2, ease: k },
306
+ transition: { duration: 0.2, ease: V },
292
307
  className: "absolute inset-0 rounded-md bg-elevated shadow-elevation"
293
308
  }
294
309
  ),
295
- u && y === "secondary" && /* @__PURE__ */ m(
296
- E.span,
310
+ c && g === "secondary" && /* @__PURE__ */ f(
311
+ S.span,
297
312
  {
298
- layoutId: v,
313
+ layoutId: y,
299
314
  "aria-hidden": !0,
300
- transition: { duration: 0.2, ease: k },
301
- className: f(
315
+ transition: { duration: 0.2, ease: V },
316
+ className: b(
302
317
  "absolute bg-brand",
303
- h === "horizontal" ? "left-0 right-0 bottom-0 h-0.5" : "top-0 bottom-0 right-0 w-0.5"
318
+ x === "horizontal" ? "left-0 right-0 bottom-0 h-0.5" : "top-0 bottom-0 right-0 w-0.5"
304
319
  )
305
320
  }
306
321
  ),
307
- /* @__PURE__ */ m("span", { className: "relative", children: s })
322
+ /* @__PURE__ */ E("span", { className: "relative inline-flex items-center gap-1", children: [
323
+ s,
324
+ n != null && /* @__PURE__ */ E("span", { className: b("tabular-nums", c ? "opacity-60" : "text-muted-foreground/70"), children: [
325
+ "· ",
326
+ n
327
+ ] })
328
+ ] })
308
329
  ]
309
330
  }
310
331
  );
311
332
  }
312
333
  );
313
- q.displayName = "Tab";
314
- const C = t.forwardRef(
334
+ C.displayName = "Tab";
335
+ const F = t.forwardRef(
315
336
  ({ className: o, ...e }, a) => {
316
- const { orientation: s, variant: i } = I("TabSeparator");
317
- return i === "primary" ? /* @__PURE__ */ m(
337
+ const { orientation: n, variant: s } = I("TabSeparator");
338
+ return s === "primary" ? /* @__PURE__ */ f(
318
339
  "span",
319
340
  {
320
341
  ref: a,
321
342
  "aria-hidden": !0,
322
343
  role: "separator",
323
- className: f("shrink-0", o),
344
+ className: b("shrink-0", o),
324
345
  ...e
325
346
  }
326
- ) : /* @__PURE__ */ m(
347
+ ) : /* @__PURE__ */ f(
327
348
  "span",
328
349
  {
329
350
  ref: a,
330
351
  "aria-hidden": !0,
331
352
  role: "separator",
332
- className: f(
353
+ className: b(
333
354
  "shrink-0 bg-border",
334
- s === "horizontal" ? "mx-1 h-4 w-px" : "my-1 h-px w-full",
355
+ n === "horizontal" ? "mx-1 h-4 w-px" : "my-1 h-px w-full",
335
356
  o
336
357
  ),
337
358
  ...e
@@ -339,33 +360,33 @@ const C = t.forwardRef(
339
360
  );
340
361
  }
341
362
  );
342
- C.displayName = "TabSeparator";
343
- const F = t.forwardRef(
344
- ({ className: o, value: e, children: a, ...s }, i) => {
345
- const { value: d, baseId: b } = I("TabPanel");
346
- return d !== e ? null : /* @__PURE__ */ m(
363
+ F.displayName = "TabSeparator";
364
+ const G = t.forwardRef(
365
+ ({ className: o, value: e, children: a, ...n }, s) => {
366
+ const { value: l, baseId: m } = I("TabPanel");
367
+ return l !== e ? null : /* @__PURE__ */ f(
347
368
  "div",
348
369
  {
349
- ref: i,
370
+ ref: s,
350
371
  role: "tabpanel",
351
- id: `${b}-panel-${e}`,
352
- "aria-labelledby": `${b}-tab-${e}`,
372
+ id: `${m}-panel-${e}`,
373
+ "aria-labelledby": `${m}-tab-${e}`,
353
374
  tabIndex: 0,
354
- className: f(
375
+ className: b(
355
376
  "flex-1 outline-none focus-visible:ring-3 focus-visible:ring-ring rounded-sm",
356
377
  o
357
378
  ),
358
- ...s,
379
+ ...n,
359
380
  children: a
360
381
  }
361
382
  );
362
383
  }
363
384
  );
364
- F.displayName = "TabPanel";
385
+ G.displayName = "TabPanel";
365
386
  export {
366
- q as Tab,
367
- H as TabList,
368
- F as TabPanel,
369
- C as TabSeparator,
370
- O as Tabs
387
+ C as Tab,
388
+ _ as TabList,
389
+ G as TabPanel,
390
+ F as TabSeparator,
391
+ B as Tabs
371
392
  };
@@ -3,22 +3,24 @@ import { jsx as i } from "react/jsx-runtime";
3
3
  import * as o from "react";
4
4
  import { cn as s } from "../lib/cn.js";
5
5
  import { inputBaseClass as m } from "./field.js";
6
- const p = o.forwardRef(
7
- ({ className: a, isInvalid: e, ...r }, t) => /* @__PURE__ */ i(
6
+ const n = o.forwardRef(
7
+ ({ className: e, isInvalid: r, ...a }, t) => /* @__PURE__ */ i(
8
8
  "textarea",
9
9
  {
10
10
  ref: t,
11
- "aria-invalid": e || void 0,
11
+ "aria-invalid": r || void 0,
12
12
  className: s(
13
13
  m,
14
- "min-h-20 resize-y py-2 text-xs",
15
- a
14
+ // Multi-line: the pill radius single-line controls use would clip
15
+ // the first/last lines oddly, so textareas stay softly rounded.
16
+ "min-h-20 resize-y rounded-lg py-2 text-xs",
17
+ e
16
18
  ),
17
- ...r
19
+ ...a
18
20
  }
19
21
  )
20
22
  );
21
- p.displayName = "Textarea";
23
+ n.displayName = "Textarea";
22
24
  export {
23
- p as Textarea
25
+ n as Textarea
24
26
  };