@actioneer/ads 0.5.4 → 0.5.6

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 (93) 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 +2644 -311
  22. package/components/answer.js +1776 -371
  23. package/components/assistant-ui/answer-tool-ui.js +27 -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/follow-up-suggestions.d.ts +5 -1
  27. package/components/assistant-ui/follow-up-suggestions.js +47 -19
  28. package/components/assistant-ui/reasoning.js +35 -31
  29. package/components/assistant-ui/tool-fallback.js +125 -122
  30. package/components/assistant-ui/tool-group.d.ts +3 -1
  31. package/components/assistant-ui/tool-group.js +48 -43
  32. package/components/audio-waveform.js +14 -14
  33. package/components/autocomplete.js +52 -48
  34. package/components/avatar.js +58 -44
  35. package/components/badge.js +3 -3
  36. package/components/brand-texture.js +1 -1
  37. package/components/breadcrumbs.d.ts +27 -1
  38. package/components/breadcrumbs.js +94 -42
  39. package/components/button.js +15 -15
  40. package/components/carousel.js +10 -10
  41. package/components/chart.js +77 -77
  42. package/components/chip.js +3 -3
  43. package/components/code-block.d.ts +39 -17
  44. package/components/code-block.js +153 -104
  45. package/components/command-palette.js +27 -25
  46. package/components/connector-card.js +2 -2
  47. package/components/dropdown.js +65 -61
  48. package/components/empty-state.js +15 -15
  49. package/components/field.js +16 -16
  50. package/components/index.d.ts +4 -0
  51. package/components/index.js +525 -478
  52. package/components/infinite-canvas.js +60 -60
  53. package/components/kbd.js +6 -6
  54. package/components/link.js +6 -6
  55. package/components/modal.js +22 -20
  56. package/components/page-header.js +1 -1
  57. package/components/pagination.js +22 -22
  58. package/components/pixel-blast-svg.js +1 -1
  59. package/components/pixel-icon.d.ts +31 -0
  60. package/components/pixel-icon.js +733 -0
  61. package/components/popover.js +46 -42
  62. package/components/ripple.d.ts +29 -0
  63. package/components/ripple.js +17 -0
  64. package/components/segmented.js +24 -23
  65. package/components/select.js +71 -67
  66. package/components/selection-action-bar.js +22 -22
  67. package/components/sidebar.d.ts +11 -3
  68. package/components/sidebar.js +161 -148
  69. package/components/stepper.d.ts +2 -0
  70. package/components/stepper.js +80 -43
  71. package/components/table.d.ts +7 -0
  72. package/components/table.js +223 -155
  73. package/components/tabs.d.ts +3 -1
  74. package/components/tabs.js +165 -144
  75. package/components/textarea.js +10 -8
  76. package/components/toast.js +48 -46
  77. package/components/tooltip.js +61 -59
  78. package/components/tree.js +44 -41
  79. package/components/typography.d.ts +1 -1
  80. package/components/typography.js +25 -25
  81. package/components/viz-charts.js +133 -133
  82. package/fonts/aribau-grotesk-500.otf +0 -0
  83. package/fonts/aribau-grotesk-600.woff2 +0 -0
  84. package/fonts.css +6 -4
  85. package/lib/icons.d.ts +411 -402
  86. package/lib/icons.js +109 -107
  87. package/llms.txt +98 -8
  88. package/manifest.json +1012 -96
  89. package/package.json +5 -5
  90. package/styles.css +206 -81
  91. package/theme.css +200 -77
  92. package/fonts/aribau-grotesk-400.otf +0 -0
  93. package/fonts/aribau-grotesk-700.otf +0 -0
@@ -1,70 +1,122 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as b } from "react/jsx-runtime";
3
- import * as r from "react";
4
- import { ChevronRight as g } from "../lib/icons.js";
5
- import { cn as n } from "../lib/cn.js";
6
- const l = r.createContext({
2
+ import { jsxs as v, jsx as e, Fragment as k } from "react/jsx-runtime";
3
+ import * as t from "react";
4
+ import { ArrowLeft as B } from "../lib/icons.js";
5
+ import { cn as a } from "../lib/cn.js";
6
+ const N = t.createContext({
7
7
  count: 0
8
- }), u = r.createContext(0), p = r.forwardRef(
9
- ({ className: i, children: o, ...c }, t) => {
10
- const s = r.Children.toArray(o);
11
- return /* @__PURE__ */ e(
8
+ }), w = t.createContext(0);
9
+ function R(s) {
10
+ let n = (s == null ? void 0 : s.parentElement) ?? null;
11
+ for (; n; ) {
12
+ const r = getComputedStyle(n).overflowY;
13
+ if (r === "auto" || r === "scroll") return n;
14
+ n = n.parentElement;
15
+ }
16
+ return null;
17
+ }
18
+ const y = t.forwardRef(
19
+ ({
20
+ className: s,
21
+ children: n,
22
+ sticky: r,
23
+ onBack: c,
24
+ backLabel: g = "Back",
25
+ actions: m,
26
+ meta: f,
27
+ ...p
28
+ }, i) => {
29
+ const b = t.Children.toArray(n), l = t.useRef(null), u = t.useCallback(
30
+ (o) => {
31
+ l.current = o, typeof i == "function" ? i(o) : i && (i.current = o);
32
+ },
33
+ [i]
34
+ ), [x, C] = t.useState(!1);
35
+ return t.useEffect(() => {
36
+ if (!r) return;
37
+ const o = R(l.current), d = o ?? window, h = () => C((o ? o.scrollTop : window.scrollY) > 2);
38
+ return h(), d.addEventListener("scroll", h, { passive: !0 }), () => d.removeEventListener("scroll", h);
39
+ }, [r]), /* @__PURE__ */ v(
12
40
  "nav",
13
41
  {
14
- ref: t,
42
+ ref: u,
15
43
  "aria-label": "Breadcrumb",
16
- className: n(
17
- "flex min-h-12 w-full items-center border-b border-border",
18
- i
44
+ "data-stuck": r ? x ? "true" : "false" : void 0,
45
+ className: a(
46
+ "flex w-full items-center",
47
+ r && "sticky top-0 z-40 bg-background transition-[border-color] duration-(--duration-fast) ease-out motion-reduce:transition-none",
48
+ // Sticky offsets resolve against the scrollport's PADDING box, so in
49
+ // a padded panel the pinned trail sits below a strip the content
50
+ // would otherwise scroll through. This cover extends the trail's own
51
+ // background over that gap (a no-op at rest, where the strip is the
52
+ // panel's empty padding).
53
+ r && "before:absolute before:inset-x-0 before:-top-8 before:h-8 before:bg-inherit before:content-['']",
54
+ r && (x ? "border-b border-border" : "border-b border-transparent"),
55
+ s
19
56
  ),
20
- ...c,
21
- children: /* @__PURE__ */ e("ol", { className: "flex min-w-0 items-center gap-1.5 text-xs", children: /* @__PURE__ */ e(l.Provider, { value: { count: s.length }, children: s.map((m, a) => /* @__PURE__ */ e(u.Provider, { value: a, children: m }, a)) }) })
57
+ ...p,
58
+ children: [
59
+ c && /* @__PURE__ */ e(
60
+ "button",
61
+ {
62
+ type: "button",
63
+ onClick: c,
64
+ "aria-label": g,
65
+ className: a(
66
+ "mr-1 inline-flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground",
67
+ "transition-colors hover:bg-fill hover:text-foreground",
68
+ "outline-none focus-visible:ring-3 focus-visible:ring-ring [&_svg]:size-4"
69
+ ),
70
+ children: /* @__PURE__ */ e(B, { "aria-hidden": !0 })
71
+ }
72
+ ),
73
+ /* @__PURE__ */ e("ol", { className: "flex min-w-0 items-center gap-1.5 text-base", children: /* @__PURE__ */ e(N.Provider, { value: { count: b.length }, children: b.map((o, d) => /* @__PURE__ */ e(w.Provider, { value: d, children: o }, d)) }) }),
74
+ f && /* @__PURE__ */ e("div", { className: "ml-4 flex min-w-0 shrink items-center gap-3 text-xs text-muted-foreground", children: f }),
75
+ m && /* @__PURE__ */ e("div", { className: "ml-auto flex shrink-0 items-center gap-2 pl-4", children: m })
76
+ ]
22
77
  }
23
78
  );
24
79
  }
25
80
  );
26
- p.displayName = "Breadcrumbs";
27
- const h = r.forwardRef(({ className: i, href: o, isCurrent: c, children: t, ...s }, m) => {
28
- const { count: a } = r.useContext(l), x = r.useContext(u) === a - 1, d = "inline-flex items-center", f = c ? /* @__PURE__ */ e(
81
+ y.displayName = "Breadcrumbs";
82
+ const E = t.forwardRef(({ className: s, href: n, isCurrent: r, icon: c, children: g, ...m }, f) => {
83
+ const { count: p } = t.useContext(N), b = t.useContext(w) === p - 1, l = "inline-flex items-center gap-1.5", u = /* @__PURE__ */ v(k, { children: [
84
+ c && /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "flex shrink-0 items-center [&_svg]:size-4", children: c }),
85
+ g
86
+ ] }), x = r ? /* @__PURE__ */ e(
29
87
  "span",
30
88
  {
31
89
  "aria-current": "page",
32
- className: n(d, "font-medium text-foreground"),
33
- children: t
90
+ className: a(l, "font-normal text-primary"),
91
+ children: u
34
92
  }
35
- ) : o ? /* @__PURE__ */ e(
93
+ ) : n ? /* @__PURE__ */ e(
36
94
  "a",
37
95
  {
38
- href: o,
39
- className: n(
40
- d,
41
- "font-medium text-muted-foreground transition-colors hover:text-foreground hover:underline",
96
+ href: n,
97
+ className: a(
98
+ l,
99
+ "font-normal text-muted-foreground transition-colors hover:text-foreground",
42
100
  "outline-none focus-visible:ring-3 focus-visible:ring-ring rounded-sm"
43
101
  ),
44
- children: t
102
+ children: u
45
103
  }
46
- ) : /* @__PURE__ */ e("span", { className: n(d, "text-muted-foreground"), children: t });
47
- return /* @__PURE__ */ b(
104
+ ) : /* @__PURE__ */ e("span", { className: a(l, "text-muted-foreground"), children: u });
105
+ return /* @__PURE__ */ v(
48
106
  "li",
49
107
  {
50
- ref: m,
51
- className: n("flex items-center gap-1.5", i),
52
- ...s,
108
+ ref: f,
109
+ className: a("flex items-center gap-1.5", s),
110
+ ...m,
53
111
  children: [
54
- f,
55
- !x && /* @__PURE__ */ e(
56
- g,
57
- {
58
- "aria-hidden": !0,
59
- className: "size-3.5 shrink-0 text-border-strong"
60
- }
61
- )
112
+ x,
113
+ !b && /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "shrink-0 select-none text-border-strong", children: "/" })
62
114
  ]
63
115
  }
64
116
  );
65
117
  });
66
- h.displayName = "BreadcrumbItem";
118
+ E.displayName = "BreadcrumbItem";
67
119
  export {
68
- h as BreadcrumbItem,
69
- p as Breadcrumbs
120
+ E as BreadcrumbItem,
121
+ y as Breadcrumbs
70
122
  };
@@ -1,13 +1,13 @@
1
1
  "use client";
2
- import { jsxs as r, jsx as u } from "react/jsx-runtime";
2
+ import { jsxs as r, jsx as b } from "react/jsx-runtime";
3
3
  import * as c from "react";
4
4
  import { cva as v } from "class-variance-authority";
5
- import { cn as t } from "../lib/cn.js";
5
+ import { cn as n } from "../lib/cn.js";
6
6
  import { Spinner as m } from "./spinner.js";
7
7
  const p = v(
8
8
  [
9
9
  "relative inline-flex items-center justify-center gap-2 whitespace-nowrap",
10
- "font-medium select-none",
10
+ "font-normal select-none",
11
11
  "rounded-md border border-transparent",
12
12
  "transition-[background,border,color,box-shadow,transform] duration-(--duration-fast) ease-out",
13
13
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
@@ -33,17 +33,17 @@ const p = v(
33
33
  sm: "h-8 px-3 text-xs [&_svg]:size-4",
34
34
  md: "h-10 px-4 text-xs [&_svg]:size-4",
35
35
  lg: "h-11 px-5 text-base [&_svg]:size-5",
36
- icon: "size-10 [&_svg]:size-4",
37
- "icon-sm": "size-8 [&_svg]:size-4",
38
- "icon-xs": "size-7 [&_svg]:size-4"
36
+ icon: "size-10 rounded-full [&_svg]:size-4",
37
+ "icon-sm": "size-8 rounded-full [&_svg]:size-4",
38
+ "icon-xs": "size-7 rounded-full [&_svg]:size-4"
39
39
  }
40
40
  },
41
41
  defaultVariants: { variant: "solid", size: "md" }
42
42
  }
43
43
  ), x = c.forwardRef(
44
44
  ({
45
- className: n,
46
- variant: o,
45
+ className: o,
46
+ variant: t,
47
47
  size: s,
48
48
  isLoading: e = !1,
49
49
  startContent: i,
@@ -51,23 +51,23 @@ const p = v(
51
51
  fullWidth: d,
52
52
  disabled: l,
53
53
  children: g,
54
- ...b
54
+ ...u
55
55
  }, f) => /* @__PURE__ */ r(
56
56
  "button",
57
57
  {
58
58
  ref: f,
59
59
  disabled: l || e,
60
60
  "aria-busy": e || void 0,
61
- className: t(
62
- p({ variant: o, size: s }),
61
+ className: n(
62
+ p({ variant: t, size: s }),
63
63
  d && "w-full",
64
64
  // Real disabled fades; loading keeps the brand color
65
65
  e ? "opacity-100" : "disabled:opacity-50",
66
- n
66
+ o
67
67
  ),
68
- ...b,
68
+ ...u,
69
69
  children: [
70
- e && /* @__PURE__ */ u(
70
+ e && /* @__PURE__ */ b(
71
71
  m,
72
72
  {
73
73
  size: "sm",
@@ -78,7 +78,7 @@ const p = v(
78
78
  /* @__PURE__ */ r(
79
79
  "span",
80
80
  {
81
- className: t(
81
+ className: n(
82
82
  "inline-flex items-center gap-2",
83
83
  e && "opacity-0"
84
84
  ),
@@ -6,7 +6,7 @@ import { Button as D } from "./button.js";
6
6
  import { ChevronLeft as H, ChevronRight as X } from "../lib/icons.js";
7
7
  import { cn as S } from "../lib/cn.js";
8
8
  const q = t.createContext(null);
9
- function k(l) {
9
+ function T(l) {
10
10
  const i = t.useContext(q);
11
11
  if (!i)
12
12
  throw new Error(`<${l}> must be used within <Carousel>`);
@@ -58,7 +58,7 @@ const B = W(
58
58
  const s = requestAnimationFrame(() => R(!0));
59
59
  return () => cancelAnimationFrame(s);
60
60
  }, [g, P]);
61
- const T = t.useMemo(
61
+ const k = t.useMemo(
62
62
  () => ({
63
63
  index: g,
64
64
  count: h,
@@ -84,7 +84,7 @@ const B = W(
84
84
  ), z = (s) => {
85
85
  r == null || r(s), !(s.defaultPrevented || s.target !== s.currentTarget) && (s.key === "ArrowLeft" ? (s.preventDefault(), A("instant")) : s.key === "ArrowRight" ? (s.preventDefault(), w("instant")) : s.key === "Home" ? (s.preventDefault(), c(0, "instant")) : s.key === "End" && (s.preventDefault(), c(h - 1, "instant")));
86
86
  };
87
- return /* @__PURE__ */ C(q.Provider, { value: T, children: /* @__PURE__ */ V(
87
+ return /* @__PURE__ */ C(q.Provider, { value: k, children: /* @__PURE__ */ V(
88
88
  "div",
89
89
  {
90
90
  ref: u,
@@ -122,7 +122,7 @@ const O = 40, Y = 10, J = 0.11, Q = t.forwardRef(
122
122
  setCount: u,
123
123
  goPrevious: a,
124
124
  goNext: n
125
- } = k("CarouselContent"), y = t.Children.toArray(i), h = t.useRef(null), v = t.useRef(!1);
125
+ } = T("CarouselContent"), y = t.Children.toArray(i), h = t.useRef(null), v = t.useRef(!1);
126
126
  t.useEffect(() => {
127
127
  u(y.length);
128
128
  }, [y.length, u]);
@@ -138,8 +138,8 @@ const O = 40, Y = 10, J = 0.11, Q = t.forwardRef(
138
138
  f == null || f(e);
139
139
  const c = h.current;
140
140
  if (h.current = null, R(e), !c || c.pointerId !== e.pointerId) return;
141
- const A = e.clientX - c.x, w = Math.max(1, e.timeStamp - c.time), T = Math.abs(A) / w;
142
- (Math.abs(A) >= O || Math.abs(A) >= Y && T > J) && (v.current = !0, A < 0 ? n() : a());
141
+ const A = e.clientX - c.x, w = Math.max(1, e.timeStamp - c.time), k = Math.abs(A) / w;
142
+ (Math.abs(A) >= O || Math.abs(A) >= Y && k > J) && (v.current = !0, A < 0 ? n() : a());
143
143
  }, j = (e) => {
144
144
  o == null || o(e), h.current = null, R(e);
145
145
  }, g = (e) => {
@@ -223,7 +223,7 @@ const K = t.forwardRef(
223
223
  "aria-label": f,
224
224
  ...o
225
225
  }, b) => {
226
- const { index: p, count: m, contentId: r, goTo: x } = k("CarouselIndicators"), I = t.useRef([]);
226
+ const { index: p, count: m, contentId: r, goTo: x } = T("CarouselIndicators"), I = t.useRef([]);
227
227
  if (m <= 1) return null;
228
228
  const N = (u) => {
229
229
  var n;
@@ -265,7 +265,7 @@ const K = t.forwardRef(
265
265
  "aria-hidden": !0,
266
266
  className: S(
267
267
  "size-2.5 rounded-dot transition-colors duration-(--duration-fast) ease-out motion-reduce:transition-none",
268
- n ? "bg-brand" : "bg-ink-100 group-hover:bg-ink-300"
268
+ n ? "bg-brand" : "bg-fill group-hover:bg-muted"
269
269
  )
270
270
  }
271
271
  )
@@ -288,7 +288,7 @@ const U = t.forwardRef(
288
288
  "aria-label": b,
289
289
  ...p
290
290
  }, m) => {
291
- const { index: r, count: x, loop: I, contentId: N, goPrevious: u } = k("CarouselPrevious"), a = f || x <= 1 || !I && r === 0;
291
+ const { index: r, count: x, loop: I, contentId: N, goPrevious: u } = T("CarouselPrevious"), a = f || x <= 1 || !I && r === 0;
292
292
  return /* @__PURE__ */ C(
293
293
  D,
294
294
  {
@@ -319,7 +319,7 @@ const ee = t.forwardRef(
319
319
  "aria-label": b,
320
320
  ...p
321
321
  }, m) => {
322
- const { index: r, count: x, loop: I, contentId: N, goNext: u } = k("CarouselNext"), a = f || x <= 1 || !I && r === x - 1;
322
+ const { index: r, count: x, loop: I, contentId: N, goNext: u } = T("CarouselNext"), a = f || x <= 1 || !I && r === x - 1;
323
323
  return /* @__PURE__ */ C(
324
324
  D,
325
325
  {