@burdenoff/fe-libs 2026.1029.11 → 2026.1030.2

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 (62) hide show
  1. package/dist/connections/ConnectionDetailsTab.d.ts +4 -1
  2. package/dist/connections/ConnectionDetailsTab.js +18 -15
  3. package/dist/connections/ConnectionDialog.d.ts +8 -2
  4. package/dist/connections/ConnectionDialog.js +18 -17
  5. package/dist/connections/ConnectionDialogPanel.d.ts +3 -1
  6. package/dist/connections/ConnectionDialogPanel.js +141 -135
  7. package/dist/connections/ShareConnectionDialog.d.ts +23 -0
  8. package/dist/connections/ShareConnectionDialog.js +146 -0
  9. package/dist/connections/SharePanels.d.ts +32 -0
  10. package/dist/connections/SharePanels.js +158 -0
  11. package/dist/connections/VisibilityChoice.d.ts +12 -0
  12. package/dist/connections/VisibilityChoice.js +60 -0
  13. package/dist/connections/api.d.ts +12 -1
  14. package/dist/connections/api.js +1 -1
  15. package/dist/connections/connectionFlow.d.ts +6 -1
  16. package/dist/connections/connectionFlow.js +1 -1
  17. package/dist/connections/index.d.ts +4 -1
  18. package/dist/connections/sharingApi.d.ts +28 -0
  19. package/dist/connections/sharingApi.js +215 -0
  20. package/dist/connections/types.d.ts +31 -0
  21. package/dist/connections/useConnectionSharingDraft.d.ts +40 -0
  22. package/dist/connections/useConnectionSharingDraft.js +93 -0
  23. package/dist/connections.js +12 -9
  24. package/dist/shared/assistant/i18nManifest.d.ts +18 -0
  25. package/dist/shared/assistant/i18nManifest.js +18 -0
  26. package/dist/shared/assistant/index.d.ts +4 -0
  27. package/dist/shared/assistant/ui/AIAssistantPanel.d.ts +9 -1
  28. package/dist/shared/assistant/ui/AIAssistantPanel.js +194 -174
  29. package/dist/shared/assistant/ui/AssistantChatArea.d.ts +33 -0
  30. package/dist/shared/assistant/ui/AssistantChatArea.js +1463 -1397
  31. package/dist/shared/assistant/ui/AssistantLanguageMenu.d.ts +9 -1
  32. package/dist/shared/assistant/ui/AssistantLanguageMenu.js +22 -22
  33. package/dist/shared/assistant/ui/AssistantOverlay.d.ts +16 -2
  34. package/dist/shared/assistant/ui/AssistantOverlay.js +219 -200
  35. package/dist/shared/assistant/ui/assistantOverlayState.d.ts +16 -2
  36. package/dist/shared/assistant/ui/assistantOverlayState.js +57 -40
  37. package/dist/shared/assistant/ui/compact/AssistantConversationMenu.js +53 -52
  38. package/dist/shared/assistant/ui/compact/AssistantDiscardDraftDialog.js +3 -4
  39. package/dist/shared/assistant/ui/compact/AssistantLanguagePill.d.ts +29 -0
  40. package/dist/shared/assistant/ui/compact/AssistantLanguagePill.js +98 -0
  41. package/dist/shared/assistant/ui/compact/AssistantVoiceReady.d.ts +31 -0
  42. package/dist/shared/assistant/ui/compact/AssistantVoiceReady.js +41 -0
  43. package/dist/shared/assistant/ui/compact/AssistantWaitingChangeRow.d.ts +6 -0
  44. package/dist/shared/assistant/ui/compact/AssistantWaitingChangeRow.js +5 -5
  45. package/dist/shared/assistant/ui/compact/AssistantWindowHeader.d.ts +22 -5
  46. package/dist/shared/assistant/ui/compact/AssistantWindowHeader.js +45 -31
  47. package/dist/shared/assistant/ui/compact/windowView.d.ts +50 -0
  48. package/dist/shared/assistant/ui/compact/windowView.js +31 -0
  49. package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts +6 -0
  50. package/dist/shared/assistant/ui/composer/AssistantComposer.js +90 -89
  51. package/dist/shared/assistant/ui/composer/AssistantModeMenu.d.ts +6 -0
  52. package/dist/shared/assistant/ui/composer/AssistantModeMenu.js +83 -83
  53. package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts +31 -0
  54. package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +270 -166
  55. package/dist/shared/assistant/ui/voice/VoiceStage.d.ts +8 -0
  56. package/dist/shared/assistant/ui/voice/VoiceStage.js +10 -10
  57. package/dist/shared/assistant/voice/voiceStartedCue.d.ts +11 -0
  58. package/dist/shared/assistant/voice/voiceStartedCue.js +7 -0
  59. package/dist/shared-assistant.js +266 -262
  60. package/dist/ui/modal-shell.d.ts +6 -1
  61. package/dist/ui/modal-shell.js +7 -6
  62. package/package.json +1 -1
@@ -1,70 +1,77 @@
1
- import { useReturnFocus as e } from "../../../hooks/useReturnFocus.js";
2
- import { useAssistantControl as t } from "../../appControls/useAssistantControl.js";
3
- import { useAssistantTr as n } from "../../i18n.js";
4
- import { micIsInterrupt as r, showsAssistantCaption as ee, voiceStageState as i } from "../../voice/voiceStageState.js";
5
- import { VOICE_THINKING_LABEL as a, composeVoiceStatus as te, voiceStatusSuffix as ne } from "../../voice/voiceStatus.js";
6
- import { spokenSoFar as re } from "../../voice/voiceSession.js";
7
- import { useAvatarCopy as ie } from "../../avatar/useAvatarCopy.js";
8
- import { ASSISTANT_PANEL_ATTR as ae, ASSISTANT_VOICE_SESSION_ATTR as oe } from "../panelOverlays.js";
9
- import { useLiveAvatarHandsFreeGuard as se, useLiveAvatarTab as ce, useLiveAvatarVoiceView as le } from "../assistantLiveAvatarSeam.js";
10
- import { AssistantAttachmentButton as ue } from "../composer/AssistantAttachmentButton.js";
11
- import { AssistantAttachmentChips as de } from "../composer/AssistantAttachmentChips.js";
12
- import { AssistantVoiceOrb as fe } from "./AssistantVoiceOrb.js";
13
- import { VoiceMiniController as pe } from "./VoiceMiniController.js";
14
- import { VoiceStage as me } from "./VoiceStage.js";
15
- import { VoiceTranscriptDrawer as he } from "./VoiceTranscriptDrawer.js";
16
- import { escapeBelongsToLayerAbove as ge, voiceSessionEscapeAction as _e } from "./voiceSessionEscape.js";
17
- import { HandsFreePrivacyNotice as ve } from "./HandsFreePrivacyNotice.js";
18
- import { useCallback as ye, useEffect as o, useMemo as be, useRef as s, useState as c } from "react";
19
- import { Maximize2 as xe, Minimize2 as Se, ScrollText as Ce, X as l } from "lucide-react";
20
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
1
+ import { focusWasDropped as e, useReturnFocus as t } from "../../../hooks/useReturnFocus.js";
2
+ import { useAssistantControl as n } from "../../appControls/useAssistantControl.js";
3
+ import { useAssistantTr as r } from "../../i18n.js";
4
+ import { micIsInterrupt as i, showsAssistantCaption as ee, voiceStageState as te } from "../../voice/voiceStageState.js";
5
+ import { VOICE_THINKING_LABEL as a, composeVoiceStatus as o, voiceStatusSuffix as s } from "../../voice/voiceStatus.js";
6
+ import { spokenSoFar as c } from "../../voice/voiceSession.js";
7
+ import { useAvatarCopy as l } from "../../avatar/useAvatarCopy.js";
8
+ import { ASSISTANT_PANEL_ATTR as ne, ASSISTANT_VOICE_SESSION_ATTR as re } from "../panelOverlays.js";
9
+ import { useLiveAvatarHandsFreeGuard as ie, useLiveAvatarTab as ae, useLiveAvatarVoiceView as oe } from "../assistantLiveAvatarSeam.js";
10
+ import { AssistantAttachmentButton as se } from "../composer/AssistantAttachmentButton.js";
11
+ import { AssistantAttachmentChips as ce } from "../composer/AssistantAttachmentChips.js";
12
+ import { AssistantVoiceOrb as le } from "./AssistantVoiceOrb.js";
13
+ import { VoiceMiniController as ue } from "./VoiceMiniController.js";
14
+ import { VoiceStage as de } from "./VoiceStage.js";
15
+ import { VoiceTranscriptDrawer as fe } from "./VoiceTranscriptDrawer.js";
16
+ import { escapeBelongsToLayerAbove as pe, voiceSessionEscapeAction as me } from "./voiceSessionEscape.js";
17
+ import { HandsFreePrivacyNotice as he } from "./HandsFreePrivacyNotice.js";
18
+ import { useCallback as ge, useEffect as u, useMemo as _e, useRef as d, useState as f } from "react";
19
+ import { Maximize2 as ve, Mic as ye, MicOff as be, Minimize2 as xe, ScrollText as Se, ShieldAlert as Ce, Square as we, X as p } from "lucide-react";
20
+ import { Fragment as Te, jsx as m, jsxs as h } from "react/jsx-runtime";
21
21
  //#region src/shared/assistant/ui/voice/AssistantVoiceSession.tsx
22
- var f = ({ session: f, turns: m = [], onSaveTranscript: Ee, onContinueInChat: De, notice: h = null, privacyNotice: g = null, spoken: _, onInterrupt: Oe, onToggleMute: v, attachments: y = [], onAttachFiles: ke, onRemoveAttachment: Ae, onRetryAttachment: je, canAttachMore: Me = !0, preparingAttachments: b = 0, attachmentsLocked: Ne = !1, attachmentNotice: x = null, spokenChunks: S = null, onEnd: C, capturing: Pe = !0, interrupting: Fe = !1, awaitingEndpoint: Ie = !1, holding: w = !1, correcting: Le = !1, onLetMeFinish: T, onImDone: E, proposalChip: D = null, proposalTray: O = null, renderAfterTurn: Re, onViewChange: k }) => {
23
- let A = n(), { muted: j, error: M } = f, N = s(null), P = s(null), [ze, F] = c("mini"), I = ce().open, [Be, Ve] = c(I);
24
- Be !== I && (Ve(I), I && ze !== "mini" && F("mini"));
25
- let L = le(ze, f.phase === "ended"), He = se();
26
- o(() => {
27
- k?.(L);
28
- }, [k, L]);
29
- let R = ie(), z = L === "full", B = L === "mini", V = L === "mini" ? "panel" : L === "panel" ? "full" : "mini", [H, U] = c(!1);
30
- t("assistant.transcript", be(() => ({ run: () => H ? { status: "already" } : (U(!0), { status: "done" }) }), [H]));
31
- let W = O !== null && !B, G = s(!1), K = s(v);
32
- K.current = v;
33
- let q = ye(() => {
34
- f.phase !== "listening" && f.phase !== "thinking" || j || G.current || re(f) || (G.current = !0, K.current());
35
- }, [j, f]), J = ye(() => {
22
+ var g = ({ session: g, turns: Oe = [], onSaveTranscript: Ae, onContinueInChat: je, notice: _ = null, privacyNotice: v = null, spoken: Me, onInterrupt: Ne, onToggleMute: y, attachments: Pe = [], onAttachFiles: b, onRemoveAttachment: Fe, onRetryAttachment: Ie, canAttachMore: Le = !0, preparingAttachments: Re = 0, attachmentsLocked: x = !1, attachmentNotice: S = null, spokenChunks: ze = null, onEnd: C, capturing: Be = !0, interrupting: Ve = !1, awaitingEndpoint: He = !1, holding: w = !1, correcting: Ue = !1, onLetMeFinish: We, onImDone: Ge, proposalChip: T = null, proposalTray: E = null, renderAfterTurn: Ke, onViewChange: qe, view: D, startedCue: O }) => {
23
+ let k = r(), { muted: A, error: j } = g, M = d(null), N = d(null), [Je, P] = f("mini"), Ye = D !== void 0, F = D === "compact", [I, Xe] = f(D);
24
+ I !== D && (Xe(D), D === void 0 && I !== void 0 && P(I === "compact" ? "panel" : I));
25
+ let Ze = D === void 0 ? Je : D === "compact" ? "panel" : D, L = ae().open, [Qe, $e] = f(L);
26
+ Qe !== L && ($e(L), L && Je !== "mini" && P("mini"));
27
+ let R = oe(Ze, g.phase === "ended"), et = ie();
28
+ u(() => {
29
+ qe?.(R);
30
+ }, [qe, R]);
31
+ let tt = l(), z = R === "full", B = R === "mini", V = R === "mini" ? "panel" : R === "panel" ? "full" : "mini", [H, U] = f(!1);
32
+ n("assistant.transcript", _e(() => ({ run: () => H ? { status: "already" } : (U(!0), { status: "done" }) }), [H]));
33
+ let W = E !== null && !B, G = d(!1), K = d(y);
34
+ K.current = y;
35
+ let q = ge(() => {
36
+ g.phase !== "listening" && g.phase !== "thinking" || A || G.current || c(g) || (G.current = !0, K.current());
37
+ }, [A, g]), J = ge(() => {
36
38
  G.current && (G.current = !1, K.current());
37
- }, []), Ue = q;
38
- o(() => {
39
+ }, []), nt = q;
40
+ u(() => {
39
41
  let e = () => {
40
42
  document.visibilityState === "hidden" ? q() : J();
41
43
  };
42
44
  return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
43
- }, [q, J]), o(() => {
45
+ }, [q, J]), u(() => {
44
46
  let e = J;
45
47
  return window.addEventListener("focus", e), () => {
46
48
  window.removeEventListener("focus", e), G.current = !1;
47
49
  };
48
- }, []), o(() => {
49
- document.activeElement?.closest("[data-hands-free-notice]") || N.current?.focus();
50
- }, []), e(P, { fallbackSelector: `[${ae}]` }), o(() => {
50
+ }, []), u(() => {
51
+ document.activeElement?.closest("[data-hands-free-notice]") || M.current?.focus();
52
+ }, []), t(N, { fallbackSelector: `[${ne}]` });
53
+ let rt = d(F);
54
+ u(() => {
55
+ let t = rt.current;
56
+ rt.current = F, !(!t || F || !e(document)) && (N.current?.querySelector("[data-testid=\"assistant-voice-transcript-close\"]") ?? M.current)?.focus({ preventScroll: !0 });
57
+ }, [F]), u(() => {
51
58
  let e = (e) => {
52
59
  if (e.key === "Escape") {
53
- let t = _e({
60
+ let t = me({
54
61
  defaultPrevented: e.defaultPrevented,
55
- layerAbove: ge({
62
+ layerAbove: pe({
56
63
  target: e.target,
57
- session: P.current,
64
+ session: N.current,
58
65
  doc: document
59
66
  }),
60
67
  transcriptOpen: H
61
68
  });
62
69
  if (t === "ignore") return;
63
- e.preventDefault(), t === "close-transcript" ? U(!1) : g ? g.decline() : W ? O?.onClose() : C();
70
+ e.preventDefault(), t === "close-transcript" ? U(!1) : v ? v.decline() : W ? E?.onClose() : C();
64
71
  return;
65
72
  }
66
73
  if (e.key !== "Tab" || !z) return;
67
- let t = (H ? P.current?.querySelector("[data-testid=\"assistant-voice-transcript\"]") : P.current)?.querySelectorAll("button:not([disabled])");
74
+ let t = (H ? N.current?.querySelector("[data-testid=\"assistant-voice-transcript\"]") : N.current)?.querySelectorAll("button:not([disabled])");
68
75
  if (!t || t.length === 0) return;
69
76
  let n = t[0], r = t[t.length - 1];
70
77
  !n || !r || (e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus()));
@@ -75,228 +82,325 @@ var f = ({ session: f, turns: m = [], onSaveTranscript: Ee, onContinueInChat: De
75
82
  z,
76
83
  H,
77
84
  W,
78
- O,
79
- g
85
+ E,
86
+ v
80
87
  ]);
81
- let Y = h !== null && M === null, X = He && h === null && M === null, We = re(f), Z = T && E && f.phase === "listening" && !j && M === null ? {
82
- letMeFinish: T,
83
- imDone: E
84
- } : null, Ge = Z !== null;
85
- o(() => {
86
- if (Ge) return;
88
+ let Y = _ !== null && j === null, X = et && _ === null && j === null, it = c(g), Z = We && Ge && g.phase === "listening" && !A && j === null ? {
89
+ letMeFinish: We,
90
+ imDone: Ge
91
+ } : null, at = Z !== null;
92
+ u(() => {
93
+ if (at) return;
87
94
  let e = document.activeElement;
88
- (!e || e === document.body) && N.current?.focus();
89
- }, [Ge]);
90
- let Q = i({
91
- snapshot: f,
92
- capturing: Pe,
93
- interrupting: Fe,
94
- awaitingEndpoint: Ie
95
- }), Ke = (() => {
95
+ (!e || e === document.body) && M.current?.focus();
96
+ }, [at]);
97
+ let Q = te({
98
+ snapshot: g,
99
+ capturing: Be,
100
+ interrupting: Ve,
101
+ awaitingEndpoint: He
102
+ }), ot = (() => {
96
103
  switch (Q) {
97
- case "connecting": return A("voiceSession.connecting", "Starting the microphone…");
98
- case "endpoint-grace": return A("voiceSession.endpointGrace", "Still listening — take your time");
99
- case "interrupting": return A("voiceSession.interrupting", "Stopped — go ahead");
100
- case "thinking": return A(a.key, a.fallback);
101
- case "speaking": return A("voiceSession.speaking", "Speaking — tap to stop");
104
+ case "connecting": return k("voiceSession.connecting", "Starting the microphone…");
105
+ case "endpoint-grace": return k("voiceSession.endpointGrace", "Still listening — take your time");
106
+ case "interrupting": return k("voiceSession.interrupting", "Stopped — go ahead");
107
+ case "thinking": return k(a.key, a.fallback);
108
+ case "speaking": return k("voiceSession.speaking", "Speaking — tap to stop");
102
109
  case "mic-error":
103
110
  case "ended": return "";
104
- case "listening": return j ? A("voiceSession.muted", "Microphone off") : A("voiceSession.listening", "Listening…");
111
+ case "listening": return A ? k("voiceSession.muted", "Microphone off") : k("voiceSession.listening", "Listening…");
105
112
  default: return Q;
106
113
  }
107
- })(), qe = !j && (Q === "listening" || Q === "endpoint-grace"), Je = qe && w ? A("voiceSession.holding", "Take your time — tap “I’m done” when you finish") : qe && Le ? A("voiceSession.correcting", "Stopped that answer — listening to your correction") : Ke, $ = ne({
108
- tr: A,
114
+ })(), st = !A && (Q === "listening" || Q === "endpoint-grace"), ct = st && w ? k("voiceSession.holding", "Take your time — tap “I’m done” when you finish") : st && Ue ? k("voiceSession.correcting", "Stopped that answer — listening to your correction") : ot, $ = s({
115
+ tr: k,
109
116
  stage: Q,
110
- muted: j,
111
- label: Je
112
- }), Ye = te(Je, $), Xe = Q === "thinking";
113
- return /* @__PURE__ */ d("div", {
114
- ref: P,
115
- className: `flex flex-col items-center justify-between bg-bg-sunken ${L === "full" ? "fixed inset-x-0 bottom-0 top-14 z-[60] px-6 py-8" : L === "panel" ? "absolute inset-0 z-20 px-4 py-6" : "absolute inset-x-0 bottom-0 z-20 min-h-[11.25rem] border-t border-border-subtle px-3 py-3 shadow-lg"}`,
117
+ muted: A,
118
+ label: ct
119
+ }), lt = o(ct, $), ut = Q === "thinking";
120
+ return /* @__PURE__ */ h("div", {
121
+ ref: N,
122
+ className: `flex flex-col ${F ? "items-stretch" : "items-center"} justify-between ${F ? "bg-bg-elevated" : "bg-bg-sunken"} ${F ? "absolute inset-0 z-20 px-3 pb-3 pt-2" : R === "full" ? "fixed inset-x-0 bottom-0 top-14 z-[60] px-6 py-8" : R === "panel" ? "absolute inset-0 z-20 px-4 py-6" : "absolute inset-x-0 bottom-0 z-20 min-h-[11.25rem] border-t border-border-subtle px-3 py-3 shadow-lg"}`,
116
123
  role: "dialog",
117
124
  "aria-modal": z || void 0,
118
- "aria-label": A("voiceSession.title", "Voice conversation"),
125
+ "aria-label": k("voiceSession.title", "Voice conversation"),
119
126
  "data-testid": "assistant-voice-session",
120
- [oe]: "",
127
+ [re]: "",
121
128
  children: [
122
- /* @__PURE__ */ d("button", {
123
- ref: N,
129
+ F ? null : /* @__PURE__ */ h("button", {
130
+ ref: M,
124
131
  type: "button",
125
132
  onClick: C,
126
133
  className: `absolute ${z ? "right-6 top-6 h-14 gap-2 px-5 text-base" : B ? "right-12 top-2 h-8 gap-1.5 px-2.5 text-xs" : "right-3 top-3 h-11 gap-2 px-4 text-sm"} flex items-center justify-center rounded-full border border-border-default bg-bg-elevated text-text-secondary hover:bg-bg-sunken transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong`,
127
- title: A("voiceSession.end", "End the voice conversation"),
134
+ title: k("voiceSession.end", "End the voice conversation"),
128
135
  "data-testid": "assistant-voice-end",
129
- children: [/* @__PURE__ */ u(l, {
136
+ children: [/* @__PURE__ */ m(p, {
130
137
  className: z ? "size-6" : B ? "size-4" : "size-5",
131
138
  "aria-hidden": "true"
132
- }), /* @__PURE__ */ u("span", {
139
+ }), /* @__PURE__ */ m("span", {
133
140
  className: `truncate whitespace-nowrap font-medium ${B ? "max-w-[3.5rem] text-xs" : "max-w-[7rem]"}`,
134
- children: A("voiceSession.endShort", "End")
141
+ children: k("voiceSession.endShort", "End")
135
142
  })]
136
143
  }),
137
- /* @__PURE__ */ d("div", {
138
- className: `flex flex-col items-center ${B ? `px-3 ${Y || X || x ? "pt-9 pb-2" : ""}` : `min-h-[1.5rem] ${Y || X || x ? z ? "pt-14" : "pt-10" : ""}`}`,
144
+ /* @__PURE__ */ h("div", {
145
+ className: `flex flex-col items-center ${F ? "min-h-[1.5rem]" : B ? `px-3 ${Y || X || S ? "pt-9 pb-2" : ""}` : `min-h-[1.5rem] ${Y || X || S ? z ? "pt-14" : "pt-10" : ""}`}`,
139
146
  children: [
140
- Y ? /* @__PURE__ */ u("p", {
147
+ Y ? /* @__PURE__ */ m("p", {
141
148
  className: "max-w-xs text-center text-xs text-status-warning",
142
149
  "data-testid": "assistant-voice-notice",
143
- children: p(h, A)
150
+ children: Ee(_, k)
144
151
  }) : null,
145
- X ? /* @__PURE__ */ u("p", {
152
+ X ? /* @__PURE__ */ m("p", {
146
153
  className: "max-w-xs text-center text-xs text-text-secondary",
147
154
  "data-testid": "assistant-voice-avatar-hands-free",
148
- children: R.handsFreeOff
155
+ children: tt.handsFreeOff
149
156
  }) : null,
150
- /* @__PURE__ */ u("span", {
157
+ /* @__PURE__ */ m("span", {
151
158
  className: "sr-only start-0 top-0",
152
159
  role: "status",
153
160
  "aria-live": "polite",
154
161
  "aria-atomic": "true",
155
162
  "data-testid": "assistant-voice-notice-announced",
156
- children: Y && we(h) ? p(h, A) : X ? R.handsFreeOff : null
163
+ children: Y && De(_) ? Ee(_, k) : X ? tt.handsFreeOff : null
157
164
  }),
158
- x ? /* @__PURE__ */ u("p", {
165
+ S ? /* @__PURE__ */ m("p", {
159
166
  className: "max-w-xs text-center text-xs text-status-warning",
160
167
  role: "status",
161
168
  "aria-live": "polite",
162
169
  "data-testid": "assistant-voice-attachment-notice",
163
- children: x
164
- }) : null
170
+ children: S
171
+ }) : null,
172
+ O === void 0 ? null : /* @__PURE__ */ h(Te, { children: [O ? /* @__PURE__ */ m("p", {
173
+ className: "max-w-xs text-center text-xs text-text-secondary",
174
+ "data-testid": "assistant-voice-started-cue",
175
+ children: O
176
+ }) : null, /* @__PURE__ */ m("span", {
177
+ className: "sr-only start-0 top-0",
178
+ role: "status",
179
+ "aria-live": "polite",
180
+ "aria-atomic": "true",
181
+ "data-testid": "assistant-voice-started-cue-announced",
182
+ children: O
183
+ })] })
165
184
  ]
166
185
  }),
167
186
  (() => {
168
- let e = /* @__PURE__ */ u(fe, {
169
- session: f,
187
+ let e = /* @__PURE__ */ m(le, {
188
+ session: g,
170
189
  compact: B,
171
190
  connecting: Q === "connecting",
172
- onPress: r(Q) ? Oe : v,
173
- label: r(Q) ? A("voiceSession.interrupt", "Stop the assistant and speak") : j ? A("voiceSession.unmute", "Turn the microphone on") : A("voiceSession.mute", "Turn the microphone off")
174
- }), t = Z ? /* @__PURE__ */ u("button", {
191
+ onPress: i(Q) ? Ne : y,
192
+ label: i(Q) ? k("voiceSession.interrupt", "Stop the assistant and speak") : A ? k("voiceSession.unmute", "Turn the microphone on") : k("voiceSession.mute", "Turn the microphone off")
193
+ }), t = Z ? /* @__PURE__ */ m("button", {
175
194
  type: "button",
176
195
  onClick: w ? Z.imDone : Z.letMeFinish,
177
196
  className: `flex items-center justify-center rounded-full border font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong ${B ? "h-7 px-3 text-xs" : z ? "h-11 px-6 text-base" : "h-9 px-4 text-sm"} ${w ? "border-transparent bg-action-primary-bg text-action-primary-text hover:opacity-90" : "border-border-default bg-bg-elevated text-text-secondary hover:bg-bg-sunken"}`,
178
- title: w ? A("voiceSession.imDoneHint", "Send what you said now") : A("voiceSession.letMeFinishHint", "Pause sending until you tap “I’m done”"),
197
+ title: w ? k("voiceSession.imDoneHint", "Send what you said now") : k("voiceSession.letMeFinishHint", "Pause sending until you tap “I’m done”"),
179
198
  "data-testid": "assistant-voice-hold",
180
199
  "data-holding": w ? "true" : "false",
181
- children: w ? A("voiceSession.imDone", "I’m done") : A("voiceSession.letMeFinish", "Let me finish")
182
- }) : null, n = t ? /* @__PURE__ */ d("div", {
200
+ children: w ? k("voiceSession.imDone", "I’m done") : k("voiceSession.letMeFinish", "Let me finish")
201
+ }) : null, n = i(Q), r = n ? Ne : y, te = g.phase === "idle" || g.phase === "ended" || j !== null || Q === "connecting" || !r, a = F ? /* @__PURE__ */ h("button", {
202
+ type: "button",
203
+ onClick: r,
204
+ disabled: te,
205
+ className: "flex h-11 items-center justify-center gap-2 rounded-full border border-border-default bg-bg-elevated px-6 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] disabled:cursor-default disabled:text-text-muted disabled:hover:bg-bg-elevated",
206
+ "data-testid": "assistant-voice-primary",
207
+ "data-state": Q,
208
+ "data-muted": A || void 0,
209
+ children: [n ? /* @__PURE__ */ m(we, {
210
+ className: "size-4 fill-current",
211
+ "aria-hidden": "true"
212
+ }) : m(A ? be : ye, {
213
+ className: "size-4",
214
+ "aria-hidden": "true"
215
+ }), n ? k("window.stopSpeaking", "Stop speaking") : A ? k("window.unmute", "Unmute") : k("window.mute", "Mute")]
216
+ }) : null, o = t ? /* @__PURE__ */ h("div", {
183
217
  className: "flex flex-col items-center gap-2",
184
218
  children: [e, t]
185
- }) : e, i = ee(Q) ? _ : We || null, a = M === null ? null : Te(M, A);
186
- return B ? /* @__PURE__ */ u(pe, {
187
- spokenChunks: S,
219
+ }) : e, s = F ? /* @__PURE__ */ h("div", {
220
+ className: "flex flex-col items-center gap-2",
221
+ children: [t, a]
222
+ }) : void 0, c = ee(Q) ? Me : it || null, l = j === null ? null : ke(j, k);
223
+ return B ? /* @__PURE__ */ m(ue, {
224
+ spokenChunks: ze,
188
225
  state: Q,
189
- caption: i,
190
- statusText: Ye,
226
+ caption: c,
227
+ statusText: lt,
191
228
  statusSuffix: $,
192
- rotateStatus: Xe,
193
- errorText: a,
194
- control: n
195
- }) : /* @__PURE__ */ u(me, {
229
+ rotateStatus: ut,
230
+ errorText: l,
231
+ control: o
232
+ }) : /* @__PURE__ */ m(de, {
196
233
  state: Q,
197
- userCaption: We || null,
198
- spokenChunks: S,
199
- assistantCaption: _,
234
+ userCaption: it || null,
235
+ spokenChunks: ze,
236
+ assistantCaption: Me,
200
237
  expanded: z,
201
- statusText: Ye,
238
+ statusText: lt,
202
239
  statusSuffix: $,
203
- rotateStatus: Xe,
204
- errorText: a,
205
- control: n
240
+ rotateStatus: ut,
241
+ errorText: l,
242
+ control: o,
243
+ compact: F || void 0,
244
+ compactControl: s
206
245
  });
207
246
  })(),
208
- D && !W ? /* @__PURE__ */ u("div", {
247
+ T && !W && !F ? /* @__PURE__ */ m("div", {
209
248
  className: B ? "absolute left-20 right-36 top-2 flex justify-center" : `flex w-full justify-center ${z ? "max-w-[calc(100%-12rem)]" : "max-w-[calc(100%-8rem)]"}`,
210
- children: /* @__PURE__ */ u("button", {
249
+ children: /* @__PURE__ */ m("button", {
211
250
  type: "button",
212
251
  onClick: () => {
213
- F("panel"), D.onOpen();
252
+ P("panel"), T.onOpen();
214
253
  },
215
254
  className: `max-w-full truncate rounded-full border border-border-default bg-bg-elevated font-medium text-text-primary transition-colors hover:bg-bg-raised focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong ${B ? "h-8 px-3 text-xs" : "h-10 px-4 text-sm"}`,
216
255
  "data-testid": "assistant-voice-proposal-chip",
217
- children: D.label
256
+ children: T.label
218
257
  })
219
258
  }) : null,
220
- O && W ? /* @__PURE__ */ d("div", {
259
+ T && F ? /* @__PURE__ */ h("div", {
260
+ className: "flex min-h-11 w-full items-center gap-2 rounded-xl border border-status-warning bg-status-warning/10 px-3 py-1",
261
+ "data-testid": "assistant-voice-proposal-chip-row",
262
+ children: [
263
+ /* @__PURE__ */ m(Ce, {
264
+ className: "size-4 shrink-0 text-status-warning",
265
+ "aria-hidden": "true"
266
+ }),
267
+ T.status ? /* @__PURE__ */ m("p", {
268
+ role: "status",
269
+ "aria-live": "polite",
270
+ className: "min-w-0 flex-1 text-sm text-text-primary",
271
+ "data-testid": "assistant-voice-proposal-status",
272
+ children: T.status
273
+ }) : /* @__PURE__ */ m("span", { className: "flex-1" }),
274
+ /* @__PURE__ */ m("button", {
275
+ type: "button",
276
+ onClick: T.onOpen,
277
+ className: "min-h-9 shrink-0 rounded-button px-3 text-sm font-medium text-action-primary-bg transition-colors hover:bg-bg-sunken focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
278
+ "data-testid": "assistant-voice-proposal-chip",
279
+ children: T.label
280
+ })
281
+ ]
282
+ }) : null,
283
+ E && W ? /* @__PURE__ */ h("div", {
221
284
  className: `absolute z-10 flex flex-col gap-2 overflow-y-auto rounded-lg border border-border-subtle bg-bg-elevated shadow-lg ${z ? "inset-x-6 bottom-24 top-24 mx-auto max-w-xl p-4" : "inset-x-3 bottom-16 top-16 p-3"}`,
222
285
  "data-testid": "assistant-voice-proposal-tray",
223
- children: [/* @__PURE__ */ u("div", {
286
+ children: [/* @__PURE__ */ m("div", {
224
287
  className: "flex justify-end",
225
- children: /* @__PURE__ */ u("button", {
288
+ children: /* @__PURE__ */ m("button", {
226
289
  type: "button",
227
- onClick: O.onClose,
290
+ onClick: E.onClose,
228
291
  className: "flex size-8 items-center justify-center rounded-full text-text-secondary transition-colors hover:bg-bg-raised hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong",
229
- "aria-label": O.closeLabel,
292
+ "aria-label": E.closeLabel,
230
293
  "data-testid": "assistant-voice-proposal-tray-close",
231
- children: /* @__PURE__ */ u(l, {
294
+ children: /* @__PURE__ */ m(p, {
232
295
  className: "size-4",
233
296
  "aria-hidden": "true"
234
297
  })
235
298
  })
236
- }), O.content]
299
+ }), E.content]
237
300
  }) : null,
238
- g ? /* @__PURE__ */ u(ve, {
239
- view: L,
240
- onContinue: g.accept,
241
- onNotNow: g.decline
301
+ v ? /* @__PURE__ */ m(he, {
302
+ view: R,
303
+ onContinue: v.accept,
304
+ onNotNow: v.decline
242
305
  }) : null,
243
- H ? /* @__PURE__ */ u(he, {
244
- turns: m,
306
+ H ? /* @__PURE__ */ m(fe, {
307
+ turns: Oe,
245
308
  onClose: () => U(!1),
246
- onSave: Ee,
247
- onContinueInChat: De,
248
- renderAfterTurn: Re
309
+ onSave: Ae,
310
+ onContinueInChat: je,
311
+ renderAfterTurn: Ke
249
312
  }) : null,
250
- ke ? /* @__PURE__ */ u("div", {
313
+ b && !F ? /* @__PURE__ */ m("div", {
251
314
  className: `absolute ${z ? "left-6 top-6" : B ? "left-11 top-2" : "left-3 top-3"}`,
252
- children: /* @__PURE__ */ u(ue, {
315
+ children: /* @__PURE__ */ m(se, {
253
316
  onFiles: (e) => {
254
- ke(e), F((e) => e === "mini" ? "panel" : e);
317
+ b(e), Ye || P((e) => e === "mini" ? "panel" : e);
255
318
  },
256
- onPickerOpen: Ue,
319
+ onPickerOpen: nt,
257
320
  direction: "down",
258
- canAddMore: Me,
259
- disabled: Ne
321
+ canAddMore: Le,
322
+ disabled: x
260
323
  })
261
324
  }) : null,
262
- (y.length > 0 || b > 0) && !B ? /* @__PURE__ */ u("div", {
263
- className: `absolute ${z ? "bottom-24 left-24 right-24" : "bottom-16 left-16 right-16"}`,
325
+ (Pe.length > 0 || Re > 0) && !B ? /* @__PURE__ */ m("div", {
326
+ className: F ? "w-full" : `absolute ${z ? "bottom-24 left-24 right-24" : "bottom-16 left-16 right-16"}`,
264
327
  "data-testid": "assistant-voice-attachments",
265
- children: /* @__PURE__ */ u(de, {
266
- attachments: y,
267
- onRemove: Ae ?? (() => void 0),
268
- onRetry: je ?? (() => void 0),
269
- preparingCount: b,
270
- disabled: Ne
328
+ children: /* @__PURE__ */ m(ce, {
329
+ attachments: Pe,
330
+ onRemove: Fe ?? (() => void 0),
331
+ onRetry: Ie ?? (() => void 0),
332
+ preparingCount: Re,
333
+ disabled: x
271
334
  })
272
335
  }) : null,
273
- /* @__PURE__ */ u("button", {
336
+ F ? null : /* @__PURE__ */ m("button", {
274
337
  type: "button",
275
338
  onClick: () => U((e) => !e),
276
339
  className: `absolute ${z ? "bottom-6 right-6 size-14" : B ? "right-2 top-2 size-8" : "bottom-3 right-3 size-11"} flex items-center justify-center rounded-full bg-bg-elevated text-text-secondary transition-colors hover:bg-bg-raised hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong`,
277
340
  "aria-pressed": H,
278
- "aria-label": A("voiceSession.transcriptTitle", "Voice transcript"),
341
+ "aria-label": k("voiceSession.transcriptTitle", "Voice transcript"),
279
342
  "data-testid": "assistant-voice-transcript-toggle",
280
- children: /* @__PURE__ */ u(Ce, { className: z ? "size-6" : B ? "size-4" : "size-5" })
343
+ children: /* @__PURE__ */ m(Se, { className: z ? "size-6" : B ? "size-4" : "size-5" })
281
344
  }),
282
- /* @__PURE__ */ u("button", {
345
+ Ye ? null : /* @__PURE__ */ m("button", {
283
346
  type: "button",
284
- onClick: () => F(V),
347
+ onClick: () => P(V),
285
348
  className: `absolute ${z ? "bottom-6 left-6 size-14" : B ? "left-2 top-2 size-8" : "bottom-3 left-3 size-11"} flex items-center justify-center rounded-full bg-bg-elevated text-text-secondary transition-colors hover:bg-bg-raised hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong`,
286
- "aria-label": V === "panel" ? A("voiceSession.expandPanel", "Show the conversation in the panel") : V === "full" ? A("voiceSession.expand", "Expand the conversation to full screen") : A("voiceSession.collapse", "Shrink to the compact controller"),
349
+ "aria-label": V === "panel" ? k("voiceSession.expandPanel", "Show the conversation in the panel") : V === "full" ? k("voiceSession.expand", "Expand the conversation to full screen") : k("voiceSession.collapse", "Shrink to the compact controller"),
287
350
  "data-testid": "assistant-voice-expand",
288
- children: z ? /* @__PURE__ */ u(Se, { className: "size-5" }) : /* @__PURE__ */ u(xe, { className: B ? "size-4" : "size-5" })
289
- })
351
+ children: z ? /* @__PURE__ */ m(xe, { className: "size-5" }) : /* @__PURE__ */ m(ve, { className: B ? "size-4" : "size-5" })
352
+ }),
353
+ F ? /* @__PURE__ */ h("div", {
354
+ className: "flex w-full items-center gap-2 pt-2",
355
+ "data-testid": "assistant-voice-controls",
356
+ children: [
357
+ b ? /* @__PURE__ */ m(se, {
358
+ onFiles: (e) => b(e),
359
+ onPickerOpen: nt,
360
+ direction: "up",
361
+ canAddMore: Le,
362
+ disabled: x
363
+ }) : null,
364
+ /* @__PURE__ */ h("button", {
365
+ type: "button",
366
+ onClick: () => U((e) => !e),
367
+ className: "flex h-10 min-w-0 flex-1 items-center justify-center gap-2 rounded-full border border-border-default bg-bg-elevated px-3 text-sm 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)]",
368
+ "aria-expanded": H,
369
+ "data-testid": "assistant-voice-transcript-toggle",
370
+ children: [/* @__PURE__ */ m(Se, {
371
+ className: "size-4 shrink-0",
372
+ "aria-hidden": "true"
373
+ }), /* @__PURE__ */ m("span", {
374
+ className: "truncate",
375
+ children: H ? k("window.hideTranscript", "Hide transcript") : k("window.showTranscript", "Show transcript")
376
+ })]
377
+ }),
378
+ /* @__PURE__ */ h("button", {
379
+ ref: M,
380
+ type: "button",
381
+ onClick: C,
382
+ className: "flex h-10 min-w-0 flex-1 items-center justify-center gap-2 rounded-full border border-status-error-border bg-status-error-bg-subtle px-3 text-sm font-medium text-status-error-text transition-colors hover:opacity-90 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
383
+ "data-testid": "assistant-voice-end",
384
+ children: [/* @__PURE__ */ m(p, {
385
+ className: "size-4 shrink-0",
386
+ "aria-hidden": "true"
387
+ }), /* @__PURE__ */ m("span", {
388
+ className: "truncate",
389
+ children: k("window.endVoice", "End voice")
390
+ })]
391
+ })
392
+ ]
393
+ }) : null
290
394
  ]
291
395
  });
292
396
  };
293
- function p(e, t) {
294
- return typeof e == "string" ? m(e, t) : e.text;
397
+ function Ee(e, t) {
398
+ return typeof e == "string" ? Oe(e, t) : e.text;
295
399
  }
296
- function we(e) {
400
+ function De(e) {
297
401
  return e !== null && (typeof e != "string" || e === "reply-not-heard");
298
402
  }
299
- function m(e, t) {
403
+ function Oe(e, t) {
300
404
  switch (e) {
301
405
  case "network": return t("voiceSession.noticeNetwork", "Speech recognition lost its connection. Check your network — it will retry.");
302
406
  case "not-capturing": return t("voiceSession.noticeNotCapturing", "The microphone did not start. Check that this site is allowed to use it, then try again.");
@@ -308,7 +412,7 @@ function m(e, t) {
308
412
  default: return e;
309
413
  }
310
414
  }
311
- function Te(e, t) {
415
+ function ke(e, t) {
312
416
  switch (e) {
313
417
  case "mic-denied": return t("voiceSession.micDenied", "Microphone access is blocked. Allow it in your browser settings to talk.");
314
418
  case "no-speech-support": return t("voiceSession.noSpeechSupport", "This browser cannot listen. Try a different browser, or type instead.");
@@ -317,4 +421,4 @@ function Te(e, t) {
317
421
  }
318
422
  }
319
423
  //#endregion
320
- export { f as AssistantVoiceSession };
424
+ export { g as AssistantVoiceSession };
@@ -48,6 +48,14 @@ interface Props {
48
48
  chunks: string[];
49
49
  index: number;
50
50
  } | null;
51
+ /**
52
+ * BOFF-10180: the Quick assistant window's stage. Nothing sits in its corners, so
53
+ * the side reserve the docked and full stages keep for them is not kept: the
54
+ * column is the whole 360 px less its padding. Absent: as before.
55
+ */
56
+ compact?: boolean;
57
+ /** With `compact`: the control drawn in place of `control` (named buttons, not the orb). */
58
+ compactControl?: ReactNode;
51
59
  }
52
60
  export declare const VoiceStage: FC<Props>;
53
61
  export {};