@actioneer/ads 0.5.9 → 0.7.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 (116) hide show
  1. package/components/ai-elements/agent-trace.d.ts +2 -2
  2. package/components/ai-elements/agent-trace.js +163 -104
  3. package/components/ai-elements/chain-of-thought.d.ts +2 -2
  4. package/components/ai-elements/chain-of-thought.js +1 -1
  5. package/components/ai-elements/index.d.ts +0 -5
  6. package/components/ai-elements/inline-citation.js +1 -1
  7. package/components/alert.d.ts +6 -6
  8. package/components/alert.js +89 -53
  9. package/components/answer-sources.d.ts +2 -6
  10. package/components/answer-sources.js +58 -60
  11. package/components/answer.d.ts +5 -0
  12. package/components/answer.js +311 -271
  13. package/components/assistant-ui/composer-harness.js +11 -14
  14. package/components/assistant-ui/composer.d.ts +3 -1
  15. package/components/assistant-ui/composer.js +148 -144
  16. package/components/assistant-ui/index.d.ts +0 -3
  17. package/components/assistant-ui/thread-context.d.ts +3 -1
  18. package/components/assistant-ui/thread.js +50 -42
  19. package/components/avatar.js +42 -42
  20. package/components/badge.d.ts +5 -6
  21. package/components/badge.js +13 -76
  22. package/components/body-page-header.d.ts +15 -0
  23. package/components/body-page-header.js +24 -0
  24. package/components/brand-loader.d.ts +0 -3
  25. package/components/brand-loader.js +10 -32
  26. package/components/breadcrumbs.d.ts +1 -8
  27. package/components/breadcrumbs.js +65 -78
  28. package/components/button.d.ts +1 -1
  29. package/components/button.js +55 -49
  30. package/components/card.js +19 -18
  31. package/components/chart.js +526 -503
  32. package/components/chip.d.ts +13 -1
  33. package/components/chip.js +93 -80
  34. package/components/collection-header.d.ts +17 -0
  35. package/components/collection-header.js +31 -0
  36. package/components/connector-card.d.ts +6 -6
  37. package/components/connector-card.js +31 -32
  38. package/components/date-range-picker.d.ts +26 -0
  39. package/components/date-range-picker.js +223 -0
  40. package/components/drawer.d.ts +19 -3
  41. package/components/drawer.js +143 -116
  42. package/components/dropdown.d.ts +1 -2
  43. package/components/dropdown.js +88 -89
  44. package/components/field.js +39 -34
  45. package/components/file-dropzone.js +1 -1
  46. package/components/index.d.ts +5 -4
  47. package/components/index.js +501 -546
  48. package/components/infinite-canvas.js +24 -24
  49. package/components/input-field.d.ts +18 -3
  50. package/components/input-field.js +88 -72
  51. package/components/input.js +16 -15
  52. package/components/modal.d.ts +31 -3
  53. package/components/modal.js +243 -169
  54. package/components/number-field.js +45 -42
  55. package/components/page-body.d.ts +12 -0
  56. package/components/page-body.js +18 -0
  57. package/components/pagination.js +36 -36
  58. package/components/panel.js +31 -28
  59. package/components/select.d.ts +21 -0
  60. package/components/select.js +189 -148
  61. package/components/setting-row.d.ts +6 -5
  62. package/components/setting-row.js +33 -32
  63. package/components/sidebar.d.ts +2 -0
  64. package/components/sidebar.js +165 -155
  65. package/components/skeleton.js +8 -7
  66. package/components/slider.js +1 -1
  67. package/components/surface-loader.d.ts +11 -0
  68. package/components/surface-loader.js +35 -0
  69. package/components/table.d.ts +16 -10
  70. package/components/table.js +426 -410
  71. package/components/tabs.d.ts +2 -0
  72. package/components/tabs.js +159 -294
  73. package/components/textarea.js +9 -9
  74. package/components/toast.d.ts +1 -1
  75. package/components/toast.js +181 -118
  76. package/components/tree.d.ts +5 -1
  77. package/components/tree.js +96 -63
  78. package/components/typography.d.ts +4 -4
  79. package/components/typography.js +13 -13
  80. package/components/ui/button.d.ts +1 -1
  81. package/components/ui/dialog.js +33 -33
  82. package/components/viz-charts.js +186 -183
  83. package/demo/components/add-to-artifact.js +8 -10
  84. package/fonts.css +2 -0
  85. package/lib/cn.js +11 -4
  86. package/lib/icons.d.ts +4 -0
  87. package/lib/icons.js +107 -106
  88. package/lib/interactive.d.ts +1 -1
  89. package/llms.txt +115 -152
  90. package/manifest.json +13730 -1084
  91. package/package.json +4 -2
  92. package/styles.css +365 -225
  93. package/theme.css +315 -176
  94. package/components/agent-icon.d.ts +0 -76
  95. package/components/agent-icon.js +0 -265
  96. package/components/ai-elements/queue.d.ts +0 -60
  97. package/components/ai-elements/queue.js +0 -193
  98. package/components/ai-elements/speech-input.d.ts +0 -16
  99. package/components/ai-elements/speech-input.js +0 -151
  100. package/components/ai-elements/task-progress.d.ts +0 -41
  101. package/components/ai-elements/task-progress.js +0 -224
  102. package/components/ai-elements/task.d.ts +0 -39
  103. package/components/ai-elements/task.js +0 -105
  104. package/components/ai-elements/voice.d.ts +0 -90
  105. package/components/ai-elements/voice.js +0 -496
  106. package/components/assistant-ui/follow-up-suggestions.d.ts +0 -11
  107. package/components/assistant-ui/follow-up-suggestions.js +0 -72
  108. package/components/assistant-ui/suggestions.d.ts +0 -7
  109. package/components/assistant-ui/suggestions.js +0 -19
  110. package/components/assistant-ui/voice.d.ts +0 -18
  111. package/components/link.d.ts +0 -14
  112. package/components/link.js +0 -72
  113. package/components/navbar.d.ts +0 -15
  114. package/components/navbar.js +0 -68
  115. package/components/pixel-icon.d.ts +0 -37
  116. package/components/pixel-icon.js +0 -859
@@ -1,48 +1,48 @@
1
1
  "use client";
2
2
  import { jsxs as u, jsx as l } from "react/jsx-runtime";
3
3
  import * as j from "react";
4
- import { ChevronLeft as k, MoreHorizontal as L, ChevronRight as G } from "../lib/icons.js";
4
+ import { ChevronLeft as L, MoreHorizontal as k, ChevronRight as G } from "../lib/icons.js";
5
5
  import { cn as o } from "../lib/cn.js";
6
6
  import { Select as M } from "./select.js";
7
- function p(e, r) {
8
- const t = [];
9
- for (let i = e; i <= r; i += 1) t.push(i);
10
- return t;
7
+ function p(t, s) {
8
+ const e = [];
9
+ for (let r = t; r <= s; r += 1) e.push(r);
10
+ return e;
11
11
  }
12
- function E(e, r, t) {
13
- if (t * 2 + 5 >= e)
14
- return p(1, e);
15
- const m = Math.max(r - t, 1), s = Math.min(r + t, e), d = m > 2, a = s < e - 1;
12
+ function E(t, s, e) {
13
+ if (e * 2 + 5 >= t)
14
+ return p(1, t);
15
+ const m = Math.max(s - e, 1), i = Math.min(s + e, t), d = m > 2, a = i < t - 1;
16
16
  if (!d && a) {
17
- const c = t * 2 + 3;
18
- return [...p(1, c), "end-ellipsis", e];
17
+ const c = e * 2 + 3;
18
+ return [...p(1, c), "end-ellipsis", t];
19
19
  }
20
20
  if (d && !a) {
21
- const c = t * 2 + 3;
22
- return [1, "start-ellipsis", ...p(e - c + 1, e)];
21
+ const c = e * 2 + 3;
22
+ return [1, "start-ellipsis", ...p(t - c + 1, t)];
23
23
  }
24
24
  return [
25
25
  1,
26
26
  "start-ellipsis",
27
- ...p(m, s),
27
+ ...p(m, i),
28
28
  "end-ellipsis",
29
- e
29
+ t
30
30
  ];
31
31
  }
32
- const A = (e) => o(
32
+ const A = () => o(
33
33
  "inline-flex items-center justify-center rounded-md font-normal",
34
34
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
35
35
  "transition active:scale-[0.97] motion-reduce:transition-none motion-reduce:active:scale-100",
36
36
  "disabled:pointer-events-none disabled:opacity-40",
37
- e === "sm" ? "size-7 text-xs" : "size-9 text-xs"
38
- ), N = (e) => e === "sm" ? "w-auto gap-1.5 px-2" : "w-auto gap-1.5 px-2.5", F = j.forwardRef(
37
+ "size-6 text-xs"
38
+ ), N = (t) => t === "sm" ? "w-auto gap-1.5 px-2" : "w-auto gap-1.5 px-2.5", F = j.forwardRef(
39
39
  ({
40
- className: e,
41
- total: r,
42
- page: t,
43
- onChange: i,
40
+ className: t,
41
+ total: s,
42
+ page: e,
43
+ onChange: r,
44
44
  siblings: m = 1,
45
- size: s = "md",
45
+ size: i = "md",
46
46
  summary: d,
47
47
  labels: a = !1,
48
48
  pageSize: c,
@@ -50,8 +50,8 @@ const A = (e) => o(
50
50
  onPageSizeChange: g,
51
51
  ...C
52
52
  }, y) => {
53
- if (r <= 0) return null;
54
- const P = E(r, t, m), R = t <= 1, S = t >= r, f = A(s), x = s === "sm" ? "size-3.5" : "size-4", h = c != null && !!g, b = d != null || h;
53
+ if (s <= 0) return null;
54
+ const P = E(s, e, m), R = e <= 1, S = e >= s, f = A(), x = i === "sm" ? "size-3.5" : "size-4", h = c != null && !!g, b = d != null || h;
55
55
  return /* @__PURE__ */ u(
56
56
  "nav",
57
57
  {
@@ -60,7 +60,7 @@ const A = (e) => o(
60
60
  className: o(
61
61
  "flex items-center",
62
62
  b ? "w-full justify-between gap-4" : "gap-1",
63
- e
63
+ t
64
64
  ),
65
65
  ...C,
66
66
  children: [
@@ -88,7 +88,7 @@ const A = (e) => o(
88
88
  M,
89
89
  {
90
90
  size: "sm",
91
- className: "w-18",
91
+ className: "w-18 text-s font-normal",
92
92
  placement: "top",
93
93
  items: (w ?? [8, 16, 32]).map((n) => ({
94
94
  label: String(n),
@@ -108,14 +108,14 @@ const A = (e) => o(
108
108
  type: "button",
109
109
  "aria-label": "Go to previous page",
110
110
  disabled: R,
111
- onClick: () => i(t - 1),
111
+ onClick: () => r(e - 1),
112
112
  className: o(
113
113
  f,
114
114
  "text-foreground hover:bg-muted",
115
- a && N(s)
115
+ a && N(i)
116
116
  ),
117
117
  children: [
118
- /* @__PURE__ */ l(k, { className: x, "aria-hidden": !0 }),
118
+ /* @__PURE__ */ l(L, { className: x, "aria-hidden": !0 }),
119
119
  a && "Prev"
120
120
  ]
121
121
  }
@@ -127,21 +127,21 @@ const A = (e) => o(
127
127
  {
128
128
  "aria-hidden": !0,
129
129
  className: o(f, "text-muted-foreground"),
130
- children: /* @__PURE__ */ l(L, { className: x })
130
+ children: /* @__PURE__ */ l(k, { className: x })
131
131
  },
132
132
  n
133
133
  );
134
- const v = n === t;
134
+ const v = n === e;
135
135
  return /* @__PURE__ */ l(
136
136
  "button",
137
137
  {
138
138
  type: "button",
139
139
  "aria-label": `Go to page ${n}`,
140
140
  "aria-current": v ? "page" : void 0,
141
- onClick: () => i(n),
141
+ onClick: () => r(n),
142
142
  className: o(
143
143
  f,
144
- v ? "bg-foreground text-background" : "text-foreground hover:bg-muted"
144
+ v ? "bg-ng10 text-white" : "text-foreground hover:bg-muted"
145
145
  ),
146
146
  children: n
147
147
  },
@@ -154,11 +154,11 @@ const A = (e) => o(
154
154
  type: "button",
155
155
  "aria-label": "Go to next page",
156
156
  disabled: S,
157
- onClick: () => i(t + 1),
157
+ onClick: () => r(e + 1),
158
158
  className: o(
159
159
  f,
160
160
  "text-foreground hover:bg-muted",
161
- a && N(s)
161
+ a && N(i)
162
162
  ),
163
163
  children: [
164
164
  a && "Next",
@@ -1,13 +1,14 @@
1
1
  "use client";
2
- import { jsx as o } from "react/jsx-runtime";
3
- import * as l from "react";
4
- import { cn as n } from "../lib/cn.js";
5
- const s = l.forwardRef(
6
- ({ className: e, ...a }, r) => /* @__PURE__ */ o(
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import * as n from "react";
4
+ import { cn as o } from "../lib/cn.js";
5
+ const l = n.forwardRef(
6
+ ({ className: e, ...a }, r) => /* @__PURE__ */ t(
7
7
  "div",
8
8
  {
9
9
  ref: r,
10
- className: n(
10
+ "data-slot": "panel",
11
+ className: o(
11
12
  // Static surface — delineated by color alone (elevation is reserved for
12
13
  // actionable surfaces).
13
14
  "flex min-h-0 min-w-0 flex-col overflow-hidden rounded-lg bg-card",
@@ -17,55 +18,57 @@ const s = l.forwardRef(
17
18
  }
18
19
  )
19
20
  );
20
- s.displayName = "Panel";
21
- const t = l.forwardRef(
22
- ({ className: e, ...a }, r) => /* @__PURE__ */ o(
21
+ l.displayName = "Panel";
22
+ const s = n.forwardRef(
23
+ ({ className: e, ...a }, r) => /* @__PURE__ */ t(
23
24
  "div",
24
25
  {
25
26
  ref: r,
26
- className: n(
27
- "flex h-[var(--panel-header-height)] shrink-0 items-center justify-between gap-2",
28
- "border-b border-border bg-card px-3",
27
+ className: o(
28
+ "relative flex h-[var(--panel-header-height)] shrink-0 items-center justify-between gap-2",
29
+ "border-b-0 bg-card px-3",
30
+ "after:pointer-events-none after:absolute after:inset-x-0 after:bottom-0 after:h-px",
31
+ "after:bg-[linear-gradient(to_right,var(--color-border)_0%,transparent_100%)] after:content-['']",
29
32
  e
30
33
  ),
31
34
  ...a
32
35
  }
33
36
  )
34
37
  );
35
- t.displayName = "PanelHeader";
36
- const d = l.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ o(
38
+ s.displayName = "PanelHeader";
39
+ const i = n.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
37
40
  "h2",
38
41
  {
39
42
  ref: r,
40
- className: n("flex min-w-0 items-center gap-2 truncate text-xs font-medium text-foreground", e),
43
+ className: o("flex min-w-0 items-center gap-2 truncate text-xs font-medium text-foreground", e),
41
44
  ...a
42
45
  }
43
46
  ));
44
- d.displayName = "PanelTitle";
45
- const i = l.forwardRef(
46
- ({ className: e, ...a }, r) => /* @__PURE__ */ o("div", { ref: r, className: n("flex shrink-0 items-center gap-1", e), ...a })
47
+ i.displayName = "PanelTitle";
48
+ const d = n.forwardRef(
49
+ ({ className: e, ...a }, r) => /* @__PURE__ */ t("div", { ref: r, className: o("flex shrink-0 items-center gap-1", e), ...a })
47
50
  );
48
- i.displayName = "PanelToolbar";
49
- const f = l.forwardRef(
50
- ({ className: e, ...a }, r) => /* @__PURE__ */ o("div", { ref: r, tabIndex: 0, className: n("min-h-0 flex-1 overflow-auto p-4", e), ...a })
51
+ d.displayName = "PanelToolbar";
52
+ const f = n.forwardRef(
53
+ ({ className: e, ...a }, r) => /* @__PURE__ */ t("div", { ref: r, tabIndex: 0, className: o("min-h-0 flex-1 overflow-auto p-4", e), ...a })
51
54
  );
52
55
  f.displayName = "PanelBody";
53
- const m = l.forwardRef(
54
- ({ className: e, ...a }, r) => /* @__PURE__ */ o(
56
+ const m = n.forwardRef(
57
+ ({ className: e, ...a }, r) => /* @__PURE__ */ t(
55
58
  "div",
56
59
  {
57
60
  ref: r,
58
- className: n("flex shrink-0 items-center gap-2 bg-surface/40 px-3 py-2", e),
61
+ className: o("flex shrink-0 items-center gap-2 bg-surface/40 px-3 py-2", e),
59
62
  ...a
60
63
  }
61
64
  )
62
65
  );
63
66
  m.displayName = "PanelFooter";
64
67
  export {
65
- s as Panel,
68
+ l as Panel,
66
69
  f as PanelBody,
67
70
  m as PanelFooter,
68
- t as PanelHeader,
69
- d as PanelTitle,
70
- i as PanelToolbar
71
+ s as PanelHeader,
72
+ i as PanelTitle,
73
+ d as PanelToolbar
71
74
  };
@@ -8,6 +8,26 @@ export interface SelectItem {
8
8
  value: string;
9
9
  disabled?: boolean;
10
10
  }
11
+ export interface DropdownOptionsProps {
12
+ items: SelectItem[];
13
+ value?: string;
14
+ values?: string[];
15
+ multiple?: boolean;
16
+ activeIndex?: number;
17
+ onActiveIndexChange?: (index: number) => void;
18
+ onItemSelect?: (index: number) => void;
19
+ placement?: "top" | "bottom";
20
+ id?: string;
21
+ className?: string;
22
+ style?: React.CSSProperties;
23
+ "aria-label"?: string;
24
+ }
25
+ /**
26
+ * DropdownOptions — the reusable options surface composed by Select.
27
+ * It owns listbox semantics and the brand-green option interaction treatment;
28
+ * positioning and open/closed state stay with the parent Select.
29
+ */
30
+ export declare const DropdownOptions: React.ForwardRefExoticComponent<DropdownOptionsProps & React.RefAttributes<HTMLUListElement>>;
11
31
  export interface SelectProps extends VariantProps<typeof selectTriggerVariants> {
12
32
  items: SelectItem[];
13
33
  value?: string;
@@ -15,6 +35,7 @@ export interface SelectProps extends VariantProps<typeof selectTriggerVariants>
15
35
  multiple?: boolean;
16
36
  values?: string[];
17
37
  onValuesChange?: (values: string[]) => void;
38
+ /** Empty-state trigger copy. Defaults to "Select" and inherits tertiary text. */
18
39
  placeholder?: string;
19
40
  disabled?: boolean;
20
41
  isInvalid?: boolean;