@burdenoff/fe-libs 2026.1114.9 → 2026.1114.11
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/DynamicFooter.d.ts +15 -1
- package/dist/chrome/DynamicFooter.js +65 -70
- package/dist/chrome/Footer.d.ts +43 -1
- package/dist/chrome/Footer.js +121 -125
- package/dist/chrome/footerLegalLinks.d.ts +17 -0
- package/dist/chrome/footerLegalLinks.js +23 -0
- package/dist/shared/assistant/index.d.ts +3 -0
- package/dist/shared/assistant/ui/AIAssistantPanel.js +227 -227
- package/dist/shared/assistant/ui/AssistantPageHost.d.ts +6 -1
- package/dist/shared/assistant/ui/AssistantPageHost.js +20 -17
- package/dist/shared/assistant/ui/assistantPageSettings.d.ts +4 -0
- package/dist/shared/assistant/ui/assistantPageSettings.js +22 -0
- package/dist/shared/assistant/ui/compact/AssistantMenuView.js +119 -144
- package/dist/shared/assistant/ui/compact/AssistantPageBar.d.ts +1 -5
- package/dist/shared/assistant/ui/compact/AssistantPageBar.js +19 -37
- package/dist/shared/assistant/ui/compact/AssistantPanelLayoutField.d.ts +8 -0
- package/dist/shared/assistant/ui/compact/AssistantPanelLayoutField.js +39 -0
- package/dist/shared/assistant/ui/compact/AssistantSettingsView.d.ts +10 -0
- package/dist/shared/assistant/ui/compact/AssistantSettingsView.js +50 -0
- package/dist/shared/utils/index.d.ts +2 -0
- package/dist/shared/utils/productSiteLinks.d.ts +57 -0
- package/dist/shared/utils/productSiteLinks.js +53 -0
- package/dist/shared-assistant.js +67 -64
- package/dist/shared-utils.js +10 -9
- package/dist/shared.js +116 -115
- package/dist/utils/index.js +6 -5
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FooterLink } from './Footer';
|
|
2
|
+
import { LegalPathOverrides } from '../shared/utils/productSiteLinks';
|
|
3
|
+
/** The fields of a published CMS content page the footer needs. */
|
|
4
|
+
export interface FooterLegalPage {
|
|
5
|
+
slug: string;
|
|
6
|
+
title: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Footer Legal links for a product's published CMS legal pages.
|
|
10
|
+
*
|
|
11
|
+
* Policies are published on the product's marketing site, not in the shell:
|
|
12
|
+
* the old `/legal/<slug>` links sat behind sign-in with no content
|
|
13
|
+
* (BOFF-7244). Each page is linked at its marketing-site route, in
|
|
14
|
+
* `order`. A slug with no public route is left out; on a host with no public
|
|
15
|
+
* site (local development) the label is kept but inert.
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildFooterLegalLinks(pages: readonly FooterLegalPage[], order: readonly string[], overrides?: LegalPathOverrides, hostname?: string): FooterLink[];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { resolveLegalPath as e, resolveMarketingUrl as t } from "../shared/utils/productSiteLinks.js";
|
|
2
|
+
// src/chrome/footerLegalLinks.ts
|
|
3
|
+
function n(n, r, i, a) {
|
|
4
|
+
let o = [];
|
|
5
|
+
for (let s of r) {
|
|
6
|
+
let r = n.find((e) => e.slug === s), c = r ? e(r.slug, i) : null;
|
|
7
|
+
if (!r || !c) continue;
|
|
8
|
+
let l = t(c, a);
|
|
9
|
+
o.push(l ? {
|
|
10
|
+
id: r.slug,
|
|
11
|
+
label: r.title,
|
|
12
|
+
href: l,
|
|
13
|
+
external: !0
|
|
14
|
+
} : {
|
|
15
|
+
id: r.slug,
|
|
16
|
+
label: r.title,
|
|
17
|
+
href: "",
|
|
18
|
+
inert: !0
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return o;
|
|
22
|
+
}
|
|
23
|
+
export { n as buildFooterLegalLinks };
|
|
@@ -358,6 +358,7 @@ export * from './ui/AssistantPageHost';
|
|
|
358
358
|
export * from './ui/assistantPageSurface';
|
|
359
359
|
export * from './ui/assistantPageLayout';
|
|
360
360
|
export * from './ui/assistantPageStart';
|
|
361
|
+
export * from './ui/assistantPageSettings';
|
|
361
362
|
export * from './ui/assistantPanelLoader';
|
|
362
363
|
export * from './ui/AssistantPanelPlaceholder';
|
|
363
364
|
export * from './openui/generativeUi';
|
|
@@ -403,6 +404,8 @@ export * from './ui/closeGuard';
|
|
|
403
404
|
export * from './ui/compact/compactChrome';
|
|
404
405
|
export * from './ui/compact/AssistantCompactHeader';
|
|
405
406
|
export * from './ui/compact/AssistantPageBar';
|
|
407
|
+
export * from './ui/compact/AssistantPanelLayoutField';
|
|
408
|
+
export * from './ui/compact/AssistantSettingsView';
|
|
406
409
|
export * from './ui/compact/AssistantConversationMenu';
|
|
407
410
|
export * from './ui/compact/AssistantDiscardDraftDialog';
|
|
408
411
|
export * from './ui/compact/AssistantMenuView';
|
|
@@ -32,209 +32,211 @@ import { AssistantWindowHeader as Le } from "./compact/AssistantWindowHeader.js"
|
|
|
32
32
|
import { AssistantPageBar as Re } from "./compact/AssistantPageBar.js";
|
|
33
33
|
import { avatarViewSwitchIds as ze } from "./compact/AssistantViewSwitch.js";
|
|
34
34
|
import { AssistantPageLayoutContext as Be } from "./assistantPageLayout.js";
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
35
|
+
import { useAssistantPageSettings as Ve } from "./assistantPageSettings.js";
|
|
36
|
+
import { AssistantSettingsView as He } from "./compact/AssistantSettingsView.js";
|
|
37
|
+
import { WINDOW_VOICE_IDLE as Ue, useAssistantWindowView as We } from "./compact/windowView.js";
|
|
38
|
+
import { closeRequestAction as Ge, useCompactExpandOffered as Ke } from "./compact/compactChrome.js";
|
|
39
|
+
import { useCallback as n, useEffect as r, useId as qe, useLayoutEffect as Je, useMemo as i, useRef as a, useState as o } from "react";
|
|
40
|
+
import { Fragment as Ye, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
39
41
|
// src/shared/assistant/ui/AIAssistantPanel.tsx
|
|
40
|
-
var
|
|
41
|
-
let
|
|
42
|
-
Ae(
|
|
43
|
-
let [
|
|
44
|
-
|
|
45
|
-
let
|
|
46
|
-
be(xe(
|
|
47
|
-
let
|
|
48
|
-
je(
|
|
49
|
-
let { conversations:
|
|
50
|
-
pt && (!
|
|
51
|
-
let
|
|
42
|
+
var Xe = { backgroundColor: "var(--color-bg-elevated)" }, l = ({ onClose: l, visible: u, docked: d, onToggleDock: f, writeAccess: Ze, onNavigate: Qe, isShellLessTarget: $e, connectSourceHref: et, onConnectSource: tt, preview: p, liveAvatar: m, presentation: h, onExpandedChange: g, surface: _, onOpenFull: v, avatarSettingsRequest: y, onMinimize: b, windowView: nt, onWindowViewChange: rt, pageHosted: x = !1, serverHistory: it = !1 }) => {
|
|
43
|
+
let at = ke(), ot = pe(m);
|
|
44
|
+
Ae(it);
|
|
45
|
+
let [st, S] = o(!1), C = Oe(p);
|
|
46
|
+
st && !C && S(!1);
|
|
47
|
+
let w = st && C, ct = Se();
|
|
48
|
+
be(xe(p, ct));
|
|
49
|
+
let T = a(null);
|
|
50
|
+
je(T);
|
|
51
|
+
let { conversations: lt, activeConversationId: ut, conversationListOpen: E, setConversationListOpen: D, createConversation: O } = t(), k = h === "compact", A = k && _ === "window", j = k && x && !A, dt = Ve(), M = j && dt, ft = t((e) => (e.conversations.find((t) => t.id === e.activeConversationId)?.messages.length ?? 0) > 0), [pt, N] = o(!1), [mt, P] = o("root"), [ht, gt] = o(0), _t = a(0);
|
|
52
|
+
pt && (!k || A || E || w) && N(!1);
|
|
53
|
+
let F = k && pt, [vt, I] = o(!1), L = Ke(k && !A && !x && g !== void 0), [R, yt] = o(!1), z = L && R;
|
|
52
54
|
r(() => {
|
|
53
|
-
|
|
55
|
+
R && !L && (yt(!1), g?.(!1));
|
|
54
56
|
}, [
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
R,
|
|
58
|
+
L,
|
|
59
|
+
g
|
|
58
60
|
]);
|
|
59
61
|
let bt = () => {
|
|
60
|
-
let e = !
|
|
61
|
-
yt(e),
|
|
62
|
-
}, xt = a(!1), St = a(
|
|
62
|
+
let e = !z;
|
|
63
|
+
yt(e), g?.(e);
|
|
64
|
+
}, xt = a(!1), St = a(g);
|
|
63
65
|
r(() => {
|
|
64
|
-
xt.current =
|
|
66
|
+
xt.current = z, St.current = g;
|
|
65
67
|
}), r(() => () => {
|
|
66
68
|
xt.current && St.current?.(!1);
|
|
67
69
|
}, []);
|
|
68
|
-
let
|
|
69
|
-
stored:
|
|
70
|
-
onRemember:
|
|
70
|
+
let B = E || w || F || M, V = m?.tab, H = me(V), [U, W] = o(!1), Ct = We({
|
|
71
|
+
stored: nt ?? null,
|
|
72
|
+
onRemember: rt
|
|
71
73
|
});
|
|
72
|
-
if (!
|
|
74
|
+
if (!k) U && (!V || u === !1) && W(!1);
|
|
73
75
|
else {
|
|
74
|
-
let e = !
|
|
75
|
-
e !==
|
|
76
|
+
let e = !j && Ct.view === "avatar" && V?.CompactView !== void 0 && u !== !1 && (H || U);
|
|
77
|
+
e !== U && W(e);
|
|
76
78
|
}
|
|
77
|
-
let wt =
|
|
78
|
-
chatTab: `${
|
|
79
|
-
avatarTab: `${
|
|
80
|
-
chatPanel: `${
|
|
81
|
-
avatarPanel: `${
|
|
82
|
-
leaveHint: `${
|
|
83
|
-
} : null, [wt,
|
|
84
|
-
|
|
85
|
-
}, [
|
|
86
|
-
|
|
87
|
-
}, []),
|
|
88
|
-
|
|
79
|
+
let wt = V !== void 0 && (H || U) && (!k || V.CompactView !== void 0), G = qe(), Tt = qe(), K = i(() => wt ? {
|
|
80
|
+
chatTab: `${G}-chat-tab`,
|
|
81
|
+
avatarTab: `${G}-avatar-tab`,
|
|
82
|
+
chatPanel: `${G}-chat-panel`,
|
|
83
|
+
avatarPanel: `${G}-avatar-panel`,
|
|
84
|
+
leaveHint: `${G}-avatar-leave`
|
|
85
|
+
} : null, [wt, G]), Et = n(() => W(!1), []), Dt = a(null), q = Ct.select, J = n((e) => {
|
|
86
|
+
Dt.current = e, q(e);
|
|
87
|
+
}, [q]), Ot = a(null), kt = n((e) => {
|
|
88
|
+
Ot.current = e;
|
|
89
|
+
}, []), Y = H ? V?.SettingsView : void 0, At = n(() => {
|
|
90
|
+
A ? v?.({ menu: "settings/avatar" }) : Y && (D(!1), S(!1), P("avatar"), gt((e) => e + 1), N(!0));
|
|
89
91
|
}, [
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
]), [
|
|
95
|
-
surface:
|
|
96
|
-
view:
|
|
97
|
-
selectView:
|
|
98
|
-
openSettings:
|
|
99
|
-
focusRequest:
|
|
92
|
+
A,
|
|
93
|
+
v,
|
|
94
|
+
Y,
|
|
95
|
+
D
|
|
96
|
+
]), [jt, Mt] = o(0), Nt = i(() => k ? {
|
|
97
|
+
surface: A ? "window" : "panel",
|
|
98
|
+
view: U ? "avatar" : "chat",
|
|
99
|
+
selectView: J,
|
|
100
|
+
openSettings: At,
|
|
101
|
+
focusRequest: jt
|
|
100
102
|
} : void 0, [
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
]),
|
|
108
|
-
open:
|
|
109
|
-
close:
|
|
110
|
-
ids:
|
|
111
|
-
covered:
|
|
112
|
-
setReplyEscape:
|
|
113
|
-
...
|
|
103
|
+
k,
|
|
104
|
+
A,
|
|
105
|
+
U,
|
|
106
|
+
J,
|
|
107
|
+
At,
|
|
108
|
+
jt
|
|
109
|
+
]), Pt = i(() => ({
|
|
110
|
+
open: U,
|
|
111
|
+
close: k ? () => J("chat") : Et,
|
|
112
|
+
ids: K,
|
|
113
|
+
covered: B,
|
|
114
|
+
setReplyEscape: kt,
|
|
115
|
+
...Nt ? { compact: Nt } : {}
|
|
114
116
|
}), [
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
Tt,
|
|
119
|
-
H,
|
|
120
|
-
F,
|
|
117
|
+
U,
|
|
118
|
+
k,
|
|
119
|
+
J,
|
|
121
120
|
Et,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
121
|
+
K,
|
|
122
|
+
B,
|
|
123
|
+
kt,
|
|
124
|
+
Nt
|
|
125
|
+
]), Ft = (e) => W(e === "avatar");
|
|
126
|
+
Je(() => {
|
|
127
|
+
let e = Dt.current;
|
|
128
|
+
if (e === null || (Dt.current = null, !K || e === "avatar" !== U)) return;
|
|
129
|
+
let t = U ? ze(K).avatarTab : K.chatTab;
|
|
128
130
|
document.getElementById(t)?.focus({ preventScroll: !0 });
|
|
129
131
|
}), r(() => {
|
|
130
|
-
|
|
132
|
+
k && y && _t.current !== y && (_t.current = y, Y && !A && (D(!1), S(!1), P("avatar"), gt(y), N(!0)));
|
|
131
133
|
}, [
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
k,
|
|
135
|
+
y,
|
|
136
|
+
Y,
|
|
137
|
+
A,
|
|
138
|
+
D
|
|
137
139
|
]);
|
|
138
|
-
let
|
|
139
|
-
historyOpen:
|
|
140
|
-
previewOpen:
|
|
141
|
-
avatarOpen:
|
|
142
|
-
}) ?? (
|
|
140
|
+
let It = Te({
|
|
141
|
+
historyOpen: E,
|
|
142
|
+
previewOpen: w,
|
|
143
|
+
avatarOpen: U
|
|
144
|
+
}) ?? (F ? "menu" : null), X = (e) => {
|
|
143
145
|
let t = De({
|
|
144
|
-
historyOpen:
|
|
145
|
-
previewOpen:
|
|
146
|
+
historyOpen: E,
|
|
147
|
+
previewOpen: w
|
|
146
148
|
}, e);
|
|
147
|
-
|
|
148
|
-
},
|
|
149
|
-
le("assistant.history",
|
|
150
|
-
let
|
|
149
|
+
D(t.historyOpen), S(t.previewOpen);
|
|
150
|
+
}, Lt = i(() => ({ run: () => E ? { status: "already" } : (D(!0), S(!1), { status: "done" }) }), [E, D]);
|
|
151
|
+
le("assistant.history", Lt);
|
|
152
|
+
let Rt = i(() => C ? {
|
|
151
153
|
surface: "panel",
|
|
152
|
-
run: () =>
|
|
153
|
-
close: () =>
|
|
154
|
+
run: () => w ? { status: "already" } : (D(!1), S(!0), { status: "done" }),
|
|
155
|
+
close: () => w ? (S(!1), { status: "done" }) : { status: "already" }
|
|
154
156
|
} : null, [
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
157
|
+
C,
|
|
158
|
+
w,
|
|
159
|
+
D
|
|
158
160
|
]);
|
|
159
|
-
le("assistant.preview",
|
|
160
|
-
let
|
|
161
|
-
te(
|
|
162
|
-
let
|
|
163
|
-
|
|
164
|
-
}, []),
|
|
165
|
-
compact:
|
|
166
|
-
unsent:
|
|
167
|
-
confirmed:
|
|
168
|
-
}) !== "close" && (
|
|
161
|
+
le("assistant.preview", Rt);
|
|
162
|
+
let zt = lt.find((e) => e.id === ut), Bt = zt?.backendSessionId ?? null;
|
|
163
|
+
te(Bt, zt?.mode ?? null, u ?? !0), e(u ?? !0);
|
|
164
|
+
let Vt = ne(u !== !1), Z = Me(), Ht = a(!1), Ut = n((e) => {
|
|
165
|
+
Ht.current = e;
|
|
166
|
+
}, []), Wt = a(!1), [Gt, Kt] = o(!1), Q = n(() => Ge({
|
|
167
|
+
compact: k,
|
|
168
|
+
unsent: Ht.current,
|
|
169
|
+
confirmed: Wt.current
|
|
170
|
+
}) !== "close" && (Kt(!0), !0), [k]);
|
|
169
171
|
r(() => {
|
|
170
|
-
if (
|
|
172
|
+
if (k && Z) return Z(Q);
|
|
171
173
|
}, [
|
|
172
|
-
|
|
173
|
-
|
|
174
|
+
k,
|
|
175
|
+
Z,
|
|
174
176
|
Q
|
|
175
177
|
]);
|
|
176
|
-
let
|
|
177
|
-
|
|
178
|
+
let qt = n(() => {
|
|
179
|
+
x || (A && b ? b() : Q() || l());
|
|
178
180
|
}, [
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
181
|
+
x,
|
|
182
|
+
A,
|
|
183
|
+
b,
|
|
182
184
|
Q,
|
|
183
185
|
l
|
|
184
|
-
]),
|
|
185
|
-
|
|
186
|
+
]), Jt = () => {
|
|
187
|
+
Wt.current = !0, Ht.current = !1, Kt(!1);
|
|
186
188
|
try {
|
|
187
189
|
l();
|
|
188
190
|
} finally {
|
|
189
|
-
|
|
191
|
+
Wt.current = !1;
|
|
190
192
|
}
|
|
191
|
-
},
|
|
192
|
-
|
|
193
|
-
}, [
|
|
194
|
-
|
|
195
|
-
}, []),
|
|
196
|
-
|
|
193
|
+
}, Yt = a(null), Xt = a(null), Zt = a(null), Qt = n(() => N(!1), []), [$t, en] = o(0), tn = n(() => {
|
|
194
|
+
O(), N(!1), D(!1), en((e) => e + 1);
|
|
195
|
+
}, [O, D]), [$, nn] = o(Ue), rn = n((e) => {
|
|
196
|
+
nn((t) => t.live === e.live ? t : e);
|
|
197
|
+
}, []), an = he(V), on = n((e) => {
|
|
198
|
+
v?.(), $.live || e?.review === !0 || (k && U ? Mt((e) => e + 1) : en((e) => e + 1));
|
|
197
199
|
}, [
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
]),
|
|
203
|
-
|
|
204
|
-
}, [
|
|
205
|
-
|
|
206
|
-
}, []),
|
|
200
|
+
v,
|
|
201
|
+
$.live,
|
|
202
|
+
k,
|
|
203
|
+
U
|
|
204
|
+
]), sn = n(() => {
|
|
205
|
+
q("chat"), en((e) => e + 1);
|
|
206
|
+
}, [q]), cn = n(() => {
|
|
207
|
+
N(!1), I(!0);
|
|
208
|
+
}, []), ln = a(!1);
|
|
207
209
|
return r(() => {
|
|
208
|
-
if (
|
|
210
|
+
if (ln.current && !F) {
|
|
209
211
|
let e = document.activeElement;
|
|
210
|
-
e && e !== document.body && e !==
|
|
212
|
+
e && e !== document.body && e !== T.current || Xt.current?.focus({ preventScroll: !0 });
|
|
211
213
|
}
|
|
212
|
-
|
|
213
|
-
}, [
|
|
214
|
-
|
|
215
|
-
}, [
|
|
216
|
-
panelRef:
|
|
217
|
-
inputRef:
|
|
218
|
-
onNewConversation:
|
|
219
|
-
onOpenConversationMenu:
|
|
214
|
+
ln.current = F;
|
|
215
|
+
}, [F]), r(() => {
|
|
216
|
+
$t > 0 && Yt.current?.focus({ preventScroll: !0 });
|
|
217
|
+
}, [$t]), ee({
|
|
218
|
+
panelRef: T,
|
|
219
|
+
inputRef: k ? Yt : void 0,
|
|
220
|
+
onNewConversation: k ? tn : void 0,
|
|
221
|
+
onOpenConversationMenu: k && !A ? cn : void 0,
|
|
220
222
|
onClose: () => {
|
|
221
223
|
let e = Ee({
|
|
222
|
-
historyOpen:
|
|
223
|
-
previewOpen:
|
|
224
|
-
avatarOpen:
|
|
225
|
-
tabReplySpeaking:
|
|
224
|
+
historyOpen: E,
|
|
225
|
+
previewOpen: w,
|
|
226
|
+
avatarOpen: U,
|
|
227
|
+
tabReplySpeaking: Ot.current !== null
|
|
226
228
|
});
|
|
227
|
-
e === "overlay" ? (
|
|
229
|
+
e === "overlay" ? (D(!1), S(!1)) : e === "tab-reply" ? Ot.current?.() : e === "tab" && k ? J("chat") : e === "tab" ? (W(!1), K && document.getElementById(K.chatTab)?.focus()) : F ? N(!1) : qt();
|
|
228
230
|
}
|
|
229
231
|
}), /* @__PURE__ */ s(ue, {
|
|
230
232
|
visible: u ?? !0,
|
|
231
|
-
engine:
|
|
233
|
+
engine: ot,
|
|
232
234
|
children: /* @__PURE__ */ s(de, {
|
|
233
|
-
value:
|
|
235
|
+
value: m,
|
|
234
236
|
children: /* @__PURE__ */ s(fe.Provider, {
|
|
235
|
-
value:
|
|
237
|
+
value: Pt,
|
|
236
238
|
children: /* @__PURE__ */ s(ve, {
|
|
237
|
-
value:
|
|
239
|
+
value: p,
|
|
238
240
|
children: /* @__PURE__ */ s(ae, {
|
|
239
241
|
navigate: Qe,
|
|
240
242
|
isShellLessTarget: $e,
|
|
@@ -242,110 +244,108 @@ var Je = { backgroundColor: "var(--color-bg-elevated)" }, l = ({ onClose: l, vis
|
|
|
242
244
|
value: et,
|
|
243
245
|
onOpen: tt,
|
|
244
246
|
children: /* @__PURE__ */ s(se, { children: /* @__PURE__ */ s(ce, { children: /* @__PURE__ */ s(Be.Provider, {
|
|
245
|
-
value:
|
|
247
|
+
value: j,
|
|
246
248
|
children: /* @__PURE__ */ c("div", {
|
|
247
|
-
ref:
|
|
249
|
+
ref: T,
|
|
248
250
|
className: "relative flex h-full w-full flex-col bg-bg-surface",
|
|
249
|
-
style:
|
|
251
|
+
style: A ? Xe : void 0,
|
|
250
252
|
role: "complementary",
|
|
251
|
-
"aria-label":
|
|
253
|
+
"aria-label": A ? at("window.title", "Quick assistant") : at("panel.ariaLabel", "AI Assistant"),
|
|
252
254
|
"data-testid": "ai-assistant-panel",
|
|
253
255
|
[we]: "",
|
|
254
|
-
...
|
|
255
|
-
...
|
|
256
|
+
...It ? { [Ce]: It } : {},
|
|
257
|
+
...k ? {
|
|
256
258
|
"data-presentation": "compact",
|
|
257
|
-
...
|
|
258
|
-
...
|
|
259
|
+
..._ ? { "data-assistant-surface": _ } : {},
|
|
260
|
+
...z ? { "data-assistant-expanded": "" } : {}
|
|
259
261
|
} : {},
|
|
260
|
-
...
|
|
262
|
+
...x ? { "data-assistant-page-hosted": "" } : {},
|
|
261
263
|
tabIndex: -1,
|
|
262
264
|
children: [
|
|
263
265
|
/* @__PURE__ */ c("div", {
|
|
264
266
|
className: "contents",
|
|
265
|
-
inert:
|
|
266
|
-
children: [
|
|
267
|
-
voiceLive:
|
|
268
|
-
avatarOn:
|
|
269
|
-
onOpenFull:
|
|
270
|
-
onMinimize: () =>
|
|
271
|
-
}) : ft ? /* @__PURE__ */ s(Re, {
|
|
272
|
-
menuOpen: A,
|
|
273
|
-
menuViewId: V,
|
|
274
|
-
onOpenMenu: () => {
|
|
275
|
-
k("root"), O(!0);
|
|
276
|
-
},
|
|
277
|
-
menuButtonRef: Wt,
|
|
267
|
+
inert: B || void 0,
|
|
268
|
+
children: [k ? /* @__PURE__ */ c(Ye, { children: [A ? /* @__PURE__ */ s(Le, {
|
|
269
|
+
voiceLive: $.live,
|
|
270
|
+
avatarOn: an,
|
|
271
|
+
onOpenFull: on,
|
|
272
|
+
onMinimize: () => b?.()
|
|
273
|
+
}) : j ? ft && !M ? /* @__PURE__ */ s(Re, {
|
|
278
274
|
conversationMenu: /* @__PURE__ */ s(Pe, {
|
|
279
275
|
open: vt,
|
|
280
|
-
onOpenChange:
|
|
281
|
-
triggerRef:
|
|
276
|
+
onOpenChange: I,
|
|
277
|
+
triggerRef: Zt
|
|
282
278
|
}),
|
|
283
|
-
onTogglePreview: () =>
|
|
284
|
-
previewOpen:
|
|
285
|
-
}) : /* @__PURE__ */ s(Ne, {
|
|
286
|
-
contextLabel:
|
|
287
|
-
menuOpen:
|
|
288
|
-
menuViewId:
|
|
279
|
+
onTogglePreview: () => X("preview"),
|
|
280
|
+
previewOpen: w
|
|
281
|
+
}) : null : /* @__PURE__ */ s(Ne, {
|
|
282
|
+
contextLabel: Vt,
|
|
283
|
+
menuOpen: F,
|
|
284
|
+
menuViewId: Tt,
|
|
289
285
|
onOpenMenu: () => {
|
|
290
|
-
|
|
286
|
+
P("root"), N(!0);
|
|
291
287
|
},
|
|
292
|
-
menuButtonRef:
|
|
288
|
+
menuButtonRef: Xt,
|
|
293
289
|
conversationMenu: /* @__PURE__ */ s(Pe, {
|
|
294
290
|
open: vt,
|
|
295
|
-
onOpenChange:
|
|
296
|
-
triggerRef:
|
|
291
|
+
onOpenChange: I,
|
|
292
|
+
triggerRef: Zt
|
|
297
293
|
}),
|
|
298
|
-
expandOffered:
|
|
299
|
-
expanded:
|
|
294
|
+
expandOffered: L,
|
|
295
|
+
expanded: z,
|
|
300
296
|
onToggleExpanded: bt,
|
|
301
|
-
onTogglePreview: () =>
|
|
302
|
-
previewOpen:
|
|
303
|
-
onClose:
|
|
297
|
+
onTogglePreview: () => X("preview"),
|
|
298
|
+
previewOpen: w,
|
|
299
|
+
onClose: x ? void 0 : qt
|
|
304
300
|
}), /* @__PURE__ */ s(Fe, {
|
|
305
|
-
open:
|
|
306
|
-
onKeep: () =>
|
|
307
|
-
onDiscard:
|
|
301
|
+
open: Gt,
|
|
302
|
+
onKeep: () => Kt(!1),
|
|
303
|
+
onDiscard: Jt
|
|
308
304
|
})] }) : /* @__PURE__ */ s(re, {
|
|
309
|
-
contextLabel:
|
|
310
|
-
onNewConversation: () =>
|
|
311
|
-
onOpenHistory: () =>
|
|
312
|
-
historyOpen:
|
|
313
|
-
onTogglePreview: () =>
|
|
314
|
-
previewOpen:
|
|
315
|
-
onClose:
|
|
316
|
-
docked:
|
|
317
|
-
onToggleDock:
|
|
318
|
-
}),
|
|
319
|
-
selected:
|
|
320
|
-
onSelect:
|
|
321
|
-
ids:
|
|
305
|
+
contextLabel: Vt,
|
|
306
|
+
onNewConversation: () => O(),
|
|
307
|
+
onOpenHistory: () => X("history"),
|
|
308
|
+
historyOpen: E,
|
|
309
|
+
onTogglePreview: () => X("preview"),
|
|
310
|
+
previewOpen: w,
|
|
311
|
+
onClose: x ? void 0 : l,
|
|
312
|
+
docked: d,
|
|
313
|
+
onToggleDock: x ? void 0 : f
|
|
314
|
+
}), K && !k ? /* @__PURE__ */ s(ge, {
|
|
315
|
+
selected: U ? "avatar" : "chat",
|
|
316
|
+
onSelect: Ft,
|
|
317
|
+
ids: K
|
|
322
318
|
}) : null]
|
|
323
319
|
}),
|
|
324
|
-
|
|
320
|
+
M ? /* @__PURE__ */ s(He, {
|
|
321
|
+
AvatarSettings: Y,
|
|
322
|
+
docked: d,
|
|
323
|
+
onToggleDock: f
|
|
324
|
+
}) : E ? /* @__PURE__ */ s(oe, { presentation: h }) : F ? /* @__PURE__ */ s(Ie, {
|
|
325
325
|
initialView: mt,
|
|
326
|
-
id:
|
|
327
|
-
onClose:
|
|
328
|
-
onRequestClosePanel:
|
|
329
|
-
onNewConversation:
|
|
330
|
-
AvatarSettings:
|
|
331
|
-
docked:
|
|
332
|
-
onToggleDock:
|
|
326
|
+
id: Tt,
|
|
327
|
+
onClose: Qt,
|
|
328
|
+
onRequestClosePanel: x ? void 0 : qt,
|
|
329
|
+
onNewConversation: tn,
|
|
330
|
+
AvatarSettings: Y,
|
|
331
|
+
docked: d,
|
|
332
|
+
onToggleDock: x ? void 0 : f
|
|
333
333
|
}, ht) : null,
|
|
334
|
-
|
|
334
|
+
w && /* @__PURE__ */ s(ye, { onClose: () => S(!1) }),
|
|
335
335
|
/* @__PURE__ */ s("div", {
|
|
336
336
|
className: "contents",
|
|
337
|
-
inert:
|
|
337
|
+
inert: B || void 0,
|
|
338
338
|
children: /* @__PURE__ */ s(ie, {
|
|
339
339
|
visible: u ?? !0,
|
|
340
340
|
writeAccess: Ze,
|
|
341
|
-
presentation:
|
|
342
|
-
inputRef:
|
|
343
|
-
onDraftDirtyChange:
|
|
344
|
-
...
|
|
345
|
-
surface:
|
|
346
|
-
onWindowVoiceChange:
|
|
347
|
-
onOpenFull:
|
|
348
|
-
onContinuedInChat:
|
|
341
|
+
presentation: h,
|
|
342
|
+
inputRef: k ? Yt : void 0,
|
|
343
|
+
onDraftDirtyChange: k ? Ut : void 0,
|
|
344
|
+
...A ? {
|
|
345
|
+
surface: _,
|
|
346
|
+
onWindowVoiceChange: rn,
|
|
347
|
+
onOpenFull: on,
|
|
348
|
+
onContinuedInChat: sn
|
|
349
349
|
} : {}
|
|
350
350
|
})
|
|
351
351
|
})
|
|
@@ -16,5 +16,10 @@ export interface AssistantPageHostProps {
|
|
|
16
16
|
fallback?: ReactNode;
|
|
17
17
|
/** The page's own content for a new chat, around the message box. Absent: the assistant's own empty state. */
|
|
18
18
|
start?: AssistantPageStart;
|
|
19
|
+
/**
|
|
20
|
+
* What the hosted panel shows: its chat (default), or only its settings (Voice & language, Avatar, Panel
|
|
21
|
+
* layout) over the kept chat, for a settings page (BOFF-13461: Settings › Assistant).
|
|
22
|
+
*/
|
|
23
|
+
view?: 'chat' | 'settings';
|
|
19
24
|
}
|
|
20
|
-
export declare function AssistantPageHost({ className, fallback, start }: AssistantPageHostProps): import('react').JSX.Element;
|
|
25
|
+
export declare function AssistantPageHost({ className, fallback, start, view, }: AssistantPageHostProps): import('react').JSX.Element;
|