@burdenoff/fe-libs 2026.1029.11 → 2026.1030.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.
- package/dist/connections/ConnectionDetailsTab.d.ts +4 -1
- package/dist/connections/ConnectionDetailsTab.js +18 -15
- package/dist/connections/ConnectionDialog.d.ts +8 -2
- package/dist/connections/ConnectionDialog.js +18 -17
- package/dist/connections/ConnectionDialogPanel.d.ts +3 -1
- package/dist/connections/ConnectionDialogPanel.js +141 -135
- package/dist/connections/ShareConnectionDialog.d.ts +23 -0
- package/dist/connections/ShareConnectionDialog.js +146 -0
- package/dist/connections/SharePanels.d.ts +32 -0
- package/dist/connections/SharePanels.js +158 -0
- package/dist/connections/VisibilityChoice.d.ts +12 -0
- package/dist/connections/VisibilityChoice.js +60 -0
- package/dist/connections/api.d.ts +12 -1
- package/dist/connections/api.js +1 -1
- package/dist/connections/connectionFlow.d.ts +6 -1
- package/dist/connections/connectionFlow.js +1 -1
- package/dist/connections/index.d.ts +4 -1
- package/dist/connections/sharingApi.d.ts +28 -0
- package/dist/connections/sharingApi.js +215 -0
- package/dist/connections/types.d.ts +31 -0
- package/dist/connections/useConnectionSharingDraft.d.ts +40 -0
- package/dist/connections/useConnectionSharingDraft.js +93 -0
- package/dist/connections.js +12 -9
- package/dist/shared/assistant/i18nManifest.d.ts +18 -0
- package/dist/shared/assistant/i18nManifest.js +18 -0
- package/dist/shared/assistant/index.d.ts +4 -0
- package/dist/shared/assistant/ui/AIAssistantPanel.d.ts +9 -1
- package/dist/shared/assistant/ui/AIAssistantPanel.js +194 -174
- package/dist/shared/assistant/ui/AssistantChatArea.d.ts +33 -0
- package/dist/shared/assistant/ui/AssistantChatArea.js +1463 -1397
- package/dist/shared/assistant/ui/AssistantLanguageMenu.d.ts +9 -1
- package/dist/shared/assistant/ui/AssistantLanguageMenu.js +22 -22
- package/dist/shared/assistant/ui/AssistantOverlay.d.ts +16 -2
- package/dist/shared/assistant/ui/AssistantOverlay.js +219 -200
- package/dist/shared/assistant/ui/assistantOverlayState.d.ts +16 -2
- package/dist/shared/assistant/ui/assistantOverlayState.js +57 -40
- package/dist/shared/assistant/ui/compact/AssistantConversationMenu.js +53 -52
- package/dist/shared/assistant/ui/compact/AssistantDiscardDraftDialog.js +3 -4
- package/dist/shared/assistant/ui/compact/AssistantLanguagePill.d.ts +29 -0
- package/dist/shared/assistant/ui/compact/AssistantLanguagePill.js +98 -0
- package/dist/shared/assistant/ui/compact/AssistantVoiceReady.d.ts +31 -0
- package/dist/shared/assistant/ui/compact/AssistantVoiceReady.js +41 -0
- package/dist/shared/assistant/ui/compact/AssistantWaitingChangeRow.d.ts +6 -0
- package/dist/shared/assistant/ui/compact/AssistantWaitingChangeRow.js +5 -5
- package/dist/shared/assistant/ui/compact/AssistantWindowHeader.d.ts +22 -5
- package/dist/shared/assistant/ui/compact/AssistantWindowHeader.js +45 -31
- package/dist/shared/assistant/ui/compact/windowView.d.ts +50 -0
- package/dist/shared/assistant/ui/compact/windowView.js +31 -0
- package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts +6 -0
- package/dist/shared/assistant/ui/composer/AssistantComposer.js +90 -89
- package/dist/shared/assistant/ui/composer/AssistantModeMenu.d.ts +6 -0
- package/dist/shared/assistant/ui/composer/AssistantModeMenu.js +83 -83
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts +31 -0
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +270 -166
- package/dist/shared/assistant/ui/voice/VoiceStage.d.ts +8 -0
- package/dist/shared/assistant/ui/voice/VoiceStage.js +10 -10
- package/dist/shared/assistant/voice/voiceStartedCue.d.ts +11 -0
- package/dist/shared/assistant/voice/voiceStartedCue.js +7 -0
- package/dist/shared-assistant.js +266 -262
- package/dist/ui/modal-shell.d.ts +6 -1
- package/dist/ui/modal-shell.js +7 -6
- package/package.json +1 -1
|
@@ -2,24 +2,24 @@ import { quotaExhaustedEventName as e } from "../quota.js";
|
|
|
2
2
|
import { useAssistantTr as t } from "../i18n.js";
|
|
3
3
|
import { assistantPanelOwnsEscape as n } from "./panelOverlays.js";
|
|
4
4
|
import { AssistantPreviewBridgeHost as r } from "../preview/bridgeHost.js";
|
|
5
|
-
import { ASSISTANT_COMPACT_DOCKED_DEFAULT_QUERY as i, ASSISTANT_DOCK_WIDTH_VAR as a, ASSISTANT_OVERLAY_DESKTOP_QUERY as o, ASSISTANT_OVERLAY_TOP_VAR as s, ASSISTANT_PANEL_INSET_VAR as c, ASSISTANT_SHEET_BOTTOM_VAR as l, ASSISTANT_WINDOW_BOTTOM_VAR as u, assistantCompactLauncherVisibility as d, assistantCompactOverlayClassName as f, assistantCompactOverlayKeys as p, assistantLauncherBottom as ee, assistantLauncherRight as m, assistantOverlayClassName as te, assistantOverlayEscapeAction as ne, assistantOverlayKeys as re, assistantQuotaKindOf as h, assistantWindowBottom as g, closestAround as ie, createAssistantNavigate as ae, isAssistantSurface as
|
|
5
|
+
import { ASSISTANT_COMPACT_DOCKED_DEFAULT_QUERY as i, ASSISTANT_DOCK_WIDTH_VAR as a, ASSISTANT_OVERLAY_DESKTOP_QUERY as o, ASSISTANT_OVERLAY_TOP_VAR as s, ASSISTANT_PANEL_INSET_VAR as c, ASSISTANT_SHEET_BOTTOM_VAR as l, ASSISTANT_WINDOW_BOTTOM_VAR as u, assistantCompactLauncherVisibility as d, assistantCompactOverlayClassName as f, assistantCompactOverlayKeys as p, assistantLauncherBottom as ee, assistantLauncherRight as m, assistantOverlayClassName as te, assistantOverlayEscapeAction as ne, assistantOverlayKeys as re, assistantQuotaKindOf as h, assistantWindowBottom as g, closestAround as ie, createAssistantNavigate as ae, isAssistantSurface as oe, isAssistantToggleShortcut as se, nextAssistantOpenState as _, publishedAssistantDockWidth as v, publishedAssistantPanelInset as ce, publishedCompactDockWidth as le, publishedCompactPanelInset as y, readAssistantLayoutChoice as ue, readAssistantLegacyDockChoice as de, readAssistantOverlayFlag as b, readAssistantWindowView as x, requestedAssistantOpenState as S, resolveCompactDocked as fe, writeAssistantLayoutChoice as C, writeAssistantOverlayFlag as w, writeAssistantWindowView as pe } from "./assistantOverlayState.js";
|
|
6
6
|
import { useAssistantServerHistory as T } from "../history/useAssistantServerHistory.js";
|
|
7
|
-
import { AssistantCloseGuardContext as
|
|
8
|
-
import { AIAssistantPanel as
|
|
9
|
-
import { useAssistantVisualViewport as
|
|
10
|
-
import { createContext as
|
|
11
|
-
import { Sparkles as
|
|
7
|
+
import { AssistantCloseGuardContext as E } from "./closeGuard.js";
|
|
8
|
+
import { AIAssistantPanel as D } from "./AIAssistantPanel.js";
|
|
9
|
+
import { useAssistantVisualViewport as me } from "./useAssistantVisualViewport.js";
|
|
10
|
+
import { createContext as O, useCallback as k, useContext as A, useEffect as j, useMemo as M, useRef as N, useState as P, useSyncExternalStore as F } from "react";
|
|
11
|
+
import { Sparkles as he } from "lucide-react";
|
|
12
12
|
import { jsx as I, jsxs as L } from "react/jsx-runtime";
|
|
13
13
|
//#region src/shared/assistant/ui/AssistantOverlay.tsx
|
|
14
|
-
var R =
|
|
14
|
+
var R = O(null);
|
|
15
15
|
function z() {
|
|
16
|
-
return
|
|
16
|
+
return A(R);
|
|
17
17
|
}
|
|
18
18
|
function B() {
|
|
19
|
-
return
|
|
19
|
+
return A(R)?.dockWidthPx ?? 0;
|
|
20
20
|
}
|
|
21
21
|
function V() {
|
|
22
|
-
return
|
|
22
|
+
return A(R)?.panelInsetPx ?? 0;
|
|
23
23
|
}
|
|
24
24
|
var H = () => typeof window > "u" ? void 0 : window.sessionStorage, U = () => typeof window > "u" ? void 0 : window.localStorage;
|
|
25
25
|
function W(e) {
|
|
@@ -30,20 +30,20 @@ function W(e) {
|
|
|
30
30
|
function G() {
|
|
31
31
|
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(min-width: 640px)").matches;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
return
|
|
33
|
+
function ge() {
|
|
34
|
+
return F(W, G, () => !1);
|
|
35
35
|
}
|
|
36
36
|
function K(t, n) {
|
|
37
|
-
let r =
|
|
38
|
-
|
|
37
|
+
let r = N(n);
|
|
38
|
+
j(() => {
|
|
39
39
|
r.current = n;
|
|
40
|
-
}, [n]),
|
|
40
|
+
}, [n]), j(() => {
|
|
41
41
|
if (!t || typeof window > "u") return;
|
|
42
42
|
let n = e(t), i = (e) => r.current(h(e), e);
|
|
43
43
|
return window.addEventListener(n, i), () => window.removeEventListener(n, i);
|
|
44
44
|
}, [t]);
|
|
45
45
|
}
|
|
46
|
-
var
|
|
46
|
+
var _e = () => {};
|
|
47
47
|
function q(e) {
|
|
48
48
|
if (typeof window > "u" || typeof window.matchMedia != "function") return () => {};
|
|
49
49
|
let t = window.matchMedia(i);
|
|
@@ -53,101 +53,109 @@ function J() {
|
|
|
53
53
|
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(i).matches;
|
|
54
54
|
}
|
|
55
55
|
var Y = () => () => {}, X = () => !1;
|
|
56
|
-
function
|
|
57
|
-
return
|
|
56
|
+
function ve(e) {
|
|
57
|
+
return F(e ? q : Y, e ? J : X, X);
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
let i =
|
|
61
|
-
|
|
59
|
+
function Z({ keyPrefix: e, quota: t, presentation: n = "classic", children: r }) {
|
|
60
|
+
let i = M(() => re(e), [e]), o = M(() => p(e), [e]), s = n === "compact", l = N(s);
|
|
61
|
+
j(() => {
|
|
62
62
|
l.current = s;
|
|
63
63
|
}, [s]);
|
|
64
|
-
let [u, d] =
|
|
64
|
+
let [u, d] = P(() => b(H, i.openStorageKey)), [f, ee] = P(() => b(U, i.dockStorageKey)), [m, te] = P(() => {
|
|
65
65
|
if (!s) return "panel";
|
|
66
66
|
try {
|
|
67
67
|
let e = H()?.getItem(o.surfaceStorageKey);
|
|
68
|
-
return
|
|
68
|
+
return oe(e) ? e : "panel";
|
|
69
69
|
} catch {
|
|
70
70
|
return "panel";
|
|
71
71
|
}
|
|
72
|
-
}), [ne, h] =
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
}), [ne, h] = P(() => s && b(H, o.minimizedStorageKey)), g = s && u && m === "window" && ne, [ie, ae] = P(!1), T = s && u && m === "panel" && ie, [E, D] = P(() => s ? x(U, o.windowViewStorageKey) : null), me = k((e) => {
|
|
73
|
+
l.current && D(e);
|
|
74
|
+
}, []), [O] = P(() => s ? {
|
|
75
|
+
explicit: ue(U, o.layoutStorageKey),
|
|
76
|
+
legacy: de(U, i.dockStorageKey)
|
|
75
77
|
} : {
|
|
76
78
|
explicit: null,
|
|
77
79
|
legacy: null
|
|
78
|
-
}), [
|
|
79
|
-
explicit:
|
|
80
|
-
legacy:
|
|
81
|
-
wideViewport:
|
|
82
|
-
}) : f,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}, [
|
|
86
|
-
let
|
|
87
|
-
|
|
88
|
-
|
|
80
|
+
}), [A, F] = P(null), he = ve(s), L = s ? fe({
|
|
81
|
+
explicit: A ?? O.explicit,
|
|
82
|
+
legacy: O.legacy,
|
|
83
|
+
wideViewport: he
|
|
84
|
+
}) : f, z = N(L);
|
|
85
|
+
j(() => {
|
|
86
|
+
z.current = L;
|
|
87
|
+
}, [L]);
|
|
88
|
+
let B = N(null), V = N(u);
|
|
89
|
+
j(() => {
|
|
90
|
+
V.current = u;
|
|
89
91
|
}, [u]);
|
|
90
|
-
let
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}, [
|
|
94
|
-
let
|
|
95
|
-
let e =
|
|
92
|
+
let W = N(!1), G = u && (!s || m === "panel" && !g);
|
|
93
|
+
j(() => {
|
|
94
|
+
W.current = G;
|
|
95
|
+
}, [G]);
|
|
96
|
+
let q = k(() => {
|
|
97
|
+
let e = B.current?.() === !0;
|
|
96
98
|
return e && l.current && h(!1), e;
|
|
97
|
-
}, []),
|
|
98
|
-
|
|
99
|
-
}), []),
|
|
99
|
+
}, []), J = k((e) => (B.current = e, () => {
|
|
100
|
+
B.current === e && (B.current = null);
|
|
101
|
+
}), []), Y = k(() => {
|
|
100
102
|
d(!0), te("panel"), h(!1);
|
|
101
|
-
}, []),
|
|
103
|
+
}, []), X = k(() => {
|
|
102
104
|
d(!1), h(!1), ae(!1);
|
|
103
|
-
}, []),
|
|
104
|
-
l.current ?
|
|
105
|
-
}, [
|
|
106
|
-
|
|
107
|
-
}, [
|
|
105
|
+
}, []), Z = k(() => {
|
|
106
|
+
l.current ? Y() : d(!0);
|
|
107
|
+
}, [Y]), ye = k(() => {
|
|
108
|
+
q() || (l.current ? X() : d(!1));
|
|
109
|
+
}, [q, X]), be = k(() => {
|
|
108
110
|
if (l.current) {
|
|
109
|
-
if (
|
|
110
|
-
if (
|
|
111
|
-
|
|
112
|
-
} else
|
|
111
|
+
if (W.current) {
|
|
112
|
+
if (q()) return;
|
|
113
|
+
X();
|
|
114
|
+
} else Y();
|
|
113
115
|
return;
|
|
114
116
|
}
|
|
115
|
-
|
|
117
|
+
V.current && q() || d((e) => !e);
|
|
116
118
|
}, [
|
|
117
|
-
V,
|
|
118
119
|
q,
|
|
119
|
-
|
|
120
|
-
|
|
120
|
+
X,
|
|
121
|
+
Y
|
|
122
|
+
]), xe = k(() => {
|
|
121
123
|
if (l.current) {
|
|
122
|
-
let e =
|
|
123
|
-
|
|
124
|
+
let e = z.current ? "floating" : "docked";
|
|
125
|
+
z.current = e === "docked", F(e);
|
|
124
126
|
return;
|
|
125
127
|
}
|
|
126
128
|
ee((e) => !e);
|
|
127
|
-
}, []),
|
|
129
|
+
}, []), Se = Z, Ce = k(() => {
|
|
128
130
|
if (!l.current) {
|
|
129
131
|
d(!0);
|
|
130
132
|
return;
|
|
131
133
|
}
|
|
132
|
-
|
|
133
|
-
}, []),
|
|
134
|
-
!l.current || !
|
|
134
|
+
W.current || (d(!0), te("window"), h(!1));
|
|
135
|
+
}, []), we = k(() => {
|
|
136
|
+
!l.current || !V.current || W.current || h(!0);
|
|
135
137
|
}, []);
|
|
136
|
-
|
|
138
|
+
j(() => {
|
|
137
139
|
w(H, i.openStorageKey, u);
|
|
138
|
-
}, [i.openStorageKey, u]),
|
|
140
|
+
}, [i.openStorageKey, u]), j(() => {
|
|
139
141
|
s || w(U, i.dockStorageKey, f);
|
|
140
142
|
}, [
|
|
141
143
|
s,
|
|
142
144
|
i.dockStorageKey,
|
|
143
145
|
f
|
|
144
|
-
]),
|
|
145
|
-
!s ||
|
|
146
|
+
]), j(() => {
|
|
147
|
+
!s || A === null || C(U, o.layoutStorageKey, A);
|
|
146
148
|
}, [
|
|
147
149
|
s,
|
|
148
150
|
o.layoutStorageKey,
|
|
151
|
+
A
|
|
152
|
+
]), j(() => {
|
|
153
|
+
!s || E === null || pe(U, o.windowViewStorageKey, E);
|
|
154
|
+
}, [
|
|
155
|
+
s,
|
|
156
|
+
o.windowViewStorageKey,
|
|
149
157
|
E
|
|
150
|
-
]),
|
|
158
|
+
]), j(() => {
|
|
151
159
|
if (s) try {
|
|
152
160
|
H()?.setItem(o.surfaceStorageKey, m);
|
|
153
161
|
} catch {}
|
|
@@ -155,161 +163,168 @@ function _e({ keyPrefix: e, quota: t, presentation: n = "classic", children: r }
|
|
|
155
163
|
s,
|
|
156
164
|
o.surfaceStorageKey,
|
|
157
165
|
m
|
|
158
|
-
]),
|
|
166
|
+
]), j(() => {
|
|
159
167
|
s && w(H, o.minimizedStorageKey, g);
|
|
160
168
|
}, [
|
|
161
169
|
s,
|
|
162
170
|
o.minimizedStorageKey,
|
|
163
171
|
g
|
|
164
|
-
]),
|
|
172
|
+
]), j(() => {
|
|
165
173
|
if (typeof window > "u") return;
|
|
166
174
|
let e = (e) => {
|
|
167
175
|
let t = S(e);
|
|
168
176
|
if (l.current) {
|
|
169
|
-
t === !0 ?
|
|
177
|
+
t === !0 ? Y() : t === !1 ? V.current && !q() && X() : W.current ? q() || X() : Y();
|
|
170
178
|
return;
|
|
171
179
|
}
|
|
172
|
-
|
|
180
|
+
V.current && !_(!0, t) && B.current?.() === !0 || d((e) => _(e, t));
|
|
173
181
|
};
|
|
174
182
|
return window.addEventListener(i.toggleEvent, e), () => window.removeEventListener(i.toggleEvent, e);
|
|
175
183
|
}, [
|
|
176
184
|
i.toggleEvent,
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
]),
|
|
185
|
+
Y,
|
|
186
|
+
X,
|
|
187
|
+
q
|
|
188
|
+
]), j(() => {
|
|
181
189
|
if (typeof document > "u") return;
|
|
182
190
|
let e = (e) => {
|
|
183
|
-
if (
|
|
191
|
+
if (se(e)) {
|
|
184
192
|
if (e.preventDefault(), l.current) {
|
|
185
|
-
|
|
193
|
+
W.current ? q() || X() : Y();
|
|
186
194
|
return;
|
|
187
195
|
}
|
|
188
|
-
|
|
196
|
+
V.current && B.current?.() === !0 || d((e) => !e);
|
|
189
197
|
}
|
|
190
198
|
};
|
|
191
199
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
192
200
|
}, [
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
]), K(t?.product ?? null, t?.onExhausted ??
|
|
197
|
-
let
|
|
201
|
+
Y,
|
|
202
|
+
X,
|
|
203
|
+
q
|
|
204
|
+
]), K(t?.product ?? null, t?.onExhausted ?? _e);
|
|
205
|
+
let Q = ge(), $ = s ? le({
|
|
198
206
|
isOpen: u,
|
|
199
|
-
docked:
|
|
200
|
-
isDesktop:
|
|
207
|
+
docked: L,
|
|
208
|
+
isDesktop: Q,
|
|
201
209
|
surface: m,
|
|
202
210
|
expanded: T
|
|
203
|
-
}) :
|
|
211
|
+
}) : v({
|
|
204
212
|
isOpen: u,
|
|
205
213
|
docked: f,
|
|
206
|
-
isDesktop:
|
|
207
|
-
}),
|
|
214
|
+
isDesktop: Q
|
|
215
|
+
}), Te = s ? y({
|
|
208
216
|
isOpen: u,
|
|
209
|
-
docked:
|
|
210
|
-
isDesktop:
|
|
217
|
+
docked: L,
|
|
218
|
+
isDesktop: Q,
|
|
211
219
|
surface: m,
|
|
212
220
|
expanded: T
|
|
213
|
-
}) :
|
|
221
|
+
}) : ce({
|
|
214
222
|
isOpen: u,
|
|
215
223
|
docked: f,
|
|
216
|
-
isDesktop:
|
|
224
|
+
isDesktop: Q
|
|
217
225
|
});
|
|
218
|
-
|
|
226
|
+
j(() => {
|
|
219
227
|
if (typeof document > "u") return;
|
|
220
228
|
let e = document.documentElement.style;
|
|
221
|
-
return e.setProperty(a, `${
|
|
229
|
+
return e.setProperty(a, `${$}px`), () => {
|
|
222
230
|
e.removeProperty(a);
|
|
223
231
|
};
|
|
224
|
-
}, [
|
|
232
|
+
}, [$]), j(() => {
|
|
225
233
|
if (typeof document > "u") return;
|
|
226
234
|
let e = document.documentElement.style;
|
|
227
|
-
return e.setProperty(c, `${
|
|
235
|
+
return e.setProperty(c, `${Te}px`), () => {
|
|
228
236
|
e.removeProperty(c);
|
|
229
237
|
};
|
|
230
|
-
}, [
|
|
231
|
-
let
|
|
238
|
+
}, [Te]);
|
|
239
|
+
let Ee = M(() => ({
|
|
232
240
|
isOpen: u,
|
|
233
|
-
open:
|
|
234
|
-
close:
|
|
235
|
-
toggle:
|
|
236
|
-
docked:
|
|
237
|
-
toggleDock:
|
|
238
|
-
dockWidthPx:
|
|
239
|
-
panelInsetPx:
|
|
241
|
+
open: Z,
|
|
242
|
+
close: ye,
|
|
243
|
+
toggle: be,
|
|
244
|
+
docked: L,
|
|
245
|
+
toggleDock: xe,
|
|
246
|
+
dockWidthPx: $,
|
|
247
|
+
panelInsetPx: Te,
|
|
240
248
|
keys: i,
|
|
241
|
-
registerCloseGuard:
|
|
249
|
+
registerCloseGuard: J,
|
|
242
250
|
presentation: n,
|
|
243
251
|
surface: m,
|
|
244
252
|
minimized: g,
|
|
245
|
-
fullOpen:
|
|
246
|
-
openFull:
|
|
247
|
-
openWindow:
|
|
248
|
-
minimize:
|
|
253
|
+
fullOpen: G,
|
|
254
|
+
openFull: Se,
|
|
255
|
+
openWindow: Ce,
|
|
256
|
+
minimize: we,
|
|
249
257
|
expanded: T,
|
|
250
|
-
setExpanded: ae
|
|
258
|
+
setExpanded: ae,
|
|
259
|
+
windowView: s ? E : null,
|
|
260
|
+
setWindowView: me
|
|
251
261
|
}), [
|
|
252
262
|
u,
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
Q,
|
|
263
|
+
Z,
|
|
264
|
+
ye,
|
|
265
|
+
be,
|
|
266
|
+
L,
|
|
267
|
+
xe,
|
|
259
268
|
$,
|
|
269
|
+
Te,
|
|
260
270
|
i,
|
|
261
|
-
|
|
271
|
+
J,
|
|
262
272
|
n,
|
|
263
273
|
m,
|
|
264
274
|
g,
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
T
|
|
275
|
+
G,
|
|
276
|
+
Se,
|
|
277
|
+
Ce,
|
|
278
|
+
we,
|
|
279
|
+
T,
|
|
280
|
+
s,
|
|
281
|
+
E,
|
|
282
|
+
me
|
|
270
283
|
]);
|
|
271
284
|
return /* @__PURE__ */ I(R.Provider, {
|
|
272
|
-
value:
|
|
285
|
+
value: Ee,
|
|
273
286
|
children: r
|
|
274
287
|
});
|
|
275
288
|
}
|
|
276
|
-
var
|
|
289
|
+
var ye = (e, t) => /* @__PURE__ */ I(D, {
|
|
277
290
|
...e,
|
|
278
291
|
...t
|
|
279
292
|
});
|
|
280
|
-
function
|
|
293
|
+
function be(e) {
|
|
281
294
|
let t = z();
|
|
282
|
-
return t ? /* @__PURE__ */ I(
|
|
295
|
+
return t ? /* @__PURE__ */ I(xe, {
|
|
283
296
|
state: t,
|
|
284
297
|
...e
|
|
285
298
|
}) : null;
|
|
286
299
|
}
|
|
287
|
-
function
|
|
288
|
-
let { isOpen:
|
|
300
|
+
function xe({ state: e, panelId: i = "ai-assistant", panelProps: a, renderPanel: o, navigate: c, isShellLessTarget: p, topOffsetPx: re = 56, launcherIcon: h, launcherBottomInset: oe = "1.5rem", showLauncher: se = !0, closeOnEscape: _ = !0 }) {
|
|
301
|
+
let { isOpen: v, close: ce, toggle: le, docked: y, toggleDock: ue, dockWidthPx: de } = e, b = e.presentation === "compact", { surface: x, minimized: S, setExpanded: fe } = e, C = t();
|
|
289
302
|
T(a?.serverHistory === !0);
|
|
290
|
-
let [
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
}, [
|
|
294
|
-
|
|
295
|
-
|
|
303
|
+
let [w, pe] = P(!1), D = N(null), O = N(null), A = ge(), [F, R] = P(0), [z, B] = P(0);
|
|
304
|
+
j(() => {
|
|
305
|
+
F !== 0 && D.current?.querySelector("[data-testid=\"assistant-input\"]")?.focus({ preventScroll: !0 });
|
|
306
|
+
}, [F]), j(() => {
|
|
307
|
+
z !== 0 && D.current?.querySelector("[data-testid=\"assistant-window-view-chat\"]")?.focus({ preventScroll: !0 });
|
|
308
|
+
}, [z]), me(D, b && v && !S && !A);
|
|
309
|
+
let V = N(a?.onExpandedChange);
|
|
310
|
+
j(() => {
|
|
296
311
|
V.current = a?.onExpandedChange;
|
|
297
312
|
});
|
|
298
|
-
let H =
|
|
299
|
-
|
|
300
|
-
}, [
|
|
313
|
+
let H = k((e) => {
|
|
314
|
+
fe(e), V.current?.(e);
|
|
315
|
+
}, [fe]), U = M(() => c ? ae({
|
|
301
316
|
navigate: c,
|
|
302
317
|
isShellLessTarget: p,
|
|
303
318
|
isDesktop: G,
|
|
304
|
-
collapseSheet: () =>
|
|
319
|
+
collapseSheet: () => pe(!1),
|
|
305
320
|
openInNewTab: (e) => window.open(e, "_blank", "noopener,noreferrer")
|
|
306
|
-
}) : void 0, [c, p]), W =
|
|
307
|
-
|
|
308
|
-
if (!
|
|
321
|
+
}) : void 0, [c, p]), W = b && x === "window" ? e.minimize : ce;
|
|
322
|
+
j(() => {
|
|
323
|
+
if (!v || !_ || S) return;
|
|
309
324
|
let e = (e) => {
|
|
310
325
|
ne({
|
|
311
326
|
key: e.key,
|
|
312
|
-
isOpen:
|
|
327
|
+
isOpen: v,
|
|
313
328
|
alreadyHandled: e.defaultPrevented,
|
|
314
329
|
dialogOpen: document.querySelector("[role=\"dialog\"],[role=\"alertdialog\"],dialog[open]") !== null,
|
|
315
330
|
pressedInsideDialog: ie(e.target, "[role=\"dialog\"],[role=\"alertdialog\"],dialog[open]") !== null,
|
|
@@ -318,66 +333,69 @@ function be({ state: e, panelId: i = "ai-assistant", panelProps: a, renderPanel:
|
|
|
318
333
|
};
|
|
319
334
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
320
335
|
}, [
|
|
321
|
-
|
|
322
|
-
|
|
336
|
+
v,
|
|
337
|
+
S,
|
|
323
338
|
W,
|
|
324
|
-
|
|
339
|
+
_
|
|
325
340
|
]);
|
|
326
|
-
let K =
|
|
327
|
-
|
|
328
|
-
if (
|
|
341
|
+
let K = N(S);
|
|
342
|
+
j(() => {
|
|
343
|
+
if (b && S && !K.current) {
|
|
329
344
|
let e = document.activeElement;
|
|
330
|
-
(!e || e === document.body ||
|
|
345
|
+
(!e || e === document.body || D.current?.contains(e)) && O.current?.focus({ preventScroll: !0 });
|
|
331
346
|
}
|
|
332
|
-
K.current =
|
|
333
|
-
}, [
|
|
334
|
-
let
|
|
347
|
+
K.current = S;
|
|
348
|
+
}, [b, S]);
|
|
349
|
+
let _e = {
|
|
335
350
|
panelId: i,
|
|
336
|
-
visible: !
|
|
337
|
-
onClose:
|
|
338
|
-
docked:
|
|
339
|
-
onToggleDock:
|
|
351
|
+
visible: !S,
|
|
352
|
+
onClose: ce,
|
|
353
|
+
docked: y,
|
|
354
|
+
onToggleDock: ue,
|
|
340
355
|
onNavigate: U,
|
|
341
356
|
isShellLessTarget: p,
|
|
342
|
-
...
|
|
357
|
+
...b ? {
|
|
343
358
|
presentation: "compact",
|
|
344
|
-
surface:
|
|
359
|
+
surface: x,
|
|
345
360
|
onOpenFull: e.openFull,
|
|
346
361
|
onMinimize: e.minimize,
|
|
347
|
-
onExpandedChange: H
|
|
362
|
+
onExpandedChange: H,
|
|
363
|
+
windowView: e.windowView,
|
|
364
|
+
onWindowViewChange: e.setWindowView
|
|
348
365
|
} : {}
|
|
349
|
-
}, q =
|
|
366
|
+
}, q = b ? C("overlay.launcherQuick", "Open quick assistant") : C("overlay.launcher", "AI Assistant"), J = {
|
|
350
367
|
[s]: `${re}px`,
|
|
351
368
|
[l]: "var(--mobile-tabbar-height, 0px)"
|
|
352
369
|
}, Y = {
|
|
353
370
|
...J,
|
|
354
|
-
[u]: g(
|
|
355
|
-
}, X =
|
|
356
|
-
isOpen:
|
|
357
|
-
surface:
|
|
358
|
-
minimized:
|
|
359
|
-
}) :
|
|
360
|
-
!
|
|
371
|
+
[u]: g(oe)
|
|
372
|
+
}, X = b ? d({
|
|
373
|
+
isOpen: v,
|
|
374
|
+
surface: x,
|
|
375
|
+
minimized: S
|
|
376
|
+
}) : v ? "desktop-only" : "always", ve = (t) => {
|
|
377
|
+
!b || e.fullOpen ? le() : v && !S ? e.minimize() : (e.openWindow(), A || t.detail === 0 ? R((e) => e + 1) : B((e) => e + 1));
|
|
361
378
|
};
|
|
362
379
|
return /* @__PURE__ */ L(r, {
|
|
363
380
|
preview: a?.preview,
|
|
364
|
-
children: [
|
|
365
|
-
ref:
|
|
366
|
-
className:
|
|
367
|
-
surface:
|
|
368
|
-
minimized:
|
|
369
|
-
docked:
|
|
381
|
+
children: [v && /* @__PURE__ */ L("div", {
|
|
382
|
+
ref: D,
|
|
383
|
+
className: b ? f({
|
|
384
|
+
surface: x,
|
|
385
|
+
minimized: S,
|
|
386
|
+
docked: y,
|
|
370
387
|
expanded: e.expanded,
|
|
371
|
-
sheetExpanded:
|
|
388
|
+
sheetExpanded: w
|
|
372
389
|
}) : te({
|
|
373
|
-
expanded:
|
|
374
|
-
docked:
|
|
390
|
+
expanded: w,
|
|
391
|
+
docked: y
|
|
375
392
|
}),
|
|
376
|
-
style:
|
|
393
|
+
style: b ? Y : J,
|
|
377
394
|
"data-testid": "assistant-overlay",
|
|
378
|
-
...
|
|
379
|
-
|
|
380
|
-
|
|
395
|
+
...b ? {
|
|
396
|
+
id: i,
|
|
397
|
+
"data-surface": x,
|
|
398
|
+
...S ? {
|
|
381
399
|
hidden: !0,
|
|
382
400
|
inert: !0,
|
|
383
401
|
"data-minimized": ""
|
|
@@ -385,34 +403,35 @@ function be({ state: e, panelId: i = "ai-assistant", panelProps: a, renderPanel:
|
|
|
385
403
|
} : {},
|
|
386
404
|
children: [/* @__PURE__ */ I("button", {
|
|
387
405
|
type: "button",
|
|
388
|
-
onClick: () =>
|
|
406
|
+
onClick: () => pe((e) => !e),
|
|
389
407
|
className: "flex w-full shrink-0 justify-center pt-2 pb-1 sm:hidden",
|
|
390
|
-
"aria-label":
|
|
391
|
-
"aria-expanded":
|
|
408
|
+
"aria-label": w ? C("sheet.collapse", "Shrink the assistant") : C("sheet.expand", "Expand the assistant"),
|
|
409
|
+
"aria-expanded": w,
|
|
392
410
|
"data-testid": "assistant-sheet-handle",
|
|
393
411
|
children: /* @__PURE__ */ I("span", { className: "h-1.5 w-10 rounded-full bg-border-strong" })
|
|
394
412
|
}), /* @__PURE__ */ I("div", {
|
|
395
413
|
className: "flex min-h-0 flex-1 flex-col",
|
|
396
|
-
children: /* @__PURE__ */ I(
|
|
414
|
+
children: /* @__PURE__ */ I(E.Provider, {
|
|
397
415
|
value: e.registerCloseGuard ?? null,
|
|
398
|
-
children: o ? o(
|
|
416
|
+
children: o ? o(_e) : ye(a, _e)
|
|
399
417
|
})
|
|
400
418
|
})]
|
|
401
|
-
}),
|
|
402
|
-
ref:
|
|
419
|
+
}), se && /* @__PURE__ */ I("button", {
|
|
420
|
+
ref: O,
|
|
403
421
|
type: "button",
|
|
404
|
-
onClick:
|
|
405
|
-
title:
|
|
422
|
+
onClick: ve,
|
|
423
|
+
title: b ? q : C("overlay.launcherTitle", "AI Assistant ({{shortcut}})", { shortcut: "Ctrl+Shift+A" }),
|
|
406
424
|
"aria-label": q,
|
|
407
|
-
"aria-haspopup":
|
|
408
|
-
"aria-expanded":
|
|
425
|
+
"aria-haspopup": b ? void 0 : "dialog",
|
|
426
|
+
"aria-expanded": b ? v && !S : v,
|
|
427
|
+
...b && v ? { "aria-controls": i } : {},
|
|
409
428
|
"data-testid": "assistant-fab",
|
|
410
429
|
style: {
|
|
411
|
-
bottom: ee(
|
|
412
|
-
right: m(
|
|
430
|
+
bottom: ee(oe),
|
|
431
|
+
right: m(de)
|
|
413
432
|
},
|
|
414
433
|
className: "fixed 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 " + (X === "hidden" ? "hidden" : X === "desktop-only" ? "hidden sm:inline-flex" : "inline-flex"),
|
|
415
|
-
children: h ?? /* @__PURE__ */ I(
|
|
434
|
+
children: h ?? /* @__PURE__ */ I(he, {
|
|
416
435
|
className: "size-6",
|
|
417
436
|
"aria-hidden": "true"
|
|
418
437
|
})
|
|
@@ -420,4 +439,4 @@ function be({ state: e, panelId: i = "ai-assistant", panelProps: a, renderPanel:
|
|
|
420
439
|
});
|
|
421
440
|
}
|
|
422
441
|
//#endregion
|
|
423
|
-
export {
|
|
442
|
+
export { be as AssistantOverlay, Z as AssistantOverlayProvider, B as useAssistantDockWidth, z as useAssistantOverlayOrNull, V as useAssistantPanelInset, K as useAssistantQuotaExhausted };
|