@actioneer/ads 0.5.7 → 0.5.9

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 (147) 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 +133 -120
  5. package/components/ai-elements/chain-of-thought.d.ts +1 -1
  6. package/components/ai-elements/chain-of-thought.js +108 -108
  7. package/components/ai-elements/chart.js +16 -14
  8. package/components/ai-elements/inline-citation.js +41 -41
  9. package/components/ai-elements/message.js +4 -4
  10. package/components/ai-elements/queue.js +7 -7
  11. package/components/ai-elements/research-activity.js +114 -114
  12. package/components/ai-elements/shimmer.d.ts +2 -2
  13. package/components/ai-elements/speech-input.js +28 -28
  14. package/components/ai-elements/task-progress.js +26 -16
  15. package/components/ai-elements/task.js +17 -17
  16. package/components/ai-elements/tool.js +6 -6
  17. package/components/ai-elements/transcript.js +6 -5
  18. package/components/ai-elements/voice.js +1 -1
  19. package/components/alert.js +10 -10
  20. package/components/answer-sources.js +1 -1
  21. package/components/answer.js +115 -114
  22. package/components/assistant-ui/action-bar.js +94 -48
  23. package/components/assistant-ui/attachment.js +103 -75
  24. package/components/assistant-ui/badge.d.ts +1 -1
  25. package/components/assistant-ui/badge.js +17 -17
  26. package/components/assistant-ui/chain-of-thought.d.ts +1 -1
  27. package/components/assistant-ui/composer-add-context.js +9 -9
  28. package/components/assistant-ui/composer-deep-research.js +5 -5
  29. package/components/assistant-ui/composer-harness.js +11 -9
  30. package/components/assistant-ui/composer-trigger-popover.js +45 -34
  31. package/components/assistant-ui/composer.js +59 -59
  32. package/components/assistant-ui/error.js +14 -14
  33. package/components/assistant-ui/file.d.ts +1 -1
  34. package/components/assistant-ui/image.d.ts +1 -1
  35. package/components/assistant-ui/image.js +113 -103
  36. package/components/assistant-ui/markdown-text.js +18 -18
  37. package/components/assistant-ui/message.js +46 -45
  38. package/components/assistant-ui/quote.js +1 -1
  39. package/components/assistant-ui/reasoning.d.ts +1 -1
  40. package/components/assistant-ui/reasoning.js +66 -77
  41. package/components/assistant-ui/suggestions.js +4 -4
  42. package/components/assistant-ui/thread.js +22 -22
  43. package/components/assistant-ui/tool-fallback.js +60 -63
  44. package/components/assistant-ui/tool-group.d.ts +1 -1
  45. package/components/assistant-ui/tool-group.js +36 -42
  46. package/components/audio-waveform.js +25 -24
  47. package/components/autocomplete.d.ts +1 -0
  48. package/components/autocomplete.js +45 -43
  49. package/components/avatar.d.ts +1 -0
  50. package/components/avatar.js +27 -26
  51. package/components/badge.d.ts +1 -1
  52. package/components/breadcrumbs.d.ts +2 -0
  53. package/components/breadcrumbs.js +52 -50
  54. package/components/button.d.ts +2 -2
  55. package/components/button.js +22 -20
  56. package/components/card.js +8 -8
  57. package/components/carousel.js +105 -104
  58. package/components/chart.d.ts +6 -0
  59. package/components/chart.js +743 -672
  60. package/components/checkbox.js +74 -38
  61. package/components/chip.d.ts +1 -1
  62. package/components/code-block.js +3 -3
  63. package/components/collapsible.js +67 -23
  64. package/components/connector-card.js +6 -6
  65. package/components/drawer.d.ts +18 -11
  66. package/components/drawer.js +81 -78
  67. package/components/dropdown.d.ts +2 -0
  68. package/components/dropdown.js +88 -79
  69. package/components/empty-state.d.ts +1 -1
  70. package/components/empty-state.js +7 -7
  71. package/components/field.d.ts +4 -0
  72. package/components/field.js +45 -34
  73. package/components/file-dropzone.js +12 -12
  74. package/components/index.d.ts +3 -0
  75. package/components/index.js +584 -558
  76. package/components/input-field.js +51 -46
  77. package/components/input.js +20 -20
  78. package/components/link.js +9 -9
  79. package/components/modal.d.ts +5 -1
  80. package/components/modal.js +121 -76
  81. package/components/navbar.d.ts +1 -1
  82. package/components/navbar.js +1 -1
  83. package/components/number-field.js +38 -29
  84. package/components/page-header.js +12 -12
  85. package/components/pagination.js +19 -19
  86. package/components/panel.js +2 -2
  87. package/components/pixel-blast-svg.js +3 -3
  88. package/components/pixel-icon.d.ts +4 -0
  89. package/components/pixel-icon.js +210 -164
  90. package/components/popover.d.ts +1 -1
  91. package/components/popover.js +66 -64
  92. package/components/progress-circle.js +36 -32
  93. package/components/progress.js +28 -24
  94. package/components/radio.js +59 -49
  95. package/components/resizable-panel.js +1 -1
  96. package/components/reveal.d.ts +2 -2
  97. package/components/ripple.d.ts +3 -3
  98. package/components/scroll-area.js +17 -16
  99. package/components/segmented.d.ts +1 -0
  100. package/components/segmented.js +39 -36
  101. package/components/select.d.ts +7 -0
  102. package/components/select.js +186 -137
  103. package/components/setting-row.js +45 -42
  104. package/components/sidebar.js +131 -127
  105. package/components/skeleton.js +5 -5
  106. package/components/spinner.d.ts +13 -4
  107. package/components/spinner.js +42 -42
  108. package/components/stepper.js +21 -21
  109. package/components/switch.js +41 -39
  110. package/components/table.d.ts +16 -0
  111. package/components/table.js +393 -260
  112. package/components/tabs.js +149 -137
  113. package/components/toast.js +66 -66
  114. package/components/tooltip.js +2 -2
  115. package/components/tree.js +62 -51
  116. package/components/typography.d.ts +2 -1
  117. package/components/typography.js +33 -32
  118. package/components/ui/button.d.ts +2 -2
  119. package/components/ui/button.js +19 -19
  120. package/components/ui/collapsible.d.ts +1 -5
  121. package/components/ui/dialog.d.ts +3 -3
  122. package/components/ui/dialog.js +95 -58
  123. package/components/ui/tooltip.d.ts +2 -2
  124. package/components/ui/tooltip.js +67 -33
  125. package/components/viz-charts.js +95 -95
  126. package/demo/components/add-to-artifact.js +363 -0
  127. package/demo/lib/artifact-library.js +142 -0
  128. package/demo/lib/artifact-pin-guard.js +12 -0
  129. package/fonts/aribau-grotesk-medium.woff2 +0 -0
  130. package/fonts/aribau-grotesk-regular.woff2 +0 -0
  131. package/fonts.css +11 -11
  132. package/hooks/agents-ui/use-agent-audio-visualizer-aura.js +17 -16
  133. package/hooks/agents-ui/use-agent-audio-visualizer-wave.js +21 -20
  134. package/lib/icons.d.ts +24 -0
  135. package/lib/icons.js +114 -108
  136. package/lib/motion.d.ts +42 -39
  137. package/lib/motion.js +112 -52
  138. package/lib/spinner-mark.d.ts +9 -0
  139. package/lib/spinner-mark.js +98 -0
  140. package/llms.txt +53 -19
  141. package/manifest.json +258 -36
  142. package/package.json +1 -1
  143. package/styles.css +143 -124
  144. package/theme.css +90 -93
  145. package/components/ui/collapsible.js +0 -35
  146. package/fonts/aribau-grotesk-500.otf +0 -0
  147. package/fonts/aribau-grotesk-600.woff2 +0 -0
@@ -1,15 +1,15 @@
1
1
  "use client";
2
- import { jsxs as r, jsx as e, Fragment as I } from "react/jsx-runtime";
3
- import * as n from "react";
4
- import { MotionConfig as ee, AnimatePresence as te, motion as D } from "motion/react";
2
+ import { jsxs as r, jsx as e, Fragment as q } from "react/jsx-runtime";
3
+ import * as s from "react";
4
+ import { MotionConfig as ee, AnimatePresence as te, motion as T } from "motion/react";
5
5
  import { cva as re } from "class-variance-authority";
6
- import { Collapsible as ae, CollapsibleTrigger as U, CollapsibleContent as ie } from "../collapsible.js";
7
- import { ChevronDown as V } from "../../lib/icons.js";
8
- import { EASE_OUT as _, EASE_DISCLOSURE as ne } from "../../lib/motion.js";
9
- import { cn as l } from "../../lib/cn.js";
10
- import { Shimmer as B } from "./shimmer.js";
11
- import { TraceStateIcon as C } from "./chain-of-thought-icon.js";
12
- const se = re(
6
+ import { Collapsible as ae, CollapsibleTrigger as V, CollapsibleContent as ie } from "../collapsible.js";
7
+ import { ChevronDown as B } from "../../lib/icons.js";
8
+ import { springEffect as F, springDisclosure as se } from "../../lib/motion.js";
9
+ import { cn as o } from "../../lib/cn.js";
10
+ import { Shimmer as K } from "./shimmer.js";
11
+ import { TraceStateIcon as P } from "./chain-of-thought-icon.js";
12
+ const ne = re(
13
13
  // Contained card: a hairline border (no fill) so the whole trace reads as one
14
14
  // distinct, trackable block within the chat without tinting the ground.
15
15
  "w-full rounded-lg border border-border px-3 py-2",
@@ -21,7 +21,7 @@ const se = re(
21
21
  }
22
22
  }
23
23
  }
24
- ), oe = {
24
+ ), le = {
25
25
  initial: {
26
26
  opacity: 0,
27
27
  transform: "translate3d(0, 7px, 0)",
@@ -31,224 +31,224 @@ const se = re(
31
31
  opacity: 1,
32
32
  transform: "translate3d(0, 0, 0)",
33
33
  filter: "blur(0px)",
34
- transition: { duration: 0.18, ease: _ }
34
+ transition: F
35
35
  },
36
36
  exit: {
37
37
  opacity: 0,
38
38
  transform: "translate3d(0, -7px, 0)",
39
39
  filter: "blur(2px)",
40
- transition: { duration: 0.12, ease: _ }
40
+ transition: F
41
41
  }
42
42
  };
43
- function F({
43
+ function $({
44
44
  elapsed: t,
45
- firstInsight: s,
46
- sourceCount: f
45
+ firstInsight: n,
46
+ sourceCount: m
47
47
  }) {
48
48
  return /* @__PURE__ */ r("span", { className: "flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1", children: [
49
49
  /* @__PURE__ */ r("span", { children: [
50
50
  "Researched ",
51
- f,
51
+ m,
52
52
  " ",
53
- f === 1 ? "source" : "sources"
53
+ m === 1 ? "source" : "sources"
54
54
  ] }),
55
55
  /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "text-tertiary", children: "·" }),
56
56
  /* @__PURE__ */ e("span", { className: "text-xs text-tertiary tabular-nums", children: t }),
57
- s != null && /* @__PURE__ */ r(I, { children: [
57
+ n != null && /* @__PURE__ */ r(q, { children: [
58
58
  /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "text-tertiary", children: "·" }),
59
59
  /* @__PURE__ */ r("span", { className: "text-xs text-tertiary", children: [
60
60
  "first insight",
61
61
  " ",
62
- /* @__PURE__ */ e("span", { className: "tabular-nums", children: s })
62
+ /* @__PURE__ */ e("span", { className: "tabular-nums", children: n })
63
63
  ] })
64
64
  ] })
65
65
  ] });
66
66
  }
67
- const le = n.forwardRef(
67
+ const oe = s.forwardRef(
68
68
  ({
69
69
  status: t,
70
- elapsed: s,
71
- sourceCount: f,
72
- firstInsight: E,
70
+ elapsed: n,
71
+ sourceCount: m,
72
+ firstInsight: k,
73
73
  sticky: h = !1,
74
74
  collapsible: x = !0,
75
- activityPlacement: K = "top",
75
+ activityPlacement: C = "top",
76
76
  activity: c,
77
- activityKey: P,
78
- stepIndex: S,
79
- stepCount: k,
77
+ activityKey: G,
78
+ stepIndex: E,
79
+ stepCount: S,
80
80
  icon: v,
81
81
  summary: y,
82
- open: A,
83
- defaultOpen: $ = !1,
82
+ open: z,
83
+ defaultOpen: H = !1,
84
84
  onOpenChange: a,
85
- children: q,
86
- className: G,
87
- role: H,
88
- "aria-label": J,
89
- "aria-busy": Q,
90
- ...W
91
- }, X) => {
92
- const d = A !== void 0, i = c != null, [Y, b] = n.useState(
93
- !i && t === "active" || $
94
- ), z = n.useRef(t), N = n.useRef(!1), j = n.useRef(null), g = n.useRef(null), R = d ? A : Y, u = !i && t === "active" || R, p = K === "bottom" && u;
95
- n.useLayoutEffect(() => {
96
- var M, T;
97
- const m = z.current;
98
- if (z.current = t, t === "active") {
99
- m !== "active" && (N.current = !1), m !== "active" && !i && !d && b(!0);
85
+ children: I,
86
+ className: J,
87
+ role: Q,
88
+ "aria-label": U,
89
+ "aria-busy": W,
90
+ ...X
91
+ }, Y) => {
92
+ const d = z !== void 0, i = c != null, [Z, b] = s.useState(
93
+ !i && t === "active" || H
94
+ ), A = s.useRef(t), g = s.useRef(!1), j = s.useRef(null), N = s.useRef(null), w = d ? z : Z, p = !i && t === "active" || w, f = C === "bottom" && p;
95
+ s.useLayoutEffect(() => {
96
+ var M, D;
97
+ const u = A.current;
98
+ if (A.current = t, t === "active") {
99
+ u !== "active" && (g.current = !1), u !== "active" && !i && !d && b(!0);
100
100
  return;
101
101
  }
102
- if (m !== "active" || N.current && i) return;
102
+ if (u !== "active" || g.current && i) return;
103
103
  const L = document.activeElement;
104
- L && ((M = j.current) != null && M.contains(L)) && ((T = g.current) == null || T.focus()), d || b(!1), a == null || a(!1);
104
+ L && ((M = j.current) != null && M.contains(L)) && ((D = N.current) == null || D.focus()), d || b(!1), a == null || a(!1);
105
105
  }, [i, d, a, t]);
106
- const Z = n.useCallback(
107
- (m) => {
108
- !i && t !== "complete" || (N.current = !0, d || b(m), a == null || a(m));
106
+ const _ = s.useCallback(
107
+ (u) => {
108
+ !i && t !== "complete" || (g.current = !0, d || b(u), a == null || a(u));
109
109
  },
110
110
  [i, d, a, t]
111
- ), o = t === "active", w = o ? /* @__PURE__ */ e(C, { stage: "thinking", status: "active" }) : /* @__PURE__ */ e(C, { outcome: "completed" }), O = o ? `activity-${P ?? (typeof c == "string" ? c : "current")}` : "summary";
111
+ ), l = t === "active", R = l ? /* @__PURE__ */ e(P, { stage: "thinking", status: "active" }) : /* @__PURE__ */ e(P, { outcome: "completed" }), O = l ? `activity-${G ?? (typeof c == "string" ? c : "current")}` : "summary";
112
112
  return /* @__PURE__ */ r(
113
113
  ae,
114
114
  {
115
- ref: X,
116
- open: u,
117
- onOpenChange: Z,
118
- role: H ?? "region",
119
- "aria-label": J ?? "Research activity",
120
- "aria-busy": Q ?? (o || void 0),
121
- ...W,
115
+ ref: Y,
116
+ open: p,
117
+ onOpenChange: _,
118
+ role: Q ?? "group",
119
+ "aria-label": U ?? "Research activity",
120
+ "aria-busy": W ?? (l || void 0),
121
+ ...X,
122
122
  "data-slot": "research-activity",
123
123
  "data-status": t,
124
- className: l(
125
- se({ status: t }),
126
- p && "flex flex-col",
127
- G
124
+ className: o(
125
+ ne({ status: t }),
126
+ f && "flex flex-col",
127
+ J
128
128
  ),
129
129
  children: [
130
- /* @__PURE__ */ e("span", { className: "sr-only", "aria-live": "polite", "aria-atomic": "true", children: o ? "Research in progress" : "Research complete" }),
131
- i ? /* @__PURE__ */ e(U, { asChild: !0, children: /* @__PURE__ */ r(
130
+ /* @__PURE__ */ e("span", { className: "sr-only", "aria-live": "polite", "aria-atomic": "true", children: l ? "Research in progress" : "Research complete" }),
131
+ i ? /* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ r(
132
132
  "button",
133
133
  {
134
- ref: g,
134
+ ref: N,
135
135
  type: "button",
136
136
  "data-slot": "research-activity-trigger",
137
- className: l(
137
+ className: o(
138
138
  "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",
139
- "transition-colors duration-(--duration-fast) ease-out hover:text-primary",
139
+ "transition-colors duration-150 ease-out hover:text-primary",
140
140
  "focus-visible:ring-3 focus-visible:ring-ring motion-reduce:transition-none",
141
141
  h && "sticky z-10 bg-background",
142
- h && (p ? "bottom-0" : "top-0"),
143
- p && "order-last mt-3"
142
+ h && (f ? "bottom-0" : "top-0"),
143
+ f && "order-last mt-3"
144
144
  ),
145
145
  children: [
146
146
  /* @__PURE__ */ r("span", { className: "sr-only", children: [
147
- u ? "Collapse" : "Expand",
147
+ p ? "Collapse" : "Expand",
148
148
  " research activity:",
149
149
  " "
150
150
  ] }),
151
- /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "flex size-4 shrink-0 items-center justify-center", children: v ?? w }),
151
+ /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "flex size-4 shrink-0 items-center justify-center", children: v ?? R }),
152
152
  /* @__PURE__ */ e(ee, { reducedMotion: "user", children: /* @__PURE__ */ e("span", { className: "relative h-5 min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ e(te, { initial: !1, children: /* @__PURE__ */ e(
153
- D.span,
153
+ T.span,
154
154
  {
155
- variants: oe,
155
+ variants: le,
156
156
  initial: "initial",
157
157
  animate: "animate",
158
158
  exit: "exit",
159
159
  className: "absolute inset-0 flex items-center truncate whitespace-nowrap",
160
- children: o ? typeof c == "string" ? /* @__PURE__ */ e(B, { as: "span", className: "truncate text-base", children: c }) : c : y !== void 0 ? y : /* @__PURE__ */ e(
161
- F,
160
+ children: l ? typeof c == "string" ? /* @__PURE__ */ e(K, { as: "span", className: "truncate text-base", children: c }) : c : y !== void 0 ? y : /* @__PURE__ */ e(
161
+ $,
162
162
  {
163
- elapsed: s,
164
- firstInsight: E,
165
- sourceCount: f
163
+ elapsed: n,
164
+ firstInsight: k,
165
+ sourceCount: m
166
166
  }
167
167
  )
168
168
  },
169
169
  O
170
170
  ) }) }) }),
171
- o && /* @__PURE__ */ r("span", { className: l(
171
+ l && /* @__PURE__ */ r("span", { className: o(
172
172
  "shrink-0 text-xs text-tertiary tabular-nums",
173
173
  // Reserve the caret slot (size-4 + gap-2) so trailing metadata
174
174
  // keeps the same right edge as sibling rows that show a caret.
175
175
  !x && "pe-6"
176
176
  ), children: [
177
- S != null && k != null && /* @__PURE__ */ r(I, { children: [
177
+ E != null && S != null && /* @__PURE__ */ r(q, { children: [
178
178
  /* @__PURE__ */ e("span", { className: "sr-only", children: "Step " }),
179
- S,
179
+ E,
180
180
  " of ",
181
- k,
181
+ S,
182
182
  /* @__PURE__ */ e("span", { "aria-hidden": !0, children: " · " })
183
183
  ] }),
184
184
  /* @__PURE__ */ e("span", { className: "sr-only", children: "Elapsed " }),
185
- s
185
+ n
186
186
  ] }),
187
187
  x && /* @__PURE__ */ e(
188
- V,
188
+ B,
189
189
  {
190
190
  "aria-hidden": !0,
191
- className: l(
192
- "size-4 shrink-0 text-tertiary transition-transform duration-(--duration-normal) ease-out motion-reduce:transition-none",
193
- u && "rotate-180"
191
+ className: o(
192
+ "size-4 shrink-0 text-tertiary transition-transform duration-200 ease-out motion-reduce:transition-none",
193
+ p && "rotate-180"
194
194
  )
195
195
  }
196
196
  )
197
197
  ]
198
198
  }
199
- ) }) : o ? /* @__PURE__ */ r(
199
+ ) }) : l ? /* @__PURE__ */ r(
200
200
  "div",
201
201
  {
202
202
  "data-slot": "research-activity-header",
203
203
  className: "flex min-h-9 w-full items-center gap-2.5 py-1 text-left",
204
204
  children: [
205
- /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "flex size-4 shrink-0 items-center justify-center", children: v ?? w }),
206
- /* @__PURE__ */ e(B, { as: "span", className: "text-base", children: "Researching…" }),
207
- /* @__PURE__ */ r("span", { className: l(
205
+ /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "flex size-4 shrink-0 items-center justify-center", children: v ?? R }),
206
+ /* @__PURE__ */ e(K, { as: "span", className: "text-base", children: "Researching…" }),
207
+ /* @__PURE__ */ r("span", { className: o(
208
208
  "ml-auto shrink-0 text-xs text-tertiary tabular-nums",
209
209
  !x && "pe-6"
210
210
  ), children: [
211
211
  /* @__PURE__ */ e("span", { className: "sr-only", children: "Elapsed " }),
212
- s
212
+ n
213
213
  ] })
214
214
  ]
215
215
  }
216
- ) : /* @__PURE__ */ e(U, { asChild: !0, children: /* @__PURE__ */ r(
216
+ ) : /* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ r(
217
217
  "button",
218
218
  {
219
- ref: g,
219
+ ref: N,
220
220
  type: "button",
221
221
  "data-slot": "research-activity-trigger",
222
- className: l(
222
+ className: o(
223
223
  "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",
224
- "transition-colors duration-(--duration-fast) ease-out hover:text-primary",
224
+ "transition-colors duration-150 ease-out hover:text-primary",
225
225
  "focus-visible:ring-3 focus-visible:ring-ring motion-reduce:transition-none",
226
226
  h && "sticky z-10 bg-background",
227
- h && (p ? "bottom-0" : "top-0"),
228
- p && "order-last mt-3"
227
+ h && (f ? "bottom-0" : "top-0"),
228
+ f && "order-last mt-3"
229
229
  ),
230
230
  children: [
231
231
  /* @__PURE__ */ r("span", { className: "sr-only", children: [
232
- R ? "Collapse" : "Expand",
232
+ w ? "Collapse" : "Expand",
233
233
  " research activity:",
234
234
  " "
235
235
  ] }),
236
- /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "flex size-4 shrink-0 items-center justify-center", children: v ?? w }),
236
+ /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "flex size-4 shrink-0 items-center justify-center", children: v ?? R }),
237
237
  /* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children: y !== void 0 ? y : /* @__PURE__ */ e(
238
- F,
238
+ $,
239
239
  {
240
- elapsed: s,
241
- firstInsight: E,
242
- sourceCount: f
240
+ elapsed: n,
241
+ firstInsight: k,
242
+ sourceCount: m
243
243
  }
244
244
  ) }),
245
245
  x && /* @__PURE__ */ e(
246
- V,
246
+ B,
247
247
  {
248
248
  "aria-hidden": !0,
249
- className: l(
250
- "size-4 shrink-0 text-tertiary transition-transform duration-(--duration-normal) ease-out motion-reduce:transition-none",
251
- R && "rotate-180"
249
+ className: o(
250
+ "size-4 shrink-0 text-tertiary transition-transform duration-200 ease-out motion-reduce:transition-none",
251
+ w && "rotate-180"
252
252
  )
253
253
  }
254
254
  )
@@ -256,18 +256,18 @@ const le = n.forwardRef(
256
256
  }
257
257
  ) }),
258
258
  /* @__PURE__ */ e(ie, { forceMount: !0, asChild: !0, "data-slot": "research-activity-content", children: /* @__PURE__ */ e(
259
- D.div,
259
+ T.div,
260
260
  {
261
261
  ref: j,
262
262
  initial: !1,
263
- animate: u ? "open" : "closed",
263
+ animate: p ? "open" : "closed",
264
264
  variants: {
265
265
  open: { height: "auto", opacity: 1 },
266
266
  closed: { height: 0, opacity: 0 }
267
267
  },
268
- transition: { duration: u ? 0.28 : 0.2, ease: ne },
268
+ transition: se,
269
269
  className: "overflow-hidden text-secondary outline-none data-[state=closed]:pointer-events-none",
270
- children: /* @__PURE__ */ e("div", { className: "ml-2 pt-3 [--tree-rail-lead:20px]", children: q })
270
+ children: /* @__PURE__ */ e("div", { className: "ml-2 pt-3 [--tree-rail-lead:20px]", children: I })
271
271
  }
272
272
  ) })
273
273
  ]
@@ -275,7 +275,7 @@ const le = n.forwardRef(
275
275
  );
276
276
  }
277
277
  );
278
- le.displayName = "ResearchActivity";
278
+ oe.displayName = "ResearchActivity";
279
279
  export {
280
- le as ResearchActivity
280
+ oe as ResearchActivity
281
281
  };
@@ -11,8 +11,8 @@ import { ElementType, JSX } from 'react';
11
11
  * (compiled away, not emitted at runtime) — so this port reads the raw `:root`
12
12
  * tokens instead.
13
13
  *
14
- * It is a continuous ambient loop (like `Spinner` / `--duration-pulse`), so the
15
- * `linear` timing is intentional and exempt from the <300ms UI-motion rule.
14
+ * It is a continuous ambient loop (like `Spinner`), so its local `linear`
15
+ * timing is intentional.
16
16
  * Reduced-motion viewers get the static muted text with no sweep.
17
17
  */
18
18
  export type TextShimmerProps = {
@@ -14,8 +14,8 @@ const Z = () => window.SpeechRecognition ?? window.webkitSpeechRecognition, $ =
14
14
  disabled: F,
15
15
  ...O
16
16
  }) => {
17
- const [s, d] = b(!1), [L, z] = b(!1), [o] = b($), [T, N] = b(!1), p = l(null), g = l(null), m = l(null), y = l([]), u = l(M), h = l(R), n = l(x);
18
- u.current = M, h.current = R, n.current = x, Y(() => {
17
+ const [s, d] = b(!1), [L, z] = b(!1), [o] = b($), [T, N] = b(!1), p = l(null), m = l(null), g = l(null), y = l([]), u = l(M), h = l(R), r = l(x);
18
+ u.current = M, h.current = R, r.current = x, Y(() => {
19
19
  if (o !== "speech-recognition")
20
20
  return;
21
21
  const t = Z();
@@ -23,18 +23,18 @@ const Z = () => window.SpeechRecognition ?? window.webkitSpeechRecognition, $ =
23
23
  return;
24
24
  const e = new t();
25
25
  e.continuous = !0, e.interimResults = !0, e.lang = D;
26
- const c = () => d(!0), v = () => d(!1), w = (r) => {
26
+ const c = () => d(!0), v = () => d(!1), w = (n) => {
27
27
  var A, G;
28
- const i = r;
28
+ const i = n;
29
29
  let a = "";
30
30
  for (let k = i.resultIndex; k < i.results.length; k += 1) {
31
31
  const P = i.results[k];
32
32
  P.isFinal && (a += ((A = P[0]) == null ? void 0 : A.transcript) ?? "");
33
33
  }
34
34
  a && ((G = u.current) == null || G.call(u, a));
35
- }, S = (r) => {
35
+ }, S = (n) => {
36
36
  var i;
37
- d(!1), (i = n.current) == null || i.call(n, r.error);
37
+ d(!1), (i = r.current) == null || i.call(r, n.error);
38
38
  };
39
39
  return e.addEventListener("start", c), e.addEventListener("end", v), e.addEventListener("result", w), e.addEventListener("error", S), p.current = e, N(!0), () => {
40
40
  e.removeEventListener("start", c), e.removeEventListener("end", v), e.removeEventListener("result", w), e.removeEventListener("error", S), e.stop(), p.current = null, N(!1);
@@ -42,8 +42,8 @@ const Z = () => window.SpeechRecognition ?? window.webkitSpeechRecognition, $ =
42
42
  }, [o, D]), Y(
43
43
  () => () => {
44
44
  var t;
45
- if (((t = g.current) == null ? void 0 : t.state) === "recording" && g.current.stop(), m.current)
46
- for (const e of m.current.getTracks())
45
+ if (((t = m.current) == null ? void 0 : t.state) === "recording" && m.current.stop(), g.current)
46
+ for (const e of g.current.getTracks())
47
47
  e.stop();
48
48
  },
49
49
  []
@@ -53,23 +53,23 @@ const Z = () => window.SpeechRecognition ?? window.webkitSpeechRecognition, $ =
53
53
  if (h.current)
54
54
  try {
55
55
  const e = await navigator.mediaDevices.getUserMedia({ audio: !0 });
56
- m.current = e;
56
+ g.current = e;
57
57
  const c = new MediaRecorder(e);
58
58
  y.current = [];
59
- const v = (r) => {
60
- r.data.size > 0 && y.current.push(r.data);
59
+ const v = (n) => {
60
+ n.data.size > 0 && y.current.push(n.data);
61
61
  }, w = async () => {
62
62
  var i;
63
63
  for (const a of e.getTracks())
64
64
  a.stop();
65
- m.current = null;
66
- const r = new Blob(y.current, {
65
+ g.current = null;
66
+ const n = new Blob(y.current, {
67
67
  type: "audio/webm"
68
68
  });
69
- if (r.size > 0 && h.current) {
69
+ if (n.size > 0 && h.current) {
70
70
  z(!0);
71
71
  try {
72
- const a = await h.current(r);
72
+ const a = await h.current(n);
73
73
  a && ((i = u.current) == null || i.call(u, a));
74
74
  } catch {
75
75
  } finally {
@@ -78,20 +78,20 @@ const Z = () => window.SpeechRecognition ?? window.webkitSpeechRecognition, $ =
78
78
  }
79
79
  }, S = () => {
80
80
  d(!1);
81
- for (const r of e.getTracks())
82
- r.stop();
83
- m.current = null;
81
+ for (const n of e.getTracks())
82
+ n.stop();
83
+ g.current = null;
84
84
  };
85
- c.addEventListener("dataavailable", v), c.addEventListener("stop", w), c.addEventListener("error", S), g.current = c, c.start(), d(!0);
85
+ c.addEventListener("dataavailable", v), c.addEventListener("stop", w), c.addEventListener("error", S), m.current = c, c.start(), d(!0);
86
86
  } catch (e) {
87
- d(!1), (t = n.current) == null || t.call(
88
- n,
87
+ d(!1), (t = r.current) == null || t.call(
88
+ r,
89
89
  e instanceof Error ? e.name : "not-allowed"
90
90
  );
91
91
  }
92
92
  }, []), B = I(() => {
93
93
  var t;
94
- ((t = g.current) == null ? void 0 : t.state) === "recording" && g.current.stop(), d(!1);
94
+ ((t = m.current) == null ? void 0 : t.state) === "recording" && m.current.stop(), d(!1);
95
95
  }, []), q = I(() => {
96
96
  var t;
97
97
  if (o === "speech-recognition" && p.current)
@@ -101,8 +101,8 @@ const Z = () => window.SpeechRecognition ?? window.webkitSpeechRecognition, $ =
101
101
  try {
102
102
  p.current.start();
103
103
  } catch (e) {
104
- (t = n.current) == null || t.call(
105
- n,
104
+ (t = r.current) == null || t.call(
105
+ r,
106
106
  e instanceof Error ? e.name : "not-allowed"
107
107
  );
108
108
  }
@@ -111,15 +111,15 @@ const Z = () => window.SpeechRecognition ?? window.webkitSpeechRecognition, $ =
111
111
  return /* @__PURE__ */ J("div", { className: "relative inline-flex items-center justify-center", children: [
112
112
  s && [
113
113
  "",
114
- "[animation-delay:var(--stagger-1)]",
115
- "[animation-delay:var(--stagger-2)]"
114
+ "[animation-delay:200ms]",
115
+ "[animation-delay:300ms]"
116
116
  ].map((t, e) => /* @__PURE__ */ f(
117
117
  "span",
118
118
  {
119
119
  "aria-hidden": !0,
120
120
  className: _(
121
121
  "absolute inset-0 animate-ping rounded-full bg-danger/20",
122
- "[animation-duration:var(--duration-pulse)] motion-reduce:hidden",
122
+ "[animation-duration:1.5s] motion-reduce:hidden",
123
123
  t
124
124
  )
125
125
  },
@@ -141,7 +141,7 @@ const Z = () => window.SpeechRecognition ?? window.webkitSpeechRecognition, $ =
141
141
  variant: "secondary",
142
142
  ...O,
143
143
  onClick: q,
144
- children: L ? /* @__PURE__ */ f(Q, { size: "sm" }) : s ? /* @__PURE__ */ f(V, {}) : E ? /* @__PURE__ */ f(W, {}) : /* @__PURE__ */ f(X, {})
144
+ children: L ? /* @__PURE__ */ f(Q, { variant: "action", size: "sm", "aria-hidden": !0 }) : s ? /* @__PURE__ */ f(V, {}) : E ? /* @__PURE__ */ f(W, {}) : /* @__PURE__ */ f(X, {})
145
145
  }
146
146
  )
147
147
  ] });