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