@floegence/floe-webapp-core 0.77.3 → 0.78.0

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