@actioneer/ads 0.5.6 → 0.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/bin/ads-init.mjs +6 -0
  2. package/components/accordion.js +50 -48
  3. package/components/agent-icon.d.ts +12 -0
  4. package/components/agent-icon.js +135 -121
  5. package/components/ai-elements/chain-of-thought-icon.d.ts +10 -12
  6. package/components/ai-elements/chain-of-thought-icon.js +341 -201
  7. package/components/ai-elements/chain-of-thought.d.ts +2 -2
  8. package/components/ai-elements/chain-of-thought.js +108 -108
  9. package/components/ai-elements/chart.js +16 -14
  10. package/components/ai-elements/inline-citation.js +41 -41
  11. package/components/ai-elements/message.js +4 -4
  12. package/components/ai-elements/queue.js +7 -7
  13. package/components/ai-elements/research-activity.js +114 -114
  14. package/components/ai-elements/shimmer.d.ts +2 -2
  15. package/components/ai-elements/speech-input.js +28 -28
  16. package/components/ai-elements/task-progress.js +26 -16
  17. package/components/ai-elements/task.js +17 -17
  18. package/components/ai-elements/tool.js +6 -6
  19. package/components/ai-elements/transcript.js +6 -5
  20. package/components/ai-elements/voice.js +1 -1
  21. package/components/alert.js +10 -10
  22. package/components/answer-sources.d.ts +42 -0
  23. package/components/answer-sources.js +111 -0
  24. package/components/answer.js +115 -114
  25. package/components/assistant-ui/action-bar.js +94 -48
  26. package/components/assistant-ui/attachment.js +131 -103
  27. package/components/assistant-ui/badge.d.ts +1 -1
  28. package/components/assistant-ui/badge.js +17 -17
  29. package/components/assistant-ui/chain-of-thought.d.ts +1 -1
  30. package/components/assistant-ui/composer-add-context.js +9 -9
  31. package/components/assistant-ui/composer-deep-research.js +5 -5
  32. package/components/assistant-ui/composer-harness.js +12 -9
  33. package/components/assistant-ui/composer-trigger-popover.js +45 -34
  34. package/components/assistant-ui/composer.js +59 -59
  35. package/components/assistant-ui/error.js +14 -14
  36. package/components/assistant-ui/file.d.ts +1 -1
  37. package/components/assistant-ui/image.d.ts +1 -1
  38. package/components/assistant-ui/image.js +113 -103
  39. package/components/assistant-ui/markdown-text.js +18 -18
  40. package/components/assistant-ui/message.js +46 -45
  41. package/components/assistant-ui/quote.js +1 -1
  42. package/components/assistant-ui/reasoning.d.ts +1 -1
  43. package/components/assistant-ui/reasoning.js +66 -77
  44. package/components/assistant-ui/suggestions.js +4 -4
  45. package/components/assistant-ui/thread-context.d.ts +2 -0
  46. package/components/assistant-ui/thread.js +41 -40
  47. package/components/assistant-ui/tool-fallback.js +60 -63
  48. package/components/assistant-ui/tool-group.d.ts +1 -1
  49. package/components/assistant-ui/tool-group.js +36 -42
  50. package/components/audio-waveform.js +25 -24
  51. package/components/autocomplete.d.ts +1 -0
  52. package/components/autocomplete.js +45 -43
  53. package/components/avatar.js +30 -30
  54. package/components/badge.d.ts +1 -1
  55. package/components/breadcrumbs.js +2 -2
  56. package/components/button.d.ts +2 -2
  57. package/components/button.js +22 -20
  58. package/components/card.js +8 -8
  59. package/components/carousel.js +105 -104
  60. package/components/chart.js +9 -7
  61. package/components/checkbox.js +74 -38
  62. package/components/chip.d.ts +1 -1
  63. package/components/code-block.js +3 -3
  64. package/components/collapsible.js +67 -23
  65. package/components/connector-card.js +6 -6
  66. package/components/drawer.d.ts +15 -10
  67. package/components/drawer.js +78 -77
  68. package/components/dropdown.d.ts +3 -1
  69. package/components/dropdown.js +88 -79
  70. package/components/empty-state.d.ts +4 -4
  71. package/components/empty-state.js +7 -7
  72. package/components/field.d.ts +4 -0
  73. package/components/field.js +45 -34
  74. package/components/file-dropzone.js +12 -12
  75. package/components/index.d.ts +4 -0
  76. package/components/index.js +584 -553
  77. package/components/infinite-canvas.js +1 -1
  78. package/components/input-field.js +51 -46
  79. package/components/input.js +20 -20
  80. package/components/link.js +9 -9
  81. package/components/modal.js +105 -73
  82. package/components/navbar.d.ts +1 -1
  83. package/components/navbar.js +1 -1
  84. package/components/number-field.js +38 -29
  85. package/components/page-header.js +12 -12
  86. package/components/pagination.js +19 -19
  87. package/components/panel.js +2 -2
  88. package/components/pixel-blast-svg.js +3 -3
  89. package/components/pixel-icon.d.ts +3 -1
  90. package/components/pixel-icon.js +294 -215
  91. package/components/popover.d.ts +1 -1
  92. package/components/popover.js +66 -64
  93. package/components/progress-circle.js +36 -32
  94. package/components/progress.js +28 -24
  95. package/components/radio.js +59 -49
  96. package/components/resizable-panel.js +1 -1
  97. package/components/reveal.d.ts +2 -2
  98. package/components/ripple.d.ts +3 -3
  99. package/components/scroll-area.js +17 -16
  100. package/components/segmented.d.ts +4 -1
  101. package/components/segmented.js +26 -25
  102. package/components/select.d.ts +2 -0
  103. package/components/select.js +61 -57
  104. package/components/setting-row.js +45 -42
  105. package/components/sidebar.d.ts +2 -2
  106. package/components/sidebar.js +131 -127
  107. package/components/skeleton.js +5 -5
  108. package/components/spinner.d.ts +13 -4
  109. package/components/spinner.js +42 -42
  110. package/components/stepper.js +21 -21
  111. package/components/switch.js +52 -32
  112. package/components/table.d.ts +24 -7
  113. package/components/table.js +457 -220
  114. package/components/tabs.js +149 -137
  115. package/components/textarea.js +1 -2
  116. package/components/toast.js +66 -66
  117. package/components/tooltip.js +2 -2
  118. package/components/tree.js +62 -51
  119. package/components/typography.d.ts +2 -1
  120. package/components/typography.js +33 -32
  121. package/components/ui/button.d.ts +2 -2
  122. package/components/ui/button.js +19 -19
  123. package/components/ui/collapsible.d.ts +1 -5
  124. package/components/ui/dialog.d.ts +3 -3
  125. package/components/ui/dialog.js +95 -58
  126. package/components/ui/tooltip.d.ts +2 -2
  127. package/components/ui/tooltip.js +67 -33
  128. package/components/viz-charts.js +95 -95
  129. package/demo/components/add-to-artifact.js +341 -0
  130. package/demo/lib/artifact-library.js +134 -0
  131. package/fonts/aribau-grotesk-medium.woff2 +0 -0
  132. package/fonts/aribau-grotesk-regular.woff2 +0 -0
  133. package/fonts.css +11 -11
  134. package/hooks/agents-ui/use-agent-audio-visualizer-aura.js +17 -16
  135. package/hooks/agents-ui/use-agent-audio-visualizer-wave.js +21 -20
  136. package/lib/icons.d.ts +12 -0
  137. package/lib/icons.js +107 -104
  138. package/lib/motion.d.ts +42 -39
  139. package/lib/motion.js +112 -52
  140. package/lib/spinner-mark.d.ts +9 -0
  141. package/lib/spinner-mark.js +98 -0
  142. package/llms.txt +69 -26
  143. package/manifest.json +344 -42
  144. package/package.json +1 -1
  145. package/styles.css +175 -161
  146. package/theme.css +104 -128
  147. package/components/ui/collapsible.js +0 -35
  148. package/fonts/aribau-grotesk-500.otf +0 -0
  149. package/fonts/aribau-grotesk-600.woff2 +0 -0
@@ -58,7 +58,16 @@ function y({ status: a }) {
58
58
  ),
59
59
  children: [
60
60
  a === "complete" && /* @__PURE__ */ t(M, { className: "size-4", strokeWidth: 2 }),
61
- a === "active" && /* @__PURE__ */ t(J, { size: "sm", color: "current", role: "presentation", "aria-hidden": !0 }),
61
+ a === "active" && /* @__PURE__ */ t(
62
+ J,
63
+ {
64
+ variant: "content",
65
+ size: "sm",
66
+ color: "current",
67
+ role: "presentation",
68
+ "aria-hidden": !0
69
+ }
70
+ ),
62
71
  a === "pending" && /* @__PURE__ */ t(Q, { className: "size-4" })
63
72
  ]
64
73
  }
@@ -84,25 +93,25 @@ const O = i.forwardRef(
84
93
  onOpenChange: u,
85
94
  title: c = "Task progress",
86
95
  summary: _,
87
- emptyLabel: P = "No task steps",
88
- isSticky: I,
96
+ emptyLabel: I = "No task steps",
97
+ isSticky: P,
89
98
  role: T,
90
99
  "aria-label": $,
91
100
  "aria-busy": z,
92
101
  ...D
93
102
  }, S) => {
94
- const g = i.useContext(w), b = d !== void 0, [V, j] = i.useState(f), m = b ? d : V, o = r.findIndex((e) => e.status === "active"), p = r.reduce(
103
+ const g = i.useContext(w), x = d !== void 0, [V, j] = i.useState(f), m = x ? d : V, o = r.findIndex((e) => e.status === "active"), p = r.reduce(
95
104
  (e, F, W) => F.status === "complete" ? W : e,
96
105
  -1
97
106
  ), E = r.findIndex(
98
107
  (e) => e.status === "pending"
99
- ), h = o >= 0 ? o : p >= 0 ? p : E, s = h >= 0 ? r[h] : void 0, x = o >= 0 ? o + 1 : p >= 0 ? p + 1 : 0, R = r.filter(
108
+ ), h = o >= 0 ? o : p >= 0 ? p : E, s = h >= 0 ? r[h] : void 0, b = o >= 0 ? o + 1 : p >= 0 ? p + 1 : 0, R = r.filter(
100
109
  (e) => e.status === "pending"
101
110
  ).length, v = r.length > 0 && r.every((e) => e.status === "complete"), A = o >= 0 ? "active" : v ? "complete" : "pending", k = s ? s.accessibilityLabel ?? (typeof s.label == "string" ? s.label : "") : "", L = i.useCallback(
102
111
  (e) => {
103
- b || j(e), u == null || u(e);
112
+ x || j(e), u == null || u(e);
104
113
  },
105
- [b, u]
114
+ [x, u]
106
115
  );
107
116
  return /* @__PURE__ */ n(
108
117
  B,
@@ -110,14 +119,14 @@ const O = i.forwardRef(
110
119
  ref: S,
111
120
  open: m,
112
121
  onOpenChange: L,
113
- role: T ?? "region",
122
+ role: T ?? "group",
114
123
  "aria-label": $ ?? c,
115
124
  "aria-busy": z ?? (o >= 0 || void 0),
116
125
  ...D,
117
126
  "data-slot": "task-progress",
118
127
  "data-status": A,
119
128
  className: l(
120
- U({ isSticky: g ? !1 : I }),
129
+ U({ isSticky: g ? !1 : P }),
121
130
  g && "rounded-b-none",
122
131
  a
123
132
  ),
@@ -130,10 +139,10 @@ const O = i.forwardRef(
130
139
  "aria-label": c,
131
140
  "aria-valuemin": 0,
132
141
  "aria-valuemax": r.length,
133
- "aria-valuenow": x
142
+ "aria-valuenow": b
134
143
  }
135
144
  ),
136
- /* @__PURE__ */ t("span", { className: "sr-only", "aria-live": "polite", "aria-atomic": "true", children: v ? `All ${r.length} steps complete` : `Step ${x} of ${r.length}${k ? `: ${k}` : ""}. ${R} pending.` }),
145
+ /* @__PURE__ */ t("span", { className: "sr-only", "aria-live": "polite", "aria-atomic": "true", children: v ? `All ${r.length} steps complete` : `Step ${b} of ${r.length}${k ? `: ${k}` : ""}. ${R} pending.` }),
137
146
  /* @__PURE__ */ t(G, { asChild: !0, children: /* @__PURE__ */ n(
138
147
  "button",
139
148
  {
@@ -142,21 +151,21 @@ const O = i.forwardRef(
142
151
  className: l(
143
152
  "flex min-h-14 w-full items-center gap-3 px-4 text-left sm:px-5",
144
153
  "rounded-t-2xl rounded-b-sm outline-none focus-visible:ring-3 focus-visible:ring-inset focus-visible:ring-ring",
145
- "transition-[color,transform] duration-(--duration-fast) ease-out active:scale-(--scale-press) motion-reduce:transition-none"
154
+ "transition-[color,transform] duration-150 ease-out active:scale-[0.97] motion-reduce:transition-none"
146
155
  ),
147
156
  children: [
148
- m ? /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-base font-semibold text-secondary", children: c }) : /* @__PURE__ */ n(q, { children: [
157
+ m ? /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-base font-medium text-secondary", children: c }) : /* @__PURE__ */ n(q, { children: [
149
158
  /* @__PURE__ */ t(y, { status: (s == null ? void 0 : s.status) ?? "pending" }),
150
- /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-base text-primary", children: _ ?? (s == null ? void 0 : s.label) ?? P }),
159
+ /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-base text-primary", children: _ ?? (s == null ? void 0 : s.label) ?? I }),
151
160
  (s == null ? void 0 : s.status) === "active" && /* @__PURE__ */ t(N, { elapsed: s.elapsed })
152
161
  ] }),
153
162
  /* @__PURE__ */ n(
154
163
  "span",
155
164
  {
156
165
  "aria-hidden": !0,
157
- className: "shrink-0 text-xs font-semibold text-tertiary tabular-nums",
166
+ className: "shrink-0 text-xs font-medium text-tertiary tabular-nums",
158
167
  children: [
159
- x,
168
+ b,
160
169
  " / ",
161
170
  r.length
162
171
  ]
@@ -179,6 +188,7 @@ const O = i.forwardRef(
179
188
  "ol",
180
189
  {
181
190
  "aria-label": "Task steps",
191
+ tabIndex: 0,
182
192
  className: "max-h-64 space-y-1 overflow-y-auto px-4 pb-4 sm:px-5",
183
193
  children: r.map((e) => /* @__PURE__ */ n(
184
194
  "li",
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import { jsx as e, jsxs as o } from "react/jsx-runtime";
3
3
  import { createContext as m, useContext as d } from "react";
4
- import { motion as u } from "motion/react";
5
- import { EASE_DISCLOSURE as p } from "../../lib/motion.js";
4
+ import { motion as p } from "motion/react";
5
+ import { springDisclosure as u } from "../../lib/motion.js";
6
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
- import { cn as i } from "../../lib/cn.js";
8
+ import { cn as n } from "../../lib/cn.js";
9
9
  const l = m(!0), k = ({
10
10
  children: t,
11
11
  className: a,
@@ -13,7 +13,7 @@ const l = m(!0), k = ({
13
13
  }) => /* @__PURE__ */ e(
14
14
  "div",
15
15
  {
16
- className: i(
16
+ className: n(
17
17
  "inline-flex items-center gap-1 rounded-md bg-fill px-1.5 py-0.5 text-xs text-fill-foreground",
18
18
  a
19
19
  ),
@@ -22,22 +22,22 @@ const l = m(!0), k = ({
22
22
  }
23
23
  );
24
24
  k.displayName = "TaskItemFile";
25
- const v = ({ children: t, className: a, ...s }) => /* @__PURE__ */ e("div", { className: i("text-base text-secondary", a), ...s, children: t });
25
+ const v = ({ children: t, className: a, ...s }) => /* @__PURE__ */ e("div", { className: n("text-base text-secondary", a), ...s, children: t });
26
26
  v.displayName = "TaskItem";
27
27
  const y = ({
28
28
  defaultOpen: t = !0,
29
29
  className: a,
30
30
  open: s,
31
- children: n,
31
+ children: i,
32
32
  ...r
33
33
  }) => /* @__PURE__ */ e(
34
34
  h,
35
35
  {
36
- className: i(a),
36
+ className: n(a),
37
37
  defaultOpen: t,
38
38
  open: s,
39
39
  ...r,
40
- children: /* @__PURE__ */ e(l.Provider, { value: s ?? t, children: n })
40
+ children: /* @__PURE__ */ e(l.Provider, { value: s ?? t, children: i })
41
41
  }
42
42
  );
43
43
  y.displayName = "Task";
@@ -45,23 +45,23 @@ const T = ({
45
45
  children: t,
46
46
  className: a,
47
47
  title: s,
48
- icon: n,
48
+ icon: i,
49
49
  endContent: r,
50
50
  ...c
51
- }) => /* @__PURE__ */ e(f, { asChild: !0, className: i("group", a), ...c, children: t ?? /* @__PURE__ */ o(
51
+ }) => /* @__PURE__ */ e(f, { asChild: !0, className: n("group", a), ...c, children: t ?? /* @__PURE__ */ o(
52
52
  "button",
53
53
  {
54
54
  type: "button",
55
55
  className: "flex w-full cursor-pointer items-center gap-2 rounded-sm text-base text-secondary outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring motion-reduce:transition-none",
56
56
  children: [
57
- /* @__PURE__ */ e("span", { className: "flex size-4 shrink-0 items-center justify-center [&>svg]:size-4", "aria-hidden": !0, children: n ?? /* @__PURE__ */ e(g, { className: "size-4 shrink-0" }) }),
57
+ /* @__PURE__ */ e("span", { className: "flex size-4 shrink-0 items-center justify-center [&>svg]:size-4", "aria-hidden": !0, children: i ?? /* @__PURE__ */ e(g, { className: "size-4 shrink-0" }) }),
58
58
  /* @__PURE__ */ e("span", { className: "text-base", children: s }),
59
59
  /* @__PURE__ */ o("span", { className: "ml-auto flex shrink-0 items-center gap-2", children: [
60
60
  r != null && /* @__PURE__ */ e("span", { className: "text-xs text-tertiary tabular-nums", children: r }),
61
61
  /* @__PURE__ */ e(
62
62
  N,
63
63
  {
64
- className: "size-4 shrink-0 transition-transform duration-(--duration-fast) ease-out group-data-[state=open]:rotate-180 motion-reduce:transition-none",
64
+ className: "size-4 shrink-0 transition-transform duration-150 ease-out group-data-[state=open]:rotate-180 motion-reduce:transition-none",
65
65
  "aria-hidden": !0
66
66
  }
67
67
  )
@@ -75,18 +75,18 @@ const b = ({
75
75
  className: a,
76
76
  ...s
77
77
  }) => {
78
- const n = d(l);
78
+ const i = d(l);
79
79
  return /* @__PURE__ */ e(x, { forceMount: !0, asChild: !0, ...s, children: /* @__PURE__ */ e(
80
- u.div,
80
+ p.div,
81
81
  {
82
82
  initial: !1,
83
- animate: n ? "open" : "closed",
83
+ animate: i ? "open" : "closed",
84
84
  variants: {
85
85
  open: { height: "auto", opacity: 1 },
86
86
  closed: { height: 0, opacity: 0 }
87
87
  },
88
- transition: { duration: n ? 0.28 : 0.2, ease: p },
89
- className: i(
88
+ transition: u,
89
+ className: n(
90
90
  "overflow-hidden text-secondary outline-none",
91
91
  "data-[state=closed]:pointer-events-none",
92
92
  a
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import { jsx as t, jsxs as l } from "react/jsx-runtime";
3
- import { isValidElement as m } from "react";
4
- import { Collapsible as p, CollapsibleTrigger as f, CollapsibleContent as h } from "../collapsible.js";
3
+ import { isValidElement as p } from "react";
4
+ import { Collapsible as m, CollapsibleTrigger as f, CollapsibleContent as h } from "../collapsible.js";
5
5
  import { Badge as x } from "../badge.js";
6
6
  import { ChevronDown as g, CloseCircle as b, CheckCircle as N, Clock as v, CircleDashed as y } from "../../lib/icons.js";
7
7
  import { cn as r } from "../../lib/cn.js";
8
8
  import { TraceStateIcon as w } from "./chain-of-thought-icon.js";
9
9
  const C = ({ className: e, ...o }) => /* @__PURE__ */ t(
10
- p,
10
+ m,
11
11
  {
12
12
  className: r(
13
13
  "not-prose group/tool w-full overflow-hidden rounded-xl bg-card",
@@ -84,7 +84,7 @@ const O = {
84
84
  /* @__PURE__ */ t(
85
85
  g,
86
86
  {
87
- 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",
87
+ className: "size-4 shrink-0 text-tertiary transition-transform duration-150 ease-out group-data-[state=open]/tool-header:rotate-180 motion-reduce:transition-none",
88
88
  "aria-hidden": !0
89
89
  }
90
90
  )
@@ -116,12 +116,12 @@ const c = ({
116
116
  ),
117
117
  children: /* @__PURE__ */ t("code", { children: e })
118
118
  }
119
- ), d = ({ children: e }) => /* @__PURE__ */ t("h4", { className: "text-xs font-normal uppercase tracking-wide text-tertiary", children: e }), I = ({ className: e, input: o, ...n }) => /* @__PURE__ */ l("div", { className: r("space-y-2 overflow-hidden p-4", e), ...n, children: [
119
+ ), d = ({ children: e }) => /* @__PURE__ */ t("p", { className: "text-xs font-normal uppercase tracking-wide text-tertiary", children: e }), I = ({ className: e, input: o, ...n }) => /* @__PURE__ */ l("div", { className: r("space-y-2 overflow-hidden p-4", e), ...n, children: [
120
120
  /* @__PURE__ */ t(d, { children: "Parameters" }),
121
121
  /* @__PURE__ */ t(c, { code: JSON.stringify(o, null, 2) })
122
122
  ] });
123
123
  I.displayName = "ToolInput";
124
- const P = (e) => typeof e == "object" && e !== null && !m(e) ? /* @__PURE__ */ t(c, { code: JSON.stringify(e, null, 2) }) : typeof e == "string" ? /* @__PURE__ */ t("div", { className: "rounded-md bg-surface p-3 text-xs leading-relaxed text-secondary whitespace-pre-wrap", children: e }) : e, z = ({
124
+ const P = (e) => typeof e == "object" && e !== null && !p(e) ? /* @__PURE__ */ t(c, { code: JSON.stringify(e, null, 2) }) : typeof e == "string" ? /* @__PURE__ */ t("div", { className: "rounded-md bg-surface p-3 text-xs leading-relaxed text-secondary whitespace-pre-wrap", children: e }) : e, z = ({
125
125
  className: e,
126
126
  output: o,
127
127
  errorText: n,
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
+ import { jsx as e, jsxs as d } from "react/jsx-runtime";
3
3
  import { cn as t } from "../../lib/cn.js";
4
4
  function g({
5
5
  turns: i,
@@ -7,11 +7,11 @@ function g({
7
7
  userLabel: o = "User",
8
8
  emptyMessage: m = "No transcript captured yet.",
9
9
  className: n,
10
- ...d
10
+ ...l
11
11
  }) {
12
- return i.length === 0 ? /* @__PURE__ */ e("p", { className: t("text-sm text-muted-foreground", n), "data-slot": "transcript", ...d, children: m }) : /* @__PURE__ */ e("div", { className: t("space-y-3", n), "data-slot": "transcript", ...d, children: i.map((s) => {
12
+ return i.length === 0 ? /* @__PURE__ */ e("p", { className: t("text-sm text-muted-foreground", n), "data-slot": "transcript", ...l, children: m }) : /* @__PURE__ */ e("div", { className: t("space-y-3", n), "data-slot": "transcript", ...l, children: i.map((s) => {
13
13
  const r = s.role === "user", a = r ? s.tone ?? "neutral" : "neutral";
14
- return /* @__PURE__ */ e("div", { className: t("flex w-full", r ? "justify-end" : "justify-start"), children: /* @__PURE__ */ l(
14
+ return /* @__PURE__ */ e("div", { className: t("flex w-full", r ? "justify-end" : "justify-start"), children: /* @__PURE__ */ d(
15
15
  "div",
16
16
  {
17
17
  className: t(
@@ -21,10 +21,11 @@ function g({
21
21
  a === "negative" && "bg-danger-100/70"
22
22
  ),
23
23
  children: [
24
- /* @__PURE__ */ l("div", { className: t("mb-1 flex items-center gap-3", r && "justify-end"), children: [
24
+ /* @__PURE__ */ d("div", { className: t("mb-1 flex items-center gap-3", r && "justify-end"), children: [
25
25
  a !== "neutral" && /* @__PURE__ */ e(
26
26
  "span",
27
27
  {
28
+ role: "img",
28
29
  "aria-label": a === "positive" ? "Positive response" : "Negative response",
29
30
  className: t(
30
31
  "size-1.5 rounded-dot",
@@ -389,7 +389,7 @@ function ue({ state: t = "idle", className: e }) {
389
389
  {
390
390
  "aria-hidden": !0,
391
391
  className: R(
392
- "inline-block size-2.5 shrink-0 rounded-dot transition-[background-color,opacity] duration-(--duration-normal) ease-out motion-reduce:transition-none",
392
+ "inline-block size-2.5 shrink-0 rounded-dot transition-[background-color,opacity] duration-200 ease-out motion-reduce:transition-none",
393
393
  ae[t],
394
394
  e
395
395
  )
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { jsxs as m, jsx as e } from "react/jsx-runtime";
2
+ import { jsxs as u, jsx as e } from "react/jsx-runtime";
3
3
  import * as i from "react";
4
- import { cva as u } from "class-variance-authority";
4
+ import { cva as m } 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
- const h = u(
7
+ const h = m(
8
8
  "flex w-full items-start gap-4 rounded-2xl bg-muted p-4",
9
9
  {
10
10
  variants: {
@@ -25,17 +25,17 @@ const h = u(
25
25
  danger: g,
26
26
  info: l
27
27
  }, N = i.forwardRef(
28
- ({ className: t, variant: r = "default", icon: a, onClose: s, children: o, ...c }, d) => {
29
- const f = w[r ?? "default"];
30
- return /* @__PURE__ */ m(
28
+ ({ className: t, variant: r = "default", icon: a, onClose: s, children: o, ...c }, f) => {
29
+ const d = w[r ?? "default"];
30
+ return /* @__PURE__ */ u(
31
31
  "div",
32
32
  {
33
- ref: d,
33
+ ref: f,
34
34
  role: "alert",
35
35
  className: n(h({ variant: r }), t),
36
36
  ...c,
37
37
  children: [
38
- /* @__PURE__ */ e("span", { className: "flex shrink-0 select-none items-center justify-center py-1 text-(--alert-accent) [&_svg]:size-4", children: a ?? /* @__PURE__ */ e(f, { "aria-hidden": !0 }) }),
38
+ /* @__PURE__ */ e("span", { className: "flex shrink-0 select-none items-center justify-center py-1 text-(--alert-accent) [&_svg]:size-4", children: a ?? /* @__PURE__ */ e(d, { "aria-hidden": !0 }) }),
39
39
  /* @__PURE__ */ e("div", { className: "flex min-w-0 grow flex-col items-start", children: o }),
40
40
  s && /* @__PURE__ */ e(
41
41
  "button",
@@ -44,7 +44,7 @@ const h = u(
44
44
  "aria-label": "Dismiss",
45
45
  onClick: s,
46
46
  className: n(
47
- "inline-flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground",
47
+ "inline-flex size-6 shrink-0 items-center justify-center rounded-sm text-muted-foreground",
48
48
  "transition-colors hover:bg-fill hover:text-foreground",
49
49
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
50
50
  "[&_svg]:size-4"
@@ -62,7 +62,7 @@ const b = i.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ e(
62
62
  "p",
63
63
  {
64
64
  ref: a,
65
- className: n("text-xs font-normal leading-6 text-(--alert-accent)", t),
65
+ className: n("text-xs font-normal leading-6 text-foreground", t),
66
66
  ...r
67
67
  }
68
68
  ));
@@ -0,0 +1,42 @@
1
+ import { DrawerProps } from './drawer';
2
+ import * as React from "react";
3
+ export interface AnswerSourcesProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ /** Total referenced nodes represented by the source chips. */
5
+ count: number;
6
+ /** Label before the count. Defaults to “Sources”. */
7
+ label?: string;
8
+ }
9
+ /** Compact source strip placed immediately before an answer's follow-ups. */
10
+ export declare const AnswerSources: React.ForwardRefExoticComponent<AnswerSourcesProps & React.RefAttributes<HTMLDivElement>>;
11
+ export interface AnswerSourceChipProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
12
+ /** Connector/source mark shown before the label. */
13
+ icon?: React.ReactNode;
14
+ /** Number of references represented by this chip. Hidden when one. */
15
+ count?: number;
16
+ children: React.ReactNode;
17
+ }
18
+ /** Blue connector chip that opens its referenced nodes in the inspector. */
19
+ export declare const AnswerSourceChip: React.ForwardRefExoticComponent<AnswerSourceChipProps & React.RefAttributes<HTMLButtonElement>>;
20
+ export interface AnswerSourceInspectorProps extends Omit<DrawerProps, "children"> {
21
+ /** Supporting count/context line beneath the title. */
22
+ description?: React.ReactNode;
23
+ /** Panel title. Defaults to “Answer sources”. */
24
+ title?: React.ReactNode;
25
+ children: React.ReactNode;
26
+ }
27
+ /** Shell-level white source panel rendered beside the answer, never over it. */
28
+ export declare function AnswerSourceInspector({ title, description, className, children, ...props }: AnswerSourceInspectorProps): React.JSX.Element;
29
+ export interface AnswerSourceItemProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children" | "name"> {
30
+ /** Referenced node/table name. */
31
+ name: React.ReactNode;
32
+ /** Connector, warehouse, or parent source. */
33
+ source?: React.ReactNode;
34
+ /** Why this node was referenced or its current read state. */
35
+ description?: React.ReactNode;
36
+ /** Optional semantic status badge. */
37
+ status?: React.ReactNode;
38
+ /** Leading node glyph. Defaults to a table icon. */
39
+ icon?: React.ReactNode;
40
+ }
41
+ /** Outlined referenced-node row used inside AnswerSourceInspector. */
42
+ export declare const AnswerSourceItem: React.ForwardRefExoticComponent<AnswerSourceItemProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,111 @@
1
+ "use client";
2
+ import { jsxs as s, jsx as r } from "react/jsx-runtime";
3
+ import * as c from "react";
4
+ import { ExternalLink as p, Table as f } from "../lib/icons.js";
5
+ import { cn as o } from "../lib/cn.js";
6
+ import { Button as u } from "./button.js";
7
+ import { Drawer as x, DrawerHeader as h, DrawerTitle as g, DrawerBody as N } from "./drawer.js";
8
+ const w = c.forwardRef(({ count: n, label: e = "Sources", className: a, children: t, ...i }, l) => /* @__PURE__ */ s(
9
+ "div",
10
+ {
11
+ ref: l,
12
+ className: o("flex flex-wrap items-center gap-2", a),
13
+ ...i,
14
+ children: [
15
+ /* @__PURE__ */ s("span", { className: "text-xs font-normal uppercase tracking-wide text-tertiary", children: [
16
+ e,
17
+ " · ",
18
+ n
19
+ ] }),
20
+ t
21
+ ]
22
+ }
23
+ ));
24
+ w.displayName = "AnswerSources";
25
+ const b = c.forwardRef(({ icon: n, count: e, className: a, children: t, ...i }, l) => /* @__PURE__ */ s(
26
+ u,
27
+ {
28
+ ref: l,
29
+ type: "button",
30
+ size: "xs",
31
+ variant: "ghost",
32
+ className: o(
33
+ "h-auto gap-1.5 rounded-full bg-info-50 px-2 py-0.5 text-xs text-info-700 hover:bg-info-100 focus-visible:ring-info/40",
34
+ a
35
+ ),
36
+ ...i,
37
+ children: [
38
+ n,
39
+ t,
40
+ e != null && e > 1 && /* @__PURE__ */ s("span", { className: "tabular-nums", children: [
41
+ "· ",
42
+ e
43
+ ] })
44
+ ]
45
+ }
46
+ ));
47
+ b.displayName = "AnswerSourceChip";
48
+ function D({
49
+ title: n = "Answer sources",
50
+ description: e,
51
+ className: a,
52
+ children: t,
53
+ ...i
54
+ }) {
55
+ return /* @__PURE__ */ s(x, { className: o("h-full", a), ...i, children: [
56
+ /* @__PURE__ */ s(h, { className: "gap-1", children: [
57
+ /* @__PURE__ */ r(g, { children: n }),
58
+ e && /* @__PURE__ */ r("p", { className: "text-xs text-tertiary", children: e })
59
+ ] }),
60
+ /* @__PURE__ */ r(N, { className: "space-y-2", children: t })
61
+ ] });
62
+ }
63
+ const y = c.forwardRef(
64
+ ({
65
+ name: n,
66
+ source: e,
67
+ description: a,
68
+ status: t,
69
+ icon: i = /* @__PURE__ */ r(f, { "aria-hidden": !0, className: "size-4" }),
70
+ className: l,
71
+ ...m
72
+ }, d) => /* @__PURE__ */ s(
73
+ "button",
74
+ {
75
+ ref: d,
76
+ type: "button",
77
+ className: o(
78
+ "flex w-full items-start gap-3 rounded-lg border border-border bg-fill p-3 text-left",
79
+ "transition-colors hover:bg-muted",
80
+ "outline-none focus-visible:ring-3 focus-visible:ring-ring",
81
+ l
82
+ ),
83
+ ...m,
84
+ children: [
85
+ /* @__PURE__ */ r("span", { className: "mt-0.5 grid size-8 shrink-0 place-items-center rounded-md bg-muted text-foreground", children: i }),
86
+ /* @__PURE__ */ s("span", { className: "min-w-0 flex-1", children: [
87
+ /* @__PURE__ */ s("span", { className: "flex items-center gap-2", children: [
88
+ /* @__PURE__ */ r("span", { className: "min-w-0 flex-1 truncate font-normal tabular-nums text-foreground", children: n }),
89
+ t && /* @__PURE__ */ r("span", { className: "shrink-0", children: t })
90
+ ] }),
91
+ e && /* @__PURE__ */ r("span", { className: "mt-0.5 flex items-center gap-1.5 text-xs text-secondary", children: e }),
92
+ a && /* @__PURE__ */ r("span", { className: "mt-1.5 block text-xs text-secondary", children: a })
93
+ ] }),
94
+ /* @__PURE__ */ r(
95
+ p,
96
+ {
97
+ "aria-hidden": !0,
98
+ className: "mt-2 size-4 shrink-0 text-tertiary"
99
+ }
100
+ )
101
+ ]
102
+ }
103
+ )
104
+ );
105
+ y.displayName = "AnswerSourceItem";
106
+ export {
107
+ b as AnswerSourceChip,
108
+ D as AnswerSourceInspector,
109
+ y as AnswerSourceItem,
110
+ w as AnswerSources
111
+ };