@burdenoff/fe-libs 2026.1114.14 → 2026.1115.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,19 +1,4 @@
1
1
  import { FC } from 'react';
2
- /**
3
- * The mic in the message box on a page, as one split control (BOFF-13461; the
4
- * operator's design of 14 Nov, "Dictation states" 1): the microphone starts
5
- * dictation, and the arrow beside it opens the microphone and language options.
6
- * Both choices are remembered (the assistant store) and used by dictation AND the
7
- * voice chat.
8
- *
9
- * - **Microphone**: the system default, then each microphone the browser lists. A
10
- * desktop browser only: on a phone the recogniser picks the microphone itself,
11
- * and a capture of ours would take it away (see `useVoiceInput`'s `deviceId`).
12
- * - **Language**: the language the person speaks (the same setting as Settings ›
13
- * Assistant): "Same as interface", then each language the assistant hears.
14
- */
15
- /** "{microphone} · {language}": what dictation and voice chat use now. */
16
- export declare function useMicSummary(): string;
17
2
  export declare const AssistantMicMenu: FC<{
18
3
  /** Start dictation. */
19
4
  onDictate: () => void;
@@ -1,56 +1,42 @@
1
1
  import { EscapeLayer as e } from "../../../components/EscapeLayer.js";
2
2
  import { useAssistantTr as t } from "../../i18n.js";
3
3
  import { useAssistantStore as n } from "../../store.js";
4
- import { ASSISTANT_LANGUAGES as r, findAssistantLanguage as i } from "../../voice/languages.js";
5
- import { useDropdownEscape as a } from "../useDropdownEscape.js";
6
- import { listMicrophones as o, microphoneChoiceOffered as s } from "./microphones.js";
7
- import { useCallback as c, useEffect as l, useRef as u, useState as d } from "react";
8
- import { Check as f, ChevronDown as p, Mic as m, MicOff as h } from "lucide-react";
9
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
4
+ import { ASSISTANT_LANGUAGES as r } from "../../voice/languages.js";
5
+ import { useDropdownEscape as i } from "../useDropdownEscape.js";
6
+ import { listMicrophones as a, microphoneChoiceOffered as o } from "./microphones.js";
7
+ import { useCallback as s, useEffect as c, useRef as l, useState as u } from "react";
8
+ import { Check as d, ChevronDown as f, Mic as p, MicOff as m } from "lucide-react";
9
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
10
10
  // src/shared/assistant/ui/composer/AssistantMicMenu.tsx
11
- function y() {
12
- let e = t(), r = n((e) => e.micDeviceId), a = n((e) => e.assistantLanguage), [s, c] = d(null);
13
- l(() => {
14
- if (!r) return;
15
- let t = !0;
16
- return o((t) => e("dictation.unnamedMicrophone", "Microphone {{n}}", { n: t })).then((e) => {
17
- t && c(e.find((e) => e.deviceId === r)?.label ?? null);
18
- }), () => {
19
- t = !1;
20
- };
21
- }, [r, e]);
22
- let u = r && s ? s : e("dictation.systemDefault", "System default"), f = i(a);
23
- return `${u} · ${f ? f.label : e("voice.languageFollowApp", "Same as interface")}`;
24
- }
25
- var b = "flex min-h-11 w-full items-center justify-between gap-3 px-3 py-2 text-start text-sm sm:min-h-0 text-text-primary transition-colors hover:bg-bg-sunken focus:outline-none focus-visible:bg-bg-sunken", x = ({ checked: e, label: t, onChoose: n, testId: r, lang: i }) => /* @__PURE__ */ v("button", {
11
+ var v = 10, y = 12, b = 340, x = 160, S = "flex min-h-11 w-full items-center justify-between gap-3 px-3 py-2 text-start text-sm sm:min-h-0 text-text-primary transition-colors hover:bg-bg-sunken focus:outline-none focus-visible:bg-bg-sunken", C = ({ checked: e, label: t, onChoose: n, testId: r, lang: i }) => /* @__PURE__ */ _("button", {
26
12
  type: "button",
27
13
  role: "menuitemradio",
28
14
  "aria-checked": e,
29
15
  lang: i,
30
16
  onClick: n,
31
- className: b,
17
+ className: `${S} rounded-lg${e ? " bg-action-primary-bg/10" : ""}`,
32
18
  "data-testid": r,
33
- children: [/* @__PURE__ */ _("span", {
19
+ children: [/* @__PURE__ */ g("span", {
34
20
  className: "truncate",
35
21
  children: t
36
- }), e ? /* @__PURE__ */ _(f, {
37
- className: "size-4 shrink-0 text-status-warning-text",
22
+ }), e ? /* @__PURE__ */ g(d, {
23
+ className: "size-4 shrink-0 text-action-primary-bg",
38
24
  "aria-hidden": "true"
39
25
  }) : null]
40
- }), S = ({ title: e, children: t }) => /* @__PURE__ */ v("div", {
26
+ }), w = ({ title: e, children: t }) => /* @__PURE__ */ _("div", {
41
27
  role: "group",
42
28
  "aria-label": e,
43
- children: [/* @__PURE__ */ _("p", {
44
- className: "px-3 pb-1 pt-2 text-xs font-medium text-text-secondary",
29
+ children: [/* @__PURE__ */ g("p", {
30
+ className: "px-3 pb-1 pt-2 text-[11px] font-semibold uppercase tracking-wider text-text-muted",
45
31
  children: e
46
32
  }), t]
47
33
  });
48
- function C(e, n) {
49
- let r = t(), [i, a] = d([]);
50
- return l(() => {
34
+ function T(e, n) {
35
+ let r = t(), [i, o] = u([]);
36
+ return c(() => {
51
37
  if (!e || !n) return;
52
- let t = !0, i = () => void o((e) => r("dictation.unnamedMicrophone", "Microphone {{n}}", { n: e })).then((e) => {
53
- t && a(e);
38
+ let t = !0, i = () => void a((e) => r("dictation.unnamedMicrophone", "Microphone {{n}}", { n: e })).then((e) => {
39
+ t && o(e);
54
40
  });
55
41
  return i(), navigator.mediaDevices?.addEventListener?.("devicechange", i), () => {
56
42
  t = !1, navigator.mediaDevices?.removeEventListener?.("devicechange", i);
@@ -61,38 +47,38 @@ function C(e, n) {
61
47
  r
62
48
  ]), i;
63
49
  }
64
- var w = ({ open: e, onChosen: i }) => {
65
- let a = t(), o = n((e) => e.micDeviceId), c = n((e) => e.setMicDeviceId), l = n((e) => e.assistantLanguage), u = n((e) => e.setAssistantLanguage), d = s(), f = C(e, d), p = (e) => () => {
50
+ var E = ({ open: e, onChosen: i }) => {
51
+ let a = t(), s = n((e) => e.micDeviceId), c = n((e) => e.setMicDeviceId), l = n((e) => e.assistantLanguage), u = n((e) => e.setAssistantLanguage), d = o(), f = T(e, d), p = (e) => () => {
66
52
  e(), i();
67
53
  };
68
- return /* @__PURE__ */ v(g, { children: [d ? /* @__PURE__ */ v(S, {
54
+ return /* @__PURE__ */ _(h, { children: [d ? /* @__PURE__ */ _(w, {
69
55
  title: a("dictation.microphone", "Microphone"),
70
56
  children: [
71
- /* @__PURE__ */ _(x, {
72
- checked: o === null,
57
+ /* @__PURE__ */ g(C, {
58
+ checked: s === null,
73
59
  label: a("dictation.systemDefault", "System default"),
74
60
  onChoose: p(() => c(null)),
75
61
  testId: "assistant-mic-device-default"
76
62
  }),
77
- f.map((e) => /* @__PURE__ */ _(x, {
78
- checked: o === e.deviceId,
63
+ f.map((e) => /* @__PURE__ */ g(C, {
64
+ checked: s === e.deviceId,
79
65
  label: e.label,
80
66
  onChoose: p(() => c(e.deviceId)),
81
67
  testId: "assistant-mic-device"
82
68
  }, e.deviceId)),
83
- /* @__PURE__ */ _("div", {
69
+ /* @__PURE__ */ g("div", {
84
70
  className: "my-1 h-px bg-border-subtle",
85
71
  "aria-hidden": "true"
86
72
  })
87
73
  ]
88
- }) : null, /* @__PURE__ */ v(S, {
74
+ }) : null, /* @__PURE__ */ _(w, {
89
75
  title: a("dictation.language", "Language"),
90
- children: [/* @__PURE__ */ _(x, {
76
+ children: [/* @__PURE__ */ g(C, {
91
77
  checked: l === null,
92
78
  label: a("voice.languageFollowApp", "Same as interface"),
93
79
  onChoose: p(() => u(null)),
94
80
  testId: "assistant-mic-language-default"
95
- }), r.map((e) => /* @__PURE__ */ _(x, {
81
+ }), r.map((e) => /* @__PURE__ */ g(C, {
96
82
  checked: l === e.code,
97
83
  label: e.label,
98
84
  lang: e.code,
@@ -100,9 +86,9 @@ var w = ({ open: e, onChosen: i }) => {
100
86
  testId: "assistant-mic-language"
101
87
  }, e.code))]
102
88
  })] });
103
- }, T = ({ onDictate: e, blocked: n, disabled: r }) => {
89
+ }, D = ({ onDictate: e, blocked: n, disabled: r }) => {
104
90
  let i = t(), a = n ? i("dictation.blockedButton", "Dictate, microphone blocked") : i("composer.voiceStart", "Dictate a message");
105
- return /* @__PURE__ */ _("button", {
91
+ return /* @__PURE__ */ g("button", {
106
92
  type: "button",
107
93
  onClick: e,
108
94
  disabled: r,
@@ -111,66 +97,72 @@ var w = ({ open: e, onChosen: i }) => {
111
97
  title: a,
112
98
  "data-testid": "assistant-voice",
113
99
  "data-state": n ? "blocked" : "idle",
114
- children: _(n ? h : m, {
100
+ children: g(n ? m : p, {
115
101
  className: "size-5",
116
102
  "aria-hidden": "true"
117
103
  })
118
104
  });
119
- }, E = ({ disabled: n }) => {
120
- let r = t(), [i, o] = d(!1), s = u(null), f = u(null), m = c(() => o(!1), []), h = a(s, m), y = c(() => {
121
- o(!1), s.current?.focus();
105
+ }, O = ({ disabled: n }) => {
106
+ let r = t(), [a, o] = u(!1), d = l(null), p = l(null), m = s((e) => {
107
+ p.current = e;
108
+ let t = d.current;
109
+ if (!e || !t) return;
110
+ let n = t.getBoundingClientRect().top - v - y;
111
+ e.style.maxHeight = `${Math.max(x, Math.min(b, n))}px`;
112
+ }, []), S = s(() => o(!1), []), C = i(d, S), w = s(() => {
113
+ o(!1), d.current?.focus();
122
114
  }, []);
123
- l(() => {
124
- if (!i) return;
115
+ c(() => {
116
+ if (!a) return;
125
117
  let e = (e) => {
126
118
  let t = e.target;
127
- f.current?.contains(t) || s.current?.contains(t) || o(!1);
119
+ p.current?.contains(t) || d.current?.contains(t) || o(!1);
128
120
  };
129
121
  return window.addEventListener("mousedown", e), () => window.removeEventListener("mousedown", e);
130
- }, [i]);
131
- let b = r("dictation.options", "Microphone and language options");
132
- return /* @__PURE__ */ v(g, { children: [
133
- /* @__PURE__ */ _("span", {
122
+ }, [a]);
123
+ let T = r("dictation.options", "Microphone and language options");
124
+ return /* @__PURE__ */ _(h, { children: [
125
+ /* @__PURE__ */ g("span", {
134
126
  "aria-hidden": "true",
135
127
  className: "h-5 w-px bg-border-default"
136
128
  }),
137
- /* @__PURE__ */ _("button", {
138
- ref: s,
129
+ /* @__PURE__ */ g("button", {
130
+ ref: d,
139
131
  type: "button",
140
132
  onClick: () => o((e) => !e),
141
133
  disabled: n,
142
134
  className: "flex h-11 w-11 items-center justify-center rounded-e-full text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] disabled:cursor-not-allowed disabled:opacity-50 sm:h-10 sm:w-9",
143
- "aria-label": b,
144
- title: b,
135
+ "aria-label": T,
136
+ title: T,
145
137
  "aria-haspopup": "menu",
146
- "aria-expanded": i,
138
+ "aria-expanded": a,
147
139
  "data-testid": "assistant-mic-options",
148
- children: /* @__PURE__ */ _(p, {
140
+ children: /* @__PURE__ */ g(f, {
149
141
  className: "size-4",
150
142
  "aria-hidden": "true"
151
143
  })
152
144
  }),
153
- i ? /* @__PURE__ */ _(e, {
154
- ...h,
155
- children: /* @__PURE__ */ _("div", {
156
- ref: f,
145
+ a ? /* @__PURE__ */ g(e, {
146
+ ...C,
147
+ children: /* @__PURE__ */ g("div", {
148
+ ref: m,
157
149
  role: "menu",
158
- "aria-label": b,
159
- className: "absolute bottom-full end-0 z-30 mb-2 max-h-[min(24rem,60vh)] min-w-60 overflow-y-auto rounded-xl border border-border-default bg-bg-elevated py-1 shadow-lg",
150
+ "aria-label": T,
151
+ className: "scrollbar-slim scrollbar-box absolute bottom-full end-0 z-30 mb-2.5 w-72 max-w-[calc(100vw-2rem)] overflow-y-auto overscroll-contain rounded-xl border border-border-default bg-bg-elevated p-1.5 shadow-lg",
160
152
  "data-testid": "assistant-mic-menu",
161
- children: /* @__PURE__ */ _(w, {
162
- open: i,
163
- onChosen: y
153
+ children: /* @__PURE__ */ g(E, {
154
+ open: a,
155
+ onChosen: w
164
156
  })
165
157
  })
166
158
  }) : null
167
159
  ] });
168
- }, D = ({ onDictate: e, blocked: t, disabled: n }) => /* @__PURE__ */ v("div", {
160
+ }, k = ({ onDictate: e, blocked: t, disabled: n }) => /* @__PURE__ */ _("div", {
169
161
  className: "relative flex shrink-0 items-center rounded-full border border-border-default",
170
- children: [/* @__PURE__ */ _(T, {
162
+ children: [/* @__PURE__ */ g(D, {
171
163
  onDictate: e,
172
164
  blocked: t,
173
165
  disabled: n
174
- }), t ? null : /* @__PURE__ */ _(E, { disabled: n })]
166
+ }), t ? null : /* @__PURE__ */ g(O, { disabled: n })]
175
167
  });
176
- export { D as AssistantMicMenu, y as useMicSummary };
168
+ export { k as AssistantMicMenu };
@@ -1,28 +1,28 @@
1
1
  import { DropdownMenu as e, DropdownMenuContent as t, DropdownMenuRadioGroup as n, DropdownMenuRadioItem as r, DropdownMenuTrigger as i } from "../../../../ui/dropdown-menu.js";
2
- import { focusWasDropped as a } from "../../../hooks/useReturnFocus.js";
3
- import { AUTO_WRITE_MODE as o } from "../../autoRouting.js";
4
- import { useAssistantTr as s } from "../../i18n.js";
5
- import { assistantModeShortDescriptionKey as ee, translateProductCopy as te } from "../../productCopy.js";
6
- import { AUTO_MODE_OPTION_ID as c, assistantModeMeta as l } from "./AssistantModeSelector.js";
7
- import { TAB_STOP_SELECTOR as u, modeMenuItemKey as ne, modeMenuOpenIndex as re, modeMenuTriggerKey as ie, nextTabStop as d } from "./modeMenuKeys.js";
8
- import { useCallback as f, useId as p, useRef as m, useState as h } from "react";
9
- import { ChevronDown as ae, Wand2 as oe } from "lucide-react";
10
- import { Fragment as se, jsx as g, jsxs as _ } from "react/jsx-runtime";
2
+ import { focusWasDropped as ee } from "../../../hooks/useReturnFocus.js";
3
+ import { AUTO_WRITE_MODE as a } from "../../autoRouting.js";
4
+ import { useAssistantTr as te } from "../../i18n.js";
5
+ import { assistantModeShortDescriptionKey as ne, translateProductCopy as o } from "../../productCopy.js";
6
+ import { AUTO_MODE_OPTION_ID as s, assistantModeMeta as c } from "./AssistantModeSelector.js";
7
+ import { TAB_STOP_SELECTOR as re, modeMenuItemKey as l, modeMenuOpenIndex as ie, modeMenuTriggerKey as ae, nextTabStop as oe } from "./modeMenuKeys.js";
8
+ import { useCallback as u, useId as d, useRef as f, useState as se } from "react";
9
+ import { Check as ce, ChevronDown as p, Wand2 as m } from "lucide-react";
10
+ import { Fragment as le, jsx as h, jsxs as g } from "react/jsx-runtime";
11
11
  // src/shared/assistant/ui/composer/AssistantModeMenu.tsx
12
- function v(e, t) {
13
- return e(`mode.${t.id}`, t.label || l(t).fallback);
12
+ function _(e, t) {
13
+ return e(`mode.${t.id}`, t.label || c(t).fallback);
14
14
  }
15
- var ce = "[data-radix-focus-guard],[data-radix-menu-content]";
16
- function le(e) {
15
+ var ue = "[data-radix-focus-guard],[data-radix-menu-content]";
16
+ function v(e) {
17
17
  if (e.disabled === !0 || e.getAttribute("type") === "hidden" || e.closest("[inert],[hidden]")) return !0;
18
18
  let t = e.checkVisibility;
19
19
  return typeof t == "function" && !t.call(e);
20
20
  }
21
- var y = ({ mode: y, availableModes: b, onModeChange: x, auto: S, disabled: C = !1, disabledReason: ue = null, readOnly: w = !1, chip: T = !1 }) => {
22
- let E = s(), D = p(), O = p(), [k, A] = h(!1);
23
- k && C && A(!1);
24
- let j = m(null), M = m([]), N = m("checked"), P = m(!1), F = S !== void 0, I = [...F ? [c] : [], ...b.map((e) => e.id)], L = S?.active ? c : y, R = I.indexOf(L), z = !!S?.active && y === "api-calls", B = b.find((e) => e.id === o), V = E("modeSelector.auto", "Auto"), H = E("modeSelector.autoHint", "Answers your questions, and proposes changes for you to approve"), de = b.find((e) => e.id === y), U = z && B ? v(E, B) : null, W = S?.active ? U ? `${V} · ${U}` : V : v(E, de ?? { id: y }), G = f((e) => {
25
- if (e === L) {
21
+ var y = ({ mode: y, availableModes: b, onModeChange: x, auto: S, disabled: C = !1, disabledReason: w = null, readOnly: T = !1, chip: E = !1 }) => {
22
+ let D = te(), O = d(), k = d(), [A, j] = se(!1);
23
+ A && C && j(!1);
24
+ let M = f(null), N = f([]), P = f("checked"), F = f(!1), I = S !== void 0, L = [...I ? [s] : [], ...b.map((e) => e.id)], R = S?.active ? s : y, z = L.indexOf(R), B = !!S?.active && y === "api-calls", V = b.find((e) => e.id === a), H = D("modeSelector.auto", "Auto"), de = D("modeSelector.autoHint", "Answers your questions, and proposes changes for you to approve"), fe = b.find((e) => e.id === y), U = B && V ? _(D, V) : null, W = S?.active ? U ? `${H} · ${U}` : H : _(D, fe ?? { id: y }), G = u((e) => {
25
+ if (e === R) {
26
26
  let t = b.find((t) => t.id === e);
27
27
  t?.writeCapable && x(t.id);
28
28
  return;
@@ -37,159 +37,165 @@ var y = ({ mode: y, availableModes: b, onModeChange: x, auto: S, disabled: C = !
37
37
  S,
38
38
  b,
39
39
  x,
40
- L
41
- ]), fe = f((e) => {
42
- e && C || (e ? P.current = !0 : N.current = "checked", A(e));
43
- }, [C]), pe = f((e) => {
44
- let t = ie(e.key);
45
- t !== null && (C ? e.preventDefault() : (N.current = t, e.key === "ArrowUp" && (e.preventDefault(), P.current = !0, A(!0))));
46
- }, [C]), me = f((e) => {
40
+ R
41
+ ]), pe = u((e) => {
42
+ e && C || (e ? F.current = !0 : P.current = "checked", j(e));
43
+ }, [C]), me = u((e) => {
44
+ let t = ae(e.key);
45
+ t !== null && (C ? e.preventDefault() : (P.current = t, e.key === "ArrowUp" && (e.preventDefault(), F.current = !0, j(!0))));
46
+ }, [C]), he = u((e) => {
47
47
  C && e.preventDefault();
48
- }, [C]), K = f((e) => {
49
- let t = j.current;
50
- if (A(!1), !t) return;
51
- let n = t.ownerDocument, r = Array.from(n.querySelectorAll(u)).filter((e) => !M.current.includes(e) && !e.closest(ce)), i = r.indexOf(t);
52
- (r[i < 0 ? -1 : d(r.map((e) => ({
48
+ }, [C]), K = u((e) => {
49
+ let t = M.current;
50
+ if (j(!1), !t) return;
51
+ let n = t.ownerDocument, r = Array.from(n.querySelectorAll(re)).filter((e) => !N.current.includes(e) && !e.closest(ue)), i = r.indexOf(t);
52
+ (r[i < 0 ? -1 : oe(r.map((e) => ({
53
53
  tabIndex: e.tabIndex,
54
- unreachable: le(e)
54
+ unreachable: v(e)
55
55
  })), i, e)] ?? t).focus();
56
- }, []), q = f((e) => {
56
+ }, []), q = u((e) => {
57
57
  if (e.defaultPrevented) return;
58
- let t = M.current.slice(0, I.length), n = t.findIndex((t) => t !== null && t === e.target), r = ne(e.key, {
58
+ let t = N.current.slice(0, L.length), n = t.findIndex((t) => t !== null && t === e.target), r = l(e.key, {
59
59
  shiftKey: e.shiftKey,
60
60
  index: n,
61
- count: I.length
61
+ count: L.length
62
62
  });
63
63
  r.kind === "move" ? (e.preventDefault(), t[r.index]?.focus()) : r.kind === "tab-out" && (e.preventDefault(), K(r.direction));
64
- }, [I.length, K]), he = f((e) => {
65
- if (!P.current || e.target !== e.currentTarget) return;
66
- P.current = !1, e.preventDefault();
67
- let t = re(N.current, R, I.length);
68
- N.current = "checked", M.current[t]?.focus();
69
- }, [R, I.length]), J = f((e) => {
70
- let t = j.current;
71
- t && !a(t.ownerDocument) && e.preventDefault();
72
- }, []), ge = f((e) => {
73
- j.current?.focus(), G(e);
64
+ }, [L.length, K]), ge = u((e) => {
65
+ if (!F.current || e.target !== e.currentTarget) return;
66
+ F.current = !1, e.preventDefault();
67
+ let t = ie(P.current, z, L.length);
68
+ P.current = "checked", N.current[t]?.focus();
69
+ }, [z, L.length]), _e = u((e) => {
70
+ let t = M.current;
71
+ t && !ee(t.ownerDocument) && e.preventDefault();
72
+ }, []), ve = u((e) => {
73
+ M.current?.focus(), G(e);
74
74
  }, [G]);
75
- if (I.length === 0) return null;
76
- let Y = E("modeMenu.staticLabel", "Mode: {{mode}}", { mode: W }), X = S?.active ? oe : l({ id: y }).icon;
77
- if (I.length === 1 && !b.some((e) => e.writeCapable) || w) return T ? /* @__PURE__ */ _("span", {
75
+ if (L.length === 0) return null;
76
+ let J = D("modeMenu.staticLabel", "Mode: {{mode}}", { mode: W }), Y = S?.active ? m : c({ id: y }).icon;
77
+ if (L.length === 1 && !b.some((e) => e.writeCapable) || T) return E ? /* @__PURE__ */ g("span", {
78
78
  className: "inline-flex h-8 min-w-0 items-center gap-1.5 whitespace-nowrap rounded-full border border-border-default px-2.5 text-[13px] leading-tight text-text-secondary sm:h-[30px]",
79
- title: w ? E("modeMenu.readOnlyHint", "Change the mode in the full assistant") : Y,
79
+ title: T ? D("modeMenu.readOnlyHint", "Change the mode in the full assistant") : J,
80
80
  "data-testid": "assistant-mode-static",
81
81
  "data-mode-id": y,
82
82
  children: [
83
- /* @__PURE__ */ g(X, {
83
+ /* @__PURE__ */ h(Y, {
84
84
  className: "size-3.5 shrink-0",
85
85
  "aria-hidden": "true"
86
86
  }),
87
- /* @__PURE__ */ g("span", {
87
+ /* @__PURE__ */ h("span", {
88
88
  className: "truncate",
89
89
  "aria-hidden": "true",
90
90
  children: W
91
91
  }),
92
- /* @__PURE__ */ g("span", {
92
+ /* @__PURE__ */ h("span", {
93
93
  className: "sr-only",
94
94
  "data-testid": "assistant-mode-static-label",
95
- children: Y
95
+ children: J
96
96
  })
97
97
  ]
98
- }) : /* @__PURE__ */ g("span", {
98
+ }) : /* @__PURE__ */ h("span", {
99
99
  className: "inline-flex h-9 items-center px-3 text-sm text-text-secondary",
100
100
  "data-testid": "assistant-mode-static",
101
101
  "data-mode-id": y,
102
- children: E("modeMenu.staticLabel", "Mode: {{mode}}", { mode: W })
102
+ children: D("modeMenu.staticLabel", "Mode: {{mode}}", { mode: W })
103
103
  });
104
- let Z = ue === "replying" ? E("modeMenu.disabledReplying", "Mode can't change while the assistant is replying. Stop the reply to change it.") : E("modeMenu.disabledBusy", "Mode can't change right now."), Q = "min-h-11 items-start gap-0 py-2 pe-3", $ = (e) => (t) => {
105
- M.current[e] = t;
104
+ let X = w === "replying" ? D("modeMenu.disabledReplying", "Mode can't change while the assistant is replying. Stop the reply to change it.") : D("modeMenu.disabledBusy", "Mode can't change right now."), Z = "min-h-11 items-start gap-0 rounded-lg py-2 pe-3 data-[state=checked]:bg-action-primary-bg/10", Q = /* @__PURE__ */ h(ce, {
105
+ className: "size-4 text-action-primary-bg",
106
+ "aria-hidden": "true"
107
+ }), $ = (e) => (t) => {
108
+ N.current[e] = t;
106
109
  };
107
- return /* @__PURE__ */ _(se, { children: [/* @__PURE__ */ _(e, {
108
- open: k,
109
- onOpenChange: fe,
110
+ return /* @__PURE__ */ g(le, { children: [/* @__PURE__ */ g(e, {
111
+ open: A,
112
+ onOpenChange: pe,
110
113
  modal: !1,
111
- children: [/* @__PURE__ */ g(i, {
114
+ children: [/* @__PURE__ */ h(i, {
112
115
  asChild: !0,
113
- children: /* @__PURE__ */ _("button", {
114
- ref: j,
116
+ children: /* @__PURE__ */ g("button", {
117
+ ref: M,
115
118
  type: "button",
116
- "aria-label": T ? Y : E("modeMenu.trigger", "Assistant mode: {{mode}}", { mode: W }),
119
+ "aria-label": E ? J : D("modeMenu.trigger", "Assistant mode: {{mode}}", { mode: W }),
117
120
  "aria-disabled": C || void 0,
118
- "aria-describedby": C ? D : void 0,
119
- title: C ? Z : void 0,
120
- onKeyDown: pe,
121
- onPointerDown: me,
122
- className: `${T ? "inline-flex h-11 min-w-0 items-center gap-1.5 whitespace-nowrap rounded-full border border-border-default px-2.5 text-[13px] font-medium leading-tight text-text-primary transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] sm:h-10" : "inline-flex h-9 min-w-0 items-center gap-2 rounded-full ps-3 pe-2 text-sm font-medium text-text-primary transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]"} ${C ? "cursor-not-allowed opacity-50" : "hover:bg-bg-surface"}`,
121
+ "aria-describedby": C ? O : void 0,
122
+ title: C ? X : void 0,
123
+ onKeyDown: me,
124
+ onPointerDown: he,
125
+ className: `${E ? "inline-flex h-11 min-w-0 items-center gap-1.5 whitespace-nowrap rounded-full border border-border-default px-2.5 text-[13px] font-medium leading-tight text-text-primary transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] sm:h-10" : "inline-flex h-9 min-w-0 items-center gap-2 rounded-full ps-3 pe-2 text-sm font-medium text-text-primary transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]"} ${C ? "cursor-not-allowed opacity-50" : "hover:bg-bg-surface"}`,
123
126
  "data-testid": "assistant-mode-selector",
124
- "data-selected-mode-id": L,
127
+ "data-selected-mode-id": R,
125
128
  children: [
126
- /* @__PURE__ */ g(X, {
129
+ /* @__PURE__ */ h(Y, {
127
130
  className: "size-4 shrink-0 text-text-secondary",
128
131
  "aria-hidden": "true"
129
132
  }),
130
- /* @__PURE__ */ g("span", {
133
+ /* @__PURE__ */ h("span", {
131
134
  className: "truncate",
132
135
  children: W
133
136
  }),
134
- /* @__PURE__ */ g(ae, {
137
+ /* @__PURE__ */ h(p, {
135
138
  className: "size-4 shrink-0 text-text-muted",
136
139
  "aria-hidden": "true"
137
140
  })
138
141
  ]
139
142
  })
140
- }), /* @__PURE__ */ g(t, {
143
+ }), /* @__PURE__ */ h(t, {
141
144
  side: "top",
142
145
  align: "start",
143
- sideOffset: 8,
146
+ sideOffset: 10,
144
147
  collisionPadding: 8,
145
- onFocus: he,
146
- onCloseAutoFocus: J,
148
+ avoidCollisions: !1,
149
+ onFocus: ge,
150
+ onCloseAutoFocus: _e,
147
151
  onKeyDown: q,
148
- className: "w-72 max-w-[calc(100vw-2rem)] max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-y-auto",
152
+ className: "scrollbar-slim scrollbar-box w-72 max-w-[calc(100vw-2rem)] max-h-[min(22.5rem,var(--radix-dropdown-menu-content-available-height))] overflow-y-auto overscroll-contain",
149
153
  "data-testid": "assistant-mode-menu",
150
- children: /* @__PURE__ */ _(n, {
151
- value: L,
152
- onValueChange: ge,
153
- children: [F ? /* @__PURE__ */ g(r, {
154
+ children: /* @__PURE__ */ g(n, {
155
+ value: R,
156
+ onValueChange: ve,
157
+ children: [I ? /* @__PURE__ */ h(r, {
154
158
  ref: $(0),
155
- value: c,
159
+ value: s,
156
160
  onKeyDown: q,
157
- "aria-labelledby": `${O}-label-0`,
158
- "aria-describedby": `${O}-description-0`,
159
- className: Q,
161
+ "aria-labelledby": `${k}-label-0`,
162
+ "aria-describedby": `${k}-description-0`,
163
+ className: Z,
164
+ indicator: Q,
160
165
  "data-testid": "assistant-mode-auto",
161
- "data-auto-routed": z ? o : void 0,
162
- children: /* @__PURE__ */ _("span", {
166
+ "data-auto-routed": B ? a : void 0,
167
+ children: /* @__PURE__ */ g("span", {
163
168
  className: "flex min-w-0 flex-col",
164
- children: [/* @__PURE__ */ g("span", {
165
- id: `${O}-label-0`,
169
+ children: [/* @__PURE__ */ h("span", {
170
+ id: `${k}-label-0`,
166
171
  className: "font-medium",
167
- children: V
168
- }), /* @__PURE__ */ g("span", {
169
- id: `${O}-description-0`,
172
+ children: H
173
+ }), /* @__PURE__ */ h("span", {
174
+ id: `${k}-description-0`,
170
175
  className: "text-xs text-text-secondary",
171
176
  "data-testid": "assistant-mode-description",
172
- children: H
177
+ children: de
173
178
  })]
174
179
  })
175
180
  }) : null, b.map((e, t) => {
176
- let n = t + +!!F, i = e.shortDescription?.trim() ? te(E, ee(e.id), e.shortDescription) : null;
177
- return /* @__PURE__ */ g(r, {
181
+ let n = t + +!!I, i = e.shortDescription?.trim() ? o(D, ne(e.id), e.shortDescription) : null;
182
+ return /* @__PURE__ */ h(r, {
178
183
  ref: $(n),
179
184
  value: e.id,
180
185
  onKeyDown: q,
181
- "aria-labelledby": `${O}-label-${n}`,
182
- "aria-describedby": i ? `${O}-description-${n}` : void 0,
183
- className: Q,
186
+ "aria-labelledby": `${k}-label-${n}`,
187
+ "aria-describedby": i ? `${k}-description-${n}` : void 0,
188
+ className: Z,
189
+ indicator: Q,
184
190
  "data-testid": `assistant-mode-option-${e.id}`,
185
- children: /* @__PURE__ */ _("span", {
191
+ children: /* @__PURE__ */ g("span", {
186
192
  className: "flex min-w-0 flex-col",
187
- children: [/* @__PURE__ */ g("span", {
188
- id: `${O}-label-${n}`,
193
+ children: [/* @__PURE__ */ h("span", {
194
+ id: `${k}-label-${n}`,
189
195
  className: "font-medium",
190
- children: v(E, e)
191
- }), i ? /* @__PURE__ */ g("span", {
192
- id: `${O}-description-${n}`,
196
+ children: _(D, e)
197
+ }), i ? /* @__PURE__ */ h("span", {
198
+ id: `${k}-description-${n}`,
193
199
  className: "text-xs text-text-secondary",
194
200
  "data-testid": "assistant-mode-description",
195
201
  children: i
@@ -199,11 +205,11 @@ var y = ({ mode: y, availableModes: b, onModeChange: x, auto: S, disabled: C = !
199
205
  })]
200
206
  })
201
207
  })]
202
- }), C ? /* @__PURE__ */ g("span", {
203
- id: D,
208
+ }), C ? /* @__PURE__ */ h("span", {
209
+ id: O,
204
210
  className: "sr-only",
205
211
  "data-testid": "assistant-mode-disabled-reason",
206
- children: Z
212
+ children: X
207
213
  }) : null] });
208
214
  };
209
- export { y as AssistantModeMenu, v as assistantModeOptionName };
215
+ export { y as AssistantModeMenu, _ as assistantModeOptionName };
@@ -23,9 +23,4 @@ export declare const AssistantVoiceSessionButton: FC<{
23
23
  compact?: boolean;
24
24
  /** Keep the compact opener mounted for focus return while its session is live. */
25
25
  invisible?: boolean;
26
- /**
27
- * ★ BOFF-13461 (page): a secondary circle beside Send, the wave in the
28
- * assistant's blue, as the operator's design draws it.
29
- */
30
- secondary?: boolean;
31
26
  }>;
@@ -2,17 +2,17 @@ import { useAssistantTr as e } from "../../i18n.js";
2
2
  import { AudioLines as t } from "lucide-react";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
4
  // src/shared/assistant/ui/voice/AssistantVoiceSessionButton.tsx
5
- var r = ({ onStart: r, disabled: i = !1, compact: a = !1, invisible: o = !1, secondary: s = !1 }) => {
6
- let c = e();
5
+ var r = ({ onStart: r, disabled: i = !1, compact: a = !1, invisible: o = !1 }) => {
6
+ let s = e();
7
7
  return /* @__PURE__ */ n("button", {
8
8
  type: "button",
9
9
  onClick: r,
10
10
  disabled: i,
11
- className: s ? `flex size-11 shrink-0 items-center justify-center rounded-full border border-border-default text-status-info-bg transition-colors hover:bg-bg-sunken focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] disabled:cursor-not-allowed disabled:opacity-50 sm:size-10${o ? " invisible" : ""}` : a ? `flex size-11 shrink-0 items-center justify-center rounded-full bg-action-primary-bg text-action-primary-text transition-colors hover:bg-action-primary-bg-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] disabled:cursor-not-allowed disabled:opacity-50 sm:size-10${o ? " invisible" : ""}` : "flex size-9 flex-shrink-0 items-center justify-center rounded-full bg-bg-elevated text-text-secondary shadow-sm transition-all hover:scale-105 hover:bg-bg-raised hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:scale-100",
12
- "aria-label": c("voiceSession.start", "Start a voice conversation"),
13
- title: c("voiceSession.start", "Start a voice conversation"),
11
+ className: a ? `flex size-11 shrink-0 items-center justify-center rounded-full bg-action-primary-bg text-action-primary-text transition-colors hover:bg-action-primary-bg-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] disabled:cursor-not-allowed disabled:opacity-50 sm:size-10${o ? " invisible" : ""}` : "flex size-9 flex-shrink-0 items-center justify-center rounded-full bg-bg-elevated text-text-secondary shadow-sm transition-all hover:scale-105 hover:bg-bg-raised hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:scale-100",
12
+ "aria-label": s("voiceSession.start", "Start a voice conversation"),
13
+ title: s("voiceSession.start", "Start a voice conversation"),
14
14
  "data-testid": "assistant-voice-session-start",
15
- children: /* @__PURE__ */ n(t, { className: a || s ? "size-5" : "size-4" })
15
+ children: /* @__PURE__ */ n(t, { className: a ? "size-5" : "size-4" })
16
16
  });
17
17
  };
18
18
  export { r as AssistantVoiceSessionButton };