@floegence/floe-webapp-core 0.79.0 → 0.79.1
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/components/layout/Shell.js +143 -137
- package/dist/full.js +73 -71
- package/dist/hooks/createRetainedContent.d.ts +7 -0
- package/dist/hooks/createRetainedContent.js +15 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/index.js +66 -64
- package/package.json +1 -1
|
@@ -1,41 +1,42 @@
|
|
|
1
|
-
import { createComponent as
|
|
2
|
-
import { createSignal as M, onMount as He, onCleanup as Ee, createEffect as A, batch as Ve, createMemo as x, For as J, Show as
|
|
1
|
+
import { createComponent as r, Dynamic as V, insert as d, use as j, effect as B, setStyleProperty as G, memo as P, className as k, setAttribute as w, mergeProps as ze, template as h, delegateEvents as Fe } from "solid-js/web";
|
|
2
|
+
import { createSignal as M, onMount as He, onCleanup as Ee, createEffect as A, batch as Ve, createMemo as x, For as J, Show as g } from "solid-js";
|
|
3
3
|
import { observeViewport as _e } from "../../viewport.js";
|
|
4
4
|
import { useLayout as De } from "../../context/LayoutContext.js";
|
|
5
5
|
import { useResolvedFloeConfig as qe } from "../../context/FloeConfigContext.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
6
|
+
import { createRetainedContent as Ke } from "../../hooks/createRetainedContent.js";
|
|
7
|
+
import { createAdaptiveSidebar as Ue } from "../../hooks/createAdaptiveSidebar.js";
|
|
8
|
+
import { useResizeObserver as je } from "../../hooks/useResizeObserver.js";
|
|
9
|
+
import { Dialog as Ge } from "../ui/Dialog.js";
|
|
10
|
+
import { DialogPlacementProvider as Je } from "../ui/DialogPlacementContext.js";
|
|
11
|
+
import { useOverlayMask as Qe } from "../../hooks/useOverlayMask.js";
|
|
11
12
|
import { cn as I } from "../../utils/cn.js";
|
|
12
|
-
import { deferAfterPaint as
|
|
13
|
-
import { useComponentRegistry as
|
|
14
|
-
import { Sidebar as
|
|
15
|
-
import { TopBar as
|
|
16
|
-
import { TopBarIconButton as
|
|
17
|
-
import { BottomBar as
|
|
18
|
-
import { MobileTabBar as
|
|
19
|
-
import { MobileNavigationPanel as
|
|
20
|
-
import { ActivityBar as
|
|
13
|
+
import { deferAfterPaint as Xe, deferNonBlocking as Ye } from "../../utils/defer.js";
|
|
14
|
+
import { useComponentRegistry as Ze } from "../../context/ComponentRegistry.js";
|
|
15
|
+
import { Sidebar as et } from "./Sidebar.js";
|
|
16
|
+
import { TopBar as tt } from "./TopBar.js";
|
|
17
|
+
import { TopBarIconButton as it } from "./TopBarIconButton.js";
|
|
18
|
+
import { BottomBar as rt } from "./BottomBar.js";
|
|
19
|
+
import { MobileTabBar as nt } from "./MobileTabBar.js";
|
|
20
|
+
import { MobileNavigationPanel as ot } from "./MobileNavigationPanel.js";
|
|
21
|
+
import { ActivityBar as at } from "./ActivityBar.js";
|
|
21
22
|
import { ResizeHandle as se } from "./ResizeHandle.js";
|
|
22
|
-
import { resolveMobileTabActiveId as
|
|
23
|
-
import { KeepAliveStack as
|
|
24
|
-
import { resolveShellSidebarActiveTabChange as
|
|
25
|
-
import { createUIFirstSelection as
|
|
26
|
-
var de = /* @__PURE__ */
|
|
27
|
-
function
|
|
23
|
+
import { resolveMobileTabActiveId as lt, resolveMobileTabSelect as st } from "./mobileTabs.js";
|
|
24
|
+
import { KeepAliveStack as dt } from "./KeepAliveStack.js";
|
|
25
|
+
import { resolveShellSidebarActiveTabChange as ct } from "./sidebarVisibilityMotion.js";
|
|
26
|
+
import { createUIFirstSelection as bt } from "../../utils/uiFirstSelection.js";
|
|
27
|
+
var de = /* @__PURE__ */ h('<div class="flex items-center gap-2">'), ut = /* @__PURE__ */ h('<div class="h-full min-h-0 overflow-auto">'), mt = /* @__PURE__ */ h('<div class="flex shrink-0 min-h-0">'), ft = /* @__PURE__ */ h('<div class="h-full min-h-0"style=max-width:100%>'), vt = /* @__PURE__ */ h("<div data-floe-shell-slot=mobile-sidebar-backdrop>"), gt = /* @__PURE__ */ h('<div data-floe-shell-slot=mobile-sidebar-drawer tabindex=-1 role=dialog aria-modal=true><div class="h-full overflow-auto overscroll-contain">'), ht = /* @__PURE__ */ h("<div data-floe-shell-slot=terminal-panel style=border-top-color:var(--terminal-panel-border)>"), St = /* @__PURE__ */ h('<div data-floe-shell-slot=mobile-accessory class="relative shrink-0">'), yt = /* @__PURE__ */ h('<div data-floe-shell><a></a><div class="relative flex min-h-0 flex-1 flex-col overflow-hidden"data-floe-shell-slot=mobile-content-boundary><div data-floe-shell-slot=main-layout class="flex-1 min-h-0 flex overflow-hidden relative"><div data-floe-shell-slot=content-area><main data-floe-shell-slot=main tabindex=-1>');
|
|
28
|
+
function Ut(i) {
|
|
28
29
|
const [ce, be] = M(!1);
|
|
29
30
|
He(() => {
|
|
30
31
|
Ee(_e(window, (e) => be(e.keyboardOpen)));
|
|
31
32
|
});
|
|
32
|
-
const
|
|
33
|
+
const o = De(), ue = qe(), l = o.isMobile, [me, fe] = M(), [ve, ge] = M(), he = je(ve), p = /* @__PURE__ */ new Map(), [_, W] = M(!1), [Se, ye] = M(!1), Ce = Ue({
|
|
33
34
|
container: me,
|
|
34
|
-
sidebarWidth: () => (D() ??
|
|
35
|
+
sidebarWidth: () => (D() ?? o.sidebarWidth()) + (he()?.width ?? 0),
|
|
35
36
|
minContentWidth: () => i.sidebarMinContentWidth ?? 0
|
|
36
37
|
}), S = () => !l() && !!i.sidebarMinContentWidth && !u() && Ce() === "overlay";
|
|
37
38
|
A(() => {
|
|
38
|
-
(!S() || N()) &&
|
|
39
|
+
(!S() || N()) && W(!1);
|
|
39
40
|
});
|
|
40
41
|
const [L, y] = M(!1), [$, we] = M(!1);
|
|
41
42
|
let Q;
|
|
@@ -47,16 +48,16 @@ function qt(i) {
|
|
|
47
48
|
let K;
|
|
48
49
|
const u = () => i.sidebarMode === "hidden", c = (() => {
|
|
49
50
|
try {
|
|
50
|
-
return
|
|
51
|
+
return Ze();
|
|
51
52
|
} catch {
|
|
52
53
|
return null;
|
|
53
54
|
}
|
|
54
55
|
})(), z = (e, a) => {
|
|
55
56
|
const s = c?.getComponent(e)?.sidebar?.fullScreen ?? !1, {
|
|
56
|
-
openSidebar:
|
|
57
|
+
openSidebar: n,
|
|
57
58
|
visibilityMotion: b
|
|
58
|
-
} =
|
|
59
|
-
currentActiveId:
|
|
59
|
+
} = ct({
|
|
60
|
+
currentActiveId: o.sidebarActiveTab(),
|
|
60
61
|
nextActiveId: e,
|
|
61
62
|
requestedOpenSidebar: a?.openSidebar,
|
|
62
63
|
sidebarHidden: u(),
|
|
@@ -64,24 +65,24 @@ function qt(i) {
|
|
|
64
65
|
isMobile: l(),
|
|
65
66
|
resolveSidebarVisibilityMotion: i.resolveSidebarVisibilityMotion
|
|
66
67
|
});
|
|
67
|
-
S() ? (
|
|
68
|
+
S() ? (p.get(e)?.focus({
|
|
68
69
|
preventScroll: !0
|
|
69
|
-
}),
|
|
70
|
+
}), o.setSidebarActiveTab(e, {
|
|
70
71
|
openSidebar: !1,
|
|
71
72
|
visibilityMotion: b
|
|
72
|
-
}),
|
|
73
|
-
openSidebar:
|
|
73
|
+
}), W(!s)) : o.setSidebarActiveTab(e, {
|
|
74
|
+
openSidebar: n,
|
|
74
75
|
visibilityMotion: b
|
|
75
76
|
});
|
|
76
|
-
}, F =
|
|
77
|
-
committed:
|
|
77
|
+
}, F = bt({
|
|
78
|
+
committed: o.sidebarActiveTab,
|
|
78
79
|
commit: (e, a) => {
|
|
79
80
|
Ve(() => {
|
|
80
81
|
z(e, a?.opts), typeof a?.mobileSidebarOpen == "boolean" && y(a.mobileSidebarOpen);
|
|
81
82
|
});
|
|
82
83
|
},
|
|
83
84
|
onEvent: (e) => i.onActivitySelectionEvent?.(e)
|
|
84
|
-
}), H = () => i.activitySelectionMode === "ui-first" ? F.visual() :
|
|
85
|
+
}), H = () => i.activitySelectionMode === "ui-first" ? F.visual() : o.sidebarActiveTab(), ke = (e, a) => {
|
|
85
86
|
if (i.activitySelectionMode === "ui-first") {
|
|
86
87
|
F.request(e, {
|
|
87
88
|
source: "activity-bar",
|
|
@@ -96,8 +97,8 @@ function qt(i) {
|
|
|
96
97
|
}), A(() => {
|
|
97
98
|
l() || y(!1);
|
|
98
99
|
}), A(() => {
|
|
99
|
-
const e =
|
|
100
|
-
e === "instant" &&
|
|
100
|
+
const e = o.sidebarVisibilityMotion(), a = o.sidebarVisibilityMotionRevision();
|
|
101
|
+
e === "instant" && Xe(() => o.clearSidebarVisibilityMotion(a));
|
|
101
102
|
});
|
|
102
103
|
const T = x(() => i.activityItems ? i.activityItems : c ? c.sidebarItems().filter((e) => !!e.icon).filter((e) => !(l() && e.sidebar?.hiddenOnMobile)).map((e) => ({
|
|
103
104
|
id: e.id,
|
|
@@ -108,19 +109,19 @@ function qt(i) {
|
|
|
108
109
|
})) : []), Ae = x(() => T().map((e) => ({
|
|
109
110
|
...e,
|
|
110
111
|
buttonRef: (a) => {
|
|
111
|
-
a ?
|
|
112
|
+
a ? p.set(e.id, a) : p.delete(e.id), e.buttonRef?.(a);
|
|
112
113
|
},
|
|
113
114
|
...S() && !e.onClick ? {
|
|
114
|
-
ariaExpanded: () => _() &&
|
|
115
|
+
ariaExpanded: () => _() && o.sidebarActiveTab() === e.id,
|
|
115
116
|
ariaHasPopup: "dialog"
|
|
116
117
|
} : {}
|
|
117
118
|
}))), xe = (e) => {
|
|
118
|
-
S() ? (e ||
|
|
119
|
+
S() ? (e || p.get(o.sidebarActiveTab())?.focus({
|
|
119
120
|
preventScroll: !0
|
|
120
|
-
}),
|
|
121
|
+
}), W(!e)) : o.setSidebarCollapsed(e);
|
|
121
122
|
}, Ie = x(() => u() ? [] : i.sidebarContent ? [] : c ? c.sidebarItems().filter((e) => !(l() && e.sidebar?.hiddenOnMobile)).filter((e) => e.sidebar?.fullScreen !== !0 && e.sidebar?.renderIn !== "main").map((e) => ({
|
|
122
123
|
id: e.id,
|
|
123
|
-
render: () =>
|
|
124
|
+
render: () => r(V, {
|
|
124
125
|
get component() {
|
|
125
126
|
return e.component;
|
|
126
127
|
}
|
|
@@ -129,17 +130,17 @@ function qt(i) {
|
|
|
129
130
|
if (!u()) {
|
|
130
131
|
if (i.sidebarContent) return i.sidebarContent(e);
|
|
131
132
|
if (c)
|
|
132
|
-
return
|
|
133
|
+
return r(dt, {
|
|
133
134
|
get views() {
|
|
134
135
|
return Ie();
|
|
135
136
|
},
|
|
136
137
|
activeId: e
|
|
137
138
|
});
|
|
138
139
|
}
|
|
139
|
-
}, N = x(() => u() ? !0 : c ? c.getComponent(
|
|
140
|
+
}, N = x(() => u() ? !0 : c ? c.getComponent(o.sidebarActiveTab())?.sidebar?.fullScreen ?? !1 : !1), Pe = x(() => {
|
|
140
141
|
if (u()) return !0;
|
|
141
142
|
if (!c) return !1;
|
|
142
|
-
const e = c.getComponent(
|
|
143
|
+
const e = c.getComponent(o.sidebarActiveTab());
|
|
143
144
|
return e?.sidebar ? e.sidebar.fullScreen === !0 || e.sidebar.renderIn === "main" : !1;
|
|
144
145
|
});
|
|
145
146
|
A(() => {
|
|
@@ -148,34 +149,34 @@ function qt(i) {
|
|
|
148
149
|
const Te = x(() => {
|
|
149
150
|
if (i.bottomBarItems) return i.bottomBarItems;
|
|
150
151
|
if (!c) return;
|
|
151
|
-
const e = [...c.statusBarItems()].sort((
|
|
152
|
+
const e = [...c.statusBarItems()].sort((n, b) => (n.order ?? 100) - (b.order ?? 100)), a = e.filter((n) => n.position === "left"), s = e.filter((n) => n.position === "right");
|
|
152
153
|
return [(() => {
|
|
153
|
-
var
|
|
154
|
-
return d(
|
|
154
|
+
var n = de();
|
|
155
|
+
return d(n, r(J, {
|
|
155
156
|
each: a,
|
|
156
|
-
children: (b) =>
|
|
157
|
+
children: (b) => r(V, {
|
|
157
158
|
get component() {
|
|
158
159
|
return b.component;
|
|
159
160
|
}
|
|
160
161
|
})
|
|
161
|
-
})),
|
|
162
|
+
})), n;
|
|
162
163
|
})(), (() => {
|
|
163
|
-
var
|
|
164
|
-
return d(
|
|
164
|
+
var n = de();
|
|
165
|
+
return d(n, r(J, {
|
|
165
166
|
each: s,
|
|
166
|
-
children: (b) =>
|
|
167
|
+
children: (b) => r(V, {
|
|
167
168
|
get component() {
|
|
168
169
|
return b.component;
|
|
169
170
|
}
|
|
170
171
|
})
|
|
171
|
-
})),
|
|
172
|
+
})), n;
|
|
172
173
|
})()];
|
|
173
174
|
});
|
|
174
175
|
A(() => {
|
|
175
176
|
const e = T();
|
|
176
177
|
if (!e.length) return;
|
|
177
|
-
if (!
|
|
178
|
-
const s = e.find((
|
|
178
|
+
if (!o.sidebarActiveTab()) {
|
|
179
|
+
const s = e.find((n) => !n.onClick);
|
|
179
180
|
if (!s) return;
|
|
180
181
|
z(s.id);
|
|
181
182
|
}
|
|
@@ -183,27 +184,27 @@ function qt(i) {
|
|
|
183
184
|
const X = (e) => {
|
|
184
185
|
const a = u() ? !0 : c?.getComponent(e)?.sidebar?.fullScreen ?? !1, {
|
|
185
186
|
nextActiveId: s,
|
|
186
|
-
nextMobileSidebarOpen:
|
|
187
|
-
} =
|
|
187
|
+
nextMobileSidebarOpen: n
|
|
188
|
+
} = st({
|
|
188
189
|
clickedId: e,
|
|
189
|
-
activeId:
|
|
190
|
+
activeId: o.sidebarActiveTab(),
|
|
190
191
|
mobileSidebarOpen: L(),
|
|
191
192
|
clickedIsFullScreen: a
|
|
192
193
|
});
|
|
193
|
-
if (
|
|
194
|
+
if (o.sidebarActiveTab() !== s) {
|
|
194
195
|
if (i.activitySelectionMode === "ui-first") {
|
|
195
196
|
F.request(s, {
|
|
196
197
|
source: "mobile-tab-bar",
|
|
197
|
-
mobileSidebarOpen:
|
|
198
|
+
mobileSidebarOpen: n
|
|
198
199
|
});
|
|
199
200
|
return;
|
|
200
201
|
}
|
|
201
202
|
z(s);
|
|
202
203
|
}
|
|
203
|
-
y(
|
|
204
|
+
y(n);
|
|
204
205
|
}, Ne = (e) => {
|
|
205
206
|
if (e.onClick) {
|
|
206
|
-
|
|
207
|
+
Ye(() => e.onClick());
|
|
207
208
|
return;
|
|
208
209
|
}
|
|
209
210
|
X(e.id);
|
|
@@ -211,32 +212,32 @@ function qt(i) {
|
|
|
211
212
|
const e = i.topBarActions;
|
|
212
213
|
if (!l() || (i.activityBottomItemsMobileMode ?? "hidden") !== "topBar") return e;
|
|
213
214
|
const s = i.activityBottomItems ?? [];
|
|
214
|
-
return s.length ? [
|
|
215
|
+
return s.length ? [r(J, {
|
|
215
216
|
each: s,
|
|
216
|
-
children: (
|
|
217
|
+
children: (n) => r(it, {
|
|
217
218
|
get label() {
|
|
218
|
-
return
|
|
219
|
+
return n.label;
|
|
219
220
|
},
|
|
220
|
-
onClick: () => Ne(
|
|
221
|
+
onClick: () => Ne(n),
|
|
221
222
|
get children() {
|
|
222
|
-
return
|
|
223
|
+
return r(V, {
|
|
223
224
|
get component() {
|
|
224
|
-
return
|
|
225
|
+
return n.icon;
|
|
225
226
|
},
|
|
226
227
|
class: "w-4 h-4"
|
|
227
228
|
});
|
|
228
229
|
}
|
|
229
230
|
})
|
|
230
231
|
}), e] : e;
|
|
231
|
-
}), Re = () => u() || (S() ? !_() :
|
|
232
|
-
q(
|
|
233
|
-
},
|
|
234
|
-
q((a) =>
|
|
232
|
+
}), Re = () => u() || (S() ? !_() : o.sidebarCollapsed()), Y = () => D() ?? o.sidebarWidth(), f = () => ue.config.accessibility, pe = () => {
|
|
233
|
+
q(o.sidebarWidth());
|
|
234
|
+
}, We = (e) => {
|
|
235
|
+
q((a) => o.clampSidebarWidth((a ?? o.sidebarWidth()) + e));
|
|
235
236
|
}, Le = () => {
|
|
236
237
|
const e = D();
|
|
237
|
-
e !== null && (
|
|
238
|
+
e !== null && (o.setSidebarWidth(e), q(null));
|
|
238
239
|
};
|
|
239
|
-
|
|
240
|
+
Qe({
|
|
240
241
|
open: () => l() && L() && !u(),
|
|
241
242
|
root: () => K,
|
|
242
243
|
onClose: () => y(!1),
|
|
@@ -257,18 +258,18 @@ function qt(i) {
|
|
|
257
258
|
e.focus();
|
|
258
259
|
} catch {
|
|
259
260
|
}
|
|
260
|
-
}, U = (() => {
|
|
261
|
-
var e =
|
|
262
|
-
return d(e, () => Be(
|
|
263
|
-
})();
|
|
261
|
+
}, U = Ke(() => (() => {
|
|
262
|
+
var e = ut();
|
|
263
|
+
return d(e, () => Be(o.sidebarActiveTab())), e;
|
|
264
|
+
})());
|
|
264
265
|
return (() => {
|
|
265
|
-
var e =
|
|
266
|
-
return a.$$click = () => $e(), d(a, () => f().skipLinkLabel), d(e,
|
|
266
|
+
var e = yt(), a = e.firstChild, s = a.nextSibling, n = s.firstChild, b = n.firstChild, E = b.firstChild;
|
|
267
|
+
return a.$$click = () => $e(), d(a, () => f().skipLinkLabel), d(e, r(g, {
|
|
267
268
|
get when() {
|
|
268
269
|
return !l() || i.topBarMobileMode !== "hidden";
|
|
269
270
|
},
|
|
270
271
|
get children() {
|
|
271
|
-
return
|
|
272
|
+
return r(tt, {
|
|
272
273
|
get logo() {
|
|
273
274
|
return i.logo;
|
|
274
275
|
},
|
|
@@ -283,18 +284,18 @@ function qt(i) {
|
|
|
283
284
|
}
|
|
284
285
|
});
|
|
285
286
|
}
|
|
286
|
-
}), s), j(fe,
|
|
287
|
+
}), s), j(fe, n), d(n, r(g, {
|
|
287
288
|
get when() {
|
|
288
289
|
return !l();
|
|
289
290
|
},
|
|
290
291
|
get children() {
|
|
291
|
-
return [
|
|
292
|
+
return [r(g, {
|
|
292
293
|
get when() {
|
|
293
294
|
return T().length > 0;
|
|
294
295
|
},
|
|
295
296
|
get children() {
|
|
296
|
-
var t =
|
|
297
|
-
return j(
|
|
297
|
+
var t = mt();
|
|
298
|
+
return j(ge, t), d(t, r(at, {
|
|
298
299
|
get items() {
|
|
299
300
|
return Ae();
|
|
300
301
|
},
|
|
@@ -319,80 +320,85 @@ function qt(i) {
|
|
|
319
320
|
}
|
|
320
321
|
})), t;
|
|
321
322
|
}
|
|
322
|
-
}),
|
|
323
|
+
}), r(g, {
|
|
323
324
|
get when() {
|
|
324
325
|
return !u();
|
|
325
326
|
},
|
|
326
327
|
get children() {
|
|
327
|
-
return
|
|
328
|
+
return r(g, {
|
|
328
329
|
get when() {
|
|
329
|
-
return
|
|
330
|
+
return S();
|
|
330
331
|
},
|
|
331
|
-
get
|
|
332
|
-
return
|
|
332
|
+
get fallback() {
|
|
333
|
+
return r(et, {
|
|
333
334
|
get width() {
|
|
334
335
|
return Y();
|
|
335
336
|
},
|
|
336
337
|
get collapsed() {
|
|
337
|
-
return
|
|
338
|
+
return o.sidebarCollapsed() || N();
|
|
338
339
|
},
|
|
339
340
|
get visibilityMotion() {
|
|
340
|
-
return
|
|
341
|
+
return o.sidebarVisibilityMotion();
|
|
341
342
|
},
|
|
342
343
|
get ariaLabel() {
|
|
343
344
|
return f().sidebarLabel;
|
|
344
345
|
},
|
|
345
346
|
get resizer() {
|
|
346
|
-
return
|
|
347
|
+
return r(se, {
|
|
347
348
|
direction: "horizontal",
|
|
348
|
-
onResize:
|
|
349
|
-
onResizeStart:
|
|
349
|
+
onResize: We,
|
|
350
|
+
onResizeStart: pe,
|
|
350
351
|
onResizeEnd: Le
|
|
351
352
|
});
|
|
352
353
|
},
|
|
353
354
|
get class() {
|
|
354
355
|
return i.slotClassNames?.sidebar;
|
|
355
356
|
},
|
|
356
|
-
children
|
|
357
|
+
get children() {
|
|
358
|
+
return r(U, {});
|
|
359
|
+
}
|
|
357
360
|
});
|
|
358
|
-
}
|
|
359
|
-
}), o(Ge, {
|
|
360
|
-
mode: "auto",
|
|
361
|
+
},
|
|
361
362
|
get children() {
|
|
362
|
-
return
|
|
363
|
-
|
|
364
|
-
return P(() => !!(S() && _()))() && !N();
|
|
365
|
-
},
|
|
366
|
-
onOpenChange: p,
|
|
367
|
-
onPresenceChange: ye,
|
|
368
|
-
presentation: "side-drawer",
|
|
369
|
-
drawerSide: "left",
|
|
370
|
-
get title() {
|
|
371
|
-
return f().sidebarLabel;
|
|
372
|
-
},
|
|
373
|
-
class: "floe-adaptive-shell-sidebar w-fit max-w-[calc(100%-48px)]",
|
|
374
|
-
contentClass: "flex-1 min-h-0 overflow-hidden p-0",
|
|
363
|
+
return r(Je, {
|
|
364
|
+
mode: "auto",
|
|
375
365
|
get children() {
|
|
376
|
-
|
|
377
|
-
|
|
366
|
+
return r(Ge, {
|
|
367
|
+
get open() {
|
|
368
|
+
return P(() => !!(S() && _()))() && !N();
|
|
369
|
+
},
|
|
370
|
+
onOpenChange: W,
|
|
371
|
+
onPresenceChange: ye,
|
|
372
|
+
presentation: "side-drawer",
|
|
373
|
+
drawerSide: "left",
|
|
374
|
+
get title() {
|
|
375
|
+
return f().sidebarLabel;
|
|
376
|
+
},
|
|
377
|
+
class: "floe-adaptive-shell-sidebar w-fit max-w-[calc(100%-48px)]",
|
|
378
|
+
contentClass: "flex-1 min-h-0 overflow-hidden p-0",
|
|
379
|
+
get children() {
|
|
380
|
+
var t = ft();
|
|
381
|
+
return d(t, r(U, {})), B((m) => G(t, "width", `${Y()}px`)), t;
|
|
382
|
+
}
|
|
383
|
+
});
|
|
378
384
|
}
|
|
379
385
|
});
|
|
380
386
|
}
|
|
381
|
-
})
|
|
387
|
+
});
|
|
382
388
|
}
|
|
383
389
|
})];
|
|
384
390
|
}
|
|
385
|
-
}), b), d(
|
|
391
|
+
}), b), d(n, r(g, {
|
|
386
392
|
get when() {
|
|
387
393
|
return P(() => !!(l() && L()))() && !u();
|
|
388
394
|
},
|
|
389
395
|
get children() {
|
|
390
396
|
return [(() => {
|
|
391
|
-
var t =
|
|
397
|
+
var t = vt();
|
|
392
398
|
return t.$$click = () => y(!1), B(() => k(t, I("absolute inset-0 z-40 bg-black/30 cursor-pointer", i.slotClassNames?.mobileSidebarBackdrop))), t;
|
|
393
399
|
})(), (() => {
|
|
394
|
-
var t =
|
|
395
|
-
return typeof C == "function" ? j(C, t) : K = t, d(m, U), B((v) => {
|
|
400
|
+
var t = gt(), m = t.firstChild, C = K;
|
|
401
|
+
return typeof C == "function" ? j(C, t) : K = t, d(m, r(U, {})), B((v) => {
|
|
396
402
|
var O = I("absolute left-0 top-0 bottom-0 z-50", "w-72 max-w-[80vw]", "bg-sidebar border-r border-sidebar-border", "shadow-xl", "animate-in slide-in-from-left duration-200", i.slotClassNames?.mobileSidebarDrawer), R = f().sidebarLabel;
|
|
397
403
|
return O !== v.e && k(t, v.e = O), R !== v.t && w(t, "aria-label", v.t = R), v;
|
|
398
404
|
}, {
|
|
@@ -401,49 +407,49 @@ function qt(i) {
|
|
|
401
407
|
}), t;
|
|
402
408
|
})()];
|
|
403
409
|
}
|
|
404
|
-
}), b), d(E, () => i.children), d(b,
|
|
410
|
+
}), b), d(E, () => i.children), d(b, r(g, {
|
|
405
411
|
get when() {
|
|
406
|
-
return P(() => !!(!l() &&
|
|
412
|
+
return P(() => !!(!l() && o.terminalOpened()))() && i.terminalPanel;
|
|
407
413
|
},
|
|
408
414
|
get children() {
|
|
409
415
|
var t = ht();
|
|
410
|
-
return d(t,
|
|
416
|
+
return d(t, r(se, {
|
|
411
417
|
direction: "vertical",
|
|
412
|
-
onResize: (m) =>
|
|
418
|
+
onResize: (m) => o.setTerminalHeight(o.terminalHeight() - m)
|
|
413
419
|
}), null), d(t, () => i.terminalPanel, null), B((m) => {
|
|
414
|
-
var C = I("relative shrink-0 border-t border-border bg-terminal-background overflow-hidden", i.slotClassNames?.terminalPanel), v = `${
|
|
420
|
+
var C = I("relative shrink-0 border-t border-border bg-terminal-background overflow-hidden", i.slotClassNames?.terminalPanel), v = `${o.terminalHeight()}px`;
|
|
415
421
|
return C !== m.e && k(t, m.e = C), v !== m.t && G(t, "height", m.t = v), m;
|
|
416
422
|
}, {
|
|
417
423
|
e: void 0,
|
|
418
424
|
t: void 0
|
|
419
425
|
}), t;
|
|
420
426
|
}
|
|
421
|
-
}), null), d(s,
|
|
427
|
+
}), null), d(s, r(g, {
|
|
422
428
|
get when() {
|
|
423
429
|
return P(() => !!l())() && i.mobileAccessory;
|
|
424
430
|
},
|
|
425
431
|
get children() {
|
|
426
|
-
var t =
|
|
432
|
+
var t = St();
|
|
427
433
|
return d(t, () => i.mobileAccessory), B(() => t.inert = $()), t;
|
|
428
434
|
}
|
|
429
|
-
}), null), d(s,
|
|
435
|
+
}), null), d(s, r(g, {
|
|
430
436
|
get when() {
|
|
431
437
|
return P(() => !!l())() && i.mobileNavigationPanel;
|
|
432
438
|
},
|
|
433
439
|
get children() {
|
|
434
|
-
return
|
|
440
|
+
return r(ot, ze(() => i.mobileNavigationPanel, {
|
|
435
441
|
navigation: () => Q,
|
|
436
442
|
onPresenceChange: (t) => {
|
|
437
443
|
we(t), i.mobileNavigationPanel?.onPresenceChange?.(t);
|
|
438
444
|
}
|
|
439
445
|
}));
|
|
440
446
|
}
|
|
441
|
-
}), null), d(e,
|
|
447
|
+
}), null), d(e, r(g, {
|
|
442
448
|
get when() {
|
|
443
449
|
return !l();
|
|
444
450
|
},
|
|
445
451
|
get children() {
|
|
446
|
-
return
|
|
452
|
+
return r(rt, {
|
|
447
453
|
get class() {
|
|
448
454
|
return i.slotClassNames?.bottomBar;
|
|
449
455
|
},
|
|
@@ -455,12 +461,12 @@ function qt(i) {
|
|
|
455
461
|
}
|
|
456
462
|
});
|
|
457
463
|
}
|
|
458
|
-
}), null), d(e,
|
|
464
|
+
}), null), d(e, r(g, {
|
|
459
465
|
get when() {
|
|
460
466
|
return P(() => !!l())() && (T().length > 0 || i.mobileNavigationActions?.length);
|
|
461
467
|
},
|
|
462
468
|
get children() {
|
|
463
|
-
return
|
|
469
|
+
return r(nt, {
|
|
464
470
|
ref: (t) => {
|
|
465
471
|
Q = t;
|
|
466
472
|
},
|
|
@@ -474,7 +480,7 @@ function qt(i) {
|
|
|
474
480
|
return T();
|
|
475
481
|
},
|
|
476
482
|
get activeId() {
|
|
477
|
-
return
|
|
483
|
+
return lt({
|
|
478
484
|
activeId: H(),
|
|
479
485
|
mobileSidebarOpen: F.pending() ? !0 : L(),
|
|
480
486
|
activeIsFullScreen: c?.getComponent(H())?.sidebar?.fullScreen ?? N(),
|
|
@@ -504,7 +510,7 @@ function qt(i) {
|
|
|
504
510
|
i.slotClassNames?.root,
|
|
505
511
|
i.class
|
|
506
512
|
), v = `#${f().mainContentId}`, O = I("fixed left-3 top-3 z-[120] rounded-md bg-primary px-3 py-2 text-xs font-medium text-primary-foreground shadow-md", "transition-transform duration-150 motion-reduce:transition-none", "-translate-y-[200%] focus:translate-y-0"), R = $(), Z = $() ? "true" : void 0, ee = i.sidebarMinContentWidth ? "true" : void 0, te = i.sidebarMinContentWidth ? "true" : void 0, ie = S() ? "overlay" : "inline", re = Se(), ne = I("flex-1 min-w-0 flex flex-col overflow-hidden", i.slotClassNames?.contentArea), oe = I("flex-1 min-h-0 overflow-auto overscroll-contain", i.slotClassNames?.main), ae = f().mainContentId, le = f().mainLabel;
|
|
507
|
-
return m !== t.e && G(e, "height", t.e = m), C !== t.t && k(e, t.t = C), v !== t.a && w(a, "href", t.a = v), O !== t.o && k(a, t.o = O), R !== t.i && (
|
|
513
|
+
return m !== t.e && G(e, "height", t.e = m), C !== t.t && k(e, t.t = C), v !== t.a && w(a, "href", t.a = v), O !== t.o && k(a, t.o = O), R !== t.i && (n.inert = t.i = R), Z !== t.n && w(n, "aria-hidden", t.n = Z), ee !== t.s && w(n, "data-floe-dialog-surface-host", t.s = ee), te !== t.h && w(n, "data-floe-surface-portal-layer", t.h = te), ie !== t.r && w(n, "data-floe-shell-sidebar-presentation", t.r = ie), re !== t.d && (b.inert = t.d = re), ne !== t.l && k(b, t.l = ne), oe !== t.u && k(E, t.u = oe), ae !== t.c && w(E, "id", t.c = ae), le !== t.w && w(E, "aria-label", t.w = le), t;
|
|
508
514
|
}, {
|
|
509
515
|
e: void 0,
|
|
510
516
|
t: void 0,
|
|
@@ -525,5 +531,5 @@ function qt(i) {
|
|
|
525
531
|
}
|
|
526
532
|
Fe(["click"]);
|
|
527
533
|
export {
|
|
528
|
-
|
|
534
|
+
Ut as Shell
|
|
529
535
|
};
|
package/dist/full.js
CHANGED
|
@@ -160,29 +160,30 @@ import { createDocumentAssetRecovery as jd } from "./app/createDocumentAssetReco
|
|
|
160
160
|
import { createFloatingPresence as $d } from "./components/ui/floatingPresence.js";
|
|
161
161
|
import { createInputHistoryController as oS } from "./components/chat/input/createInputHistoryController.js";
|
|
162
162
|
import { createLongPressContextMenuHandlers as tS } from "./components/file-browser/longPressContextMenu.js";
|
|
163
|
-
import {
|
|
164
|
-
import {
|
|
165
|
-
import {
|
|
166
|
-
import {
|
|
167
|
-
import {
|
|
168
|
-
import {
|
|
169
|
-
import {
|
|
170
|
-
import {
|
|
171
|
-
import {
|
|
172
|
-
import {
|
|
173
|
-
import {
|
|
174
|
-
import {
|
|
175
|
-
import {
|
|
176
|
-
import {
|
|
177
|
-
import {
|
|
178
|
-
import {
|
|
179
|
-
import {
|
|
180
|
-
import {
|
|
181
|
-
import {
|
|
182
|
-
import {
|
|
183
|
-
import {
|
|
184
|
-
import {
|
|
185
|
-
import {
|
|
163
|
+
import { createRetainedContent as nS } from "./hooks/createRetainedContent.js";
|
|
164
|
+
import { createSimpleContext as cS } from "./context/createSimpleContext.js";
|
|
165
|
+
import { createUIFirstSelection as mS } from "./utils/uiFirstSelection.js";
|
|
166
|
+
import { deferAfterPaint as pS, deferNonBlocking as fS } from "./utils/defer.js";
|
|
167
|
+
import { duration as SS, easing as TS, fadeIn as xS, listContainer as IS, listItem as uS, panelResize as CS, popIn as gS, scaleIn as hS, sidebarVariants as kS, slideInFromBottom as FS, slideInFromLeft as ES, slideInFromRight as PS, slideInFromTop as AS, springConfig as LS } from "./utils/animations.js";
|
|
168
|
+
import { formatKeybind as DS, isMacLikePlatform as _S, isPrimaryModKeyPressed as yS, matchKeybind as vS, parseKeybind as MS } from "./utils/keybind.js";
|
|
169
|
+
import { intersectSurfaceRects as OS } from "./components/ui/surfaceFloatingBoundary.js";
|
|
170
|
+
import { isTypingElement as NS, shouldIgnoreHotkeys as wS } from "./utils/dom.js";
|
|
171
|
+
import { lockBodyStyle as HS } from "./utils/bodyStyleLock.js";
|
|
172
|
+
import { markdownMediaKind as GS, markdownMediaPlaceholder as VS, readMarkdownMediaPlaceholder as KS, safeMarkdownMediaURL as zS, sandboxedMarkdownHtml as XS } from "./components/chat/markdown/media.js";
|
|
173
|
+
import { registerCommandContributions as QS, useCommandContributions as YS } from "./hooks/useCommandContributions.js";
|
|
174
|
+
import { resolveFloatingWindowViewport as jS } from "./components/ui/floatingWindowGeometry.js";
|
|
175
|
+
import { secureRandomUUID as $S } from "./utils/secureRandom.js";
|
|
176
|
+
import { startPointerSession as oT } from "./components/ui/pointerSession.js";
|
|
177
|
+
import { useAttachments as tT } from "./components/chat/hooks/useAttachments.js";
|
|
178
|
+
import { useAutoScroll as nT } from "./components/chat/hooks/useAutoScroll.js";
|
|
179
|
+
import { useDebounce as cT } from "./hooks/useDebounce.js";
|
|
180
|
+
import { useDeckDrag as mT } from "./hooks/useDeckDrag.js";
|
|
181
|
+
import { useFileBrowserDropTarget as pT, useFileBrowserItemDrag as fT } from "./hooks/useFileBrowserDrag.js";
|
|
182
|
+
import { useKeybind as ST } from "./hooks/useKeybind.js";
|
|
183
|
+
import { useMediaQuery as xT } from "./hooks/useMediaQuery.js";
|
|
184
|
+
import { usePersisted as uT } from "./hooks/usePersisted.js";
|
|
185
|
+
import { useResizeObserver as gT } from "./hooks/useResizeObserver.js";
|
|
186
|
+
import { useVirtualList as kT } from "./components/chat/hooks/useVirtualList.js";
|
|
186
187
|
export {
|
|
187
188
|
R as Activity,
|
|
188
189
|
Zt as ActivityAppsMain,
|
|
@@ -689,8 +690,9 @@ export {
|
|
|
689
690
|
tS as createLongPressContextMenuHandlers,
|
|
690
691
|
_d as createMarkdownWorker,
|
|
691
692
|
Ws as createNotificationService,
|
|
693
|
+
nS as createRetainedContent,
|
|
692
694
|
Yi as createShellThemePreset,
|
|
693
|
-
|
|
695
|
+
cS as createSimpleContext,
|
|
694
696
|
ed as createStreamEventBuilder,
|
|
695
697
|
It as createTerminalEditorState,
|
|
696
698
|
Wt as createTerminalFullLineSuggestion,
|
|
@@ -698,18 +700,18 @@ export {
|
|
|
698
700
|
Nt as createTerminalTokenSuggestion,
|
|
699
701
|
tf as createTerminalWidget,
|
|
700
702
|
mf as createThemeService,
|
|
701
|
-
|
|
703
|
+
mS as createUIFirstSelection,
|
|
702
704
|
Td as createViewportFromZoomAnchor,
|
|
703
705
|
vf as createWidgetRegistry,
|
|
704
|
-
|
|
705
|
-
|
|
706
|
+
pS as deferAfterPaint,
|
|
707
|
+
fS as deferNonBlocking,
|
|
706
708
|
ut as deleteTerminalTextBackward,
|
|
707
709
|
Pt as dispatchTerminalSessionKey,
|
|
708
|
-
|
|
709
|
-
|
|
710
|
+
SS as duration,
|
|
711
|
+
TS as easing,
|
|
710
712
|
Ma as ensureSurfacePortalInteractionTracking,
|
|
711
713
|
qm as estimateNotesContextMenuHeight,
|
|
712
|
-
|
|
714
|
+
xS as fadeIn,
|
|
713
715
|
cd as findFreePosition,
|
|
714
716
|
x as floeColorTokenCategories,
|
|
715
717
|
I as floeDesignTokens,
|
|
@@ -722,7 +724,7 @@ export {
|
|
|
722
724
|
E as floeThemeColorVariables,
|
|
723
725
|
P as floeTypographyTokens,
|
|
724
726
|
hm as focusMenuItem,
|
|
725
|
-
|
|
727
|
+
DS as formatKeybind,
|
|
726
728
|
Ys as formatPickerPath,
|
|
727
729
|
Bi as getFileIcon,
|
|
728
730
|
A as getFloeColorTokenValue,
|
|
@@ -743,23 +745,23 @@ export {
|
|
|
743
745
|
yd as hasMarkdownWorker,
|
|
744
746
|
zd as highlightCode,
|
|
745
747
|
Ct as insertTerminalText,
|
|
746
|
-
|
|
748
|
+
OS as intersectSurfaceRects,
|
|
747
749
|
m as isFloeSurfaceStyle,
|
|
748
750
|
En as isLocalInteractionSurfaceTarget,
|
|
749
|
-
|
|
751
|
+
_S as isMacLikePlatform,
|
|
750
752
|
xd as isPointInsideCanvasRect,
|
|
751
|
-
|
|
753
|
+
yS as isPrimaryModKeyPressed,
|
|
752
754
|
od as isStreamEvent,
|
|
753
755
|
Ba as isSurfacePortalMode,
|
|
754
756
|
s as isThemeType,
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
757
|
+
NS as isTypingElement,
|
|
758
|
+
IS as listContainer,
|
|
759
|
+
uS as listItem,
|
|
758
760
|
Id as localToCanvasWorld,
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
761
|
+
HS as lockBodyStyle,
|
|
762
|
+
GS as markdownMediaKind,
|
|
763
|
+
VS as markdownMediaPlaceholder,
|
|
764
|
+
vS as matchKeybind,
|
|
763
765
|
bt as matchesTerminalSuggestionPrefix,
|
|
764
766
|
ss as mergeBoardBounds,
|
|
765
767
|
p as mergeThemeTokenMaps,
|
|
@@ -772,19 +774,19 @@ export {
|
|
|
772
774
|
ji as normalizeShellThemeSelection,
|
|
773
775
|
St as normalizeTerminalWorkspaceProfile,
|
|
774
776
|
ds as noteBucketMetrics,
|
|
775
|
-
|
|
776
|
-
|
|
777
|
+
CS as panelResize,
|
|
778
|
+
MS as parseKeybind,
|
|
777
779
|
qs as parsePickerPath,
|
|
778
780
|
Ht as parseTerminalSuggestionContext,
|
|
779
781
|
Yf as pixelDeltaToGridDelta,
|
|
780
|
-
|
|
782
|
+
gS as popIn,
|
|
781
783
|
qf as positionToGridArea,
|
|
782
784
|
Ji as presetSupportsMode,
|
|
783
785
|
Oa as projectSurfacePortalPosition,
|
|
784
786
|
Wa as projectSurfacePortalRect,
|
|
785
787
|
Ss as promoteLocalItem,
|
|
786
|
-
|
|
787
|
-
|
|
788
|
+
KS as readMarkdownMediaPlaceholder,
|
|
789
|
+
QS as registerCommandContributions,
|
|
788
790
|
Ts as removeSnapshotItem,
|
|
789
791
|
xs as removeSnapshotTopic,
|
|
790
792
|
Is as removeSnapshotTrashItem,
|
|
@@ -795,7 +797,7 @@ export {
|
|
|
795
797
|
Cs as replaceSnapshotTopic,
|
|
796
798
|
gs as replaceSnapshotTrashItem,
|
|
797
799
|
Oi as resolveFileItemIcon,
|
|
798
|
-
|
|
800
|
+
jS as resolveFloatingWindowViewport,
|
|
799
801
|
$i as resolveShellThemePresetName,
|
|
800
802
|
Pn as resolveSurfaceInteractionTargetRole,
|
|
801
803
|
Na as resolveSurfacePortalBoundaryRect,
|
|
@@ -809,25 +811,25 @@ export {
|
|
|
809
811
|
Rn as resolveWorkbenchWidgetLocalTypingTarget,
|
|
810
812
|
Dn as resolveWorkbenchWidgetTextSelectionTarget,
|
|
811
813
|
yt as runTerminalMockCommand,
|
|
812
|
-
|
|
814
|
+
zS as safeMarkdownMediaURL,
|
|
813
815
|
md as sameGridPosition,
|
|
814
|
-
|
|
816
|
+
XS as sandboxedMarkdownHtml,
|
|
815
817
|
pc as sanitizeDisplayMode,
|
|
816
|
-
|
|
818
|
+
hS as scaleIn,
|
|
817
819
|
hs as screenToWorld,
|
|
818
|
-
|
|
820
|
+
$S as secureRandomUUID,
|
|
819
821
|
Rt as setTerminalSessionInputValue,
|
|
820
822
|
_n as shouldActivateWorkbenchWidgetLocalTarget,
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
823
|
+
wS as shouldIgnoreHotkeys,
|
|
824
|
+
kS as sidebarVariants,
|
|
825
|
+
FS as slideInFromBottom,
|
|
826
|
+
ES as slideInFromLeft,
|
|
827
|
+
PS as slideInFromRight,
|
|
828
|
+
AS as slideInFromTop,
|
|
827
829
|
jf as snapToGrid,
|
|
828
|
-
|
|
830
|
+
LS as springConfig,
|
|
829
831
|
Kc as startHotInteraction,
|
|
830
|
-
|
|
832
|
+
oT as startPointerSession,
|
|
831
833
|
Dt as submitTerminalSession,
|
|
832
834
|
S as syncThemeTokenOverrides,
|
|
833
835
|
Ut as terminalCommandTokenSuggestionProvider,
|
|
@@ -840,37 +842,37 @@ export {
|
|
|
840
842
|
Hd as terminateMermaidWorker,
|
|
841
843
|
Xd as terminateShikiWorker,
|
|
842
844
|
Il as updateFileOpenSelection,
|
|
843
|
-
|
|
844
|
-
|
|
845
|
+
tT as useAttachments,
|
|
846
|
+
nT as useAutoScroll,
|
|
845
847
|
Nn as useChatContext,
|
|
846
848
|
Zd as useCodeHighlight,
|
|
847
849
|
ia as useCommand,
|
|
848
|
-
|
|
850
|
+
YS as useCommandContributions,
|
|
849
851
|
ma as useComponentContextFactory,
|
|
850
852
|
sa as useComponentRegistry,
|
|
851
853
|
wf as useCurrentWidgetId,
|
|
852
|
-
|
|
854
|
+
cT as useDebounce,
|
|
853
855
|
qa as useDeck,
|
|
854
|
-
|
|
856
|
+
mT as useDeckDrag,
|
|
855
857
|
tl as useFileBrowser,
|
|
856
858
|
el as useFileBrowserDrag,
|
|
857
|
-
|
|
858
|
-
|
|
859
|
+
pT as useFileBrowserDropTarget,
|
|
860
|
+
fT as useFileBrowserItemDrag,
|
|
859
861
|
Fa as useFloeConfig,
|
|
860
862
|
zl as useFormSubmitting,
|
|
861
|
-
|
|
863
|
+
ST as useKeybind,
|
|
862
864
|
dm as useLayout,
|
|
863
|
-
|
|
865
|
+
xT as useMediaQuery,
|
|
864
866
|
Ud as useMermaid,
|
|
865
867
|
Sm as useMobileLayout,
|
|
866
868
|
Ns as useNotification,
|
|
867
869
|
pa as useOptionalComponentRegistry,
|
|
868
|
-
|
|
869
|
-
|
|
870
|
+
uT as usePersisted,
|
|
871
|
+
gT as useResizeObserver,
|
|
870
872
|
Ea as useResolvedFloeConfig,
|
|
871
873
|
sf as useTheme,
|
|
872
874
|
Ff as useViewActivation,
|
|
873
|
-
|
|
875
|
+
kT as useVirtualList,
|
|
874
876
|
Mf as useWidgetRegistry,
|
|
875
877
|
bf as useWidgetState,
|
|
876
878
|
Hf as useWidgetStateContext,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Component, type JSX } from 'solid-js';
|
|
2
|
+
/**
|
|
3
|
+
* Create content once under its owner's lifetime, then mount it in one location
|
|
4
|
+
* at a time. Placement changes preserve native scroll offsets as well as nodes.
|
|
5
|
+
* Disclosure, focus, and business state remain owned by the caller.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createRetainedContent(render: () => JSX.Element): Component;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { children as c, onMount as f, onCleanup as s } from "solid-js";
|
|
2
|
+
function i(l) {
|
|
3
|
+
const r = c(l);
|
|
4
|
+
let e = [];
|
|
5
|
+
return () => (f(() => {
|
|
6
|
+
for (const { element: t, left: o, top: n } of e)
|
|
7
|
+
t.scrollLeft = o, t.scrollTop = n;
|
|
8
|
+
}), s(() => {
|
|
9
|
+
if (typeof HTMLElement > "u") return;
|
|
10
|
+
e = r.toArray().filter((o) => o instanceof HTMLElement).flatMap((o) => [o, ...o.querySelectorAll("*")]).filter((o) => o.scrollTop !== 0 || o.scrollLeft !== 0).map((o) => ({ element: o, left: o.scrollLeft, top: o.scrollTop }));
|
|
11
|
+
}), r());
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
i as createRetainedContent
|
|
15
|
+
};
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -7,3 +7,4 @@ export { useKeybind } from './useKeybind';
|
|
|
7
7
|
export { usePersisted } from './usePersisted';
|
|
8
8
|
export { useDeckDrag } from './useDeckDrag';
|
|
9
9
|
export { useFileBrowserItemDrag, useFileBrowserDropTarget, type UseFileBrowserItemDragOptions, type FileBrowserItemDragHandlers, type UseFileBrowserDropTargetOptions, type FileBrowserDropTargetResult, } from './useFileBrowserDrag';
|
|
10
|
+
export { createRetainedContent } from './createRetainedContent';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FloeProvider as r } from "./app/FloeProvider.js";
|
|
2
|
-
import { applyShellThemeAttribute as i, applySurfaceStyleAttribute as s, applyTheme as n, builtInThemes as a, getSystemTheme as m, isFloeSurfaceStyle as l, isThemeType as p, mergeThemeTokenMaps as f, resolveThemeTokenOverrides as d, resolveThemeTokens as T, syncThemeTokenOverrides as
|
|
3
|
-
import { floeColorTokenCategories as x, floeDesignTokens as g, floeFontFamilyTokens as y, floeMotionTokens as C, floeRadiusTokens as S, floeSharedCssVariables as h, floeSpacingTokens as F, floeSurfaceTokens as v, floeThemeColorVariables as P, floeTypographyTokens as
|
|
2
|
+
import { applyShellThemeAttribute as i, applySurfaceStyleAttribute as s, applyTheme as n, builtInThemes as a, getSystemTheme as m, isFloeSurfaceStyle as l, isThemeType as p, mergeThemeTokenMaps as f, resolveThemeTokenOverrides as d, resolveThemeTokens as T, syncThemeTokenOverrides as c } from "./styles/themes/index.js";
|
|
3
|
+
import { floeColorTokenCategories as x, floeDesignTokens as g, floeFontFamilyTokens as y, floeMotionTokens as C, floeRadiusTokens as S, floeSharedCssVariables as h, floeSpacingTokens as F, floeSurfaceTokens as v, floeThemeColorVariables as P, floeTypographyTokens as R, getFloeColorTokenValue as k } from "./styles/tokens.js";
|
|
4
4
|
import { BUILT_IN_SHELL_THEME_DEFAULTS as D, REQUIRED_SHELL_THEME_TOKENS as E, assertUniqueThemePresetNames as b, builtInShellThemePresets as L, createShellThemePreset as _, getShellThemePresetsForMode as A, normalizeShellThemeSelection as N, presetSupportsMode as O, resolveShellThemePresetName as M } from "./styles/themes/presets.js";
|
|
5
5
|
import { CommandProvider as U, createCommandService as w, useCommand as G } from "./context/CommandContext.js";
|
|
6
6
|
import { ComponentRegistryProvider as W, createComponentRegistry as K, hasComponentRegistryContext as V, useComponentContextFactory as z, useComponentRegistry as Q, useOptionalComponentRegistry as q } from "./context/ComponentRegistry.js";
|
|
@@ -8,10 +8,10 @@ import { DEFAULT_FLOE_CONFIG as j, FloeConfigProvider as J, useFloeConfig as X,
|
|
|
8
8
|
import { DeckProvider as ee, createDeckService as oe, useDeck as re } from "./context/DeckContext.js";
|
|
9
9
|
import { FLOE_GEOMETRY_SURFACE_ATTR as ie, FLOE_HOT_INTERACTION_ATTR as se, startHotInteraction as ne } from "./utils/hotInteraction.js";
|
|
10
10
|
import { FileBrowserDragProvider as me, hasFileBrowserDragContext as le, useFileBrowserDrag as pe } from "./context/FileBrowserDragContext.js";
|
|
11
|
-
import { LayoutProvider as de, createLayoutService as Te, useLayout as
|
|
11
|
+
import { LayoutProvider as de, createLayoutService as Te, useLayout as ce, useMobileLayout as ue } from "./context/LayoutContext.js";
|
|
12
12
|
import { NotificationContainer as ge, NotificationProvider as ye, createNotificationService as Ce, useNotification as Se } from "./context/NotificationContext.js";
|
|
13
13
|
import { ThemeProvider as Fe, createThemeService as ve, useTheme as Pe } from "./context/ThemeContext.js";
|
|
14
|
-
import { ViewActivationProvider as
|
|
14
|
+
import { ViewActivationProvider as ke, useViewActivation as Ie } from "./context/ViewActivationContext.js";
|
|
15
15
|
import { WidgetRegistryProvider as Ee, createWidgetRegistry as be, useWidgetRegistry as Le } from "./context/WidgetRegistry.js";
|
|
16
16
|
import { WidgetStateProvider as Ae, useCurrentWidgetId as Ne, useWidgetState as Oe, useWidgetStateContext as Me } from "./context/WidgetStateContext.js";
|
|
17
17
|
import { applyDragDelta as Ue, applyResizeDelta as we, getGridCellSize as Ge, pixelDeltaToGridDelta as He, positionToGridArea as We, snapToGrid as Ke } from "./utils/gridLayout.js";
|
|
@@ -19,22 +19,23 @@ import { calculateFitScale as ze } from "./utils/fitScale.js";
|
|
|
19
19
|
import { checkCollision as qe, constrainPosition as Ye, findFreePosition as je, hasCollision as Je, sameGridPosition as Xe } from "./utils/gridCollision.js";
|
|
20
20
|
import { cn as $e } from "./utils/cn.js";
|
|
21
21
|
import { createAdaptiveSidebar as oo } from "./hooks/createAdaptiveSidebar.js";
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
22
|
+
import { createRetainedContent as to } from "./hooks/createRetainedContent.js";
|
|
23
|
+
import { createSimpleContext as so } from "./context/createSimpleContext.js";
|
|
24
|
+
import { createUIFirstSelection as ao } from "./utils/uiFirstSelection.js";
|
|
25
|
+
import { deferAfterPaint as lo, deferNonBlocking as po } from "./utils/defer.js";
|
|
26
|
+
import { duration as To, easing as co, fadeIn as uo, listContainer as xo, listItem as go, panelResize as yo, popIn as Co, scaleIn as So, sidebarVariants as ho, slideInFromBottom as Fo, slideInFromLeft as vo, slideInFromRight as Po, slideInFromTop as Ro, springConfig as ko } from "./utils/animations.js";
|
|
27
|
+
import { formatKeybind as Do, isMacLikePlatform as Eo, isPrimaryModKeyPressed as bo, matchKeybind as Lo, parseKeybind as _o } from "./utils/keybind.js";
|
|
28
|
+
import { isTypingElement as No, shouldIgnoreHotkeys as Oo } from "./utils/dom.js";
|
|
29
|
+
import { lockBodyStyle as Bo } from "./utils/bodyStyleLock.js";
|
|
30
|
+
import { registerCommandContributions as wo, useCommandContributions as Go } from "./hooks/useCommandContributions.js";
|
|
31
|
+
import { secureRandomUUID as Wo } from "./utils/secureRandom.js";
|
|
32
|
+
import { useDebounce as Vo } from "./hooks/useDebounce.js";
|
|
33
|
+
import { useDeckDrag as Qo } from "./hooks/useDeckDrag.js";
|
|
34
|
+
import { useFileBrowserDropTarget as Yo, useFileBrowserItemDrag as jo } from "./hooks/useFileBrowserDrag.js";
|
|
35
|
+
import { useKeybind as Xo } from "./hooks/useKeybind.js";
|
|
36
|
+
import { useMediaQuery as $o } from "./hooks/useMediaQuery.js";
|
|
37
|
+
import { usePersisted as or } from "./hooks/usePersisted.js";
|
|
38
|
+
import { useResizeObserver as tr } from "./hooks/useResizeObserver.js";
|
|
38
39
|
export {
|
|
39
40
|
D as BUILT_IN_SHELL_THEME_DEFAULTS,
|
|
40
41
|
U as CommandProvider,
|
|
@@ -51,7 +52,7 @@ export {
|
|
|
51
52
|
ye as NotificationProvider,
|
|
52
53
|
E as REQUIRED_SHELL_THEME_TOKENS,
|
|
53
54
|
Fe as ThemeProvider,
|
|
54
|
-
|
|
55
|
+
ke as ViewActivationProvider,
|
|
55
56
|
Ee as WidgetRegistryProvider,
|
|
56
57
|
Ae as WidgetStateProvider,
|
|
57
58
|
Ue as applyDragDelta,
|
|
@@ -72,16 +73,17 @@ export {
|
|
|
72
73
|
oe as createDeckService,
|
|
73
74
|
Te as createLayoutService,
|
|
74
75
|
Ce as createNotificationService,
|
|
76
|
+
to as createRetainedContent,
|
|
75
77
|
_ as createShellThemePreset,
|
|
76
|
-
|
|
78
|
+
so as createSimpleContext,
|
|
77
79
|
ve as createThemeService,
|
|
78
|
-
|
|
80
|
+
ao as createUIFirstSelection,
|
|
79
81
|
be as createWidgetRegistry,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
lo as deferAfterPaint,
|
|
83
|
+
po as deferNonBlocking,
|
|
84
|
+
To as duration,
|
|
85
|
+
co as easing,
|
|
86
|
+
uo as fadeIn,
|
|
85
87
|
je as findFreePosition,
|
|
86
88
|
x as floeColorTokenCategories,
|
|
87
89
|
g as floeDesignTokens,
|
|
@@ -92,9 +94,9 @@ export {
|
|
|
92
94
|
F as floeSpacingTokens,
|
|
93
95
|
v as floeSurfaceTokens,
|
|
94
96
|
P as floeThemeColorVariables,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
R as floeTypographyTokens,
|
|
98
|
+
Do as formatKeybind,
|
|
99
|
+
k as getFloeColorTokenValue,
|
|
98
100
|
Ge as getGridCellSize,
|
|
99
101
|
A as getShellThemePresetsForMode,
|
|
100
102
|
m as getSystemTheme,
|
|
@@ -102,62 +104,62 @@ export {
|
|
|
102
104
|
V as hasComponentRegistryContext,
|
|
103
105
|
le as hasFileBrowserDragContext,
|
|
104
106
|
l as isFloeSurfaceStyle,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
+
Eo as isMacLikePlatform,
|
|
108
|
+
bo as isPrimaryModKeyPressed,
|
|
107
109
|
p as isThemeType,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
No as isTypingElement,
|
|
111
|
+
xo as listContainer,
|
|
112
|
+
go as listItem,
|
|
113
|
+
Bo as lockBodyStyle,
|
|
114
|
+
Lo as matchKeybind,
|
|
113
115
|
f as mergeThemeTokenMaps,
|
|
114
116
|
N as normalizeShellThemeSelection,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
+
yo as panelResize,
|
|
118
|
+
_o as parseKeybind,
|
|
117
119
|
He as pixelDeltaToGridDelta,
|
|
118
|
-
|
|
120
|
+
Co as popIn,
|
|
119
121
|
We as positionToGridArea,
|
|
120
122
|
O as presetSupportsMode,
|
|
121
|
-
|
|
123
|
+
wo as registerCommandContributions,
|
|
122
124
|
M as resolveShellThemePresetName,
|
|
123
125
|
d as resolveThemeTokenOverrides,
|
|
124
126
|
T as resolveThemeTokens,
|
|
125
127
|
Xe as sameGridPosition,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
128
|
+
So as scaleIn,
|
|
129
|
+
Wo as secureRandomUUID,
|
|
130
|
+
Oo as shouldIgnoreHotkeys,
|
|
131
|
+
ho as sidebarVariants,
|
|
132
|
+
Fo as slideInFromBottom,
|
|
133
|
+
vo as slideInFromLeft,
|
|
134
|
+
Po as slideInFromRight,
|
|
135
|
+
Ro as slideInFromTop,
|
|
134
136
|
Ke as snapToGrid,
|
|
135
|
-
|
|
137
|
+
ko as springConfig,
|
|
136
138
|
ne as startHotInteraction,
|
|
137
|
-
|
|
139
|
+
c as syncThemeTokenOverrides,
|
|
138
140
|
G as useCommand,
|
|
139
|
-
|
|
141
|
+
Go as useCommandContributions,
|
|
140
142
|
z as useComponentContextFactory,
|
|
141
143
|
Q as useComponentRegistry,
|
|
142
144
|
Ne as useCurrentWidgetId,
|
|
143
|
-
|
|
145
|
+
Vo as useDebounce,
|
|
144
146
|
re as useDeck,
|
|
145
|
-
|
|
147
|
+
Qo as useDeckDrag,
|
|
146
148
|
pe as useFileBrowserDrag,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
+
Yo as useFileBrowserDropTarget,
|
|
150
|
+
jo as useFileBrowserItemDrag,
|
|
149
151
|
X as useFloeConfig,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
Xo as useKeybind,
|
|
153
|
+
ce as useLayout,
|
|
154
|
+
$o as useMediaQuery,
|
|
155
|
+
ue as useMobileLayout,
|
|
154
156
|
Se as useNotification,
|
|
155
157
|
q as useOptionalComponentRegistry,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
+
or as usePersisted,
|
|
159
|
+
tr as useResizeObserver,
|
|
158
160
|
Z as useResolvedFloeConfig,
|
|
159
161
|
Pe as useTheme,
|
|
160
|
-
|
|
162
|
+
Ie as useViewActivation,
|
|
161
163
|
Le as useWidgetRegistry,
|
|
162
164
|
Oe as useWidgetState,
|
|
163
165
|
Me as useWidgetStateContext
|