@burdenoff/fe-libs 2026.928.1 → 2026.928.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 (41) hide show
  1. package/dist/chrome/SideNavigation.d.ts.map +1 -1
  2. package/dist/chrome/SideNavigation.js +71 -68
  3. package/dist/chrome/sideNavigation/sideNavEscape.d.ts +41 -0
  4. package/dist/chrome/sideNavigation/sideNavEscape.d.ts.map +1 -0
  5. package/dist/chrome/sideNavigation/sideNavEscape.js +8 -0
  6. package/dist/chrome/sideNavigation/useSideNavigationState.d.ts +8 -1
  7. package/dist/chrome/sideNavigation/useSideNavigationState.d.ts.map +1 -1
  8. package/dist/chrome/sideNavigation/useSideNavigationState.js +35 -23
  9. package/dist/shared/assistant/ui/AIAssistantPanel.d.ts.map +1 -1
  10. package/dist/shared/assistant/ui/AIAssistantPanel.js +82 -79
  11. package/dist/shared/assistant/ui/AssistantOverlay.d.ts.map +1 -1
  12. package/dist/shared/assistant/ui/AssistantOverlay.js +86 -84
  13. package/dist/shared/assistant/ui/assistantOverlayState.d.ts +31 -8
  14. package/dist/shared/assistant/ui/assistantOverlayState.d.ts.map +1 -1
  15. package/dist/shared/assistant/ui/assistantOverlayState.js +22 -16
  16. package/dist/shared/assistant/ui/panelOverlays.d.ts +31 -0
  17. package/dist/shared/assistant/ui/panelOverlays.d.ts.map +1 -1
  18. package/dist/shared/assistant/ui/panelOverlays.js +11 -8
  19. package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts.map +1 -1
  20. package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +78 -74
  21. package/dist/shared/assistant/ui/voice/VoiceTranscriptDrawer.d.ts.map +1 -1
  22. package/dist/shared/assistant/ui/voice/VoiceTranscriptDrawer.js +40 -39
  23. package/dist/shared/assistant/ui/voice/voiceSessionEscape.d.ts.map +1 -1
  24. package/dist/shared/assistant/ui/voice/voiceSessionEscape.js +7 -10
  25. package/dist/shared/assistant/useAssistantKeyboardShortcuts.d.ts +3 -1
  26. package/dist/shared/assistant/useAssistantKeyboardShortcuts.d.ts.map +1 -1
  27. package/dist/shared/assistant/useAssistantKeyboardShortcuts.js +25 -25
  28. package/dist/shared/hooks/index.d.ts +1 -0
  29. package/dist/shared/hooks/index.d.ts.map +1 -1
  30. package/dist/shared/hooks/useReturnFocus.d.ts +56 -0
  31. package/dist/shared/hooks/useReturnFocus.d.ts.map +1 -0
  32. package/dist/shared/hooks/useReturnFocus.js +41 -0
  33. package/dist/shared/providers/AppShellProvider.d.ts +12 -1
  34. package/dist/shared/providers/AppShellProvider.d.ts.map +1 -1
  35. package/dist/shared/providers/AppShellProvider.js +175 -161
  36. package/dist/shared-assistant.js +76 -76
  37. package/dist/shared-hooks.js +34 -33
  38. package/dist/shared.js +89 -88
  39. package/dist/ui/modal-shell.d.ts.map +1 -1
  40. package/dist/ui/modal-shell.js +23 -13
  41. package/package.json +1 -1
@@ -2,82 +2,82 @@ 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, aboveAssistantBottomChrome as s, assistantOverlayClassName as c, assistantOverlayEscapeAction as l, assistantOverlayKeys as u, assistantQuotaKindOf as d, createAssistantNavigate as f, isAssistantToggleShortcut as p, nextAssistantOpenState as m, publishedAssistantDockWidth as h, readAssistantOverlayFlag as g, requestedAssistantOpenState as _, writeAssistantOverlayFlag as v } from "./assistantOverlayState.js";
6
- import { useAssistantServerHistory as y } from "../history/useAssistantServerHistory.js";
7
- import { AIAssistantPanel as b } from "./AIAssistantPanel.js";
8
- import { createContext as x, useCallback as S, useContext as C, useEffect as w, useMemo as T, useRef as E, useState as D, useSyncExternalStore as O } from "react";
9
- import { Sparkles as k } from "lucide-react";
10
- import { jsx as A, jsxs as j } from "react/jsx-runtime";
5
+ import { ASSISTANT_DOCK_WIDTH_VAR as i, ASSISTANT_OVERLAY_DESKTOP_QUERY as a, ASSISTANT_OVERLAY_TOP_VAR as o, aboveAssistantBottomChrome as s, assistantOverlayClassName as c, assistantOverlayEscapeAction as l, assistantOverlayKeys as u, assistantQuotaKindOf as d, closestAround as f, createAssistantNavigate as p, isAssistantToggleShortcut as m, nextAssistantOpenState as h, publishedAssistantDockWidth as g, readAssistantOverlayFlag as _, requestedAssistantOpenState as v, writeAssistantOverlayFlag as y } from "./assistantOverlayState.js";
6
+ import { useAssistantServerHistory as b } from "../history/useAssistantServerHistory.js";
7
+ import { AIAssistantPanel as x } from "./AIAssistantPanel.js";
8
+ import { createContext as S, useCallback as C, useContext as w, useEffect as T, useMemo as E, useRef as D, useState as O, useSyncExternalStore as k } from "react";
9
+ import { Sparkles as A } from "lucide-react";
10
+ import { jsx as j, jsxs as M } from "react/jsx-runtime";
11
11
  //#region src/shared/assistant/ui/AssistantOverlay.tsx
12
- var M = x(null);
13
- function N() {
14
- return C(M);
15
- }
12
+ var N = S(null);
16
13
  function P() {
17
- return C(M)?.dockWidthPx ?? 0;
14
+ return w(N);
15
+ }
16
+ function F() {
17
+ return w(N)?.dockWidthPx ?? 0;
18
18
  }
19
- var F = () => typeof window > "u" ? void 0 : window.sessionStorage, I = () => typeof window > "u" ? void 0 : window.localStorage;
20
- function L(e) {
19
+ var I = () => typeof window > "u" ? void 0 : window.sessionStorage, L = () => typeof window > "u" ? void 0 : window.localStorage;
20
+ function R(e) {
21
21
  if (typeof window > "u" || typeof window.matchMedia != "function") return () => {};
22
22
  let t = window.matchMedia(a);
23
23
  return t.addEventListener("change", e), () => t.removeEventListener("change", e);
24
24
  }
25
- function R() {
25
+ function z() {
26
26
  return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(min-width: 640px)").matches;
27
27
  }
28
- function z() {
29
- return O(L, R, () => !1);
28
+ function B() {
29
+ return k(R, z, () => !1);
30
30
  }
31
- function B(e, n) {
32
- let r = E(n);
33
- w(() => {
31
+ function V(e, n) {
32
+ let r = D(n);
33
+ T(() => {
34
34
  r.current = n;
35
- }, [n]), w(() => {
35
+ }, [n]), T(() => {
36
36
  if (!e || typeof window > "u") return;
37
37
  let n = t(e), i = (e) => r.current(d(e), e);
38
38
  return window.addEventListener(n, i), () => window.removeEventListener(n, i);
39
39
  }, [e]);
40
40
  }
41
- var V = () => {};
42
- function H({ keyPrefix: e, quota: t, children: n }) {
43
- let r = T(() => u(e), [e]), [a, o] = D(() => g(F, r.openStorageKey)), [s, c] = D(() => g(I, r.dockStorageKey)), l = S(() => o(!0), []), d = S(() => o(!1), []), f = S(() => o((e) => !e), []), y = S(() => c((e) => !e), []);
44
- w(() => {
45
- v(F, r.openStorageKey, a);
46
- }, [r.openStorageKey, a]), w(() => {
47
- v(I, r.dockStorageKey, s);
48
- }, [r.dockStorageKey, s]), w(() => {
41
+ var H = () => {};
42
+ function U({ keyPrefix: e, quota: t, children: n }) {
43
+ let r = E(() => u(e), [e]), [a, o] = O(() => _(I, r.openStorageKey)), [s, c] = O(() => _(L, r.dockStorageKey)), l = C(() => o(!0), []), d = C(() => o(!1), []), f = C(() => o((e) => !e), []), p = C(() => c((e) => !e), []);
44
+ T(() => {
45
+ y(I, r.openStorageKey, a);
46
+ }, [r.openStorageKey, a]), T(() => {
47
+ y(L, r.dockStorageKey, s);
48
+ }, [r.dockStorageKey, s]), T(() => {
49
49
  if (typeof window > "u") return;
50
50
  let e = (e) => {
51
- let t = _(e);
52
- o((e) => m(e, t));
51
+ let t = v(e);
52
+ o((e) => h(e, t));
53
53
  };
54
54
  return window.addEventListener(r.toggleEvent, e), () => window.removeEventListener(r.toggleEvent, e);
55
- }, [r.toggleEvent]), w(() => {
55
+ }, [r.toggleEvent]), T(() => {
56
56
  if (typeof document > "u") return;
57
57
  let e = (e) => {
58
- p(e) && (e.preventDefault(), o((e) => !e));
58
+ m(e) && (e.preventDefault(), o((e) => !e));
59
59
  };
60
60
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
61
- }, []), B(t?.product ?? null, t?.onExhausted ?? V);
62
- let b = h({
61
+ }, []), V(t?.product ?? null, t?.onExhausted ?? H);
62
+ let b = g({
63
63
  isOpen: a,
64
64
  docked: s,
65
- isDesktop: z()
65
+ isDesktop: B()
66
66
  });
67
- w(() => {
67
+ T(() => {
68
68
  if (typeof document > "u") return;
69
69
  let e = document.documentElement.style;
70
70
  return e.setProperty(i, `${b}px`), () => {
71
71
  e.removeProperty(i);
72
72
  };
73
73
  }, [b]);
74
- let x = T(() => ({
74
+ let x = E(() => ({
75
75
  isOpen: a,
76
76
  open: l,
77
77
  close: d,
78
78
  toggle: f,
79
79
  docked: s,
80
- toggleDock: y,
80
+ toggleDock: p,
81
81
  dockWidthPx: b,
82
82
  keys: r
83
83
  }), [
@@ -86,88 +86,90 @@ function H({ keyPrefix: e, quota: t, children: n }) {
86
86
  d,
87
87
  f,
88
88
  s,
89
- y,
89
+ p,
90
90
  b,
91
91
  r
92
92
  ]);
93
- return /* @__PURE__ */ A(M.Provider, {
93
+ return /* @__PURE__ */ j(N.Provider, {
94
94
  value: x,
95
95
  children: n
96
96
  });
97
97
  }
98
- var U = (e, t) => /* @__PURE__ */ A(b, {
98
+ var W = (e, t) => /* @__PURE__ */ j(x, {
99
99
  ...e,
100
100
  ...t
101
101
  });
102
- function W(e) {
103
- let t = N();
104
- return t ? /* @__PURE__ */ A(G, {
102
+ function G(e) {
103
+ let t = P();
104
+ return t ? /* @__PURE__ */ j(K, {
105
105
  state: t,
106
106
  ...e
107
107
  }) : null;
108
108
  }
109
- function G({ state: t, panelId: i = "ai-assistant", panelProps: a, renderPanel: u, navigate: d, isShellLessTarget: p, topOffsetPx: m = 56, launcherIcon: h, launcherBottomInset: g = "1.5rem", showLauncher: _ = !0 }) {
110
- let { isOpen: v, close: b, toggle: x, docked: S, toggleDock: C } = t, E = e();
111
- y(a?.serverHistory === !0);
112
- let [O, M] = D(!1), N = T(() => d ? f({
109
+ function K({ state: t, panelId: i = "ai-assistant", panelProps: a, renderPanel: u, navigate: d, isShellLessTarget: m, topOffsetPx: h = 56, launcherIcon: g, launcherBottomInset: _ = "1.5rem", showLauncher: v = !0 }) {
110
+ let { isOpen: y, close: x, toggle: S, docked: C, toggleDock: w } = t, D = e();
111
+ b(a?.serverHistory === !0);
112
+ let [k, N] = O(!1), P = E(() => d ? p({
113
113
  navigate: d,
114
- isShellLessTarget: p,
115
- isDesktop: R,
116
- collapseSheet: () => M(!1),
114
+ isShellLessTarget: m,
115
+ isDesktop: z,
116
+ collapseSheet: () => N(!1),
117
117
  openInNewTab: (e) => window.open(e, "_blank", "noopener,noreferrer")
118
- }) : void 0, [d, p]);
119
- w(() => {
120
- if (!v) return;
118
+ }) : void 0, [d, m]);
119
+ T(() => {
120
+ if (!y) return;
121
121
  let e = (e) => {
122
122
  l({
123
123
  key: e.key,
124
- isOpen: v,
124
+ isOpen: y,
125
+ alreadyHandled: e.defaultPrevented,
125
126
  dialogOpen: document.querySelector("[role=\"dialog\"],[role=\"alertdialog\"],dialog[open]") !== null,
127
+ pressedInsideDialog: f(e.target, "[role=\"dialog\"],[role=\"alertdialog\"],dialog[open]") !== null,
126
128
  panelOwnsEscape: n()
127
- }) === "close" && (e.preventDefault(), b());
129
+ }) === "close" && (e.preventDefault(), x());
128
130
  };
129
131
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
130
- }, [v, b]);
131
- let P = {
132
+ }, [y, x]);
133
+ let F = {
132
134
  panelId: i,
133
135
  visible: !0,
134
- onClose: b,
135
- docked: S,
136
- onToggleDock: C,
137
- onNavigate: N
138
- }, F = E("overlay.launcher", "AI Assistant"), I = { [o]: `${m}px` };
139
- return /* @__PURE__ */ j(r, {
136
+ onClose: x,
137
+ docked: C,
138
+ onToggleDock: w,
139
+ onNavigate: P
140
+ }, I = D("overlay.launcher", "AI Assistant"), L = { [o]: `${h}px` };
141
+ return /* @__PURE__ */ M(r, {
140
142
  preview: a?.preview,
141
- children: [v && /* @__PURE__ */ j("div", {
143
+ children: [y && /* @__PURE__ */ M("div", {
142
144
  className: c({
143
- expanded: O,
144
- docked: S
145
+ expanded: k,
146
+ docked: C
145
147
  }),
146
- style: I,
148
+ style: L,
147
149
  "data-testid": "assistant-overlay",
148
- children: [/* @__PURE__ */ A("button", {
150
+ children: [/* @__PURE__ */ j("button", {
149
151
  type: "button",
150
- onClick: () => M((e) => !e),
152
+ onClick: () => N((e) => !e),
151
153
  className: "flex w-full shrink-0 justify-center pt-2 pb-1 sm:hidden",
152
- "aria-label": O ? E("sheet.collapse", "Shrink the assistant") : E("sheet.expand", "Expand the assistant"),
153
- "aria-expanded": O,
154
+ "aria-label": k ? D("sheet.collapse", "Shrink the assistant") : D("sheet.expand", "Expand the assistant"),
155
+ "aria-expanded": k,
154
156
  "data-testid": "assistant-sheet-handle",
155
- children: /* @__PURE__ */ A("span", { className: "h-1.5 w-10 rounded-full bg-border-strong" })
156
- }), /* @__PURE__ */ A("div", {
157
+ children: /* @__PURE__ */ j("span", { className: "h-1.5 w-10 rounded-full bg-border-strong" })
158
+ }), /* @__PURE__ */ j("div", {
157
159
  className: "flex min-h-0 flex-1 flex-col",
158
- children: u ? u(P) : U(a, P)
160
+ children: u ? u(F) : W(a, F)
159
161
  })]
160
- }), _ && /* @__PURE__ */ A("button", {
162
+ }), v && /* @__PURE__ */ j("button", {
161
163
  type: "button",
162
- onClick: x,
163
- title: E("overlay.launcherTitle", "AI Assistant ({{shortcut}})", { shortcut: "Ctrl+Shift+A" }),
164
- "aria-label": F,
164
+ onClick: S,
165
+ title: D("overlay.launcherTitle", "AI Assistant ({{shortcut}})", { shortcut: "Ctrl+Shift+A" }),
166
+ "aria-label": I,
165
167
  "aria-haspopup": "dialog",
166
- "aria-expanded": v,
168
+ "aria-expanded": y,
167
169
  "data-testid": "assistant-fab",
168
- style: { bottom: s(g) },
169
- className: "fixed right-6 z-30 size-14 items-center justify-center rounded-full border border-border-strong bg-[var(--color-accent-soft)] text-action-primary-bg shadow-float transition-colors duration-200 hover:border-action-primary-bg focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] cursor-pointer " + (v ? "hidden sm:inline-flex" : "inline-flex"),
170
- children: h ?? /* @__PURE__ */ A(k, {
170
+ style: { bottom: s(_) },
171
+ className: "fixed right-6 z-30 size-14 items-center justify-center rounded-full border border-border-strong bg-[var(--color-accent-soft)] text-action-primary-bg shadow-float transition-colors duration-200 hover:border-action-primary-bg focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] cursor-pointer " + (y ? "hidden sm:inline-flex" : "inline-flex"),
172
+ children: g ?? /* @__PURE__ */ j(A, {
171
173
  className: "size-6",
172
174
  "aria-hidden": "true"
173
175
  })
@@ -175,4 +177,4 @@ function G({ state: t, panelId: i = "ai-assistant", panelProps: a, renderPanel:
175
177
  });
176
178
  }
177
179
  //#endregion
178
- export { W as AssistantOverlay, H as AssistantOverlayProvider, P as useAssistantDockWidth, N as useAssistantOverlayOrNull, B as useAssistantQuotaExhausted };
180
+ export { G as AssistantOverlay, U as AssistantOverlayProvider, F as useAssistantDockWidth, P as useAssistantOverlayOrNull, V as useAssistantQuotaExhausted };
@@ -51,24 +51,47 @@ export declare function isAssistantToggleShortcut(event: Pick<KeyboardEvent, 'ke
51
51
  */
52
52
  export declare const ASSISTANT_DIALOG_SELECTOR = "[role=\"dialog\"],[role=\"alertdialog\"],dialog[open]";
53
53
  export type AssistantOverlayEscapeAction = 'close' | 'ignore';
54
+ /**
55
+ * The nearest element matching `selectors` around an event target, or null.
56
+ *
57
+ * An event target can be `window` or `document`, and the tests run without a
58
+ * DOM, so it is checked structurally rather than with `instanceof Element`.
59
+ * ★ `closest` walks `parentNode`, so this still answers for a target whose
60
+ * dialog has ALREADY been removed from the document: the detached subtree
61
+ * keeps its ancestors.
62
+ */
63
+ export declare function closestAround(target: unknown, selectors: string): Element | null;
54
64
  /**
55
65
  * What the overlay does with a key press, given who else wants Escape.
56
66
  *
57
- * ★★★ Escape closes ONE thing. Two owners outrank the overlay, in this order:
67
+ * ★★★ Escape closes ONE thing. Three owners outrank the overlay, in this order:
58
68
  *
59
- * - an open dialog (the consent dialog, a product's native modal) handles its
60
- * own Escape; closing the assistant under it dismisses two things at once;
61
- * - the panel itself, when `assistantPanelOwnsEscape()` says so — one of its
62
- * full-surface overlays is showing and holds focus. The panel's listener is
63
- * on the same `document` node, so `stopPropagation` there cannot stop this
64
- * one; ownership has to be decided by STATE, not by listener order.
69
+ * - an earlier handler already took the key (`alreadyHandled`, the event's
70
+ * `defaultPrevented`). Radix's `DismissableLayer` closes the consent dialog
71
+ * in the CAPTURE phase on `document` and calls `preventDefault()`, and by
72
+ * the time the key reaches this listener, in the BUBBLE phase, the dialog is
73
+ * gone and focus is on `<body>`. Neither `dialogOpen` nor the panel's claim
74
+ * could see it any more, so one Escape closed the dialog AND the whole
75
+ * assistant in BigConsole and FluidGrids (Tier Z, RT3h, 2026-09-28;
76
+ * BOFF-8085). VibeControls' and HealthyBowl's own overlays listen in the
77
+ * capture phase, while the dialog is still there, which is why they never
78
+ * showed it;
79
+ * - a dialog: one open now (the consent dialog, a product's native modal), or
80
+ * the one the key was pressed in (`pressedInsideDialog`), which a dialog
81
+ * that closes itself without `preventDefault()` has already taken away;
82
+ * - the panel itself, when `assistantPanelOwnsEscape()` says so: focus is in
83
+ * it, or one of its full-surface overlays is showing. The panel's listener
84
+ * is on the same `document` node, so `stopPropagation` there cannot stop
85
+ * this one; ownership is decided by STATE, not by listener order.
65
86
  *
66
- * Only when neither claims the key does the overlay close.
87
+ * Only when none of them claims the key does the overlay close.
67
88
  */
68
89
  export declare function assistantOverlayEscapeAction(input: {
69
90
  key: string;
70
91
  isOpen: boolean;
92
+ alreadyHandled: boolean;
71
93
  dialogOpen: boolean;
94
+ pressedInsideDialog: boolean;
72
95
  panelOwnsEscape: boolean;
73
96
  }): AssistantOverlayEscapeAction;
74
97
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"assistantOverlayState.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/assistantOverlayState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,6EAA6E;AAC7E,MAAM,WAAW,oBAAoB;IACnC,8DAA8D;IAC9D,WAAW,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,4CAA4C;IAC5C,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,oBAAoB,CAMzE;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,GAAG,IAAI,CASxE;AAED,8EAA8E;AAC9E,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,GAAG,IAAI,GAAG,OAAO,CAE3F;AAED,uDAAuD;AACvD,eAAO,MAAM,+BAA+B,iBAAiB,CAAC;AAE9D;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC,GACrE,OAAO,CAOT;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,0DAAsD,CAAC;AAE7F,MAAM,MAAM,4BAA4B,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE9D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE;IAClD,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;CAC1B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;IACrC,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,sDAAsD;IACtD,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,gCAAgC;IAChC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,wBAAwB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CASjG;AAED,gEAAgE;AAChE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,CAS5D;AAED,4EAA4E;AAC5E,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,SAAS,EACnD,GAAG,EAAE,MAAM,GACV,OAAO,CAMT;AAED,mFAAmF;AACnF,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,SAAS,EACnD,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,OAAO,GACb,IAAI,CAMN"}
1
+ {"version":3,"file":"assistantOverlayState.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/assistantOverlayState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,6EAA6E;AAC7E,MAAM,WAAW,oBAAoB;IACnC,8DAA8D;IAC9D,WAAW,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,4CAA4C;IAC5C,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,oBAAoB,CAMzE;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,GAAG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E,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,SAAS,EACnD,GAAG,EAAE,MAAM,GACV,OAAO,CAMT;AAED,mFAAmF;AACnF,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,SAAS,EACnD,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,OAAO,GACb,IAAI,CAMN"}
@@ -19,26 +19,32 @@ function i(e) {
19
19
  return (e.ctrlKey || e.metaKey) && e.shiftKey && typeof e.key == "string" && e.key.toLowerCase() === "a";
20
20
  }
21
21
  var a = "[role=\"dialog\"],[role=\"alertdialog\"],dialog[open]";
22
- function o(e) {
23
- return e.key !== "Escape" || !e.isOpen || e.dialogOpen || e.panelOwnsEscape ? "ignore" : "close";
22
+ function o(e, t) {
23
+ return s(e) ? e.closest(t) : null;
24
+ }
25
+ function s(e) {
26
+ return typeof e == "object" && !!e && "closest" in e && typeof e.closest == "function";
24
27
  }
25
- var s = "max(var(--mobile-tabbar-height, 0px), var(--safe-bottom, 0px), env(safe-area-inset-bottom, 0px))";
26
28
  function c(e) {
27
- return `calc(${e} + ${s})`;
29
+ return e.key !== "Escape" || !e.isOpen || e.alreadyHandled || e.dialogOpen || e.pressedInsideDialog || e.panelOwnsEscape ? "ignore" : "close";
30
+ }
31
+ var l = "max(var(--mobile-tabbar-height, 0px), var(--safe-bottom, 0px), env(safe-area-inset-bottom, 0px))";
32
+ function u(e) {
33
+ return `calc(${e} + ${l})`;
28
34
  }
29
- var l = 440, u = "--assistant-dock-width", d = "--assistant-overlay-top", f = 56, p = "(min-width: 640px)";
30
- function m(e) {
35
+ var d = 440, f = "--assistant-dock-width", p = "--assistant-overlay-top", m = 56, h = "(min-width: 640px)";
36
+ function g(e) {
31
37
  return e.isOpen && e.docked && e.isDesktop ? 440 : 0;
32
38
  }
33
- var h = "fixed z-50 flex flex-col overflow-hidden border border-border-default bg-bg-surface shadow-2xl inset-x-0 bottom-0 top-auto rounded-t-2xl animate-in slide-in-from-bottom-4 fade-in duration-200", g = "h-[60vh] max-h-[60vh]", _ = "h-[88vh] max-h-[88vh]", v = "sm:inset-auto sm:top-auto sm:bottom-24 sm:right-6 sm:rounded-2xl sm:h-[680px] sm:max-h-[calc(100vh-8rem)] sm:w-[520px] sm:max-w-[calc(100vw-2rem)]", y = "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)]";
34
- function b(e) {
39
+ var _ = "fixed z-50 flex flex-col overflow-hidden border border-border-default bg-bg-surface shadow-2xl inset-x-0 bottom-0 top-auto rounded-t-2xl animate-in slide-in-from-bottom-4 fade-in duration-200", v = "h-[60vh] max-h-[60vh]", y = "h-[88vh] max-h-[88vh]", b = "sm:inset-auto sm:top-auto sm:bottom-24 sm:right-6 sm:rounded-2xl sm:h-[680px] sm:max-h-[calc(100vh-8rem)] sm:w-[520px] sm:max-w-[calc(100vw-2rem)]", x = "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)]";
40
+ function S(e) {
35
41
  return [
36
- h,
37
- e.expanded ? _ : g,
38
- e.docked ? y : v
42
+ _,
43
+ e.expanded ? y : v,
44
+ e.docked ? x : b
39
45
  ].join(" ");
40
46
  }
41
- function x(e) {
47
+ function C(e) {
42
48
  return (t) => {
43
49
  if (e.isShellLessTarget?.(t)) {
44
50
  e.openInNewTab(t);
@@ -47,22 +53,22 @@ function x(e) {
47
53
  e.navigate(t), e.isDesktop() || e.collapseSheet();
48
54
  };
49
55
  }
50
- function S(e) {
56
+ function w(e) {
51
57
  if (typeof CustomEvent > "u" || !(e instanceof CustomEvent)) return "generic";
52
58
  let t = e.detail;
53
59
  return typeof t != "object" || !t || !("kind" in t) ? "generic" : t.kind === "sandbox" || t.kind === "ai-credits" ? t.kind : "generic";
54
60
  }
55
- function C(e, t) {
61
+ function T(e, t) {
56
62
  try {
57
63
  return e()?.getItem(t) === "1";
58
64
  } catch {
59
65
  return !1;
60
66
  }
61
67
  }
62
- function w(e, t, n) {
68
+ function E(e, t, n) {
63
69
  try {
64
70
  e()?.setItem(t, n ? "1" : "0");
65
71
  } catch {}
66
72
  }
67
73
  //#endregion
68
- export { s as ASSISTANT_BOTTOM_CHROME_CLEARANCE, a as ASSISTANT_DIALOG_SELECTOR, y as ASSISTANT_DOCKED_DESKTOP_CLASS, l as ASSISTANT_DOCK_WIDTH_PX, u as ASSISTANT_DOCK_WIDTH_VAR, v as ASSISTANT_FLOATING_DESKTOP_CLASS, f as ASSISTANT_OVERLAY_DEFAULT_TOP_PX, p as ASSISTANT_OVERLAY_DESKTOP_QUERY, d as ASSISTANT_OVERLAY_TOP_VAR, h as ASSISTANT_SHEET_BASE_CLASS, g as ASSISTANT_SHEET_COMPACT_CLASS, _ as ASSISTANT_SHEET_EXPANDED_CLASS, r as ASSISTANT_TOGGLE_SHORTCUT_LABEL, c as aboveAssistantBottomChrome, b as assistantOverlayClassName, o as assistantOverlayEscapeAction, e as assistantOverlayKeys, S as assistantQuotaKindOf, x as createAssistantNavigate, i as isAssistantToggleShortcut, n as nextAssistantOpenState, m as publishedAssistantDockWidth, C as readAssistantOverlayFlag, t as requestedAssistantOpenState, w as writeAssistantOverlayFlag };
74
+ export { l as ASSISTANT_BOTTOM_CHROME_CLEARANCE, a as ASSISTANT_DIALOG_SELECTOR, x as ASSISTANT_DOCKED_DESKTOP_CLASS, d as ASSISTANT_DOCK_WIDTH_PX, f as ASSISTANT_DOCK_WIDTH_VAR, b as ASSISTANT_FLOATING_DESKTOP_CLASS, m as ASSISTANT_OVERLAY_DEFAULT_TOP_PX, h as ASSISTANT_OVERLAY_DESKTOP_QUERY, p as ASSISTANT_OVERLAY_TOP_VAR, _ as ASSISTANT_SHEET_BASE_CLASS, v as ASSISTANT_SHEET_COMPACT_CLASS, y as ASSISTANT_SHEET_EXPANDED_CLASS, r as ASSISTANT_TOGGLE_SHORTCUT_LABEL, u as aboveAssistantBottomChrome, S as assistantOverlayClassName, c as assistantOverlayEscapeAction, e as assistantOverlayKeys, w as assistantQuotaKindOf, o as closestAround, C as createAssistantNavigate, i as isAssistantToggleShortcut, n as nextAssistantOpenState, g as publishedAssistantDockWidth, T as readAssistantOverlayFlag, t as requestedAssistantOpenState, E as writeAssistantOverlayFlag };
@@ -64,6 +64,37 @@ export declare const ASSISTANT_PANEL_ATTR = "data-assistant-panel";
64
64
  * see the "focus fell to `<body>`" case there. Absent means no overlay.
65
65
  */
66
66
  export declare const ASSISTANT_OVERLAY_ATTR = "data-assistant-overlay";
67
+ /**
68
+ * Attribute marking the root of a LIVE voice session inside the panel
69
+ * (BOFF-8085).
70
+ *
71
+ * ★★ Load-bearing at runtime, like `ASSISTANT_PANEL_ATTR`: the panel's Escape
72
+ * handler reads it through `voiceSessionOwnsEscape` to leave the key to the
73
+ * session. Not the `data-testid`, which is a test handle and free to change.
74
+ */
75
+ export declare const ASSISTANT_VOICE_SESSION_ATTR = "data-assistant-voice-session";
76
+ /**
77
+ * Is a live voice session the topmost layer of this panel, so that Escape is
78
+ * its to handle rather than the panel's?
79
+ *
80
+ * ★★★ Escape closes ONE layer, the topmost (BOFF-8085). The voice session sits
81
+ * over the chat area, and its transcript drawer over the session, so the
82
+ * order is: the drawer, then the session, then the panel. The panel's own
83
+ * handler runs FIRST (`document`, bubble phase) and the session's LAST
84
+ * (`window`, bubble phase), so when the panel claimed the key it closed the
85
+ * whole assistant, and the session and its drawer went with it. Measured in all
86
+ * four prod apps on 2026-09-28 (Tier Z, RT3h): focus on the transcript toggle,
87
+ * one Escape, and the drawer, the session and the panel were all gone.
88
+ *
89
+ * So while a session is live, the panel leaves the key to it: the first
90
+ * Escape closes the drawer, the next ends the session, and only the one after
91
+ * that closes the panel.
92
+ *
93
+ * ★ A full-surface overlay (history, preview) opened over the session still
94
+ * comes first. The panel backs out of it, as `escapeDismisses` says, and marks
95
+ * the key handled so the session does not also act on it.
96
+ */
97
+ export declare function voiceSessionOwnsEscape(panel: Pick<Element, "hasAttribute" | "querySelector">): boolean;
67
98
  /** Which overlay is showing, as the attribute value — `null` when none is. */
68
99
  export declare function activePanelOverlay(current: PanelOverlayState): "history" | "preview" | null;
69
100
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"panelOverlays.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/panelOverlays.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B;AAED,sDAAsD;AACtD,eAAO,MAAM,gBAAgB,EAAE,iBAG9B,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,SAAS,GAAG,SAAS,GAC7B,iBAAiB,CAOnB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,iBAAiB,GACzB,SAAS,GAAG,OAAO,CAErB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAE3D;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAE/D,8EAA8E;AAC9E,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,iBAAiB,GACzB,SAAS,GAAG,SAAS,GAAG,IAAI,CAI9B;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,OAAO,CAAA;CAAE,GAAG,IAAI,EACtD,MAAM,EAAE,IAAI,GAAG,IAAI,GAClB,O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;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,eAAe,CAAC,GACrD,OAAO,CAGT;AAED,8EAA8E;AAC9E,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,iBAAiB,GACzB,SAAS,GAAG,SAAS,GAAG,IAAI,CAI9B;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,OAAO,CAAA;CAAE,GAAG,IAAI,EACtD,MAAM,EAAE,IAAI,GAAG,IAAI,GAClB,OAAO,CAGT;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,GAAE,IAAI,CAAC,QAAQ,EAAE,kBAAkB,GAAG,eAAe,GAAG,MAAM,CAAY,GAC5E,OAAO,CAqBT;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE;IACL,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,OAAO,CAAC;IACrC,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CACrC,GAAG,IAAI,EACR,MAAM,EAAE,IAAI,GAAG,IAAI,EACnB,IAAI,EAAE,IAAI,GAAG,IAAI,GAChB,OAAO,CAKT"}
@@ -12,19 +12,22 @@ function t(t, n) {
12
12
  function n(e) {
13
13
  return e.historyOpen || e.previewOpen ? "overlay" : "panel";
14
14
  }
15
- var r = "data-assistant-panel", i = "data-assistant-overlay";
16
- function a(e) {
15
+ var r = "data-assistant-panel", i = "data-assistant-overlay", a = "data-assistant-voice-session";
16
+ function o(e) {
17
+ return e.hasAttribute("data-assistant-overlay") ? !1 : e.querySelector(`[${a}]`) !== null;
18
+ }
19
+ function s(e) {
17
20
  return e.historyOpen ? "history" : e.previewOpen ? "preview" : null;
18
21
  }
19
- function o(e, t) {
22
+ function c(e, t) {
20
23
  return !e || !t ? !1 : e === t || e.contains(t);
21
24
  }
22
- function s(e = document) {
25
+ function l(e = document) {
23
26
  let t = e.activeElement;
24
- return Array.from(e.querySelectorAll(`[${r}]`)).some((n) => c(n, t, e.body));
27
+ return Array.from(e.querySelectorAll(`[${r}]`)).some((n) => u(n, t, e.body));
25
28
  }
26
- function c(e, t, n) {
27
- return e ? o(e, t) ? !0 : (t === null || t === n) && e.hasAttribute("data-assistant-overlay") : !1;
29
+ function u(e, t, n) {
30
+ return e ? c(e, t) ? !0 : (t === null || t === n) && e.hasAttribute("data-assistant-overlay") : !1;
28
31
  }
29
32
  //#endregion
30
- export { i as ASSISTANT_OVERLAY_ATTR, r as ASSISTANT_PANEL_ATTR, e as NO_PANEL_OVERLAY, a as activePanelOverlay, s as assistantPanelOwnsEscape, n as escapeDismisses, o as focusIsInsidePanel, t as nextPanelOverlays, c as panelOwnsEscape };
33
+ export { i as ASSISTANT_OVERLAY_ATTR, r as ASSISTANT_PANEL_ATTR, a as ASSISTANT_VOICE_SESSION_ATTR, e as NO_PANEL_OVERLAY, s as activePanelOverlay, l as assistantPanelOwnsEscape, n as escapeDismisses, c as focusIsInsidePanel, t as nextPanelOverlays, u as panelOwnsEscape, o as voiceSessionOwnsEscape };
@@ -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;AAoB7D,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBA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,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,KAAK,CAqpB3C,CAAC"}
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;AAyB7D,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;IACj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