@actioneer/ads 0.5.2 → 0.5.4

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.
@@ -1,18 +1,18 @@
1
1
  "use client";
2
- import { jsxs as r, jsx as e, Fragment as P } from "react/jsx-runtime";
3
- import * as s from "react";
4
- import { MotionConfig as I, AnimatePresence as O, motion as ee } from "motion/react";
2
+ import { jsxs as r, jsx as e, Fragment as F } from "react/jsx-runtime";
3
+ import * as n from "react";
4
+ import { MotionConfig as O, AnimatePresence as ee, motion as M } from "motion/react";
5
5
  import { cva as te } from "class-variance-authority";
6
- import { Collapsible as re, CollapsibleTrigger as M, CollapsibleContent as ae } from "../collapsible.js";
6
+ import { Collapsible as re, CollapsibleTrigger as D, CollapsibleContent as ae } from "../collapsible.js";
7
7
  import { Spinner as T } from "../spinner.js";
8
- import { Sparkles as V, ChevronDown as B } from "../../lib/icons.js";
9
- import { EASE_OUT as D } from "../../lib/motion.js";
8
+ import { Sparkles as U, ChevronDown as V } from "../../lib/icons.js";
9
+ import { EASE_OUT as _, EASE_DISCLOSURE as ie } from "../../lib/motion.js";
10
10
  import { cn as l } from "../../lib/cn.js";
11
- import { Shimmer as F } from "./shimmer.js";
12
- const ie = te("w-full", {
11
+ import { Shimmer as B } from "./shimmer.js";
12
+ const ne = te("w-full", {
13
13
  variants: {
14
14
  status: {
15
- active: "text-foreground",
15
+ active: "text-secondary",
16
16
  complete: "text-secondary"
17
17
  }
18
18
  }
@@ -26,54 +26,54 @@ const ie = te("w-full", {
26
26
  opacity: 1,
27
27
  transform: "translate3d(0, 0, 0)",
28
28
  filter: "blur(0px)",
29
- transition: { duration: 0.18, ease: D }
29
+ transition: { duration: 0.18, ease: _ }
30
30
  },
31
31
  exit: {
32
32
  opacity: 0,
33
33
  transform: "translate3d(0, -7px, 0)",
34
34
  filter: "blur(2px)",
35
- transition: { duration: 0.12, ease: D }
35
+ transition: { duration: 0.12, ease: _ }
36
36
  }
37
37
  };
38
- function K({
38
+ function C({
39
39
  elapsed: t,
40
- firstInsight: n,
41
- sourceCount: d
40
+ firstInsight: s,
41
+ sourceCount: p
42
42
  }) {
43
43
  return /* @__PURE__ */ r("span", { className: "flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1", children: [
44
44
  /* @__PURE__ */ r("span", { children: [
45
45
  "Researched ",
46
- d,
46
+ p,
47
47
  " ",
48
- d === 1 ? "source" : "sources"
48
+ p === 1 ? "source" : "sources"
49
49
  ] }),
50
50
  /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "text-tertiary", children: "·" }),
51
51
  /* @__PURE__ */ e("span", { className: "text-xs text-tertiary tabular-nums", children: t }),
52
- n != null && /* @__PURE__ */ r(P, { children: [
52
+ s != null && /* @__PURE__ */ r(F, { children: [
53
53
  /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "text-tertiary", children: "·" }),
54
54
  /* @__PURE__ */ r("span", { className: "text-xs text-tertiary", children: [
55
55
  "first insight",
56
56
  " ",
57
- /* @__PURE__ */ e("span", { className: "tabular-nums", children: n })
57
+ /* @__PURE__ */ e("span", { className: "tabular-nums", children: s })
58
58
  ] })
59
59
  ] })
60
60
  ] });
61
61
  }
62
- const ne = s.forwardRef(
62
+ const oe = n.forwardRef(
63
63
  ({
64
64
  status: t,
65
- elapsed: n,
66
- sourceCount: d,
67
- firstInsight: w,
68
- sticky: p = !1,
69
- collapsible: h = !0,
70
- activityPlacement: U = "top",
65
+ elapsed: s,
66
+ sourceCount: p,
67
+ firstInsight: R,
68
+ sticky: h = !1,
69
+ collapsible: x = !0,
70
+ activityPlacement: K = "top",
71
71
  activity: c,
72
- activityKey: _,
73
- stepIndex: R,
72
+ activityKey: P,
73
+ stepIndex: w,
74
74
  stepCount: S,
75
- summary: x,
76
- open: k,
75
+ summary: v,
76
+ open: E,
77
77
  defaultOpen: $ = !1,
78
78
  onOpenChange: a,
79
79
  children: q,
@@ -83,31 +83,31 @@ const ne = s.forwardRef(
83
83
  "aria-busy": Q,
84
84
  ...W
85
85
  }, X) => {
86
- const m = k !== void 0, i = c != null, [Y, y] = s.useState(
86
+ const d = E !== void 0, i = c != null, [Y, y] = n.useState(
87
87
  !i && t === "active" || $
88
- ), z = s.useRef(t), N = s.useRef(!1), E = s.useRef(null), b = s.useRef(null), g = m ? k : Y, v = !i && t === "active" || g, f = U === "bottom" && v;
89
- s.useLayoutEffect(() => {
88
+ ), k = n.useRef(t), b = n.useRef(!1), z = n.useRef(null), N = n.useRef(null), g = d ? E : Y, u = !i && t === "active" || g, f = K === "bottom" && u;
89
+ n.useLayoutEffect(() => {
90
90
  var L, j;
91
- const u = z.current;
92
- if (z.current = t, t === "active") {
93
- u !== "active" && (N.current = !1), u !== "active" && !i && !m && y(!0);
91
+ const m = k.current;
92
+ if (k.current = t, t === "active") {
93
+ m !== "active" && (b.current = !1), m !== "active" && !i && !d && y(!0);
94
94
  return;
95
95
  }
96
- if (u !== "active" || N.current && i) return;
96
+ if (m !== "active" || b.current && i) return;
97
97
  const A = document.activeElement;
98
- A && ((L = E.current) != null && L.contains(A)) && ((j = b.current) == null || j.focus()), m || y(!1), a == null || a(!1);
99
- }, [i, m, a, t]);
100
- const Z = s.useCallback(
101
- (u) => {
102
- !i && t !== "complete" || (N.current = !0, m || y(u), a == null || a(u));
98
+ A && ((L = z.current) != null && L.contains(A)) && ((j = N.current) == null || j.focus()), d || y(!1), a == null || a(!1);
99
+ }, [i, d, a, t]);
100
+ const Z = n.useCallback(
101
+ (m) => {
102
+ !i && t !== "complete" || (b.current = !0, d || y(m), a == null || a(m));
103
103
  },
104
- [i, m, a, t]
105
- ), o = t === "active", C = o ? `activity-${_ ?? (typeof c == "string" ? c : "current")}` : "summary";
104
+ [i, d, a, t]
105
+ ), o = t === "active", I = o ? `activity-${P ?? (typeof c == "string" ? c : "current")}` : "summary";
106
106
  return /* @__PURE__ */ r(
107
107
  re,
108
108
  {
109
109
  ref: X,
110
- open: v,
110
+ open: u,
111
111
  onOpenChange: Z,
112
112
  role: H ?? "region",
113
113
  "aria-label": J ?? "Research activity",
@@ -116,75 +116,75 @@ const ne = s.forwardRef(
116
116
  "data-slot": "research-activity",
117
117
  "data-status": t,
118
118
  className: l(
119
- ie({ status: t }),
119
+ ne({ status: t }),
120
120
  f && "flex flex-col",
121
121
  G
122
122
  ),
123
123
  children: [
124
124
  /* @__PURE__ */ e("span", { className: "sr-only", "aria-live": "polite", "aria-atomic": "true", children: o ? "Research in progress" : "Research complete" }),
125
- i ? /* @__PURE__ */ e(M, { asChild: !0, children: /* @__PURE__ */ r(
125
+ i ? /* @__PURE__ */ e(D, { asChild: !0, children: /* @__PURE__ */ r(
126
126
  "button",
127
127
  {
128
- ref: b,
128
+ ref: N,
129
129
  type: "button",
130
130
  "data-slot": "research-activity-trigger",
131
131
  className: l(
132
- "group/research-trigger flex min-h-9 w-full cursor-pointer items-center gap-2.5 rounded-sm py-1 text-left text-sm outline-none",
133
- "transition-[color,transform] duration-(--duration-fast) ease-out hover:text-primary active:scale-(--scale-press)",
132
+ "group/research-trigger flex min-h-9 w-full cursor-pointer items-center gap-2.5 rounded-sm py-1 text-left text-base outline-none",
133
+ "transition-colors duration-(--duration-fast) ease-out hover:text-primary",
134
134
  "focus-visible:ring-3 focus-visible:ring-ring motion-reduce:transition-none",
135
- p && "sticky z-10 bg-background",
136
- p && (f ? "bottom-0" : "top-0"),
135
+ h && "sticky z-10 bg-background",
136
+ h && (f ? "bottom-0" : "top-0"),
137
137
  f && "order-last mt-3"
138
138
  ),
139
139
  children: [
140
140
  /* @__PURE__ */ r("span", { className: "sr-only", children: [
141
- v ? "Collapse" : "Expand",
141
+ u ? "Collapse" : "Expand",
142
142
  " research activity:",
143
143
  " "
144
144
  ] }),
145
- /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "flex size-4 shrink-0 items-center justify-center", children: o ? /* @__PURE__ */ e(T, { size: "sm", color: "current", role: "presentation" }) : /* @__PURE__ */ e(V, { className: "size-4" }) }),
146
- /* @__PURE__ */ e(I, { reducedMotion: "user", children: /* @__PURE__ */ e("span", { className: "relative h-5 min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ e(O, { initial: !1, children: /* @__PURE__ */ e(
147
- ee.span,
145
+ /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "flex size-4 shrink-0 items-center justify-center", children: o ? /* @__PURE__ */ e(T, { size: "sm", color: "current", role: "presentation" }) : /* @__PURE__ */ e(U, { className: "size-4" }) }),
146
+ /* @__PURE__ */ e(O, { reducedMotion: "user", children: /* @__PURE__ */ e("span", { className: "relative h-5 min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ e(ee, { initial: !1, children: /* @__PURE__ */ e(
147
+ M.span,
148
148
  {
149
149
  variants: se,
150
150
  initial: "initial",
151
151
  animate: "animate",
152
152
  exit: "exit",
153
153
  className: "absolute inset-0 flex items-center truncate whitespace-nowrap",
154
- children: o ? typeof c == "string" ? /* @__PURE__ */ e(F, { as: "span", className: "truncate text-sm", children: c }) : c : x !== void 0 ? x : /* @__PURE__ */ e(
155
- K,
154
+ children: o ? typeof c == "string" ? /* @__PURE__ */ e(B, { as: "span", className: "truncate text-base", children: c }) : c : v !== void 0 ? v : /* @__PURE__ */ e(
155
+ C,
156
156
  {
157
- elapsed: n,
158
- firstInsight: w,
159
- sourceCount: d
157
+ elapsed: s,
158
+ firstInsight: R,
159
+ sourceCount: p
160
160
  }
161
161
  )
162
162
  },
163
- C
163
+ I
164
164
  ) }) }) }),
165
165
  o && /* @__PURE__ */ r("span", { className: l(
166
166
  "shrink-0 text-xs text-tertiary tabular-nums",
167
167
  // Reserve the caret slot (size-4 + gap-2) so trailing metadata
168
168
  // keeps the same right edge as sibling rows that show a caret.
169
- !h && "pe-6"
169
+ !x && "pe-6"
170
170
  ), children: [
171
- R != null && S != null && /* @__PURE__ */ r(P, { children: [
171
+ w != null && S != null && /* @__PURE__ */ r(F, { children: [
172
172
  /* @__PURE__ */ e("span", { className: "sr-only", children: "Step " }),
173
- R,
173
+ w,
174
174
  " of ",
175
175
  S,
176
176
  /* @__PURE__ */ e("span", { "aria-hidden": !0, children: " · " })
177
177
  ] }),
178
178
  /* @__PURE__ */ e("span", { className: "sr-only", children: "Elapsed " }),
179
- n
179
+ s
180
180
  ] }),
181
- h && /* @__PURE__ */ e(
182
- B,
181
+ x && /* @__PURE__ */ e(
182
+ V,
183
183
  {
184
184
  "aria-hidden": !0,
185
185
  className: l(
186
186
  "size-4 shrink-0 text-tertiary transition-transform duration-(--duration-normal) ease-out motion-reduce:transition-none",
187
- v && "rotate-180"
187
+ u && "rotate-180"
188
188
  )
189
189
  }
190
190
  )
@@ -205,28 +205,28 @@ const ne = s.forwardRef(
205
205
  "aria-hidden": !0
206
206
  }
207
207
  ),
208
- /* @__PURE__ */ e(F, { as: "span", className: "text-sm", children: "Researching…" }),
208
+ /* @__PURE__ */ e(B, { as: "span", className: "text-base", children: "Researching…" }),
209
209
  /* @__PURE__ */ r("span", { className: l(
210
210
  "ml-auto shrink-0 text-xs text-tertiary tabular-nums",
211
- !h && "pe-6"
211
+ !x && "pe-6"
212
212
  ), children: [
213
213
  /* @__PURE__ */ e("span", { className: "sr-only", children: "Elapsed " }),
214
- n
214
+ s
215
215
  ] })
216
216
  ]
217
217
  }
218
- ) : /* @__PURE__ */ e(M, { asChild: !0, children: /* @__PURE__ */ r(
218
+ ) : /* @__PURE__ */ e(D, { asChild: !0, children: /* @__PURE__ */ r(
219
219
  "button",
220
220
  {
221
- ref: b,
221
+ ref: N,
222
222
  type: "button",
223
223
  "data-slot": "research-activity-trigger",
224
224
  className: l(
225
- "group/research-trigger flex min-h-9 w-full cursor-pointer items-center gap-2 rounded-sm py-1 text-left text-sm outline-none",
226
- "transition-[color,transform] duration-(--duration-fast) ease-out hover:text-primary active:scale-(--scale-press)",
225
+ "group/research-trigger flex min-h-9 w-full cursor-pointer items-center gap-2 rounded-sm py-1 text-left text-base outline-none",
226
+ "transition-colors duration-(--duration-fast) ease-out hover:text-primary",
227
227
  "focus-visible:ring-3 focus-visible:ring-ring motion-reduce:transition-none",
228
- p && "sticky z-10 bg-background",
229
- p && (f ? "bottom-0" : "top-0"),
228
+ h && "sticky z-10 bg-background",
229
+ h && (f ? "bottom-0" : "top-0"),
230
230
  f && "order-last mt-3"
231
231
  ),
232
232
  children: [
@@ -235,17 +235,17 @@ const ne = s.forwardRef(
235
235
  " research activity:",
236
236
  " "
237
237
  ] }),
238
- /* @__PURE__ */ e(V, { "aria-hidden": !0, className: "size-4 shrink-0" }),
239
- /* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children: x !== void 0 ? x : /* @__PURE__ */ e(
240
- K,
238
+ /* @__PURE__ */ e(U, { "aria-hidden": !0, className: "size-4 shrink-0" }),
239
+ /* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children: v !== void 0 ? v : /* @__PURE__ */ e(
240
+ C,
241
241
  {
242
- elapsed: n,
243
- firstInsight: w,
244
- sourceCount: d
242
+ elapsed: s,
243
+ firstInsight: R,
244
+ sourceCount: p
245
245
  }
246
246
  ) }),
247
- h && /* @__PURE__ */ e(
248
- B,
247
+ x && /* @__PURE__ */ e(
248
+ V,
249
249
  {
250
250
  "aria-hidden": !0,
251
251
  className: l(
@@ -257,22 +257,27 @@ const ne = s.forwardRef(
257
257
  ]
258
258
  }
259
259
  ) }),
260
- /* @__PURE__ */ e(
261
- ae,
260
+ /* @__PURE__ */ e(ae, { forceMount: !0, asChild: !0, "data-slot": "research-activity-content", children: /* @__PURE__ */ e(
261
+ M.div,
262
262
  {
263
- ref: E,
264
- forceMount: !0,
265
- "data-slot": "research-activity-content",
266
- className: "mt-3 overflow-hidden text-foreground outline-none data-[state=closed]:hidden",
267
- children: q
263
+ ref: z,
264
+ initial: !1,
265
+ animate: u ? "open" : "closed",
266
+ variants: {
267
+ open: { height: "auto", opacity: 1 },
268
+ closed: { height: 0, opacity: 0 }
269
+ },
270
+ transition: { duration: u ? 0.28 : 0.2, ease: ie },
271
+ className: "overflow-hidden text-secondary outline-none data-[state=closed]:pointer-events-none",
272
+ children: /* @__PURE__ */ e("div", { className: "ml-2 pt-3 [--tree-rail-lead:20px]", children: q })
268
273
  }
269
- )
274
+ ) })
270
275
  ]
271
276
  }
272
277
  );
273
278
  }
274
279
  );
275
- ne.displayName = "ResearchActivity";
280
+ oe.displayName = "ResearchActivity";
276
281
  export {
277
- ne as ResearchActivity
282
+ oe as ResearchActivity
278
283
  };
@@ -3,7 +3,7 @@ import { jsx as e, jsxs as o } from "react/jsx-runtime";
3
3
  import { createContext as m, useContext as d } from "react";
4
4
  import { motion as u } from "motion/react";
5
5
  import { EASE_DISCLOSURE as p } from "../../lib/motion.js";
6
- import { Collapsible as h, CollapsibleContent as f, CollapsibleTrigger as x } from "../collapsible.js";
6
+ import { Collapsible as h, CollapsibleContent as x, CollapsibleTrigger as f } from "../collapsible.js";
7
7
  import { Search as g, ChevronDown as N } from "../../lib/icons.js";
8
8
  import { cn as i } from "../../lib/cn.js";
9
9
  const l = m(!0), k = ({
@@ -24,7 +24,7 @@ const l = m(!0), k = ({
24
24
  k.displayName = "TaskItemFile";
25
25
  const v = ({ children: t, className: a, ...s }) => /* @__PURE__ */ e("div", { className: i("text-base text-secondary", a), ...s, children: t });
26
26
  v.displayName = "TaskItem";
27
- const T = ({
27
+ const y = ({
28
28
  defaultOpen: t = !0,
29
29
  className: a,
30
30
  open: s,
@@ -40,15 +40,15 @@ const T = ({
40
40
  children: /* @__PURE__ */ e(l.Provider, { value: s ?? t, children: n })
41
41
  }
42
42
  );
43
- T.displayName = "Task";
44
- const y = ({
43
+ y.displayName = "Task";
44
+ const T = ({
45
45
  children: t,
46
46
  className: a,
47
47
  title: s,
48
48
  icon: n,
49
49
  endContent: r,
50
50
  ...c
51
- }) => /* @__PURE__ */ e(x, { asChild: !0, className: i("group", a), ...c, children: t ?? /* @__PURE__ */ o(
51
+ }) => /* @__PURE__ */ e(f, { asChild: !0, className: i("group", a), ...c, children: t ?? /* @__PURE__ */ o(
52
52
  "button",
53
53
  {
54
54
  type: "button",
@@ -69,14 +69,14 @@ const y = ({
69
69
  ]
70
70
  }
71
71
  ) });
72
- y.displayName = "TaskTrigger";
72
+ T.displayName = "TaskTrigger";
73
73
  const b = ({
74
74
  children: t,
75
75
  className: a,
76
76
  ...s
77
77
  }) => {
78
78
  const n = d(l);
79
- return /* @__PURE__ */ e(f, { forceMount: !0, asChild: !0, ...s, children: /* @__PURE__ */ e(
79
+ return /* @__PURE__ */ e(x, { forceMount: !0, asChild: !0, ...s, children: /* @__PURE__ */ e(
80
80
  u.div,
81
81
  {
82
82
  initial: !1,
@@ -87,19 +87,19 @@ const b = ({
87
87
  },
88
88
  transition: { duration: n ? 0.28 : 0.2, ease: p },
89
89
  className: i(
90
- "overflow-hidden text-foreground outline-none",
90
+ "overflow-hidden text-secondary outline-none",
91
91
  "data-[state=closed]:pointer-events-none",
92
92
  a
93
93
  ),
94
- children: /* @__PURE__ */ e("div", { className: "mt-2 ml-2", children: t })
94
+ children: /* @__PURE__ */ e("div", { className: "mt-2 ml-2 [--tree-rail-lead:9px]", children: t })
95
95
  }
96
96
  ) });
97
97
  };
98
98
  b.displayName = "TaskContent";
99
99
  export {
100
- T as Task,
100
+ y as Task,
101
101
  b as TaskContent,
102
102
  v as TaskItem,
103
103
  k as TaskItemFile,
104
- y as TaskTrigger
104
+ T as TaskTrigger
105
105
  };
@@ -1,33 +1,33 @@
1
1
  "use client";
2
2
  import { jsx as o, jsxs as l } from "react/jsx-runtime";
3
- import { isValidElement as c } from "react";
3
+ import { isValidElement as d } from "react";
4
4
  import { Collapsible as u, CollapsibleTrigger as m, CollapsibleContent as p } from "../collapsible.js";
5
5
  import { Badge as f } from "../badge.js";
6
- import { Wrench as g, ChevronDown as h, CloseCircle as x, CheckCircle as b, Clock as N, CircleDashed as v } from "../../lib/icons.js";
7
- import { cn as n } from "../../lib/cn.js";
8
- const w = ({ className: e, ...t }) => /* @__PURE__ */ o(
6
+ import { Wrench as h, ChevronDown as x, CloseCircle as g, CheckCircle as b, Clock as N, CircleDashed as y } from "../../lib/icons.js";
7
+ import { cn as r } from "../../lib/cn.js";
8
+ const v = ({ className: e, ...t }) => /* @__PURE__ */ o(
9
9
  u,
10
10
  {
11
- className: n(
11
+ className: r(
12
12
  "not-prose group/tool w-full overflow-hidden rounded-xl bg-card",
13
13
  e
14
14
  ),
15
15
  ...t
16
16
  }
17
17
  );
18
- w.displayName = "Tool";
19
- const y = {
20
- "input-streaming": { label: "Pending", color: "default", icon: v },
18
+ v.displayName = "Tool";
19
+ const w = {
20
+ "input-streaming": { label: "Pending", color: "default", icon: y },
21
21
  "input-available": { label: "Running", color: "info", icon: N, pulse: !0 },
22
22
  "output-available": { label: "Completed", color: "success", icon: b },
23
- "output-error": { label: "Error", color: "danger", icon: x }
23
+ "output-error": { label: "Error", color: "danger", icon: g }
24
24
  }, C = ({ state: e }) => {
25
- const { label: t, color: r, icon: a, pulse: i } = y[e];
26
- return /* @__PURE__ */ l(f, { variant: "soft", color: r, children: [
25
+ const { label: t, color: n, icon: a, pulse: i } = w[e];
26
+ return /* @__PURE__ */ l(f, { variant: "soft", color: n, children: [
27
27
  /* @__PURE__ */ o(
28
28
  a,
29
29
  {
30
- className: n(
30
+ className: r(
31
31
  "size-3",
32
32
  i && "animate-pulse motion-reduce:animate-none"
33
33
  ),
@@ -43,13 +43,13 @@ function T(e) {
43
43
  const S = ({
44
44
  className: e,
45
45
  title: t,
46
- type: r,
46
+ type: n,
47
47
  state: a,
48
48
  ...i
49
49
  }) => /* @__PURE__ */ l(
50
50
  m,
51
51
  {
52
- className: n(
52
+ className: r(
53
53
  "group/tool-header flex w-full items-center justify-between gap-4 py-3 text-left transition-colors hover:text-primary motion-reduce:transition-none",
54
54
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
55
55
  e
@@ -57,12 +57,12 @@ const S = ({
57
57
  ...i,
58
58
  children: [
59
59
  /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
60
- /* @__PURE__ */ o(g, { className: "size-4 shrink-0 text-tertiary", "aria-hidden": !0 }),
61
- /* @__PURE__ */ o("span", { className: "font-medium text-base", children: t ?? T(r) }),
60
+ /* @__PURE__ */ o(h, { className: "size-4 shrink-0 text-tertiary", "aria-hidden": !0 }),
61
+ /* @__PURE__ */ o("span", { className: "font-medium text-base", children: t ?? T(n) }),
62
62
  /* @__PURE__ */ o(C, { state: a })
63
63
  ] }),
64
64
  /* @__PURE__ */ o(
65
- h,
65
+ x,
66
66
  {
67
67
  className: "size-4 shrink-0 text-tertiary transition-transform duration-(--duration-fast) ease-out group-data-[state=open]/tool-header:rotate-180 motion-reduce:transition-none",
68
68
  "aria-hidden": !0
@@ -75,8 +75,8 @@ S.displayName = "ToolHeader";
75
75
  const j = ({ className: e, ...t }) => /* @__PURE__ */ o(
76
76
  p,
77
77
  {
78
- className: n(
79
- "overflow-hidden text-foreground outline-none",
78
+ className: r(
79
+ "overflow-hidden text-secondary outline-none",
80
80
  "data-[state=closed]:pointer-events-none",
81
81
  e
82
82
  ),
@@ -90,29 +90,29 @@ const s = ({
90
90
  }) => /* @__PURE__ */ o(
91
91
  "pre",
92
92
  {
93
- className: n(
94
- "overflow-x-auto rounded-md bg-surface p-3 text-xs leading-relaxed text-foreground tabular-nums",
93
+ className: r(
94
+ "overflow-x-auto rounded-md bg-surface p-3 text-xs leading-relaxed text-secondary tabular-nums",
95
95
  t
96
96
  ),
97
97
  children: /* @__PURE__ */ o("code", { children: e })
98
98
  }
99
- ), d = ({ children: e }) => /* @__PURE__ */ o("h4", { className: "text-xs font-medium uppercase tracking-wide text-tertiary", children: e }), k = ({ className: e, input: t, ...r }) => /* @__PURE__ */ l("div", { className: n("space-y-2 overflow-hidden p-4", e), ...r, children: [
100
- /* @__PURE__ */ o(d, { children: "Parameters" }),
99
+ ), c = ({ children: e }) => /* @__PURE__ */ o("h4", { className: "text-xs font-medium uppercase tracking-wide text-tertiary", children: e }), k = ({ className: e, input: t, ...n }) => /* @__PURE__ */ l("div", { className: r("space-y-2 overflow-hidden p-4", e), ...n, children: [
100
+ /* @__PURE__ */ o(c, { children: "Parameters" }),
101
101
  /* @__PURE__ */ o(s, { code: JSON.stringify(t, null, 2) })
102
102
  ] });
103
103
  k.displayName = "ToolInput";
104
- const O = (e) => typeof e == "object" && e !== null && !c(e) ? /* @__PURE__ */ o(s, { code: JSON.stringify(e, null, 2) }) : typeof e == "string" ? /* @__PURE__ */ o("div", { className: "rounded-md bg-surface p-3 text-xs leading-relaxed text-foreground whitespace-pre-wrap", children: e }) : e, P = ({
104
+ const O = (e) => typeof e == "object" && e !== null && !d(e) ? /* @__PURE__ */ o(s, { code: JSON.stringify(e, null, 2) }) : typeof e == "string" ? /* @__PURE__ */ o("div", { className: "rounded-md bg-surface p-3 text-xs leading-relaxed text-secondary whitespace-pre-wrap", children: e }) : e, P = ({
105
105
  className: e,
106
106
  output: t,
107
- errorText: r,
107
+ errorText: n,
108
108
  ...a
109
- }) => t || r ? /* @__PURE__ */ l("div", { className: n("space-y-2 p-4", e), ...a, children: [
110
- /* @__PURE__ */ o(d, { children: r ? "Error" : "Result" }),
111
- r ? /* @__PURE__ */ o("div", { className: "rounded-md bg-danger-50 p-3 text-xs leading-relaxed text-danger-700 whitespace-pre-wrap", children: r }) : /* @__PURE__ */ o("div", { className: "overflow-x-auto text-xs text-foreground [&_table]:w-full", children: O(t) })
109
+ }) => t || n ? /* @__PURE__ */ l("div", { className: r("space-y-2 p-4", e), ...a, children: [
110
+ /* @__PURE__ */ o(c, { children: n ? "Error" : "Result" }),
111
+ n ? /* @__PURE__ */ o("div", { className: "rounded-md bg-danger-50 p-3 text-xs leading-relaxed text-danger-700 whitespace-pre-wrap", children: n }) : /* @__PURE__ */ o("div", { className: "overflow-x-auto text-xs text-secondary [&_table]:w-full", children: O(t) })
112
112
  ] }) : null;
113
113
  P.displayName = "ToolOutput";
114
114
  export {
115
- w as Tool,
115
+ v as Tool,
116
116
  j as ToolContent,
117
117
  S as ToolHeader,
118
118
  k as ToolInput,
@@ -5,7 +5,7 @@ import { cva as u } from "class-variance-authority";
5
5
  import { Info as l, WarningCircle as g, Warning as p, CheckCircle as x, Close as v } from "../lib/icons.js";
6
6
  import { cn as n } from "../lib/cn.js";
7
7
  const h = u(
8
- "flex w-full items-start gap-4 rounded-2xl bg-muted px-4 py-3",
8
+ "flex w-full items-start gap-4 rounded-2xl bg-muted p-4",
9
9
  {
10
10
  variants: {
11
11
  variant: {
@@ -58,7 +58,7 @@ const h = u(
58
58
  }
59
59
  );
60
60
  N.displayName = "Alert";
61
- const y = i.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ e(
61
+ const b = i.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ e(
62
62
  "p",
63
63
  {
64
64
  ref: a,
@@ -66,8 +66,8 @@ const y = i.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ e(
66
66
  ...r
67
67
  }
68
68
  ));
69
- y.displayName = "AlertTitle";
70
- const b = i.forwardRef(({ className: t, ...r }, a) => (
69
+ b.displayName = "AlertTitle";
70
+ const y = i.forwardRef(({ className: t, ...r }, a) => (
71
71
  // leading-normal (150%) — the description is the only part of an alert that
72
72
  // regularly wraps, and the text-xs default (138%) sets multi-line copy too
73
73
  // tight to scan.
@@ -80,9 +80,9 @@ const b = i.forwardRef(({ className: t, ...r }, a) => (
80
80
  }
81
81
  )
82
82
  ));
83
- b.displayName = "AlertDescription";
83
+ y.displayName = "AlertDescription";
84
84
  export {
85
85
  N as Alert,
86
- b as AlertDescription,
87
- y as AlertTitle
86
+ y as AlertDescription,
87
+ b as AlertTitle
88
88
  };
@@ -78,6 +78,7 @@ interface BaseChartProps {
78
78
  annotations?: ChartAnnotation[];
79
79
  /** Plot height in px (the frame is fluid-width). */
80
80
  height?: number;
81
+ /** Interior gridlines. OFF by default — the two axis lines carry the frame. */
81
82
  grid?: boolean;
82
83
  /** Defaults to on when there is more than one series. */
83
84
  legend?: boolean;
@@ -99,17 +100,27 @@ export interface LineChartProps extends BaseChartProps {
99
100
  curve?: "linear" | "natural" | "step";
100
101
  /** Series keys that render dashed — projections, not observations. */
101
102
  forecastKeys?: string[];
103
+ /**
104
+ * Print each observation's value above its dot. On by default for a SINGLE
105
+ * series (the reader shouldn't have to hover to read a number that fits);
106
+ * off once there are several, where the labels would collide.
107
+ */
108
+ showValues?: boolean;
102
109
  }
103
110
  export interface AreaChartProps extends BaseChartProps {
104
111
  curve?: "linear" | "natural" | "step";
105
112
  stacked?: boolean;
106
113
  /** Series keys that render dashed — projections, not observations. */
107
114
  forecastKeys?: string[];
115
+ /** Print each observation's value above its dot — see {@link LineChartProps.showValues}. */
116
+ showValues?: boolean;
108
117
  }
109
118
  export interface BarChartProps extends BaseChartProps {
110
119
  stacked?: boolean;
111
120
  /** Visual bar direction: vertical columns (default) or horizontal bars. */
112
121
  layout?: "vertical" | "horizontal";
122
+ /** Print each bar's value past its end. On by default for a single series. */
123
+ showValues?: boolean;
113
124
  }
114
125
  export interface ComboChartProps extends BaseChartProps {
115
126
  /** Series keys drawn as lines; the rest draw as bars. */
@@ -183,6 +194,7 @@ export interface ScatterChartProps {
183
194
  labelKey?: string;
184
195
  annotations?: ChartAnnotation[];
185
196
  height?: number;
197
+ /** Interior gridlines. OFF by default — the two axis lines carry the frame. */
186
198
  grid?: boolean;
187
199
  showYAxis?: boolean;
188
200
  formatValue?: (value: number) => string;
@@ -212,6 +224,8 @@ export interface FunnelChartProps {
212
224
  tooltip?: ChartTooltipRenderer | false;
213
225
  className?: string;
214
226
  }
227
+ /** Chart floor — every chart is at least this tall (ChartFrame clamps). */
228
+ export declare const MIN_HEIGHT = 300;
215
229
  export declare const LineChart: React.ForwardRefExoticComponent<LineChartProps & React.RefAttributes<HTMLDivElement>>;
216
230
  export declare const AreaChart: React.ForwardRefExoticComponent<AreaChartProps & React.RefAttributes<HTMLDivElement>>;
217
231
  export declare const BarChart: React.ForwardRefExoticComponent<BarChartProps & React.RefAttributes<HTMLDivElement>>;