@floegence/floe-webapp-core 0.86.62 → 0.86.64

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