@floegence/floe-webapp-core 0.35.32 → 0.35.34

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 (29) hide show
  1. package/dist/components/file-browser/DirectoryTree.js +84 -86
  2. package/dist/components/file-browser/FileContextMenu.d.ts +2 -2
  3. package/dist/components/file-browser/FileContextMenu.js +300 -142
  4. package/dist/components/file-browser/FileGridView.js +50 -45
  5. package/dist/components/file-browser/FileIcons.d.ts +10 -2
  6. package/dist/components/file-browser/FileIcons.js +289 -181
  7. package/dist/components/file-browser/FileListView.js +99 -94
  8. package/dist/components/file-browser/contextMenuEvent.d.ts +10 -0
  9. package/dist/components/file-browser/contextMenuEvent.js +19 -0
  10. package/dist/components/file-browser/index.d.ts +2 -2
  11. package/dist/components/file-browser/longPressContextMenu.d.ts +1 -0
  12. package/dist/components/file-browser/longPressContextMenu.js +45 -32
  13. package/dist/components/file-browser/types.d.ts +23 -1
  14. package/dist/components/layout/Shell.d.ts +8 -0
  15. package/dist/components/layout/Shell.js +157 -138
  16. package/dist/components/layout/Sidebar.d.ts +2 -0
  17. package/dist/components/layout/Sidebar.js +39 -38
  18. package/dist/components/layout/sidebarVisibilityMotion.d.ts +22 -0
  19. package/dist/components/layout/sidebarVisibilityMotion.js +16 -0
  20. package/dist/components/ui/Dropdown.d.ts +0 -1
  21. package/dist/components/ui/Dropdown.js +150 -204
  22. package/dist/components/ui/menuUtils.d.ts +15 -0
  23. package/dist/components/ui/menuUtils.js +60 -0
  24. package/dist/components/ui/picker/PickerBase.js +90 -96
  25. package/dist/context/LayoutContext.d.ts +5 -0
  26. package/dist/context/LayoutContext.js +58 -46
  27. package/dist/file-browser.js +35 -31
  28. package/dist/full.js +411 -407
  29. package/package.json +1 -1
@@ -2,6 +2,12 @@ import type { JSX, Accessor, Component } from 'solid-js';
2
2
  export type FileItemIconOverride = Component<{
3
3
  class?: string;
4
4
  }> | JSX.Element;
5
+ export type FileItemLinkKind = 'symbolic';
6
+ export type FileItemLinkTargetType = 'file' | 'folder' | 'broken' | 'unknown';
7
+ export interface FileItemLinkMeta {
8
+ kind: FileItemLinkKind;
9
+ targetType: FileItemLinkTargetType;
10
+ }
5
11
  /**
6
12
  * Represents a file or folder item in the browser
7
13
  */
@@ -15,6 +21,8 @@ export interface FileItem {
15
21
  extension?: string;
16
22
  children?: FileItem[];
17
23
  icon?: FileItemIconOverride;
24
+ /** Optional link metadata for rendering symbolic links distinctly from plain entries. */
25
+ link?: FileItemLinkMeta;
18
26
  }
19
27
  /**
20
28
  * View mode for the file browser main content area
@@ -42,6 +50,12 @@ export interface FileListColumnRatios {
42
50
  * Built-in context menu action types
43
51
  */
44
52
  export type ContextMenuActionType = 'duplicate' | 'copy-name' | 'ask-agent' | 'copy-to' | 'move-to' | 'delete' | 'rename' | 'custom';
53
+ export type ContextMenuTargetKind = 'item' | 'directory-background';
54
+ export type ContextMenuSource = 'list' | 'grid' | 'tree' | 'background' | 'custom';
55
+ export interface ContextMenuDirectory {
56
+ path: string;
57
+ item?: FileItem;
58
+ }
45
59
  /**
46
60
  * Context menu item definition
47
61
  */
@@ -63,7 +77,9 @@ export interface ContextMenuItem {
63
77
  /** Keyboard shortcut hint (display only) */
64
78
  shortcut?: string;
65
79
  /** Custom handler for 'custom' type actions */
66
- onAction?: (items: FileItem[]) => void;
80
+ onAction?: (items: FileItem[], event?: ContextMenuEvent) => void;
81
+ /** Cascade submenu items */
82
+ children?: ContextMenuItem[];
67
83
  }
68
84
  /**
69
85
  * Context menu event with position and target items
@@ -75,6 +91,12 @@ export interface ContextMenuEvent {
75
91
  y: number;
76
92
  /** Target file/folder items */
77
93
  items: FileItem[];
94
+ /** Semantic menu target category */
95
+ targetKind: ContextMenuTargetKind;
96
+ /** Source surface that opened the menu */
97
+ source: ContextMenuSource;
98
+ /** Resolved directory scope for directory-scoped actions */
99
+ directory: ContextMenuDirectory | null;
78
100
  }
79
101
  /**
80
102
  * Callbacks for context menu actions
@@ -1,5 +1,6 @@
1
1
  import { type JSX } from 'solid-js';
2
2
  import { type ActivityBarItem } from './ActivityBar';
3
+ import type { SidebarVisibilityMotion } from '../../context/LayoutContext';
3
4
  export interface ShellSlotClassNames {
4
5
  root?: string;
5
6
  topBar?: string;
@@ -31,6 +32,13 @@ export interface ShellProps {
31
32
  topBarActions?: JSX.Element;
32
33
  bottomBarItems?: JSX.Element;
33
34
  sidebarContent?: (activeTab: string) => JSX.Element;
35
+ resolveSidebarVisibilityMotion?: (args: {
36
+ currentActiveId: string;
37
+ nextActiveId: string;
38
+ openSidebar: boolean;
39
+ source: 'activity-bar';
40
+ isMobile: boolean;
41
+ }) => SidebarVisibilityMotion | undefined;
34
42
  /**
35
43
  * Sidebar rendering mode.
36
44
  *
@@ -1,161 +1,177 @@
1
- import { createComponent as o, Dynamic as p, insert as d, memo as A, effect as N, className as h, setAttribute as L, setStyleProperty as ie, template as T, use as ne, delegateEvents as oe } from "solid-js/web";
2
- import { createSignal as Q, createEffect as x, createMemo as w, For as W, Show as C } from "solid-js";
1
+ import { createComponent as o, Dynamic as T, insert as c, memo as p, effect as N, className as h, setAttribute as L, setStyleProperty as ie, template as x, use as ne, delegateEvents as oe } from "solid-js/web";
2
+ import { createSignal as D, createEffect as I, createMemo as w, For as P, Show as S } from "solid-js";
3
3
  import { useLayout as ae } from "../../context/LayoutContext.js";
4
4
  import { useResolvedFloeConfig as le } from "../../context/FloeConfigContext.js";
5
5
  import { useMediaQuery as se } from "../../hooks/useMediaQuery.js";
6
6
  import { useOverlayMask as de } from "../../hooks/useOverlayMask.js";
7
- import { cn as S } from "../../utils/cn.js";
8
- import { deferNonBlocking as ce } from "../../utils/defer.js";
7
+ import { cn as C } from "../../utils/cn.js";
8
+ import { deferAfterPaint as ce, deferNonBlocking as be } from "../../utils/defer.js";
9
9
  import { useComponentRegistry as ue } from "../../context/ComponentRegistry.js";
10
- import { Sidebar as be } from "./Sidebar.js";
11
- import { TopBar as me } from "./TopBar.js";
12
- import { TopBarIconButton as fe } from "./TopBarIconButton.js";
13
- import { BottomBar as ve } from "./BottomBar.js";
14
- import { MobileTabBar as ge } from "./MobileTabBar.js";
15
- import { ActivityBar as he } from "./ActivityBar.js";
16
- import { ResizeHandle as K } from "./ResizeHandle.js";
17
- import { resolveMobileTabActiveId as Ce, resolveMobileTabSelect as Se } from "./mobileTabs.js";
18
- import { KeepAliveStack as ye } from "./KeepAliveStack.js";
19
- var V = /* @__PURE__ */ T('<div class="flex items-center gap-2">'), we = /* @__PURE__ */ T("<div data-floe-shell-slot=mobile-sidebar-backdrop>"), Ie = /* @__PURE__ */ T('<div data-floe-shell-slot=mobile-sidebar-drawer tabindex=-1 role=dialog aria-modal=true><div class="h-full overflow-auto overscroll-contain">'), Be = /* @__PURE__ */ T("<div data-floe-shell-slot=terminal-panel style=border-top-color:var(--terminal-panel-border)>"), ke = /* @__PURE__ */ T('<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>');
20
- function Qe(r) {
21
- const n = ae(), P = le(), c = se(P.config.layout.mobileQuery), [M, y] = Q(!1), [F, z] = Q(null);
10
+ import { Sidebar as me } from "./Sidebar.js";
11
+ import { TopBar as fe } from "./TopBar.js";
12
+ import { TopBarIconButton as ve } from "./TopBarIconButton.js";
13
+ import { BottomBar as ge } from "./BottomBar.js";
14
+ import { MobileTabBar as he } from "./MobileTabBar.js";
15
+ import { ActivityBar as Se } from "./ActivityBar.js";
16
+ import { ResizeHandle as Q } from "./ResizeHandle.js";
17
+ import { resolveMobileTabActiveId as Ce, resolveMobileTabSelect as ye } from "./mobileTabs.js";
18
+ import { KeepAliveStack as Ie } from "./KeepAliveStack.js";
19
+ import { resolveShellSidebarActiveTabChange as we } from "./sidebarVisibilityMotion.js";
20
+ var q = /* @__PURE__ */ x('<div class="flex items-center gap-2">'), Me = /* @__PURE__ */ x("<div data-floe-shell-slot=mobile-sidebar-backdrop>"), Be = /* @__PURE__ */ x('<div data-floe-shell-slot=mobile-sidebar-drawer tabindex=-1 role=dialog aria-modal=true><div class="h-full overflow-auto overscroll-contain">'), ke = /* @__PURE__ */ x("<div data-floe-shell-slot=terminal-panel style=border-top-color:var(--terminal-panel-border)>"), xe = /* @__PURE__ */ x('<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>');
21
+ function Ke(r) {
22
+ const i = ae(), W = le(), s = se(W.config.layout.mobileQuery), [A, y] = D(!1), [F, z] = D(null);
22
23
  let $;
23
- const u = () => r.sidebarMode === "hidden", s = (() => {
24
+ const b = () => r.sidebarMode === "hidden", d = (() => {
24
25
  try {
25
26
  return ue();
26
27
  } catch {
27
28
  return null;
28
29
  }
29
- })(), O = (e, l) => {
30
- const a = s?.getComponent(e)?.sidebar?.fullScreen ?? !1, i = u() ? !1 : l?.openSidebar ?? !a;
31
- n.setSidebarActiveTab(e, {
32
- openSidebar: i
30
+ })(), O = (e, a) => {
31
+ const l = d?.getComponent(e)?.sidebar?.fullScreen ?? !1, {
32
+ openSidebar: n,
33
+ visibilityMotion: u
34
+ } = we({
35
+ currentActiveId: i.sidebarActiveTab(),
36
+ nextActiveId: e,
37
+ requestedOpenSidebar: a?.openSidebar,
38
+ sidebarHidden: b(),
39
+ nextActiveFullScreen: l,
40
+ isMobile: s(),
41
+ resolveSidebarVisibilityMotion: r.resolveSidebarVisibilityMotion
42
+ });
43
+ i.setSidebarActiveTab(e, {
44
+ openSidebar: n,
45
+ visibilityMotion: u
33
46
  });
34
47
  };
35
- x(() => {
36
- u() && y(!1);
37
- }), x(() => {
38
- const e = c();
39
- n.isMobile() !== e && n.setIsMobile(e);
40
- }), x(() => {
41
- c() || y(!1);
48
+ I(() => {
49
+ b() && y(!1);
50
+ }), I(() => {
51
+ const e = s();
52
+ i.isMobile() !== e && i.setIsMobile(e);
53
+ }), I(() => {
54
+ s() || y(!1);
55
+ }), I(() => {
56
+ const e = i.sidebarVisibilityMotion(), a = i.sidebarVisibilityMotionRevision();
57
+ e === "instant" && ce(() => i.clearSidebarVisibilityMotion(a));
42
58
  });
43
- const I = w(() => r.activityItems ? r.activityItems : s ? s.sidebarItems().filter((e) => !!e.icon).filter((e) => !(c() && e.sidebar?.hiddenOnMobile)).map((e) => ({
59
+ const M = w(() => r.activityItems ? r.activityItems : d ? d.sidebarItems().filter((e) => !!e.icon).filter((e) => !(s() && e.sidebar?.hiddenOnMobile)).map((e) => ({
44
60
  id: e.id,
45
61
  icon: e.icon,
46
62
  label: e.name,
47
63
  badge: e.sidebar?.badge,
48
64
  collapseBehavior: e.sidebar?.collapseBehavior ?? (e.sidebar?.fullScreen ? "preserve" : "toggle")
49
- })) : []), j = w(() => u() ? [] : r.sidebarContent ? [] : s ? s.sidebarItems().filter((e) => !(c() && e.sidebar?.hiddenOnMobile)).filter((e) => e.sidebar?.fullScreen !== !0 && e.sidebar?.renderIn !== "main").map((e) => ({
65
+ })) : []), K = w(() => b() ? [] : r.sidebarContent ? [] : d ? d.sidebarItems().filter((e) => !(s() && e.sidebar?.hiddenOnMobile)).filter((e) => e.sidebar?.fullScreen !== !0 && e.sidebar?.renderIn !== "main").map((e) => ({
50
66
  id: e.id,
51
- render: () => o(p, {
67
+ render: () => o(T, {
52
68
  get component() {
53
69
  return e.component;
54
70
  }
55
71
  })
56
72
  })) : []), H = (e) => {
57
- if (!u()) {
73
+ if (!b()) {
58
74
  if (r.sidebarContent) return r.sidebarContent(e);
59
- if (s)
60
- return o(ye, {
75
+ if (d)
76
+ return o(Ie, {
61
77
  get views() {
62
- return j();
78
+ return K();
63
79
  },
64
80
  activeId: e
65
81
  });
66
82
  }
67
- }, R = w(() => u() ? !0 : s ? s.getComponent(n.sidebarActiveTab())?.sidebar?.fullScreen ?? !1 : !1), q = w(() => {
68
- if (u()) return !0;
69
- if (!s) return !1;
70
- const e = s.getComponent(n.sidebarActiveTab());
83
+ }, R = w(() => b() ? !0 : d ? d.getComponent(i.sidebarActiveTab())?.sidebar?.fullScreen ?? !1 : !1), j = w(() => {
84
+ if (b()) return !0;
85
+ if (!d) return !1;
86
+ const e = d.getComponent(i.sidebarActiveTab());
71
87
  return e?.sidebar ? e.sidebar.fullScreen === !0 || e.sidebar.renderIn === "main" : !1;
72
88
  });
73
- x(() => {
74
- c() && R() && y(!1);
89
+ I(() => {
90
+ s() && R() && y(!1);
75
91
  });
76
92
  const G = w(() => {
77
93
  if (r.bottomBarItems) return r.bottomBarItems;
78
- if (!s) return;
79
- const e = [...s.statusBarItems()].sort((i, v) => (i.order ?? 100) - (v.order ?? 100)), l = e.filter((i) => i.position === "left"), a = e.filter((i) => i.position === "right");
94
+ if (!d) return;
95
+ const e = [...d.statusBarItems()].sort((n, u) => (n.order ?? 100) - (u.order ?? 100)), a = e.filter((n) => n.position === "left"), l = e.filter((n) => n.position === "right");
80
96
  return [(() => {
81
- var i = V();
82
- return d(i, o(W, {
83
- each: l,
84
- children: (v) => o(p, {
97
+ var n = q();
98
+ return c(n, o(P, {
99
+ each: a,
100
+ children: (u) => o(T, {
85
101
  get component() {
86
- return v.component;
102
+ return u.component;
87
103
  }
88
104
  })
89
- })), i;
105
+ })), n;
90
106
  })(), (() => {
91
- var i = V();
92
- return d(i, o(W, {
93
- each: a,
94
- children: (v) => o(p, {
107
+ var n = q();
108
+ return c(n, o(P, {
109
+ each: l,
110
+ children: (u) => o(T, {
95
111
  get component() {
96
- return v.component;
112
+ return u.component;
97
113
  }
98
114
  })
99
- })), i;
115
+ })), n;
100
116
  })()];
101
117
  });
102
- x(() => {
103
- const e = I();
118
+ I(() => {
119
+ const e = M();
104
120
  if (!e.length) return;
105
- if (!n.sidebarActiveTab()) {
106
- const a = e.find((i) => !i.onClick);
107
- if (!a) return;
108
- O(a.id);
121
+ if (!i.sidebarActiveTab()) {
122
+ const l = e.find((n) => !n.onClick);
123
+ if (!l) return;
124
+ O(l.id);
109
125
  }
110
126
  });
111
- const E = (e) => {
112
- const l = u() ? !0 : s?.getComponent(e)?.sidebar?.fullScreen ?? !1, {
113
- nextActiveId: a,
114
- nextMobileSidebarOpen: i
115
- } = Se({
127
+ const V = (e) => {
128
+ const a = b() ? !0 : d?.getComponent(e)?.sidebar?.fullScreen ?? !1, {
129
+ nextActiveId: l,
130
+ nextMobileSidebarOpen: n
131
+ } = ye({
116
132
  clickedId: e,
117
- activeId: n.sidebarActiveTab(),
118
- mobileSidebarOpen: M(),
119
- clickedIsFullScreen: l
133
+ activeId: i.sidebarActiveTab(),
134
+ mobileSidebarOpen: A(),
135
+ clickedIsFullScreen: a
120
136
  });
121
- n.sidebarActiveTab() !== a && O(a), y(i);
137
+ i.sidebarActiveTab() !== l && O(l), y(n);
122
138
  }, J = (e) => {
123
139
  if (e.onClick) {
124
- ce(() => e.onClick());
140
+ be(() => e.onClick());
125
141
  return;
126
142
  }
127
- E(e.id);
143
+ V(e.id);
128
144
  }, U = w(() => {
129
145
  const e = r.topBarActions;
130
- if (!c() || (r.activityBottomItemsMobileMode ?? "hidden") !== "topBar") return e;
131
- const a = r.activityBottomItems ?? [];
132
- return a.length ? [o(W, {
133
- each: a,
134
- children: (i) => o(fe, {
146
+ if (!s() || (r.activityBottomItemsMobileMode ?? "hidden") !== "topBar") return e;
147
+ const l = r.activityBottomItems ?? [];
148
+ return l.length ? [o(P, {
149
+ each: l,
150
+ children: (n) => o(ve, {
135
151
  get label() {
136
- return i.label;
152
+ return n.label;
137
153
  },
138
- onClick: () => J(i),
154
+ onClick: () => J(n),
139
155
  get children() {
140
- return o(p, {
156
+ return o(T, {
141
157
  get component() {
142
- return i.icon;
158
+ return n.icon;
143
159
  },
144
160
  class: "w-4 h-4"
145
161
  });
146
162
  }
147
163
  })
148
164
  }), e] : e;
149
- }), X = () => u() ? !0 : n.sidebarCollapsed(), Y = () => F() ?? n.sidebarWidth(), f = () => P.config.accessibility, Z = () => {
150
- z(n.sidebarWidth());
165
+ }), X = () => b() ? !0 : i.sidebarCollapsed(), Y = () => F() ?? i.sidebarWidth(), v = () => W.config.accessibility, Z = () => {
166
+ z(i.sidebarWidth());
151
167
  }, ee = (e) => {
152
- z((l) => n.clampSidebarWidth((l ?? n.sidebarWidth()) + e));
168
+ z((a) => i.clampSidebarWidth((a ?? i.sidebarWidth()) + e));
153
169
  }, te = () => {
154
170
  const e = F();
155
- e !== null && (n.setSidebarWidth(e), z(null));
171
+ e !== null && (i.setSidebarWidth(e), z(null));
156
172
  };
157
173
  de({
158
- open: () => c() && M() && !u(),
174
+ open: () => s() && A() && !b(),
159
175
  root: () => $,
160
176
  onClose: () => y(!1),
161
177
  lockBodyScroll: !0,
@@ -169,7 +185,7 @@ function Qe(r) {
169
185
  });
170
186
  const re = () => {
171
187
  if (typeof document > "u") return;
172
- const e = document.getElementById(f().mainContentId);
188
+ const e = document.getElementById(v().mainContentId);
173
189
  if (!(!e || !(e instanceof HTMLElement)))
174
190
  try {
175
191
  e.focus();
@@ -177,8 +193,8 @@ function Qe(r) {
177
193
  }
178
194
  };
179
195
  return (() => {
180
- var e = ke(), l = e.firstChild, a = l.nextSibling, i = a.firstChild, v = i.firstChild;
181
- return l.$$click = () => re(), d(l, () => f().skipLinkLabel), d(e, o(me, {
196
+ var e = xe(), a = e.firstChild, l = a.nextSibling, n = l.firstChild, u = n.firstChild;
197
+ return a.$$click = () => re(), c(a, () => v().skipLinkLabel), c(e, o(fe, {
182
198
  get logo() {
183
199
  return r.logo;
184
200
  },
@@ -186,63 +202,66 @@ function Qe(r) {
186
202
  return U();
187
203
  },
188
204
  get ariaLabel() {
189
- return f().topBarLabel;
205
+ return v().topBarLabel;
190
206
  },
191
207
  get class() {
192
208
  return r.slotClassNames?.topBar;
193
209
  }
194
- }), a), d(a, o(C, {
210
+ }), l), c(l, o(S, {
195
211
  get when() {
196
- return !c();
212
+ return !s();
197
213
  },
198
214
  get children() {
199
- return [o(C, {
215
+ return [o(S, {
200
216
  get when() {
201
- return I().length > 0;
217
+ return M().length > 0;
202
218
  },
203
219
  get children() {
204
- return o(he, {
220
+ return o(Se, {
205
221
  get items() {
206
- return I();
222
+ return M();
207
223
  },
208
224
  get bottomItems() {
209
225
  return r.activityBottomItems;
210
226
  },
211
227
  get activeId() {
212
- return n.sidebarActiveTab();
228
+ return i.sidebarActiveTab();
213
229
  },
214
230
  onActiveChange: O,
215
231
  get collapsed() {
216
232
  return X();
217
233
  },
218
234
  get onCollapsedChange() {
219
- return A(() => !!u())() ? void 0 : n.setSidebarCollapsed;
235
+ return p(() => !!b())() ? void 0 : i.setSidebarCollapsed;
220
236
  },
221
237
  get ariaLabel() {
222
- return f().primaryNavigationLabel;
238
+ return v().primaryNavigationLabel;
223
239
  },
224
240
  get class() {
225
241
  return r.slotClassNames?.activityBar;
226
242
  }
227
243
  });
228
244
  }
229
- }), o(C, {
245
+ }), o(S, {
230
246
  get when() {
231
- return !u();
247
+ return !b();
232
248
  },
233
249
  get children() {
234
- return o(be, {
250
+ return o(me, {
235
251
  get width() {
236
252
  return Y();
237
253
  },
238
254
  get collapsed() {
239
- return n.sidebarCollapsed() || R();
255
+ return i.sidebarCollapsed() || R();
256
+ },
257
+ get visibilityMotion() {
258
+ return i.sidebarVisibilityMotion();
240
259
  },
241
260
  get ariaLabel() {
242
- return f().sidebarLabel;
261
+ return v().sidebarLabel;
243
262
  },
244
263
  get resizer() {
245
- return o(K, {
264
+ return o(Q, {
246
265
  direction: "horizontal",
247
266
  onResize: ee,
248
267
  onResizeStart: Z,
@@ -253,54 +272,54 @@ function Qe(r) {
253
272
  return r.slotClassNames?.sidebar;
254
273
  },
255
274
  get children() {
256
- return H(n.sidebarActiveTab());
275
+ return H(i.sidebarActiveTab());
257
276
  }
258
277
  });
259
278
  }
260
279
  })];
261
280
  }
262
- }), i), d(a, o(C, {
281
+ }), n), c(l, o(S, {
263
282
  get when() {
264
- return A(() => !!(c() && M()))() && !u();
283
+ return p(() => !!(s() && A()))() && !b();
265
284
  },
266
285
  get children() {
267
286
  return [(() => {
268
- var t = we();
269
- return t.$$click = () => y(!1), N(() => h(t, S("absolute inset-0 z-40 bg-black/30 cursor-pointer", r.slotClassNames?.mobileSidebarBackdrop))), t;
287
+ var t = Me();
288
+ return t.$$click = () => y(!1), N(() => h(t, C("absolute inset-0 z-40 bg-black/30 cursor-pointer", r.slotClassNames?.mobileSidebarBackdrop))), t;
270
289
  })(), (() => {
271
- var t = Ie(), b = t.firstChild, g = $;
272
- return typeof g == "function" ? ne(g, t) : $ = t, d(b, () => H(n.sidebarActiveTab())), N((m) => {
273
- var B = S("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 = f().sidebarLabel;
274
- return B !== m.e && h(t, m.e = B), k !== m.t && L(t, "aria-label", m.t = k), m;
290
+ var t = Be(), m = t.firstChild, g = $;
291
+ return typeof g == "function" ? ne(g, t) : $ = t, c(m, () => H(i.sidebarActiveTab())), N((f) => {
292
+ 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;
293
+ return B !== f.e && h(t, f.e = B), k !== f.t && L(t, "aria-label", f.t = k), f;
275
294
  }, {
276
295
  e: void 0,
277
296
  t: void 0
278
297
  }), t;
279
298
  })()];
280
299
  }
281
- }), i), d(v, () => r.children), d(i, o(C, {
300
+ }), n), c(u, () => r.children), c(n, o(S, {
282
301
  get when() {
283
- return A(() => !!(!c() && n.terminalOpened()))() && r.terminalPanel;
302
+ return p(() => !!(!s() && i.terminalOpened()))() && r.terminalPanel;
284
303
  },
285
304
  get children() {
286
- var t = Be();
287
- return d(t, o(K, {
305
+ var t = ke();
306
+ return c(t, o(Q, {
288
307
  direction: "vertical",
289
- onResize: (b) => n.setTerminalHeight(n.terminalHeight() - b)
290
- }), null), d(t, () => r.terminalPanel, null), N((b) => {
291
- var g = S("relative shrink-0 border-t border-border bg-terminal-background overflow-hidden", r.slotClassNames?.terminalPanel), m = `${n.terminalHeight()}px`;
292
- return g !== b.e && h(t, b.e = g), m !== b.t && ie(t, "height", b.t = m), b;
308
+ onResize: (m) => i.setTerminalHeight(i.terminalHeight() - m)
309
+ }), null), c(t, () => r.terminalPanel, null), N((m) => {
310
+ var g = C("relative shrink-0 border-t border-border bg-terminal-background overflow-hidden", r.slotClassNames?.terminalPanel), f = `${i.terminalHeight()}px`;
311
+ return g !== m.e && h(t, m.e = g), f !== m.t && ie(t, "height", m.t = f), m;
293
312
  }, {
294
313
  e: void 0,
295
314
  t: void 0
296
315
  }), t;
297
316
  }
298
- }), null), d(e, o(C, {
317
+ }), null), c(e, o(S, {
299
318
  get when() {
300
- return !c();
319
+ return !s();
301
320
  },
302
321
  get children() {
303
- return o(ve, {
322
+ return o(ge, {
304
323
  get class() {
305
324
  return r.slotClassNames?.bottomBar;
306
325
  },
@@ -309,26 +328,26 @@ function Qe(r) {
309
328
  }
310
329
  });
311
330
  }
312
- }), null), d(e, o(C, {
331
+ }), null), c(e, o(S, {
313
332
  get when() {
314
- return A(() => !!c())() && I().length > 0;
333
+ return p(() => !!s())() && M().length > 0;
315
334
  },
316
335
  get children() {
317
- return o(ge, {
336
+ return o(he, {
318
337
  get items() {
319
- return I();
338
+ return M();
320
339
  },
321
340
  get activeId() {
322
341
  return Ce({
323
- activeId: n.sidebarActiveTab(),
324
- mobileSidebarOpen: M(),
342
+ activeId: i.sidebarActiveTab(),
343
+ mobileSidebarOpen: A(),
325
344
  activeIsFullScreen: R(),
326
- activeIsPage: q()
345
+ activeIsPage: j()
327
346
  });
328
347
  },
329
- onSelect: E,
348
+ onSelect: V,
330
349
  get ariaLabel() {
331
- return f().mobileNavigationLabel;
350
+ return v().mobileNavigationLabel;
332
351
  },
333
352
  get class() {
334
353
  return r.slotClassNames?.mobileTabBar;
@@ -336,7 +355,7 @@ function Qe(r) {
336
355
  });
337
356
  }
338
357
  }), null), N((t) => {
339
- var b = S(
358
+ var m = C(
340
359
  // Use dvh when supported to avoid mobile browser UI causing layout jumps.
341
360
  "h-screen h-[100dvh] w-full flex flex-col overflow-hidden",
342
361
  "bg-background text-foreground",
@@ -344,8 +363,8 @@ function Qe(r) {
344
363
  "overscroll-none",
345
364
  r.slotClassNames?.root,
346
365
  r.class
347
- ), g = `#${f().mainContentId}`, m = S("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"), B = S("flex-1 min-w-0 flex flex-col overflow-hidden", r.slotClassNames?.contentArea), k = S("flex-1 min-h-0 overflow-auto overscroll-contain", r.slotClassNames?.main), _ = f().mainContentId, D = f().mainLabel;
348
- return b !== t.e && h(e, t.e = b), g !== t.t && L(l, "href", t.t = g), m !== t.a && h(l, t.a = m), B !== t.o && h(i, t.o = B), k !== t.i && h(v, t.i = k), _ !== t.n && L(v, "id", t.n = _), D !== t.s && L(v, "aria-label", t.s = D), t;
366
+ ), g = `#${v().mainContentId}`, f = 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"), B = C("flex-1 min-w-0 flex flex-col overflow-hidden", r.slotClassNames?.contentArea), k = C("flex-1 min-h-0 overflow-auto overscroll-contain", r.slotClassNames?.main), E = v().mainContentId, _ = v().mainLabel;
367
+ return m !== t.e && h(e, t.e = m), g !== t.t && L(a, "href", t.t = g), f !== t.a && h(a, t.a = f), B !== t.o && h(n, t.o = B), k !== t.i && h(u, t.i = k), E !== t.n && L(u, "id", t.n = E), _ !== t.s && L(u, "aria-label", t.s = _), t;
349
368
  }, {
350
369
  e: void 0,
351
370
  t: void 0,
@@ -359,5 +378,5 @@ function Qe(r) {
359
378
  }
360
379
  oe(["click"]);
361
380
  export {
362
- Qe as Shell
381
+ Ke as Shell
363
382
  };
@@ -1,9 +1,11 @@
1
1
  import { type JSX } from 'solid-js';
2
+ import type { SidebarVisibilityMotion } from '../../context/LayoutContext';
2
3
  export interface SidebarProps {
3
4
  children: JSX.Element;
4
5
  resizer?: JSX.Element;
5
6
  width?: number;
6
7
  collapsed?: boolean;
8
+ visibilityMotion?: SidebarVisibilityMotion;
7
9
  ariaLabel?: string;
8
10
  class?: string;
9
11
  }