@burdenoff/fe-libs 2026.1113.9 → 2026.1113.10

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.
@@ -351,6 +351,8 @@ export * from './ui/AIAssistantPanel';
351
351
  export * from './ui/assistantOverlayState';
352
352
  export * from './ui/useAssistantLauncherLift';
353
353
  export * from './ui/AssistantOverlay';
354
+ export * from './ui/AssistantPageHost';
355
+ export * from './ui/assistantPageSurface';
354
356
  export * from './ui/assistantPanelLoader';
355
357
  export * from './ui/AssistantPanelPlaceholder';
356
358
  export * from './openui/generativeUi';
@@ -156,6 +156,13 @@ export type AIAssistantPanelProps = PanelProps & {
156
156
  windowView?: AssistantWindowView | null;
157
157
  /** Compact: the person picked Chat or Avatar in the pill, so the host remembers it (and only then). */
158
158
  onWindowViewChange?: (view: AssistantWindowView) => void;
159
+ /**
160
+ * BOFF-13461: a page hosts this panel (`AssistantPageHost`, through the
161
+ * overlay's page surface). It fills the host and shows no Close, no Dock or
162
+ * Panel layout, no Expand (and, being the full panel, no Minimize); Escape
163
+ * backs out of its layers but never closes it. Absent: the panel of before.
164
+ */
165
+ pageHosted?: boolean;
159
166
  };
160
167
  /**
161
168
  * The panel.
@@ -35,201 +35,202 @@ import { closeRequestAction as Ve, useCompactExpandOffered as He } from "./compa
35
35
  import { useCallback as n, useEffect as r, useId as Ue, useLayoutEffect as We, useMemo as i, useRef as a, useState as o } from "react";
36
36
  import { Fragment as Ge, jsx as s, jsxs as c } from "react/jsx-runtime";
37
37
  // src/shared/assistant/ui/AIAssistantPanel.tsx
38
- var Ke = { backgroundColor: "var(--color-bg-elevated)" }, l = ({ onClose: l, visible: u, docked: qe, onToggleDock: Je, writeAccess: Ye, onNavigate: Xe, isShellLessTarget: Ze, connectSourceHref: Qe, onConnectSource: $e, preview: d, liveAvatar: et, presentation: f, onExpandedChange: p, surface: m, onOpenFull: h, avatarSettingsRequest: g, onMinimize: _, windowView: tt, onWindowViewChange: nt, serverHistory: rt = !1 }) => {
39
- let it = ke(), at = pe(et);
40
- Ae(rt);
41
- let [ot, v] = o(!1), y = Oe(d);
42
- ot && !y && v(!1);
43
- let b = ot && y, st = Se();
44
- be(xe(d, st));
45
- let x = a(null);
46
- je(x);
47
- let { conversations: ct, activeConversationId: lt, conversationListOpen: S, setConversationListOpen: C, createConversation: w } = t(), T = f === "compact", E = T && m === "window", [ut, D] = o(!1), [dt, O] = o("root"), [ft, pt] = o(0), mt = a(0);
48
- ut && (!T || E || S || b) && D(!1);
49
- let k = T && ut, [ht, gt] = o(!1), A = He(T && !E && p !== void 0), [j, _t] = o(!1), M = A && j;
38
+ var Ke = { backgroundColor: "var(--color-bg-elevated)" }, l = ({ onClose: l, visible: u, docked: qe, onToggleDock: Je, writeAccess: Ye, onNavigate: Xe, isShellLessTarget: Ze, connectSourceHref: Qe, onConnectSource: $e, preview: d, liveAvatar: f, presentation: p, onExpandedChange: m, surface: h, onOpenFull: g, avatarSettingsRequest: _, onMinimize: v, windowView: et, onWindowViewChange: tt, pageHosted: y = !1, serverHistory: nt = !1 }) => {
39
+ let rt = ke(), it = pe(f);
40
+ Ae(nt);
41
+ let [at, b] = o(!1), x = Oe(d);
42
+ at && !x && b(!1);
43
+ let S = at && x, ot = Se();
44
+ be(xe(d, ot));
45
+ let C = a(null);
46
+ je(C);
47
+ let { conversations: st, activeConversationId: ct, conversationListOpen: w, setConversationListOpen: T, createConversation: E } = t(), D = p === "compact", O = D && h === "window", [lt, k] = o(!1), [ut, A] = o("root"), [dt, ft] = o(0), pt = a(0);
48
+ lt && (!D || O || w || S) && k(!1);
49
+ let j = D && lt, [mt, ht] = o(!1), M = He(D && !O && !y && m !== void 0), [N, gt] = o(!1), P = M && N;
50
50
  r(() => {
51
- j && !A && (_t(!1), p?.(!1));
51
+ N && !M && (gt(!1), m?.(!1));
52
52
  }, [
53
- j,
54
- A,
55
- p
53
+ N,
54
+ M,
55
+ m
56
56
  ]);
57
- let vt = () => {
58
- let e = !M;
59
- _t(e), p?.(e);
60
- }, yt = a(!1), bt = a(p);
57
+ let _t = () => {
58
+ let e = !P;
59
+ gt(e), m?.(e);
60
+ }, vt = a(!1), yt = a(m);
61
61
  r(() => {
62
- yt.current = M, bt.current = p;
62
+ vt.current = P, yt.current = m;
63
63
  }), r(() => () => {
64
- yt.current && bt.current?.(!1);
64
+ vt.current && yt.current?.(!1);
65
65
  }, []);
66
- let N = S || b || k, P = et?.tab, F = me(P), [I, L] = o(!1), xt = Be({
67
- stored: tt ?? null,
68
- onRemember: nt
66
+ let F = w || S || j, I = f?.tab, L = me(I), [R, z] = o(!1), bt = Be({
67
+ stored: et ?? null,
68
+ onRemember: tt
69
69
  });
70
- if (!T) I && (!P || u === !1) && L(!1);
70
+ if (!D) R && (!I || u === !1) && z(!1);
71
71
  else {
72
- let e = xt.view === "avatar" && P?.CompactView !== void 0 && u !== !1 && (F || I);
73
- e !== I && L(e);
72
+ let e = bt.view === "avatar" && I?.CompactView !== void 0 && u !== !1 && (L || R);
73
+ e !== R && z(e);
74
74
  }
75
- let St = P !== void 0 && (F || I) && (!T || P.CompactView !== void 0), R = Ue(), Ct = Ue(), z = i(() => St ? {
76
- chatTab: `${R}-chat-tab`,
77
- avatarTab: `${R}-avatar-tab`,
78
- chatPanel: `${R}-chat-panel`,
79
- avatarPanel: `${R}-avatar-panel`,
80
- leaveHint: `${R}-avatar-leave`
81
- } : null, [St, R]), wt = n(() => L(!1), []), B = a(null), V = xt.select, H = n((e) => {
82
- B.current = e, V(e);
83
- }, [V]), U = a(null), Tt = n((e) => {
84
- U.current = e;
85
- }, []), W = F ? P?.SettingsView : void 0, Et = n(() => {
86
- E ? h?.({ menu: "settings/avatar" }) : W && (C(!1), v(!1), O("avatar"), pt((e) => e + 1), D(!0));
75
+ let xt = I !== void 0 && (L || R) && (!D || I.CompactView !== void 0), B = Ue(), St = Ue(), V = i(() => xt ? {
76
+ chatTab: `${B}-chat-tab`,
77
+ avatarTab: `${B}-avatar-tab`,
78
+ chatPanel: `${B}-chat-panel`,
79
+ avatarPanel: `${B}-avatar-panel`,
80
+ leaveHint: `${B}-avatar-leave`
81
+ } : null, [xt, B]), Ct = n(() => z(!1), []), H = a(null), U = bt.select, W = n((e) => {
82
+ H.current = e, U(e);
83
+ }, [U]), G = a(null), wt = n((e) => {
84
+ G.current = e;
85
+ }, []), K = L ? I?.SettingsView : void 0, Tt = n(() => {
86
+ O ? g?.({ menu: "settings/avatar" }) : K && (T(!1), b(!1), A("avatar"), ft((e) => e + 1), k(!0));
87
87
  }, [
88
- E,
89
- h,
90
- W,
91
- C
92
- ]), [Dt, Ot] = o(0), G = i(() => T ? {
93
- surface: E ? "window" : "panel",
94
- view: I ? "avatar" : "chat",
95
- selectView: H,
96
- openSettings: Et,
97
- focusRequest: Dt
88
+ O,
89
+ g,
90
+ K,
91
+ T
92
+ ]), [Et, Dt] = o(0), q = i(() => D ? {
93
+ surface: O ? "window" : "panel",
94
+ view: R ? "avatar" : "chat",
95
+ selectView: W,
96
+ openSettings: Tt,
97
+ focusRequest: Et
98
98
  } : void 0, [
99
- T,
100
- E,
101
- I,
102
- H,
103
- Et,
104
- Dt
105
- ]), kt = i(() => ({
106
- open: I,
107
- close: T ? () => H("chat") : wt,
108
- ids: z,
109
- covered: N,
110
- setReplyEscape: Tt,
111
- ...G ? { compact: G } : {}
99
+ D,
100
+ O,
101
+ R,
102
+ W,
103
+ Tt,
104
+ Et
105
+ ]), Ot = i(() => ({
106
+ open: R,
107
+ close: D ? () => W("chat") : Ct,
108
+ ids: V,
109
+ covered: F,
110
+ setReplyEscape: wt,
111
+ ...q ? { compact: q } : {}
112
112
  }), [
113
- I,
114
- T,
115
- H,
113
+ R,
114
+ D,
115
+ W,
116
+ Ct,
117
+ V,
118
+ F,
116
119
  wt,
117
- z,
118
- N,
119
- Tt,
120
- G
121
- ]), At = (e) => L(e === "avatar");
120
+ q
121
+ ]), kt = (e) => z(e === "avatar");
122
122
  We(() => {
123
- let e = B.current;
124
- if (e === null || (B.current = null, !z || e === "avatar" !== I)) return;
125
- let t = I ? Re(z).avatarTab : z.chatTab;
123
+ let e = H.current;
124
+ if (e === null || (H.current = null, !V || e === "avatar" !== R)) return;
125
+ let t = R ? Re(V).avatarTab : V.chatTab;
126
126
  document.getElementById(t)?.focus({ preventScroll: !0 });
127
127
  }), r(() => {
128
- T && g && mt.current !== g && (mt.current = g, W && !E && (C(!1), v(!1), O("avatar"), pt(g), D(!0)));
128
+ D && _ && pt.current !== _ && (pt.current = _, K && !O && (T(!1), b(!1), A("avatar"), ft(_), k(!0)));
129
129
  }, [
130
- T,
131
- g,
132
- W,
133
- E,
134
- C
130
+ D,
131
+ _,
132
+ K,
133
+ O,
134
+ T
135
135
  ]);
136
- let jt = Te({
137
- historyOpen: S,
138
- previewOpen: b,
139
- avatarOpen: I
140
- }) ?? (k ? "menu" : null), K = (e) => {
136
+ let At = Te({
137
+ historyOpen: w,
138
+ previewOpen: S,
139
+ avatarOpen: R
140
+ }) ?? (j ? "menu" : null), J = (e) => {
141
141
  let t = De({
142
- historyOpen: S,
143
- previewOpen: b
142
+ historyOpen: w,
143
+ previewOpen: S
144
144
  }, e);
145
- C(t.historyOpen), v(t.previewOpen);
146
- }, Mt = i(() => ({ run: () => S ? { status: "already" } : (C(!0), v(!1), { status: "done" }) }), [S, C]);
147
- le("assistant.history", Mt);
148
- let Nt = i(() => y ? {
145
+ T(t.historyOpen), b(t.previewOpen);
146
+ }, jt = i(() => ({ run: () => w ? { status: "already" } : (T(!0), b(!1), { status: "done" }) }), [w, T]);
147
+ le("assistant.history", jt);
148
+ let Mt = i(() => x ? {
149
149
  surface: "panel",
150
- run: () => b ? { status: "already" } : (C(!1), v(!0), { status: "done" }),
151
- close: () => b ? (v(!1), { status: "done" }) : { status: "already" }
150
+ run: () => S ? { status: "already" } : (T(!1), b(!0), { status: "done" }),
151
+ close: () => S ? (b(!1), { status: "done" }) : { status: "already" }
152
152
  } : null, [
153
- y,
154
- b,
155
- C
153
+ x,
154
+ S,
155
+ T
156
156
  ]);
157
- le("assistant.preview", Nt);
158
- let Pt = ct.find((e) => e.id === lt), Ft = Pt?.backendSessionId ?? null;
159
- te(Ft, Pt?.mode ?? null, u ?? !0), e(u ?? !0);
160
- let It = ne(u !== !1), q = Me(), J = a(!1), Lt = n((e) => {
161
- J.current = e;
162
- }, []), Y = a(!1), [Rt, X] = o(!1), Z = n(() => Ve({
163
- compact: T,
164
- unsent: J.current,
165
- confirmed: Y.current
166
- }) !== "close" && (X(!0), !0), [T]);
157
+ le("assistant.preview", Mt);
158
+ let Nt = st.find((e) => e.id === ct), Pt = Nt?.backendSessionId ?? null;
159
+ te(Pt, Nt?.mode ?? null, u ?? !0), e(u ?? !0);
160
+ let Ft = ne(u !== !1), Y = Me(), X = a(!1), It = n((e) => {
161
+ X.current = e;
162
+ }, []), Z = a(!1), [Lt, Rt] = o(!1), Q = n(() => Ve({
163
+ compact: D,
164
+ unsent: X.current,
165
+ confirmed: Z.current
166
+ }) !== "close" && (Rt(!0), !0), [D]);
167
167
  r(() => {
168
- if (T && q) return q(Z);
168
+ if (D && Y) return Y(Q);
169
169
  }, [
170
- T,
171
- q,
172
- Z
170
+ D,
171
+ Y,
172
+ Q
173
173
  ]);
174
- let Q = n(() => {
175
- E && _ ? _() : Z() || l();
174
+ let zt = n(() => {
175
+ y || (O && v ? v() : Q() || l());
176
176
  }, [
177
- E,
178
- _,
179
- Z,
177
+ y,
178
+ O,
179
+ v,
180
+ Q,
180
181
  l
181
- ]), zt = () => {
182
- Y.current = !0, J.current = !1, X(!1);
182
+ ]), Bt = () => {
183
+ Z.current = !0, X.current = !1, Rt(!1);
183
184
  try {
184
185
  l();
185
186
  } finally {
186
- Y.current = !1;
187
+ Z.current = !1;
187
188
  }
188
- }, $ = a(null), Bt = a(null), Vt = a(null), Ht = n(() => D(!1), []), [Ut, Wt] = o(0), Gt = n(() => {
189
- w(), D(!1), C(!1), Wt((e) => e + 1);
190
- }, [w, C]), [Kt, qt] = o(ze), Jt = n((e) => {
191
- qt((t) => t.live === e.live ? t : e);
192
- }, []), Yt = he(P), Xt = n((e) => {
193
- h?.(), Kt.live || e?.review === !0 || (T && I ? Ot((e) => e + 1) : Wt((e) => e + 1));
189
+ }, Vt = a(null), Ht = a(null), Ut = a(null), Wt = n(() => k(!1), []), [Gt, Kt] = o(0), qt = n(() => {
190
+ E(), k(!1), T(!1), Kt((e) => e + 1);
191
+ }, [E, T]), [$, Jt] = o(ze), Yt = n((e) => {
192
+ Jt((t) => t.live === e.live ? t : e);
193
+ }, []), Xt = he(I), Zt = n((e) => {
194
+ g?.(), $.live || e?.review === !0 || (D && R ? Dt((e) => e + 1) : Kt((e) => e + 1));
194
195
  }, [
195
- h,
196
- Kt.live,
197
- T,
198
- I
199
- ]), Zt = n(() => {
200
- V("chat"), Wt((e) => e + 1);
201
- }, [V]), Qt = n(() => {
202
- D(!1), gt(!0);
203
- }, []), $t = a(!1);
196
+ g,
197
+ $.live,
198
+ D,
199
+ R
200
+ ]), Qt = n(() => {
201
+ U("chat"), Kt((e) => e + 1);
202
+ }, [U]), $t = n(() => {
203
+ k(!1), ht(!0);
204
+ }, []), en = a(!1);
204
205
  return r(() => {
205
- if ($t.current && !k) {
206
+ if (en.current && !j) {
206
207
  let e = document.activeElement;
207
- e && e !== document.body && e !== x.current || Bt.current?.focus({ preventScroll: !0 });
208
+ e && e !== document.body && e !== C.current || Ht.current?.focus({ preventScroll: !0 });
208
209
  }
209
- $t.current = k;
210
- }, [k]), r(() => {
211
- Ut > 0 && $.current?.focus({ preventScroll: !0 });
212
- }, [Ut]), ee({
213
- panelRef: x,
214
- inputRef: T ? $ : void 0,
215
- onNewConversation: T ? Gt : void 0,
216
- onOpenConversationMenu: T && !E ? Qt : void 0,
210
+ en.current = j;
211
+ }, [j]), r(() => {
212
+ Gt > 0 && Vt.current?.focus({ preventScroll: !0 });
213
+ }, [Gt]), ee({
214
+ panelRef: C,
215
+ inputRef: D ? Vt : void 0,
216
+ onNewConversation: D ? qt : void 0,
217
+ onOpenConversationMenu: D && !O ? $t : void 0,
217
218
  onClose: () => {
218
219
  let e = Ee({
219
- historyOpen: S,
220
- previewOpen: b,
221
- avatarOpen: I,
222
- tabReplySpeaking: U.current !== null
220
+ historyOpen: w,
221
+ previewOpen: S,
222
+ avatarOpen: R,
223
+ tabReplySpeaking: G.current !== null
223
224
  });
224
- e === "overlay" ? (C(!1), v(!1)) : e === "tab-reply" ? U.current?.() : e === "tab" && T ? H("chat") : e === "tab" ? (L(!1), z && document.getElementById(z.chatTab)?.focus()) : k ? D(!1) : Q();
225
+ e === "overlay" ? (T(!1), b(!1)) : e === "tab-reply" ? G.current?.() : e === "tab" && D ? W("chat") : e === "tab" ? (z(!1), V && document.getElementById(V.chatTab)?.focus()) : j ? k(!1) : zt();
225
226
  }
226
227
  }), /* @__PURE__ */ s(ue, {
227
228
  visible: u ?? !0,
228
- engine: at,
229
+ engine: it,
229
230
  children: /* @__PURE__ */ s(de, {
230
- value: et,
231
+ value: f,
231
232
  children: /* @__PURE__ */ s(fe.Provider, {
232
- value: kt,
233
+ value: Ot,
233
234
  children: /* @__PURE__ */ s(ve, {
234
235
  value: d,
235
236
  children: /* @__PURE__ */ s(ae, {
@@ -239,93 +240,94 @@ var Ke = { backgroundColor: "var(--color-bg-elevated)" }, l = ({ onClose: l, vis
239
240
  value: Qe,
240
241
  onOpen: $e,
241
242
  children: /* @__PURE__ */ s(se, { children: /* @__PURE__ */ s(ce, { children: /* @__PURE__ */ c("div", {
242
- ref: x,
243
+ ref: C,
243
244
  className: "relative flex h-full w-full flex-col bg-bg-surface",
244
- style: E ? Ke : void 0,
245
+ style: O ? Ke : void 0,
245
246
  role: "complementary",
246
- "aria-label": E ? it("window.title", "Quick assistant") : it("panel.ariaLabel", "AI Assistant"),
247
+ "aria-label": O ? rt("window.title", "Quick assistant") : rt("panel.ariaLabel", "AI Assistant"),
247
248
  "data-testid": "ai-assistant-panel",
248
249
  [we]: "",
249
- ...jt ? { [Ce]: jt } : {},
250
- ...T ? {
250
+ ...At ? { [Ce]: At } : {},
251
+ ...D ? {
251
252
  "data-presentation": "compact",
252
- ...m ? { "data-assistant-surface": m } : {},
253
- ...M ? { "data-assistant-expanded": "" } : {}
253
+ ...h ? { "data-assistant-surface": h } : {},
254
+ ...P ? { "data-assistant-expanded": "" } : {}
254
255
  } : {},
256
+ ...y ? { "data-assistant-page-hosted": "" } : {},
255
257
  tabIndex: -1,
256
258
  children: [
257
259
  /* @__PURE__ */ c("div", {
258
260
  className: "contents",
259
- inert: N || void 0,
260
- children: [T ? /* @__PURE__ */ c(Ge, { children: [E ? /* @__PURE__ */ s(Le, {
261
- voiceLive: Kt.live,
262
- avatarOn: Yt,
263
- onOpenFull: Xt,
264
- onMinimize: () => _?.()
261
+ inert: F || void 0,
262
+ children: [D ? /* @__PURE__ */ c(Ge, { children: [O ? /* @__PURE__ */ s(Le, {
263
+ voiceLive: $.live,
264
+ avatarOn: Xt,
265
+ onOpenFull: Zt,
266
+ onMinimize: () => v?.()
265
267
  }) : /* @__PURE__ */ s(Ne, {
266
- contextLabel: It,
267
- menuOpen: k,
268
- menuViewId: Ct,
268
+ contextLabel: Ft,
269
+ menuOpen: j,
270
+ menuViewId: St,
269
271
  onOpenMenu: () => {
270
- O("root"), D(!0);
272
+ A("root"), k(!0);
271
273
  },
272
- menuButtonRef: Bt,
274
+ menuButtonRef: Ht,
273
275
  conversationMenu: /* @__PURE__ */ s(Pe, {
274
- open: ht,
275
- onOpenChange: gt,
276
- triggerRef: Vt
276
+ open: mt,
277
+ onOpenChange: ht,
278
+ triggerRef: Ut
277
279
  }),
278
- expandOffered: A,
279
- expanded: M,
280
- onToggleExpanded: vt,
281
- onTogglePreview: () => K("preview"),
282
- previewOpen: b,
283
- onClose: Q
280
+ expandOffered: M,
281
+ expanded: P,
282
+ onToggleExpanded: _t,
283
+ onTogglePreview: () => J("preview"),
284
+ previewOpen: S,
285
+ onClose: y ? void 0 : zt
284
286
  }), /* @__PURE__ */ s(Fe, {
285
- open: Rt,
286
- onKeep: () => X(!1),
287
- onDiscard: zt
287
+ open: Lt,
288
+ onKeep: () => Rt(!1),
289
+ onDiscard: Bt
288
290
  })] }) : /* @__PURE__ */ s(re, {
289
- contextLabel: It,
290
- onNewConversation: () => w(),
291
- onOpenHistory: () => K("history"),
292
- historyOpen: S,
293
- onTogglePreview: () => K("preview"),
294
- previewOpen: b,
295
- onClose: l,
291
+ contextLabel: Ft,
292
+ onNewConversation: () => E(),
293
+ onOpenHistory: () => J("history"),
294
+ historyOpen: w,
295
+ onTogglePreview: () => J("preview"),
296
+ previewOpen: S,
297
+ onClose: y ? void 0 : l,
296
298
  docked: qe,
297
- onToggleDock: Je
298
- }), z && !T ? /* @__PURE__ */ s(ge, {
299
- selected: I ? "avatar" : "chat",
300
- onSelect: At,
301
- ids: z
299
+ onToggleDock: y ? void 0 : Je
300
+ }), V && !D ? /* @__PURE__ */ s(ge, {
301
+ selected: R ? "avatar" : "chat",
302
+ onSelect: kt,
303
+ ids: V
302
304
  }) : null]
303
305
  }),
304
- S ? /* @__PURE__ */ s(oe, { presentation: f }) : k ? /* @__PURE__ */ s(Ie, {
305
- initialView: dt,
306
- id: Ct,
307
- onClose: Ht,
308
- onRequestClosePanel: Q,
309
- onNewConversation: Gt,
310
- AvatarSettings: W,
306
+ w ? /* @__PURE__ */ s(oe, { presentation: p }) : j ? /* @__PURE__ */ s(Ie, {
307
+ initialView: ut,
308
+ id: St,
309
+ onClose: Wt,
310
+ onRequestClosePanel: y ? void 0 : zt,
311
+ onNewConversation: qt,
312
+ AvatarSettings: K,
311
313
  docked: qe,
312
- onToggleDock: Je
313
- }, ft) : null,
314
- b && /* @__PURE__ */ s(ye, { onClose: () => v(!1) }),
314
+ onToggleDock: y ? void 0 : Je
315
+ }, dt) : null,
316
+ S && /* @__PURE__ */ s(ye, { onClose: () => b(!1) }),
315
317
  /* @__PURE__ */ s("div", {
316
318
  className: "contents",
317
- inert: N || void 0,
319
+ inert: F || void 0,
318
320
  children: /* @__PURE__ */ s(ie, {
319
321
  visible: u ?? !0,
320
322
  writeAccess: Ye,
321
- presentation: f,
322
- inputRef: T ? $ : void 0,
323
- onDraftDirtyChange: T ? Lt : void 0,
324
- ...E ? {
325
- surface: m,
326
- onWindowVoiceChange: Jt,
327
- onOpenFull: Xt,
328
- onContinuedInChat: Zt
323
+ presentation: p,
324
+ inputRef: D ? Vt : void 0,
325
+ onDraftDirtyChange: D ? It : void 0,
326
+ ...O ? {
327
+ surface: h,
328
+ onWindowVoiceChange: Yt,
329
+ onOpenFull: Zt,
330
+ onContinuedInChat: Qt
329
331
  } : {}
330
332
  })
331
333
  })
@@ -24,7 +24,8 @@ interface Props {
24
24
  */
25
25
  onTogglePreview?: () => void;
26
26
  previewOpen?: boolean;
27
- onClose: () => void;
27
+ /** Absent (a page hosts the panel, BOFF-13461): no Close button. */
28
+ onClose?: () => void;
28
29
  docked?: boolean;
29
30
  onToggleDock?: () => void;
30
31
  }
@@ -67,7 +67,7 @@ var g = ({ contextLabel: g, onNewConversation: _, onOpenHistory: v, historyOpen:
67
67
  "data-testid": "assistant-toggle-dock",
68
68
  children: m(C ? c : l, { className: "size-4" })
69
69
  }),
70
- /* @__PURE__ */ m("button", {
70
+ S && /* @__PURE__ */ m("button", {
71
71
  type: "button",
72
72
  onClick: S,
73
73
  className: "rounded-lg p-1.5 text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary",
@@ -83,6 +83,34 @@ export interface AssistantOverlayContextValue {
83
83
  windowView?: AssistantWindowView | null;
84
84
  /** The person picked a view: remember it. A no-op in classic. */
85
85
  setWindowView?: (view: AssistantWindowView) => void;
86
+ /**
87
+ * BOFF-13461: register a page that hosts the assistant (`AssistantPageHost`
88
+ * calls it with its element). Returns the unregister. Present only when the
89
+ * provider was given `pageSurface`; absent, no page can host it.
90
+ */
91
+ registerPageHost?: (element: HTMLElement) => () => void;
92
+ /**
93
+ * BOFF-13461: a page is hosting the assistant now. While it is, `isOpen`,
94
+ * `surface`, `minimized`, `fullOpen` and `docked` still describe the
95
+ * overlay's OWN surfaces, which the page leaves as they were and which show
96
+ * again when it unmounts. False (or absent) without `pageSurface`.
97
+ */
98
+ pageHosted?: boolean;
99
+ /** BOFF-13461: the stable root the panel renders into (with `pageSurface` only). */
100
+ pagePanelRoot?: HTMLElement | null;
101
+ /**
102
+ * BOFF-13461: the latest request for the hosted panel to take focus: a host
103
+ * that mounted (`force` false: only where focus was dropped) or a request to
104
+ * open the assistant while a page hosts it (`force` true). Null when none.
105
+ */
106
+ pageFocusRequest?: AssistantPageFocusRequest | null;
107
+ }
108
+ /** BOFF-13461: see `AssistantOverlayContextValue.pageFocusRequest`. */
109
+ export interface AssistantPageFocusRequest {
110
+ /** Increases with each request. */
111
+ seq: number;
112
+ /** Take focus even from a control the person moved to. */
113
+ force: boolean;
86
114
  }
87
115
  /** The overlay state in force, or null when no provider is mounted. */
88
116
  export declare function useAssistantOverlayOrNull(): AssistantOverlayContextValue | null;
@@ -140,6 +168,15 @@ export interface AssistantOverlayProviderProps {
140
168
  * `presentation="compact"` itself, so the two cannot disagree.
141
169
  */
142
170
  presentation?: AssistantPresentation;
171
+ /**
172
+ * BOFF-13461: let a page host the ONE assistant (`AssistantPageHost`). Read
173
+ * at mount. With it, the overlay renders its panel through one stable root
174
+ * that it moves between its own container and a mounted host, so the same
175
+ * instance (a draft, its attachments, a turn in flight, a running avatar)
176
+ * goes into the page and back. Absent or false: no page can host it, and the
177
+ * overlay renders exactly as before.
178
+ */
179
+ pageSurface?: boolean;
143
180
  children: ReactNode;
144
181
  }
145
182
  /**
@@ -155,7 +192,7 @@ export interface AssistantOverlayProviderProps {
155
192
  * Mount ONE per page: the published dock width and panel inset are single
156
193
  * `<html>` variables.
157
194
  */
158
- export declare function AssistantOverlayProvider({ keyPrefix, quota, presentation, children, }: AssistantOverlayProviderProps): import('react').JSX.Element;
195
+ export declare function AssistantOverlayProvider({ keyPrefix, quota, presentation, pageSurface, children, }: AssistantOverlayProviderProps): import('react').JSX.Element;
159
196
  /** What the overlay hands the panel it renders. */
160
197
  export interface AssistantOverlayPanelProps {
161
198
  panelId: string;
@@ -191,6 +228,13 @@ export interface AssistantOverlayPanelProps {
191
228
  windowView?: AssistantWindowView | null;
192
229
  /** A view was picked: remember it. */
193
230
  onWindowViewChange?: (view: AssistantWindowView) => void;
231
+ /**
232
+ * BOFF-13461: a page hosts this panel (`AssistantPageHost`): it fills the
233
+ * host, shows no dock, close, minimize or expand control, and Escape does not
234
+ * close it. Absent unless a page hosts it, so a product's `renderPanel`
235
+ * wrapper that spreads these passes exactly what it passed before.
236
+ */
237
+ pageHosted?: boolean;
194
238
  }
195
239
  /**
196
240
  * The props the overlay itself decides, which a product's `panelProps` may not
@@ -198,7 +242,7 @@ export interface AssistantOverlayPanelProps {
198
242
  * accepted in `panelProps` (Slice 2), and the overlay's value is merged over
199
243
  * them only in the compact presentation.
200
244
  */
201
- type AssistantOverlayOwnedPanelProp = 'panelId' | 'visible' | 'onClose' | 'docked' | 'onToggleDock' | 'onNavigate' | 'isShellLessTarget' | 'surface' | 'onOpenFull' | 'avatarSettingsRequest' | 'onMinimize' | 'windowView' | 'onWindowViewChange';
245
+ type AssistantOverlayOwnedPanelProp = 'panelId' | 'visible' | 'onClose' | 'docked' | 'onToggleDock' | 'onNavigate' | 'isShellLessTarget' | 'surface' | 'onOpenFull' | 'avatarSettingsRequest' | 'onMinimize' | 'windowView' | 'onWindowViewChange' | 'pageHosted';
202
246
  export interface AssistantOverlayProps {
203
247
  /** Panel id handed to the panel. */
204
248
  panelId?: string;