@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
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import { jsxs as N, jsx as e, Fragment as V } from "react/jsx-runtime";
3
- import * as C from "react";
4
- import { ResponsiveContainer as j, LineChart as ve, Tooltip as S, Line as ie, AreaChart as be, Area as ge, CartesianGrid as X, XAxis as Z, YAxis as E, BarChart as pe, Bar as le, Cell as oe, ComposedChart as Ne, ScatterChart as we, Scatter as Ae, PieChart as ye, Pie as ke, RadarChart as Ce, PolarGrid as Re, PolarAngleAxis as se, PolarRadiusAxis as Me, Radar as $e, RadialBarChart as Le, RadialBar as Fe, Treemap as Se, ReferenceArea as Oe, ReferenceLine as Te, ReferenceDot as Ie } from "recharts";
3
+ import * as k from "react";
4
+ import { ResponsiveContainer as j, LineChart as ve, Tooltip as S, Line as ie, AreaChart as be, Area as ge, CartesianGrid as X, XAxis as Z, YAxis as E, BarChart as pe, Bar as le, Cell as oe, ComposedChart as Ne, ScatterChart as we, Scatter as Ae, PieChart as ye, Pie as Ce, RadarChart as ke, PolarGrid as Re, PolarAngleAxis as se, PolarRadiusAxis as Me, Radar as $e, RadialBarChart as Le, RadialBar as Fe, Treemap as Se, ReferenceArea as Oe, ReferenceLine as Te, ReferenceDot as Ie } from "recharts";
5
5
  import { MotionConfig as Be, AnimatePresence as De, motion as We } from "motion/react";
6
6
  import { cn as $ } from "../lib/cn.js";
7
7
  import { floatVariants as je } from "../lib/motion.js";
8
- const _ = (t) => `var(--color-chart-${t % 6 + 1})`, Y = (t) => _(t), Q = "var(--color-ink-300)", D = {
8
+ const _ = (t) => `var(--color-chart-${t % 6 + 1})`, Y = (t) => _(t), Q = "var(--chart-context)", D = {
9
9
  primary: { ref: "var(--brand)", pill: "bg-fill text-fill-foreground" },
10
10
  success: { ref: "var(--color-success-600)", pill: "bg-success-50 text-success-700" },
11
11
  warning: { ref: "var(--color-warning-500)", pill: "bg-warning-50 text-warning-700" },
@@ -111,17 +111,17 @@ function O({
111
111
  if (!c.active || !s.length) return null;
112
112
  const f = s.length === 1, d = c.label ?? (f ? s[0].name : void 0);
113
113
  return /* @__PURE__ */ N("div", { className: "rounded-md bg-foreground px-2.5 py-1.5 text-xs text-background", children: [
114
- /* @__PURE__ */ e("div", { className: $("text-xs font-medium tracking-wide uppercase text-background/60", !f && "mb-1"), children: d }),
114
+ /* @__PURE__ */ e("div", { className: $("text-xs font-normal tracking-wide uppercase text-background/60", !f && "mb-1"), children: d }),
115
115
  s.map((m) => /* @__PURE__ */ N("div", { className: "flex items-center gap-1.5", children: [
116
116
  !f && /* @__PURE__ */ N(V, { children: [
117
117
  /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "size-1.5 rounded-dot", style: { background: m.color } }),
118
118
  /* @__PURE__ */ e("span", { className: "text-background/70", children: m.name })
119
119
  ] }),
120
- /* @__PURE__ */ e("span", { className: "ml-auto pl-3 font-medium tabular-nums", children: typeof m.value == "number" ? l(m.value) : String(m.value ?? "") })
120
+ /* @__PURE__ */ e("span", { className: "ml-auto pl-3 font-normal tabular-nums", children: typeof m.value == "number" ? l(m.value) : String(m.value ?? "") })
121
121
  ] }, m.key))
122
122
  ] });
123
123
  }
124
- const ue = "pointer-events-none inline-flex min-h-4 items-center rounded-full px-2 py-0.5 text-xs font-medium whitespace-nowrap";
124
+ const ue = "pointer-events-none inline-flex min-h-4 items-center rounded-full px-2 py-0.5 text-xs font-normal whitespace-nowrap";
125
125
  function Pe({
126
126
  viewBox: t,
127
127
  label: r,
@@ -147,7 +147,7 @@ function _e({
147
147
  onEnter: o,
148
148
  onLeave: a
149
149
  }) {
150
- const [s, u] = C.useState(!1);
150
+ const [s, u] = k.useState(!1);
151
151
  if (t == null || r == null || !Number.isFinite(t) || !Number.isFinite(r)) return /* @__PURE__ */ e("g", {});
152
152
  const c = () => o({ ann: l, n, cx: t, cy: r }), f = () => a();
153
153
  return /* @__PURE__ */ N(
@@ -176,7 +176,7 @@ function _e({
176
176
  y: r,
177
177
  dy: "0.35em",
178
178
  textAnchor: "middle",
179
- className: "pointer-events-none fill-brand-foreground text-xs font-bold select-none",
179
+ className: "pointer-events-none fill-brand-foreground text-xs font-semibold select-none",
180
180
  children: n
181
181
  }
182
182
  )
@@ -207,15 +207,15 @@ function Ge({ hovered: t, frameWidth: r, format: n }) {
207
207
  "span",
208
208
  {
209
209
  "aria-hidden": !0,
210
- className: "flex size-4.5 shrink-0 items-center justify-center rounded-full text-xs font-bold text-brand-foreground",
210
+ className: "flex size-4.5 shrink-0 items-center justify-center rounded-full text-xs font-semibold text-brand-foreground",
211
211
  style: { background: D[t.ann.color ?? "primary"].ref },
212
212
  children: t.n
213
213
  }
214
214
  ),
215
- /* @__PURE__ */ e("span", { className: "text-xs font-medium text-foreground", children: t.ann.label })
215
+ /* @__PURE__ */ e("span", { className: "text-xs font-normal text-foreground", children: t.ann.label })
216
216
  ] }),
217
217
  t.ann.description && /* @__PURE__ */ e("p", { className: "mt-1.5 text-xs leading-relaxed text-secondary", children: t.ann.description }),
218
- /* @__PURE__ */ N("div", { className: "mt-1.5 text-xs font-medium tracking-wide uppercase text-tertiary tabular-nums", children: [
218
+ /* @__PURE__ */ N("div", { className: "mt-1.5 text-xs font-normal tracking-wide uppercase text-tertiary tabular-nums", children: [
219
219
  t.ann.x,
220
220
  " · ",
221
221
  n(t.ann.y)
@@ -227,7 +227,7 @@ function Ge({ hovered: t, frameWidth: r, format: n }) {
227
227
  ) }) });
228
228
  }
229
229
  function me(t, r) {
230
- const [n, l] = C.useState(null), o = C.useCallback(() => l(null), []), { back: a, front: s } = C.useMemo(() => {
230
+ const [n, l] = k.useState(null), o = k.useCallback(() => l(null), []), { back: a, front: s } = k.useMemo(() => {
231
231
  const u = [], c = [];
232
232
  let f = 0;
233
233
  return (t ?? []).forEach((d, x) => {
@@ -307,10 +307,10 @@ function G({
307
307
  o.label
308
308
  ] }, o.label)) });
309
309
  }
310
- const W = C.forwardRef(
310
+ const W = k.forwardRef(
311
311
  ({ className: t, height: r, legendItems: n, hovered: l, format: o, children: a, ...s }, u) => {
312
312
  var d;
313
- const c = C.useRef(null);
313
+ const c = k.useRef(null);
314
314
  return /* @__PURE__ */ N("div", { ref: (x) => {
315
315
  c.current = x, typeof u == "function" ? u(x) : u && (u.current = x);
316
316
  }, className: $("relative w-full font-sans", t), ...s, children: [
@@ -339,10 +339,10 @@ function H(t) {
339
339
  xTickFormatter: b,
340
340
  yTickFormatter: w,
341
341
  yAxisWidth: A = 44
342
- } = t, p = C.useMemo(() => l ?? ce(r, n), [l, r, n]), i = d ?? F, h = w ?? ((M) => typeof M == "number" ? i(M) : M), y = me(s, i), k = (M, B) => a && p.includes(a) ? M === a ? "var(--color-chart-1)" : Q : _(B), R = (M) => (o == null ? void 0 : o[M]) ?? M, g = c ?? p.length > 1 ? p.map((M, B) => ({ label: R(M), color: k(M, B) })) : null;
342
+ } = t, p = k.useMemo(() => l ?? ce(r, n), [l, r, n]), i = d ?? F, h = w ?? ((M) => typeof M == "number" ? i(M) : M), y = me(s, i), C = (M, B) => a && p.includes(a) ? M === a ? "var(--color-chart-1)" : Q : _(B), R = (M) => (o == null ? void 0 : o[M]) ?? M, g = c ?? p.length > 1 ? p.map((M, B) => ({ label: R(M), color: C(M, B) })) : null;
343
343
  return { names: p, format: i, layers: y, legendItems: g, furniture: [
344
344
  /* Gridlines one step below the border token — guides, not content. */
345
- u ? /* @__PURE__ */ e(X, { vertical: !1, stroke: "var(--color-ink-50)" }, "grid") : null,
345
+ u ? /* @__PURE__ */ e(X, { vertical: !1, stroke: "var(--chart-grid)" }, "grid") : null,
346
346
  /* @__PURE__ */ e(
347
347
  Z,
348
348
  {
@@ -351,7 +351,7 @@ function H(t) {
351
351
  scale: x === "time" ? "time" : "auto",
352
352
  domain: x === "time" ? v ?? ["dataMin", "dataMax"] : v,
353
353
  allowDataOverflow: !!v,
354
- axisLine: { stroke: "var(--color-ink-200)" },
354
+ axisLine: { stroke: "var(--chart-axis)" },
355
355
  tickLine: !1,
356
356
  minTickGap: 28,
357
357
  tickMargin: 24,
@@ -367,14 +367,14 @@ function H(t) {
367
367
  width: A,
368
368
  domain: m,
369
369
  allowDataOverflow: !!m,
370
- axisLine: { stroke: "var(--color-ink-200)" },
370
+ axisLine: { stroke: "var(--chart-axis)" },
371
371
  tickLine: !1,
372
372
  tickMargin: 12,
373
373
  tick: /* @__PURE__ */ e(I, { anchor: "end", dy: "0.32em", format: h })
374
374
  },
375
375
  "y"
376
376
  ) : null
377
- ], colorFor: k, labelFor: R };
377
+ ], colorFor: C, labelFor: R };
378
378
  }
379
379
  const T = 300, z = { top: 24, right: 12, bottom: 8, left: 0 };
380
380
  function J(t, r, n, l) {
@@ -387,7 +387,7 @@ function J(t, r, n, l) {
387
387
  return t.filter((a) => !(r != null && r.includes(a))).length === 1 ? new Set(t) : /* @__PURE__ */ new Set();
388
388
  }
389
389
  function fe(t, r, n) {
390
- return C.useCallback(
390
+ return k.useCallback(
391
391
  (l, o) => {
392
392
  if (!(r != null && r.includes(l))) return n(l, o);
393
393
  const a = t.filter((u) => !r.includes(u)), s = a[r.indexOf(l)] ?? a[0];
@@ -396,14 +396,14 @@ function fe(t, r, n) {
396
396
  [t, r, n]
397
397
  );
398
398
  }
399
- const He = C.forwardRef(
399
+ const He = k.forwardRef(
400
400
  // Straight segments by default: the house line is a solid stroke with a DOT
401
401
  // at every observation — the data points are visible, the path connects them
402
402
  // without inventing values between them.
403
403
  // A smooth curve invents values between observations; opt back in with
404
404
  // `curve="natural"` when the interpolation is the point.
405
405
  ({ height: t = T, curve: r = "linear", forecastKeys: n, showValues: l, className: o, ...a }, s) => {
406
- const { names: u, format: c, layers: f, legendItems: d, furniture: x, colorFor: v, labelFor: m } = H(a), b = fe(u, n, v), w = J(u, n, a.highlight, l), [A, p] = C.useState(null);
406
+ const { names: u, format: c, layers: f, legendItems: d, furniture: x, colorFor: v, labelFor: m } = H(a), b = fe(u, n, v), w = J(u, n, a.highlight, l), [A, p] = k.useState(null);
407
407
  return /* @__PURE__ */ e(W, { ref: s, className: o, height: t, legendItems: d, hovered: f.hovered, format: c, children: /* @__PURE__ */ N(
408
408
  ve,
409
409
  {
@@ -451,9 +451,9 @@ const He = C.forwardRef(
451
451
  }
452
452
  );
453
453
  He.displayName = "LineChart";
454
- const Ue = C.forwardRef(
454
+ const Ue = k.forwardRef(
455
455
  ({ height: t = T, curve: r = "linear", stacked: n = !1, forecastKeys: l, showValues: o, className: a, ...s }, u) => {
456
- const { names: c, format: f, layers: d, legendItems: x, furniture: v, colorFor: m, labelFor: b } = H(s), w = fe(c, l, m), A = n ? /* @__PURE__ */ new Set() : J(c, l, s.highlight, o), [p, i] = C.useState(null), h = C.useId().replace(/[^a-zA-Z0-9]/g, "");
456
+ const { names: c, format: f, layers: d, legendItems: x, furniture: v, colorFor: m, labelFor: b } = H(s), w = fe(c, l, m), A = n ? /* @__PURE__ */ new Set() : J(c, l, s.highlight, o), [p, i] = k.useState(null), h = k.useId().replace(/[^a-zA-Z0-9]/g, "");
457
457
  return /* @__PURE__ */ e(W, { ref: u, className: a, height: t, legendItems: x, hovered: d.hovered, format: f, children: /* @__PURE__ */ N(
458
458
  be,
459
459
  {
@@ -462,9 +462,9 @@ const Ue = C.forwardRef(
462
462
  onMouseMove: (y) => i((y == null ? void 0 : y.activeTooltipIndex) ?? null),
463
463
  onMouseLeave: () => i(null),
464
464
  children: [
465
- /* @__PURE__ */ e("defs", { children: c.map((y, k) => /* @__PURE__ */ N("linearGradient", { id: `${h}-${k}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
466
- /* @__PURE__ */ e("stop", { offset: "0%", stopColor: m(y, k), stopOpacity: 0.18 }),
467
- /* @__PURE__ */ e("stop", { offset: "100%", stopColor: m(y, k), stopOpacity: 0.02 })
465
+ /* @__PURE__ */ e("defs", { children: c.map((y, C) => /* @__PURE__ */ N("linearGradient", { id: `${h}-${C}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
466
+ /* @__PURE__ */ e("stop", { offset: "0%", stopColor: m(y, C), stopOpacity: 0.18 }),
467
+ /* @__PURE__ */ e("stop", { offset: "100%", stopColor: m(y, C), stopOpacity: 0.02 })
468
468
  ] }, y)) }),
469
469
  v,
470
470
  s.tooltip !== !1 && /* @__PURE__ */ e(
@@ -482,19 +482,19 @@ const Ue = C.forwardRef(
482
482
  }
483
483
  ),
484
484
  d.back,
485
- c.map((y, k) => /* @__PURE__ */ e(
485
+ c.map((y, C) => /* @__PURE__ */ e(
486
486
  ge,
487
487
  {
488
488
  dataKey: y,
489
489
  name: b(y),
490
490
  type: r,
491
491
  stackId: n ? "stack" : void 0,
492
- stroke: w(y, k),
492
+ stroke: w(y, C),
493
493
  strokeWidth: 1.5,
494
494
  strokeDasharray: l != null && l.includes(y) ? "6 4" : void 0,
495
- fill: `url(#${h}-${k})`,
496
- dot: { r: 3, fill: m(y, k), strokeWidth: 0 },
497
- activeDot: /* @__PURE__ */ e(q, { fill: w(y, k) }),
495
+ fill: `url(#${h}-${C})`,
496
+ dot: { r: 3, fill: m(y, C), strokeWidth: 0 },
497
+ activeDot: /* @__PURE__ */ e(q, { fill: w(y, C) }),
498
498
  label: A.has(y) ? /* @__PURE__ */ e(de, { format: f, hidden: p != null }) : void 0,
499
499
  isAnimationActive: !1
500
500
  },
@@ -507,7 +507,7 @@ const Ue = C.forwardRef(
507
507
  }
508
508
  );
509
509
  Ue.displayName = "AreaChart";
510
- const Ve = C.forwardRef(
510
+ const Ve = k.forwardRef(
511
511
  ({
512
512
  height: t = T,
513
513
  stacked: r = !1,
@@ -522,7 +522,7 @@ const Ve = C.forwardRef(
522
522
  {
523
523
  horizontal: !1,
524
524
  vertical: !0,
525
- stroke: "var(--color-ink-50)"
525
+ stroke: "var(--chart-grid)"
526
526
  },
527
527
  "grid"
528
528
  ) : null,
@@ -586,7 +586,7 @@ const Ve = C.forwardRef(
586
586
  ),
587
587
  f.back,
588
588
  u.map((h, y) => {
589
- const k = r ? y === u.length - 1 : !0, R = b ? [0, 4, 4, 0] : [4, 4, 0, 0];
589
+ const C = r ? y === u.length - 1 : !0, R = b ? [0, 4, 4, 0] : [4, 4, 0, 0];
590
590
  return /* @__PURE__ */ e(
591
591
  le,
592
592
  {
@@ -594,7 +594,7 @@ const Ve = C.forwardRef(
594
594
  name: m(h),
595
595
  stackId: r ? "stack" : void 0,
596
596
  fill: v(h, y),
597
- radius: k ? R : 0,
597
+ radius: C ? R : 0,
598
598
  maxBarSize: 48,
599
599
  label: w.has(h) ? /* @__PURE__ */ e(ze, { format: c, horizontal: b }) : void 0,
600
600
  isAnimationActive: !1,
@@ -616,9 +616,9 @@ const Ve = C.forwardRef(
616
616
  }
617
617
  );
618
618
  Ve.displayName = "BarChart";
619
- const he = C.forwardRef(
619
+ const he = k.forwardRef(
620
620
  ({ height: t = T, lineKeys: r, dualAxis: n = !1, stacked: l = !1, forecastKeys: o, className: a, ...s }, u) => {
621
- const { names: c, format: f, layers: d, furniture: x, colorFor: v, labelFor: m } = H(s), b = c.filter((i) => !r.includes(i)), w = (i, h) => r.length ? "var(--color-ink-200)" : v(i, h), A = (i, h) => r.length ? "var(--color-chart-1)" : v(i, h), p = c.length > 1 ? [
621
+ const { names: c, format: f, layers: d, furniture: x, colorFor: v, labelFor: m } = H(s), b = c.filter((i) => !r.includes(i)), w = (i, h) => r.length ? "var(--chart-axis)" : v(i, h), A = (i, h) => r.length ? "var(--color-chart-1)" : v(i, h), p = c.length > 1 ? [
622
622
  ...b.map((i) => ({ label: m(i), color: w(i, c.indexOf(i)) })),
623
623
  ...r.map((i) => ({ label: m(i), color: A(i, c.indexOf(i)) }))
624
624
  ] : null;
@@ -698,11 +698,11 @@ const he = C.forwardRef(
698
698
  }
699
699
  );
700
700
  he.displayName = "ComboChart";
701
- const Ye = C.forwardRef(
701
+ const Ye = k.forwardRef(
702
702
  (t, r) => /* @__PURE__ */ e(he, { ref: r, ...t })
703
703
  );
704
704
  Ye.displayName = "ComposedChart";
705
- const Xe = C.forwardRef(
705
+ const Xe = k.forwardRef(
706
706
  ({
707
707
  data: t,
708
708
  xKey: r,
@@ -722,9 +722,9 @@ const Xe = C.forwardRef(
722
722
  tooltip: w,
723
723
  className: A
724
724
  }, p) => {
725
- const i = c ?? F, h = v ?? ((R) => typeof R == "number" ? F(R) : R), y = m ?? ((R) => typeof R == "number" ? i(R) : R), k = me(o, i);
726
- return /* @__PURE__ */ e(W, { ref: p, className: A, height: a, legendItems: null, hovered: k.hovered, format: i, children: /* @__PURE__ */ N(we, { margin: z, children: [
727
- s && /* @__PURE__ */ e(X, { vertical: !1, stroke: "var(--color-ink-50)" }),
725
+ const i = c ?? F, h = v ?? ((R) => typeof R == "number" ? F(R) : R), y = m ?? ((R) => typeof R == "number" ? i(R) : R), C = me(o, i);
726
+ return /* @__PURE__ */ e(W, { ref: p, className: A, height: a, legendItems: null, hovered: C.hovered, format: i, children: /* @__PURE__ */ N(we, { margin: z, children: [
727
+ s && /* @__PURE__ */ e(X, { vertical: !1, stroke: "var(--chart-grid)" }),
728
728
  /* @__PURE__ */ e(
729
729
  Z,
730
730
  {
@@ -769,7 +769,7 @@ const Xe = C.forwardRef(
769
769
  isAnimationActive: !1
770
770
  }
771
771
  ),
772
- k.back,
772
+ C.back,
773
773
  /* @__PURE__ */ e(
774
774
  Ae,
775
775
  {
@@ -779,12 +779,12 @@ const Xe = C.forwardRef(
779
779
  isAnimationActive: !1
780
780
  }
781
781
  ),
782
- k.front
782
+ C.front
783
783
  ] }) });
784
784
  }
785
785
  );
786
786
  Xe.displayName = "ScatterChart";
787
- const Ze = C.forwardRef(
787
+ const Ze = k.forwardRef(
788
788
  ({
789
789
  data: t,
790
790
  nameKey: r,
@@ -820,7 +820,7 @@ const Ze = C.forwardRef(
820
820
  }
821
821
  ),
822
822
  /* @__PURE__ */ e(
823
- ke,
823
+ Ce,
824
824
  {
825
825
  data: t,
826
826
  dataKey: n,
@@ -843,15 +843,15 @@ const Ze = C.forwardRef(
843
843
  )
844
844
  ] }) }),
845
845
  l && /* @__PURE__ */ N("div", { className: "pointer-events-none absolute inset-0 flex flex-col items-center justify-center", children: [
846
- /* @__PURE__ */ e("div", { className: "text-xl font-bold text-foreground tabular-nums", children: v(m) }),
847
- o && /* @__PURE__ */ e("div", { className: "mt-0.5 text-xs font-medium tracking-wide uppercase text-tertiary", children: o })
846
+ /* @__PURE__ */ e("div", { className: "text-xl font-semibold text-foreground tabular-nums", children: v(m) }),
847
+ o && /* @__PURE__ */ e("div", { className: "mt-0.5 text-xs font-normal tracking-wide uppercase text-tertiary", children: o })
848
848
  ] })
849
849
  ] })
850
850
  ] });
851
851
  }
852
852
  );
853
853
  Ze.displayName = "PieChart";
854
- const Qe = C.forwardRef(
854
+ const Qe = k.forwardRef(
855
855
  ({
856
856
  data: t,
857
857
  categoryKey: r,
@@ -865,7 +865,7 @@ const Qe = C.forwardRef(
865
865
  tooltip: f,
866
866
  className: d
867
867
  }, x) => {
868
- const v = C.useMemo(
868
+ const v = k.useMemo(
869
869
  () => n ?? ce(t, r),
870
870
  [r, t, n]
871
871
  ), m = c ?? F, b = a ?? Math.max(
@@ -879,7 +879,7 @@ const Qe = C.forwardRef(
879
879
  return /* @__PURE__ */ N("div", { ref: x, className: $("relative w-full font-sans", d), children: [
880
880
  p && /* @__PURE__ */ e(G, { items: p, align: "center" }),
881
881
  /* @__PURE__ */ e("div", { className: "mx-auto w-full max-w-[520px]", children: /* @__PURE__ */ e(j, { width: "100%", height: s, children: /* @__PURE__ */ N(
882
- Ce,
882
+ ke,
883
883
  {
884
884
  data: t,
885
885
  cx: "50%",
@@ -939,7 +939,7 @@ const Qe = C.forwardRef(
939
939
  }
940
940
  );
941
941
  Qe.displayName = "RadarChart";
942
- const qe = C.forwardRef(
942
+ const qe = k.forwardRef(
943
943
  ({
944
944
  data: t,
945
945
  nameKey: r,
@@ -1003,8 +1003,8 @@ const qe = C.forwardRef(
1003
1003
  }
1004
1004
  ) }),
1005
1005
  /* @__PURE__ */ N("div", { className: "pointer-events-none absolute inset-0 flex flex-col items-center justify-center", children: [
1006
- /* @__PURE__ */ e("div", { className: "text-xl font-bold text-foreground tabular-nums", children: x(Math.round(m)) }),
1007
- o && /* @__PURE__ */ e("div", { className: "mt-0.5 text-xs font-medium tracking-wide uppercase text-tertiary", children: o })
1006
+ /* @__PURE__ */ e("div", { className: "text-xl font-semibold text-foreground tabular-nums", children: x(Math.round(m)) }),
1007
+ o && /* @__PURE__ */ e("div", { className: "mt-0.5 text-xs font-normal tracking-wide uppercase text-tertiary", children: o })
1008
1008
  ] })
1009
1009
  ] }),
1010
1010
  b && /* @__PURE__ */ e(G, { items: b, align: "center", className: "mb-0 mt-3" })
@@ -1089,7 +1089,7 @@ function Ke(t, r, n) {
1089
1089
  };
1090
1090
  return t.forEach(o), l.length ? l : t;
1091
1091
  }
1092
- const et = C.forwardRef(
1092
+ const et = k.forwardRef(
1093
1093
  ({
1094
1094
  data: t,
1095
1095
  nameKey: r,
@@ -1099,7 +1099,7 @@ const et = C.forwardRef(
1099
1099
  tooltip: a,
1100
1100
  className: s
1101
1101
  }, u) => {
1102
- const c = o ?? F, f = C.useMemo(
1102
+ const c = o ?? F, f = k.useMemo(
1103
1103
  () => Ke(t, r, n),
1104
1104
  [t, r, n]
1105
1105
  );
@@ -1131,13 +1131,13 @@ const et = C.forwardRef(
1131
1131
  }
1132
1132
  );
1133
1133
  et.displayName = "TreemapChart";
1134
- const U = "var(--color-chart-1)", tt = "var(--color-ink-100)", P = 24, rt = 44, re = 0.55, ne = 4, ae = (t, r, n, l, o) => {
1134
+ const U = "var(--color-chart-1)", tt = "var(--chart-track)", P = 24, rt = 44, re = 0.55, ne = 4, ae = (t, r, n, l, o) => {
1135
1135
  const a = Math.min(o, n / 2, l);
1136
1136
  return `M ${t},${r + l} L ${t},${r + a} Q ${t},${r} ${t + a},${r} L ${t + n - a},${r} Q ${t + n},${r} ${t + n},${r + a} L ${t + n},${r + l} Z`;
1137
1137
  };
1138
1138
  function nt() {
1139
- const t = C.useRef(null), [r, n] = C.useState(0);
1140
- return C.useLayoutEffect(() => {
1139
+ const t = k.useRef(null), [r, n] = k.useState(0);
1140
+ return k.useLayoutEffect(() => {
1141
1141
  const l = t.current;
1142
1142
  if (!l) return;
1143
1143
  n(l.getBoundingClientRect().width);
@@ -1149,7 +1149,7 @@ function nt() {
1149
1149
  return o.observe(l), () => o.disconnect();
1150
1150
  }, []), { ref: t, width: r };
1151
1151
  }
1152
- const at = C.forwardRef(
1152
+ const at = k.forwardRef(
1153
1153
  ({
1154
1154
  data: t,
1155
1155
  nameKey: r,
@@ -1161,7 +1161,7 @@ const at = C.forwardRef(
1161
1161
  className: u
1162
1162
  }, c) => {
1163
1163
  var R;
1164
- const f = o ?? F, { ref: d, width: x } = nt(), [v, m] = C.useState(null), b = Number(((R = t[0]) == null ? void 0 : R[n]) ?? 0), w = t.length, A = Math.max(0, l - P - rt), p = P + A, i = w > 0 ? x / (w + (w - 1) * re) : 0, h = i * re, y = t.map((g, L) => {
1164
+ const f = o ?? F, { ref: d, width: x } = nt(), [v, m] = k.useState(null), b = Number(((R = t[0]) == null ? void 0 : R[n]) ?? 0), w = t.length, A = Math.max(0, l - P - rt), p = P + A, i = w > 0 ? x / (w + (w - 1) * re) : 0, h = i * re, y = t.map((g, L) => {
1165
1165
  var te;
1166
1166
  const M = Number(g[n]), B = Number(((te = t[L - 1]) == null ? void 0 : te[n]) ?? M), xe = b ? M / b * 100 : 0, K = B ? M / B * 100 : 0, ee = b && M > 0 ? Math.max(2, M / b * A) : 0;
1167
1167
  return {
@@ -1178,7 +1178,7 @@ const at = C.forwardRef(
1178
1178
  height: ee,
1179
1179
  formatValue: f
1180
1180
  };
1181
- }), k = v != null ? y[v] : void 0;
1181
+ }), C = v != null ? y[v] : void 0;
1182
1182
  return /* @__PURE__ */ e("div", { ref: c, className: $("relative w-full font-sans", u), children: /* @__PURE__ */ N("div", { ref: d, className: "relative w-full", style: { height: l }, children: [
1183
1183
  x > 0 && w > 0 && /* @__PURE__ */ N("svg", { width: x, height: l, className: "block", children: [
1184
1184
  y.slice(1).map((g) => {
@@ -1219,7 +1219,7 @@ const at = C.forwardRef(
1219
1219
  x: g.x,
1220
1220
  y: g.y - 8,
1221
1221
  textAnchor: "start",
1222
- className: "fill-secondary text-xs font-medium tabular-nums",
1222
+ className: "fill-secondary text-xs font-normal tabular-nums",
1223
1223
  children: [
1224
1224
  Math.round(g.conversionFromFirst),
1225
1225
  "%"
@@ -1232,7 +1232,7 @@ const at = C.forwardRef(
1232
1232
  x: g.x,
1233
1233
  y: p + 18,
1234
1234
  textAnchor: "start",
1235
- className: "fill-primary text-xs font-medium",
1235
+ className: "fill-primary text-xs font-normal",
1236
1236
  children: g.name
1237
1237
  }
1238
1238
  ),
@@ -1263,34 +1263,34 @@ const at = C.forwardRef(
1263
1263
  `${g.name}-${g.index}`
1264
1264
  ))
1265
1265
  ] }),
1266
- s !== !1 && k && /* @__PURE__ */ e(
1266
+ s !== !1 && C && /* @__PURE__ */ e(
1267
1267
  "div",
1268
1268
  {
1269
1269
  className: "pointer-events-none absolute z-10 -translate-x-1/2 -translate-y-full",
1270
- style: { left: k.x + k.width / 2, top: k.y - 10 },
1270
+ style: { left: C.x + C.width / 2, top: C.y - 10 },
1271
1271
  children: s ? s({
1272
1272
  active: !0,
1273
- label: k.name,
1273
+ label: C.name,
1274
1274
  items: [
1275
1275
  {
1276
- key: k.name,
1277
- name: k.name,
1278
- value: k.value,
1276
+ key: C.name,
1277
+ name: C.name,
1278
+ value: C.value,
1279
1279
  color: U,
1280
- datum: k.datum
1280
+ datum: C.datum
1281
1281
  }
1282
1282
  ],
1283
1283
  formatValue: f
1284
1284
  }) : /* @__PURE__ */ N("div", { className: "rounded-md bg-foreground px-2.5 py-1.5 text-xs whitespace-nowrap text-background", children: [
1285
- /* @__PURE__ */ e("div", { className: "text-xs font-medium tracking-wide uppercase text-background/60", children: k.name }),
1286
- /* @__PURE__ */ e("div", { className: "font-medium tabular-nums", children: f(k.value) }),
1285
+ /* @__PURE__ */ e("div", { className: "text-xs font-normal tracking-wide uppercase text-background/60", children: C.name }),
1286
+ /* @__PURE__ */ e("div", { className: "font-normal tabular-nums", children: f(C.value) }),
1287
1287
  /* @__PURE__ */ N("div", { className: "text-background/70 tabular-nums", children: [
1288
- Math.round(k.conversionFromFirst),
1288
+ Math.round(C.conversionFromFirst),
1289
1289
  "% of ",
1290
1290
  y[0].name,
1291
- k.index > 0 && /* @__PURE__ */ N(V, { children: [
1291
+ C.index > 0 && /* @__PURE__ */ N(V, { children: [
1292
1292
  " · −",
1293
- Math.round(k.dropOffFromPrevious),
1293
+ Math.round(C.dropOffFromPrevious),
1294
1294
  "% step"
1295
1295
  ] })
1296
1296
  ] })
@@ -5,7 +5,7 @@ import { cva as u } from "class-variance-authority";
5
5
  import { Close as m } from "../lib/icons.js";
6
6
  import { cn as o } from "../lib/cn.js";
7
7
  const b = u(
8
- "inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium whitespace-nowrap",
8
+ "inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-normal whitespace-nowrap",
9
9
  {
10
10
  variants: {
11
11
  variant: {
@@ -26,7 +26,7 @@ const b = u(
26
26
  compoundVariants: [
27
27
  // solid
28
28
  { variant: "solid", color: "default", className: "bg-fill text-fill-foreground" },
29
- { variant: "solid", color: "primary", className: "bg-brand text-brand-foreground" },
29
+ { variant: "solid", color: "primary", className: "bg-foreground text-background" },
30
30
  { variant: "solid", color: "success", className: "bg-success text-success-foreground" },
31
31
  { variant: "solid", color: "warning", className: "bg-warning text-warning-foreground" },
32
32
  { variant: "solid", color: "danger", className: "bg-danger text-danger-foreground" },
@@ -50,7 +50,7 @@ const b = u(
50
50
  }
51
51
  ), p = {
52
52
  default: "bg-muted-foreground",
53
- primary: "bg-brand",
53
+ primary: "bg-foreground",
54
54
  success: "bg-success",
55
55
  warning: "bg-warning",
56
56
  danger: "bg-danger",
@@ -5,38 +5,60 @@ import * as React from "react";
5
5
  * The inline sibling is `Code`; reach for this whenever the snippet owns its
6
6
  * own line(s).
7
7
  *
8
- * A recessed, static surface — filled, never elevated (elevation means
9
- * actionable) and never bordered. Long snippets scroll inside the block, so
10
- * cap the height from the outside (`className="max-h-96"`) rather than letting
11
- * the page grow.
8
+ * Ported from Geist's CodeBlock composition, then adapted to ADS tokens and
9
+ * component conventions. Code is passed as a string child, line numbers are
10
+ * visible by default, a filename turns on the toolbar, and highlighted / added
11
+ * / removed lines are authored through dedicated props.
12
+ *
13
+ * The default block uses an unfilled, outlined toolbar above a white, outlined
14
+ * source surface; the toolbar's bottom stroke separates the two. It stays
15
+ * static and never elevated (elevation means actionable). Long snippets scroll
16
+ * inside the block, so cap the height from the outside
17
+ * (`className="max-h-96"`) rather than letting the page grow.
12
18
  *
13
19
  * Highlighting is deliberately minimal and dependency-free: `language` selects
14
- * one of a few small built-in grammars (sql, json, yaml, bash, ts/js) and only
15
- * the parts a reader scans for are coloured — comments recede, strings and
16
- * numbers take one accent each, keywords take weight. An unrecognised language
17
- * renders plain rather than guessing. No highlighter library, and no rainbow
18
- * competing with the brand's monochrome.
20
+ * one of a few small built-in grammars (sql, json, yaml, bash, ts/js). Comments
21
+ * and punctuation recede, keywords take weight, and every other token stays
22
+ * neutral. An unrecognised language renders plain rather than guessing. No
23
+ * highlighter library and no syntax rainbow competing with the source.
19
24
  */
20
25
  declare const codeBlockVariants: (props?: ({
21
26
  variant?: "soft" | "plain" | null | undefined;
22
27
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
23
- export interface CodeBlockProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children">, VariantProps<typeof codeBlockVariants> {
24
- /** The source to display, verbatim. */
25
- code: string;
28
+ interface CodeBlockBaseProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children">, VariantProps<typeof codeBlockVariants> {
26
29
  /**
27
- * Language label for the header, e.g. `sql`. Also selects the highlighting
28
- * grammar: sql · json · yaml · yml · bash/sh/shell/zsh · ts/tsx/js/jsx.
29
- * Anything else is shown as a label and rendered plain.
30
+ * Syntax grammar: sql · json · yaml · yml · bash/sh/shell/zsh ·
31
+ * ts/tsx/js/jsx. Unknown languages render verbatim rather than guessing.
30
32
  */
31
33
  language?: string;
32
- /** Leading header label, e.g. `schema.yaml`. Takes the header's start slot. */
34
+ /** A paste destination such as `app/page.tsx`; turns on the toolbar. */
33
35
  filename?: string;
34
36
  /** Show the copy control. */
35
37
  isCopyable?: boolean;
36
- /** Number the lines in a non-selectable gutter. */
38
+ /** Hide the default line-number gutter. Mirrors Geist's public API. */
39
+ hideLineNumbers?: boolean;
40
+ /** @deprecated Line numbers are on by default; use `hideLineNumbers`. */
37
41
  showLineNumbers?: boolean;
42
+ /** One-based lines to emphasize as the subject under discussion. */
43
+ highlightedLinesNumbers?: number[];
44
+ /** One-based lines introduced by a change. */
45
+ addedLinesNumbers?: number[];
46
+ /** One-based lines removed by a change. */
47
+ removedLinesNumbers?: number[];
38
48
  /** Accessible label for the copy control. */
39
49
  copyLabel?: string;
40
50
  }
51
+ /**
52
+ * Geist-compatible content uses a string child. The former `code` prop remains
53
+ * as a deprecated compatibility path so existing ADS consumers do not break.
54
+ */
55
+ export type CodeBlockProps = CodeBlockBaseProps & ({
56
+ children: string;
57
+ code?: never;
58
+ } | {
59
+ /** @deprecated Pass the source as `<CodeBlock>{code}</CodeBlock>`. */
60
+ code: string;
61
+ children?: never;
62
+ });
41
63
  export declare const CodeBlock: React.ForwardRefExoticComponent<CodeBlockProps & React.RefAttributes<HTMLDivElement>>;
42
64
  export { codeBlockVariants };