@actioneer/ads 0.5.4 → 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 (91) 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.js +77 -77
  40. package/components/chip.js +3 -3
  41. package/components/code-block.d.ts +39 -17
  42. package/components/code-block.js +153 -104
  43. package/components/command-palette.js +27 -25
  44. package/components/connector-card.js +2 -2
  45. package/components/dropdown.js +65 -61
  46. package/components/empty-state.js +15 -15
  47. package/components/field.js +23 -23
  48. package/components/index.d.ts +4 -0
  49. package/components/index.js +523 -477
  50. package/components/infinite-canvas.js +60 -60
  51. package/components/kbd.js +6 -6
  52. package/components/link.js +6 -6
  53. package/components/modal.js +22 -20
  54. package/components/page-header.js +1 -1
  55. package/components/pagination.js +22 -22
  56. package/components/pixel-blast-svg.js +1 -1
  57. package/components/pixel-icon.d.ts +31 -0
  58. package/components/pixel-icon.js +733 -0
  59. package/components/popover.js +46 -42
  60. package/components/ripple.d.ts +29 -0
  61. package/components/ripple.js +17 -0
  62. package/components/segmented.js +24 -23
  63. package/components/select.js +71 -67
  64. package/components/selection-action-bar.js +22 -22
  65. package/components/sidebar.d.ts +11 -3
  66. package/components/sidebar.js +161 -148
  67. package/components/stepper.d.ts +2 -0
  68. package/components/stepper.js +80 -43
  69. package/components/table.d.ts +7 -0
  70. package/components/table.js +223 -155
  71. package/components/tabs.d.ts +3 -1
  72. package/components/tabs.js +165 -144
  73. package/components/textarea.js +10 -8
  74. package/components/toast.js +48 -46
  75. package/components/tooltip.js +61 -59
  76. package/components/tree.js +44 -41
  77. package/components/typography.d.ts +1 -1
  78. package/components/typography.js +25 -25
  79. package/components/viz-charts.js +133 -133
  80. package/fonts/aribau-grotesk-500.otf +0 -0
  81. package/fonts/aribau-grotesk-600.woff2 +0 -0
  82. package/fonts.css +6 -4
  83. package/lib/icons.d.ts +411 -402
  84. package/lib/icons.js +109 -107
  85. package/llms.txt +96 -8
  86. package/manifest.json +951 -54
  87. package/package.json +5 -5
  88. package/styles.css +206 -81
  89. package/theme.css +200 -77
  90. package/fonts/aribau-grotesk-400.otf +0 -0
  91. package/fonts/aribau-grotesk-700.otf +0 -0
@@ -6,66 +6,67 @@ import { MotionConfig as O, AnimatePresence as W, motion as F } from "motion/rea
6
6
  import { WarningCircle as B, Warning as D, Info as N, CheckCircle as U, Close as V } from "../lib/icons.js";
7
7
  import { cn as g } from "../lib/cn.js";
8
8
  import { toastSpring as q, EASE_OUT as G } from "../lib/motion.js";
9
- import { Button as J } from "./button.js";
10
- import { Spinner as K } from "./spinner.js";
9
+ import { Ripple as J } from "./ripple.js";
10
+ import { Button as K } from "./button.js";
11
+ import { Spinner as Q } from "./spinner.js";
11
12
  const z = o.createContext(null);
12
- function at() {
13
- const x = o.useContext(z);
14
- if (!x)
13
+ function lt() {
14
+ const b = o.useContext(z);
15
+ if (!b)
15
16
  throw new Error("useToast must be used within a <ToastProvider>.");
16
- const { push: c, close: m, clear: f } = x;
17
+ const { push: c, close: p, clear: f } = b;
17
18
  return { toast: o.useMemo(() => {
18
19
  const s = ((r, i) => {
19
20
  if (r !== null && typeof r == "object" && !o.isValidElement(r)) {
20
- const { title: d, ...p } = r;
21
- return c(d, { ...p, ...i });
21
+ const { title: d, ...m } = r;
22
+ return c(d, { ...m, ...i });
22
23
  }
23
24
  return c(r, i);
24
25
  }), l = (r) => (i, d) => c(i, { ...d, variant: r });
25
- return s.success = l("success"), s.info = l("info"), s.warning = l("warning"), s.danger = l("danger"), s.close = m, s.clear = f, s.promise = (r, i) => {
26
+ return s.success = l("success"), s.info = l("info"), s.warning = l("warning"), s.danger = l("danger"), s.close = p, s.clear = f, s.promise = (r, i) => {
26
27
  const d = c(i.loading, { isLoading: !0, timeout: 0 });
27
- return r.then((p) => {
28
- m(d), c(
29
- typeof i.success == "function" ? i.success(p) : i.success,
28
+ return r.then((m) => {
29
+ p(d), c(
30
+ typeof i.success == "function" ? i.success(m) : i.success,
30
31
  { variant: "success" }
31
32
  );
32
- }).catch((p) => {
33
- m(d), c(
34
- typeof i.error == "function" ? i.error(p) : i.error,
33
+ }).catch((m) => {
34
+ p(d), c(
35
+ typeof i.error == "function" ? i.error(m) : i.error,
35
36
  { variant: "danger" }
36
37
  );
37
38
  }), r;
38
39
  }, s;
39
- }, [c, m, f]) };
40
+ }, [c, p, f]) };
40
41
  }
41
- const Q = {
42
+ const X = {
42
43
  default: { icon: N, accent: "text-foreground" },
43
44
  success: { icon: U, accent: "text-success-700" },
44
45
  info: { icon: N, accent: "text-info-700" },
45
46
  warning: { icon: D, accent: "text-warning-700" },
46
47
  danger: { icon: B, accent: "text-danger-700" }
47
- }, X = {
48
+ }, Y = {
48
49
  "bottom-end": "bottom-4 right-4",
49
50
  bottom: "bottom-4 left-1/2 -translate-x-1/2",
50
51
  "bottom-start": "bottom-4 left-4",
51
52
  "top-end": "top-4 right-4",
52
53
  top: "top-4 left-1/2 -translate-x-1/2",
53
54
  "top-start": "top-4 left-4"
54
- }, S = 12, Y = 0.05;
55
- function ct({
56
- children: x,
55
+ }, S = 12, Z = 0.05;
56
+ function ut({
57
+ children: b,
57
58
  placement: c = "bottom-end",
58
- maxVisible: m = 3
59
+ maxVisible: p = 3
59
60
  }) {
60
61
  var k;
61
- const [f, b] = o.useState([]), s = o.useRef(/* @__PURE__ */ new Map()), l = o.useRef(/* @__PURE__ */ new Map()), r = o.useCallback((t) => {
62
- b((u) => u.filter((h) => h.id !== t));
62
+ const [f, y] = o.useState([]), s = o.useRef(/* @__PURE__ */ new Map()), l = o.useRef(/* @__PURE__ */ new Map()), r = o.useCallback((t) => {
63
+ y((u) => u.filter((h) => h.id !== t));
63
64
  const n = s.current.get(t);
64
65
  n && (clearTimeout(n), s.current.delete(t));
65
66
  const e = l.current.get(t);
66
67
  l.current.delete(t), e == null || e();
67
68
  }, []), i = o.useCallback(() => {
68
- b((t) => (t.forEach((n) => {
69
+ y((t) => (t.forEach((n) => {
69
70
  var u;
70
71
  const e = s.current.get(n.id);
71
72
  e && clearTimeout(e), s.current.delete(n.id), (u = l.current.get(n.id)) == null || u(), l.current.delete(n.id);
@@ -73,7 +74,7 @@ function ct({
73
74
  }, []), d = o.useCallback(
74
75
  (t, n = {}) => {
75
76
  const e = Math.random().toString(36).slice(2), u = { variant: "default", ...n, id: e, title: t };
76
- b((v) => [...v, u]), l.current.set(e, n.onClose);
77
+ y((x) => [...x, u]), l.current.set(e, n.onClose);
77
78
  const h = n.timeout ?? n.duration ?? (n.isLoading ? 0 : 5e3);
78
79
  return h > 0 && s.current.set(e, setTimeout(() => r(e), h)), e;
79
80
  },
@@ -85,9 +86,9 @@ function ct({
85
86
  t.forEach((n) => clearTimeout(n)), t.clear();
86
87
  };
87
88
  }, []);
88
- const p = o.useMemo(() => ({ push: d, close: r, clear: i }), [d, r, i]), [L, R] = o.useState(!1);
89
- o.useEffect(() => R(!0), []);
90
- const [y, P] = o.useState(null), E = o.useRef(null), j = (k = f[f.length - 1]) == null ? void 0 : k.id;
89
+ const m = o.useMemo(() => ({ push: d, close: r, clear: i }), [d, r, i]), [R, L] = o.useState(!1);
90
+ o.useEffect(() => L(!0), []);
91
+ const [w, P] = o.useState(null), E = o.useRef(null), j = (k = f[f.length - 1]) == null ? void 0 : k.id;
91
92
  o.useLayoutEffect(() => {
92
93
  const t = E.current;
93
94
  if (!t) {
@@ -99,22 +100,22 @@ function ct({
99
100
  const e = new ResizeObserver(n);
100
101
  return e.observe(t), () => e.disconnect();
101
102
  }, [j]);
102
- const w = c.startsWith("top"), H = w ? 1 : -1, _ = Math.min(m, Math.max(f.length, 1)), I = y != null ? y + S * (_ - 1) : void 0;
103
- return /* @__PURE__ */ T(z.Provider, { value: p, children: [
104
- x,
105
- L && A(
103
+ const v = c.startsWith("top"), H = v ? 1 : -1, _ = Math.min(p, Math.max(f.length, 1)), I = w != null ? w + S * (_ - 1) : void 0;
104
+ return /* @__PURE__ */ T(z.Provider, { value: m, children: [
105
+ b,
106
+ R && A(
106
107
  /* @__PURE__ */ a(
107
108
  "div",
108
109
  {
109
110
  className: g(
110
111
  "pointer-events-none fixed z-50 w-full max-w-sm",
111
- X[c]
112
+ Y[c]
112
113
  ),
113
114
  style: { height: I },
114
115
  role: "region",
115
116
  "aria-label": "Notifications",
116
117
  children: /* @__PURE__ */ a(O, { reducedMotion: "user", children: /* @__PURE__ */ a(W, { children: f.map((t, n) => {
117
- const e = f.length - 1 - n, u = e === 0, h = e >= m, v = Q[t.variant ?? "default"], $ = v.icon;
118
+ const e = f.length - 1 - n, u = e === 0, h = e >= p, x = X[t.variant ?? "default"], $ = x.icon;
118
119
  return /* @__PURE__ */ T(
119
120
  F.div,
120
121
  {
@@ -124,21 +125,21 @@ function ct({
124
125
  "aria-live": "polite",
125
126
  initial: {
126
127
  opacity: 0,
127
- transform: `translate3d(0, ${w ? -16 : 16}px, 0) scale(0.98)`
128
+ transform: `translate3d(0, ${v ? -16 : 16}px, 0) scale(0.98)`
128
129
  },
129
130
  animate: {
130
131
  opacity: h ? 0 : 1,
131
- transform: `translate3d(0, ${H * e * S}px, 0) scale(${1 - e * Y})`
132
+ transform: `translate3d(0, ${H * e * S}px, 0) scale(${1 - e * Z})`
132
133
  },
133
134
  exit: {
134
135
  opacity: 0,
135
- transform: `translate3d(0, ${w ? -16 : 16}px, 0) scale(0.98)`,
136
+ transform: `translate3d(0, ${v ? -16 : 16}px, 0) scale(0.98)`,
136
137
  transition: { duration: 0.14, ease: G }
137
138
  },
138
139
  transition: q,
139
140
  className: g(
140
141
  "group/toast absolute inset-x-0 flex items-start gap-1.5",
141
- w ? "top-0" : "bottom-0",
142
+ v ? "top-0" : "bottom-0",
142
143
  "rounded-2xl bg-elevated px-4 py-3 shadow-elevation",
143
144
  u ? "pointer-events-auto" : "pointer-events-none overflow-hidden"
144
145
  ),
@@ -146,25 +147,26 @@ function ct({
146
147
  zIndex: 100 - e,
147
148
  // Behind layers freeze at the front card's height so
148
149
  // only their top edge shows as a clean sliver.
149
- height: !u && y != null ? y : void 0
150
+ height: !u && w != null ? w : void 0
150
151
  },
151
152
  children: [
153
+ /* @__PURE__ */ a(J, { origin: v ? "top" : "bottom" }),
152
154
  /* @__PURE__ */ a(
153
155
  "span",
154
156
  {
155
157
  className: g(
156
158
  "flex shrink-0 select-none items-center justify-center p-1 [&_svg]:size-4",
157
- v.accent
159
+ x.accent
158
160
  ),
159
- children: t.isLoading ? /* @__PURE__ */ a(K, { size: "sm", "aria-label": "Loading" }) : t.indicator ?? /* @__PURE__ */ a($, { "aria-hidden": !0 })
161
+ children: t.isLoading ? /* @__PURE__ */ a(Q, { size: "sm", "aria-label": "Loading" }) : t.indicator ?? /* @__PURE__ */ a($, { "aria-hidden": !0 })
160
162
  }
161
163
  ),
162
164
  /* @__PURE__ */ T("div", { className: "flex min-w-0 grow flex-col items-start self-center", children: [
163
- /* @__PURE__ */ a("p", { className: g("text-xs font-medium leading-5", v.accent), children: t.title }),
165
+ /* @__PURE__ */ a("p", { className: g("text-xs font-normal leading-5", x.accent), children: t.title }),
164
166
  t.description && /* @__PURE__ */ a("p", { className: "text-xs text-muted-foreground", children: t.description })
165
167
  ] }),
166
168
  t.actionProps && /* @__PURE__ */ a(
167
- J,
169
+ K,
168
170
  {
169
171
  size: "sm",
170
172
  variant: t.actionProps.variant ?? "soft",
@@ -206,6 +208,6 @@ function ct({
206
208
  ] });
207
209
  }
208
210
  export {
209
- ct as ToastProvider,
210
- at as useToast
211
+ ut as ToastProvider,
212
+ lt as useToast
211
213
  };
@@ -1,69 +1,70 @@
1
1
  "use client";
2
- import { jsxs as L, Fragment as D, jsx as b } from "react/jsx-runtime";
2
+ import { jsxs as k, Fragment as F, jsx as g } from "react/jsx-runtime";
3
3
  import * as r from "react";
4
- import { createPortal as F } from "react-dom";
5
- import { MotionConfig as H, AnimatePresence as I, motion as N } from "motion/react";
6
- import { cn as k } from "../lib/cn.js";
7
- import { tooltipVariants as O } from "../lib/motion.js";
8
- const j = {
4
+ import { createPortal as H } from "react-dom";
5
+ import { MotionConfig as I, AnimatePresence as N, motion as O } from "motion/react";
6
+ import { cn as S } from "../lib/cn.js";
7
+ import { tooltipVariants as j } from "../lib/motion.js";
8
+ import { Ripple as _ } from "./ripple.js";
9
+ const V = {
9
10
  top: "bottom-0 left-1/2 -translate-x-1/2 translate-y-1/2",
10
11
  bottom: "top-0 left-1/2 -translate-x-1/2 -translate-y-1/2",
11
12
  left: "right-0 top-1/2 translate-x-1/2 -translate-y-1/2",
12
13
  right: "left-0 top-1/2 -translate-x-1/2 -translate-y-1/2"
13
- }, _ = {
14
+ }, W = {
14
15
  top: "bottom",
15
16
  bottom: "top",
16
17
  left: "right",
17
18
  right: "left"
18
19
  };
19
- let S = 0;
20
- const V = 300;
21
- function U({
22
- content: W,
23
- children: z,
24
- side: d = "top",
25
- delay: B = 300,
26
- className: P
20
+ let z = 0;
21
+ const q = 300;
22
+ function Y({
23
+ content: B,
24
+ children: P,
25
+ side: a = "top",
26
+ delay: T = 300,
27
+ className: A
27
28
  }) {
28
- const [a, g] = r.useState(!1), [T, x] = r.useState(!1), [i, A] = r.useState(null), v = r.useRef(null), M = r.useRef(null), f = r.useRef(null), y = r.useId(), w = () => {
29
- f.current && (clearTimeout(f.current), f.current = null);
29
+ const [l, w] = r.useState(!1), [x, v] = r.useState(!1), [i, C] = r.useState(null), M = r.useRef(null), y = r.useRef(null), d = r.useRef(null), R = r.useId(), b = () => {
30
+ d.current && (clearTimeout(d.current), d.current = null);
30
31
  }, E = () => {
31
- if (w(), Date.now() - S < V) {
32
- x(!0), g(!0);
32
+ if (b(), Date.now() - z < q) {
33
+ v(!0), w(!0);
33
34
  return;
34
35
  }
35
- x(!1), f.current = setTimeout(() => g(!0), B);
36
- }, R = () => {
37
- w(), a && (S = Date.now()), g(!1);
36
+ v(!1), d.current = setTimeout(() => w(!0), T);
37
+ }, L = () => {
38
+ b(), l && (z = Date.now()), w(!1);
38
39
  };
39
- r.useEffect(() => () => w(), []), r.useLayoutEffect(() => {
40
- if (!a) return;
41
- const n = v.current, e = M.current;
40
+ r.useEffect(() => () => b(), []), r.useLayoutEffect(() => {
41
+ if (!l) return;
42
+ const n = M.current, e = y.current;
42
43
  if (!n || !e) return;
43
44
  const t = () => {
44
45
  const o = n.getBoundingClientRect(), p = e.offsetWidth, m = e.offsetHeight, h = 6, s = 8;
45
- let c = 0, u = 0;
46
- switch (d) {
46
+ let u = 0, f = 0;
47
+ switch (a) {
47
48
  case "top":
48
- c = o.top - m - h, u = o.left + o.width / 2 - p / 2;
49
+ u = o.top - m - h, f = o.left + o.width / 2 - p / 2;
49
50
  break;
50
51
  case "bottom":
51
- c = o.bottom + h, u = o.left + o.width / 2 - p / 2;
52
+ u = o.bottom + h, f = o.left + o.width / 2 - p / 2;
52
53
  break;
53
54
  case "left":
54
- c = o.top + o.height / 2 - m / 2, u = o.left - p - h;
55
+ u = o.top + o.height / 2 - m / 2, f = o.left - p - h;
55
56
  break;
56
57
  case "right":
57
- c = o.top + o.height / 2 - m / 2, u = o.right + h;
58
+ u = o.top + o.height / 2 - m / 2, f = o.right + h;
58
59
  break;
59
60
  }
60
- A({
61
+ C({
61
62
  top: Math.min(
62
- Math.max(c, s),
63
+ Math.max(u, s),
63
64
  Math.max(s, window.innerHeight - m - s)
64
65
  ),
65
66
  left: Math.min(
66
- Math.max(u, s),
67
+ Math.max(f, s),
67
68
  Math.max(s, window.innerWidth - p - s)
68
69
  )
69
70
  });
@@ -71,66 +72,67 @@ function U({
71
72
  return t(), window.addEventListener("resize", t), window.addEventListener("scroll", t, !0), () => {
72
73
  window.removeEventListener("resize", t), window.removeEventListener("scroll", t, !0);
73
74
  };
74
- }, [a, d]);
75
- const l = z, C = r.cloneElement(l, {
76
- ref: v,
77
- "aria-describedby": a ? y : void 0,
75
+ }, [l, a]);
76
+ const c = P, D = r.cloneElement(c, {
77
+ ref: M,
78
+ "aria-describedby": l ? R : void 0,
78
79
  onMouseEnter: (n) => {
79
80
  var e, t;
80
- (t = (e = l.props).onMouseEnter) == null || t.call(e, n), E();
81
+ (t = (e = c.props).onMouseEnter) == null || t.call(e, n), E();
81
82
  },
82
83
  onMouseLeave: (n) => {
83
84
  var e, t;
84
- (t = (e = l.props).onMouseLeave) == null || t.call(e, n), R();
85
+ (t = (e = c.props).onMouseLeave) == null || t.call(e, n), L();
85
86
  },
86
87
  onFocus: (n) => {
87
88
  var e, t;
88
- (t = (e = l.props).onFocus) == null || t.call(e, n), E();
89
+ (t = (e = c.props).onFocus) == null || t.call(e, n), E();
89
90
  },
90
91
  onBlur: (n) => {
91
92
  var e, t;
92
- (t = (e = l.props).onBlur) == null || t.call(e, n), R();
93
+ (t = (e = c.props).onBlur) == null || t.call(e, n), L();
93
94
  }
94
95
  });
95
- return /* @__PURE__ */ L(D, { children: [
96
- C,
97
- F(
98
- /* @__PURE__ */ b(H, { reducedMotion: "user", children: /* @__PURE__ */ b(I, { children: a && /* @__PURE__ */ L(
99
- N.div,
96
+ return /* @__PURE__ */ k(F, { children: [
97
+ D,
98
+ H(
99
+ /* @__PURE__ */ g(I, { reducedMotion: "user", children: /* @__PURE__ */ g(N, { children: l && /* @__PURE__ */ k(
100
+ O.div,
100
101
  {
101
- ref: M,
102
+ ref: y,
102
103
  role: "tooltip",
103
- id: y,
104
- variants: O,
104
+ id: R,
105
+ variants: j,
105
106
  initial: "hidden",
106
107
  animate: "visible",
107
108
  exit: "hidden",
108
- transition: T ? { duration: 0 } : void 0,
109
+ transition: x ? { duration: 0 } : void 0,
109
110
  style: {
110
111
  position: "fixed",
111
112
  top: (i == null ? void 0 : i.top) ?? 0,
112
113
  left: (i == null ? void 0 : i.left) ?? 0,
113
114
  visibility: i ? "visible" : "hidden",
114
- transformOrigin: _[d]
115
+ transformOrigin: W[a]
115
116
  },
116
- className: k(
117
+ className: S(
117
118
  "relative z-50 max-w-xs rounded-md bg-foreground px-2 py-1",
118
119
  "text-xs text-background",
119
120
  "pointer-events-none select-none",
120
- P
121
+ A
121
122
  ),
122
123
  children: [
123
- /* @__PURE__ */ b(
124
+ !x && /* @__PURE__ */ g(_, { origin: W[a] }),
125
+ /* @__PURE__ */ g(
124
126
  "span",
125
127
  {
126
128
  "aria-hidden": !0,
127
- className: k(
129
+ className: S(
128
130
  "absolute size-2 rotate-45 rounded-[1px] bg-foreground",
129
- j[d]
131
+ V[a]
130
132
  )
131
133
  }
132
134
  ),
133
- W
135
+ B
134
136
  ]
135
137
  }
136
138
  ) }) }),
@@ -139,5 +141,5 @@ function U({
139
141
  ] });
140
142
  }
141
143
  export {
142
- U as Tooltip
144
+ Y as Tooltip
143
145
  };
@@ -1,64 +1,67 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as b, Fragment as v } from "react/jsx-runtime";
3
- import * as r from "react";
2
+ import { jsx as e, jsxs as x, Fragment as N } from "react/jsx-runtime";
3
+ import * as t from "react";
4
4
  import { cn as s } from "../lib/cn.js";
5
- import { ChevronRight as j, FileText as F } from "../lib/icons.js";
6
- const _ = r.forwardRef(({ className: l, ...i }, d) => /* @__PURE__ */ e(
5
+ import { ChevronRight as _, FileText as z } from "../lib/icons.js";
6
+ const S = t.forwardRef(({ className: i, ...d }, f) => /* @__PURE__ */ e(
7
7
  "div",
8
8
  {
9
- ref: d,
9
+ ref: f,
10
10
  role: "tree",
11
- className: s("text-xs", l),
12
- ...i
11
+ className: s("flex flex-col gap-0.5 text-xs", i),
12
+ ...d
13
13
  }
14
14
  ));
15
- _.displayName = "Tree";
16
- const z = r.forwardRef(
15
+ S.displayName = "Tree";
16
+ const V = t.forwardRef(
17
17
  ({
18
- className: l,
19
- label: i,
20
- icon: d,
21
- count: h,
22
- endContent: N,
23
- defaultExpanded: w = !1,
24
- expanded: p,
18
+ className: i,
19
+ label: d,
20
+ icon: f,
21
+ count: p,
22
+ endContent: w,
23
+ defaultExpanded: y = !1,
24
+ expanded: h,
25
25
  onExpandedChange: c,
26
- href: x,
27
- isActive: f,
28
- onSelect: y,
29
- children: o,
30
- ...C
31
- }, I) => {
32
- const t = r.Children.count(o) > 0, g = p !== void 0, [k, T] = r.useState(w), n = g ? p : k, R = (a) => {
33
- g || T(a), c == null || c(a);
26
+ href: g,
27
+ isActive: o,
28
+ onSelect: C,
29
+ children: n,
30
+ ...I
31
+ }, k) => {
32
+ const r = t.Children.count(n) > 0, v = h !== void 0, [T, R] = t.useState(y), l = v ? h : T, j = (a) => {
33
+ v || R(a), c == null || c(a);
34
34
  }, m = s(
35
- "flex h-8 w-full items-center gap-2 rounded-md px-2 text-left",
35
+ "flex h-9 w-full items-center gap-2 rounded-md px-2 text-left",
36
36
  "outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring",
37
37
  "[&_svg]:size-4 [&_svg]:shrink-0",
38
- f ? "bg-fill font-medium text-foreground" : "text-muted-foreground hover:bg-fill/60 hover:text-foreground"
39
- ), u = /* @__PURE__ */ b(v, { children: [
40
- d ?? (t ? null : /* @__PURE__ */ e(F, { className: "text-tertiary" })),
41
- /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate", children: i }),
42
- N,
43
- t && /* @__PURE__ */ b(v, { children: [
44
- (h ?? r.Children.count(o)) > 0 && /* @__PURE__ */ e("span", { className: "shrink-0 tabular-nums text-xs text-tertiary", children: h ?? r.Children.count(o) }),
38
+ o ? "bg-fill font-normal text-foreground" : "text-muted-foreground hover:bg-fill/60 hover:text-foreground"
39
+ ), u = f ?? (r ? null : /* @__PURE__ */ e(z, { className: "text-tertiary" })), F = o && t.isValidElement(u) ? t.cloneElement(
40
+ u,
41
+ { weight: "fill" }
42
+ ) : u, b = /* @__PURE__ */ x(N, { children: [
43
+ F,
44
+ /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate", children: d }),
45
+ w,
46
+ r && /* @__PURE__ */ x(N, { children: [
47
+ (p ?? t.Children.count(n)) > 0 && /* @__PURE__ */ e("span", { className: "shrink-0 tabular-nums text-xs text-tertiary", children: p ?? t.Children.count(n) }),
45
48
  /* @__PURE__ */ e(
46
- j,
49
+ _,
47
50
  {
48
51
  className: s(
49
52
  "text-muted-foreground transition-transform duration-(--duration-fast) motion-reduce:transition-none",
50
- n && "rotate-90"
53
+ l && "rotate-90"
51
54
  ),
52
55
  strokeWidth: 2
53
56
  }
54
57
  )
55
58
  ] })
56
59
  ] });
57
- return /* @__PURE__ */ b("div", { ref: I, role: "treeitem", "aria-expanded": t ? n : void 0, "aria-selected": f, className: l, ...C, children: [
58
- t ? /* @__PURE__ */ e("button", { type: "button", className: m, onClick: () => R(!n), children: u }) : x ? /* @__PURE__ */ e("a", { href: x, className: m, "aria-current": f ? "page" : void 0, children: u }) : /* @__PURE__ */ e("button", { type: "button", className: m, onClick: y, children: u }),
59
- t && n && // ml-4 aligns the rail under the parent icon; each child carries the
60
+ return /* @__PURE__ */ x("div", { ref: k, role: "treeitem", "aria-expanded": r ? l : void 0, "aria-selected": o, className: i, ...I, children: [
61
+ r ? /* @__PURE__ */ e("button", { type: "button", className: m, onClick: () => j(!l), children: b }) : g ? /* @__PURE__ */ e("a", { href: g, className: m, "aria-current": o ? "page" : void 0, children: b }) : /* @__PURE__ */ e("button", { type: "button", className: m, onClick: C, children: b }),
62
+ r && l && // ml-4 aligns the rail under the parent icon; each child carries the
60
63
  // elbow (before) + rail continuation (after), hidden on the last.
61
- /* @__PURE__ */ e("div", { role: "group", className: "ml-4", children: r.Children.map(o, (a) => /* @__PURE__ */ e(
64
+ /* @__PURE__ */ e("div", { role: "group", className: "ml-4 flex flex-col gap-0.5", children: t.Children.map(n, (a) => /* @__PURE__ */ e(
62
65
  "div",
63
66
  {
64
67
  className: s(
@@ -79,8 +82,8 @@ const z = r.forwardRef(
79
82
  ] });
80
83
  }
81
84
  );
82
- z.displayName = "TreeItem";
85
+ V.displayName = "TreeItem";
83
86
  export {
84
- _ as Tree,
85
- z as TreeItem
87
+ S as Tree,
88
+ V as TreeItem
86
89
  };
@@ -11,7 +11,7 @@ declare const textSizes: {
11
11
  };
12
12
  declare const textWeights: {
13
13
  readonly regular: "font-normal";
14
- readonly bold: "font-bold";
14
+ readonly bold: "font-semibold";
15
15
  };
16
16
  declare const textColors: {
17
17
  readonly primary: "text-primary";
@@ -1,16 +1,16 @@
1
1
  "use client";
2
- import { jsx as c } from "react/jsx-runtime";
3
- import * as m from "react";
4
- import { cn as x } from "../lib/cn.js";
2
+ import { jsx as n } from "react/jsx-runtime";
3
+ import * as i from "react";
4
+ import { cn as c } from "../lib/cn.js";
5
5
  const p = {
6
- 1: { tag: "h1", className: "text-2xl font-bold tracking-tight" },
7
- 2: { tag: "h2", className: "text-xl font-bold tracking-tight" },
8
- 3: { tag: "h3", className: "text-lg font-bold" },
9
- 4: { tag: "h4", className: "text-base font-bold" }
10
- }, y = m.forwardRef(
11
- ({ className: e, level: a = 1, children: t, ...o }, s) => {
12
- const { tag: r, className: l } = p[a];
13
- return /* @__PURE__ */ c(r, { ref: s, className: x(l, e), ...o, children: t });
6
+ 1: { tag: "h1", className: "text-2xl font-semibold tracking-tight" },
7
+ 2: { tag: "h2", className: "text-xl font-semibold tracking-tight" },
8
+ 3: { tag: "h3", className: "text-lg font-semibold" },
9
+ 4: { tag: "h4", className: "text-base font-semibold" }
10
+ }, y = i.forwardRef(
11
+ ({ className: e, level: s = 1, children: t, ...o }, a) => {
12
+ const { tag: r, className: l } = p[s];
13
+ return /* @__PURE__ */ n(r, { ref: a, className: c(l, e), ...o, children: t });
14
14
  }
15
15
  );
16
16
  y.displayName = "Heading";
@@ -21,40 +21,40 @@ const N = {
21
21
  lg: "text-lg"
22
22
  }, b = {
23
23
  regular: "font-normal",
24
- bold: "font-bold"
25
- }, n = {
24
+ bold: "font-semibold"
25
+ }, m = {
26
26
  primary: "text-primary",
27
27
  secondary: "text-secondary",
28
28
  tertiary: "text-tertiary"
29
- }, u = m.forwardRef(
30
- ({ className: e, size: a = "md", color: t, muted: o = !1, weight: s, as: r = "p", children: l, ...d }, i) => {
31
- const g = r, f = t ? n[t] : o ? n.tertiary : n.primary;
32
- return /* @__PURE__ */ c(
29
+ }, u = i.forwardRef(
30
+ ({ className: e, size: s = "md", color: t, muted: o = !1, weight: a, as: r = "p", children: l, ...x }, d) => {
31
+ const g = r, f = t ? m[t] : o ? m.tertiary : m.primary;
32
+ return /* @__PURE__ */ n(
33
33
  g,
34
34
  {
35
- ref: i,
36
- className: x(
37
- N[a],
38
- s && b[s],
35
+ ref: d,
36
+ className: c(
37
+ N[s],
38
+ a && b[a],
39
39
  f,
40
40
  e
41
41
  ),
42
- ...d,
42
+ ...x,
43
43
  children: l
44
44
  }
45
45
  );
46
46
  }
47
47
  );
48
48
  u.displayName = "Text";
49
- const h = m.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ c(
49
+ const h = i.forwardRef(({ className: e, ...s }, t) => /* @__PURE__ */ n(
50
50
  "code",
51
51
  {
52
52
  ref: t,
53
- className: x(
53
+ className: c(
54
54
  "rounded bg-muted px-1.5 py-0.5 tabular-nums text-xs",
55
55
  e
56
56
  ),
57
- ...a
57
+ ...s
58
58
  }
59
59
  ));
60
60
  h.displayName = "Code";