@actioneer/ads 0.3.0 → 0.4.0

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 (35) hide show
  1. package/components/ai-elements/agent-trace.d.ts +87 -0
  2. package/components/ai-elements/agent-trace.js +180 -0
  3. package/components/ai-elements/chain-of-thought.d.ts +25 -5
  4. package/components/ai-elements/chain-of-thought.js +227 -183
  5. package/components/ai-elements/index.d.ts +1 -0
  6. package/components/ai-elements/research-activity.d.ts +17 -0
  7. package/components/ai-elements/research-activity.js +125 -107
  8. package/components/ai-elements/task.d.ts +7 -3
  9. package/components/ai-elements/task.js +84 -52
  10. package/components/ai-elements/tool.js +19 -19
  11. package/components/ai-elements/voice.d.ts +28 -12
  12. package/components/ai-elements/voice.js +270 -649
  13. package/components/alert.js +28 -16
  14. package/components/assistant-ui/composer-harness.js +5 -4
  15. package/components/code-block.d.ts +11 -5
  16. package/components/code-block.js +161 -62
  17. package/components/index.js +259 -257
  18. package/components/scroll-area.js +10 -10
  19. package/components/sidebar.js +1 -1
  20. package/components/stepper.d.ts +17 -9
  21. package/components/stepper.js +85 -96
  22. package/lib/icons.js +2 -2
  23. package/lib/motion.d.ts +2 -0
  24. package/lib/motion.js +21 -20
  25. package/llms.txt +7 -1
  26. package/manifest.json +69 -6
  27. package/package.json +1 -1
  28. package/styles.css +110 -4
  29. package/theme.css +12 -4
  30. package/components/agents-ui/agent-audio-visualizer-aura.d.ts +0 -11
  31. package/components/agents-ui/agent-audio-visualizer-aura.js +0 -277
  32. package/components/agents-ui/agent-audio-visualizer-wave.d.ts +0 -12
  33. package/components/agents-ui/agent-audio-visualizer-wave.js +0 -203
  34. package/components/agents-ui/react-shader-toy.d.ts +0 -87
  35. package/components/agents-ui/react-shader-toy.js +0 -531
@@ -1,21 +1,19 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as c, Fragment as y } from "react/jsx-runtime";
3
- import * as s from "react";
4
- import { MotionConfig as Z, motion as B, useReducedMotion as K } from "motion/react";
5
- import { cn as T } from "../../lib/cn.js";
6
- import { EASE_OUT as F, EASE_IN_OUT as X } from "../../lib/motion.js";
7
- import { Button as G } from "../button.js";
8
- import { Tooltip as j } from "../tooltip.js";
9
- import { AgentAudioVisualizerAura as J } from "../agents-ui/agent-audio-visualizer-aura.js";
10
- import { AgentAudioVisualizerWave as Q } from "../agents-ui/agent-audio-visualizer-wave.js";
11
- import { Call as ee, PhoneOff as oe, MicOff as te, Mic as ie } from "../../lib/icons.js";
12
- const Te = [
2
+ import { jsx as a, jsxs as G, Fragment as X } from "react/jsx-runtime";
3
+ import * as i from "react";
4
+ import { useReducedMotion as $ } from "motion/react";
5
+ import { cn as R } from "../../lib/cn.js";
6
+ import { Button as U } from "../button.js";
7
+ import { Tooltip as H } from "../tooltip.js";
8
+ import { Call as J, PhoneOff as Q, MicOff as Z, Mic as ee } from "../../lib/icons.js";
9
+ const be = [
13
10
  "default",
11
+ "identity",
14
12
  "blue",
15
13
  "violet",
16
14
  "emerald",
17
15
  "sunset"
18
- ], re = ["orb", "aura", "wave"], $e = [
16
+ ], Re = ["orb"], we = [
19
17
  "idle",
20
18
  "connecting",
21
19
  "listening",
@@ -23,407 +21,16 @@ const Te = [
23
21
  "speaking",
24
22
  "muted",
25
23
  "asleep"
26
- ], C = {
27
- // Near-white slash with a silver sheen; quiet, silver-on-light.
28
- command: {
29
- sheen: "#ffffff",
30
- silver: "#c7ccd6",
31
- silverDeep: "#a6adbc",
32
- shadow: "rgba(58,64,82,0.22)",
33
- accent: "#c7ccd6"
34
- },
35
- // Two flat electric-violet 4-point sparkles.
36
- glint: {
37
- spark: "#8030e0",
38
- sparkLite: "#9a4cf0",
39
- accent: "#8030e0"
40
- },
41
- // Thin silver-white ring with a soft warm-white glow.
42
- halo: {
43
- ring: "#cfd4de",
44
- ringLite: "#ffffff",
45
- glow: "#fff2dd",
46
- accent: "#e9d9b8"
47
- },
48
- // Glossy deep-blue sphere: navy shadow → cobalt body → ice-blue highlights.
49
- mana: {
50
- lit: "#5b7ce0",
51
- body: "#4060b0",
52
- mid: "#203060",
53
- shadow: "#001020",
54
- cloud: "#3a5aa8",
55
- cloudLite: "#6f8fe4",
56
- ice: "#90d0ff",
57
- spec: "#ffffff",
58
- accent: "#90d0ff"
59
- },
60
- // Polished chrome ball: silver body, gray crescent core, white gloss.
61
- obsidian: {
62
- hi: "#f6f6f8",
63
- body: "#d0d2d8",
64
- horizon: "#8a8a92",
65
- low: "#e4e5ea",
66
- coreLite: "#dcdde2",
67
- coreDark: "#6f6f76",
68
- rim: "#101010",
69
- gloss: "#ffffff",
70
- accent: "#c8ccd6"
71
- },
72
- // Iridescent orb: crimson top, magenta left, amber right, cyan bottom, melting.
73
- opal: {
74
- crimson: "#e03020",
75
- rust: "#802010",
76
- pink: "#f080d0",
77
- magenta: "#f080e0",
78
- amber: "#f0b024",
79
- yellow: "#ffd45a",
80
- cyan: "#30d0d0",
81
- sheen: "#ffffff",
82
- accent: "#f080d0"
83
- }
84
- }, ne = {
85
- idle: { scale: [1, 1.04, 1], opacity: 1, duration: 4 },
86
- connecting: { scale: [1, 1.06, 1], opacity: 1, duration: 1.3 },
87
- listening: { scale: [1, 1.09, 1], opacity: 1, duration: 1.7 },
88
- thinking: { scale: [1, 1.03, 1], opacity: 1, duration: 2.4 },
89
- speaking: { scale: [1, 1.12, 0.99, 1.07, 1], opacity: 1, duration: 0.95 },
90
- muted: { scale: [1, 1.02, 1], opacity: 0.7, duration: 5 },
91
- asleep: { scale: [1, 1.015, 1], opacity: 0.45, duration: 6 }
92
- }, ce = {
93
- command: { idle: 0, think: 42 },
94
- glint: { idle: 5, think: 65 },
95
- halo: { idle: 20, think: 80 },
96
- mana: { idle: 0, think: 28 },
97
- obsidian: { idle: 4, think: 48 },
98
- opal: { idle: 9, think: 40 }
99
- }, le = {
100
- idle: "idle",
101
- connecting: "think",
102
- listening: "idle",
103
- thinking: "think",
104
- speaking: "idle",
105
- muted: "slow",
106
- asleep: "stop"
107
- }, se = {
108
- listening: { count: 2, duration: 1.7, maxScale: 1.7, peak: 0.4 },
109
- connecting: { count: 1, duration: 1.9, maxScale: 1.55, peak: 0.32 }
110
- };
111
- function ae(r, o) {
112
- switch (r) {
113
- case "command": {
114
- const t = C.command, i = `${o}-cmd`;
115
- return {
116
- defs: /* @__PURE__ */ c(y, { children: [
117
- /* @__PURE__ */ c("linearGradient", { id: i, x1: "0", y1: "1", x2: "1", y2: "0", children: [
118
- /* @__PURE__ */ e("stop", { offset: "0%", stopColor: t.silverDeep }),
119
- /* @__PURE__ */ e("stop", { offset: "45%", stopColor: t.silver }),
120
- /* @__PURE__ */ e("stop", { offset: "70%", stopColor: t.sheen }),
121
- /* @__PURE__ */ e("stop", { offset: "100%", stopColor: t.silver })
122
- ] }),
123
- /* @__PURE__ */ e("filter", { id: `${i}-s`, x: "-40%", y: "-40%", width: "180%", height: "180%", children: /* @__PURE__ */ e("feDropShadow", { dx: "0", dy: "2.5", stdDeviation: "3", floodColor: t.shadow }) })
124
- ] }),
125
- body: /* @__PURE__ */ e("g", { filter: `url(#${i}-s)`, children: /* @__PURE__ */ e(
126
- "line",
127
- {
128
- x1: 37,
129
- y1: 72,
130
- x2: 63,
131
- y2: 28,
132
- stroke: `url(#${i})`,
133
- strokeWidth: 13,
134
- strokeLinecap: "round"
135
- }
136
- ) })
137
- };
138
- }
139
- case "glint": {
140
- const t = C.glint;
141
- return {
142
- defs: null,
143
- body: /* @__PURE__ */ c(y, { children: [
144
- /* @__PURE__ */ e(
145
- "path",
146
- {
147
- d: "M50 16 C53.5 43 56.5 46.5 84 50 C56.5 53.5 53.5 57 50 84 C46.5 57 43.5 53.5 16 50 C43.5 46.5 46.5 43 50 16 Z",
148
- fill: t.spark
149
- }
150
- ),
151
- /* @__PURE__ */ e(
152
- "path",
153
- {
154
- d: "M27 60 C28.6 68 29.4 68.8 37 70.5 C29.4 72.2 28.6 73 27 81 C25.4 73 24.6 72.2 17 70.5 C24.6 68.8 25.4 68 27 60 Z",
155
- fill: t.sparkLite
156
- }
157
- )
158
- ] })
159
- };
160
- }
161
- case "halo": {
162
- const t = C.halo, i = `${o}-halo`;
163
- return {
164
- defs: /* @__PURE__ */ c(y, { children: [
165
- /* @__PURE__ */ c("linearGradient", { id: i, x1: "0", y1: "0", x2: "1", y2: "1", children: [
166
- /* @__PURE__ */ e("stop", { offset: "0%", stopColor: t.ringLite }),
167
- /* @__PURE__ */ e("stop", { offset: "50%", stopColor: t.ring }),
168
- /* @__PURE__ */ e("stop", { offset: "100%", stopColor: t.ringLite })
169
- ] }),
170
- /* @__PURE__ */ e("filter", { id: `${i}-glow`, x: "-60%", y: "-60%", width: "220%", height: "220%", children: /* @__PURE__ */ e("feGaussianBlur", { stdDeviation: "4" }) })
171
- ] }),
172
- // Warm-white glow + the crisp silver ring stay fixed …
173
- under: /* @__PURE__ */ c(y, { children: [
174
- /* @__PURE__ */ e(
175
- "circle",
176
- {
177
- cx: 50,
178
- cy: 50,
179
- r: 30,
180
- fill: "none",
181
- stroke: t.glow,
182
- strokeWidth: 9,
183
- opacity: 0.55,
184
- filter: `url(#${i}-glow)`
185
- }
186
- ),
187
- /* @__PURE__ */ e("circle", { cx: 50, cy: 50, r: 30, fill: "none", stroke: `url(#${i})`, strokeWidth: 4 })
188
- ] }),
189
- // … while a bright sheen arc travels around it.
190
- body: /* @__PURE__ */ e(
191
- "path",
192
- {
193
- d: "M50 20 A30 30 0 0 1 78 44",
194
- fill: "none",
195
- stroke: t.ringLite,
196
- strokeWidth: 4.5,
197
- strokeLinecap: "round"
198
- }
199
- )
200
- };
201
- }
202
- case "mana": {
203
- const t = C.mana, i = `${o}-mana`;
204
- return {
205
- defs: /* @__PURE__ */ c(y, { children: [
206
- /* @__PURE__ */ c("radialGradient", { id: i, cx: "0.4", cy: "0.34", r: "0.75", children: [
207
- /* @__PURE__ */ e("stop", { offset: "0%", stopColor: t.lit }),
208
- /* @__PURE__ */ e("stop", { offset: "45%", stopColor: t.body }),
209
- /* @__PURE__ */ e("stop", { offset: "78%", stopColor: t.mid }),
210
- /* @__PURE__ */ e("stop", { offset: "100%", stopColor: t.shadow })
211
- ] }),
212
- /* @__PURE__ */ e("filter", { id: `${i}-b`, x: "-30%", y: "-30%", width: "160%", height: "160%", children: /* @__PURE__ */ e("feGaussianBlur", { stdDeviation: "2.4" }) }),
213
- /* @__PURE__ */ e("clipPath", { id: `${i}-c`, children: /* @__PURE__ */ e("circle", { cx: 50, cy: 50, r: 32 }) })
214
- ] }),
215
- // Sphere + cloudy internal texture rotate inside the clipped circle …
216
- body: /* @__PURE__ */ c("g", { clipPath: `url(#${i}-c)`, children: [
217
- /* @__PURE__ */ e("circle", { cx: 50, cy: 50, r: 32, fill: `url(#${i})` }),
218
- /* @__PURE__ */ c("g", { filter: `url(#${i}-b)`, children: [
219
- /* @__PURE__ */ e(
220
- "ellipse",
221
- {
222
- cx: 44,
223
- cy: 60,
224
- rx: 14,
225
- ry: 9,
226
- fill: t.cloud,
227
- opacity: 0.55,
228
- transform: "rotate(-20 44 60)"
229
- }
230
- ),
231
- /* @__PURE__ */ e(
232
- "ellipse",
233
- {
234
- cx: 60,
235
- cy: 44,
236
- rx: 10,
237
- ry: 7,
238
- fill: t.cloudLite,
239
- opacity: 0.45,
240
- transform: "rotate(25 60 44)"
241
- }
242
- ),
243
- /* @__PURE__ */ e("ellipse", { cx: 38, cy: 40, rx: 7, ry: 5, fill: t.cloudLite, opacity: 0.35 })
244
- ] })
245
- ] }),
246
- // … while the ice-blue + white speculars stay put (fixed light source).
247
- over: /* @__PURE__ */ c("g", { children: [
248
- /* @__PURE__ */ e(
249
- "ellipse",
250
- {
251
- cx: 62,
252
- cy: 38,
253
- rx: 9,
254
- ry: 6,
255
- fill: t.ice,
256
- opacity: 0.5,
257
- transform: "rotate(-30 62 38)",
258
- filter: `url(#${i}-b)`
259
- }
260
- ),
261
- /* @__PURE__ */ e(
262
- "ellipse",
263
- {
264
- cx: 59,
265
- cy: 35,
266
- rx: 5.5,
267
- ry: 3.8,
268
- fill: t.spec,
269
- opacity: 0.9,
270
- transform: "rotate(-30 59 35)"
271
- }
272
- ),
273
- /* @__PURE__ */ e("ellipse", { cx: 66, cy: 43, rx: 2.6, ry: 1.9, fill: t.spec, opacity: 0.7 })
274
- ] })
275
- };
276
- }
277
- case "opal": {
278
- const t = C.opal, i = `${o}-opal`;
279
- return {
280
- defs: /* @__PURE__ */ c(y, { children: [
281
- /* @__PURE__ */ e("filter", { id: `${i}-b`, x: "-30%", y: "-30%", width: "160%", height: "160%", children: /* @__PURE__ */ e("feGaussianBlur", { stdDeviation: "7" }) }),
282
- /* @__PURE__ */ e("clipPath", { id: `${i}-c`, children: /* @__PURE__ */ e("circle", { cx: 50, cy: 50, r: 33 }) }),
283
- /* @__PURE__ */ c("radialGradient", { id: `${i}-sheen`, cx: "0.4", cy: "0.32", r: "0.5", children: [
284
- /* @__PURE__ */ e("stop", { offset: "0%", stopColor: t.sheen, stopOpacity: 0.55 }),
285
- /* @__PURE__ */ e("stop", { offset: "60%", stopColor: t.sheen, stopOpacity: 0 })
286
- ] })
287
- ] }),
288
- // The multi-hue field drifts (rotates slowly) so the colors melt.
289
- body: /* @__PURE__ */ c("g", { clipPath: `url(#${i}-c)`, children: [
290
- /* @__PURE__ */ e("circle", { cx: 50, cy: 50, r: 33, fill: t.pink }),
291
- /* @__PURE__ */ c("g", { filter: `url(#${i}-b)`, children: [
292
- /* @__PURE__ */ e("ellipse", { cx: 50, cy: 24, rx: 27, ry: 23, fill: t.crimson }),
293
- /* @__PURE__ */ e("ellipse", { cx: 40, cy: 20, rx: 14, ry: 12, fill: t.rust }),
294
- /* @__PURE__ */ e("ellipse", { cx: 26, cy: 52, rx: 22, ry: 26, fill: t.magenta }),
295
- /* @__PURE__ */ e("ellipse", { cx: 74, cy: 50, rx: 23, ry: 25, fill: t.amber }),
296
- /* @__PURE__ */ e("ellipse", { cx: 80, cy: 60, rx: 12, ry: 12, fill: t.yellow }),
297
- /* @__PURE__ */ e("ellipse", { cx: 50, cy: 78, rx: 27, ry: 22, fill: t.cyan }),
298
- /* @__PURE__ */ e("ellipse", { cx: 62, cy: 70, rx: 14, ry: 12, fill: t.pink })
299
- ] })
300
- ] }),
301
- over: /* @__PURE__ */ e("circle", { cx: 50, cy: 50, r: 33, fill: `url(#${i}-sheen)` })
302
- };
303
- }
304
- case "obsidian":
305
- default: {
306
- const t = C.obsidian, i = `${o}-obs`;
307
- return {
308
- defs: /* @__PURE__ */ c(y, { children: [
309
- /* @__PURE__ */ c("linearGradient", { id: `${i}-b`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
310
- /* @__PURE__ */ e("stop", { offset: "0%", stopColor: t.hi }),
311
- /* @__PURE__ */ e("stop", { offset: "34%", stopColor: t.body }),
312
- /* @__PURE__ */ e("stop", { offset: "54%", stopColor: t.horizon }),
313
- /* @__PURE__ */ e("stop", { offset: "72%", stopColor: t.body }),
314
- /* @__PURE__ */ e("stop", { offset: "100%", stopColor: t.low })
315
- ] }),
316
- /* @__PURE__ */ c("radialGradient", { id: `${i}-core`, cx: "0.42", cy: "0.4", r: "0.65", children: [
317
- /* @__PURE__ */ e("stop", { offset: "0%", stopColor: t.coreLite }),
318
- /* @__PURE__ */ e("stop", { offset: "100%", stopColor: t.coreDark })
319
- ] }),
320
- /* @__PURE__ */ e("filter", { id: `${i}-gl`, x: "-40%", y: "-40%", width: "180%", height: "180%", children: /* @__PURE__ */ e("feGaussianBlur", { stdDeviation: "2" }) }),
321
- /* @__PURE__ */ e("clipPath", { id: `${i}-c`, children: /* @__PURE__ */ e("circle", { cx: 50, cy: 50, r: 32 }) })
322
- ] }),
323
- // Chrome body + gray crescent core + rim accents rotate …
324
- body: /* @__PURE__ */ c("g", { clipPath: `url(#${i}-c)`, children: [
325
- /* @__PURE__ */ e("circle", { cx: 50, cy: 50, r: 32, fill: `url(#${i}-b)` }),
326
- /* @__PURE__ */ e(
327
- "circle",
328
- {
329
- cx: 50,
330
- cy: 51,
331
- r: 20,
332
- fill: "none",
333
- stroke: t.coreLite,
334
- strokeWidth: 2.5,
335
- opacity: 0.8
336
- }
337
- ),
338
- /* @__PURE__ */ e("circle", { cx: 51, cy: 53, r: 16, fill: `url(#${i}-core)` }),
339
- /* @__PURE__ */ e("circle", { cx: 47, cy: 49, r: 14, fill: `url(#${i}-b)` }),
340
- /* @__PURE__ */ e("circle", { cx: 73, cy: 58, r: 1.6, fill: t.rim, opacity: 0.5 }),
341
- /* @__PURE__ */ e("circle", { cx: 30, cy: 64, r: 1.3, fill: t.rim, opacity: 0.4 })
342
- ] }),
343
- // … while the white gloss stays fixed (polished-chrome highlight).
344
- over: /* @__PURE__ */ e(
345
- "ellipse",
346
- {
347
- cx: 41,
348
- cy: 37,
349
- rx: 8,
350
- ry: 5.5,
351
- fill: t.gloss,
352
- opacity: 0.85,
353
- transform: "rotate(-25 41 37)",
354
- filter: `url(#${i}-gl)`
355
- }
356
- )
357
- };
358
- }
359
- }
360
- }
361
- const q = s.forwardRef(({ state: r, variant: o, className: t, ariaLabel: i }, n) => {
362
- const p = s.useId().replace(/[:]/g, ""), d = ae(o, p), m = ne[r], g = C[o].accent, a = se[r], h = le[r], v = ce[o], k = h === "think" ? v.think : h === "idle" ? v.idle : h === "slow" ? v.idle * 0.4 : 0, x = k > 0, _ = x ? { duration: 360 / k, ease: "linear", repeat: 1 / 0 } : { duration: 0.2, ease: F };
363
- return /* @__PURE__ */ e(Z, { reducedMotion: "user", children: /* @__PURE__ */ e(
364
- B.div,
365
- {
366
- ref: n,
367
- role: "img",
368
- "aria-label": i ?? `AI voice, ${r}`,
369
- "data-state": r,
370
- "data-variant": o,
371
- className: T(
372
- "relative inline-flex size-16 shrink-0 items-center justify-center",
373
- t
374
- ),
375
- animate: { scale: m.scale, opacity: m.opacity },
376
- transition: {
377
- scale: {
378
- duration: m.duration,
379
- ease: X,
380
- repeat: 1 / 0,
381
- repeatType: "loop"
382
- },
383
- opacity: { duration: 0.2, ease: F }
384
- },
385
- children: /* @__PURE__ */ c("svg", { viewBox: "0 0 100 100", className: "size-full", fill: "none", "aria-hidden": !0, children: [
386
- d.defs && /* @__PURE__ */ e("defs", { children: d.defs }),
387
- d.under,
388
- a && Array.from({ length: a.count }).map((L, P) => /* @__PURE__ */ e(
389
- B.rect,
390
- {
391
- x: 20,
392
- y: 20,
393
- width: 60,
394
- height: 60,
395
- rx: o === "command" ? 18 : 30,
396
- fill: "none",
397
- stroke: g,
398
- strokeWidth: 2.5,
399
- style: { transformBox: "fill-box", transformOrigin: "center" },
400
- initial: { scale: 0.95, opacity: 0 },
401
- animate: { scale: a.maxScale, opacity: [0, a.peak, 0] },
402
- transition: {
403
- duration: a.duration,
404
- ease: F,
405
- repeat: 1 / 0,
406
- delay: P * (a.duration / 2)
407
- }
408
- },
409
- P
410
- )),
411
- /* @__PURE__ */ e(
412
- B.g,
413
- {
414
- style: { transformBox: "fill-box", transformOrigin: "center" },
415
- animate: { rotate: x ? 360 : 0 },
416
- transition: _,
417
- children: d.body
418
- }
419
- ),
420
- d.over
421
- ] })
422
- }
423
- ) });
424
- });
425
- q.displayName = "PersonaVisual";
426
- const H = {
24
+ ], te = {
25
+ /**
26
+ * Base colours for `seed`-derived hues. The shader rotates these by u_hue,
27
+ * so each seed lands on its own colourway from one shared spectrum.
28
+ */
29
+ identity: [
30
+ [0.08, 0.78, 1],
31
+ [0.58, 0.24, 1],
32
+ [1, 0.16, 0.58]
33
+ ],
427
34
  default: [
428
35
  [0.08, 0.78, 1],
429
36
  [0.58, 0.24, 1],
@@ -449,33 +56,27 @@ const H = {
449
56
  [1, 0.12, 0.46],
450
57
  [0.58, 0.18, 1]
451
58
  ]
452
- }, ue = {
453
- default: 0.65,
454
- blue: 0.3,
455
- violet: 0.5,
456
- emerald: 0.4,
457
- sunset: 0.55
458
- }, w = {
59
+ }, v = {
459
60
  idle: { speed: 0.15, amplitude: 0.04, glow: 0.15, brightness: 0.55, pulse: 0, saturation: 0.7 },
460
61
  connecting: { speed: 0.5, amplitude: 0.1, glow: 0.45, brightness: 0.75, pulse: 1, saturation: 0.9 },
461
62
  listening: { speed: 0.4, amplitude: 0.14, glow: 0.5, brightness: 0.85, pulse: 0, saturation: 1 },
462
63
  speaking: { speed: 1.4, amplitude: 0.35, glow: 0.9, brightness: 1, pulse: 0, saturation: 1 },
463
64
  muted: { speed: 0.06, amplitude: 0.015, glow: 0.08, brightness: 0.35, pulse: 0, saturation: 0.2 }
464
- }, U = {
465
- idle: w.idle,
466
- connecting: w.connecting,
467
- listening: w.listening,
468
- thinking: w.connecting,
469
- speaking: w.speaking,
470
- muted: w.muted,
471
- asleep: { ...w.idle, brightness: 0.35, speed: 0.08 }
472
- }, de = `#version 300 es
65
+ }, F = {
66
+ idle: v.idle,
67
+ connecting: v.connecting,
68
+ listening: v.listening,
69
+ thinking: v.connecting,
70
+ speaking: v.speaking,
71
+ muted: v.muted,
72
+ asleep: { ...v.idle, brightness: 0.35, speed: 0.08 }
73
+ }, oe = `#version 300 es
473
74
  in vec2 a_position;
474
75
  out vec2 v_uv;
475
76
  void main() {
476
77
  v_uv = a_position * 0.5 + 0.5;
477
78
  gl_Position = vec4(a_position, 0.0, 1.0);
478
- }`, fe = `#version 300 es
79
+ }`, ne = `#version 300 es
479
80
  precision highp float;
480
81
 
481
82
  in vec2 v_uv;
@@ -488,6 +89,9 @@ uniform float u_glow;
488
89
  uniform float u_brightness;
489
90
  uniform float u_pulse;
490
91
  uniform float u_saturation;
92
+ uniform float u_seed;
93
+ uniform float u_hue;
94
+ uniform float u_radius;
491
95
  uniform vec3 u_color0;
492
96
  uniform vec3 u_color1;
493
97
  uniform vec3 u_color2;
@@ -499,6 +103,13 @@ vec4 mod289(vec4 x) { return x - floor(x / 289.0) * 289.0; }
499
103
  vec4 permute(vec4 x) { return mod289((x * 34.0 + 1.0) * x); }
500
104
  vec4 taylorInvSqrt(vec4 r) { return 1.79284291400159 - 0.85373472095314 * r; }
501
105
 
106
+ /** Rotate an RGB triple around the grey axis — used for per-identity hues. */
107
+ vec3 hueRotate(vec3 c, float a) {
108
+ const vec3 k = vec3(0.57735026);
109
+ float ca = cos(a);
110
+ return c * ca + cross(k, c) * sin(a) + k * dot(k, c) * (1.0 - ca);
111
+ }
112
+
502
113
  float snoise(vec3 v) {
503
114
  const vec2 C = vec2(1.0 / 6.0, 1.0 / 3.0);
504
115
  vec3 i = floor(v + dot(v, vec3(C.y)));
@@ -544,28 +155,33 @@ void main() {
544
155
  float dist = length(uv);
545
156
  float t = u_time * u_speed;
546
157
 
547
- // Perfect circle — hard boundary, soft anti-aliased edge
548
- float radius = 0.44;
158
+ // Perfect circle — hard boundary, soft anti-aliased edge. u_radius is in
159
+ // uv units where the box edge midpoint is 1.0, so 0.44 is the legacy disc
160
+ // (transparent padding around it) and ~0.98 fills the box (fill mode).
161
+ float radius = u_radius;
549
162
  float circle = 1.0 - smoothstep(radius - 0.008, radius + 0.008, dist);
550
163
 
551
164
  if (circle < 0.001) {
552
- // Outer glow only
553
- float glowDist = dist - radius;
554
- float glow = exp(-glowDist * 12.0) * u_glow * 0.4;
555
- vec3 glowColor = mix(u_color0, u_color1, 0.5);
556
- fragColor = vec4(glowColor * glow, glow);
165
+ // No halo behind the orb — everything outside the circle is fully
166
+ // transparent, so the orb reads as a clean disc with nothing cast behind it.
167
+ fragColor = vec4(0.0);
557
168
  return;
558
169
  }
559
170
 
560
- float n1 = snoise(vec3(uv * 2.0, t * 0.6)) * 0.5 + 0.5;
561
- float n2 = snoise(vec3(uv * 3.5 + 7.0, t * 0.9)) * 0.5 + 0.5;
562
- float n3 = snoise(vec3(uv * 1.5 - 3.0, t * 0.4 + 10.0)) * 0.5 + 0.5;
171
+ // u_seed offsets only the noise sample coordinates, so an identity changes
172
+ // the internal pattern while the circle, glow and speculars stay identical.
173
+ float sx = u_seed * 13.7;
174
+ float sz = u_seed * 5.3;
175
+
176
+ float n1 = snoise(vec3(uv * 2.0 + sx, t * 0.6 + sz)) * 0.5 + 0.5;
177
+ float n2 = snoise(vec3(uv * 3.5 + 7.0 + sx, t * 0.9 + sz)) * 0.5 + 0.5;
178
+ float n3 = snoise(vec3(uv * 1.5 - 3.0 + sx, t * 0.4 + 10.0 + sz)) * 0.5 + 0.5;
563
179
 
564
180
  vec2 distort = vec2(
565
- snoise(vec3(uv * 2.0 + 5.0, t * 0.7)),
566
- snoise(vec3(uv * 2.0 + 15.0, t * 0.7))
181
+ snoise(vec3(uv * 2.0 + 5.0 + sx, t * 0.7 + sz)),
182
+ snoise(vec3(uv * 2.0 + 15.0 + sx, t * 0.7 + sz))
567
183
  ) * u_amplitude * 2.0;
568
- float n4 = snoise(vec3((uv + distort) * 3.0, t * 0.5)) * 0.5 + 0.5;
184
+ float n4 = snoise(vec3((uv + distort) * 3.0 + sx, t * 0.5 + sz)) * 0.5 + 0.5;
569
185
 
570
186
  vec3 col = mix(u_color0, u_color1, n1);
571
187
  col = mix(col, u_color2, n2 * 0.5);
@@ -592,6 +208,8 @@ void main() {
592
208
 
593
209
  float pulseFactor = 1.0 + u_pulse * sin(u_time * 3.5) * 0.35;
594
210
 
211
+ col = hueRotate(col, u_hue);
212
+
595
213
  float lum = dot(col, vec3(0.299, 0.587, 0.114));
596
214
  col = mix(vec3(lum), col, u_saturation);
597
215
 
@@ -599,170 +217,164 @@ void main() {
599
217
 
600
218
  fragColor = vec4(col, circle);
601
219
  }`;
602
- function W(r, o, t) {
603
- const i = r.createShader(o);
604
- return i ? (r.shaderSource(i, t), r.compileShader(i), r.getShaderParameter(i, r.COMPILE_STATUS) ? i : (r.deleteShader(i), null)) : null;
220
+ function q(t, e, n) {
221
+ const u = t.createShader(e);
222
+ return u ? (t.shaderSource(u, n), t.compileShader(u), t.getShaderParameter(u, t.COMPILE_STATUS) ? u : (t.deleteShader(u), null)) : null;
605
223
  }
606
- function pe(r) {
607
- const o = r.getContext("webgl2", {
224
+ function re(t) {
225
+ const e = t.getContext("webgl2", {
608
226
  alpha: !0,
609
227
  premultipliedAlpha: !1,
610
228
  antialias: !0
611
229
  });
612
- if (!o) return null;
613
- const t = W(o, o.VERTEX_SHADER, de), i = W(o, o.FRAGMENT_SHADER, fe);
614
- if (!t || !i) return null;
615
- const n = o.createProgram();
616
- if (o.attachShader(n, t), o.attachShader(n, i), o.linkProgram(n), !o.getProgramParameter(n, o.LINK_STATUS)) return null;
617
- o.useProgram(n);
618
- const p = o.createBuffer();
619
- o.bindBuffer(o.ARRAY_BUFFER, p), o.bufferData(
620
- o.ARRAY_BUFFER,
230
+ if (!e) return null;
231
+ const n = q(e, e.VERTEX_SHADER, oe), u = q(e, e.FRAGMENT_SHADER, ne);
232
+ if (!n || !u) return null;
233
+ const o = e.createProgram();
234
+ if (e.attachShader(o, n), e.attachShader(o, u), e.linkProgram(o), !e.getProgramParameter(o, e.LINK_STATUS)) return null;
235
+ e.useProgram(o);
236
+ const l = e.createBuffer();
237
+ e.bindBuffer(e.ARRAY_BUFFER, l), e.bufferData(
238
+ e.ARRAY_BUFFER,
621
239
  new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]),
622
- o.STATIC_DRAW
240
+ e.STATIC_DRAW
623
241
  );
624
- const d = o.getAttribLocation(n, "a_position");
625
- o.enableVertexAttribArray(d), o.vertexAttribPointer(d, 2, o.FLOAT, !1, 0, 0), o.enable(o.BLEND), o.blendFunc(o.SRC_ALPHA, o.ONE_MINUS_SRC_ALPHA);
626
- const m = {
627
- u_time: o.getUniformLocation(n, "u_time"),
628
- u_speed: o.getUniformLocation(n, "u_speed"),
629
- u_amplitude: o.getUniformLocation(n, "u_amplitude"),
630
- u_glow: o.getUniformLocation(n, "u_glow"),
631
- u_brightness: o.getUniformLocation(n, "u_brightness"),
632
- u_pulse: o.getUniformLocation(n, "u_pulse"),
633
- u_saturation: o.getUniformLocation(n, "u_saturation"),
634
- u_color0: o.getUniformLocation(n, "u_color0"),
635
- u_color1: o.getUniformLocation(n, "u_color1"),
636
- u_color2: o.getUniformLocation(n, "u_color2"),
637
- u_dpr: o.getUniformLocation(n, "u_dpr")
242
+ const f = e.getAttribLocation(o, "a_position");
243
+ e.enableVertexAttribArray(f), e.vertexAttribPointer(f, 2, e.FLOAT, !1, 0, 0), e.enable(e.BLEND), e.blendFunc(e.SRC_ALPHA, e.ONE_MINUS_SRC_ALPHA);
244
+ const d = {
245
+ u_time: e.getUniformLocation(o, "u_time"),
246
+ u_speed: e.getUniformLocation(o, "u_speed"),
247
+ u_amplitude: e.getUniformLocation(o, "u_amplitude"),
248
+ u_glow: e.getUniformLocation(o, "u_glow"),
249
+ u_brightness: e.getUniformLocation(o, "u_brightness"),
250
+ u_pulse: e.getUniformLocation(o, "u_pulse"),
251
+ u_saturation: e.getUniformLocation(o, "u_saturation"),
252
+ u_seed: e.getUniformLocation(o, "u_seed"),
253
+ u_hue: e.getUniformLocation(o, "u_hue"),
254
+ u_radius: e.getUniformLocation(o, "u_radius"),
255
+ u_color0: e.getUniformLocation(o, "u_color0"),
256
+ u_color1: e.getUniformLocation(o, "u_color1"),
257
+ u_color2: e.getUniformLocation(o, "u_color2"),
258
+ u_dpr: e.getUniformLocation(o, "u_dpr")
638
259
  };
639
- return { gl: o, uniforms: m };
260
+ return { gl: e, uniforms: d };
261
+ }
262
+ function ie(t) {
263
+ if (t === void 0) return 0;
264
+ if (typeof t == "number") return t;
265
+ let e = 0;
266
+ for (let n = 0; n < t.length; n += 1)
267
+ e = (e << 5) - e + t.charCodeAt(n) | 0;
268
+ return Math.abs(e) % 1e3 / 1e3;
640
269
  }
641
- function E(r, o, t) {
642
- return r + (o - r) * t;
270
+ function b(t, e, n) {
271
+ return t + (e - t) * n;
643
272
  }
644
- const me = s.memo(function({
645
- state: o,
646
- palette: t,
647
- volume: i,
648
- reduced: n
273
+ const ce = i.memo(function({
274
+ state: e,
275
+ palette: n,
276
+ volume: u,
277
+ reduced: o,
278
+ seed: l,
279
+ hue: f,
280
+ radius: d
649
281
  }) {
650
- const p = s.useRef(0);
651
- p.current = i;
652
- const d = s.useRef(n);
653
- d.current = n;
654
- const m = s.useRef(null), g = s.useRef(null), a = s.useRef(0), h = s.useRef(performance.now()), v = s.useRef({ ...U.idle }), k = s.useRef({ ...U.idle });
655
- s.useEffect(() => {
656
- k.current = { ...U[o] };
657
- }, [o]);
658
- const x = H[t], _ = s.useRef(x);
659
- _.current = x;
660
- const [L, P] = s.useState(!1);
661
- s.useEffect(() => {
662
- const b = requestAnimationFrame(() => P(!0));
282
+ const w = i.useRef(0);
283
+ w.current = u;
284
+ const y = i.useRef(l);
285
+ y.current = l;
286
+ const A = i.useRef(f);
287
+ A.current = f;
288
+ const S = i.useRef(d);
289
+ S.current = d;
290
+ const C = i.useRef(o);
291
+ C.current = o;
292
+ const h = i.useRef(null), m = i.useRef(null), E = i.useRef(0), W = i.useRef(performance.now()), Y = i.useRef({ ...F.idle }), N = i.useRef({ ...F.idle });
293
+ i.useEffect(() => {
294
+ N.current = { ...F[e] };
295
+ }, [e]);
296
+ const O = te[n], B = i.useRef(O);
297
+ B.current = O;
298
+ const [I, M] = i.useState(!1);
299
+ i.useEffect(() => {
300
+ const g = requestAnimationFrame(() => M(!0));
663
301
  return () => {
664
- cancelAnimationFrame(b), P(!1);
302
+ cancelAnimationFrame(g), M(!1);
665
303
  };
666
304
  }, []);
667
- const D = s.useCallback(() => {
668
- const b = g.current;
669
- if (!b) return;
670
- const { gl: l, uniforms: f } = b, A = m.current;
671
- if (!A) return;
672
- const u = v.current, S = k.current, R = 0.045;
673
- u.speed = E(u.speed, S.speed, R), u.amplitude = E(u.amplitude, S.amplitude, R), u.glow = E(u.glow, S.glow, R), u.brightness = E(u.brightness, S.brightness, R), u.pulse = E(u.pulse, S.pulse, R), u.saturation = E(u.saturation, S.saturation, R);
674
- const Y = (performance.now() - h.current) / 1e3, z = window.devicePixelRatio || 1, M = A.getBoundingClientRect(), O = Math.round(M.width * z), I = Math.round(M.height * z);
675
- (A.width !== O || A.height !== I) && (A.width = O, A.height = I), l.viewport(0, 0, O, I), l.clearColor(0, 0, 0, 0), l.clear(l.COLOR_BUFFER_BIT);
676
- const $ = d.current ? 0 : 1, N = p.current * $, V = _.current;
677
- l.uniform1f(f.u_time, Y), l.uniform1f(f.u_speed, (u.speed + N * 0.4) * $), l.uniform1f(f.u_amplitude, (u.amplitude + N * 0.12) * $), l.uniform1f(f.u_glow, u.glow + N * 0.2), l.uniform1f(f.u_brightness, u.brightness), l.uniform1f(f.u_pulse, u.pulse * $), l.uniform1f(f.u_saturation, u.saturation), l.uniform3fv(f.u_color0, V[0]), l.uniform3fv(f.u_color1, V[1]), l.uniform3fv(f.u_color2, V[2]), l.uniform1f(f.u_dpr, z), l.drawArrays(l.TRIANGLE_STRIP, 0, 4), a.current = requestAnimationFrame(D);
305
+ const L = i.useCallback(() => {
306
+ const g = m.current;
307
+ if (!g) return;
308
+ const { gl: r, uniforms: c } = g, p = h.current;
309
+ if (!p) return;
310
+ const s = Y.current, _ = N.current, x = 0.045;
311
+ s.speed = b(s.speed, _.speed, x), s.amplitude = b(s.amplitude, _.amplitude, x), s.glow = b(s.glow, _.glow, x), s.brightness = b(s.brightness, _.brightness, x), s.pulse = b(s.pulse, _.pulse, x), s.saturation = b(s.saturation, _.saturation, x);
312
+ const K = (performance.now() - W.current) / 1e3, T = window.devicePixelRatio || 1, j = p.getBoundingClientRect(), P = Math.round(j.width * T), k = Math.round(j.height * T);
313
+ (p.width !== P || p.height !== k) && (p.width = P, p.height = k), r.viewport(0, 0, P, k), r.clearColor(0, 0, 0, 0), r.clear(r.COLOR_BUFFER_BIT);
314
+ const z = C.current ? 0 : 1, V = w.current * z, D = B.current;
315
+ r.uniform1f(c.u_time, K), r.uniform1f(c.u_speed, (s.speed + V * 0.4) * z), r.uniform1f(c.u_amplitude, (s.amplitude + V * 0.12) * z), r.uniform1f(c.u_glow, s.glow + V * 0.2), r.uniform1f(c.u_brightness, s.brightness), r.uniform1f(c.u_pulse, s.pulse * z), r.uniform1f(c.u_saturation, s.saturation), r.uniform1f(c.u_seed, y.current), r.uniform1f(c.u_hue, A.current), r.uniform1f(c.u_radius, S.current), r.uniform3fv(c.u_color0, D[0]), r.uniform3fv(c.u_color1, D[1]), r.uniform3fv(c.u_color2, D[2]), r.uniform1f(c.u_dpr, T), r.drawArrays(r.TRIANGLE_STRIP, 0, 4), E.current = requestAnimationFrame(L);
678
316
  }, []);
679
- return s.useEffect(() => {
680
- if (!L) return;
681
- const b = m.current;
682
- if (b && (g.current = pe(b), !!g.current))
683
- return a.current = requestAnimationFrame(D), () => {
684
- cancelAnimationFrame(a.current);
685
- const l = g.current;
686
- if (l) {
687
- const f = l.gl.getExtension("WEBGL_lose_context");
688
- f == null || f.loseContext();
317
+ return i.useEffect(() => {
318
+ if (!I) return;
319
+ const g = h.current;
320
+ if (g && (m.current = re(g), !!m.current))
321
+ return E.current = requestAnimationFrame(L), () => {
322
+ cancelAnimationFrame(E.current);
323
+ const r = m.current;
324
+ if (r) {
325
+ const c = r.gl.getExtension("WEBGL_lose_context");
326
+ c == null || c.loseContext();
689
327
  }
690
- g.current = null;
328
+ m.current = null;
691
329
  };
692
- }, [L, D]), /* @__PURE__ */ e("canvas", { ref: m, className: "size-full", "data-state": o });
693
- }), ge = s.forwardRef(
330
+ }, [I, L]), /* @__PURE__ */ a("canvas", { ref: h, className: "size-full", "data-state": e });
331
+ }), se = i.forwardRef(
694
332
  ({
695
- state: r = "idle",
696
- variant: o = "orb",
697
- className: t,
698
- volume: i = 0,
699
- palette: n = "default",
700
- onReady: p,
701
- "aria-label": d,
702
- ...m
703
- }, g) => {
704
- const a = re.includes(o) ? o : "orb", h = K() ?? !1, v = Math.min(1, Math.max(0, i));
705
- if (s.useEffect(() => {
706
- p == null || p();
707
- }, []), a === "orb" || a === "aura" || a === "wave") {
708
- const x = H[n][0], _ = ue[n], L = a === "orb" ? /* @__PURE__ */ e(
709
- me,
710
- {
711
- state: r,
712
- palette: n,
713
- volume: v,
714
- reduced: h
715
- }
716
- ) : a === "aura" ? /* @__PURE__ */ e(
717
- J,
718
- {
719
- state: r,
720
- volume: v,
721
- reduced: h,
722
- color: x,
723
- colorShift: _
724
- }
725
- ) : /* @__PURE__ */ e(
726
- Q,
727
- {
728
- state: r,
729
- volume: v,
730
- reduced: h,
731
- color: x,
732
- colorShift: _
733
- }
734
- );
735
- return /* @__PURE__ */ e(
736
- "div",
737
- {
738
- ...m,
739
- ref: g,
740
- role: "img",
741
- "aria-label": d ?? `AI voice, ${r}`,
742
- "data-state": r,
743
- "data-variant": a,
744
- className: T(
745
- "relative inline-flex size-16 shrink-0 items-center justify-center",
746
- t
747
- ),
748
- children: L
749
- }
750
- );
751
- }
752
- return /* @__PURE__ */ e(
753
- q,
333
+ state: t = "idle",
334
+ variant: e = "orb",
335
+ className: n,
336
+ volume: u = 0,
337
+ palette: o = "default",
338
+ seed: l,
339
+ fill: f = !1,
340
+ onReady: d,
341
+ "aria-label": w,
342
+ ...y
343
+ }, A) => {
344
+ const S = $() ?? !1, C = Math.min(1, Math.max(0, u)), h = i.useMemo(() => ie(l), [l]), m = o === "identity" ? h * Math.PI * 2 : 0;
345
+ return i.useEffect(() => {
346
+ d == null || d();
347
+ }, []), /* @__PURE__ */ a(
348
+ "div",
754
349
  {
755
- ref: g,
756
- state: r,
757
- variant: a,
758
- className: t,
759
- ariaLabel: d
350
+ ...y,
351
+ ref: A,
352
+ role: "img",
353
+ "aria-label": w ?? `AI voice, ${t}`,
354
+ "data-state": t,
355
+ "data-variant": e,
356
+ className: R(
357
+ "relative inline-flex size-24 shrink-0 items-center justify-center",
358
+ n
359
+ ),
360
+ children: /* @__PURE__ */ a(
361
+ ce,
362
+ {
363
+ state: t,
364
+ palette: o,
365
+ volume: C,
366
+ reduced: S,
367
+ seed: h,
368
+ hue: m,
369
+ radius: f ? 0.98 : 0.44
370
+ }
371
+ )
760
372
  }
761
373
  );
762
374
  }
763
375
  );
764
- ge.displayName = "Voice";
765
- const he = {
376
+ se.displayName = "Voice";
377
+ const ae = {
766
378
  idle: "bg-muted-foreground",
767
379
  connecting: "bg-warning motion-safe:animate-pulse",
768
380
  listening: "bg-success",
@@ -771,105 +383,114 @@ const he = {
771
383
  muted: "bg-danger",
772
384
  asleep: "bg-muted-foreground opacity-50"
773
385
  };
774
- function ve({ state: r = "idle", className: o }) {
775
- return /* @__PURE__ */ e(
386
+ function ue({ state: t = "idle", className: e }) {
387
+ return /* @__PURE__ */ a(
776
388
  "span",
777
389
  {
778
390
  "aria-hidden": !0,
779
- className: T(
391
+ className: R(
780
392
  "inline-block size-2.5 shrink-0 rounded-dot transition-[background-color,opacity] duration-(--duration-normal) ease-out motion-reduce:transition-none",
781
- he[r],
782
- o
393
+ ae[t],
394
+ e
783
395
  )
784
396
  }
785
397
  );
786
398
  }
787
- function xe({
788
- onConnect: r,
789
- disabled: o,
790
- className: t
399
+ function le({
400
+ onConnect: t,
401
+ disabled: e,
402
+ className: n
791
403
  }) {
792
- return /* @__PURE__ */ e(
793
- G,
404
+ return /* @__PURE__ */ a(
405
+ U,
794
406
  {
795
- variant: "solid",
407
+ variant: "ghost",
796
408
  size: "sm",
797
- disabled: o,
798
- onClick: r,
799
- startContent: /* @__PURE__ */ e(ee, {}),
800
- className: t,
409
+ disabled: e,
410
+ onClick: t,
411
+ startContent: /* @__PURE__ */ a(J, {}),
412
+ className: R(
413
+ "bg-success-50 text-success-700 hover:bg-success-100 hover:text-success-700",
414
+ n
415
+ ),
801
416
  children: "Connect"
802
417
  }
803
418
  );
804
419
  }
805
- function ye({
806
- isMuted: r = !1,
807
- onMute: o,
808
- onUnmute: t,
809
- disabled: i,
810
- className: n
420
+ function fe({
421
+ isMuted: t = !1,
422
+ onMute: e,
423
+ onUnmute: n,
424
+ disabled: u,
425
+ className: o
811
426
  }) {
812
- return /* @__PURE__ */ e(j, { content: r ? "Unmute" : "Mute", children: /* @__PURE__ */ e(
813
- G,
427
+ return /* @__PURE__ */ a(H, { content: t ? "Unmute" : "Mute", children: /* @__PURE__ */ a(
428
+ U,
814
429
  {
815
430
  variant: "ghost",
816
431
  size: "icon-sm",
817
- disabled: i,
818
- "aria-label": r ? "Unmute" : "Mute",
819
- onClick: () => r ? t == null ? void 0 : t() : o == null ? void 0 : o(),
820
- className: n,
821
- children: r ? /* @__PURE__ */ e(te, {}) : /* @__PURE__ */ e(ie, {})
432
+ disabled: u,
433
+ "aria-label": t ? "Unmute" : "Mute",
434
+ onClick: () => t ? n == null ? void 0 : n() : e == null ? void 0 : e(),
435
+ className: R(
436
+ t ? "bg-warning-50 text-warning-700 hover:bg-warning-100 hover:text-warning-700" : "bg-info-50 text-info-700 hover:bg-info-100 hover:text-info-700",
437
+ o
438
+ ),
439
+ children: t ? /* @__PURE__ */ a(Z, {}) : /* @__PURE__ */ a(ee, {})
822
440
  }
823
441
  ) });
824
442
  }
825
- function _e({
826
- onDisconnect: r,
827
- disabled: o,
828
- className: t
443
+ function de({
444
+ onDisconnect: t,
445
+ disabled: e,
446
+ className: n
829
447
  }) {
830
- return /* @__PURE__ */ e(j, { content: "Disconnect", children: /* @__PURE__ */ e(
831
- G,
448
+ return /* @__PURE__ */ a(H, { content: "Disconnect", children: /* @__PURE__ */ a(
449
+ U,
832
450
  {
833
451
  variant: "ghost",
834
452
  size: "icon-sm",
835
- disabled: o,
453
+ disabled: e,
836
454
  "aria-label": "Disconnect",
837
- onClick: r,
838
- className: T("text-danger hover:text-danger", t),
839
- children: /* @__PURE__ */ e(oe, {})
455
+ onClick: t,
456
+ className: R(
457
+ "bg-danger-50 text-danger-700 hover:bg-danger-100 hover:text-danger-700",
458
+ n
459
+ ),
460
+ children: /* @__PURE__ */ a(Q, {})
840
461
  }
841
462
  ) });
842
463
  }
843
- function be(r, o) {
844
- return r === "ended" ? "idle" : r === "starting" ? "connecting" : o ? "muted" : "listening";
464
+ function me(t, e) {
465
+ return t === "ended" ? "idle" : t === "starting" ? "connecting" : e ? "muted" : "listening";
845
466
  }
846
- function De({
847
- status: r,
848
- isMuted: o = !1,
849
- onConnect: t,
850
- onMute: i,
851
- onUnmute: n,
852
- onDisconnect: p,
853
- className: d
467
+ function ye({
468
+ status: t,
469
+ isMuted: e = !1,
470
+ onConnect: n,
471
+ onMute: u,
472
+ onUnmute: o,
473
+ onDisconnect: l,
474
+ className: f
854
475
  }) {
855
- return /* @__PURE__ */ c("div", { className: T("flex items-center gap-2", d), children: [
856
- /* @__PURE__ */ e(ve, { state: be(r, o) }),
857
- r === "ended" && /* @__PURE__ */ e(xe, { onConnect: t }),
858
- r === "starting" && /* @__PURE__ */ e("span", { className: "text-base text-secondary", children: "Connecting…" }),
859
- r === "running" && /* @__PURE__ */ c(y, { children: [
860
- /* @__PURE__ */ e(ye, { isMuted: o, onMute: i, onUnmute: n }),
861
- /* @__PURE__ */ e(_e, { onDisconnect: p })
476
+ return /* @__PURE__ */ G("div", { className: R("flex items-center gap-2", f), children: [
477
+ /* @__PURE__ */ a(ue, { state: me(t, e) }),
478
+ t === "ended" && /* @__PURE__ */ a(le, { onConnect: n }),
479
+ t === "starting" && /* @__PURE__ */ a("span", { className: "text-base text-secondary", children: "Connecting…" }),
480
+ t === "running" && /* @__PURE__ */ G(X, { children: [
481
+ /* @__PURE__ */ a(fe, { isMuted: e, onMute: u, onUnmute: o }),
482
+ /* @__PURE__ */ a(de, { onDisconnect: l })
862
483
  ] })
863
484
  ] });
864
485
  }
865
486
  export {
866
- Te as VOICE_PALETTES,
867
- $e as VOICE_STATES,
868
- re as VOICE_VARIANTS,
869
- ge as Voice,
870
- xe as VoiceConnectButton,
871
- De as VoiceControl,
872
- _e as VoiceDisconnectButton,
873
- ye as VoiceMuteButton,
874
- ve as VoiceStatusDot
487
+ be as VOICE_PALETTES,
488
+ we as VOICE_STATES,
489
+ Re as VOICE_VARIANTS,
490
+ se as Voice,
491
+ le as VoiceConnectButton,
492
+ ye as VoiceControl,
493
+ de as VoiceDisconnectButton,
494
+ fe as VoiceMuteButton,
495
+ ue as VoiceStatusDot
875
496
  };