@burdenoff/fe-libs 2026.1013.14 → 2026.1014.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/chrome/AppShellLayout.js +17 -8
- package/dist/shared/assistant/ui/AssistantOverlay.js +98 -95
- package/dist/shared/assistant/ui/assistantOverlayState.d.ts +12 -0
- package/dist/shared/assistant/ui/assistantOverlayState.js +14 -14
- package/dist/shared/providers/shell/AuthProvider.js +92 -97
- package/dist/shared/providers/shell/ProfileStorageManager.d.ts +20 -0
- package/dist/shared/providers/shell/ProfileStorageManager.js +88 -71
- package/dist/shared-assistant.js +127 -127
- package/package.json +2 -2
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
//#region src/chrome/AppShellLayout.tsx
|
|
3
3
|
var r = ({ header: r, sidebar: i, footer: a, bottomPanel: o, rightPanel: s, statusBar: c, children: l, headerVisible: u = !0, footerVisible: d = !0, sidebarVisible: f = !0, contentClassName: p, contentPadding: m = "px-6 lg:px-8 py-6", footerInContent: h = !1, safeArea: g = !0, bottomBar: _, nativeCompact: v = !1 }) => {
|
|
4
|
-
let y = v ? "p-0" : m, b = h ? `flex-1 overflow-auto bg-bg-canvas flex flex-col ${y}` : `flex-1 overflow-auto bg-bg-canvas ${y}`, x = p || b, S = g ? {
|
|
5
|
-
paddingTop:
|
|
6
|
-
paddingBottom:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
let y = v ? "p-0" : m, b = h ? `flex-1 overflow-auto bg-bg-canvas flex flex-col ${y}` : `flex-1 overflow-auto bg-bg-canvas ${y}`, x = p || b, S = "max(var(--safe-top, 0px), env(safe-area-inset-top, 0px))", C = "max(var(--safe-bottom, 0px), env(safe-area-inset-bottom, 0px))", w = "max(var(--safe-left, 0px), env(safe-area-inset-left, 0px))", T = "max(var(--safe-right, 0px), env(safe-area-inset-right, 0px))", E = g ? v ? {
|
|
5
|
+
paddingTop: v && u && r ? void 0 : S,
|
|
6
|
+
paddingBottom: _ ? void 0 : C
|
|
7
|
+
} : {
|
|
8
|
+
paddingTop: S,
|
|
9
|
+
paddingBottom: C,
|
|
10
|
+
paddingLeft: w,
|
|
11
|
+
paddingRight: T
|
|
12
|
+
} : {}, D = _ || v && g ? {
|
|
13
|
+
..._ ? { paddingBottom: "var(--mobile-tabbar-height, 0px)" } : {},
|
|
14
|
+
...v && g ? {
|
|
15
|
+
paddingLeft: w,
|
|
16
|
+
paddingRight: T
|
|
17
|
+
} : {}
|
|
18
|
+
} : void 0;
|
|
10
19
|
return /* @__PURE__ */ n("div", {
|
|
11
20
|
className: "flex flex-col h-screen bg-bg-canvas",
|
|
12
|
-
style:
|
|
21
|
+
style: E,
|
|
13
22
|
"data-native-shell": v ? "" : void 0,
|
|
14
23
|
children: [
|
|
15
24
|
u && r,
|
|
@@ -21,7 +30,7 @@ var r = ({ header: r, sidebar: i, footer: a, bottomPanel: o, rightPanel: s, stat
|
|
|
21
30
|
className: "flex flex-col flex-1 overflow-hidden",
|
|
22
31
|
children: [/* @__PURE__ */ t("main", {
|
|
23
32
|
className: `scrollbar-slim ${x}`,
|
|
24
|
-
style:
|
|
33
|
+
style: D,
|
|
25
34
|
"data-shell-scroll-container": !0,
|
|
26
35
|
children: h ? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("div", {
|
|
27
36
|
className: d ? "flex-1" : "flex-1 min-h-0",
|
|
@@ -2,92 +2,92 @@ import { useAssistantTr as e } from "../i18n.js";
|
|
|
2
2
|
import { quotaExhaustedEventName as t } from "../quota.js";
|
|
3
3
|
import { assistantPanelOwnsEscape as n } from "./panelOverlays.js";
|
|
4
4
|
import { AssistantPreviewBridgeHost as r } from "../preview/bridgeHost.js";
|
|
5
|
-
import { ASSISTANT_DOCK_WIDTH_VAR as i, ASSISTANT_OVERLAY_DESKTOP_QUERY as a, ASSISTANT_OVERLAY_TOP_VAR as o, ASSISTANT_PANEL_INSET_VAR as s,
|
|
6
|
-
import { useAssistantServerHistory as
|
|
7
|
-
import { AIAssistantPanel as
|
|
8
|
-
import { createContext as
|
|
9
|
-
import { Sparkles as
|
|
10
|
-
import { jsx as
|
|
5
|
+
import { ASSISTANT_DOCK_WIDTH_VAR as i, ASSISTANT_OVERLAY_DESKTOP_QUERY as a, ASSISTANT_OVERLAY_TOP_VAR as o, ASSISTANT_PANEL_INSET_VAR as s, ASSISTANT_SHEET_BOTTOM_VAR as c, aboveAssistantBottomChrome as l, assistantOverlayClassName as u, assistantOverlayEscapeAction as d, assistantOverlayKeys as f, assistantQuotaKindOf as p, closestAround as m, createAssistantNavigate as h, isAssistantToggleShortcut as g, nextAssistantOpenState as _, publishedAssistantDockWidth as v, publishedAssistantPanelInset as y, readAssistantOverlayFlag as b, requestedAssistantOpenState as x, writeAssistantOverlayFlag as S } from "./assistantOverlayState.js";
|
|
6
|
+
import { useAssistantServerHistory as C } from "../history/useAssistantServerHistory.js";
|
|
7
|
+
import { AIAssistantPanel as w } from "./AIAssistantPanel.js";
|
|
8
|
+
import { createContext as T, useCallback as E, useContext as D, useEffect as O, useMemo as k, useRef as A, useState as j, useSyncExternalStore as M } from "react";
|
|
9
|
+
import { Sparkles as N } from "lucide-react";
|
|
10
|
+
import { jsx as P, jsxs as F } from "react/jsx-runtime";
|
|
11
11
|
//#region src/shared/assistant/ui/AssistantOverlay.tsx
|
|
12
|
-
var
|
|
13
|
-
function I() {
|
|
14
|
-
return E(F);
|
|
15
|
-
}
|
|
12
|
+
var I = T(null);
|
|
16
13
|
function L() {
|
|
17
|
-
return
|
|
14
|
+
return D(I);
|
|
18
15
|
}
|
|
19
16
|
function R() {
|
|
20
|
-
return
|
|
17
|
+
return D(I)?.dockWidthPx ?? 0;
|
|
18
|
+
}
|
|
19
|
+
function z() {
|
|
20
|
+
return D(I)?.panelInsetPx ?? 0;
|
|
21
21
|
}
|
|
22
|
-
var
|
|
23
|
-
function
|
|
22
|
+
var B = () => typeof window > "u" ? void 0 : window.sessionStorage, V = () => typeof window > "u" ? void 0 : window.localStorage;
|
|
23
|
+
function H(e) {
|
|
24
24
|
if (typeof window > "u" || typeof window.matchMedia != "function") return () => {};
|
|
25
25
|
let t = window.matchMedia(a);
|
|
26
26
|
return t.addEventListener("change", e), () => t.removeEventListener("change", e);
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function U() {
|
|
29
29
|
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(min-width: 640px)").matches;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
return
|
|
31
|
+
function W() {
|
|
32
|
+
return M(H, U, () => !1);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
let r =
|
|
36
|
-
|
|
34
|
+
function G(e, n) {
|
|
35
|
+
let r = A(n);
|
|
36
|
+
O(() => {
|
|
37
37
|
r.current = n;
|
|
38
|
-
}, [n]),
|
|
38
|
+
}, [n]), O(() => {
|
|
39
39
|
if (!e || typeof window > "u") return;
|
|
40
|
-
let n = t(e), i = (e) => r.current(
|
|
40
|
+
let n = t(e), i = (e) => r.current(p(e), e);
|
|
41
41
|
return window.addEventListener(n, i), () => window.removeEventListener(n, i);
|
|
42
42
|
}, [e]);
|
|
43
43
|
}
|
|
44
|
-
var
|
|
45
|
-
function
|
|
46
|
-
let r =
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}, [r.openStorageKey, a]),
|
|
50
|
-
|
|
51
|
-
}, [r.dockStorageKey, c]),
|
|
44
|
+
var K = () => {};
|
|
45
|
+
function q({ keyPrefix: e, quota: t, children: n }) {
|
|
46
|
+
let r = k(() => f(e), [e]), [a, o] = j(() => b(B, r.openStorageKey)), [c, l] = j(() => b(V, r.dockStorageKey)), u = E(() => o(!0), []), d = E(() => o(!1), []), p = E(() => o((e) => !e), []), m = E(() => l((e) => !e), []);
|
|
47
|
+
O(() => {
|
|
48
|
+
S(B, r.openStorageKey, a);
|
|
49
|
+
}, [r.openStorageKey, a]), O(() => {
|
|
50
|
+
S(V, r.dockStorageKey, c);
|
|
51
|
+
}, [r.dockStorageKey, c]), O(() => {
|
|
52
52
|
if (typeof window > "u") return;
|
|
53
53
|
let e = (e) => {
|
|
54
|
-
let t =
|
|
55
|
-
o((e) =>
|
|
54
|
+
let t = x(e);
|
|
55
|
+
o((e) => _(e, t));
|
|
56
56
|
};
|
|
57
57
|
return window.addEventListener(r.toggleEvent, e), () => window.removeEventListener(r.toggleEvent, e);
|
|
58
|
-
}, [r.toggleEvent]),
|
|
58
|
+
}, [r.toggleEvent]), O(() => {
|
|
59
59
|
if (typeof document > "u") return;
|
|
60
60
|
let e = (e) => {
|
|
61
|
-
|
|
61
|
+
g(e) && (e.preventDefault(), o((e) => !e));
|
|
62
62
|
};
|
|
63
63
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
64
|
-
}, []),
|
|
65
|
-
let
|
|
64
|
+
}, []), G(t?.product ?? null, t?.onExhausted ?? K);
|
|
65
|
+
let h = W(), C = v({
|
|
66
66
|
isOpen: a,
|
|
67
67
|
docked: c,
|
|
68
|
-
isDesktop:
|
|
69
|
-
}), w =
|
|
68
|
+
isDesktop: h
|
|
69
|
+
}), w = y({
|
|
70
70
|
isOpen: a,
|
|
71
71
|
docked: c,
|
|
72
|
-
isDesktop:
|
|
72
|
+
isDesktop: h
|
|
73
73
|
});
|
|
74
|
-
|
|
74
|
+
O(() => {
|
|
75
75
|
if (typeof document > "u") return;
|
|
76
76
|
let e = document.documentElement.style;
|
|
77
77
|
return e.setProperty(i, `${C}px`), () => {
|
|
78
78
|
e.removeProperty(i);
|
|
79
79
|
};
|
|
80
|
-
}, [C]),
|
|
80
|
+
}, [C]), O(() => {
|
|
81
81
|
if (typeof document > "u") return;
|
|
82
82
|
let e = document.documentElement.style;
|
|
83
83
|
return e.setProperty(s, `${w}px`), () => {
|
|
84
84
|
e.removeProperty(s);
|
|
85
85
|
};
|
|
86
86
|
}, [w]);
|
|
87
|
-
let
|
|
87
|
+
let T = k(() => ({
|
|
88
88
|
isOpen: a,
|
|
89
89
|
open: u,
|
|
90
|
-
close:
|
|
90
|
+
close: d,
|
|
91
91
|
toggle: p,
|
|
92
92
|
docked: c,
|
|
93
93
|
toggleDock: m,
|
|
@@ -97,7 +97,7 @@ function K({ keyPrefix: e, quota: t, children: n }) {
|
|
|
97
97
|
}), [
|
|
98
98
|
a,
|
|
99
99
|
u,
|
|
100
|
-
|
|
100
|
+
d,
|
|
101
101
|
p,
|
|
102
102
|
c,
|
|
103
103
|
m,
|
|
@@ -105,87 +105,90 @@ function K({ keyPrefix: e, quota: t, children: n }) {
|
|
|
105
105
|
w,
|
|
106
106
|
r
|
|
107
107
|
]);
|
|
108
|
-
return /* @__PURE__ */
|
|
109
|
-
value:
|
|
108
|
+
return /* @__PURE__ */ P(I.Provider, {
|
|
109
|
+
value: T,
|
|
110
110
|
children: n
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
|
-
var
|
|
113
|
+
var J = (e, t) => /* @__PURE__ */ P(w, {
|
|
114
114
|
...e,
|
|
115
115
|
...t
|
|
116
116
|
});
|
|
117
|
-
function
|
|
118
|
-
let t =
|
|
119
|
-
return t ? /* @__PURE__ */
|
|
117
|
+
function Y(e) {
|
|
118
|
+
let t = L();
|
|
119
|
+
return t ? /* @__PURE__ */ P(X, {
|
|
120
120
|
state: t,
|
|
121
121
|
...e
|
|
122
122
|
}) : null;
|
|
123
123
|
}
|
|
124
|
-
function
|
|
125
|
-
let { isOpen:
|
|
126
|
-
|
|
127
|
-
let [
|
|
128
|
-
navigate:
|
|
129
|
-
isShellLessTarget:
|
|
130
|
-
isDesktop:
|
|
131
|
-
collapseSheet: () =>
|
|
124
|
+
function X({ state: t, panelId: i = "ai-assistant", panelProps: a, renderPanel: s, navigate: f, isShellLessTarget: p, topOffsetPx: g = 56, launcherIcon: _, launcherBottomInset: v = "1.5rem", showLauncher: y = !0 }) {
|
|
125
|
+
let { isOpen: b, close: x, toggle: S, docked: w, toggleDock: T } = t, E = e();
|
|
126
|
+
C(a?.serverHistory === !0);
|
|
127
|
+
let [D, A] = j(!1), M = k(() => f ? h({
|
|
128
|
+
navigate: f,
|
|
129
|
+
isShellLessTarget: p,
|
|
130
|
+
isDesktop: U,
|
|
131
|
+
collapseSheet: () => A(!1),
|
|
132
132
|
openInNewTab: (e) => window.open(e, "_blank", "noopener,noreferrer")
|
|
133
|
-
}) : void 0, [
|
|
134
|
-
|
|
135
|
-
if (!
|
|
133
|
+
}) : void 0, [f, p]);
|
|
134
|
+
O(() => {
|
|
135
|
+
if (!b) return;
|
|
136
136
|
let e = (e) => {
|
|
137
|
-
|
|
137
|
+
d({
|
|
138
138
|
key: e.key,
|
|
139
|
-
isOpen:
|
|
139
|
+
isOpen: b,
|
|
140
140
|
alreadyHandled: e.defaultPrevented,
|
|
141
141
|
dialogOpen: document.querySelector("[role=\"dialog\"],[role=\"alertdialog\"],dialog[open]") !== null,
|
|
142
|
-
pressedInsideDialog:
|
|
142
|
+
pressedInsideDialog: m(e.target, "[role=\"dialog\"],[role=\"alertdialog\"],dialog[open]") !== null,
|
|
143
143
|
panelOwnsEscape: n()
|
|
144
|
-
}) === "close" && (e.preventDefault(),
|
|
144
|
+
}) === "close" && (e.preventDefault(), x());
|
|
145
145
|
};
|
|
146
146
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
147
|
-
}, [
|
|
148
|
-
let
|
|
147
|
+
}, [b, x]);
|
|
148
|
+
let I = {
|
|
149
149
|
panelId: i,
|
|
150
150
|
visible: !0,
|
|
151
|
-
onClose:
|
|
152
|
-
docked:
|
|
153
|
-
onToggleDock:
|
|
154
|
-
onNavigate:
|
|
155
|
-
isShellLessTarget:
|
|
156
|
-
},
|
|
157
|
-
|
|
151
|
+
onClose: x,
|
|
152
|
+
docked: w,
|
|
153
|
+
onToggleDock: T,
|
|
154
|
+
onNavigate: M,
|
|
155
|
+
isShellLessTarget: p
|
|
156
|
+
}, L = E("overlay.launcher", "AI Assistant"), R = {
|
|
157
|
+
[o]: `${g}px`,
|
|
158
|
+
[c]: "var(--mobile-tabbar-height, 0px)"
|
|
159
|
+
};
|
|
160
|
+
return /* @__PURE__ */ F(r, {
|
|
158
161
|
preview: a?.preview,
|
|
159
|
-
children: [
|
|
160
|
-
className:
|
|
161
|
-
expanded:
|
|
162
|
-
docked:
|
|
162
|
+
children: [b && /* @__PURE__ */ F("div", {
|
|
163
|
+
className: u({
|
|
164
|
+
expanded: D,
|
|
165
|
+
docked: w
|
|
163
166
|
}),
|
|
164
|
-
style:
|
|
167
|
+
style: R,
|
|
165
168
|
"data-testid": "assistant-overlay",
|
|
166
|
-
children: [/* @__PURE__ */
|
|
169
|
+
children: [/* @__PURE__ */ P("button", {
|
|
167
170
|
type: "button",
|
|
168
|
-
onClick: () =>
|
|
171
|
+
onClick: () => A((e) => !e),
|
|
169
172
|
className: "flex w-full shrink-0 justify-center pt-2 pb-1 sm:hidden",
|
|
170
|
-
"aria-label":
|
|
171
|
-
"aria-expanded":
|
|
173
|
+
"aria-label": D ? E("sheet.collapse", "Shrink the assistant") : E("sheet.expand", "Expand the assistant"),
|
|
174
|
+
"aria-expanded": D,
|
|
172
175
|
"data-testid": "assistant-sheet-handle",
|
|
173
|
-
children: /* @__PURE__ */
|
|
174
|
-
}), /* @__PURE__ */
|
|
176
|
+
children: /* @__PURE__ */ P("span", { className: "h-1.5 w-10 rounded-full bg-border-strong" })
|
|
177
|
+
}), /* @__PURE__ */ P("div", {
|
|
175
178
|
className: "flex min-h-0 flex-1 flex-col",
|
|
176
|
-
children: s ? s(
|
|
179
|
+
children: s ? s(I) : J(a, I)
|
|
177
180
|
})]
|
|
178
|
-
}),
|
|
181
|
+
}), y && /* @__PURE__ */ P("button", {
|
|
179
182
|
type: "button",
|
|
180
|
-
onClick:
|
|
181
|
-
title:
|
|
182
|
-
"aria-label":
|
|
183
|
+
onClick: S,
|
|
184
|
+
title: E("overlay.launcherTitle", "AI Assistant ({{shortcut}})", { shortcut: "Ctrl+Shift+A" }),
|
|
185
|
+
"aria-label": L,
|
|
183
186
|
"aria-haspopup": "dialog",
|
|
184
|
-
"aria-expanded":
|
|
187
|
+
"aria-expanded": b,
|
|
185
188
|
"data-testid": "assistant-fab",
|
|
186
|
-
style: { bottom:
|
|
187
|
-
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 " + (
|
|
188
|
-
children:
|
|
189
|
+
style: { bottom: l(v) },
|
|
190
|
+
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 " + (b ? "hidden sm:inline-flex" : "inline-flex"),
|
|
191
|
+
children: _ ?? /* @__PURE__ */ P(N, {
|
|
189
192
|
className: "size-6",
|
|
190
193
|
"aria-hidden": "true"
|
|
191
194
|
})
|
|
@@ -193,4 +196,4 @@ function Y({ state: t, panelId: i = "ai-assistant", panelProps: a, renderPanel:
|
|
|
193
196
|
});
|
|
194
197
|
}
|
|
195
198
|
//#endregion
|
|
196
|
-
export {
|
|
199
|
+
export { Y as AssistantOverlay, q as AssistantOverlayProvider, R as useAssistantDockWidth, L as useAssistantOverlayOrNull, z as useAssistantPanelInset, G as useAssistantQuotaExhausted };
|
|
@@ -122,6 +122,18 @@ export declare const ASSISTANT_DOCK_WIDTH_PX = 440;
|
|
|
122
122
|
* own right-hand surface (a preview pane) pads by it to stay clear of the dock.
|
|
123
123
|
*/
|
|
124
124
|
export declare const ASSISTANT_DOCK_WIDTH_VAR = "--assistant-dock-width";
|
|
125
|
+
/**
|
|
126
|
+
* CSS custom property on the sheet carrying the PHONE sheet's bottom offset.
|
|
127
|
+
*
|
|
128
|
+
* ★ The installed app's `MobileTabBar` is `fixed z-[60]`, above the sheet's
|
|
129
|
+
* `z-50`, so a sheet pinned to `bottom-0` has its composer painted over by the
|
|
130
|
+
* tab bar. The sheet rests on top of the bar instead. The tab bar's measured
|
|
131
|
+
* height already includes the safe area (see
|
|
132
|
+
* `ASSISTANT_BOTTOM_CHROME_CLEARANCE`), so it is not added again; with no tab
|
|
133
|
+
* bar the variable is 0px and the sheet keeps the bottom edge. Every `sm:`
|
|
134
|
+
* layout sets its own `bottom-*`, so desktop never reads it.
|
|
135
|
+
*/
|
|
136
|
+
export declare const ASSISTANT_SHEET_BOTTOM_VAR = "--assistant-sheet-bottom";
|
|
125
137
|
/** CSS custom property on the sheet carrying the docked panel's top offset. */
|
|
126
138
|
export declare const ASSISTANT_OVERLAY_TOP_VAR = "--assistant-overlay-top";
|
|
127
139
|
/** Default top offset for the docked panel: a 3.5rem (56px) shell header. */
|
|
@@ -33,23 +33,23 @@ var u = "max(var(--mobile-tabbar-height, 0px), var(--safe-bottom, 0px), env(safe
|
|
|
33
33
|
function d(e) {
|
|
34
34
|
return `calc(${e} + ${u})`;
|
|
35
35
|
}
|
|
36
|
-
var f = 440, p = "--assistant-dock-width", m = "--assistant-overlay-top",
|
|
37
|
-
function
|
|
36
|
+
var f = 440, p = "--assistant-dock-width", m = "--assistant-sheet-bottom", h = "--assistant-overlay-top", g = 56, _ = "(min-width: 640px)";
|
|
37
|
+
function v(e) {
|
|
38
38
|
return e.isOpen && e.docked && e.isDesktop ? 440 : 0;
|
|
39
39
|
}
|
|
40
|
-
var
|
|
41
|
-
function
|
|
40
|
+
var y = 520, b = 24, x = "--assistant-panel-inset";
|
|
41
|
+
function S(e) {
|
|
42
42
|
return !e.isOpen || !e.isDesktop ? 0 : e.docked ? 440 : 544;
|
|
43
43
|
}
|
|
44
|
-
var
|
|
45
|
-
function
|
|
44
|
+
var C = "fixed z-50 flex flex-col overflow-hidden border border-border-default bg-bg-surface shadow-2xl inset-x-0 bottom-[var(--assistant-sheet-bottom,0px)] top-auto rounded-t-2xl animate-in slide-in-from-bottom-4 fade-in duration-200", w = "h-[60vh] max-h-[60vh]", T = "h-[88vh] max-h-[88vh]", E = "sm:inset-auto sm:top-auto sm:bottom-24 sm:right-6 sm:rounded-2xl sm:h-[680px] sm:max-h-[calc(100vh-6rem-var(--assistant-overlay-top,56px)-0.5rem)] sm:w-[520px] sm:max-w-[calc(100vw-2rem)]", D = "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)]";
|
|
45
|
+
function O(e) {
|
|
46
46
|
return [
|
|
47
|
-
|
|
48
|
-
e.expanded ?
|
|
49
|
-
e.docked ?
|
|
47
|
+
C,
|
|
48
|
+
e.expanded ? T : w,
|
|
49
|
+
e.docked ? D : E
|
|
50
50
|
].join(" ");
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function k(t) {
|
|
53
53
|
return (n, r) => {
|
|
54
54
|
if (t.isShellLessTarget?.(n)) return t.openInNewTab(n), { kind: "new-tab" };
|
|
55
55
|
let i = e(r);
|
|
@@ -60,22 +60,22 @@ function O(t) {
|
|
|
60
60
|
} : (t.navigate(n), t.isDesktop() || t.collapseSheet(), { kind: "routed" });
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function A(e) {
|
|
64
64
|
if (typeof CustomEvent > "u" || !(e instanceof CustomEvent)) return "generic";
|
|
65
65
|
let t = e.detail;
|
|
66
66
|
return typeof t != "object" || !t || !("kind" in t) ? "generic" : t.kind === "sandbox" || t.kind === "ai-credits" ? t.kind : "generic";
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function j(e, t) {
|
|
69
69
|
try {
|
|
70
70
|
return e()?.getItem(t) === "1";
|
|
71
71
|
} catch {
|
|
72
72
|
return !1;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function M(e, t, n) {
|
|
76
76
|
try {
|
|
77
77
|
e()?.setItem(t, n ? "1" : "0");
|
|
78
78
|
} catch {}
|
|
79
79
|
}
|
|
80
80
|
//#endregion
|
|
81
|
-
export { u as ASSISTANT_BOTTOM_CHROME_CLEARANCE, o as ASSISTANT_DIALOG_SELECTOR,
|
|
81
|
+
export { u as ASSISTANT_BOTTOM_CHROME_CLEARANCE, o as ASSISTANT_DIALOG_SELECTOR, D as ASSISTANT_DOCKED_DESKTOP_CLASS, f as ASSISTANT_DOCK_WIDTH_PX, p as ASSISTANT_DOCK_WIDTH_VAR, E as ASSISTANT_FLOATING_DESKTOP_CLASS, b as ASSISTANT_FLOATING_RIGHT_PX, y as ASSISTANT_FLOATING_WIDTH_PX, g as ASSISTANT_OVERLAY_DEFAULT_TOP_PX, _ as ASSISTANT_OVERLAY_DESKTOP_QUERY, h as ASSISTANT_OVERLAY_TOP_VAR, x as ASSISTANT_PANEL_INSET_VAR, C as ASSISTANT_SHEET_BASE_CLASS, m as ASSISTANT_SHEET_BOTTOM_VAR, w as ASSISTANT_SHEET_COMPACT_CLASS, T as ASSISTANT_SHEET_EXPANDED_CLASS, i as ASSISTANT_TOGGLE_SHORTCUT_LABEL, d as aboveAssistantBottomChrome, O as assistantOverlayClassName, l as assistantOverlayEscapeAction, t as assistantOverlayKeys, A as assistantQuotaKindOf, s as closestAround, k as createAssistantNavigate, a as isAssistantToggleShortcut, r as nextAssistantOpenState, v as publishedAssistantDockWidth, S as publishedAssistantPanelInset, j as readAssistantOverlayFlag, n as requestedAssistantOpenState, M as writeAssistantOverlayFlag };
|