@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
@@ -0,0 +1,341 @@
1
+ "use client";
2
+ import { jsxs as i, jsx as t, Fragment as p } from "react/jsx-runtime";
3
+ import * as m from "react";
4
+ import { cn as D } from "../../lib/cn.js";
5
+ import "../../lib/interactive.js";
6
+ import "../../components/ui/tooltip.js";
7
+ import { Button as n } from "../../components/button.js";
8
+ import "../../components/spinner.js";
9
+ import "../../components/reveal.js";
10
+ import { Field as A } from "../../components/field.js";
11
+ import "../../components/typography.js";
12
+ import "../../components/link.js";
13
+ import "../../components/divider.js";
14
+ import "../../components/kbd.js";
15
+ import "../../components/code-block.js";
16
+ import "../../components/setting-row.js";
17
+ import "../../components/file-dropzone.js";
18
+ import "../../components/scroll-area.js";
19
+ import "../../components/stepper.js";
20
+ import "../../components/resizable-panel.js";
21
+ import { LayoutGrid as G, Plus as w, WarningCircle as P, CheckCircle as H, ExternalLink as K } from "../../lib/icons.js";
22
+ import "react-dom";
23
+ import "motion/react";
24
+ import "../../components/ripple.js";
25
+ import { Input as z } from "../../components/input.js";
26
+ import "../../components/input-field.js";
27
+ import "../../components/textarea.js";
28
+ import "../../components/checkbox.js";
29
+ import "../../components/radio.js";
30
+ import "../../components/switch.js";
31
+ import "../../components/number-field.js";
32
+ import { Select as W } from "../../components/select.js";
33
+ import "../../components/autocomplete.js";
34
+ import "../../components/slider.js";
35
+ import "../../components/segmented.js";
36
+ import { Modal as _, ModalHeader as q, ModalTitle as J, ModalBody as h, ModalFooter as f } from "../../components/modal.js";
37
+ import "../../components/drawer.js";
38
+ import "../../components/popover.js";
39
+ import "../../components/dropdown.js";
40
+ import { useToast as Q } from "../../components/toast.js";
41
+ import "../../components/answer.js";
42
+ import "../../components/answer-sources.js";
43
+ import "../../components/card.js";
44
+ import "../../components/carousel.js";
45
+ import "../../components/chart.js";
46
+ import "../../components/connector-card.js";
47
+ import "../../components/infinite-canvas.js";
48
+ import "../../components/table.js";
49
+ import "../../components/tabs.js";
50
+ import "../../components/tree.js";
51
+ import "../../components/accordion.js";
52
+ import "../../components/avatar.js";
53
+ import "../../components/badge.js";
54
+ import "../../components/chip.js";
55
+ import "../../components/timeline.js";
56
+ import "../../components/alert.js";
57
+ import "../../components/pixel-blast-svg.js";
58
+ import "../../components/pixel-icon.js";
59
+ import "../../components/agent-icon.js";
60
+ import "../../components/brand-texture.js";
61
+ import { Progress as U } from "../../components/progress.js";
62
+ import "../../components/progress-circle.js";
63
+ import "../../components/skeleton.js";
64
+ import "../../components/empty-state.js";
65
+ import "../../components/page-header.js";
66
+ import "../../components/navbar.js";
67
+ import "../../components/breadcrumbs.js";
68
+ import "../../components/pagination.js";
69
+ import "../../components/sidebar.js";
70
+ import "../../components/panel.js";
71
+ import "../../components/collapsible.js";
72
+ import "../../components/selection-action-bar.js";
73
+ import "../../components/ai-elements/agent-trace.js";
74
+ import "../../components/ai-elements/chain-of-thought.js";
75
+ import "../../components/ai-elements/chain-of-thought-icon.js";
76
+ import "../../components/ai-elements/chart.js";
77
+ import "../../components/ai-elements/inline-citation.js";
78
+ import "../../components/ai-elements/message.js";
79
+ import "../../components/ai-elements/research-activity.js";
80
+ import "../../components/ai-elements/shimmer.js";
81
+ import "../../components/ai-elements/task.js";
82
+ import "../../components/ai-elements/task-progress.js";
83
+ import "../../components/ai-elements/tool.js";
84
+ import "../../components/ai-elements/voice.js";
85
+ import "@assistant-ui/react";
86
+ import "../../components/assistant-ui/composer.js";
87
+ import "../../components/assistant-ui/answer-tool-ui.js";
88
+ import "../../components/assistant-ui/follow-up-suggestions.js";
89
+ import "../../components/assistant-ui/message.js";
90
+ import "../../components/assistant-ui/selection-toolbar.js";
91
+ import "../../components/ui/button.js";
92
+ import "../../components/assistant-ui/thread-context.js";
93
+ import "../../components/assistant-ui/tooltip-icon-button.js";
94
+ import { suggestedSectionForKind as T, ARTIFACT_DESTINATIONS as V, findDuplicateArtifactBlock as X, saveArtifactBlock as Y } from "../lib/artifact-library.js";
95
+ import "../../components/assistant-ui/composer-add-context.js";
96
+ import "zustand/shallow";
97
+ import "../../components/ui/dialog.js";
98
+ import "radix-ui";
99
+ import "../../components/assistant-ui/composer-deep-research.js";
100
+ import "../../components/assistant-ui/composer-trigger-popover.js";
101
+ import "../../components/assistant-ui/directive-text.js";
102
+ import "../../components/assistant-ui/file.js";
103
+ import "../../components/assistant-ui/image.js";
104
+ import "../../components/assistant-ui/markdown-text.js";
105
+ import "../../components/assistant-ui/quote.js";
106
+ import "../../components/assistant-ui/sources.js";
107
+ import "../../components/assistant-ui/tool-fallback.js";
108
+ import "../../components/assistant-ui/tool-group.js";
109
+ function Xi({
110
+ block: e,
111
+ trigger: x = "button",
112
+ className: g,
113
+ open: S,
114
+ onOpenChange: k
115
+ }) {
116
+ const { toast: I } = Q(), l = V[0], [M, O] = m.useState(!1), v = S ?? M, s = k ?? O, [b, y] = m.useState(e.title), [d, C] = m.useState(
117
+ T(e.kind)
118
+ ), [a, c] = m.useState("idle"), u = m.useRef(null), r = l.sections.find(
119
+ (o) => o.id === d
120
+ );
121
+ m.useEffect(
122
+ () => () => {
123
+ u.current !== null && window.clearTimeout(u.current);
124
+ },
125
+ []
126
+ ), m.useEffect(() => {
127
+ if (!v) {
128
+ c("idle");
129
+ return;
130
+ }
131
+ y(e.title), C(T(e.kind)), c("idle");
132
+ }, [e.kind, e.title, v]);
133
+ const N = () => {
134
+ const o = b.trim() || e.title, L = d, R = (r == null ? void 0 : r.label) ?? "Section";
135
+ c("saving"), u.current = window.setTimeout(() => {
136
+ Y({ ...e, title: o }, L), u.current = null, c("success"), I.success("Added to Artifact", {
137
+ description: `${l.label} · ${R}`
138
+ });
139
+ }, 900);
140
+ }, j = () => {
141
+ if (a === "idle") {
142
+ if (X(e, d)) {
143
+ c("duplicate");
144
+ return;
145
+ }
146
+ N();
147
+ }
148
+ }, F = () => {
149
+ a === "duplicate" && N();
150
+ }, $ = () => {
151
+ s(!1), window.location.hash = `/demo/artifacts-v2/${l.id}`;
152
+ }, B = (o) => {
153
+ !o && a === "saving" || s(o);
154
+ }, E = x === "none" ? null : x === "menu-item" ? /* @__PURE__ */ i(
155
+ "button",
156
+ {
157
+ type: "button",
158
+ onClick: () => s(!0),
159
+ className: D(
160
+ "flex w-full cursor-pointer items-center gap-2 rounded-lg px-2.5 py-1.5 text-left text-xs outline-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent",
161
+ g
162
+ ),
163
+ children: [
164
+ /* @__PURE__ */ t(G, { className: "size-4" }),
165
+ "Add to Artifact"
166
+ ]
167
+ }
168
+ ) : x === "icon" ? /* @__PURE__ */ t(
169
+ n,
170
+ {
171
+ type: "button",
172
+ variant: "ghost",
173
+ size: "icon-xs",
174
+ "aria-label": `Add ${e.title} to Artifact`,
175
+ title: "Add to Artifact",
176
+ onClick: () => s(!0),
177
+ className: g,
178
+ children: /* @__PURE__ */ t(w, {})
179
+ }
180
+ ) : /* @__PURE__ */ t(
181
+ n,
182
+ {
183
+ type: "button",
184
+ variant: "outline",
185
+ size: "xs",
186
+ startContent: /* @__PURE__ */ t(w, {}),
187
+ onClick: () => s(!0),
188
+ className: g,
189
+ children: "Add to Artifact"
190
+ }
191
+ );
192
+ return /* @__PURE__ */ i(p, { children: [
193
+ E,
194
+ /* @__PURE__ */ i(_, { open: v, onOpenChange: B, size: "sm", children: [
195
+ /* @__PURE__ */ t(q, { children: /* @__PURE__ */ t(J, { children: "Add to Artifact" }) }),
196
+ a === "idle" ? /* @__PURE__ */ i(p, { children: [
197
+ /* @__PURE__ */ i(h, { className: "space-y-4", children: [
198
+ /* @__PURE__ */ t(A, { label: "Artifact", children: /* @__PURE__ */ t(z, { value: l.label, readOnly: !0 }) }),
199
+ /* @__PURE__ */ t(A, { label: "Section", children: /* @__PURE__ */ t(
200
+ W,
201
+ {
202
+ items: l.sections.map((o) => ({
203
+ label: o.label,
204
+ value: o.id
205
+ })),
206
+ value: d,
207
+ onChange: C
208
+ }
209
+ ) }),
210
+ /* @__PURE__ */ t(A, { label: "Title", children: /* @__PURE__ */ t(
211
+ z,
212
+ {
213
+ value: b,
214
+ onChange: (o) => y(o.target.value)
215
+ }
216
+ ) }),
217
+ /* @__PURE__ */ t("p", { className: "text-xs text-secondary", children: e.kind === "markdown" ? "The answer will be saved as editable Markdown." : `This will remain a native ${e.kind} card.` })
218
+ ] }),
219
+ /* @__PURE__ */ i(f, { children: [
220
+ /* @__PURE__ */ t(
221
+ n,
222
+ {
223
+ type: "button",
224
+ variant: "ghost",
225
+ size: "sm",
226
+ onClick: () => s(!1),
227
+ children: "Cancel"
228
+ }
229
+ ),
230
+ /* @__PURE__ */ t(n, { type: "button", size: "sm", onClick: j, children: "Add" })
231
+ ] })
232
+ ] }) : a === "duplicate" ? /* @__PURE__ */ i(p, { children: [
233
+ /* @__PURE__ */ t(h, { children: /* @__PURE__ */ i(
234
+ "div",
235
+ {
236
+ className: "flex min-h-56 flex-col items-center justify-center text-center",
237
+ role: "alert",
238
+ children: [
239
+ /* @__PURE__ */ t("div", { className: "mb-5 grid size-14 place-items-center rounded-full bg-warning/10 text-warning", children: /* @__PURE__ */ t(P, { className: "size-7", weight: "fill" }) }),
240
+ /* @__PURE__ */ t("p", { className: "text-sm font-semibold", children: "Already in this section" }),
241
+ /* @__PURE__ */ i("p", { className: "mt-1 max-w-72 text-xs text-secondary", children: [
242
+ "This item has already been added to ",
243
+ (r == null ? void 0 : r.label) ?? "this section",
244
+ " in ",
245
+ l.label,
246
+ "."
247
+ ] })
248
+ ]
249
+ }
250
+ ) }),
251
+ /* @__PURE__ */ i(f, { children: [
252
+ /* @__PURE__ */ t(
253
+ n,
254
+ {
255
+ type: "button",
256
+ variant: "ghost",
257
+ size: "sm",
258
+ onClick: () => c("idle"),
259
+ children: "Go back"
260
+ }
261
+ ),
262
+ /* @__PURE__ */ t(n, { type: "button", size: "sm", onClick: F, children: "Add another copy" })
263
+ ] })
264
+ ] }) : a === "saving" ? /* @__PURE__ */ i(p, { children: [
265
+ /* @__PURE__ */ t(h, { children: /* @__PURE__ */ i(
266
+ "div",
267
+ {
268
+ className: "flex min-h-56 flex-col items-center justify-center text-center",
269
+ "aria-live": "polite",
270
+ children: [
271
+ /* @__PURE__ */ i("p", { className: "text-sm font-semibold", children: [
272
+ "Adding to ",
273
+ l.label
274
+ ] }),
275
+ /* @__PURE__ */ i("p", { className: "mt-1 text-xs text-secondary", children: [
276
+ "Saving in ",
277
+ (r == null ? void 0 : r.label) ?? "Section"
278
+ ] }),
279
+ /* @__PURE__ */ t(
280
+ U,
281
+ {
282
+ isIndeterminate: !0,
283
+ size: "sm",
284
+ label: "Adding to Artifact",
285
+ className: "mt-6 max-w-64"
286
+ }
287
+ )
288
+ ]
289
+ }
290
+ ) }),
291
+ /* @__PURE__ */ t(f, { children: /* @__PURE__ */ t(n, { type: "button", size: "sm", isLoading: !0, disabled: !0, children: "Adding" }) })
292
+ ] }) : /* @__PURE__ */ i(p, { children: [
293
+ /* @__PURE__ */ t(h, { children: /* @__PURE__ */ i(
294
+ "div",
295
+ {
296
+ className: "flex min-h-56 flex-col items-center justify-center text-center",
297
+ role: "status",
298
+ "aria-live": "polite",
299
+ children: [
300
+ /* @__PURE__ */ t("div", { className: "mb-5 grid size-14 place-items-center rounded-full bg-success/10 text-success", children: /* @__PURE__ */ t(H, { className: "size-7", weight: "fill" }) }),
301
+ /* @__PURE__ */ i("p", { className: "text-sm font-semibold", children: [
302
+ "Added to ",
303
+ l.label
304
+ ] }),
305
+ /* @__PURE__ */ i("p", { className: "mt-1 text-xs text-secondary", children: [
306
+ (r == null ? void 0 : r.label) ?? "Section",
307
+ " · ",
308
+ b.trim() || e.title
309
+ ] })
310
+ ]
311
+ }
312
+ ) }),
313
+ /* @__PURE__ */ i(f, { children: [
314
+ /* @__PURE__ */ t(
315
+ n,
316
+ {
317
+ type: "button",
318
+ variant: "ghost",
319
+ size: "sm",
320
+ onClick: () => s(!1),
321
+ children: "Done"
322
+ }
323
+ ),
324
+ /* @__PURE__ */ t(
325
+ n,
326
+ {
327
+ type: "button",
328
+ size: "sm",
329
+ startContent: /* @__PURE__ */ t(K, {}),
330
+ onClick: $,
331
+ children: "Open artifact"
332
+ }
333
+ )
334
+ ] })
335
+ ] })
336
+ ] })
337
+ ] });
338
+ }
339
+ export {
340
+ Xi as AddToArtifact
341
+ };
@@ -0,0 +1,134 @@
1
+ "use client";
2
+ const g = "ads:artifact-blocks-changed", w = [
3
+ {
4
+ id: "revenue-performance",
5
+ label: "Revenue performance",
6
+ sections: [
7
+ { id: "section-metrics", label: "Executive metrics" },
8
+ { id: "section-story", label: "Revenue story" },
9
+ { id: "section-table", label: "Regional performance" }
10
+ ]
11
+ }
12
+ ], m = "ads-demo.artifacts-v2.saved-blocks.v1";
13
+ function S(t) {
14
+ return t === "metric" ? "section-metrics" : t === "table" ? "section-table" : "section-story";
15
+ }
16
+ function h() {
17
+ if (typeof window > "u") return [];
18
+ try {
19
+ const t = window.localStorage.getItem(m);
20
+ return t ? JSON.parse(t) : [];
21
+ } catch {
22
+ return [];
23
+ }
24
+ }
25
+ function A(t, r) {
26
+ const e = {
27
+ ...t,
28
+ id: `saved-${t.kind}-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`,
29
+ artifactId: "revenue-performance",
30
+ sectionId: r,
31
+ addedBy: "Himanshu Verma",
32
+ addedAt: (/* @__PURE__ */ new Date()).toISOString()
33
+ }, n = [...h(), e];
34
+ return window.localStorage.setItem(m, JSON.stringify(n)), window.dispatchEvent(
35
+ new CustomEvent(g, { detail: e })
36
+ ), e;
37
+ }
38
+ function p(t) {
39
+ const r = {
40
+ kind: t.kind,
41
+ source: t.source,
42
+ markdown: t.markdown,
43
+ value: t.value,
44
+ change: t.change,
45
+ chart: t.chart,
46
+ table: t.table
47
+ }, e = Object.values(r).some(
48
+ (n) => n !== void 0 && n !== ""
49
+ );
50
+ return JSON.stringify(
51
+ e ? r : { ...r, title: t.title.trim() }
52
+ );
53
+ }
54
+ function b(t, r) {
55
+ const e = p(t);
56
+ return h().find(
57
+ (n) => n.artifactId === "revenue-performance" && n.sectionId === r && p(n) === e
58
+ );
59
+ }
60
+ function c(t) {
61
+ return t.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").replace(/^./, (r) => r.toUpperCase());
62
+ }
63
+ function f(t) {
64
+ return !!t && typeof t == "object" && !Array.isArray(t);
65
+ }
66
+ function u(t) {
67
+ return t == null ? "—" : Array.isArray(t) ? t.map(u).join(" · ") : f(t) ? Object.entries(t).map(([r, e]) => `${c(r)}: ${u(e)}`).join("; ") : String(t).replace(/\|/g, "\\|").replace(/\r?\n/g, " ");
68
+ }
69
+ function l(t, r, e) {
70
+ const n = Array.from(
71
+ new Set(e.flatMap((i) => Object.keys(i)))
72
+ );
73
+ n.length && (t.push(`## ${c(r)}`), t.push(`| ${n.map(c).join(" | ")} |`), t.push(`| ${n.map(() => "---").join(" | ")} |`), e.forEach((i) => {
74
+ t.push(`| ${n.map((o) => u(i[o])).join(" | ")} |`);
75
+ }), t.push(""));
76
+ }
77
+ function y(t) {
78
+ const r = [t.headline, t.title, t.label].find(
79
+ (i) => typeof i == "string" && i.length > 0
80
+ ), e = r ? [`# ${r}`, ""] : [], n = /* @__PURE__ */ new Set([
81
+ "headline",
82
+ "title",
83
+ "label",
84
+ "kind",
85
+ "tone",
86
+ "chart",
87
+ "sources",
88
+ "followUps"
89
+ ]);
90
+ return Object.entries(t).forEach(([i, o]) => {
91
+ if (!(n.has(i) || o == null)) {
92
+ if (typeof o == "string") {
93
+ e.push(o, "");
94
+ return;
95
+ }
96
+ if (Array.isArray(o)) {
97
+ const s = o.filter(f);
98
+ if (s.length === o.length && s.length > 0) {
99
+ l(e, i, s);
100
+ return;
101
+ }
102
+ const d = o.filter(
103
+ (a) => typeof a == "string" || typeof a == "number"
104
+ );
105
+ d.length && (e.push(`## ${c(i)}`), d.forEach((a) => e.push(`- ${String(a)}`)), e.push(""));
106
+ return;
107
+ }
108
+ if (f(o)) {
109
+ l(e, i, [o]);
110
+ return;
111
+ }
112
+ (typeof o == "number" || typeof o == "boolean") && e.push(`**${c(i)}:** ${String(o)}`, "");
113
+ }
114
+ }), e.join(`
115
+ `).trim();
116
+ }
117
+ function $(t) {
118
+ return t.map((e) => {
119
+ if (!e || typeof e != "object") return "";
120
+ const n = e;
121
+ return n.type === "text" && typeof n.text == "string" ? n.text : n.type === "tool-call" && n.args && typeof n.args == "object" ? y(n.args) : "";
122
+ }).filter(Boolean).join(`
123
+
124
+ `).trim() || "Saved answer";
125
+ }
126
+ export {
127
+ g as ARTIFACT_BLOCKS_CHANGED,
128
+ w as ARTIFACT_DESTINATIONS,
129
+ $ as assistantPartsToMarkdown,
130
+ b as findDuplicateArtifactBlock,
131
+ h as readSavedArtifactBlocks,
132
+ A as saveArtifactBlock,
133
+ S as suggestedSectionForKind
134
+ };
package/fonts.css CHANGED
@@ -1,22 +1,22 @@
1
1
  /* @actioneer/ads — generated by scripts/build-lib-styles.mjs. Do not edit. */
2
- /* Aribau Grotesk — ADS 1.0 brand typeface.
3
- TWO weights only: Regular (400) and Semibold (600). Use `font-normal` and
4
- `font-semibold` — there is NO dedicated bold face, so never reach for
5
- `font-bold` (it would just fold onto the 600 file). The weight RANGES map
6
- Tailwind's utilities onto the two physical files:
7
- `font-normal` → Regular (100–500), `font-semibold` → Semibold (600–900).
8
- `font-synthesis-weight: none` (set in index.css) prevents faux weights. */
2
+ /* Aribau Grotesk — ADS UI typeface.
3
+ TWO physical faces, both served compressed (woff2):
4
+ • Regular → `font-normal` (weight 100–499)
5
+ • Medium → `font-medium` (weight 500)
6
+ There is NO semibold or bold face. The broad face range keeps legacy
7
+ consumers on the real Medium file, while ADS source uses only 400 and 500.
8
+ `font-synthesis-weight: none` (index.css) blocks faux bolding. */
9
9
  @font-face {
10
10
  font-family: "Aribau Grotesk";
11
- src: url("./fonts/aribau-grotesk-400.otf") format("opentype");
12
- font-weight: 100 500;
11
+ src: url("./fonts/aribau-grotesk-regular.woff2") format("woff2");
12
+ font-weight: 100 499;
13
13
  font-style: normal;
14
14
  font-display: swap;
15
15
  }
16
16
  @font-face {
17
17
  font-family: "Aribau Grotesk";
18
- src: url("./fonts/aribau-grotesk-600.woff2") format("woff2");
19
- font-weight: 600 900;
18
+ src: url("./fonts/aribau-grotesk-medium.woff2") format("woff2");
19
+ font-weight: 500 900;
20
20
  font-style: normal;
21
21
  font-display: swap;
22
22
  }
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import * as o from "react";
2
+ import * as l from "react";
3
3
  import { useMotionValue as m, useMotionValueEvent as p, animate as f } from "motion/react";
4
- import { EASE_OUT as g } from "../../lib/motion.js";
4
+ import { springEffect as g } from "../../lib/motion.js";
5
5
  const h = {
6
6
  idle: { speed: 8, scale: 0.2, amplitude: 1.2, frequency: 0.4, brightness: 1 },
7
7
  connecting: { speed: 30, scale: 0.3, amplitude: 0.5, frequency: 1, brightness: 2 },
@@ -14,20 +14,21 @@ const h = {
14
14
  function d(n) {
15
15
  return Math.min(1, Math.max(0, n));
16
16
  }
17
- function c(n) {
18
- const [r, t] = o.useState(n), e = m(n), a = o.useRef(null);
17
+ function o(n) {
18
+ const [r, t] = l.useState(n), e = m(n), a = l.useRef(null);
19
19
  p(e, "change", t);
20
- const u = o.useCallback(
21
- (s, l) => {
20
+ const u = l.useCallback(
21
+ (s, c) => {
22
22
  var i;
23
- (i = a.current) == null || i.stop(), a.current = f(e, s, {
24
- duration: l ? 0 : 0.2,
25
- ease: g
26
- });
23
+ (i = a.current) == null || i.stop(), a.current = f(
24
+ e,
25
+ s,
26
+ c ? { duration: 0 } : g
27
+ );
27
28
  },
28
29
  [e]
29
30
  );
30
- return o.useEffect(() => () => {
31
+ return l.useEffect(() => () => {
31
32
  var s;
32
33
  return (s = a.current) == null ? void 0 : s.stop();
33
34
  }, []), { value: r, animateTo: u };
@@ -37,16 +38,16 @@ function y({
37
38
  volume: r = 0,
38
39
  reduced: t = !1
39
40
  }) {
40
- const e = h[n], a = c(e.scale), u = c(e.amplitude), s = c(e.frequency), l = c(e.brightness);
41
- o.useEffect(() => {
42
- a.animateTo(e.scale, t), u.animateTo(e.amplitude, t), s.animateTo(e.frequency, t), l.animateTo(e.brightness, t);
41
+ const e = h[n], a = o(e.scale), u = o(e.amplitude), s = o(e.frequency), c = o(e.brightness);
42
+ l.useEffect(() => {
43
+ a.animateTo(e.scale, t), u.animateTo(e.amplitude, t), s.animateTo(e.frequency, t), c.animateTo(e.brightness, t);
43
44
  }, [
44
45
  e,
45
46
  t,
46
47
  a.animateTo,
47
48
  u.animateTo,
48
49
  s.animateTo,
49
- l.animateTo
50
+ c.animateTo
50
51
  ]);
51
52
  const i = !t && (n === "listening" || n === "speaking") ? d(r) : 0;
52
53
  return {
@@ -54,7 +55,7 @@ function y({
54
55
  scale: a.value + i * 0.18,
55
56
  amplitude: u.value + i * 0.35,
56
57
  frequency: s.value,
57
- brightness: l.value + i * 0.4
58
+ brightness: c.value + i * 0.4
58
59
  };
59
60
  }
60
61
  export {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import * as c from "react";
3
3
  import { useMotionValue as l, useMotionValueEvent as r, animate as f } from "motion/react";
4
- import { EASE_OUT as y } from "../../lib/motion.js";
4
+ import { springEffect as y } from "../../lib/motion.js";
5
5
  const d = {
6
6
  idle: { speed: 2, amplitude: 6e-3, frequency: 8, opacity: 0.35 },
7
7
  connecting: { speed: 20, amplitude: 6e-3, frequency: 40, opacity: 0.7 },
@@ -15,46 +15,47 @@ function q(t) {
15
15
  return Math.min(1, Math.max(0, t));
16
16
  }
17
17
  function s(t) {
18
- const [p, a] = c.useState(t), e = l(t), i = c.useRef(null);
19
- r(e, "change", a);
18
+ const [p, n] = c.useState(t), e = l(t), i = c.useRef(null);
19
+ r(e, "change", n);
20
20
  const o = c.useCallback(
21
- (n, u) => {
21
+ (a, u) => {
22
22
  var m;
23
- (m = i.current) == null || m.stop(), i.current = f(e, n, {
24
- duration: u ? 0 : 0.2,
25
- ease: y
26
- });
23
+ (m = i.current) == null || m.stop(), i.current = f(
24
+ e,
25
+ a,
26
+ u ? { duration: 0 } : y
27
+ );
27
28
  },
28
29
  [e]
29
30
  );
30
31
  return c.useEffect(() => () => {
31
- var n;
32
- return (n = i.current) == null ? void 0 : n.stop();
32
+ var a;
33
+ return (a = i.current) == null ? void 0 : a.stop();
33
34
  }, []), { value: p, animateTo: o };
34
35
  }
35
- function E({
36
+ function v({
36
37
  state: t = "idle",
37
38
  volume: p = 0,
38
- reduced: a = !1
39
+ reduced: n = !1
39
40
  }) {
40
- const e = d[t], i = s(e.amplitude), o = s(e.frequency), n = s(e.opacity);
41
+ const e = d[t], i = s(e.amplitude), o = s(e.frequency), a = s(e.opacity);
41
42
  c.useEffect(() => {
42
- i.animateTo(e.amplitude, a), o.animateTo(e.frequency, a), n.animateTo(e.opacity, a);
43
+ i.animateTo(e.amplitude, n), o.animateTo(e.frequency, n), a.animateTo(e.opacity, n);
43
44
  }, [
44
45
  e,
45
- a,
46
+ n,
46
47
  i.animateTo,
47
48
  o.animateTo,
48
- n.animateTo
49
+ a.animateTo
49
50
  ]);
50
- const u = !a && (t === "listening" || t === "speaking") ? q(p) : 0;
51
+ const u = !n && (t === "listening" || t === "speaking") ? q(p) : 0;
51
52
  return {
52
- speed: a ? 0 : e.speed,
53
+ speed: n ? 0 : e.speed,
53
54
  amplitude: i.value + u * 0.22,
54
55
  frequency: o.value + u * 60,
55
- opacity: Math.min(1, n.value + u * 0.35)
56
+ opacity: Math.min(1, a.value + u * 0.35)
56
57
  };
57
58
  }
58
59
  export {
59
- E as useAgentAudioVisualizerWave
60
+ v as useAgentAudioVisualizerWave
60
61
  };
package/lib/icons.d.ts CHANGED
@@ -409,6 +409,10 @@ export declare const Play: React.ForwardRefExoticComponent<Omit<import('@phospho
409
409
  /** Legacy Hugeicons prop — `>= 2` maps to weight="bold", else ignored. */
410
410
  strokeWidth?: number;
411
411
  } & React.RefAttributes<SVGSVGElement>>;
412
+ export declare const Presentation: React.ForwardRefExoticComponent<Omit<import('@phosphor-icons/react').IconProps, "ref"> & {
413
+ /** Legacy Hugeicons prop — `>= 2` maps to weight="bold", else ignored. */
414
+ strokeWidth?: number;
415
+ } & React.RefAttributes<SVGSVGElement>>;
412
416
  export declare const Pause: React.ForwardRefExoticComponent<Omit<import('@phosphor-icons/react').IconProps, "ref"> & {
413
417
  /** Legacy Hugeicons prop — `>= 2` maps to weight="bold", else ignored. */
414
418
  strokeWidth?: number;