@actioneer/ads 0.5.8 → 0.6.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 (40) hide show
  1. package/components/assistant-ui/composer-harness.js +12 -10
  2. package/components/avatar.d.ts +1 -0
  3. package/components/avatar.js +5 -4
  4. package/components/breadcrumbs.d.ts +3 -1
  5. package/components/breadcrumbs.js +62 -56
  6. package/components/button.js +11 -11
  7. package/components/card.js +19 -18
  8. package/components/chart.d.ts +6 -0
  9. package/components/chart.js +747 -657
  10. package/components/date-range-picker.d.ts +25 -0
  11. package/components/date-range-picker.js +187 -0
  12. package/components/drawer.d.ts +3 -1
  13. package/components/drawer.js +115 -95
  14. package/components/index.d.ts +1 -0
  15. package/components/index.js +499 -497
  16. package/components/modal.d.ts +5 -1
  17. package/components/modal.js +74 -61
  18. package/components/panel.js +31 -28
  19. package/components/pixel-icon.d.ts +4 -0
  20. package/components/pixel-icon.js +210 -163
  21. package/components/segmented.d.ts +1 -0
  22. package/components/segmented.js +31 -28
  23. package/components/select.d.ts +5 -0
  24. package/components/select.js +177 -132
  25. package/components/table.d.ts +7 -0
  26. package/components/table.js +183 -173
  27. package/components/tabs.js +1 -1
  28. package/components/tree.js +86 -58
  29. package/components/viz-charts.js +186 -183
  30. package/demo/components/add-to-artifact.js +131 -107
  31. package/demo/lib/artifact-library.js +37 -29
  32. package/demo/lib/artifact-pin-guard.js +12 -0
  33. package/fonts.css +2 -0
  34. package/lib/icons.d.ts +20 -0
  35. package/lib/icons.js +112 -107
  36. package/llms.txt +23 -3
  37. package/manifest.json +13774 -14
  38. package/package.json +4 -1
  39. package/styles.css +76 -60
  40. package/theme.css +70 -57
@@ -1,13 +1,13 @@
1
1
  "use client";
2
- import { jsxs as i, jsx as t, Fragment as p } from "react/jsx-runtime";
2
+ import { jsxs as e, jsx as t, Fragment as p } from "react/jsx-runtime";
3
3
  import * as m from "react";
4
- import { cn as D } from "../../lib/cn.js";
4
+ import { cn as _ } from "../../lib/cn.js";
5
5
  import "../../lib/interactive.js";
6
6
  import "../../components/ui/tooltip.js";
7
- import { Button as n } from "../../components/button.js";
7
+ import { Button as s } from "../../components/button.js";
8
8
  import "../../components/spinner.js";
9
9
  import "../../components/reveal.js";
10
- import { Field as A } from "../../components/field.js";
10
+ import { Field as C } from "../../components/field.js";
11
11
  import "../../components/typography.js";
12
12
  import "../../components/link.js";
13
13
  import "../../components/divider.js";
@@ -18,11 +18,11 @@ import "../../components/file-dropzone.js";
18
18
  import "../../components/scroll-area.js";
19
19
  import "../../components/stepper.js";
20
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";
21
+ import { LayoutGrid as H, Plus as S, WarningCircle as K, CheckCircle as U, ExternalLink as V } from "../../lib/icons.js";
22
22
  import "react-dom";
23
23
  import "motion/react";
24
24
  import "../../components/ripple.js";
25
- import { Input as z } from "../../components/input.js";
25
+ import { Input as I } from "../../components/input.js";
26
26
  import "../../components/input-field.js";
27
27
  import "../../components/textarea.js";
28
28
  import "../../components/checkbox.js";
@@ -30,14 +30,16 @@ import "../../components/radio.js";
30
30
  import "../../components/switch.js";
31
31
  import "../../components/number-field.js";
32
32
  import { Select as W } from "../../components/select.js";
33
+ import "@internationalized/date";
34
+ import "react-aria-components";
33
35
  import "../../components/autocomplete.js";
34
36
  import "../../components/slider.js";
35
37
  import "../../components/segmented.js";
36
- import { Modal as _, ModalHeader as q, ModalTitle as J, ModalBody as h, ModalFooter as f } from "../../components/modal.js";
38
+ import { Modal as q, ModalHeader as J, ModalTitle as Q, ModalBody as x, ModalFooter as g } from "../../components/modal.js";
37
39
  import "../../components/drawer.js";
38
40
  import "../../components/popover.js";
39
41
  import "../../components/dropdown.js";
40
- import { useToast as Q } from "../../components/toast.js";
42
+ import { useToast as X } from "../../components/toast.js";
41
43
  import "../../components/answer.js";
42
44
  import "../../components/answer-sources.js";
43
45
  import "../../components/card.js";
@@ -58,7 +60,7 @@ import "../../components/pixel-blast-svg.js";
58
60
  import "../../components/pixel-icon.js";
59
61
  import "../../components/agent-icon.js";
60
62
  import "../../components/brand-texture.js";
61
- import { Progress as U } from "../../components/progress.js";
63
+ import { Progress as Y } from "../../components/progress.js";
62
64
  import "../../components/progress-circle.js";
63
65
  import "../../components/skeleton.js";
64
66
  import "../../components/empty-state.js";
@@ -91,7 +93,8 @@ import "../../components/assistant-ui/selection-toolbar.js";
91
93
  import "../../components/ui/button.js";
92
94
  import "../../components/assistant-ui/thread-context.js";
93
95
  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";
96
+ import { suggestedSectionForKind as M, ARTIFACT_DESTINATIONS as Z, findDuplicateArtifactBlock as tt, saveArtifactBlock as et } from "../lib/artifact-library.js";
97
+ import { validateArtifactPinBlock as it, PIN_GUARD_MESSAGE as b } from "../lib/artifact-pin-guard.js";
95
98
  import "../../components/assistant-ui/composer-add-context.js";
96
99
  import "zustand/shallow";
97
100
  import "../../components/ui/dialog.js";
@@ -106,141 +109,162 @@ import "../../components/assistant-ui/quote.js";
106
109
  import "../../components/assistant-ui/sources.js";
107
110
  import "../../components/assistant-ui/tool-fallback.js";
108
111
  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
112
+ function oi({
113
+ block: i,
114
+ trigger: v = "button",
115
+ className: A,
116
+ open: O,
117
+ onOpenChange: E
115
118
  }) {
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
119
+ const { toast: N } = X(), l = Z[0], r = m.useMemo(
120
+ () => it(i),
121
+ [i]
122
+ ), [j, B] = m.useState(!1), u = O ?? j, c = E ?? B, [y, w] = m.useState(i.title), [f, z] = m.useState(
123
+ M(i.kind)
124
+ ), [d, a] = m.useState("idle"), h = m.useRef(null), o = l.sections.find(
125
+ (n) => n.id === f
120
126
  );
121
127
  m.useEffect(
122
128
  () => () => {
123
- u.current !== null && window.clearTimeout(u.current);
129
+ h.current !== null && window.clearTimeout(h.current);
124
130
  },
125
131
  []
126
132
  ), m.useEffect(() => {
127
- if (!v) {
128
- c("idle");
133
+ if (!u) {
134
+ a("idle");
129
135
  return;
130
136
  }
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}`
137
+ w(i.title), z(M(i.kind)), a("idle");
138
+ }, [i.kind, i.title, u]);
139
+ const k = () => {
140
+ if (!r.ok) {
141
+ a("blocked"), N.danger("Cannot pin this answer", {
142
+ description: r.message ?? b
143
+ });
144
+ return;
145
+ }
146
+ c(!0);
147
+ }, T = () => {
148
+ if (!r.ok) {
149
+ a("blocked");
150
+ return;
151
+ }
152
+ const n = y.trim() || i.title, L = f, P = (o == null ? void 0 : o.label) ?? "Section";
153
+ a("saving"), h.current = window.setTimeout(() => {
154
+ et({ ...i, title: n }, L), h.current = null, a("success"), N.success("Added to Artifact", {
155
+ description: `${l.label} · ${P}`
138
156
  });
139
157
  }, 900);
140
- }, j = () => {
141
- if (a === "idle") {
142
- if (X(e, d)) {
143
- c("duplicate");
158
+ }, F = () => {
159
+ if (!(d !== "idle" || !r.ok)) {
160
+ if (tt(i, f)) {
161
+ a("duplicate");
144
162
  return;
145
163
  }
146
- N();
164
+ T();
147
165
  }
148
- }, F = () => {
149
- a === "duplicate" && N();
166
+ }, R = () => {
167
+ d !== "duplicate" || !r.ok || T();
150
168
  }, $ = () => {
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(
169
+ c(!1), window.location.hash = `/demo/artifacts-v2/${l.id}`;
170
+ }, D = (n) => {
171
+ !n && d === "saving" || c(n);
172
+ }, G = v === "none" ? null : v === "menu-item" ? /* @__PURE__ */ e(
155
173
  "button",
156
174
  {
157
175
  type: "button",
158
- onClick: () => s(!0),
159
- className: D(
176
+ disabled: !r.ok,
177
+ onClick: k,
178
+ className: _(
160
179
  "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
180
+ !r.ok && "cursor-not-allowed opacity-50",
181
+ A
162
182
  ),
163
183
  children: [
164
- /* @__PURE__ */ t(G, { className: "size-4" }),
184
+ /* @__PURE__ */ t(H, { className: "size-4" }),
165
185
  "Add to Artifact"
166
186
  ]
167
187
  }
168
- ) : x === "icon" ? /* @__PURE__ */ t(
169
- n,
188
+ ) : v === "icon" ? /* @__PURE__ */ t(
189
+ s,
170
190
  {
171
191
  type: "button",
172
192
  variant: "ghost",
173
193
  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, {})
194
+ "aria-label": `Add ${i.title} to Artifact`,
195
+ title: r.ok ? "Add to Artifact" : r.message ?? b,
196
+ disabled: !r.ok,
197
+ onClick: k,
198
+ className: A,
199
+ children: /* @__PURE__ */ t(S, {})
179
200
  }
180
201
  ) : /* @__PURE__ */ t(
181
- n,
202
+ s,
182
203
  {
183
204
  type: "button",
184
205
  variant: "outline",
185
206
  size: "xs",
186
- startContent: /* @__PURE__ */ t(w, {}),
187
- onClick: () => s(!0),
188
- className: g,
207
+ startContent: /* @__PURE__ */ t(S, {}),
208
+ disabled: !r.ok,
209
+ title: r.ok ? void 0 : r.message ?? b,
210
+ onClick: k,
211
+ className: A,
189
212
  children: "Add to Artifact"
190
213
  }
191
214
  );
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(
215
+ return /* @__PURE__ */ e(p, { children: [
216
+ G,
217
+ d === "blocked" && !u ? /* @__PURE__ */ t("p", { className: "mt-2 text-xs text-danger", role: "alert", children: r.message ?? b }) : null,
218
+ /* @__PURE__ */ e(q, { open: u, onOpenChange: D, size: "sm", children: [
219
+ /* @__PURE__ */ t(J, { children: /* @__PURE__ */ t(Q, { children: "Add to Artifact" }) }),
220
+ d === "idle" ? /* @__PURE__ */ e(p, { children: [
221
+ /* @__PURE__ */ e(x, { className: "space-y-4", children: [
222
+ /* @__PURE__ */ t(C, { label: "Artifact", children: /* @__PURE__ */ t(I, { value: l.label, readOnly: !0 }) }),
223
+ /* @__PURE__ */ t(C, { label: "Section", children: /* @__PURE__ */ t(
200
224
  W,
201
225
  {
202
- items: l.sections.map((o) => ({
203
- label: o.label,
204
- value: o.id
226
+ items: l.sections.map((n) => ({
227
+ label: n.label,
228
+ value: n.id
205
229
  })),
206
- value: d,
207
- onChange: C
230
+ value: f,
231
+ onChange: z
208
232
  }
209
233
  ) }),
210
- /* @__PURE__ */ t(A, { label: "Title", children: /* @__PURE__ */ t(
211
- z,
234
+ /* @__PURE__ */ t(C, { label: "Title", children: /* @__PURE__ */ t(
235
+ I,
212
236
  {
213
- value: b,
214
- onChange: (o) => y(o.target.value)
237
+ value: y,
238
+ onChange: (n) => w(n.target.value)
215
239
  }
216
240
  ) }),
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.` })
241
+ /* @__PURE__ */ t("p", { className: "text-xs text-secondary", children: i.kind === "markdown" ? "The answer will be saved as editable Markdown." : `This will remain a native ${i.kind} card.` })
218
242
  ] }),
219
- /* @__PURE__ */ i(f, { children: [
243
+ /* @__PURE__ */ e(g, { children: [
220
244
  /* @__PURE__ */ t(
221
- n,
245
+ s,
222
246
  {
223
247
  type: "button",
224
248
  variant: "ghost",
225
249
  size: "sm",
226
- onClick: () => s(!1),
250
+ onClick: () => c(!1),
227
251
  children: "Cancel"
228
252
  }
229
253
  ),
230
- /* @__PURE__ */ t(n, { type: "button", size: "sm", onClick: j, children: "Add" })
254
+ /* @__PURE__ */ t(s, { type: "button", size: "sm", onClick: F, children: "Add" })
231
255
  ] })
232
- ] }) : a === "duplicate" ? /* @__PURE__ */ i(p, { children: [
233
- /* @__PURE__ */ t(h, { children: /* @__PURE__ */ i(
256
+ ] }) : d === "duplicate" ? /* @__PURE__ */ e(p, { children: [
257
+ /* @__PURE__ */ t(x, { children: /* @__PURE__ */ e(
234
258
  "div",
235
259
  {
236
260
  className: "flex min-h-56 flex-col items-center justify-center text-center",
237
261
  role: "alert",
238
262
  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" }) }),
263
+ /* @__PURE__ */ t("div", { className: "mb-5 grid size-14 place-items-center rounded-full bg-warning/10 text-warning", children: /* @__PURE__ */ t(K, { className: "size-7", weight: "fill" }) }),
240
264
  /* @__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: [
265
+ /* @__PURE__ */ e("p", { className: "mt-1 max-w-72 text-xs text-secondary", children: [
242
266
  "This item has already been added to ",
243
- (r == null ? void 0 : r.label) ?? "this section",
267
+ (o == null ? void 0 : o.label) ?? "this section",
244
268
  " in ",
245
269
  l.label,
246
270
  "."
@@ -248,36 +272,36 @@ function Xi({
248
272
  ]
249
273
  }
250
274
  ) }),
251
- /* @__PURE__ */ i(f, { children: [
275
+ /* @__PURE__ */ e(g, { children: [
252
276
  /* @__PURE__ */ t(
253
- n,
277
+ s,
254
278
  {
255
279
  type: "button",
256
280
  variant: "ghost",
257
281
  size: "sm",
258
- onClick: () => c("idle"),
282
+ onClick: () => a("idle"),
259
283
  children: "Go back"
260
284
  }
261
285
  ),
262
- /* @__PURE__ */ t(n, { type: "button", size: "sm", onClick: F, children: "Add another copy" })
286
+ /* @__PURE__ */ t(s, { type: "button", size: "sm", onClick: R, children: "Add another copy" })
263
287
  ] })
264
- ] }) : a === "saving" ? /* @__PURE__ */ i(p, { children: [
265
- /* @__PURE__ */ t(h, { children: /* @__PURE__ */ i(
288
+ ] }) : d === "saving" ? /* @__PURE__ */ e(p, { children: [
289
+ /* @__PURE__ */ t(x, { children: /* @__PURE__ */ e(
266
290
  "div",
267
291
  {
268
292
  className: "flex min-h-56 flex-col items-center justify-center text-center",
269
293
  "aria-live": "polite",
270
294
  children: [
271
- /* @__PURE__ */ i("p", { className: "text-sm font-semibold", children: [
295
+ /* @__PURE__ */ e("p", { className: "text-sm font-semibold", children: [
272
296
  "Adding to ",
273
297
  l.label
274
298
  ] }),
275
- /* @__PURE__ */ i("p", { className: "mt-1 text-xs text-secondary", children: [
299
+ /* @__PURE__ */ e("p", { className: "mt-1 text-xs text-secondary", children: [
276
300
  "Saving in ",
277
- (r == null ? void 0 : r.label) ?? "Section"
301
+ (o == null ? void 0 : o.label) ?? "Section"
278
302
  ] }),
279
303
  /* @__PURE__ */ t(
280
- U,
304
+ Y,
281
305
  {
282
306
  isIndeterminate: !0,
283
307
  size: "sm",
@@ -288,45 +312,45 @@ function Xi({
288
312
  ]
289
313
  }
290
314
  ) }),
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(
315
+ /* @__PURE__ */ t(g, { children: /* @__PURE__ */ t(s, { type: "button", size: "sm", isLoading: !0, disabled: !0, children: "Adding" }) })
316
+ ] }) : /* @__PURE__ */ e(p, { children: [
317
+ /* @__PURE__ */ t(x, { children: /* @__PURE__ */ e(
294
318
  "div",
295
319
  {
296
320
  className: "flex min-h-56 flex-col items-center justify-center text-center",
297
321
  role: "status",
298
322
  "aria-live": "polite",
299
323
  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: [
324
+ /* @__PURE__ */ t("div", { className: "mb-5 grid size-14 place-items-center rounded-full bg-success/10 text-success", children: /* @__PURE__ */ t(U, { className: "size-7", weight: "fill" }) }),
325
+ /* @__PURE__ */ e("p", { className: "text-sm font-semibold", children: [
302
326
  "Added to ",
303
327
  l.label
304
328
  ] }),
305
- /* @__PURE__ */ i("p", { className: "mt-1 text-xs text-secondary", children: [
306
- (r == null ? void 0 : r.label) ?? "Section",
329
+ /* @__PURE__ */ e("p", { className: "mt-1 text-xs text-secondary", children: [
330
+ (o == null ? void 0 : o.label) ?? "Section",
307
331
  " · ",
308
- b.trim() || e.title
332
+ y.trim() || i.title
309
333
  ] })
310
334
  ]
311
335
  }
312
336
  ) }),
313
- /* @__PURE__ */ i(f, { children: [
337
+ /* @__PURE__ */ e(g, { children: [
314
338
  /* @__PURE__ */ t(
315
- n,
339
+ s,
316
340
  {
317
341
  type: "button",
318
342
  variant: "ghost",
319
343
  size: "sm",
320
- onClick: () => s(!1),
344
+ onClick: () => c(!1),
321
345
  children: "Done"
322
346
  }
323
347
  ),
324
348
  /* @__PURE__ */ t(
325
- n,
349
+ s,
326
350
  {
327
351
  type: "button",
328
352
  size: "sm",
329
- startContent: /* @__PURE__ */ t(K, {}),
353
+ startContent: /* @__PURE__ */ t(V, {}),
330
354
  onClick: $,
331
355
  children: "Open artifact"
332
356
  }
@@ -337,5 +361,5 @@ function Xi({
337
361
  ] });
338
362
  }
339
363
  export {
340
- Xi as AddToArtifact
364
+ oi as AddToArtifact
341
365
  };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- const g = "ads:artifact-blocks-changed", w = [
2
+ const g = "ads:artifact-blocks-changed", m = "ads-demo.artifacts-v2.saved-blocks.v1", w = [
3
3
  {
4
4
  id: "revenue-performance",
5
5
  label: "Revenue performance",
@@ -9,8 +9,8 @@ const g = "ads:artifact-blocks-changed", w = [
9
9
  { id: "section-table", label: "Regional performance" }
10
10
  ]
11
11
  }
12
- ], m = "ads-demo.artifacts-v2.saved-blocks.v1";
13
- function S(t) {
12
+ ];
13
+ function A(t) {
14
14
  return t === "metric" ? "section-metrics" : t === "table" ? "section-table" : "section-story";
15
15
  }
16
16
  function h() {
@@ -22,7 +22,7 @@ function h() {
22
22
  return [];
23
23
  }
24
24
  }
25
- function A(t, r) {
25
+ function S(t, r) {
26
26
  const e = {
27
27
  ...t,
28
28
  id: `saved-${t.kind}-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`,
@@ -43,7 +43,14 @@ function p(t) {
43
43
  value: t.value,
44
44
  change: t.change,
45
45
  chart: t.chart,
46
- table: t.table
46
+ table: t.table,
47
+ tableOrigin: t.tableOrigin,
48
+ connectorIds: t.connectorIds,
49
+ semanticTableId: t.semanticTableId,
50
+ semanticTableName: t.semanticTableName,
51
+ sql: t.sql,
52
+ answerLabel: t.answerLabel,
53
+ sqlQueryCount: t.sqlQueryCount
47
54
  }, e = Object.values(r).some(
48
55
  (n) => n !== void 0 && n !== ""
49
56
  );
@@ -57,26 +64,26 @@ function b(t, r) {
57
64
  (n) => n.artifactId === "revenue-performance" && n.sectionId === r && p(n) === e
58
65
  );
59
66
  }
60
- function c(t) {
67
+ function a(t) {
61
68
  return t.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").replace(/^./, (r) => r.toUpperCase());
62
69
  }
63
70
  function f(t) {
64
71
  return !!t && typeof t == "object" && !Array.isArray(t);
65
72
  }
66
73
  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, " ");
74
+ return t == null ? "—" : Array.isArray(t) ? t.map(u).join(" · ") : f(t) ? Object.entries(t).map(([r, e]) => `${a(r)}: ${u(e)}`).join("; ") : String(t).replace(/\|/g, "\\|").replace(/\r?\n/g, " ");
68
75
  }
69
76
  function l(t, r, e) {
70
77
  const n = Array.from(
71
- new Set(e.flatMap((i) => Object.keys(i)))
78
+ new Set(e.flatMap((o) => Object.keys(o)))
72
79
  );
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(" | ")} |`);
80
+ n.length && (t.push(`## ${a(r)}`), t.push(`| ${n.map(a).join(" | ")} |`), t.push(`| ${n.map(() => "---").join(" | ")} |`), e.forEach((o) => {
81
+ t.push(`| ${n.map((i) => u(o[i])).join(" | ")} |`);
75
82
  }), t.push(""));
76
83
  }
77
84
  function y(t) {
78
85
  const r = [t.headline, t.title, t.label].find(
79
- (i) => typeof i == "string" && i.length > 0
86
+ (o) => typeof o == "string" && o.length > 0
80
87
  ), e = r ? [`# ${r}`, ""] : [], n = /* @__PURE__ */ new Set([
81
88
  "headline",
82
89
  "title",
@@ -87,34 +94,34 @@ function y(t) {
87
94
  "sources",
88
95
  "followUps"
89
96
  ]);
90
- return Object.entries(t).forEach(([i, o]) => {
91
- if (!(n.has(i) || o == null)) {
92
- if (typeof o == "string") {
93
- e.push(o, "");
97
+ return Object.entries(t).forEach(([o, i]) => {
98
+ if (!(n.has(o) || i == null)) {
99
+ if (typeof i == "string") {
100
+ e.push(i, "");
94
101
  return;
95
102
  }
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);
103
+ if (Array.isArray(i)) {
104
+ const c = i.filter(f);
105
+ if (c.length === i.length && c.length > 0) {
106
+ l(e, o, c);
100
107
  return;
101
108
  }
102
- const d = o.filter(
103
- (a) => typeof a == "string" || typeof a == "number"
109
+ const d = i.filter(
110
+ (s) => typeof s == "string" || typeof s == "number"
104
111
  );
105
- d.length && (e.push(`## ${c(i)}`), d.forEach((a) => e.push(`- ${String(a)}`)), e.push(""));
112
+ d.length && (e.push(`## ${a(o)}`), d.forEach((s) => e.push(`- ${String(s)}`)), e.push(""));
106
113
  return;
107
114
  }
108
- if (f(o)) {
109
- l(e, i, [o]);
115
+ if (f(i)) {
116
+ l(e, o, [i]);
110
117
  return;
111
118
  }
112
- (typeof o == "number" || typeof o == "boolean") && e.push(`**${c(i)}:** ${String(o)}`, "");
119
+ (typeof i == "number" || typeof i == "boolean") && e.push(`**${a(o)}:** ${String(i)}`, "");
113
120
  }
114
121
  }), e.join(`
115
122
  `).trim();
116
123
  }
117
- function $(t) {
124
+ function T(t) {
118
125
  return t.map((e) => {
119
126
  if (!e || typeof e != "object") return "";
120
127
  const n = e;
@@ -125,10 +132,11 @@ function $(t) {
125
132
  }
126
133
  export {
127
134
  g as ARTIFACT_BLOCKS_CHANGED,
135
+ m as ARTIFACT_BLOCKS_STORAGE_KEY,
128
136
  w as ARTIFACT_DESTINATIONS,
129
- $ as assistantPartsToMarkdown,
137
+ T as assistantPartsToMarkdown,
130
138
  b as findDuplicateArtifactBlock,
131
139
  h as readSavedArtifactBlocks,
132
- A as saveArtifactBlock,
133
- S as suggestedSectionForKind
140
+ S as saveArtifactBlock,
141
+ A as suggestedSectionForKind
134
142
  };
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ const o = "This answer combines multiple data sources and cannot be pinned as one Board table.";
3
+ function r(e) {
4
+ if (e.kind !== "table")
5
+ return { ok: !0 };
6
+ const n = e.connectorIds ?? [], t = e.sqlQueryCount ?? 1;
7
+ return n.length !== 1 || t !== 1 ? { ok: !1, message: o } : { ok: !0 };
8
+ }
9
+ export {
10
+ o as PIN_GUARD_MESSAGE,
11
+ r as validateArtifactPinBlock
12
+ };
package/fonts.css CHANGED
@@ -1,4 +1,6 @@
1
1
  /* @actioneer/ads — generated by scripts/build-lib-styles.mjs. Do not edit. */
2
+ @import "@fontsource-variable/jetbrains-mono/wght.css";
3
+
2
4
  /* Aribau Grotesk — ADS UI typeface.
3
5
  TWO physical faces, both served compressed (woff2):
4
6
  • Regular → `font-normal` (weight 100–499)
package/lib/icons.d.ts CHANGED
@@ -145,6 +145,22 @@ export declare const TextFont: React.ForwardRefExoticComponent<Omit<import('@pho
145
145
  /** Legacy Hugeicons prop — `>= 2` maps to weight="bold", else ignored. */
146
146
  strokeWidth?: number;
147
147
  } & React.RefAttributes<SVGSVGElement>>;
148
+ export declare const TextBold: React.ForwardRefExoticComponent<Omit<import('@phosphor-icons/react').IconProps, "ref"> & {
149
+ /** Legacy Hugeicons prop — `>= 2` maps to weight="bold", else ignored. */
150
+ strokeWidth?: number;
151
+ } & React.RefAttributes<SVGSVGElement>>;
152
+ export declare const TextItalicStyle: React.ForwardRefExoticComponent<Omit<import('@phosphor-icons/react').IconProps, "ref"> & {
153
+ /** Legacy Hugeicons prop — `>= 2` maps to weight="bold", else ignored. */
154
+ strokeWidth?: number;
155
+ } & React.RefAttributes<SVGSVGElement>>;
156
+ export declare const TextStrike: React.ForwardRefExoticComponent<Omit<import('@phosphor-icons/react').IconProps, "ref"> & {
157
+ /** Legacy Hugeicons prop — `>= 2` maps to weight="bold", else ignored. */
158
+ strokeWidth?: number;
159
+ } & React.RefAttributes<SVGSVGElement>>;
160
+ export declare const TextUnderlineStyle: React.ForwardRefExoticComponent<Omit<import('@phosphor-icons/react').IconProps, "ref"> & {
161
+ /** Legacy Hugeicons prop — `>= 2` maps to weight="bold", else ignored. */
162
+ strokeWidth?: number;
163
+ } & React.RefAttributes<SVGSVGElement>>;
148
164
  export declare const ToggleOn: React.ForwardRefExoticComponent<Omit<import('@phosphor-icons/react').IconProps, "ref"> & {
149
165
  /** Legacy Hugeicons prop — `>= 2` maps to weight="bold", else ignored. */
150
166
  strokeWidth?: number;
@@ -233,6 +249,10 @@ export declare const Warning: React.ForwardRefExoticComponent<Omit<import('@phos
233
249
  /** Legacy Hugeicons prop — `>= 2` maps to weight="bold", else ignored. */
234
250
  strokeWidth?: number;
235
251
  } & React.RefAttributes<SVGSVGElement>>;
252
+ export declare const Bell: React.ForwardRefExoticComponent<Omit<import('@phosphor-icons/react').IconProps, "ref"> & {
253
+ /** Legacy Hugeicons prop — `>= 2` maps to weight="bold", else ignored. */
254
+ strokeWidth?: number;
255
+ } & React.RefAttributes<SVGSVGElement>>;
236
256
  export declare const WarningCircle: React.ForwardRefExoticComponent<Omit<import('@phosphor-icons/react').IconProps, "ref"> & {
237
257
  /** Legacy Hugeicons prop — `>= 2` maps to weight="bold", else ignored. */
238
258
  strokeWidth?: number;