@floegence/floe-webapp-core 0.35.13 → 0.35.14

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,172 +1,194 @@
1
- import { createComponent as n, Dynamic as y, insert as c, memo as T, effect as A, className as f, setStyleProperty as E, template as B, delegateEvents as Q } from "solid-js/web";
2
- import { createSignal as K, createEffect as w, createMemo as v, For as p, Show as u } from "solid-js";
3
- import { useLayout as L } from "../../context/LayoutContext.js";
4
- import { useResolvedFloeConfig as V } from "../../context/FloeConfigContext.js";
5
- import { useMediaQuery as j } from "../../hooks/useMediaQuery.js";
6
- import { cn as g } from "../../utils/cn.js";
7
- import { deferNonBlocking as q } from "../../utils/defer.js";
8
- import { useComponentRegistry as G } from "../../context/ComponentRegistry.js";
9
- import { Sidebar as J } from "./Sidebar.js";
10
- import { TopBar as U } from "./TopBar.js";
11
- import { TopBarIconButton as X } from "./TopBarIconButton.js";
12
- import { BottomBar as Y } from "./BottomBar.js";
13
- import { MobileTabBar as Z } from "./MobileTabBar.js";
14
- import { ActivityBar as ee } from "./ActivityBar.js";
15
- import { ResizeHandle as _ } from "./ResizeHandle.js";
16
- import { resolveMobileTabActiveId as te, resolveMobileTabSelect as re } from "./mobileTabs.js";
17
- import { KeepAliveStack as ie } from "./KeepAliveStack.js";
18
- var O = /* @__PURE__ */ B('<div class="flex items-center gap-2">'), ne = /* @__PURE__ */ B("<div data-floe-shell-slot=mobile-sidebar-backdrop>"), le = /* @__PURE__ */ B('<div data-floe-shell-slot=mobile-sidebar-drawer><div class="h-full overflow-auto overscroll-contain">'), oe = /* @__PURE__ */ B("<div data-floe-shell-slot=terminal-panel style=border-top-color:var(--terminal-panel-border)>"), ae = /* @__PURE__ */ B('<div data-floe-shell><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>');
19
- function Ae(r) {
20
- const l = L(), z = V(), m = j(z.config.layout.mobileQuery), [k, h] = K(!1), b = () => r.sidebarMode === "hidden", a = (() => {
1
+ import { createComponent as o, Dynamic as k, insert as m, memo as p, effect as T, className as h, setStyleProperty as J, template as I, use as U, delegateEvents as X } from "solid-js/web";
2
+ import { createSignal as R, createEffect as B, createMemo as g, For as N, Show as f } from "solid-js";
3
+ import { useLayout as Y } from "../../context/LayoutContext.js";
4
+ import { useResolvedFloeConfig as Z } from "../../context/FloeConfigContext.js";
5
+ import { useMediaQuery as ee } from "../../hooks/useMediaQuery.js";
6
+ import { useOverlayMask as te } from "../../hooks/useOverlayMask.js";
7
+ import { cn as S } from "../../utils/cn.js";
8
+ import { deferNonBlocking as re } from "../../utils/defer.js";
9
+ import { useComponentRegistry as ie } from "../../context/ComponentRegistry.js";
10
+ import { Sidebar as ne } from "./Sidebar.js";
11
+ import { TopBar as oe } from "./TopBar.js";
12
+ import { TopBarIconButton as le } from "./TopBarIconButton.js";
13
+ import { BottomBar as ae } from "./BottomBar.js";
14
+ import { MobileTabBar as se } from "./MobileTabBar.js";
15
+ import { ActivityBar as de } from "./ActivityBar.js";
16
+ import { ResizeHandle as W } from "./ResizeHandle.js";
17
+ import { resolveMobileTabActiveId as ce, resolveMobileTabSelect as ue } from "./mobileTabs.js";
18
+ import { KeepAliveStack as me } from "./KeepAliveStack.js";
19
+ var P = /* @__PURE__ */ I('<div class="flex items-center gap-2">'), be = /* @__PURE__ */ I("<div data-floe-shell-slot=mobile-sidebar-backdrop>"), fe = /* @__PURE__ */ I('<div data-floe-shell-slot=mobile-sidebar-drawer tabindex=-1><div class="h-full overflow-auto overscroll-contain">'), ve = /* @__PURE__ */ I("<div data-floe-shell-slot=terminal-panel style=border-top-color:var(--terminal-panel-border)>"), he = /* @__PURE__ */ I('<div data-floe-shell><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>');
20
+ function Re(r) {
21
+ const i = Y(), F = Z(), d = ee(F.config.layout.mobileQuery), [y, v] = R(!1), [z, A] = R(null);
22
+ let M;
23
+ const c = () => r.sidebarMode === "hidden", s = (() => {
21
24
  try {
22
- return G();
25
+ return ie();
23
26
  } catch {
24
27
  return null;
25
28
  }
26
- })(), M = (e, s) => {
27
- const o = a?.getComponent(e)?.sidebar?.fullScreen ?? !1, i = b() ? !1 : s?.openSidebar ?? !o;
28
- l.setSidebarActiveTab(e, {
29
- openSidebar: i
29
+ })(), x = (e, a) => {
30
+ const l = s?.getComponent(e)?.sidebar?.fullScreen ?? !1, n = c() ? !1 : a?.openSidebar ?? !l;
31
+ i.setSidebarActiveTab(e, {
32
+ openSidebar: n
30
33
  });
31
34
  };
32
- w(() => {
33
- b() && h(!1);
34
- }), w(() => {
35
- const e = m();
36
- l.isMobile() !== e && l.setIsMobile(e);
37
- }), w(() => {
38
- m() || h(!1);
35
+ B(() => {
36
+ c() && v(!1);
37
+ }), B(() => {
38
+ const e = d();
39
+ i.isMobile() !== e && i.setIsMobile(e);
40
+ }), B(() => {
41
+ d() || v(!1);
39
42
  });
40
- const C = v(() => r.activityItems ? r.activityItems : a ? a.sidebarItems().filter((e) => !!e.icon).filter((e) => !(m() && e.sidebar?.hiddenOnMobile)).map((e) => ({
43
+ const C = g(() => r.activityItems ? r.activityItems : s ? s.sidebarItems().filter((e) => !!e.icon).filter((e) => !(d() && e.sidebar?.hiddenOnMobile)).map((e) => ({
41
44
  id: e.id,
42
45
  icon: e.icon,
43
46
  label: e.name,
44
47
  badge: e.sidebar?.badge,
45
48
  collapseBehavior: e.sidebar?.collapseBehavior ?? (e.sidebar?.fullScreen ? "preserve" : "toggle")
46
- })) : []), P = v(() => b() ? [] : r.sidebarContent ? [] : a ? a.sidebarItems().filter((e) => !(m() && e.sidebar?.hiddenOnMobile)).filter((e) => e.sidebar?.fullScreen !== !0 && e.sidebar?.renderIn !== "main").map((e) => ({
49
+ })) : []), H = g(() => c() ? [] : r.sidebarContent ? [] : s ? s.sidebarItems().filter((e) => !(d() && e.sidebar?.hiddenOnMobile)).filter((e) => e.sidebar?.fullScreen !== !0 && e.sidebar?.renderIn !== "main").map((e) => ({
47
50
  id: e.id,
48
- render: () => n(y, {
51
+ render: () => o(k, {
49
52
  get component() {
50
53
  return e.component;
51
54
  }
52
55
  })
53
- })) : []), N = (e) => {
54
- if (!b()) {
56
+ })) : []), _ = (e) => {
57
+ if (!c()) {
55
58
  if (r.sidebarContent) return r.sidebarContent(e);
56
- if (a)
57
- return n(ie, {
59
+ if (s)
60
+ return o(me, {
58
61
  get views() {
59
- return P();
62
+ return H();
60
63
  },
61
64
  activeId: e
62
65
  });
63
66
  }
64
- }, x = v(() => b() ? !0 : a ? a.getComponent(l.sidebarActiveTab())?.sidebar?.fullScreen ?? !1 : !1), F = v(() => {
65
- if (b()) return !0;
66
- if (!a) return !1;
67
- const e = a.getComponent(l.sidebarActiveTab());
67
+ }, $ = g(() => c() ? !0 : s ? s.getComponent(i.sidebarActiveTab())?.sidebar?.fullScreen ?? !1 : !1), E = g(() => {
68
+ if (c()) return !0;
69
+ if (!s) return !1;
70
+ const e = s.getComponent(i.sidebarActiveTab());
68
71
  return e?.sidebar ? e.sidebar.fullScreen === !0 || e.sidebar.renderIn === "main" : !1;
69
72
  });
70
- w(() => {
71
- m() && x() && h(!1);
73
+ B(() => {
74
+ d() && $() && v(!1);
72
75
  });
73
- const H = v(() => {
76
+ const D = g(() => {
74
77
  if (r.bottomBarItems) return r.bottomBarItems;
75
- if (!a) return;
76
- const e = [...a.statusBarItems()].sort((i, t) => (i.order ?? 100) - (t.order ?? 100)), s = e.filter((i) => i.position === "left"), o = e.filter((i) => i.position === "right");
78
+ if (!s) return;
79
+ const e = [...s.statusBarItems()].sort((n, t) => (n.order ?? 100) - (t.order ?? 100)), a = e.filter((n) => n.position === "left"), l = e.filter((n) => n.position === "right");
77
80
  return [(() => {
78
- var i = O();
79
- return c(i, n(p, {
80
- each: s,
81
- children: (t) => n(y, {
81
+ var n = P();
82
+ return m(n, o(N, {
83
+ each: a,
84
+ children: (t) => o(k, {
82
85
  get component() {
83
86
  return t.component;
84
87
  }
85
88
  })
86
- })), i;
89
+ })), n;
87
90
  })(), (() => {
88
- var i = O();
89
- return c(i, n(p, {
90
- each: o,
91
- children: (t) => n(y, {
91
+ var n = P();
92
+ return m(n, o(N, {
93
+ each: l,
94
+ children: (t) => o(k, {
92
95
  get component() {
93
96
  return t.component;
94
97
  }
95
98
  })
96
- })), i;
99
+ })), n;
97
100
  })()];
98
101
  });
99
- w(() => {
102
+ B(() => {
100
103
  const e = C();
101
104
  if (!e.length) return;
102
- if (!l.sidebarActiveTab()) {
103
- const o = e.find((i) => !i.onClick);
104
- if (!o) return;
105
- M(o.id);
105
+ if (!i.sidebarActiveTab()) {
106
+ const l = e.find((n) => !n.onClick);
107
+ if (!l) return;
108
+ x(l.id);
106
109
  }
107
110
  });
108
- const $ = (e) => {
109
- const s = b() ? !0 : a?.getComponent(e)?.sidebar?.fullScreen ?? !1, {
110
- nextActiveId: o,
111
- nextMobileSidebarOpen: i
112
- } = re({
111
+ const O = (e) => {
112
+ const a = c() ? !0 : s?.getComponent(e)?.sidebar?.fullScreen ?? !1, {
113
+ nextActiveId: l,
114
+ nextMobileSidebarOpen: n
115
+ } = ue({
113
116
  clickedId: e,
114
- activeId: l.sidebarActiveTab(),
115
- mobileSidebarOpen: k(),
116
- clickedIsFullScreen: s
117
+ activeId: i.sidebarActiveTab(),
118
+ mobileSidebarOpen: y(),
119
+ clickedIsFullScreen: a
117
120
  });
118
- l.sidebarActiveTab() !== o && M(o), h(i);
119
- }, R = (e) => {
121
+ i.sidebarActiveTab() !== l && x(l), v(n);
122
+ }, Q = (e) => {
120
123
  if (e.onClick) {
121
- q(() => e.onClick());
124
+ re(() => e.onClick());
122
125
  return;
123
126
  }
124
- $(e.id);
125
- }, W = v(() => {
127
+ O(e.id);
128
+ }, K = g(() => {
126
129
  const e = r.topBarActions;
127
- if (!m() || (r.activityBottomItemsMobileMode ?? "hidden") !== "topBar") return e;
128
- const o = r.activityBottomItems ?? [];
129
- return o.length ? [n(p, {
130
- each: o,
131
- children: (i) => n(X, {
130
+ if (!d() || (r.activityBottomItemsMobileMode ?? "hidden") !== "topBar") return e;
131
+ const l = r.activityBottomItems ?? [];
132
+ return l.length ? [o(N, {
133
+ each: l,
134
+ children: (n) => o(le, {
132
135
  get label() {
133
- return i.label;
136
+ return n.label;
134
137
  },
135
- onClick: () => R(i),
138
+ onClick: () => Q(n),
136
139
  get children() {
137
- return n(y, {
140
+ return o(k, {
138
141
  get component() {
139
- return i.icon;
142
+ return n.icon;
140
143
  },
141
144
  class: "w-4 h-4"
142
145
  });
143
146
  }
144
147
  })
145
148
  }), e] : e;
146
- }), D = () => b() ? !0 : l.sidebarCollapsed();
147
- return (() => {
148
- var e = ae(), s = e.firstChild, o = s.firstChild, i = o.firstChild;
149
- return c(e, n(U, {
149
+ }), L = () => c() ? !0 : i.sidebarCollapsed(), V = () => z() ?? i.sidebarWidth(), j = () => {
150
+ A(i.sidebarWidth());
151
+ }, q = (e) => {
152
+ A((a) => i.clampSidebarWidth((a ?? i.sidebarWidth()) + e));
153
+ }, G = () => {
154
+ const e = z();
155
+ e !== null && (i.setSidebarWidth(e), A(null));
156
+ };
157
+ return te({
158
+ open: () => d() && y() && !c(),
159
+ root: () => M,
160
+ onClose: () => v(!1),
161
+ lockBodyScroll: !0,
162
+ trapFocus: !0,
163
+ closeOnEscape: !0,
164
+ blockHotkeys: !0,
165
+ blockWheel: "outside",
166
+ blockTouchMove: "outside",
167
+ autoFocus: !1,
168
+ restoreFocus: !0
169
+ }), (() => {
170
+ var e = he(), a = e.firstChild, l = a.firstChild, n = l.firstChild;
171
+ return m(e, o(oe, {
150
172
  get logo() {
151
173
  return r.logo;
152
174
  },
153
175
  get actions() {
154
- return W();
176
+ return K();
155
177
  },
156
178
  get class() {
157
179
  return r.slotClassNames?.topBar;
158
180
  }
159
- }), s), c(s, n(u, {
181
+ }), a), m(a, o(f, {
160
182
  get when() {
161
- return !m();
183
+ return !d();
162
184
  },
163
185
  get children() {
164
- return [n(u, {
186
+ return [o(f, {
165
187
  get when() {
166
188
  return C().length > 0;
167
189
  },
168
190
  get children() {
169
- return n(ee, {
191
+ return o(de, {
170
192
  get items() {
171
193
  return C();
172
194
  },
@@ -174,117 +196,119 @@ function Ae(r) {
174
196
  return r.activityBottomItems;
175
197
  },
176
198
  get activeId() {
177
- return l.sidebarActiveTab();
199
+ return i.sidebarActiveTab();
178
200
  },
179
- onActiveChange: M,
201
+ onActiveChange: x,
180
202
  get collapsed() {
181
- return D();
203
+ return L();
182
204
  },
183
205
  get onCollapsedChange() {
184
- return T(() => !!b())() ? void 0 : l.setSidebarCollapsed;
206
+ return p(() => !!c())() ? void 0 : i.setSidebarCollapsed;
185
207
  },
186
208
  get class() {
187
209
  return r.slotClassNames?.activityBar;
188
210
  }
189
211
  });
190
212
  }
191
- }), n(u, {
213
+ }), o(f, {
192
214
  get when() {
193
- return !b();
215
+ return !c();
194
216
  },
195
217
  get children() {
196
- return n(J, {
218
+ return o(ne, {
197
219
  get width() {
198
- return l.sidebarWidth();
220
+ return V();
199
221
  },
200
222
  get collapsed() {
201
- return l.sidebarCollapsed() || x();
223
+ return i.sidebarCollapsed() || $();
202
224
  },
203
225
  get resizer() {
204
- return n(_, {
226
+ return o(W, {
205
227
  direction: "horizontal",
206
- onResize: (t) => l.setSidebarWidth(l.sidebarWidth() + t)
228
+ onResize: q,
229
+ onResizeStart: j,
230
+ onResizeEnd: G
207
231
  });
208
232
  },
209
233
  get class() {
210
234
  return r.slotClassNames?.sidebar;
211
235
  },
212
236
  get children() {
213
- return N(l.sidebarActiveTab());
237
+ return _(i.sidebarActiveTab());
214
238
  }
215
239
  });
216
240
  }
217
241
  })];
218
242
  }
219
- }), o), c(s, n(u, {
243
+ }), l), m(a, o(f, {
220
244
  get when() {
221
- return T(() => !!(m() && k()))() && !b();
245
+ return p(() => !!(d() && y()))() && !c();
222
246
  },
223
247
  get children() {
224
248
  return [(() => {
225
- var t = ne();
226
- return t.$$click = () => h(!1), A(() => f(t, g("absolute inset-0 z-40 bg-black/30 cursor-pointer", r.slotClassNames?.mobileSidebarBackdrop))), t;
249
+ var t = be();
250
+ return t.$$click = () => v(!1), T(() => h(t, S("absolute inset-0 z-40 bg-black/30 cursor-pointer", r.slotClassNames?.mobileSidebarBackdrop))), t;
227
251
  })(), (() => {
228
- var t = le(), d = t.firstChild;
229
- return c(d, () => N(l.sidebarActiveTab())), A(() => f(t, g("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))), t;
252
+ var t = fe(), u = t.firstChild, b = M;
253
+ return typeof b == "function" ? U(b, t) : M = t, m(u, () => _(i.sidebarActiveTab())), T(() => h(t, 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))), t;
230
254
  })()];
231
255
  }
232
- }), o), c(i, () => r.children), c(o, n(u, {
256
+ }), l), m(n, () => r.children), m(l, o(f, {
233
257
  get when() {
234
- return T(() => !!(!m() && l.terminalOpened()))() && r.terminalPanel;
258
+ return p(() => !!(!d() && i.terminalOpened()))() && r.terminalPanel;
235
259
  },
236
260
  get children() {
237
- var t = oe();
238
- return c(t, n(_, {
261
+ var t = ve();
262
+ return m(t, o(W, {
239
263
  direction: "vertical",
240
- onResize: (d) => l.setTerminalHeight(l.terminalHeight() - d)
241
- }), null), c(t, () => r.terminalPanel, null), A((d) => {
242
- var S = g("relative shrink-0 border-t border-border bg-terminal-background overflow-hidden", r.slotClassNames?.terminalPanel), I = `${l.terminalHeight()}px`;
243
- return S !== d.e && f(t, d.e = S), I !== d.t && E(t, "height", d.t = I), d;
264
+ onResize: (u) => i.setTerminalHeight(i.terminalHeight() - u)
265
+ }), null), m(t, () => r.terminalPanel, null), T((u) => {
266
+ var b = S("relative shrink-0 border-t border-border bg-terminal-background overflow-hidden", r.slotClassNames?.terminalPanel), w = `${i.terminalHeight()}px`;
267
+ return b !== u.e && h(t, u.e = b), w !== u.t && J(t, "height", u.t = w), u;
244
268
  }, {
245
269
  e: void 0,
246
270
  t: void 0
247
271
  }), t;
248
272
  }
249
- }), null), c(e, n(u, {
273
+ }), null), m(e, o(f, {
250
274
  get when() {
251
- return !m();
275
+ return !d();
252
276
  },
253
277
  get children() {
254
- return n(Y, {
278
+ return o(ae, {
255
279
  get class() {
256
280
  return r.slotClassNames?.bottomBar;
257
281
  },
258
282
  get children() {
259
- return H();
283
+ return D();
260
284
  }
261
285
  });
262
286
  }
263
- }), null), c(e, n(u, {
287
+ }), null), m(e, o(f, {
264
288
  get when() {
265
- return T(() => !!m())() && C().length > 0;
289
+ return p(() => !!d())() && C().length > 0;
266
290
  },
267
291
  get children() {
268
- return n(Z, {
292
+ return o(se, {
269
293
  get items() {
270
294
  return C();
271
295
  },
272
296
  get activeId() {
273
- return te({
274
- activeId: l.sidebarActiveTab(),
275
- mobileSidebarOpen: k(),
276
- activeIsFullScreen: x(),
277
- activeIsPage: F()
297
+ return ce({
298
+ activeId: i.sidebarActiveTab(),
299
+ mobileSidebarOpen: y(),
300
+ activeIsFullScreen: $(),
301
+ activeIsPage: E()
278
302
  });
279
303
  },
280
- onSelect: $,
304
+ onSelect: O,
281
305
  get class() {
282
306
  return r.slotClassNames?.mobileTabBar;
283
307
  }
284
308
  });
285
309
  }
286
- }), null), A((t) => {
287
- var d = g(
310
+ }), null), T((t) => {
311
+ var u = S(
288
312
  // Use dvh when supported to avoid mobile browser UI causing layout jumps.
289
313
  "h-screen h-[100dvh] w-full flex flex-col overflow-hidden",
290
314
  "bg-background text-foreground",
@@ -292,8 +316,8 @@ function Ae(r) {
292
316
  "overscroll-none",
293
317
  r.slotClassNames?.root,
294
318
  r.class
295
- ), S = g("flex-1 min-w-0 flex flex-col overflow-hidden", r.slotClassNames?.contentArea), I = g("flex-1 min-h-0 overflow-auto overscroll-contain", r.slotClassNames?.main);
296
- return d !== t.e && f(e, t.e = d), S !== t.t && f(o, t.t = S), I !== t.a && f(i, t.a = I), t;
319
+ ), b = S("flex-1 min-w-0 flex flex-col overflow-hidden", r.slotClassNames?.contentArea), w = S("flex-1 min-h-0 overflow-auto overscroll-contain", r.slotClassNames?.main);
320
+ return u !== t.e && h(e, t.e = u), b !== t.t && h(l, t.t = b), w !== t.a && h(n, t.a = w), t;
297
321
  }, {
298
322
  e: void 0,
299
323
  t: void 0,
@@ -301,7 +325,7 @@ function Ae(r) {
301
325
  }), e;
302
326
  })();
303
327
  }
304
- Q(["click"]);
328
+ X(["click"]);
305
329
  export {
306
- Ae as Shell
330
+ Re as Shell
307
331
  };
@@ -1,14 +1,14 @@
1
- import { insert as l, effect as c, className as o, setStyleProperty as u, memo as h, template as d, delegateEvents as $ } from "solid-js/web";
1
+ import { insert as l, effect as c, className as o, setStyleProperty as u, memo as x, template as d, delegateEvents as g } from "solid-js/web";
2
2
  import "solid-js";
3
3
  import { cn as s } from "../../utils/cn.js";
4
- var g = /* @__PURE__ */ d('<aside data-floe-shell-slot=sidebar><div class="flex-1 overflow-auto overscroll-contain">'), m = /* @__PURE__ */ d("<div>"), _ = /* @__PURE__ */ d("<section><div class=flex-1>"), w = /* @__PURE__ */ d('<div class="flex items-center justify-between px-2.5 py-2 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60"><span>'), y = /* @__PURE__ */ d('<button type=button><span class="flex-1 truncate text-left">'), S = /* @__PURE__ */ d('<span class="flex-shrink-0 w-4 h-4 opacity-60">');
4
+ var $ = /* @__PURE__ */ d('<aside data-floe-shell-slot=sidebar data-floe-geometry-surface=shell-sidebar><div class="flex-1 overflow-auto overscroll-contain">'), m = /* @__PURE__ */ d("<div>"), _ = /* @__PURE__ */ d("<section><div class=flex-1>"), w = /* @__PURE__ */ d('<div class="flex items-center justify-between px-2.5 py-2 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60"><span>'), y = /* @__PURE__ */ d('<button type=button><span class="flex-1 truncate text-left">'), S = /* @__PURE__ */ d('<span class="flex-shrink-0 w-4 h-4 opacity-60">');
5
5
  function j(e) {
6
6
  const t = () => e.collapsed ?? !1, a = () => e.width ?? 350;
7
7
  return (() => {
8
- var i = g(), n = i.firstChild;
8
+ var i = $(), n = i.firstChild;
9
9
  return l(n, () => e.children), l(i, () => e.resizer, null), c((r) => {
10
- var v = s("relative h-full flex flex-col shrink-0 min-h-0", "bg-sidebar text-sidebar-foreground", "border-r border-sidebar-border", "overflow-hidden", "transition-[width] duration-150 ease-out", e.class), f = t() ? "0px" : `${a()}px`, b = t() ? "hidden" : "visible", x = t() ? "0px" : void 0;
11
- return v !== r.e && o(i, r.e = v), f !== r.t && u(i, "width", r.t = f), b !== r.a && u(i, "visibility", r.a = b), x !== r.o && u(i, "border-right-width", r.o = x), r;
10
+ var f = s("relative h-full flex flex-col shrink-0 min-h-0", "bg-sidebar text-sidebar-foreground", "border-r border-sidebar-border", "overflow-hidden", "transition-[width] duration-150 ease-out", e.class), v = t() ? "0px" : `${a()}px`, b = t() ? "hidden" : "visible", h = t() ? "0px" : void 0;
11
+ return f !== r.e && o(i, r.e = f), v !== r.t && u(i, "width", r.t = v), b !== r.a && u(i, "visibility", r.a = b), h !== r.o && u(i, "border-right-width", r.o = h), r;
12
12
  }, {
13
13
  e: void 0,
14
14
  t: void 0,
@@ -33,7 +33,7 @@ function L(e) {
33
33
  return (() => {
34
34
  var t = _(), a = t.firstChild;
35
35
  return l(t, (() => {
36
- var i = h(() => !!e.title);
36
+ var i = x(() => !!e.title);
37
37
  return () => i() && (() => {
38
38
  var n = w(), r = n.firstChild;
39
39
  return l(r, () => e.title), l(n, () => e.actions, null), n;
@@ -45,7 +45,7 @@ function N(e) {
45
45
  return (() => {
46
46
  var t = y(), a = t.firstChild;
47
47
  return t.$$click = () => e.onClick?.(), l(t, (() => {
48
- var i = h(() => !!e.icon);
48
+ var i = x(() => !!e.icon);
49
49
  return () => i() && (() => {
50
50
  var n = S();
51
51
  return l(n, () => e.icon), n;
@@ -59,7 +59,7 @@ function N(e) {
59
59
  }), t;
60
60
  })();
61
61
  }
62
- $(["click"]);
62
+ g(["click"]);
63
63
  export {
64
64
  j as Sidebar,
65
65
  z as SidebarContent,
@@ -7,6 +7,8 @@ export interface SidebarPaneProps {
7
7
  open?: boolean;
8
8
  resizable?: boolean;
9
9
  onResize?: (delta: number) => void;
10
+ onResizeStart?: () => void;
11
+ onResizeEnd?: () => void;
10
12
  onClose?: () => void;
11
13
  mobileOverlay?: boolean;
12
14
  mobileBackdrop?: boolean;
@@ -1,25 +1,25 @@
1
- import { insert as i, createComponent as o, use as M, effect as k, className as a, setStyleProperty as C, template as s, delegateEvents as S } from "solid-js/web";
1
+ import { insert as i, createComponent as o, use as B, effect as k, className as s, setStyleProperty as C, template as a, delegateEvents as M } from "solid-js/web";
2
2
  import { Show as l } from "solid-js";
3
3
  import { useLayout as j } from "../../context/LayoutContext.js";
4
4
  import { cn as d } from "../../utils/cn.js";
5
5
  import { ResizeHandle as A } from "./ResizeHandle.js";
6
- var O = /* @__PURE__ */ s('<div class="min-w-0 flex items-center gap-1.5">'), P = /* @__PURE__ */ s('<button type=button class="flex items-center justify-center w-5 h-5 rounded cursor-pointer hover:bg-sidebar-accent/80 transition-colors"aria-label="Close sidebar"><svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class="w-3.5 h-3.5"><path d="M18 6 6 18"></path><path d="m6 6 12 12">'), E = /* @__PURE__ */ s('<div class="flex min-w-0 items-center gap-1.5">'), H = /* @__PURE__ */ s('<aside><div><div class="flex items-center justify-between px-3 py-2 border-b border-sidebar-border"><span class="text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60"></span></div><div>'), L = /* @__PURE__ */ s("<div>");
6
+ var E = /* @__PURE__ */ a('<div class="min-w-0 flex items-center gap-1.5">'), O = /* @__PURE__ */ a('<button type=button class="flex items-center justify-center w-5 h-5 rounded cursor-pointer hover:bg-sidebar-accent/80 transition-colors"aria-label="Close sidebar"><svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class="w-3.5 h-3.5"><path d="M18 6 6 18"></path><path d="m6 6 12 12">'), P = /* @__PURE__ */ a('<div class="flex min-w-0 items-center gap-1.5">'), H = /* @__PURE__ */ a('<aside data-floe-geometry-surface=sidebar-pane><div><div class="flex items-center justify-between px-3 py-2 border-b border-sidebar-border"><span class="text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60"></span></div><div>'), L = /* @__PURE__ */ a("<div>");
7
7
  function I(e) {
8
- const z = j(), v = () => z.isMobile(), m = () => e.width ?? 240, c = () => e.open ?? !0, u = () => v() && e.mobileOverlay !== !1 && c(), w = () => u() && typeof e.onClose == "function", _ = () => u() && e.mobileBackdrop !== !1 && typeof e.onClose == "function", R = () => e.resizable && c() && !v() && typeof e.onResize == "function";
8
+ const z = j(), m = () => z.isMobile(), v = () => e.width ?? 240, c = () => e.open ?? !0, u = () => m() && e.mobileOverlay !== !1 && c(), w = () => u() && typeof e.onClose == "function", R = () => u() && e.mobileBackdrop !== !1 && typeof e.onClose == "function", _ = () => e.resizable && c() && !m() && typeof e.onResize == "function";
9
9
  return [(() => {
10
- var n = H(), h = n.firstChild, f = h.firstChild, B = f.firstChild, b = f.nextSibling;
11
- return i(B, () => e.title), i(f, o(l, {
10
+ var n = H(), h = n.firstChild, f = h.firstChild, S = f.firstChild, b = f.nextSibling;
11
+ return i(S, () => e.title), i(f, o(l, {
12
12
  get when() {
13
13
  return e.headerActions || w();
14
14
  },
15
15
  get children() {
16
- var t = E();
16
+ var t = P();
17
17
  return i(t, o(l, {
18
18
  get when() {
19
19
  return e.headerActions;
20
20
  },
21
21
  get children() {
22
- var r = O();
22
+ var r = E();
23
23
  return i(r, () => e.headerActions), r;
24
24
  }
25
25
  }), null), i(t, o(l, {
@@ -27,24 +27,30 @@ function I(e) {
27
27
  return w();
28
28
  },
29
29
  get children() {
30
- var r = P();
30
+ var r = O();
31
31
  return r.$$click = () => e.onClose?.(), r;
32
32
  }
33
33
  }), null), t;
34
34
  }
35
- }), null), M((t) => e.bodyRef?.(t), b), i(b, () => e.children), i(n, o(l, {
35
+ }), null), B((t) => e.bodyRef?.(t), b), i(b, () => e.children), i(n, o(l, {
36
36
  get when() {
37
- return R();
37
+ return _();
38
38
  },
39
39
  get children() {
40
40
  return o(A, {
41
41
  direction: "horizontal",
42
- onResize: (t) => e.onResize?.(t)
42
+ onResize: (t) => e.onResize?.(t),
43
+ get onResizeStart() {
44
+ return e.onResizeStart;
45
+ },
46
+ get onResizeEnd() {
47
+ return e.onResizeEnd;
48
+ }
43
49
  });
44
50
  }
45
51
  }), null), k((t) => {
46
- var r = d("flex-shrink-0 border-r border-border bg-sidebar relative", "transition-all duration-200 ease-out", "overflow-hidden", u() && "absolute inset-y-0 left-0 z-10 shadow-lg", e.class), g = c() ? `${m()}px` : "0px", x = d("h-full flex flex-col", e.innerClass), y = `${m()}px`, $ = d("flex-1 min-h-0 overflow-auto", e.bodyClass);
47
- return r !== t.e && a(n, t.e = r), g !== t.t && C(n, "width", t.t = g), x !== t.a && a(h, t.a = x), y !== t.o && C(h, "width", t.o = y), $ !== t.i && a(b, t.i = $), t;
52
+ var r = d("flex-shrink-0 border-r border-border bg-sidebar relative", "transition-[width,transform,box-shadow] duration-200 ease-out", "overflow-hidden", u() && "absolute inset-y-0 left-0 z-10 shadow-lg", e.class), g = c() ? `${v()}px` : "0px", x = d("h-full flex flex-col", e.innerClass), y = `${v()}px`, $ = d("flex-1 min-h-0 overflow-auto", e.bodyClass);
53
+ return r !== t.e && s(n, t.e = r), g !== t.t && C(n, "width", t.t = g), x !== t.a && s(h, t.a = x), y !== t.o && C(h, "width", t.o = y), $ !== t.i && s(b, t.i = $), t;
48
54
  }, {
49
55
  e: void 0,
50
56
  t: void 0,
@@ -54,15 +60,15 @@ function I(e) {
54
60
  }), n;
55
61
  })(), o(l, {
56
62
  get when() {
57
- return _();
63
+ return R();
58
64
  },
59
65
  get children() {
60
66
  var n = L();
61
- return n.$$click = () => e.onClose?.(), k(() => a(n, d("absolute inset-0 bg-background/60 backdrop-blur-sm z-[9]", e.backdropClass))), n;
67
+ return n.$$click = () => e.onClose?.(), k(() => s(n, d("absolute inset-0 bg-background/60 backdrop-blur-sm z-[9]", e.backdropClass))), n;
62
68
  }
63
69
  })];
64
70
  }
65
- S(["click"]);
71
+ M(["click"]);
66
72
  export {
67
73
  I as SidebarPane
68
74
  };