@burdenoff/fe-libs 2026.922.3 → 2026.923.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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantVoiceSession.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/voice/AssistantVoiceSession.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAI1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAgB7D,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,gFAAgF;AAChF,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAElD,UAAU,KAAK;IACb,OAAO,EAAE,oBAAoB,CAAC;IAC9B,iEAAiE;IACjE,KAAK,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;IAC3C,wCAAwC;IACxC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,6EAA6E;IAC7E,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACnC,gEAAgE;IAChE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACpC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAC;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
|
2
2
|
import { micIsInterrupt as t, showsAssistantCaption as n, voiceStageState as r } from "../../voice/voiceStageState.js";
|
|
3
|
-
import { VOICE_THINKING_LABEL as i, composeVoiceStatus as
|
|
4
|
-
import { spokenSoFar as
|
|
5
|
-
import { AssistantAttachmentButton as
|
|
6
|
-
import { AssistantAttachmentChips as
|
|
7
|
-
import { AssistantVoiceOrb as
|
|
3
|
+
import { VOICE_THINKING_LABEL as i, composeVoiceStatus as ee, voiceStatusSuffix as te } from "../../voice/voiceStatus.js";
|
|
4
|
+
import { spokenSoFar as a } from "../../voice/voiceSession.js";
|
|
5
|
+
import { AssistantAttachmentButton as o } from "../composer/AssistantAttachmentButton.js";
|
|
6
|
+
import { AssistantAttachmentChips as ne } from "../composer/AssistantAttachmentChips.js";
|
|
7
|
+
import { AssistantVoiceOrb as s } from "./AssistantVoiceOrb.js";
|
|
8
8
|
import { VoiceMiniController as c } from "./VoiceMiniController.js";
|
|
9
9
|
import { VoiceStage as l } from "./VoiceStage.js";
|
|
10
10
|
import { VoiceTranscriptDrawer as u } from "./VoiceTranscriptDrawer.js";
|
|
11
11
|
import { useCallback as d, useEffect as f, useRef as p, useState as m } from "react";
|
|
12
|
-
import { Maximize2 as re, Minimize2 as
|
|
13
|
-
import { jsx as
|
|
12
|
+
import { Maximize2 as re, Minimize2 as h, ScrollText as g, X as _ } from "lucide-react";
|
|
13
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
14
14
|
//#region src/shared/assistant/ui/voice/AssistantVoiceSession.tsx
|
|
15
|
-
var
|
|
16
|
-
let
|
|
17
|
-
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
}, [
|
|
15
|
+
var b = ({ session: b, turns: oe = [], onSaveTranscript: se, onContinueInChat: ce, notice: x = null, spoken: S, onInterrupt: C, onToggleMute: w, attachments: T = [], onAttachFiles: E, onRemoveAttachment: le, onRetryAttachment: ue, canAttachMore: de = !0, preparingAttachments: D = 0, spokenChunks: O = null, onEnd: k, capturing: A = !0, interrupting: fe = !1, awaitingEndpoint: pe = !1 }) => {
|
|
16
|
+
let j = e(), { muted: M, error: N } = b, P = p(null), F = p(null), [I, L] = m("mini"), R = I === "full", z = I === "mini", B = I === "mini" ? "panel" : I === "panel" ? "full" : "mini", [V, H] = m(!1), U = p(!1), W = p(w);
|
|
17
|
+
W.current = w;
|
|
18
|
+
let G = d(() => {
|
|
19
|
+
b.phase === "listening" && (M || U.current || a(b) || (U.current = !0, W.current()));
|
|
20
|
+
}, [M, b]), K = d(() => {
|
|
21
|
+
U.current && (U.current = !1, W.current());
|
|
22
|
+
}, []), me = G;
|
|
21
23
|
f(() => {
|
|
22
24
|
let e = () => {
|
|
23
|
-
|
|
25
|
+
document.visibilityState === "hidden" ? G() : K();
|
|
24
26
|
};
|
|
27
|
+
return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
|
|
28
|
+
}, [G, K]), f(() => {
|
|
29
|
+
let e = K;
|
|
25
30
|
return window.addEventListener("focus", e), () => {
|
|
26
|
-
window.removeEventListener("focus", e),
|
|
31
|
+
window.removeEventListener("focus", e), U.current = !1;
|
|
27
32
|
};
|
|
28
33
|
}, []), f(() => {
|
|
29
|
-
|
|
34
|
+
P.current?.focus();
|
|
30
35
|
}, []), f(() => {
|
|
31
36
|
let e = (e) => {
|
|
32
37
|
if (e.key === "Escape") {
|
|
33
|
-
if (
|
|
34
|
-
|
|
38
|
+
if (V) {
|
|
39
|
+
H(!1);
|
|
35
40
|
return;
|
|
36
41
|
}
|
|
37
|
-
|
|
42
|
+
k();
|
|
38
43
|
return;
|
|
39
44
|
}
|
|
40
|
-
if (e.key !== "Tab" || !
|
|
41
|
-
let t = (
|
|
45
|
+
if (e.key !== "Tab" || !R) return;
|
|
46
|
+
let t = (V ? F.current?.querySelector("[data-testid=\"assistant-voice-transcript\"]") : F.current)?.querySelectorAll("button:not([disabled])");
|
|
42
47
|
if (!t || t.length === 0) return;
|
|
43
48
|
let n = t[0], r = t[t.length - 1];
|
|
44
49
|
!n || !r || (e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus()));
|
|
45
50
|
};
|
|
46
51
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
47
52
|
}, [
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
k,
|
|
54
|
+
R,
|
|
55
|
+
V
|
|
51
56
|
]);
|
|
52
|
-
let q =
|
|
53
|
-
snapshot:
|
|
54
|
-
capturing:
|
|
55
|
-
interrupting:
|
|
56
|
-
awaitingEndpoint:
|
|
57
|
+
let q = x !== null && N === null, J = a(b), Y = r({
|
|
58
|
+
snapshot: b,
|
|
59
|
+
capturing: A,
|
|
60
|
+
interrupting: fe,
|
|
61
|
+
awaitingEndpoint: pe
|
|
57
62
|
}), X = (() => {
|
|
58
63
|
switch (Y) {
|
|
59
|
-
case "connecting": return
|
|
60
|
-
case "endpoint-grace": return
|
|
61
|
-
case "interrupting": return
|
|
62
|
-
case "thinking": return
|
|
63
|
-
case "speaking": return
|
|
64
|
+
case "connecting": return j("voiceSession.connecting", "Starting the microphone…");
|
|
65
|
+
case "endpoint-grace": return j("voiceSession.endpointGrace", "Still listening — take your time");
|
|
66
|
+
case "interrupting": return j("voiceSession.interrupting", "Stopped — go ahead");
|
|
67
|
+
case "thinking": return j(i.key, i.fallback);
|
|
68
|
+
case "speaking": return j("voiceSession.speaking", "Speaking — tap to stop");
|
|
64
69
|
case "mic-error":
|
|
65
70
|
case "ended": return "";
|
|
66
|
-
case "listening": return
|
|
71
|
+
case "listening": return M ? j("voiceSession.muted", "Microphone off") : j("voiceSession.listening", "Listening…");
|
|
67
72
|
default: return Y;
|
|
68
73
|
}
|
|
69
|
-
})(), Z =
|
|
70
|
-
tr:
|
|
74
|
+
})(), Z = te({
|
|
75
|
+
tr: j,
|
|
71
76
|
stage: Y,
|
|
72
|
-
muted:
|
|
77
|
+
muted: M,
|
|
73
78
|
label: X
|
|
74
|
-
}), Q =
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
-
ref:
|
|
77
|
-
className: `flex flex-col items-center justify-between bg-bg-sunken ${
|
|
79
|
+
}), Q = ee(X, Z), $ = Y === "thinking";
|
|
80
|
+
return /* @__PURE__ */ y("div", {
|
|
81
|
+
ref: F,
|
|
82
|
+
className: `flex flex-col items-center justify-between bg-bg-sunken ${I === "full" ? "fixed inset-x-0 bottom-0 top-14 z-[60] px-6 py-8" : I === "panel" ? "absolute inset-0 z-20 px-4 py-6" : "absolute inset-x-0 bottom-0 z-20 h-[11.25rem] border-t border-border-subtle px-3 py-3 shadow-lg"}`,
|
|
78
83
|
role: "dialog",
|
|
79
|
-
"aria-modal":
|
|
80
|
-
"aria-label":
|
|
84
|
+
"aria-modal": R || void 0,
|
|
85
|
+
"aria-label": j("voiceSession.title", "Voice conversation"),
|
|
81
86
|
"data-testid": "assistant-voice-session",
|
|
82
87
|
children: [
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
ref:
|
|
88
|
+
/* @__PURE__ */ y("button", {
|
|
89
|
+
ref: P,
|
|
85
90
|
type: "button",
|
|
86
|
-
onClick:
|
|
87
|
-
className: `absolute ${
|
|
88
|
-
title:
|
|
91
|
+
onClick: k,
|
|
92
|
+
className: `absolute ${R ? "right-6 top-6 h-14 gap-2 px-5 text-base" : z ? "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`,
|
|
93
|
+
title: j("voiceSession.end", "End the voice conversation"),
|
|
89
94
|
"data-testid": "assistant-voice-end",
|
|
90
|
-
children: [/* @__PURE__ */
|
|
91
|
-
className:
|
|
95
|
+
children: [/* @__PURE__ */ v(_, {
|
|
96
|
+
className: R ? "size-6" : z ? "size-4" : "size-5",
|
|
92
97
|
"aria-hidden": "true"
|
|
93
|
-
}), /* @__PURE__ */
|
|
94
|
-
className: `truncate whitespace-nowrap font-medium ${
|
|
95
|
-
children:
|
|
98
|
+
}), /* @__PURE__ */ v("span", {
|
|
99
|
+
className: `truncate whitespace-nowrap font-medium ${z ? "max-w-[3.5rem] text-xs" : "max-w-[7rem]"}`,
|
|
100
|
+
children: j("voiceSession.endShort", "End")
|
|
96
101
|
})]
|
|
97
102
|
}),
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
className: `flex flex-col items-center ${
|
|
100
|
-
children: q ? /* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ v("div", {
|
|
104
|
+
className: `flex flex-col items-center ${z ? "px-3" : `min-h-[1.5rem] ${q ? R ? "pt-14" : "pt-10" : ""}`}`,
|
|
105
|
+
children: q ? /* @__PURE__ */ v("p", {
|
|
101
106
|
className: "max-w-xs text-center text-xs text-status-warning",
|
|
102
107
|
"data-testid": "assistant-voice-notice",
|
|
103
|
-
children:
|
|
108
|
+
children: ie(x, j)
|
|
104
109
|
}) : null
|
|
105
110
|
}),
|
|
106
111
|
(() => {
|
|
107
|
-
let e = /* @__PURE__ */
|
|
108
|
-
session:
|
|
109
|
-
compact:
|
|
112
|
+
let e = /* @__PURE__ */ v(s, {
|
|
113
|
+
session: b,
|
|
114
|
+
compact: z,
|
|
110
115
|
connecting: Y === "connecting",
|
|
111
|
-
onPress: t(Y) ?
|
|
112
|
-
label: t(Y) ?
|
|
113
|
-
}), r = n(Y) ?
|
|
114
|
-
return
|
|
115
|
-
spokenChunks:
|
|
116
|
+
onPress: t(Y) ? C : w,
|
|
117
|
+
label: t(Y) ? j("voiceSession.interrupt", "Stop the assistant and speak") : M ? j("voiceSession.unmute", "Turn the microphone on") : j("voiceSession.mute", "Turn the microphone off")
|
|
118
|
+
}), r = n(Y) ? S : J || null, i = N === null ? null : ae(N, j);
|
|
119
|
+
return z ? /* @__PURE__ */ v(c, {
|
|
120
|
+
spokenChunks: O,
|
|
116
121
|
state: Y,
|
|
117
122
|
caption: r,
|
|
118
123
|
statusText: Q,
|
|
@@ -120,12 +125,12 @@ var _ = ({ session: _, turns: y = [], onSaveTranscript: b, onContinueInChat: x,
|
|
|
120
125
|
rotateStatus: $,
|
|
121
126
|
errorText: i,
|
|
122
127
|
control: e
|
|
123
|
-
}) : /* @__PURE__ */
|
|
128
|
+
}) : /* @__PURE__ */ v(l, {
|
|
124
129
|
state: Y,
|
|
125
130
|
userCaption: J || null,
|
|
126
|
-
spokenChunks:
|
|
127
|
-
assistantCaption:
|
|
128
|
-
expanded:
|
|
131
|
+
spokenChunks: O,
|
|
132
|
+
assistantCaption: S,
|
|
133
|
+
expanded: R,
|
|
129
134
|
statusText: Q,
|
|
130
135
|
statusSuffix: Z,
|
|
131
136
|
rotateStatus: $,
|
|
@@ -133,54 +138,54 @@ var _ = ({ session: _, turns: y = [], onSaveTranscript: b, onContinueInChat: x,
|
|
|
133
138
|
control: e
|
|
134
139
|
});
|
|
135
140
|
})(),
|
|
136
|
-
|
|
137
|
-
turns:
|
|
138
|
-
onClose: () =>
|
|
139
|
-
onSave:
|
|
140
|
-
onContinueInChat:
|
|
141
|
+
V ? /* @__PURE__ */ v(u, {
|
|
142
|
+
turns: oe,
|
|
143
|
+
onClose: () => H(!1),
|
|
144
|
+
onSave: se,
|
|
145
|
+
onContinueInChat: ce
|
|
141
146
|
}) : null,
|
|
142
|
-
E ? /* @__PURE__ */
|
|
143
|
-
className: `absolute ${
|
|
144
|
-
children: /* @__PURE__ */
|
|
147
|
+
E ? /* @__PURE__ */ v("div", {
|
|
148
|
+
className: `absolute ${R ? "left-6 top-6" : z ? "left-11 top-2" : "left-3 top-3"}`,
|
|
149
|
+
children: /* @__PURE__ */ v(o, {
|
|
145
150
|
onFiles: (e) => {
|
|
146
|
-
E(e),
|
|
151
|
+
E(e), L((e) => e === "mini" ? "panel" : e);
|
|
147
152
|
},
|
|
148
|
-
onPickerOpen:
|
|
153
|
+
onPickerOpen: me,
|
|
149
154
|
direction: "down",
|
|
150
|
-
canAddMore:
|
|
155
|
+
canAddMore: de
|
|
151
156
|
})
|
|
152
157
|
}) : null,
|
|
153
|
-
(T.length > 0 ||
|
|
154
|
-
className: `absolute ${
|
|
158
|
+
(T.length > 0 || D > 0) && !z ? /* @__PURE__ */ v("div", {
|
|
159
|
+
className: `absolute ${R ? "bottom-24 left-24 right-24" : "bottom-16 left-16 right-16"}`,
|
|
155
160
|
"data-testid": "assistant-voice-attachments",
|
|
156
|
-
children: /* @__PURE__ */
|
|
161
|
+
children: /* @__PURE__ */ v(ne, {
|
|
157
162
|
attachments: T,
|
|
158
|
-
onRemove:
|
|
159
|
-
onRetry:
|
|
160
|
-
preparingCount:
|
|
163
|
+
onRemove: le ?? (() => void 0),
|
|
164
|
+
onRetry: ue ?? (() => void 0),
|
|
165
|
+
preparingCount: D
|
|
161
166
|
})
|
|
162
167
|
}) : null,
|
|
163
|
-
/* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ v("button", {
|
|
164
169
|
type: "button",
|
|
165
|
-
onClick: () =>
|
|
166
|
-
className: `absolute ${
|
|
167
|
-
"aria-pressed":
|
|
168
|
-
"aria-label":
|
|
170
|
+
onClick: () => H((e) => !e),
|
|
171
|
+
className: `absolute ${R ? "bottom-6 right-6 size-14" : z ? "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`,
|
|
172
|
+
"aria-pressed": V,
|
|
173
|
+
"aria-label": j("voiceSession.transcriptTitle", "Voice transcript"),
|
|
169
174
|
"data-testid": "assistant-voice-transcript-toggle",
|
|
170
|
-
children: /* @__PURE__ */
|
|
175
|
+
children: /* @__PURE__ */ v(g, { className: R ? "size-6" : z ? "size-4" : "size-5" })
|
|
171
176
|
}),
|
|
172
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ v("button", {
|
|
173
178
|
type: "button",
|
|
174
|
-
onClick: () =>
|
|
175
|
-
className: `absolute ${
|
|
176
|
-
"aria-label":
|
|
179
|
+
onClick: () => L(B),
|
|
180
|
+
className: `absolute ${R ? "bottom-6 left-6 size-14" : z ? "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`,
|
|
181
|
+
"aria-label": B === "panel" ? j("voiceSession.expandPanel", "Show the conversation in the panel") : B === "full" ? j("voiceSession.expand", "Expand the conversation to full screen") : j("voiceSession.collapse", "Shrink to the compact controller"),
|
|
177
182
|
"data-testid": "assistant-voice-expand",
|
|
178
|
-
children:
|
|
183
|
+
children: R ? /* @__PURE__ */ v(h, { className: "size-5" }) : /* @__PURE__ */ v(re, { className: z ? "size-4" : "size-5" })
|
|
179
184
|
})
|
|
180
185
|
]
|
|
181
186
|
});
|
|
182
187
|
};
|
|
183
|
-
function
|
|
188
|
+
function ie(e, t) {
|
|
184
189
|
switch (e) {
|
|
185
190
|
case "network": return t("voiceSession.noticeNetwork", "Speech recognition lost its connection. Check your network — it will retry.");
|
|
186
191
|
case "not-capturing": return t("voiceSession.noticeNotCapturing", "The microphone did not start. Check that this site is allowed to use it, then try again.");
|
|
@@ -189,7 +194,7 @@ function se(e, t) {
|
|
|
189
194
|
default: return e;
|
|
190
195
|
}
|
|
191
196
|
}
|
|
192
|
-
function
|
|
197
|
+
function ae(e, t) {
|
|
193
198
|
switch (e) {
|
|
194
199
|
case "mic-denied": return t("voiceSession.micDenied", "Microphone access is blocked. Allow it in your browser settings to talk.");
|
|
195
200
|
case "no-speech-support": return t("voiceSession.noSpeechSupport", "This browser cannot listen. Try a different browser, or type instead.");
|
|
@@ -198,4 +203,4 @@ function v(e, t) {
|
|
|
198
203
|
}
|
|
199
204
|
}
|
|
200
205
|
//#endregion
|
|
201
|
-
export {
|
|
206
|
+
export { b as AssistantVoiceSession };
|