@actioneer/ads 0.5.3 → 0.5.5

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 (95) hide show
  1. package/components/accordion.js +15 -15
  2. package/components/agent-icon.d.ts +64 -0
  3. package/components/agent-icon.js +251 -0
  4. package/components/ai-elements/agent-trace.d.ts +8 -1
  5. package/components/ai-elements/agent-trace.js +164 -129
  6. package/components/ai-elements/chain-of-thought-icon.d.ts +42 -0
  7. package/components/ai-elements/chain-of-thought-icon.js +283 -0
  8. package/components/ai-elements/chain-of-thought.js +7 -7
  9. package/components/ai-elements/chart.js +38 -35
  10. package/components/ai-elements/index.d.ts +1 -0
  11. package/components/ai-elements/inline-citation.js +40 -40
  12. package/components/ai-elements/message.js +5 -5
  13. package/components/ai-elements/queue.js +1 -1
  14. package/components/ai-elements/research-activity.d.ts +2 -0
  15. package/components/ai-elements/research-activity.js +79 -81
  16. package/components/ai-elements/task-progress.js +2 -2
  17. package/components/ai-elements/tool.d.ts +4 -2
  18. package/components/ai-elements/tool.js +74 -54
  19. package/components/ai-elements/transcript.js +1 -1
  20. package/components/alert.js +1 -1
  21. package/components/answer.d.ts +2643 -311
  22. package/components/answer.js +1836 -425
  23. package/components/assistant-ui/answer-tool-ui.js +23 -28
  24. package/components/assistant-ui/chain-of-thought.d.ts +7 -2
  25. package/components/assistant-ui/composer-harness.js +20 -16
  26. package/components/assistant-ui/reasoning.js +35 -31
  27. package/components/assistant-ui/tool-fallback.js +125 -122
  28. package/components/assistant-ui/tool-group.d.ts +3 -1
  29. package/components/assistant-ui/tool-group.js +48 -43
  30. package/components/audio-waveform.js +14 -14
  31. package/components/autocomplete.js +52 -48
  32. package/components/avatar.js +58 -44
  33. package/components/badge.js +3 -3
  34. package/components/brand-texture.js +1 -1
  35. package/components/breadcrumbs.d.ts +27 -1
  36. package/components/breadcrumbs.js +94 -42
  37. package/components/button.js +15 -15
  38. package/components/carousel.js +10 -10
  39. package/components/chart.d.ts +14 -0
  40. package/components/chart.js +747 -614
  41. package/components/chip.js +3 -3
  42. package/components/code-block.d.ts +39 -17
  43. package/components/code-block.js +153 -104
  44. package/components/command-palette.js +27 -25
  45. package/components/connector-card.js +2 -2
  46. package/components/dropdown.js +65 -61
  47. package/components/empty-state.js +15 -15
  48. package/components/field.js +23 -23
  49. package/components/index.d.ts +5 -0
  50. package/components/index.js +523 -470
  51. package/components/infinite-canvas.js +60 -60
  52. package/components/kbd.js +6 -6
  53. package/components/link.js +6 -6
  54. package/components/modal.js +22 -20
  55. package/components/page-header.js +1 -1
  56. package/components/pagination.js +22 -22
  57. package/components/pixel-blast-svg.js +1 -1
  58. package/components/pixel-icon.d.ts +31 -0
  59. package/components/pixel-icon.js +733 -0
  60. package/components/popover.js +46 -42
  61. package/components/ripple.d.ts +29 -0
  62. package/components/ripple.js +17 -0
  63. package/components/segmented.js +24 -23
  64. package/components/select.js +71 -67
  65. package/components/selection-action-bar.js +22 -22
  66. package/components/sidebar.d.ts +11 -3
  67. package/components/sidebar.js +161 -148
  68. package/components/stepper.d.ts +2 -0
  69. package/components/stepper.js +80 -43
  70. package/components/table.d.ts +7 -0
  71. package/components/table.js +223 -155
  72. package/components/tabs.d.ts +3 -1
  73. package/components/tabs.js +165 -144
  74. package/components/textarea.js +10 -8
  75. package/components/toast.js +48 -46
  76. package/components/tooltip.js +61 -59
  77. package/components/tree.js +44 -41
  78. package/components/typography.d.ts +1 -1
  79. package/components/typography.js +25 -25
  80. package/components/viz-charts.d.ts +62 -0
  81. package/components/viz-charts.js +408 -0
  82. package/fonts/aribau-grotesk-500.otf +0 -0
  83. package/fonts/aribau-grotesk-600.woff2 +0 -0
  84. package/fonts.css +6 -4
  85. package/lib/icons.d.ts +411 -402
  86. package/lib/icons.js +109 -107
  87. package/lib/viz-format.d.ts +25 -0
  88. package/lib/viz-format.js +40 -0
  89. package/llms.txt +111 -8
  90. package/manifest.json +1096 -58
  91. package/package.json +5 -5
  92. package/styles.css +226 -96
  93. package/theme.css +220 -92
  94. package/fonts/aribau-grotesk-400.otf +0 -0
  95. package/fonts/aribau-grotesk-700.otf +0 -0
@@ -1,12 +1,13 @@
1
1
  "use client";
2
- import { jsxs as g, jsx as t } from "react/jsx-runtime";
3
- import { memo as w, useRef as y, useState as C, useCallback as G } from "react";
4
- import { Loader as k, ChevronDown as R } from "../../lib/icons.js";
2
+ import { jsxs as p, jsx as t } from "react/jsx-runtime";
3
+ import { memo as w, useRef as y, useState as C, useCallback as k } from "react";
4
+ import { ChevronDown as G } from "../../lib/icons.js";
5
5
  import { cva as I } from "class-variance-authority";
6
- import { useScrollLock as A } from "@assistant-ui/react";
7
- import { Collapsible as S, CollapsibleTrigger as j, CollapsibleContent as z } from "../ui/collapsible.js";
6
+ import { useScrollLock as R } from "@assistant-ui/react";
7
+ import { Collapsible as S, CollapsibleTrigger as A, CollapsibleContent as j } from "../ui/collapsible.js";
8
8
  import { cn as n } from "../../lib/cn.js";
9
- const D = 200, L = I("aui-tool-group-root group/tool-group w-full", {
9
+ import { TraceStateIcon as z } from "../ai-elements/chain-of-thought-icon.js";
10
+ const D = 200, U = I("aui-tool-group-root group/tool-group w-full", {
10
11
  variants: {
11
12
  variant: {
12
13
  outline: "rounded-lg border py-3",
@@ -16,48 +17,49 @@ const D = 200, L = I("aui-tool-group-root group/tool-group w-full", {
16
17
  },
17
18
  defaultVariants: { variant: "outline" }
18
19
  });
19
- function m({
20
+ function c({
20
21
  className: r,
21
22
  variant: o,
22
23
  open: a,
23
24
  onOpenChange: e,
24
- defaultOpen: l = !1,
25
- children: f,
25
+ defaultOpen: u = !1,
26
+ children: l,
26
27
  ...h
27
28
  }) {
28
- const p = y(null), [x, b] = C(l), s = A(p, D), u = a !== void 0, N = u ? a : x, T = G(
29
- (d) => {
30
- s(), u || b(d), e == null || e(d);
29
+ const s = y(null), [x, b] = C(u), d = R(s, D), g = a !== void 0, N = g ? a : x, T = k(
30
+ (m) => {
31
+ d(), g || b(m), e == null || e(m);
31
32
  },
32
- [s, u, e]
33
+ [d, g, e]
33
34
  );
34
35
  return /* @__PURE__ */ t(
35
36
  S,
36
37
  {
37
- ref: p,
38
+ ref: s,
38
39
  "data-slot": "tool-group-root",
39
40
  "data-variant": o ?? "outline",
40
41
  open: N,
41
42
  onOpenChange: T,
42
43
  className: n(
43
- L({ variant: o }),
44
+ U({ variant: o }),
44
45
  "group/tool-group-root",
45
46
  r
46
47
  ),
47
48
  ...h,
48
- children: f
49
+ children: l
49
50
  }
50
51
  );
51
52
  }
52
- function c({
53
+ function v({
53
54
  count: r,
54
55
  active: o = !1,
55
- className: a,
56
- ...e
56
+ stage: a = "thinking",
57
+ className: e,
58
+ ...u
57
59
  }) {
58
60
  const l = `${r} tool ${r === 1 ? "call" : "calls"}`;
59
- return /* @__PURE__ */ g(
60
- j,
61
+ return /* @__PURE__ */ p(
62
+ A,
61
63
  {
62
64
  "data-slot": "tool-group-trigger",
63
65
  className: n(
@@ -65,18 +67,21 @@ function c({
65
67
  "group-data-[variant=ghost]/tool-group-root:text-muted-foreground group-data-[variant=ghost]/tool-group-root:hover:text-foreground group-data-[variant=ghost]/tool-group-root:py-1.5",
66
68
  "group-data-[variant=outline]/tool-group-root:w-full group-data-[variant=outline]/tool-group-root:px-4",
67
69
  "group-data-[variant=muted]/tool-group-root:w-full group-data-[variant=muted]/tool-group-root:px-4",
68
- a
70
+ e
69
71
  ),
70
- ...e,
72
+ ...u,
71
73
  children: [
72
- o && /* @__PURE__ */ t(
73
- k,
74
+ /* @__PURE__ */ t(
75
+ z,
74
76
  {
75
- "data-slot": "tool-group-trigger-loader",
76
- className: "aui-tool-group-trigger-loader size-3 shrink-0 animate-spin [animation-duration:var(--duration-spin)] motion-reduce:animate-none"
77
+ "data-slot": "tool-group-trigger-icon",
78
+ stage: a,
79
+ status: o ? "active" : "complete",
80
+ className: "aui-tool-group-trigger-icon size-4 shrink-0",
81
+ "aria-hidden": !0
77
82
  }
78
83
  ),
79
- /* @__PURE__ */ g(
84
+ /* @__PURE__ */ p(
80
85
  "span",
81
86
  {
82
87
  "data-slot": "tool-group-trigger-label",
@@ -101,7 +106,7 @@ function c({
101
106
  }
102
107
  ),
103
108
  /* @__PURE__ */ t(
104
- R,
109
+ G,
105
110
  {
106
111
  "data-slot": "tool-group-trigger-chevron",
107
112
  className: n(
@@ -116,13 +121,13 @@ function c({
116
121
  }
117
122
  );
118
123
  }
119
- function v({
124
+ function f({
120
125
  className: r,
121
126
  children: o,
122
127
  ...a
123
128
  }) {
124
129
  return /* @__PURE__ */ t(
125
- z,
130
+ j,
126
131
  {
127
132
  "data-slot": "tool-group-content",
128
133
  className: n(
@@ -153,21 +158,21 @@ function v({
153
158
  }
154
159
  );
155
160
  }
156
- const U = ({ children: r, startIndex: o, endIndex: a }) => {
161
+ const V = ({ children: r, startIndex: o, endIndex: a }) => {
157
162
  const e = a - o + 1;
158
- return /* @__PURE__ */ g(m, { children: [
159
- /* @__PURE__ */ t(c, { count: e }),
160
- /* @__PURE__ */ t(v, { children: r })
163
+ return /* @__PURE__ */ p(c, { children: [
164
+ /* @__PURE__ */ t(v, { count: e }),
165
+ /* @__PURE__ */ t(f, { children: r })
161
166
  ] });
162
- }, i = w(U);
167
+ }, i = w(V);
163
168
  i.displayName = "ToolGroup";
164
- i.Root = m;
165
- i.Trigger = c;
166
- i.Content = v;
169
+ i.Root = c;
170
+ i.Trigger = v;
171
+ i.Content = f;
167
172
  export {
168
173
  i as ToolGroup,
169
- v as ToolGroupContent,
170
- m as ToolGroupRoot,
171
- c as ToolGroupTrigger,
172
- L as toolGroupVariants
174
+ f as ToolGroupContent,
175
+ c as ToolGroupRoot,
176
+ v as ToolGroupTrigger,
177
+ U as toolGroupVariants
173
178
  };
@@ -2,8 +2,8 @@
2
2
  import { jsxs as l, jsx as r } from "react/jsx-runtime";
3
3
  import * as u from "react";
4
4
  import { Button as ee, buttonVariants as re } from "./button.js";
5
- import { Loader as te, Warning as ae, Pause as ne, Play as oe, Download as ie } from "../lib/icons.js";
6
- import { cn as se } from "../lib/cn.js";
5
+ import { Loader as te, Warning as ae, Pause as ne, Play as oe, Download as se } from "../lib/icons.js";
6
+ import { cn as ie } from "../lib/cn.js";
7
7
  function A(t) {
8
8
  if (!t || !Number.isFinite(t) || t < 0) return "0:00";
9
9
  const e = Math.floor(t), a = Math.floor(e / 3600), c = Math.floor(e % 3600 / 60), d = e % 60;
@@ -40,8 +40,8 @@ function fe({
40
40
  import("wavesurfer.js/dist/plugins/hover.esm.js")
41
41
  ]);
42
42
  if (M) return;
43
- const N = B(o, "--foreground", "currentColor"), O = B(o, "--muted-foreground", "currentColor"), Q = B(o, "--background", "Canvas"), X = (s, P) => {
44
- const Y = s[0] ?? [], Z = s[1] ?? s[0] ?? [], { width: _, height: T } = P.canvas, y = T / 2, S = 4, I = 2, $ = Math.max(1, Math.floor(_ / (S + I))), H = (n, g) => {
43
+ const N = B(o, "--foreground", "currentColor"), O = B(o, "--muted-foreground", "currentColor"), Q = B(o, "--background", "Canvas"), X = (i, P) => {
44
+ const Y = i[0] ?? [], Z = i[1] ?? i[0] ?? [], { width: _, height: T } = P.canvas, y = T / 2, S = 4, I = 2, $ = Math.max(1, Math.floor(_ / (S + I))), H = (n, g) => {
45
45
  if (!n.length) return 0;
46
46
  const h = Math.floor(g / $ * n.length), j = Math.max(h + 1, Math.floor((g + 1) / $ * n.length));
47
47
  let W = 0;
@@ -52,7 +52,7 @@ function fe({
52
52
  const g = n * (S + I), h = Math.max(1, H(Y, n) * (y - 2)), j = Math.max(1, H(Z, n) * (y - 2));
53
53
  P.fillRect(g, y - h, S, h), P.fillRect(g, y + 1, S, j);
54
54
  }
55
- }, i = w.create({
55
+ }, s = w.create({
56
56
  container: o,
57
57
  url: t,
58
58
  duration: e,
@@ -79,11 +79,11 @@ function fe({
79
79
  })
80
80
  ]
81
81
  });
82
- p.current = i, i.on("ready", (s) => {
83
- D(s), C(!0);
84
- }), i.on("timeupdate", (s) => b(s)), i.on("seeking", (s) => b(s)), i.on("play", () => x(!0)), i.on("pause", () => x(!1)), i.on("finish", () => {
85
- x(!1), b(i.getDuration());
86
- }), i.on("error", () => {
82
+ p.current = s, s.on("ready", (i) => {
83
+ D(i), C(!0);
84
+ }), s.on("timeupdate", (i) => b(i)), s.on("seeking", (i) => b(i)), s.on("play", () => x(!0)), s.on("pause", () => x(!1)), s.on("finish", () => {
85
+ x(!1), b(s.getDuration());
86
+ }), s.on("error", () => {
87
87
  R("Recording could not be loaded."), C(!1);
88
88
  });
89
89
  } catch {
@@ -98,16 +98,16 @@ function fe({
98
98
  var o;
99
99
  !k || f || (o = p.current) == null || o.playPause();
100
100
  };
101
- return /* @__PURE__ */ l("div", { className: se("space-y-3", V), "data-slot": "audio-waveform", children: [
101
+ return /* @__PURE__ */ l("div", { className: ie("space-y-3", V), "data-slot": "audio-waveform", children: [
102
102
  /* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-3", children: [
103
103
  /* @__PURE__ */ l("div", { className: "min-w-0", children: [
104
- /* @__PURE__ */ r("p", { className: "text-base font-medium", children: "Recording" }),
104
+ /* @__PURE__ */ r("p", { className: "text-base font-normal", children: "Recording" }),
105
105
  /* @__PURE__ */ r("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: v ? `${d} above · ${m.toLowerCase()} below` : a ?? "Audio" })
106
106
  ] }),
107
107
  /* @__PURE__ */ r("p", { className: "font-mono text-xs tabular-nums text-muted-foreground", children: A(L) })
108
108
  ] }),
109
109
  /* @__PURE__ */ l("div", { className: "relative overflow-hidden py-2", children: [
110
- v && /* @__PURE__ */ l("div", { className: "pointer-events-none absolute inset-x-0 top-2 z-10 flex h-[92px] flex-col items-center justify-between text-[10px] font-medium uppercase tracking-wide text-muted-foreground", children: [
110
+ v && /* @__PURE__ */ l("div", { className: "pointer-events-none absolute inset-x-0 top-2 z-10 flex h-[92px] flex-col items-center justify-between text-xs font-normal uppercase tracking-wide text-muted-foreground", children: [
111
111
  /* @__PURE__ */ r("span", { className: "rounded-sm bg-card/85 px-1.5 py-0.5", children: d }),
112
112
  /* @__PURE__ */ r("span", { className: "rounded-sm bg-card/85 px-1.5 py-0.5", children: m })
113
113
  ] }),
@@ -136,7 +136,7 @@ function fe({
136
136
  }
137
137
  ),
138
138
  /* @__PURE__ */ l("a", { href: t, download: q, className: re({ variant: "ghost" }), children: [
139
- /* @__PURE__ */ r(ie, { "aria-hidden": "true", className: "size-4" }),
139
+ /* @__PURE__ */ r(se, { "aria-hidden": "true", className: "size-4" }),
140
140
  "Audio"
141
141
  ] })
142
142
  ] })
@@ -1,12 +1,13 @@
1
1
  "use client";
2
- import { jsxs as w, jsx as c } from "react/jsx-runtime";
2
+ import { jsxs as x, jsx as c } from "react/jsx-runtime";
3
3
  import * as o from "react";
4
4
  import { MotionConfig as j, AnimatePresence as z, motion as q } from "motion/react";
5
5
  import { Search as O, Check as P } from "../lib/icons.js";
6
6
  import { cn as y } from "../lib/cn.js";
7
7
  import { inputBaseClass as B } from "./field.js";
8
8
  import { floatVariants as F } from "../lib/motion.js";
9
- const K = o.forwardRef(
9
+ import { Ripple as K } from "./ripple.js";
10
+ const Q = o.forwardRef(
10
11
  ({
11
12
  items: u,
12
13
  value: f,
@@ -18,9 +19,9 @@ const K = o.forwardRef(
18
19
  className: S,
19
20
  id: I
20
21
  }, M) => {
21
- const d = u.find((e) => e.value === f), [m, x] = o.useState((d == null ? void 0 : d.label) ?? ""), [r, a] = o.useState(!1), [n, h] = o.useState(-1), N = o.useRef(null), k = o.useRef(null), b = o.useId();
22
+ const d = u.find((e) => e.value === f), [m, h] = o.useState((d == null ? void 0 : d.label) ?? ""), [r, a] = o.useState(!1), [n, w] = o.useState(-1), N = o.useRef(null), k = o.useRef(null), b = o.useId();
22
23
  o.useEffect(() => {
23
- x((d == null ? void 0 : d.label) ?? (p ? f ?? "" : ""));
24
+ h((d == null ? void 0 : d.label) ?? (p ? f ?? "" : ""));
24
25
  }, [d, f, p]);
25
26
  const l = o.useMemo(() => {
26
27
  const e = m.trim().toLowerCase();
@@ -39,26 +40,26 @@ const K = o.forwardRef(
39
40
  const e = (t = k.current) == null ? void 0 : t.children[n];
40
41
  e == null || e.scrollIntoView({ block: "nearest" });
41
42
  }, [r, n]);
42
- const D = (e) => {
43
- l.length !== 0 && h((t) => {
43
+ const g = (e) => {
44
+ l.length !== 0 && w((t) => {
44
45
  let s = t;
45
46
  for (let v = 0; v < l.length; v++)
46
47
  if (s = (s + e + l.length) % l.length, !l[s].disabled) return s;
47
48
  return t;
48
49
  });
49
- }, g = (e) => {
50
+ }, D = (e) => {
50
51
  const t = l[e];
51
- !t || t.disabled || (i == null || i(t.value), x(t.label), a(!1));
52
+ !t || t.disabled || (i == null || i(t.value), h(t.label), a(!1));
52
53
  }, L = (e) => {
53
54
  switch (e.key) {
54
55
  case "ArrowDown":
55
- e.preventDefault(), r ? D(1) : a(!0);
56
+ e.preventDefault(), r ? g(1) : a(!0);
56
57
  break;
57
58
  case "ArrowUp":
58
- e.preventDefault(), r ? D(-1) : a(!0);
59
+ e.preventDefault(), r ? g(-1) : a(!0);
59
60
  break;
60
61
  case "Enter":
61
- r && n >= 0 ? (e.preventDefault(), g(n)) : p && (i == null || i(m), a(!1));
62
+ r && n >= 0 ? (e.preventDefault(), D(n)) : p && (i == null || i(m), a(!1));
62
63
  break;
63
64
  case "Escape":
64
65
  r && (e.preventDefault(), a(!1));
@@ -68,8 +69,8 @@ const K = o.forwardRef(
68
69
  break;
69
70
  }
70
71
  };
71
- return /* @__PURE__ */ w("div", { ref: N, className: "relative", children: [
72
- /* @__PURE__ */ w("div", { className: "group/field relative", children: [
72
+ return /* @__PURE__ */ x("div", { ref: N, className: "relative", children: [
73
+ /* @__PURE__ */ x("div", { className: "group/field relative", children: [
73
74
  /* @__PURE__ */ c(
74
75
  O,
75
76
  {
@@ -95,7 +96,7 @@ const K = o.forwardRef(
95
96
  placeholder: A,
96
97
  value: m,
97
98
  onChange: (e) => {
98
- x(e.target.value), a(!0), h(-1), p && (i == null || i(e.target.value));
99
+ h(e.target.value), a(!0), w(-1), p && (i == null || i(e.target.value));
99
100
  },
100
101
  onFocus: () => a(!0),
101
102
  onKeyDown: L,
@@ -103,7 +104,7 @@ const K = o.forwardRef(
103
104
  }
104
105
  )
105
106
  ] }),
106
- /* @__PURE__ */ c(j, { reducedMotion: "user", children: /* @__PURE__ */ c(z, { children: r && /* @__PURE__ */ c(
107
+ /* @__PURE__ */ c(j, { reducedMotion: "user", children: /* @__PURE__ */ c(z, { children: r && /* @__PURE__ */ x(
107
108
  q.ul,
108
109
  {
109
110
  ref: k,
@@ -118,45 +119,48 @@ const K = o.forwardRef(
118
119
  "absolute z-50 mt-1.5 max-h-60 w-full overflow-auto p-1",
119
120
  "rounded-md border border-border bg-elevated shadow-elevation"
120
121
  ),
121
- children: l.length === 0 ? /* @__PURE__ */ c(
122
- "li",
123
- {
124
- role: "presentation",
125
- className: "px-2 py-6 text-center text-xs text-muted-foreground",
126
- children: "No results"
127
- }
128
- ) : l.map((e, t) => {
129
- const s = e.value === f, v = t === n;
130
- return /* @__PURE__ */ w(
122
+ children: [
123
+ /* @__PURE__ */ c(K, { origin: "top" }),
124
+ l.length === 0 ? /* @__PURE__ */ c(
131
125
  "li",
132
126
  {
133
- id: `${b}-opt-${t}`,
134
- role: "option",
135
- "aria-selected": s,
136
- "aria-disabled": e.disabled || void 0,
137
- onMouseEnter: () => !e.disabled && h(t),
138
- onMouseDown: ($) => $.preventDefault(),
139
- onClick: () => g(t),
140
- className: y(
141
- "flex cursor-pointer items-center justify-between gap-2",
142
- "rounded-sm px-2 py-1.5 text-xs text-foreground select-none",
143
- v && !e.disabled && "bg-muted",
144
- e.disabled && "pointer-events-none opacity-50"
145
- ),
146
- children: [
147
- /* @__PURE__ */ c("span", { className: "truncate", children: e.label }),
148
- s && /* @__PURE__ */ c(P, { className: "size-4 shrink-0", "aria-hidden": !0 })
149
- ]
150
- },
151
- e.value
152
- );
153
- })
127
+ role: "presentation",
128
+ className: "px-2 py-6 text-center text-xs text-muted-foreground",
129
+ children: "No results"
130
+ }
131
+ ) : l.map((e, t) => {
132
+ const s = e.value === f, v = t === n;
133
+ return /* @__PURE__ */ x(
134
+ "li",
135
+ {
136
+ id: `${b}-opt-${t}`,
137
+ role: "option",
138
+ "aria-selected": s,
139
+ "aria-disabled": e.disabled || void 0,
140
+ onMouseEnter: () => !e.disabled && w(t),
141
+ onMouseDown: ($) => $.preventDefault(),
142
+ onClick: () => D(t),
143
+ className: y(
144
+ "flex cursor-pointer items-center justify-between gap-2",
145
+ "rounded-sm px-2 py-1.5 text-xs text-foreground select-none",
146
+ v && !e.disabled && "bg-muted",
147
+ e.disabled && "pointer-events-none opacity-50"
148
+ ),
149
+ children: [
150
+ /* @__PURE__ */ c("span", { className: "truncate", children: e.label }),
151
+ s && /* @__PURE__ */ c(P, { className: "size-4 shrink-0", "aria-hidden": !0 })
152
+ ]
153
+ },
154
+ e.value
155
+ );
156
+ })
157
+ ]
154
158
  }
155
159
  ) }) })
156
160
  ] });
157
161
  }
158
162
  );
159
- K.displayName = "Autocomplete";
163
+ Q.displayName = "Autocomplete";
160
164
  export {
161
- K as Autocomplete
165
+ Q as Autocomplete
162
166
  };
@@ -1,83 +1,97 @@
1
1
  "use client";
2
- import { jsx as r, jsxs as v } from "react/jsx-runtime";
3
- import * as u from "react";
4
- import { cn as n } from "../lib/cn.js";
5
- const m = {
2
+ import { jsx as l, jsxs as x } from "react/jsx-runtime";
3
+ import * as f from "react";
4
+ import { cn as o } from "../lib/cn.js";
5
+ const g = {
6
6
  sm: "size-8 text-xs",
7
7
  md: "size-10 text-xs",
8
8
  lg: "size-12 text-base",
9
9
  xl: "size-16 text-lg"
10
- }, g = {
10
+ }, p = {
11
11
  full: "rounded-full",
12
12
  lg: "rounded-lg"
13
13
  };
14
- function b(l) {
15
- const e = l.trim().split(/\s+/).filter(Boolean);
14
+ function v(r) {
15
+ const e = r.trim().split(/\s+/).filter(Boolean);
16
16
  return e.length === 0 ? "" : e.length === 1 ? e[0].slice(0, 2).toUpperCase() : (e[0][0] + e[e.length - 1][0]).toUpperCase();
17
17
  }
18
- const x = u.forwardRef(
19
- ({ className: l, src: e, name: t, size: s = "md", radius: a = "full", ...o }, d) => {
20
- const i = t ? b(t) : "";
21
- return /* @__PURE__ */ r(
18
+ const m = [
19
+ "bg-(--color-cyan-soft) text-(--color-cyan-deep)",
20
+ "bg-(--color-lime-soft) text-(--color-lime-deep)",
21
+ "bg-(--color-amber-soft) text-(--color-amber-deep)",
22
+ "bg-info-100 text-info-700",
23
+ "bg-sage-300 text-sage-950"
24
+ ];
25
+ function y(r) {
26
+ let e = 0;
27
+ for (const t of r) e = e * 31 + t.charCodeAt(0) >>> 0;
28
+ return m[e % m.length];
29
+ }
30
+ const N = f.forwardRef(
31
+ ({ className: r, src: e, name: t, size: i = "md", radius: s = "full", ...a }, c) => {
32
+ const n = t ? v(t) : "";
33
+ return /* @__PURE__ */ l(
22
34
  "span",
23
35
  {
24
- ref: d,
36
+ ref: c,
25
37
  role: "img",
26
38
  "aria-label": t,
27
- className: n(
28
- "relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden font-medium",
29
- "bg-fill text-fill-foreground",
30
- m[s],
31
- g[a],
32
- l
39
+ className: o(
40
+ "relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden font-normal",
41
+ // Images sit on the neutral fill; initials take a deterministic
42
+ // per-name identity tint so a roster reads multi-color.
43
+ e || !t ? "bg-fill text-fill-foreground" : y(t),
44
+ g[i],
45
+ p[s],
46
+ r
33
47
  ),
34
- ...o,
35
- children: e ? /* @__PURE__ */ r(
48
+ ...a,
49
+ children: e ? /* @__PURE__ */ l(
36
50
  "img",
37
51
  {
38
52
  src: e,
39
53
  alt: t ?? "",
40
54
  className: "size-full object-cover"
41
55
  }
42
- ) : /* @__PURE__ */ r("span", { "aria-hidden": !0, children: i })
56
+ ) : /* @__PURE__ */ l("span", { "aria-hidden": !0, children: n })
43
57
  }
44
58
  );
45
59
  }
46
60
  );
47
- x.displayName = "Avatar";
48
- const N = u.forwardRef(
49
- ({ className: l, max: e, size: t = "md", radius: s = "full", children: a, ...o }, d) => {
50
- const i = u.Children.toArray(a), c = typeof e == "number" ? i.length - e : 0, p = typeof e == "number" ? i.slice(0, e) : i;
51
- return /* @__PURE__ */ v(
61
+ N.displayName = "Avatar";
62
+ const z = f.forwardRef(
63
+ ({ className: r, max: e, size: t = "md", radius: i = "full", children: s, ...a }, c) => {
64
+ const n = f.Children.toArray(s), d = typeof e == "number" ? n.length - e : 0, h = typeof e == "number" ? n.slice(0, e) : n;
65
+ return /* @__PURE__ */ x(
52
66
  "div",
53
67
  {
54
- ref: d,
55
- className: n("flex items-center", l),
56
- ...o,
68
+ ref: c,
69
+ className: o("flex items-center", r),
70
+ ...a,
57
71
  children: [
58
- p.map((h, f) => /* @__PURE__ */ r(
72
+ h.map((b, u) => /* @__PURE__ */ l(
59
73
  "div",
60
74
  {
61
- className: n(
75
+ className: o(
62
76
  "ring-2 ring-background rounded-full",
63
- f > 0 && "-ml-2"
77
+ u > 0 && "-ml-2"
64
78
  ),
65
- children: h
79
+ children: b
66
80
  },
67
- f
81
+ u
68
82
  )),
69
- c > 0 && /* @__PURE__ */ r("div", { className: n("ring-2 ring-background rounded-full -ml-2"), children: /* @__PURE__ */ r(
83
+ d > 0 && /* @__PURE__ */ l("div", { className: o("ring-2 ring-background rounded-full -ml-2"), children: /* @__PURE__ */ l(
70
84
  "span",
71
85
  {
72
86
  role: "img",
73
- "aria-label": `${c} more`,
74
- className: n(
75
- "relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden font-medium",
87
+ "aria-label": `${d} more`,
88
+ className: o(
89
+ "relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden font-normal",
76
90
  "bg-muted text-muted-foreground",
77
- m[t],
78
- g[s]
91
+ g[t],
92
+ p[i]
79
93
  ),
80
- children: /* @__PURE__ */ r("span", { "aria-hidden": !0, children: `+${c}` })
94
+ children: /* @__PURE__ */ l("span", { "aria-hidden": !0, children: `+${d}` })
81
95
  }
82
96
  ) })
83
97
  ]
@@ -85,8 +99,8 @@ const N = u.forwardRef(
85
99
  );
86
100
  }
87
101
  );
88
- N.displayName = "AvatarGroup";
102
+ z.displayName = "AvatarGroup";
89
103
  export {
90
- x as Avatar,
91
- N as AvatarGroup
104
+ N as Avatar,
105
+ z as AvatarGroup
92
106
  };
@@ -4,7 +4,7 @@ import * as d from "react";
4
4
  import { cva as c } from "class-variance-authority";
5
5
  import { cn as o } from "../lib/cn.js";
6
6
  const g = c(
7
- "inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium whitespace-nowrap",
7
+ "inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-normal whitespace-nowrap",
8
8
  {
9
9
  variants: {
10
10
  variant: {
@@ -25,7 +25,7 @@ const g = c(
25
25
  compoundVariants: [
26
26
  // solid
27
27
  { variant: "solid", color: "default", className: "bg-fill text-fill-foreground" },
28
- { variant: "solid", color: "primary", className: "bg-brand text-brand-foreground" },
28
+ { variant: "solid", color: "primary", className: "bg-foreground text-background" },
29
29
  { variant: "solid", color: "success", className: "bg-success text-success-foreground" },
30
30
  { variant: "solid", color: "warning", className: "bg-warning text-warning-foreground" },
31
31
  { variant: "solid", color: "danger", className: "bg-danger text-danger-foreground" },
@@ -49,7 +49,7 @@ const g = c(
49
49
  }
50
50
  ), f = {
51
51
  default: "bg-muted-foreground",
52
- primary: "bg-brand",
52
+ primary: "bg-foreground",
53
53
  success: "bg-success",
54
54
  warning: "bg-warning",
55
55
  danger: "bg-danger",
@@ -11,7 +11,7 @@ function l({
11
11
  s,
12
12
  {
13
13
  variant: "custom",
14
- color: "var(--color-ink-950)",
14
+ color: "var(--texture-ink)",
15
15
  pixelSize: 4,
16
16
  speed: a,
17
17
  patternScale: 3,
@@ -1,8 +1,34 @@
1
1
  import * as React from "react";
2
- export type BreadcrumbsProps = React.HTMLAttributes<HTMLElement>;
2
+ export interface BreadcrumbsProps extends React.HTMLAttributes<HTMLElement> {
3
+ /**
4
+ * Pin the trail to the top of its scroll container. While pinned and the
5
+ * content has scrolled beneath it, a hairline stroke fades in below the row
6
+ * to separate the header from the scrolled content (and clears at the top).
7
+ */
8
+ sticky?: boolean;
9
+ /**
10
+ * Render a leading back-arrow control before the trail (the standard ADS
11
+ * back affordance). Fires on click; give it an accessible label via
12
+ * `backLabel` if the default "Back" isn't right.
13
+ */
14
+ onBack?: () => void;
15
+ backLabel?: string;
16
+ /**
17
+ * Right-aligned controls rendered inside the trail row (page actions, an
18
+ * overflow menu) — they ride along when the trail is sticky.
19
+ */
20
+ actions?: React.ReactNode;
21
+ /**
22
+ * Supporting metadata stitched inline right after the trail (schema name,
23
+ * sync status…). Muted, truncates before the trail does.
24
+ */
25
+ meta?: React.ReactNode;
26
+ }
3
27
  export declare const Breadcrumbs: React.ForwardRefExoticComponent<BreadcrumbsProps & React.RefAttributes<HTMLElement>>;
4
28
  export interface BreadcrumbItemProps extends React.HTMLAttributes<HTMLLIElement> {
5
29
  href?: string;
6
30
  isCurrent?: boolean;
31
+ /** Leading glyph or avatar shown before the label (e.g. a source icon). */
32
+ icon?: React.ReactNode;
7
33
  }
8
34
  export declare const BreadcrumbItem: React.ForwardRefExoticComponent<BreadcrumbItemProps & React.RefAttributes<HTMLLIElement>>;