@actioneer/ads 1.0.7 → 1.0.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 (71) hide show
  1. package/DESIGN.md +80 -86
  2. package/README.md +6 -0
  3. package/components/ai-elements/chart.js +20 -20
  4. package/components/ai-elements/inline-citation.js +50 -50
  5. package/components/ai-elements/message.js +1 -1
  6. package/components/ai-elements/tool.js +5 -5
  7. package/components/alert.d.ts +3 -2
  8. package/components/alert.js +25 -25
  9. package/components/answer.js +1 -1
  10. package/components/assistant-ui/action-bar.js +1 -1
  11. package/components/assistant-ui/attachment.js +68 -49
  12. package/components/assistant-ui/composer-add-context.js +1 -1
  13. package/components/assistant-ui/composer-trigger-popover.js +1 -1
  14. package/components/assistant-ui/composer.js +13 -13
  15. package/components/assistant-ui/message-timing.js +6 -6
  16. package/components/assistant-ui/selection-toolbar.js +5 -5
  17. package/components/assistant-ui/sources.js +15 -15
  18. package/components/assistant-ui/tooltip-icon-button.js +18 -14
  19. package/components/audio-waveform.d.ts +21 -8
  20. package/components/audio-waveform.js +371 -94
  21. package/components/autocomplete.js +9 -9
  22. package/components/breadcrumbs.js +32 -38
  23. package/components/button.js +83 -73
  24. package/components/card.js +1 -1
  25. package/components/chart.js +732 -673
  26. package/components/chip.js +37 -35
  27. package/components/command-palette.js +12 -12
  28. package/components/connector-card.d.ts +1 -2
  29. package/components/connector-card.js +17 -17
  30. package/components/date-range-picker.js +1 -2
  31. package/components/drawer.js +9 -10
  32. package/components/dropdown.js +1 -1
  33. package/components/empty-state.d.ts +2 -0
  34. package/components/empty-state.js +17 -15
  35. package/components/field.js +9 -10
  36. package/components/file-dropzone.d.ts +6 -3
  37. package/components/file-dropzone.js +72 -60
  38. package/components/infinite-canvas.js +9 -9
  39. package/components/modal.js +1 -1
  40. package/components/page-body.js +8 -8
  41. package/components/popover.js +11 -11
  42. package/components/progress-circle.d.ts +1 -1
  43. package/components/progress-circle.js +57 -48
  44. package/components/segmented.d.ts +1 -0
  45. package/components/segmented.js +34 -36
  46. package/components/select.js +2 -2
  47. package/components/selection-action-bar.js +32 -31
  48. package/components/setting-row.js +10 -10
  49. package/components/slider.js +5 -5
  50. package/components/stepper.d.ts +1 -1
  51. package/components/stepper.js +1 -1
  52. package/components/switch.js +10 -10
  53. package/components/table.d.ts +2 -2
  54. package/components/table.js +177 -170
  55. package/components/tabs.js +41 -35
  56. package/components/timeline.js +3 -3
  57. package/components/toast.js +53 -56
  58. package/components/ui/button.js +4 -4
  59. package/components/ui/dialog.js +1 -1
  60. package/components/viz-charts.js +263 -221
  61. package/examples/README.md +30 -0
  62. package/examples/agents-screen.tsx +477 -0
  63. package/examples/settings-screen.tsx +90 -0
  64. package/examples/workspace-header.tsx +71 -0
  65. package/lib/icons.d.ts +8 -0
  66. package/lib/icons.js +171 -118
  67. package/llms.txt +14 -14
  68. package/manifest.json +77 -48
  69. package/package.json +1 -1
  70. package/styles.css +55 -68
  71. package/theme.css +50 -59
@@ -1,12 +1,12 @@
1
1
  "use client";
2
- import { jsxs as v, jsx as t, Fragment as k } from "react/jsx-runtime";
2
+ import { jsxs as x, jsx as t, Fragment as k } from "react/jsx-runtime";
3
3
  import * as r from "react";
4
4
  import { cn as d } from "../lib/cn.js";
5
5
  const N = r.createContext({
6
6
  count: 0
7
7
  }), w = r.createContext(0);
8
- function B(o) {
9
- let n = (o == null ? void 0 : o.parentElement) ?? null;
8
+ function B(a) {
9
+ let n = (a == null ? void 0 : a.parentElement) ?? null;
10
10
  for (; n; ) {
11
11
  const e = getComputedStyle(n).overflowY;
12
12
  if (e === "auto" || e === "scroll") return n;
@@ -15,29 +15,21 @@ function B(o) {
15
15
  return null;
16
16
  }
17
17
  const C = r.forwardRef(
18
- ({
19
- className: o,
20
- children: n,
21
- sticky: e,
22
- actions: c,
23
- center: i,
24
- meta: f,
25
- ...x
26
- }, a) => {
27
- const p = r.Children.toArray(n), b = r.useRef(null), u = r.useCallback(
18
+ ({ className: a, children: n, sticky: e, actions: i, center: c, meta: f, ...p }, o) => {
19
+ const h = r.Children.toArray(n), b = r.useRef(null), m = r.useCallback(
28
20
  (s) => {
29
- b.current = s, typeof a == "function" ? a(s) : a && (a.current = s);
21
+ b.current = s, typeof o == "function" ? o(s) : o && (o.current = s);
30
22
  },
31
- [a]
32
- ), [l, h] = r.useState(!1);
23
+ [o]
24
+ ), [l, g] = r.useState(!1);
33
25
  return r.useEffect(() => {
34
26
  if (!e) return;
35
- const s = B(b.current), m = s ?? window, g = () => h((s ? s.scrollTop : window.scrollY) > 2);
36
- return g(), m.addEventListener("scroll", g, { passive: !0 }), () => m.removeEventListener("scroll", g);
37
- }, [e]), /* @__PURE__ */ v(
27
+ const s = B(b.current), u = s ?? window, v = () => g((s ? s.scrollTop : window.scrollY) > 2);
28
+ return v(), u.addEventListener("scroll", v, { passive: !0 }), () => u.removeEventListener("scroll", v);
29
+ }, [e]), /* @__PURE__ */ x(
38
30
  "nav",
39
31
  {
40
- ref: u,
32
+ ref: m,
41
33
  "aria-label": "Breadcrumb",
42
34
  "data-stuck": e ? l ? "true" : "false" : void 0,
43
35
  className: d(
@@ -50,29 +42,31 @@ const C = r.forwardRef(
50
42
  // panel's empty padding).
51
43
  e && "before:absolute before:inset-x-0 before:-top-8 before:h-8 before:bg-inherit before:content-['']",
52
44
  e && (l ? "border-b border-border" : "border-b border-transparent"),
53
- o
45
+ a
54
46
  ),
55
- ...x,
47
+ ...p,
56
48
  children: [
57
- /* @__PURE__ */ t("ol", { className: "flex min-w-0 shrink items-center gap-1.5 text-base", children: /* @__PURE__ */ t(N.Provider, { value: { count: p.length }, children: p.map((s, m) => /* @__PURE__ */ t(w.Provider, { value: m, children: s }, m)) }) }),
58
- f && /* @__PURE__ */ t("div", { className: "ml-4 flex shrink-0 items-center gap-3 text-xs text-muted-foreground", children: f }),
59
- i && /* @__PURE__ */ t("div", { className: "absolute left-1/2 top-1/2 z-50 flex -translate-x-1/2 -translate-y-1/2 items-center", children: i }),
60
- c && /* @__PURE__ */ t("div", { className: "ml-auto flex shrink-0 items-center gap-2 pl-4", children: c })
49
+ /* @__PURE__ */ x("div", { className: "flex min-w-0 shrink items-baseline", children: [
50
+ /* @__PURE__ */ t("ol", { className: "flex min-w-0 shrink items-center gap-1.5 text-base", children: /* @__PURE__ */ t(N.Provider, { value: { count: h.length }, children: h.map((s, u) => /* @__PURE__ */ t(w.Provider, { value: u, children: s }, u)) }) }),
51
+ f && /* @__PURE__ */ t("div", { className: "ml-3 flex shrink-0 items-baseline gap-3 text-s text-tertiary", children: f })
52
+ ] }),
53
+ c && /* @__PURE__ */ t("div", { className: "absolute left-1/2 top-1/2 z-50 flex -translate-x-1/2 -translate-y-1/2 items-center", children: c }),
54
+ i && /* @__PURE__ */ t("div", { className: "ml-auto flex shrink-0 items-center gap-2 pl-4", children: i })
61
55
  ]
62
56
  }
63
57
  );
64
58
  }
65
59
  );
66
60
  C.displayName = "Breadcrumbs";
67
- const R = r.forwardRef(({ className: o, href: n, isCurrent: e, icon: c, children: i, ...f }, x) => {
68
- const { count: a } = r.useContext(N), b = r.useContext(w) === a - 1, u = "inline-flex items-center gap-1.5", l = /* @__PURE__ */ v(k, { children: [
69
- c && /* @__PURE__ */ t("span", { "aria-hidden": !0, className: "flex shrink-0 items-center [&_svg]:size-4", children: c }),
70
- e ? /* @__PURE__ */ t("span", { className: "min-w-0 truncate", children: i }) : i
71
- ] }), h = e ? /* @__PURE__ */ t(
61
+ const R = r.forwardRef(({ className: a, href: n, isCurrent: e, icon: i, children: c, ...f }, p) => {
62
+ const { count: o } = r.useContext(N), b = r.useContext(w) === o - 1, m = "inline-flex items-center gap-1.5", l = /* @__PURE__ */ x(k, { children: [
63
+ i && /* @__PURE__ */ t("span", { "aria-hidden": !0, className: "flex shrink-0 items-center [&_svg]:size-4", children: i }),
64
+ e ? /* @__PURE__ */ t("span", { className: "min-w-0 truncate", children: c }) : c
65
+ ] }), g = e ? /* @__PURE__ */ t(
72
66
  "span",
73
67
  {
74
68
  "aria-current": "page",
75
- className: d(u, "min-w-0 text-base font-medium text-primary"),
69
+ className: d(m, "min-w-0 text-base font-medium text-primary"),
76
70
  children: l
77
71
  }
78
72
  ) : n ? /* @__PURE__ */ t(
@@ -80,25 +74,25 @@ const R = r.forwardRef(({ className: o, href: n, isCurrent: e, icon: c, children
80
74
  {
81
75
  href: n,
82
76
  className: d(
83
- u,
77
+ m,
84
78
  "font-normal text-muted-foreground transition-colors hover:text-foreground",
85
79
  "outline-none focus-visible:ring-3 focus-visible:ring-ring rounded-sm"
86
80
  ),
87
81
  children: l
88
82
  }
89
- ) : /* @__PURE__ */ t("span", { className: d(u, "text-muted-foreground"), children: l });
90
- return /* @__PURE__ */ v(
83
+ ) : /* @__PURE__ */ t("span", { className: d(m, "text-muted-foreground"), children: l });
84
+ return /* @__PURE__ */ x(
91
85
  "li",
92
86
  {
93
- ref: x,
87
+ ref: p,
94
88
  className: d(
95
89
  "flex items-center gap-1.5",
96
90
  e ? "min-w-0 shrink" : "shrink-0",
97
- o
91
+ a
98
92
  ),
99
93
  ...f,
100
94
  children: [
101
- h,
95
+ g,
102
96
  !b && /* @__PURE__ */ t("span", { "aria-hidden": !0, className: "shrink-0 select-none text-border-strong", children: "/" })
103
97
  ]
104
98
  }
@@ -1,12 +1,13 @@
1
1
  "use client";
2
- import { jsxs as t, jsx as m } from "react/jsx-runtime";
3
- import * as p from "react";
4
- import { cva as u } from "class-variance-authority";
5
- import { cn as n } from "../lib/cn.js";
6
- import { Spinner as v } from "./spinner.js";
7
- const f = u(
2
+ import { jsx as o, jsxs as d } from "react/jsx-runtime";
3
+ import * as u from "react";
4
+ import { cva as v } from "class-variance-authority";
5
+ import { cn as i } from "../lib/cn.js";
6
+ import { IconHoverFillContext as f } from "../lib/icons.js";
7
+ import { Spinner as h } from "./spinner.js";
8
+ const x = v(
8
9
  [
9
- "relative inline-flex h-8 items-center justify-center gap-2 whitespace-nowrap",
10
+ "relative inline-flex items-center justify-center gap-2 whitespace-nowrap",
10
11
  "cursor-pointer text-m font-medium select-none",
11
12
  "rounded-md border border-transparent",
12
13
  "transition-[background,border,color,box-shadow,transform] duration-150 ease-out motion-reduce:transition-none",
@@ -21,88 +22,97 @@ const f = u(
21
22
  {
22
23
  variants: {
23
24
  variant: {
24
- solid: "bg-action-primary text-action-primary-foreground shadow-[var(--inner-glow-cta)] enabled:hover:bg-action-primary-hover enabled:active:bg-action-primary-hover",
25
+ solid: "bg-action-primary text-action-primary-foreground enabled:hover:bg-action-primary-hover enabled:active:bg-action-primary-hover",
25
26
  secondary: "border-action-primary bg-transparent text-action-primary-text shadow-none enabled:hover:bg-action-primary-soft enabled:active:bg-action-primary-soft",
26
27
  outline: "border-border bg-transparent text-foreground enabled:hover:border-action-primary enabled:hover:bg-action-primary-soft enabled:hover:text-action-primary-text enabled:active:border-action-primary enabled:active:bg-action-primary-soft enabled:active:text-action-primary-text",
27
- ghost: "bg-transparent text-foreground enabled:hover:bg-action-primary-soft enabled:hover:text-action-primary-text enabled:active:bg-action-primary-soft enabled:active:text-action-primary-text",
28
- link: "bg-transparent text-foreground underline-offset-4 enabled:hover:bg-action-primary-soft enabled:hover:text-action-primary-text enabled:hover:underline enabled:active:bg-action-primary-soft enabled:active:text-action-primary-text active:scale-none",
29
- danger: "bg-danger text-danger-foreground shadow-[var(--inner-glow-cta)] enabled:hover:bg-danger/90 enabled:active:bg-danger/90 focus-visible:ring-danger/40"
28
+ // Ghost answers hover with a WG12 outline and no fill; the label stays neutral.
29
+ ghost: "bg-transparent text-foreground enabled:hover:border-foreground enabled:active:border-foreground",
30
+ // Link only recolours its label on hover — no fill, no underline.
31
+ link: "bg-transparent text-foreground enabled:hover:text-action-primary-text enabled:active:text-action-primary-text active:scale-none",
32
+ danger: "bg-danger text-danger-foreground enabled:hover:bg-danger/90 enabled:active:bg-danger/90 focus-visible:ring-danger/40"
30
33
  },
31
34
  size: {
32
- xs: "rounded-sm px-2.5 [&_svg]:size-3.5",
33
- sm: "rounded-sm px-3 [&_svg]:size-4",
34
- md: "rounded-md px-3.5 [&_svg]:size-4",
35
- lg: "rounded-md px-4 [&_svg]:size-5",
36
- icon: "w-9 rounded-md [&_svg]:size-4",
37
- "icon-sm": "w-8 rounded-sm [&_svg]:size-4",
38
- "icon-xs": "w-7 rounded-sm [&_svg]:size-4"
35
+ // Each size has its own height; the 14px Medium label never changes.
36
+ xs: "h-6 rounded-sm px-2 [&_svg]:size-3.5",
37
+ sm: "h-7 rounded-sm px-3 [&_svg]:size-4",
38
+ md: "h-8 rounded-md px-3.5 [&_svg]:size-4",
39
+ lg: "h-10 rounded-md px-5 [&_svg]:size-5",
40
+ icon: "h-8 w-9 rounded-md [&_svg]:size-4",
41
+ "icon-sm": "h-8 w-8 rounded-sm [&_svg]:size-4",
42
+ "icon-xs": "h-8 w-7 rounded-sm [&_svg]:size-4"
39
43
  }
40
44
  },
41
45
  defaultVariants: { variant: "solid", size: "md" }
42
46
  }
43
- ), x = {
47
+ ), y = {
44
48
  solid: "disabled:border-transparent disabled:bg-action-primary disabled:text-action-primary-foreground disabled:shadow-none",
45
49
  secondary: "disabled:border-action-primary disabled:bg-transparent disabled:text-action-primary-text disabled:shadow-none",
46
50
  outline: "disabled:border-border disabled:bg-transparent disabled:text-foreground disabled:shadow-none",
47
51
  ghost: "disabled:border-transparent disabled:bg-transparent disabled:text-foreground disabled:shadow-none",
48
52
  link: "disabled:border-transparent disabled:bg-transparent disabled:text-foreground disabled:shadow-none",
49
53
  danger: "disabled:border-transparent disabled:bg-danger disabled:text-danger-foreground disabled:shadow-none"
50
- }, y = p.forwardRef(
54
+ }, w = u.forwardRef(
51
55
  ({
52
- className: o,
53
- variant: r,
54
- size: i,
55
- isLoading: e = !1,
56
- startContent: d,
57
- endContent: s,
58
- fullWidth: b,
59
- disabled: a,
60
- children: l,
61
- ...c
62
- }, g) => /* @__PURE__ */ t(
63
- "button",
64
- {
65
- ref: g,
66
- disabled: a || e,
67
- "aria-busy": e || void 0,
68
- "data-loading": e || void 0,
69
- className: n(
70
- f({ variant: r, size: i }),
71
- b && "w-full",
72
- e ? x[r ?? "solid"] : a && "opacity-30",
73
- o
74
- ),
75
- ...c,
76
- children: [
77
- e && /* @__PURE__ */ m(
78
- v,
79
- {
80
- variant: "action",
81
- size: "sm",
82
- className: "absolute",
83
- "aria-hidden": !0
84
- }
56
+ className: s,
57
+ variant: e,
58
+ size: t,
59
+ isLoading: r = !1,
60
+ startContent: b,
61
+ endContent: l,
62
+ fullWidth: c,
63
+ disabled: n,
64
+ children: g,
65
+ ...p
66
+ }, m) => {
67
+ const a = typeof t == "string" && t.startsWith("icon") && (e === "ghost" || e === "outline" || e === "link");
68
+ return /* @__PURE__ */ o(f.Provider, { value: a, children: /* @__PURE__ */ d(
69
+ "button",
70
+ {
71
+ ref: m,
72
+ disabled: n || r,
73
+ "aria-busy": r || void 0,
74
+ "data-loading": r || void 0,
75
+ "data-icon-hover-fill": a || void 0,
76
+ className: i(
77
+ x({ variant: e, size: t }),
78
+ a && "enabled:hover:bg-transparent enabled:active:bg-transparent enabled:hover:text-action-primary enabled:active:text-action-primary",
79
+ a && e === "ghost" && "enabled:hover:border-transparent enabled:active:border-transparent",
80
+ c && "w-full",
81
+ r ? y[e ?? "solid"] : n && "opacity-30",
82
+ s
85
83
  ),
86
- /* @__PURE__ */ t(
87
- "span",
88
- {
89
- className: n(
90
- "inline-flex items-center gap-1.5",
91
- e && "opacity-0"
92
- ),
93
- children: [
94
- d,
95
- l,
96
- s
97
- ]
98
- }
99
- )
100
- ]
101
- }
102
- )
84
+ ...p,
85
+ children: [
86
+ r && /* @__PURE__ */ o(
87
+ h,
88
+ {
89
+ variant: "action",
90
+ size: "sm",
91
+ className: "absolute",
92
+ "aria-hidden": !0
93
+ }
94
+ ),
95
+ /* @__PURE__ */ d(
96
+ "span",
97
+ {
98
+ className: i(
99
+ "inline-flex items-center gap-1.5",
100
+ r && "opacity-0"
101
+ ),
102
+ children: [
103
+ b,
104
+ g,
105
+ l
106
+ ]
107
+ }
108
+ )
109
+ ]
110
+ }
111
+ ) });
112
+ }
103
113
  );
104
- y.displayName = "Button";
114
+ w.displayName = "Button";
105
115
  export {
106
- y as Button,
107
- f as buttonVariants
116
+ w as Button,
117
+ x as buttonVariants
108
118
  };
@@ -6,7 +6,7 @@ const l = d.forwardRef(
6
6
  ({ className: r, isHoverable: a, isPressable: e, children: s, ...n }, i) => {
7
7
  const c = o(
8
8
  "bg-card text-card-foreground rounded-xl",
9
- (e || a) && "shadow-elevation transition-[box-shadow,transform] duration-150 ease-out motion-reduce:transition-none",
9
+ (e || a) && "transition-[box-shadow,transform] duration-150 ease-out motion-reduce:transition-none",
10
10
  a && "hover:-translate-y-0.5",
11
11
  r
12
12
  );