@actioneer/ads 0.5.7 → 0.5.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 (140) hide show
  1. package/bin/ads-init.mjs +6 -0
  2. package/components/accordion.js +50 -48
  3. package/components/agent-icon.d.ts +12 -0
  4. package/components/agent-icon.js +133 -120
  5. package/components/ai-elements/chain-of-thought.d.ts +1 -1
  6. package/components/ai-elements/chain-of-thought.js +108 -108
  7. package/components/ai-elements/chart.js +16 -14
  8. package/components/ai-elements/inline-citation.js +41 -41
  9. package/components/ai-elements/message.js +4 -4
  10. package/components/ai-elements/queue.js +7 -7
  11. package/components/ai-elements/research-activity.js +114 -114
  12. package/components/ai-elements/shimmer.d.ts +2 -2
  13. package/components/ai-elements/speech-input.js +28 -28
  14. package/components/ai-elements/task-progress.js +26 -16
  15. package/components/ai-elements/task.js +17 -17
  16. package/components/ai-elements/tool.js +6 -6
  17. package/components/ai-elements/transcript.js +6 -5
  18. package/components/ai-elements/voice.js +1 -1
  19. package/components/alert.js +10 -10
  20. package/components/answer-sources.js +1 -1
  21. package/components/answer.js +115 -114
  22. package/components/assistant-ui/action-bar.js +94 -48
  23. package/components/assistant-ui/attachment.js +103 -75
  24. package/components/assistant-ui/badge.d.ts +1 -1
  25. package/components/assistant-ui/badge.js +17 -17
  26. package/components/assistant-ui/chain-of-thought.d.ts +1 -1
  27. package/components/assistant-ui/composer-add-context.js +9 -9
  28. package/components/assistant-ui/composer-deep-research.js +5 -5
  29. package/components/assistant-ui/composer-harness.js +11 -9
  30. package/components/assistant-ui/composer-trigger-popover.js +45 -34
  31. package/components/assistant-ui/composer.js +59 -59
  32. package/components/assistant-ui/error.js +14 -14
  33. package/components/assistant-ui/file.d.ts +1 -1
  34. package/components/assistant-ui/image.d.ts +1 -1
  35. package/components/assistant-ui/image.js +113 -103
  36. package/components/assistant-ui/markdown-text.js +18 -18
  37. package/components/assistant-ui/message.js +46 -45
  38. package/components/assistant-ui/quote.js +1 -1
  39. package/components/assistant-ui/reasoning.d.ts +1 -1
  40. package/components/assistant-ui/reasoning.js +66 -77
  41. package/components/assistant-ui/suggestions.js +4 -4
  42. package/components/assistant-ui/thread.js +22 -22
  43. package/components/assistant-ui/tool-fallback.js +60 -63
  44. package/components/assistant-ui/tool-group.d.ts +1 -1
  45. package/components/assistant-ui/tool-group.js +36 -42
  46. package/components/audio-waveform.js +25 -24
  47. package/components/autocomplete.d.ts +1 -0
  48. package/components/autocomplete.js +45 -43
  49. package/components/avatar.js +24 -24
  50. package/components/badge.d.ts +1 -1
  51. package/components/breadcrumbs.js +2 -2
  52. package/components/button.d.ts +2 -2
  53. package/components/button.js +22 -20
  54. package/components/card.js +8 -8
  55. package/components/carousel.js +105 -104
  56. package/components/chart.js +9 -7
  57. package/components/checkbox.js +74 -38
  58. package/components/chip.d.ts +1 -1
  59. package/components/code-block.js +3 -3
  60. package/components/collapsible.js +67 -23
  61. package/components/connector-card.js +6 -6
  62. package/components/drawer.d.ts +15 -10
  63. package/components/drawer.js +78 -77
  64. package/components/dropdown.d.ts +2 -0
  65. package/components/dropdown.js +88 -79
  66. package/components/empty-state.d.ts +1 -1
  67. package/components/empty-state.js +7 -7
  68. package/components/field.d.ts +4 -0
  69. package/components/field.js +45 -34
  70. package/components/file-dropzone.js +12 -12
  71. package/components/index.d.ts +3 -0
  72. package/components/index.js +584 -558
  73. package/components/input-field.js +51 -46
  74. package/components/input.js +20 -20
  75. package/components/link.js +9 -9
  76. package/components/modal.js +105 -73
  77. package/components/navbar.d.ts +1 -1
  78. package/components/navbar.js +1 -1
  79. package/components/number-field.js +38 -29
  80. package/components/page-header.js +12 -12
  81. package/components/pagination.js +19 -19
  82. package/components/panel.js +2 -2
  83. package/components/pixel-blast-svg.js +3 -3
  84. package/components/pixel-icon.js +0 -1
  85. package/components/popover.d.ts +1 -1
  86. package/components/popover.js +66 -64
  87. package/components/progress-circle.js +36 -32
  88. package/components/progress.js +28 -24
  89. package/components/radio.js +59 -49
  90. package/components/resizable-panel.js +1 -1
  91. package/components/reveal.d.ts +2 -2
  92. package/components/ripple.d.ts +3 -3
  93. package/components/scroll-area.js +17 -16
  94. package/components/segmented.js +26 -26
  95. package/components/select.d.ts +2 -0
  96. package/components/select.js +61 -57
  97. package/components/setting-row.js +45 -42
  98. package/components/sidebar.js +131 -127
  99. package/components/skeleton.js +5 -5
  100. package/components/spinner.d.ts +13 -4
  101. package/components/spinner.js +42 -42
  102. package/components/stepper.js +21 -21
  103. package/components/switch.js +41 -39
  104. package/components/table.d.ts +9 -0
  105. package/components/table.js +370 -247
  106. package/components/tabs.js +149 -137
  107. package/components/toast.js +66 -66
  108. package/components/tooltip.js +2 -2
  109. package/components/tree.js +62 -51
  110. package/components/typography.d.ts +2 -1
  111. package/components/typography.js +33 -32
  112. package/components/ui/button.d.ts +2 -2
  113. package/components/ui/button.js +19 -19
  114. package/components/ui/collapsible.d.ts +1 -5
  115. package/components/ui/dialog.d.ts +3 -3
  116. package/components/ui/dialog.js +95 -58
  117. package/components/ui/tooltip.d.ts +2 -2
  118. package/components/ui/tooltip.js +67 -33
  119. package/components/viz-charts.js +95 -95
  120. package/demo/components/add-to-artifact.js +341 -0
  121. package/demo/lib/artifact-library.js +134 -0
  122. package/fonts/aribau-grotesk-medium.woff2 +0 -0
  123. package/fonts/aribau-grotesk-regular.woff2 +0 -0
  124. package/fonts.css +11 -11
  125. package/hooks/agents-ui/use-agent-audio-visualizer-aura.js +17 -16
  126. package/hooks/agents-ui/use-agent-audio-visualizer-wave.js +21 -20
  127. package/lib/icons.d.ts +4 -0
  128. package/lib/icons.js +103 -102
  129. package/lib/motion.d.ts +42 -39
  130. package/lib/motion.js +112 -52
  131. package/lib/spinner-mark.d.ts +9 -0
  132. package/lib/spinner-mark.js +98 -0
  133. package/llms.txt +52 -18
  134. package/manifest.json +240 -31
  135. package/package.json +1 -1
  136. package/styles.css +143 -124
  137. package/theme.css +90 -93
  138. package/components/ui/collapsible.js +0 -35
  139. package/fonts/aribau-grotesk-500.otf +0 -0
  140. package/fonts/aribau-grotesk-600.woff2 +0 -0
@@ -1,107 +1,111 @@
1
1
  "use client";
2
- import { jsxs as m, jsx as i } from "react/jsx-runtime";
3
- import * as s from "react";
4
- import { cva as j } from "class-variance-authority";
5
- import { MotionConfig as M, AnimatePresence as V, motion as $ } from "motion/react";
6
- import { ChevronDown as C, Check as K } from "../lib/icons.js";
2
+ import { jsxs as b, jsx as i } from "react/jsx-runtime";
3
+ import * as a from "react";
4
+ import { cva as V } from "class-variance-authority";
5
+ import { MotionConfig as $, AnimatePresence as C, motion as K } from "motion/react";
6
+ import { ChevronDown as L, Check as O } from "../lib/icons.js";
7
7
  import { cn as d } from "../lib/cn.js";
8
- import { inputBaseClass as L } from "./field.js";
9
- import { floatVariants as O } from "../lib/motion.js";
10
- import { Ripple as P } from "./ripple.js";
11
- const T = j(
8
+ import { inputBaseClass as P } from "./field.js";
9
+ import { floatVariants as T } from "../lib/motion.js";
10
+ import { Ripple as _ } from "./ripple.js";
11
+ const B = V(
12
12
  d(
13
- L,
13
+ P,
14
14
  "items-center justify-between gap-2 text-left cursor-pointer",
15
15
  "[&_svg]:pointer-events-none [&_svg]:shrink-0"
16
16
  ),
17
17
  {
18
18
  variants: {
19
19
  size: {
20
- sm: "h-8 text-xs",
21
- md: "h-10 text-xs",
22
- lg: "h-11 text-base"
20
+ sm: "h-8 rounded-sm text-xs",
21
+ md: "h-10 rounded-md text-xs",
22
+ lg: "h-11 rounded-md text-base"
23
23
  }
24
24
  },
25
25
  defaultVariants: { size: "md" }
26
26
  }
27
- ), _ = s.forwardRef(
27
+ ), U = a.forwardRef(
28
28
  ({
29
- items: r,
29
+ items: o,
30
30
  value: c,
31
- onChange: b,
31
+ onChange: m,
32
32
  placeholder: I = "Select…",
33
33
  size: N,
34
34
  disabled: w,
35
35
  isInvalid: E,
36
36
  className: R,
37
37
  id: A,
38
- placement: v = "bottom"
39
- }, S) => {
40
- const [o, l] = s.useState(!1), [a, x] = s.useState(-1), g = s.useRef(null), k = s.useRef(null), u = s.useId(), h = r.find((e) => e.value === c), z = s.useCallback(() => {
41
- const e = r.findIndex((t) => t.value === c);
42
- return e >= 0 && !r[e].disabled ? e : r.findIndex((t) => !t.disabled);
43
- }, [r, c]);
44
- s.useEffect(() => {
45
- if (!o) return;
38
+ placement: v = "bottom",
39
+ "aria-label": S,
40
+ "aria-describedby": z
41
+ }, j) => {
42
+ const [r, l] = a.useState(!1), [s, x] = a.useState(-1), g = a.useRef(null), k = a.useRef(null), u = a.useId(), h = o.find((e) => e.value === c), M = a.useCallback(() => {
43
+ const e = o.findIndex((t) => t.value === c);
44
+ return e >= 0 && !o[e].disabled ? e : o.findIndex((t) => !t.disabled);
45
+ }, [o, c]);
46
+ a.useEffect(() => {
47
+ if (!r) return;
46
48
  const e = (t) => {
47
49
  var n;
48
50
  (n = g.current) != null && n.contains(t.target) || l(!1);
49
51
  };
50
52
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
51
- }, [o]), s.useEffect(() => {
53
+ }, [r]), a.useEffect(() => {
52
54
  var t;
53
- if (!o || a < 0) return;
54
- const e = (t = k.current) == null ? void 0 : t.children[a];
55
+ if (!r || s < 0) return;
56
+ const e = (t = k.current) == null ? void 0 : t.children[s];
55
57
  e == null || e.scrollIntoView({ block: "nearest" });
56
- }, [o, a]);
58
+ }, [r, s]);
57
59
  const f = () => {
58
- w || (x(z()), l(!0));
60
+ w || (x(M()), l(!0));
59
61
  }, y = (e) => {
60
62
  x((t) => {
61
63
  let n = t;
62
- for (let p = 0; p < r.length; p++)
63
- if (n = (n + e + r.length) % r.length, !r[n].disabled) return n;
64
+ for (let p = 0; p < o.length; p++)
65
+ if (n = (n + e + o.length) % o.length, !o[n].disabled) return n;
64
66
  return t;
65
67
  });
66
68
  }, D = (e) => {
67
- const t = r[e];
68
- !t || t.disabled || (b == null || b(t.value), l(!1));
69
+ const t = o[e];
70
+ !t || t.disabled || (m == null || m(t.value), l(!1));
69
71
  };
70
- return /* @__PURE__ */ m("div", { ref: g, className: "relative", children: [
71
- /* @__PURE__ */ m(
72
+ return /* @__PURE__ */ b("div", { ref: g, className: "relative", children: [
73
+ /* @__PURE__ */ b(
72
74
  "button",
73
75
  {
74
- ref: S,
76
+ ref: j,
75
77
  id: A,
76
78
  type: "button",
77
79
  role: "combobox",
78
80
  "aria-haspopup": "listbox",
79
- "aria-expanded": o,
81
+ "aria-expanded": r,
80
82
  "aria-controls": u,
81
83
  "aria-invalid": E || void 0,
84
+ "aria-label": S,
85
+ "aria-describedby": z,
82
86
  disabled: w,
83
- onClick: () => o ? l(!1) : f(),
87
+ onClick: () => r ? l(!1) : f(),
84
88
  onKeyDown: (e) => {
85
89
  switch (e.key) {
86
90
  case "ArrowDown":
87
- e.preventDefault(), o ? y(1) : f();
91
+ e.preventDefault(), r ? y(1) : f();
88
92
  break;
89
93
  case "ArrowUp":
90
- e.preventDefault(), o ? y(-1) : f();
94
+ e.preventDefault(), r ? y(-1) : f();
91
95
  break;
92
96
  case "Enter":
93
97
  case " ":
94
- e.preventDefault(), o ? D(a) : f();
98
+ e.preventDefault(), r ? D(s) : f();
95
99
  break;
96
100
  case "Escape":
97
- o && (e.preventDefault(), l(!1));
101
+ r && (e.preventDefault(), l(!1));
98
102
  break;
99
103
  case "Tab":
100
104
  l(!1);
101
105
  break;
102
106
  }
103
107
  },
104
- className: d(T({ size: N }), R),
108
+ className: d(B({ size: N }), R),
105
109
  children: [
106
110
  /* @__PURE__ */ i(
107
111
  "span",
@@ -114,11 +118,11 @@ const T = j(
114
118
  }
115
119
  ),
116
120
  /* @__PURE__ */ i(
117
- C,
121
+ L,
118
122
  {
119
123
  className: d(
120
- "size-4 text-muted-foreground transition-transform duration-(--duration-fast) ease-out motion-reduce:transition-none",
121
- o && "rotate-180"
124
+ "size-4 text-muted-foreground transition-transform duration-150 ease-out motion-reduce:transition-none",
125
+ r && "rotate-180"
122
126
  ),
123
127
  "aria-hidden": !0
124
128
  }
@@ -126,14 +130,14 @@ const T = j(
126
130
  ]
127
131
  }
128
132
  ),
129
- /* @__PURE__ */ i(M, { reducedMotion: "user", children: /* @__PURE__ */ i(V, { children: o && /* @__PURE__ */ m(
130
- $.ul,
133
+ /* @__PURE__ */ i($, { reducedMotion: "user", children: /* @__PURE__ */ i(C, { children: r && /* @__PURE__ */ b(
134
+ K.ul,
131
135
  {
132
136
  ref: k,
133
137
  id: u,
134
138
  role: "listbox",
135
- "aria-activedescendant": a >= 0 ? `${u}-opt-${a}` : void 0,
136
- variants: O,
139
+ "aria-activedescendant": s >= 0 ? `${u}-opt-${s}` : void 0,
140
+ variants: T,
137
141
  initial: "hidden",
138
142
  animate: "visible",
139
143
  exit: "hidden",
@@ -146,10 +150,10 @@ const T = j(
146
150
  v === "top" ? "bottom-full mb-1.5" : "top-full mt-1.5"
147
151
  ),
148
152
  children: [
149
- /* @__PURE__ */ i(P, { origin: v === "top" ? "bottom" : "top" }),
150
- r.map((e, t) => {
151
- const n = e.value === c, p = t === a;
152
- return /* @__PURE__ */ m(
153
+ /* @__PURE__ */ i(_, { origin: v === "top" ? "bottom" : "top" }),
154
+ o.map((e, t) => {
155
+ const n = e.value === c, p = t === s;
156
+ return /* @__PURE__ */ b(
153
157
  "li",
154
158
  {
155
159
  id: `${u}-opt-${t}`,
@@ -166,7 +170,7 @@ const T = j(
166
170
  ),
167
171
  children: [
168
172
  /* @__PURE__ */ i("span", { className: "truncate", children: e.label }),
169
- n && /* @__PURE__ */ i(K, { className: "size-4 shrink-0", "aria-hidden": !0 })
173
+ n && /* @__PURE__ */ i(O, { className: "size-4 shrink-0", "aria-hidden": !0 })
170
174
  ]
171
175
  },
172
176
  e.value
@@ -178,7 +182,7 @@ const T = j(
178
182
  ] });
179
183
  }
180
184
  );
181
- _.displayName = "Select";
185
+ U.displayName = "Select";
182
186
  export {
183
- _ as Select
187
+ U as Select
184
188
  };
@@ -1,61 +1,64 @@
1
1
  "use client";
2
- import { jsxs as c, jsx as s } from "react/jsx-runtime";
3
- import * as f from "react";
2
+ import { jsxs as c, jsx as e } from "react/jsx-runtime";
3
+ import * as d from "react";
4
4
  import { cva as g } from "class-variance-authority";
5
- import { cn as o } from "../lib/cn.js";
6
- const x = g(
5
+ import { cn as a } from "../lib/cn.js";
6
+ const p = g(
7
7
  "flex w-full items-center gap-3 rounded-lg bg-card px-4 py-3 text-left",
8
8
  {
9
9
  variants: {
10
10
  isPressable: {
11
- true: o(
12
- "cursor-pointer outline-none",
13
- "transition-[background-color,transform] duration-(--duration-fast) ease-out",
14
- "hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring",
15
- "active:scale-(--scale-press) motion-reduce:transition-none"
16
- ),
11
+ true: "relative",
17
12
  false: ""
18
13
  }
19
14
  },
20
15
  defaultVariants: { isPressable: !1 }
21
16
  }
22
- ), p = f.forwardRef(
23
- ({ className: r, icon: i, label: n, description: l, action: d, onSelect: e, ...m }, u) => {
24
- const a = !!e;
17
+ ), x = d.forwardRef(
18
+ ({ className: i, icon: s, label: t, description: n, action: r, onSelect: o, ...f }, m) => {
19
+ const l = !!o;
25
20
  return /* @__PURE__ */ c(
26
21
  "div",
27
22
  {
28
- ref: u,
23
+ ref: m,
29
24
  "data-slot": "setting-row",
30
- role: a ? "button" : void 0,
31
- tabIndex: a ? 0 : void 0,
32
- onClick: e,
33
- onKeyDown: a ? (t) => {
34
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), e == null || e());
35
- } : void 0,
36
- className: o(x({ isPressable: a }), r),
37
- ...m,
25
+ className: a(p({ isPressable: l }), i),
26
+ ...f,
38
27
  children: [
39
- i && /* @__PURE__ */ s(
28
+ l && /* @__PURE__ */ e(
29
+ "button",
30
+ {
31
+ type: "button",
32
+ "aria-label": typeof t == "string" ? t : "Open setting",
33
+ onClick: o,
34
+ className: a(
35
+ "absolute inset-0 rounded-lg outline-none",
36
+ "transition-[background-color,transform] duration-150 ease-out",
37
+ "hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring",
38
+ "active:scale-[0.97] motion-reduce:transition-none"
39
+ )
40
+ }
41
+ ),
42
+ s && /* @__PURE__ */ e(
40
43
  "span",
41
44
  {
42
45
  "aria-hidden": !0,
43
- className: "flex size-5 shrink-0 items-center justify-center text-tertiary [&>svg]:size-4.5",
44
- children: i
46
+ className: "relative z-10 flex size-5 shrink-0 items-center justify-center text-tertiary pointer-events-none [&>svg]:size-4.5",
47
+ children: s
45
48
  }
46
49
  ),
47
- /* @__PURE__ */ c("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
48
- /* @__PURE__ */ s("div", { className: "min-w-0 truncate text-base text-foreground", children: n }),
49
- l && /* @__PURE__ */ s("div", { className: "min-w-0 text-xs text-tertiary", children: l })
50
+ /* @__PURE__ */ c("div", { className: "relative z-10 flex min-w-0 flex-1 flex-col gap-0.5 pointer-events-none", children: [
51
+ /* @__PURE__ */ e("div", { className: "min-w-0 truncate text-base text-foreground", children: t }),
52
+ n && /* @__PURE__ */ e("div", { className: "min-w-0 text-xs text-tertiary", children: n })
50
53
  ] }),
51
- d && // The trailing control owns its own click — a pressable row must not
54
+ r && // The trailing control owns its own click — a pressable row must not
52
55
  // also fire when the reader aims at the button inside it.
53
- /* @__PURE__ */ s(
56
+ /* @__PURE__ */ e(
54
57
  "span",
55
58
  {
56
- className: "shrink-0",
57
- onClick: (t) => t.stopPropagation(),
58
- children: d
59
+ className: "relative z-20 shrink-0",
60
+ onClick: (u) => u.stopPropagation(),
61
+ children: r
59
62
  }
60
63
  )
61
64
  ]
@@ -63,24 +66,24 @@ const x = g(
63
66
  );
64
67
  }
65
68
  );
66
- p.displayName = "SettingRow";
67
- const v = f.forwardRef(
68
- ({ className: r, ...i }, n) => /* @__PURE__ */ s(
69
+ x.displayName = "SettingRow";
70
+ const v = d.forwardRef(
71
+ ({ className: i, ...s }, t) => /* @__PURE__ */ e(
69
72
  "div",
70
73
  {
71
- ref: n,
74
+ ref: t,
72
75
  "data-slot": "setting-list",
73
- className: o(
76
+ className: a(
74
77
  "flex w-full flex-col gap-0.5 rounded-xl bg-surface p-1",
75
- r
78
+ i
76
79
  ),
77
- ...i
80
+ ...s
78
81
  }
79
82
  )
80
83
  );
81
84
  v.displayName = "SettingList";
82
85
  export {
83
86
  v as SettingList,
84
- p as SettingRow,
85
- x as settingRowVariants
87
+ x as SettingRow,
88
+ p as settingRowVariants
86
89
  };