@burdenoff/fe-libs 2026.1014.2 → 2026.1014.4
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.
- package/dist/chrome/notificationCenter/NotificationPanel.js +12 -8
- package/dist/shared/assistant/avatar/live/avatarSessionClient.d.ts +25 -7
- package/dist/shared/assistant/avatar/live/avatarSessionClient.js +122 -61
- package/dist/shared/assistant/avatar/live/createLiveAvatarSeam.d.ts +7 -2
- package/dist/shared/assistant/avatar/live/createLiveAvatarSeam.js +11 -6
- package/dist/shared/assistant/avatar/live/liveAvatarController.js +201 -192
- package/dist/shared/assistant/avatar/useAvatarCopy.d.ts +1 -1
- package/dist/shared/assistant/avatar/useAvatarCopy.js +1 -0
- package/dist/shared/assistant/i18nManifest.d.ts +1 -0
- package/dist/shared/assistant/i18nManifest.js +1 -0
- package/dist/shared/assistant/index.d.ts +1 -0
- package/dist/shared/assistant/ui/AssistantOverlay.js +1 -1
- package/dist/shared/assistant/ui/assistantOverlayState.d.ts +10 -0
- package/dist/shared/assistant/ui/assistantOverlayState.js +18 -14
- package/dist/shared/assistant/ui/useAssistantLauncherLift.d.ts +6 -0
- package/dist/shared/assistant/ui/useAssistantLauncherLift.js +17 -0
- package/dist/shared-assistant.js +128 -127
- package/package.json +1 -1
|
@@ -40,6 +40,7 @@ function n() {
|
|
|
40
40
|
case "capacity": return n("avatar.problemCapacity", "Avatars are busy right now. Try again in a moment.");
|
|
41
41
|
case "rate-limited": return n("avatar.problemRateLimited", "You started avatars too quickly. Wait a minute and try again.");
|
|
42
42
|
case "paused": return n("avatar.problemPaused", "Avatars are paused for now.");
|
|
43
|
+
case "start-timeout": return n("avatar.problemStartTimeout", "The avatar took too long to start. Try again in a moment.");
|
|
43
44
|
case "provider": return n("avatar.problemProvider", "The avatar had a problem. Voice continues without it.");
|
|
44
45
|
case "connection": return n("avatar.problemConnection", "The connection to the avatar was lost.");
|
|
45
46
|
case "needs-hosted-voice": return n("avatar.problemNeedsHostedVoice", "The avatar needs one of the assistant’s own voices. Choose one in the voice settings.");
|
|
@@ -236,6 +236,7 @@ export declare const ASSISTANT_I18N_LITERAL_COPY: {
|
|
|
236
236
|
readonly "avatar.problemPlaybackBlocked": "The browser blocked the avatar’s sound. Tap the avatar to turn it on.";
|
|
237
237
|
readonly "avatar.problemProvider": "The avatar had a problem. Voice continues without it.";
|
|
238
238
|
readonly "avatar.problemRateLimited": "You started avatars too quickly. Wait a minute and try again.";
|
|
239
|
+
readonly "avatar.problemStartTimeout": "The avatar took too long to start. Try again in a moment.";
|
|
239
240
|
readonly "avatar.problemUnavailable": "The avatar isn’t available here.";
|
|
240
241
|
readonly "avatar.problemUnsupportedBrowser": "This browser can’t show the avatar.";
|
|
241
242
|
readonly "avatar.stageLabel": "Live avatar";
|
|
@@ -130,6 +130,7 @@ var m = {
|
|
|
130
130
|
"avatar.problemPlaybackBlocked": "The browser blocked the avatar’s sound. Tap the avatar to turn it on.",
|
|
131
131
|
"avatar.problemProvider": "The avatar had a problem. Voice continues without it.",
|
|
132
132
|
"avatar.problemRateLimited": "You started avatars too quickly. Wait a minute and try again.",
|
|
133
|
+
"avatar.problemStartTimeout": "The avatar took too long to start. Try again in a moment.",
|
|
133
134
|
"avatar.problemUnavailable": "The avatar isn’t available here.",
|
|
134
135
|
"avatar.problemUnsupportedBrowser": "This browser can’t show the avatar.",
|
|
135
136
|
"avatar.stageLabel": "Live avatar",
|
|
@@ -308,6 +308,7 @@ export * from './ui/AssistantApiCallsConsentDialog';
|
|
|
308
308
|
export * from './ui/AssistantChatArea';
|
|
309
309
|
export * from './ui/AIAssistantPanel';
|
|
310
310
|
export * from './ui/assistantOverlayState';
|
|
311
|
+
export * from './ui/useAssistantLauncherLift';
|
|
311
312
|
export * from './ui/AssistantOverlay';
|
|
312
313
|
export * from './workflowApi';
|
|
313
314
|
export * from './ui/WorkflowAssistantPanel';
|
|
@@ -2,7 +2,7 @@ import { useAssistantTr as e } from "../i18n.js";
|
|
|
2
2
|
import { quotaExhaustedEventName as t } from "../quota.js";
|
|
3
3
|
import { assistantPanelOwnsEscape as n } from "./panelOverlays.js";
|
|
4
4
|
import { AssistantPreviewBridgeHost as r } from "../preview/bridgeHost.js";
|
|
5
|
-
import { ASSISTANT_DOCK_WIDTH_VAR as i, ASSISTANT_OVERLAY_DESKTOP_QUERY as a, ASSISTANT_OVERLAY_TOP_VAR as o, ASSISTANT_PANEL_INSET_VAR as s, ASSISTANT_SHEET_BOTTOM_VAR as c,
|
|
5
|
+
import { ASSISTANT_DOCK_WIDTH_VAR as i, ASSISTANT_OVERLAY_DESKTOP_QUERY as a, ASSISTANT_OVERLAY_TOP_VAR as o, ASSISTANT_PANEL_INSET_VAR as s, ASSISTANT_SHEET_BOTTOM_VAR as c, assistantLauncherBottom as l, assistantOverlayClassName as u, assistantOverlayEscapeAction as d, assistantOverlayKeys as f, assistantQuotaKindOf as p, closestAround as m, createAssistantNavigate as h, isAssistantToggleShortcut as g, nextAssistantOpenState as _, publishedAssistantDockWidth as v, publishedAssistantPanelInset as y, readAssistantOverlayFlag as b, requestedAssistantOpenState as x, writeAssistantOverlayFlag as S } from "./assistantOverlayState.js";
|
|
6
6
|
import { useAssistantServerHistory as C } from "../history/useAssistantServerHistory.js";
|
|
7
7
|
import { AIAssistantPanel as w } from "./AIAssistantPanel.js";
|
|
8
8
|
import { createContext as T, useCallback as E, useContext as D, useEffect as O, useMemo as k, useRef as A, useState as j, useSyncExternalStore as M } from "react";
|
|
@@ -114,6 +114,16 @@ export declare const ASSISTANT_BOTTOM_CHROME_CLEARANCE = "max(var(--mobile-tabba
|
|
|
114
114
|
* whatever sat above it.
|
|
115
115
|
*/
|
|
116
116
|
export declare function aboveAssistantBottomChrome(inset: string): string;
|
|
117
|
+
/**
|
|
118
|
+
* Extra lift a PAGE asks of the launcher. The launcher is a fixed bottom-right
|
|
119
|
+
* button, so on a phone it paints over whatever the page keeps in that corner —
|
|
120
|
+
* a chat composer's send button, for one. A page that owns a bottom composer
|
|
121
|
+
* sets this var on <html> (see `useAssistantLauncherLift`) and the launcher
|
|
122
|
+
* rests above it. Unset = 0px, so every other page is untouched.
|
|
123
|
+
*/
|
|
124
|
+
export declare const ASSISTANT_LAUNCHER_LIFT_VAR = "--assistant-launcher-lift";
|
|
125
|
+
/** The launcher's CSS `bottom`: clears the chrome, then the page's own lift. */
|
|
126
|
+
export declare function assistantLauncherBottom(inset: string): string;
|
|
117
127
|
/** Width of the docked side panel. Must match `sm:w-[440px]` below. */
|
|
118
128
|
export declare const ASSISTANT_DOCK_WIDTH_PX = 440;
|
|
119
129
|
/**
|
|
@@ -33,23 +33,27 @@ var u = "max(var(--mobile-tabbar-height, 0px), var(--safe-bottom, 0px), env(safe
|
|
|
33
33
|
function d(e) {
|
|
34
34
|
return `calc(${e} + ${u})`;
|
|
35
35
|
}
|
|
36
|
-
var f =
|
|
37
|
-
function
|
|
36
|
+
var f = "--assistant-launcher-lift";
|
|
37
|
+
function p(e) {
|
|
38
|
+
return `calc(var(${f}, 0px) + ${d(e)})`;
|
|
39
|
+
}
|
|
40
|
+
var m = 440, h = "--assistant-dock-width", g = "--assistant-sheet-bottom", _ = "--assistant-overlay-top", v = 56, y = "(min-width: 640px)";
|
|
41
|
+
function b(e) {
|
|
38
42
|
return e.isOpen && e.docked && e.isDesktop ? 440 : 0;
|
|
39
43
|
}
|
|
40
|
-
var
|
|
41
|
-
function
|
|
44
|
+
var x = 520, S = 24, C = "--assistant-panel-inset";
|
|
45
|
+
function w(e) {
|
|
42
46
|
return !e.isOpen || !e.isDesktop ? 0 : e.docked ? 440 : 544;
|
|
43
47
|
}
|
|
44
|
-
var
|
|
45
|
-
function
|
|
48
|
+
var T = "fixed z-50 flex flex-col overflow-hidden border border-border-default bg-bg-surface shadow-2xl inset-x-0 bottom-[var(--assistant-sheet-bottom,0px)] top-auto rounded-t-2xl animate-in slide-in-from-bottom-4 fade-in duration-200", E = "h-[60vh] max-h-[60vh]", D = "h-[88vh] max-h-[88vh]", O = "sm:inset-auto sm:top-auto sm:bottom-24 sm:right-6 sm:rounded-2xl sm:h-[680px] sm:max-h-[calc(100vh-6rem-var(--assistant-overlay-top,56px)-0.5rem)] sm:w-[520px] sm:max-w-[calc(100vw-2rem)]", k = "sm:left-auto sm:right-0 sm:top-[var(--assistant-overlay-top)] sm:bottom-0 sm:rounded-none sm:h-auto sm:max-h-none sm:w-[440px] sm:max-w-[calc(100vw-2rem)]";
|
|
49
|
+
function A(e) {
|
|
46
50
|
return [
|
|
47
|
-
|
|
48
|
-
e.expanded ?
|
|
49
|
-
e.docked ?
|
|
51
|
+
T,
|
|
52
|
+
e.expanded ? D : E,
|
|
53
|
+
e.docked ? k : O
|
|
50
54
|
].join(" ");
|
|
51
55
|
}
|
|
52
|
-
function
|
|
56
|
+
function j(t) {
|
|
53
57
|
return (n, r) => {
|
|
54
58
|
if (t.isShellLessTarget?.(n)) return t.openInNewTab(n), { kind: "new-tab" };
|
|
55
59
|
let i = e(r);
|
|
@@ -60,22 +64,22 @@ function k(t) {
|
|
|
60
64
|
} : (t.navigate(n), t.isDesktop() || t.collapseSheet(), { kind: "routed" });
|
|
61
65
|
};
|
|
62
66
|
}
|
|
63
|
-
function
|
|
67
|
+
function M(e) {
|
|
64
68
|
if (typeof CustomEvent > "u" || !(e instanceof CustomEvent)) return "generic";
|
|
65
69
|
let t = e.detail;
|
|
66
70
|
return typeof t != "object" || !t || !("kind" in t) ? "generic" : t.kind === "sandbox" || t.kind === "ai-credits" ? t.kind : "generic";
|
|
67
71
|
}
|
|
68
|
-
function
|
|
72
|
+
function N(e, t) {
|
|
69
73
|
try {
|
|
70
74
|
return e()?.getItem(t) === "1";
|
|
71
75
|
} catch {
|
|
72
76
|
return !1;
|
|
73
77
|
}
|
|
74
78
|
}
|
|
75
|
-
function
|
|
79
|
+
function P(e, t, n) {
|
|
76
80
|
try {
|
|
77
81
|
e()?.setItem(t, n ? "1" : "0");
|
|
78
82
|
} catch {}
|
|
79
83
|
}
|
|
80
84
|
//#endregion
|
|
81
|
-
export { u as ASSISTANT_BOTTOM_CHROME_CLEARANCE, o as ASSISTANT_DIALOG_SELECTOR,
|
|
85
|
+
export { u as ASSISTANT_BOTTOM_CHROME_CLEARANCE, o as ASSISTANT_DIALOG_SELECTOR, k as ASSISTANT_DOCKED_DESKTOP_CLASS, m as ASSISTANT_DOCK_WIDTH_PX, h as ASSISTANT_DOCK_WIDTH_VAR, O as ASSISTANT_FLOATING_DESKTOP_CLASS, S as ASSISTANT_FLOATING_RIGHT_PX, x as ASSISTANT_FLOATING_WIDTH_PX, f as ASSISTANT_LAUNCHER_LIFT_VAR, v as ASSISTANT_OVERLAY_DEFAULT_TOP_PX, y as ASSISTANT_OVERLAY_DESKTOP_QUERY, _ as ASSISTANT_OVERLAY_TOP_VAR, C as ASSISTANT_PANEL_INSET_VAR, T as ASSISTANT_SHEET_BASE_CLASS, g as ASSISTANT_SHEET_BOTTOM_VAR, E as ASSISTANT_SHEET_COMPACT_CLASS, D as ASSISTANT_SHEET_EXPANDED_CLASS, i as ASSISTANT_TOGGLE_SHORTCUT_LABEL, d as aboveAssistantBottomChrome, p as assistantLauncherBottom, A as assistantOverlayClassName, l as assistantOverlayEscapeAction, t as assistantOverlayKeys, M as assistantQuotaKindOf, s as closestAround, j as createAssistantNavigate, a as isAssistantToggleShortcut, r as nextAssistantOpenState, b as publishedAssistantDockWidth, w as publishedAssistantPanelInset, N as readAssistantOverlayFlag, n as requestedAssistantOpenState, P as writeAssistantOverlayFlag };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lift the assistant launcher above a page's own bottom-right control (a chat
|
|
3
|
+
* composer's send button) while the page is mounted, on phones only. `lift` is
|
|
4
|
+
* any CSS length. Restores the previous value on unmount.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useAssistantLauncherLift(lift: string): void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ASSISTANT_LAUNCHER_LIFT_VAR as e } from "./assistantOverlayState.js";
|
|
2
|
+
import { useEffect as t } from "react";
|
|
3
|
+
//#region src/shared/assistant/ui/useAssistantLauncherLift.ts
|
|
4
|
+
var n = "(max-width: 639px)";
|
|
5
|
+
function r(r) {
|
|
6
|
+
t(() => {
|
|
7
|
+
if (typeof window > "u" || typeof window.matchMedia != "function") return;
|
|
8
|
+
let t = document.documentElement, i = window.matchMedia(n), a = t.style.getPropertyValue(e), o = () => {
|
|
9
|
+
i.matches ? t.style.setProperty(e, r) : t.style.removeProperty(e);
|
|
10
|
+
};
|
|
11
|
+
return o(), i.addEventListener("change", o), () => {
|
|
12
|
+
i.removeEventListener("change", o), a ? t.style.setProperty(e, a) : t.style.removeProperty(e);
|
|
13
|
+
};
|
|
14
|
+
}, [r]);
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { r as useAssistantLauncherLift };
|