@floegence/floe-webapp-core 0.78.10 → 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.
@@ -1,51 +1,63 @@
1
- import { createComponent as o, Dynamic as W, insert as d, memo as w, effect as N, className as y, setAttribute as P, setStyleProperty as Y, mergeProps as he, template as B, use as Se, delegateEvents as ye } from "solid-js/web";
2
- import { createSignal as F, onMount as Ce, onCleanup as Me, createEffect as C, batch as we, createMemo as I, For as _, Show as g } from "solid-js";
3
- import { observeViewport as Ie } from "../../viewport.js";
4
- import { useLayout as Be } from "../../context/LayoutContext.js";
5
- import { useResolvedFloeConfig as Ae } from "../../context/FloeConfigContext.js";
6
- import { useMediaQuery as ke } from "../../hooks/useMediaQuery.js";
7
- import { useOverlayMask as xe } from "../../hooks/useOverlayMask.js";
8
- import { cn as M } from "../../utils/cn.js";
9
- import { deferAfterPaint as Ne, deferNonBlocking as Pe } from "../../utils/defer.js";
10
- import { useComponentRegistry as Te } from "../../context/ComponentRegistry.js";
11
- import { Sidebar as Oe } from "./Sidebar.js";
12
- import { TopBar as Le } from "./TopBar.js";
13
- import { TopBarIconButton as ze } from "./TopBarIconButton.js";
14
- import { BottomBar as Re } from "./BottomBar.js";
15
- import { MobileTabBar as $e } from "./MobileTabBar.js";
16
- import { MobileNavigationPanel as We } from "./MobileNavigationPanel.js";
17
- import { ActivityBar as Fe } from "./ActivityBar.js";
18
- import { ResizeHandle as Z } from "./ResizeHandle.js";
19
- import { resolveMobileTabActiveId as He, resolveMobileTabSelect as Ve } from "./mobileTabs.js";
20
- import { KeepAliveStack as Ee } from "./KeepAliveStack.js";
21
- import { resolveShellSidebarActiveTabChange as _e } from "./sidebarVisibilityMotion.js";
22
- import { createUIFirstSelection as qe } from "../../utils/uiFirstSelection.js";
23
- var ee = /* @__PURE__ */ B('<div class="flex items-center gap-2">'), De = /* @__PURE__ */ B("<div data-floe-shell-slot=mobile-sidebar-backdrop>"), Ke = /* @__PURE__ */ B('<div data-floe-shell-slot=mobile-sidebar-drawer tabindex=-1 role=dialog aria-modal=true><div class="h-full overflow-auto overscroll-contain">'), Qe = /* @__PURE__ */ B("<div data-floe-shell-slot=terminal-panel style=border-top-color:var(--terminal-panel-border)>"), Ue = /* @__PURE__ */ B('<div data-floe-shell-slot=mobile-accessory class="relative shrink-0">'), je = /* @__PURE__ */ B('<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>');
24
- function gt(i) {
25
- const [te, ie] = F(!1);
26
- Ce(() => {
27
- Me(Ie(window, (e) => ie(e.keyboardOpen)));
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
+ import { observeViewport as _e } from "../../viewport.js";
4
+ import { useLayout as De } from "../../context/LayoutContext.js";
5
+ import { useResolvedFloeConfig as qe } from "../../context/FloeConfigContext.js";
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";
12
+ import { cn as I } from "../../utils/cn.js";
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";
22
+ import { ResizeHandle as se } from "./ResizeHandle.js";
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) {
29
+ const [ce, be] = M(!1);
30
+ He(() => {
31
+ Ee(_e(window, (e) => be(e.keyboardOpen)));
28
32
  });
29
- const r = Be(), q = Ae(), l = ke(q.config.layout.mobileQuery), [T, h] = F(!1), [O, re] = F(!1);
30
- let D;
31
- const ne = () => l() && !!i.mobileNavigationPanel?.open;
32
- C(() => {
33
- !l() && i.mobileNavigationPanel?.open && i.mobileNavigationPanel.onOpenChange(!1), ne() && h(!1);
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({
34
+ container: me,
35
+ sidebarWidth: () => (D() ?? o.sidebarWidth()) + (he()?.width ?? 0),
36
+ minContentWidth: () => i.sidebarMinContentWidth ?? 0
37
+ }), S = () => !l() && !!i.sidebarMinContentWidth && !u() && Ce() === "overlay";
38
+ A(() => {
39
+ (!S() || N()) && W(!1);
34
40
  });
35
- const [K, H] = F(null);
36
- let V;
41
+ const [L, y] = M(!1), [$, we] = M(!1);
42
+ let Q;
43
+ const Me = () => l() && !!i.mobileNavigationPanel?.open;
44
+ A(() => {
45
+ !l() && i.mobileNavigationPanel?.open && i.mobileNavigationPanel.onOpenChange(!1), Me() && y(!1);
46
+ });
47
+ const [D, q] = M(null);
48
+ let K;
37
49
  const u = () => i.sidebarMode === "hidden", c = (() => {
38
50
  try {
39
- return Te();
51
+ return Ze();
40
52
  } catch {
41
53
  return null;
42
54
  }
43
- })(), L = (e, a) => {
55
+ })(), z = (e, a) => {
44
56
  const s = c?.getComponent(e)?.sidebar?.fullScreen ?? !1, {
45
57
  openSidebar: n,
46
58
  visibilityMotion: b
47
- } = _e({
48
- currentActiveId: r.sidebarActiveTab(),
59
+ } = ct({
60
+ currentActiveId: o.sidebarActiveTab(),
49
61
  nextActiveId: e,
50
62
  requestedOpenSidebar: a?.openSidebar,
51
63
  sidebarHidden: u(),
@@ -53,91 +65,106 @@ function gt(i) {
53
65
  isMobile: l(),
54
66
  resolveSidebarVisibilityMotion: i.resolveSidebarVisibilityMotion
55
67
  });
56
- r.setSidebarActiveTab(e, {
68
+ S() ? (p.get(e)?.focus({
69
+ preventScroll: !0
70
+ }), o.setSidebarActiveTab(e, {
71
+ openSidebar: !1,
72
+ visibilityMotion: b
73
+ }), W(!s)) : o.setSidebarActiveTab(e, {
57
74
  openSidebar: n,
58
75
  visibilityMotion: b
59
76
  });
60
- }, z = qe({
61
- committed: r.sidebarActiveTab,
77
+ }, F = bt({
78
+ committed: o.sidebarActiveTab,
62
79
  commit: (e, a) => {
63
- we(() => {
64
- L(e, a?.opts), typeof a?.mobileSidebarOpen == "boolean" && h(a.mobileSidebarOpen);
80
+ Ve(() => {
81
+ z(e, a?.opts), typeof a?.mobileSidebarOpen == "boolean" && y(a.mobileSidebarOpen);
65
82
  });
66
83
  },
67
84
  onEvent: (e) => i.onActivitySelectionEvent?.(e)
68
- }), R = () => i.activitySelectionMode === "ui-first" ? z.visual() : r.sidebarActiveTab(), oe = (e, a) => {
85
+ }), H = () => i.activitySelectionMode === "ui-first" ? F.visual() : o.sidebarActiveTab(), ke = (e, a) => {
69
86
  if (i.activitySelectionMode === "ui-first") {
70
- z.request(e, {
87
+ F.request(e, {
71
88
  source: "activity-bar",
72
89
  opts: a
73
90
  });
74
91
  return;
75
92
  }
76
- L(e, a);
93
+ z(e, a);
77
94
  };
78
- C(() => {
79
- u() && h(!1);
80
- }), C(() => {
81
- const e = l();
82
- r.isMobile() !== e && r.setIsMobile(e);
83
- }), C(() => {
84
- l() || h(!1);
85
- }), C(() => {
86
- const e = r.sidebarVisibilityMotion(), a = r.sidebarVisibilityMotionRevision();
87
- e === "instant" && Ne(() => r.clearSidebarVisibilityMotion(a));
95
+ A(() => {
96
+ u() && y(!1);
97
+ }), A(() => {
98
+ l() || y(!1);
99
+ }), A(() => {
100
+ const e = o.sidebarVisibilityMotion(), a = o.sidebarVisibilityMotionRevision();
101
+ e === "instant" && Xe(() => o.clearSidebarVisibilityMotion(a));
88
102
  });
89
- const A = I(() => i.activityItems ? i.activityItems : c ? c.sidebarItems().filter((e) => !!e.icon).filter((e) => !(l() && e.sidebar?.hiddenOnMobile)).map((e) => ({
103
+ const T = x(() => i.activityItems ? i.activityItems : c ? c.sidebarItems().filter((e) => !!e.icon).filter((e) => !(l() && e.sidebar?.hiddenOnMobile)).map((e) => ({
90
104
  id: e.id,
91
105
  icon: e.icon,
92
106
  label: e.name,
93
107
  badge: e.sidebar?.badge,
94
108
  collapseBehavior: e.sidebar?.collapseBehavior ?? (e.sidebar?.fullScreen ? "preserve" : "toggle")
95
- })) : []), ae = I(() => u() ? [] : i.sidebarContent ? [] : c ? c.sidebarItems().filter((e) => !(l() && e.sidebar?.hiddenOnMobile)).filter((e) => e.sidebar?.fullScreen !== !0 && e.sidebar?.renderIn !== "main").map((e) => ({
109
+ })) : []), Ae = x(() => T().map((e) => ({
110
+ ...e,
111
+ buttonRef: (a) => {
112
+ a ? p.set(e.id, a) : p.delete(e.id), e.buttonRef?.(a);
113
+ },
114
+ ...S() && !e.onClick ? {
115
+ ariaExpanded: () => _() && o.sidebarActiveTab() === e.id,
116
+ ariaHasPopup: "dialog"
117
+ } : {}
118
+ }))), xe = (e) => {
119
+ S() ? (e || p.get(o.sidebarActiveTab())?.focus({
120
+ preventScroll: !0
121
+ }), W(!e)) : o.setSidebarCollapsed(e);
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) => ({
96
123
  id: e.id,
97
- render: () => o(W, {
124
+ render: () => r(V, {
98
125
  get component() {
99
126
  return e.component;
100
127
  }
101
128
  })
102
- })) : []), Q = (e) => {
129
+ })) : []), Be = (e) => {
103
130
  if (!u()) {
104
131
  if (i.sidebarContent) return i.sidebarContent(e);
105
132
  if (c)
106
- return o(Ee, {
133
+ return r(dt, {
107
134
  get views() {
108
- return ae();
135
+ return Ie();
109
136
  },
110
137
  activeId: e
111
138
  });
112
139
  }
113
- }, E = I(() => u() ? !0 : c ? c.getComponent(r.sidebarActiveTab())?.sidebar?.fullScreen ?? !1 : !1), le = I(() => {
140
+ }, N = x(() => u() ? !0 : c ? c.getComponent(o.sidebarActiveTab())?.sidebar?.fullScreen ?? !1 : !1), Pe = x(() => {
114
141
  if (u()) return !0;
115
142
  if (!c) return !1;
116
- const e = c.getComponent(r.sidebarActiveTab());
143
+ const e = c.getComponent(o.sidebarActiveTab());
117
144
  return e?.sidebar ? e.sidebar.fullScreen === !0 || e.sidebar.renderIn === "main" : !1;
118
145
  });
119
- C(() => {
120
- l() && E() && h(!1);
146
+ A(() => {
147
+ l() && N() && y(!1);
121
148
  });
122
- const se = I(() => {
149
+ const Te = x(() => {
123
150
  if (i.bottomBarItems) return i.bottomBarItems;
124
151
  if (!c) return;
125
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");
126
153
  return [(() => {
127
- var n = ee();
128
- return d(n, o(_, {
154
+ var n = de();
155
+ return d(n, r(J, {
129
156
  each: a,
130
- children: (b) => o(W, {
157
+ children: (b) => r(V, {
131
158
  get component() {
132
159
  return b.component;
133
160
  }
134
161
  })
135
162
  })), n;
136
163
  })(), (() => {
137
- var n = ee();
138
- return d(n, o(_, {
164
+ var n = de();
165
+ return d(n, r(J, {
139
166
  each: s,
140
- children: (b) => o(W, {
167
+ children: (b) => r(V, {
141
168
  get component() {
142
169
  return b.component;
143
170
  }
@@ -145,55 +172,55 @@ function gt(i) {
145
172
  })), n;
146
173
  })()];
147
174
  });
148
- C(() => {
149
- const e = A();
175
+ A(() => {
176
+ const e = T();
150
177
  if (!e.length) return;
151
- if (!r.sidebarActiveTab()) {
178
+ if (!o.sidebarActiveTab()) {
152
179
  const s = e.find((n) => !n.onClick);
153
180
  if (!s) return;
154
- L(s.id);
181
+ z(s.id);
155
182
  }
156
183
  });
157
- const U = (e) => {
184
+ const X = (e) => {
158
185
  const a = u() ? !0 : c?.getComponent(e)?.sidebar?.fullScreen ?? !1, {
159
186
  nextActiveId: s,
160
187
  nextMobileSidebarOpen: n
161
- } = Ve({
188
+ } = st({
162
189
  clickedId: e,
163
- activeId: r.sidebarActiveTab(),
164
- mobileSidebarOpen: T(),
190
+ activeId: o.sidebarActiveTab(),
191
+ mobileSidebarOpen: L(),
165
192
  clickedIsFullScreen: a
166
193
  });
167
- if (r.sidebarActiveTab() !== s) {
194
+ if (o.sidebarActiveTab() !== s) {
168
195
  if (i.activitySelectionMode === "ui-first") {
169
- z.request(s, {
196
+ F.request(s, {
170
197
  source: "mobile-tab-bar",
171
198
  mobileSidebarOpen: n
172
199
  });
173
200
  return;
174
201
  }
175
- L(s);
202
+ z(s);
176
203
  }
177
- h(n);
178
- }, de = (e) => {
204
+ y(n);
205
+ }, Ne = (e) => {
179
206
  if (e.onClick) {
180
- Pe(() => e.onClick());
207
+ Ye(() => e.onClick());
181
208
  return;
182
209
  }
183
- U(e.id);
184
- }, ce = I(() => {
210
+ X(e.id);
211
+ }, Oe = x(() => {
185
212
  const e = i.topBarActions;
186
213
  if (!l() || (i.activityBottomItemsMobileMode ?? "hidden") !== "topBar") return e;
187
214
  const s = i.activityBottomItems ?? [];
188
- return s.length ? [o(_, {
215
+ return s.length ? [r(J, {
189
216
  each: s,
190
- children: (n) => o(ze, {
217
+ children: (n) => r(it, {
191
218
  get label() {
192
219
  return n.label;
193
220
  },
194
- onClick: () => de(n),
221
+ onClick: () => Ne(n),
195
222
  get children() {
196
- return o(W, {
223
+ return r(V, {
197
224
  get component() {
198
225
  return n.icon;
199
226
  },
@@ -202,18 +229,18 @@ function gt(i) {
202
229
  }
203
230
  })
204
231
  }), e] : e;
205
- }), be = () => u() ? !0 : r.sidebarCollapsed(), ue = () => K() ?? r.sidebarWidth(), v = () => q.config.accessibility, me = () => {
206
- H(r.sidebarWidth());
207
- }, fe = (e) => {
208
- H((a) => r.clampSidebarWidth((a ?? r.sidebarWidth()) + e));
209
- }, ve = () => {
210
- const e = K();
211
- e !== null && (r.setSidebarWidth(e), H(null));
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));
236
+ }, Le = () => {
237
+ const e = D();
238
+ e !== null && (o.setSidebarWidth(e), q(null));
212
239
  };
213
- xe({
214
- open: () => l() && T() && !u(),
215
- root: () => V,
216
- onClose: () => h(!1),
240
+ Qe({
241
+ open: () => l() && L() && !u(),
242
+ root: () => K,
243
+ onClose: () => y(!1),
217
244
  lockBodyScroll: !0,
218
245
  trapFocus: !0,
219
246
  closeOnEscape: !0,
@@ -223,170 +250,206 @@ function gt(i) {
223
250
  autoFocus: !1,
224
251
  restoreFocus: !0
225
252
  });
226
- const ge = () => {
253
+ const $e = () => {
227
254
  if (typeof document > "u") return;
228
- const e = document.getElementById(v().mainContentId);
255
+ const e = document.getElementById(f().mainContentId);
229
256
  if (!(!e || !(e instanceof HTMLElement)))
230
257
  try {
231
258
  e.focus();
232
259
  } catch {
233
260
  }
234
- };
261
+ }, U = Ke(() => (() => {
262
+ var e = ut();
263
+ return d(e, () => Be(o.sidebarActiveTab())), e;
264
+ })());
235
265
  return (() => {
236
- var e = je(), a = e.firstChild, s = a.nextSibling, n = s.firstChild, b = n.firstChild, $ = b.firstChild;
237
- return a.$$click = () => ge(), d(a, () => v().skipLinkLabel), d(e, o(g, {
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, {
238
268
  get when() {
239
269
  return !l() || i.topBarMobileMode !== "hidden";
240
270
  },
241
271
  get children() {
242
- return o(Le, {
272
+ return r(tt, {
243
273
  get logo() {
244
274
  return i.logo;
245
275
  },
246
276
  get actions() {
247
- return ce();
277
+ return Oe();
248
278
  },
249
279
  get ariaLabel() {
250
- return v().topBarLabel;
280
+ return f().topBarLabel;
251
281
  },
252
282
  get class() {
253
283
  return i.slotClassNames?.topBar;
254
284
  }
255
285
  });
256
286
  }
257
- }), s), d(n, o(g, {
287
+ }), s), j(fe, n), d(n, r(g, {
258
288
  get when() {
259
289
  return !l();
260
290
  },
261
291
  get children() {
262
- return [o(g, {
292
+ return [r(g, {
263
293
  get when() {
264
- return A().length > 0;
294
+ return T().length > 0;
265
295
  },
266
296
  get children() {
267
- return o(Fe, {
297
+ var t = mt();
298
+ return j(ge, t), d(t, r(at, {
268
299
  get items() {
269
- return A();
300
+ return Ae();
270
301
  },
271
302
  get bottomItems() {
272
303
  return i.activityBottomItems;
273
304
  },
274
305
  get activeId() {
275
- return R();
306
+ return H();
276
307
  },
277
- onActiveChange: oe,
308
+ onActiveChange: ke,
278
309
  get collapsed() {
279
- return be();
310
+ return Re();
280
311
  },
281
312
  get onCollapsedChange() {
282
- return w(() => !!u())() ? void 0 : r.setSidebarCollapsed;
313
+ return u() ? void 0 : xe;
283
314
  },
284
315
  get ariaLabel() {
285
- return v().primaryNavigationLabel;
316
+ return f().primaryNavigationLabel;
286
317
  },
287
318
  get class() {
288
319
  return i.slotClassNames?.activityBar;
289
320
  }
290
- });
321
+ })), t;
291
322
  }
292
- }), o(g, {
323
+ }), r(g, {
293
324
  get when() {
294
325
  return !u();
295
326
  },
296
327
  get children() {
297
- return o(Oe, {
298
- get width() {
299
- return ue();
300
- },
301
- get collapsed() {
302
- return r.sidebarCollapsed() || E();
328
+ return r(g, {
329
+ get when() {
330
+ return S();
303
331
  },
304
- get visibilityMotion() {
305
- return r.sidebarVisibilityMotion();
306
- },
307
- get ariaLabel() {
308
- return v().sidebarLabel;
309
- },
310
- get resizer() {
311
- return o(Z, {
312
- direction: "horizontal",
313
- onResize: fe,
314
- onResizeStart: me,
315
- onResizeEnd: ve
332
+ get fallback() {
333
+ return r(et, {
334
+ get width() {
335
+ return Y();
336
+ },
337
+ get collapsed() {
338
+ return o.sidebarCollapsed() || N();
339
+ },
340
+ get visibilityMotion() {
341
+ return o.sidebarVisibilityMotion();
342
+ },
343
+ get ariaLabel() {
344
+ return f().sidebarLabel;
345
+ },
346
+ get resizer() {
347
+ return r(se, {
348
+ direction: "horizontal",
349
+ onResize: We,
350
+ onResizeStart: pe,
351
+ onResizeEnd: Le
352
+ });
353
+ },
354
+ get class() {
355
+ return i.slotClassNames?.sidebar;
356
+ },
357
+ get children() {
358
+ return r(U, {});
359
+ }
316
360
  });
317
361
  },
318
- get class() {
319
- return i.slotClassNames?.sidebar;
320
- },
321
362
  get children() {
322
- return Q(r.sidebarActiveTab());
363
+ return r(Je, {
364
+ mode: "auto",
365
+ get children() {
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
+ });
384
+ }
385
+ });
323
386
  }
324
387
  });
325
388
  }
326
389
  })];
327
390
  }
328
- }), b), d(n, o(g, {
391
+ }), b), d(n, r(g, {
329
392
  get when() {
330
- return w(() => !!(l() && T()))() && !u();
393
+ return P(() => !!(l() && L()))() && !u();
331
394
  },
332
395
  get children() {
333
396
  return [(() => {
334
- var t = De();
335
- return t.$$click = () => h(!1), N(() => y(t, M("absolute inset-0 z-40 bg-black/30 cursor-pointer", i.slotClassNames?.mobileSidebarBackdrop))), t;
397
+ var t = vt();
398
+ return t.$$click = () => y(!1), B(() => k(t, I("absolute inset-0 z-40 bg-black/30 cursor-pointer", i.slotClassNames?.mobileSidebarBackdrop))), t;
336
399
  })(), (() => {
337
- var t = Ke(), m = t.firstChild, S = V;
338
- return typeof S == "function" ? Se(S, t) : V = t, d(m, () => Q(r.sidebarActiveTab())), N((f) => {
339
- var k = M("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), x = v().sidebarLabel;
340
- return k !== f.e && y(t, f.e = k), x !== f.t && P(t, "aria-label", f.t = x), f;
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) => {
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;
403
+ return O !== v.e && k(t, v.e = O), R !== v.t && w(t, "aria-label", v.t = R), v;
341
404
  }, {
342
405
  e: void 0,
343
406
  t: void 0
344
407
  }), t;
345
408
  })()];
346
409
  }
347
- }), b), d($, () => i.children), d(b, o(g, {
410
+ }), b), d(E, () => i.children), d(b, r(g, {
348
411
  get when() {
349
- return w(() => !!(!l() && r.terminalOpened()))() && i.terminalPanel;
412
+ return P(() => !!(!l() && o.terminalOpened()))() && i.terminalPanel;
350
413
  },
351
414
  get children() {
352
- var t = Qe();
353
- return d(t, o(Z, {
415
+ var t = ht();
416
+ return d(t, r(se, {
354
417
  direction: "vertical",
355
- onResize: (m) => r.setTerminalHeight(r.terminalHeight() - m)
356
- }), null), d(t, () => i.terminalPanel, null), N((m) => {
357
- var S = M("relative shrink-0 border-t border-border bg-terminal-background overflow-hidden", i.slotClassNames?.terminalPanel), f = `${r.terminalHeight()}px`;
358
- return S !== m.e && y(t, m.e = S), f !== m.t && Y(t, "height", m.t = f), m;
418
+ onResize: (m) => o.setTerminalHeight(o.terminalHeight() - m)
419
+ }), null), d(t, () => i.terminalPanel, null), B((m) => {
420
+ var C = I("relative shrink-0 border-t border-border bg-terminal-background overflow-hidden", i.slotClassNames?.terminalPanel), v = `${o.terminalHeight()}px`;
421
+ return C !== m.e && k(t, m.e = C), v !== m.t && G(t, "height", m.t = v), m;
359
422
  }, {
360
423
  e: void 0,
361
424
  t: void 0
362
425
  }), t;
363
426
  }
364
- }), null), d(s, o(g, {
427
+ }), null), d(s, r(g, {
365
428
  get when() {
366
- return w(() => !!l())() && i.mobileAccessory;
429
+ return P(() => !!l())() && i.mobileAccessory;
367
430
  },
368
431
  get children() {
369
- var t = Ue();
370
- return d(t, () => i.mobileAccessory), N(() => t.inert = O()), t;
432
+ var t = St();
433
+ return d(t, () => i.mobileAccessory), B(() => t.inert = $()), t;
371
434
  }
372
- }), null), d(s, o(g, {
435
+ }), null), d(s, r(g, {
373
436
  get when() {
374
- return w(() => !!l())() && i.mobileNavigationPanel;
437
+ return P(() => !!l())() && i.mobileNavigationPanel;
375
438
  },
376
439
  get children() {
377
- return o(We, he(() => i.mobileNavigationPanel, {
378
- navigation: () => D,
440
+ return r(ot, ze(() => i.mobileNavigationPanel, {
441
+ navigation: () => Q,
379
442
  onPresenceChange: (t) => {
380
- re(t), i.mobileNavigationPanel?.onPresenceChange?.(t);
443
+ we(t), i.mobileNavigationPanel?.onPresenceChange?.(t);
381
444
  }
382
445
  }));
383
446
  }
384
- }), null), d(e, o(g, {
447
+ }), null), d(e, r(g, {
385
448
  get when() {
386
449
  return !l();
387
450
  },
388
451
  get children() {
389
- return o(Re, {
452
+ return r(rt, {
390
453
  get class() {
391
454
  return i.slotClassNames?.bottomBar;
392
455
  },
@@ -394,50 +457,50 @@ function gt(i) {
394
457
  return i.slotClassNames?.bottomBarHeight;
395
458
  },
396
459
  get children() {
397
- return se();
460
+ return Te();
398
461
  }
399
462
  });
400
463
  }
401
- }), null), d(e, o(g, {
464
+ }), null), d(e, r(g, {
402
465
  get when() {
403
- return w(() => !!l())() && (A().length > 0 || i.mobileNavigationActions?.length);
466
+ return P(() => !!l())() && (T().length > 0 || i.mobileNavigationActions?.length);
404
467
  },
405
468
  get children() {
406
- return o($e, {
469
+ return r(nt, {
407
470
  ref: (t) => {
408
- D = t;
471
+ Q = t;
409
472
  },
410
473
  get actions() {
411
474
  return i.mobileNavigationActions;
412
475
  },
413
476
  get hidden() {
414
- return !!(i.hideMobileNavigationWhenKeyboardOpen && te() && !O());
477
+ return !!(i.hideMobileNavigationWhenKeyboardOpen && ce() && !$());
415
478
  },
416
479
  get items() {
417
- return A();
480
+ return T();
418
481
  },
419
482
  get activeId() {
420
- return He({
421
- activeId: R(),
422
- mobileSidebarOpen: z.pending() ? !0 : T(),
423
- activeIsFullScreen: c?.getComponent(R())?.sidebar?.fullScreen ?? E(),
483
+ return lt({
484
+ activeId: H(),
485
+ mobileSidebarOpen: F.pending() ? !0 : L(),
486
+ activeIsFullScreen: c?.getComponent(H())?.sidebar?.fullScreen ?? N(),
424
487
  activeIsPage: (() => {
425
- const t = c?.getComponent(R())?.sidebar;
426
- return t ? t.fullScreen === !0 || t.renderIn === "main" : le();
488
+ const t = c?.getComponent(H())?.sidebar;
489
+ return t ? t.fullScreen === !0 || t.renderIn === "main" : Pe();
427
490
  })()
428
491
  });
429
492
  },
430
- onSelect: U,
493
+ onSelect: X,
431
494
  get ariaLabel() {
432
- return v().mobileNavigationLabel;
495
+ return f().mobileNavigationLabel;
433
496
  },
434
497
  get class() {
435
498
  return i.slotClassNames?.mobileTabBar;
436
499
  }
437
500
  });
438
501
  }
439
- }), null), N((t) => {
440
- var m = i.fillParent ? "100%" : void 0, S = M(
502
+ }), null), B((t) => {
503
+ var m = i.fillParent ? "100%" : void 0, C = I(
441
504
  // Use dvh when supported to avoid mobile browser UI causing layout jumps.
442
505
  "h-screen h-[100dvh] w-full flex flex-col overflow-hidden",
443
506
  "bg-background text-foreground",
@@ -446,8 +509,8 @@ function gt(i) {
446
509
  l() && i.topBarMobileMode === "hidden" && "safe-top",
447
510
  i.slotClassNames?.root,
448
511
  i.class
449
- ), f = `#${v().mainContentId}`, k = M("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"), x = O(), j = O() ? "true" : void 0, p = M("flex-1 min-w-0 flex flex-col overflow-hidden", i.slotClassNames?.contentArea), G = M("flex-1 min-h-0 overflow-auto overscroll-contain", i.slotClassNames?.main), J = v().mainContentId, X = v().mainLabel;
450
- return m !== t.e && Y(e, "height", t.e = m), S !== t.t && y(e, t.t = S), f !== t.a && P(a, "href", t.a = f), k !== t.o && y(a, t.o = k), x !== t.i && (n.inert = t.i = x), j !== t.n && P(n, "aria-hidden", t.n = j), p !== t.s && y(b, t.s = p), G !== t.h && y($, t.h = G), J !== t.r && P($, "id", t.r = J), X !== t.d && P($, "aria-label", t.d = X), t;
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;
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;
451
514
  }, {
452
515
  e: void 0,
453
516
  t: void 0,
@@ -458,11 +521,15 @@ function gt(i) {
458
521
  s: void 0,
459
522
  h: void 0,
460
523
  r: void 0,
461
- d: void 0
524
+ d: void 0,
525
+ l: void 0,
526
+ u: void 0,
527
+ c: void 0,
528
+ w: void 0
462
529
  }), e;
463
530
  })();
464
531
  }
465
- ye(["click"]);
532
+ Fe(["click"]);
466
533
  export {
467
- gt as Shell
534
+ Ut as Shell
468
535
  };