@floegence/floe-webapp-core 0.33.5 → 0.33.7

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,20 +1,20 @@
1
- import { createComponent as i, insert as l, addEventListener as P, use as A, memo as C, effect as N, className as L, setStyleProperty as W, template as u, delegateEvents as T } from "solid-js/web";
2
- import { onMount as G, onCleanup as Q, createEffect as q, Show as a } from "solid-js";
1
+ import { createComponent as n, insert as i, use as P, memo as _, effect as k, className as z, template as w, delegateEvents as W } from "solid-js/web";
2
+ import { onMount as A, onCleanup as K, createEffect as L, Show as u } from "solid-js";
3
3
  import { cn as B } from "../../utils/cn.js";
4
- import { useLayout as J } from "../../context/LayoutContext.js";
5
- import { useFileBrowserDrag as U } from "../../context/FileBrowserDragContext.js";
6
- import { deferAfterPaint as X } from "../../utils/defer.js";
7
- import { FileBrowserProvider as Y, useFileBrowser as Z } from "./FileBrowserContext.js";
8
- import { ResizeHandle as p } from "../layout/ResizeHandle.js";
9
- import { DirectoryTree as ee } from "./DirectoryTree.js";
10
- import { FileListView as te } from "./FileListView.js";
11
- import { FileGridView as re } from "./FileGridView.js";
12
- import { FileBrowserToolbar as ne } from "./FileBrowserToolbar.js";
13
- import { FileContextMenu as ie } from "./FileContextMenu.js";
14
- import { DragPreview as le } from "./DragPreview.js";
15
- var ae = /* @__PURE__ */ u('<div class="border-b border-border">'), oe = /* @__PURE__ */ u('<div class="min-w-0 flex items-center gap-1.5">'), se = /* @__PURE__ */ u('<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">'), de = /* @__PURE__ */ u('<div class="flex min-w-0 items-center gap-1.5">'), ue = /* @__PURE__ */ u('<div class="absolute inset-0 bg-background/60 backdrop-blur-sm z-[9]">'), ce = /* @__PURE__ */ u('<div><div class="flex flex-1 min-h-0 relative"><aside><div class="h-full flex flex-col"><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">Explorer</span></div><div class="flex-1 min-h-0 overflow-auto py-1"></div></div></aside><div class="flex-1 min-w-0 flex flex-col"><div class="flex-1 min-h-0"></div><div class="flex items-center justify-between px-3 py-1 border-t border-border text-[10px] text-muted-foreground"><span> items</span><span class="truncate max-w-[200px]">');
16
- function ke(e) {
17
- return i(Y, {
4
+ import { useLayout as O } from "../../context/LayoutContext.js";
5
+ import { useFileBrowserDrag as E } from "../../context/FileBrowserDragContext.js";
6
+ import { deferAfterPaint as V } from "../../utils/defer.js";
7
+ import { FileBrowserProvider as H, useFileBrowser as N } from "./FileBrowserContext.js";
8
+ import { SidebarPane as T } from "../layout/SidebarPane.js";
9
+ import { DirectoryTree as j } from "./DirectoryTree.js";
10
+ import { FileListView as G } from "./FileListView.js";
11
+ import { FileGridView as Q } from "./FileGridView.js";
12
+ import { FileBrowserToolbar as q } from "./FileBrowserToolbar.js";
13
+ import { FileContextMenu as J } from "./FileContextMenu.js";
14
+ import { DragPreview as U } from "./DragPreview.js";
15
+ var X = /* @__PURE__ */ w('<div class="border-b border-border">'), Y = /* @__PURE__ */ w('<div><div class="flex flex-1 min-h-0 relative"><div class="flex-1 min-w-0 flex flex-col"><div class="flex-1 min-h-0"></div><div class="flex items-center justify-between px-3 py-1 border-t border-border text-[10px] text-muted-foreground"><span> items</span><span class="truncate max-w-[200px]">');
16
+ function me(e) {
17
+ return n(H, {
18
18
  get files() {
19
19
  return e.files;
20
20
  },
@@ -55,7 +55,7 @@ function ke(e) {
55
55
  return e.onOpen;
56
56
  },
57
57
  get children() {
58
- return i(ge, {
58
+ return n(Z, {
59
59
  get class() {
60
60
  return e.class;
61
61
  },
@@ -96,145 +96,124 @@ function ke(e) {
96
96
  }
97
97
  });
98
98
  }
99
- function ge(e) {
100
- const r = Z(), K = J(), c = U(), s = () => K.isMobile(), M = () => r.sidebarWidth(), H = () => e.sidebarResizable ?? !0, d = () => (e.enableDragDrop ?? !0) && !!c, g = () => e.instanceId ?? `filebrowser-${Math.random().toString(36).slice(2, 9)}`;
101
- let I, S = null, y = null;
102
- G(() => {
103
- if (!c || !d()) return;
104
- const n = {
105
- instanceId: g(),
106
- currentPath: r.currentPath,
107
- files: r.files,
99
+ function Z(e) {
100
+ const t = N(), I = O(), o = E(), f = () => I.isMobile(), M = () => t.sidebarWidth(), S = () => e.sidebarResizable ?? !0, a = () => (e.enableDragDrop ?? !0) && !!o, s = () => e.instanceId ?? `filebrowser-${Math.random().toString(36).slice(2, 9)}`;
101
+ let h, C = null, x = null;
102
+ A(() => {
103
+ if (!o || !a()) return;
104
+ const r = {
105
+ instanceId: s(),
106
+ currentPath: t.currentPath,
107
+ files: t.files,
108
108
  onDragMove: e.onDragMove,
109
- getScrollContainer: () => S,
110
- getSidebarScrollContainer: () => y,
111
- optimisticRemove: r.optimisticRemove,
112
- optimisticInsert: r.optimisticInsert
109
+ getScrollContainer: () => C,
110
+ getSidebarScrollContainer: () => x,
111
+ optimisticRemove: t.optimisticRemove,
112
+ optimisticInsert: t.optimisticInsert
113
113
  };
114
- c.registerInstance(n);
115
- }), Q(() => {
116
- c && d() && c.unregisterInstance(g());
114
+ o.registerInstance(r);
115
+ }), K(() => {
116
+ o && a() && o.unregisterInstance(s());
117
117
  });
118
- let $ = !1, f = !1;
119
- q(() => {
120
- const n = s();
121
- if (!$) {
122
- $ = !0, f = n, n && e.hideSidebarOnMobile !== !1 && !r.sidebarCollapsed() && r.toggleSidebar();
118
+ let v = !1, g = !1;
119
+ L(() => {
120
+ const r = f();
121
+ if (!v) {
122
+ v = !0, g = r, r && e.hideSidebarOnMobile !== !1 && !t.sidebarCollapsed() && t.toggleSidebar();
123
123
  return;
124
124
  }
125
- !f && n && e.hideSidebarOnMobile !== !1 && !r.sidebarCollapsed() && r.toggleSidebar(), f = n;
125
+ !g && r && e.hideSidebarOnMobile !== !1 && !t.sidebarCollapsed() && t.toggleSidebar(), g = r;
126
126
  });
127
- const O = (n) => {
128
- (n.metaKey || n.ctrlKey) && n.key.toLowerCase() === "f" && (n.preventDefault(), r.setFilterActive(!0), X(() => I?.focus()));
129
- }, D = () => !r.sidebarCollapsed() || !s();
127
+ const D = (r) => {
128
+ (r.metaKey || r.ctrlKey) && r.key.toLowerCase() === "f" && (r.preventDefault(), t.setFilterActive(!0), V(() => h?.focus()));
129
+ }, y = () => !t.sidebarCollapsed() || !f();
130
130
  return (() => {
131
- var n = ce(), v = n.firstChild, b = v.firstChild, k = b.firstChild, x = k.firstChild;
132
- x.firstChild;
133
- var _ = x.nextSibling, w = b.nextSibling, h = w.firstChild, E = h.nextSibling, m = E.firstChild, j = m.firstChild, V = m.nextSibling;
134
- return n.$$keydown = O, l(n, i(a, {
131
+ var r = Y(), m = r.firstChild, b = m.firstChild, c = b.firstChild, R = c.nextSibling, d = R.firstChild, $ = d.firstChild, F = d.nextSibling;
132
+ return r.$$keydown = D, i(r, n(u, {
135
133
  get when() {
136
134
  return e.header;
137
135
  },
138
136
  get children() {
139
- var t = ae();
140
- return l(t, () => e.header), t;
137
+ var l = X();
138
+ return i(l, () => e.header), l;
141
139
  }
142
- }), v), l(x, i(a, {
143
- get when() {
144
- return e.sidebarHeaderActions || s();
140
+ }), m), i(m, n(T, {
141
+ title: "Explorer",
142
+ get width() {
143
+ return M();
145
144
  },
146
- get children() {
147
- var t = de();
148
- return l(t, i(a, {
149
- get when() {
150
- return e.sidebarHeaderActions;
151
- },
152
- get children() {
153
- var o = oe();
154
- return l(o, () => e.sidebarHeaderActions), o;
155
- }
156
- }), null), l(t, i(a, {
157
- get when() {
158
- return s();
159
- },
160
- get children() {
161
- var o = se();
162
- return P(o, "click", r.toggleSidebar, !0), o;
163
- }
164
- }), null), t;
165
- }
166
- }), null), A((t) => {
167
- y = t;
168
- }, _), l(_, i(ee, {
169
- get instanceId() {
170
- return g();
145
+ get open() {
146
+ return y();
171
147
  },
172
- get enableDragDrop() {
173
- return d();
174
- }
175
- })), l(b, i(a, {
176
- get when() {
177
- return C(() => !!(H() && D()))() && !s();
148
+ get headerActions() {
149
+ return e.sidebarHeaderActions;
150
+ },
151
+ get resizable() {
152
+ return S();
153
+ },
154
+ onResize: (l) => {
155
+ t.setSidebarWidth(t.sidebarWidth() + l);
178
156
  },
157
+ get onClose() {
158
+ return t.toggleSidebar;
159
+ },
160
+ bodyRef: (l) => {
161
+ x = l;
162
+ },
163
+ bodyClass: "py-1",
179
164
  get children() {
180
- return i(p, {
181
- direction: "horizontal",
182
- onResize: (t) => {
183
- r.setSidebarWidth(r.sidebarWidth() + t);
165
+ return n(j, {
166
+ get instanceId() {
167
+ return s();
168
+ },
169
+ get enableDragDrop() {
170
+ return a();
184
171
  }
185
172
  });
186
173
  }
187
- }), null), l(v, i(a, {
174
+ }), b), i(b, n(q, {
175
+ filterInputRef: (l) => h = l
176
+ }), c), P((l) => {
177
+ C = l;
178
+ }, c), i(c, n(u, {
188
179
  get when() {
189
- return C(() => !!s())() && !r.sidebarCollapsed();
190
- },
191
- get children() {
192
- var t = ue();
193
- return P(t, "click", r.toggleSidebar, !0), t;
194
- }
195
- }), w), l(w, i(ne, {
196
- filterInputRef: (t) => I = t
197
- }), h), A((t) => {
198
- S = t;
199
- }, h), l(h, i(a, {
200
- get when() {
201
- return r.viewMode() === "list";
180
+ return t.viewMode() === "list";
202
181
  },
203
182
  get fallback() {
204
- return i(re, {
183
+ return n(Q, {
205
184
  get instanceId() {
206
- return g();
185
+ return s();
207
186
  },
208
187
  get enableDragDrop() {
209
- return d();
188
+ return a();
210
189
  }
211
190
  });
212
191
  },
213
192
  get children() {
214
- return i(te, {
193
+ return n(G, {
215
194
  get instanceId() {
216
- return g();
195
+ return s();
217
196
  },
218
197
  get enableDragDrop() {
219
- return d();
198
+ return a();
220
199
  }
221
200
  });
222
201
  }
223
- })), l(m, () => r.currentFiles().length, j), l(m, i(a, {
202
+ })), i(d, () => t.currentFiles().length, $), i(d, n(u, {
224
203
  get when() {
225
- return r.filterQueryApplied().trim();
204
+ return t.filterQueryApplied().trim();
226
205
  },
227
206
  get children() {
228
207
  return [" ", "(filtered)"];
229
208
  }
230
- }), null), l(m, i(a, {
209
+ }), null), i(d, n(u, {
231
210
  get when() {
232
- return r.selectedItems().size > 0;
211
+ return t.selectedItems().size > 0;
233
212
  },
234
213
  get children() {
235
- return [" · ", C(() => r.selectedItems().size), " selected"];
214
+ return [" · ", _(() => t.selectedItems().size), " selected"];
236
215
  }
237
- }), null), l(V, () => r.currentPath()), l(n, i(ie, {
216
+ }), null), i(F, () => t.currentPath()), i(r, n(J, {
238
217
  get callbacks() {
239
218
  return e.contextMenuCallbacks;
240
219
  },
@@ -247,31 +226,17 @@ function ge(e) {
247
226
  get hideItems() {
248
227
  return e.hideContextMenuItems;
249
228
  }
250
- }), null), l(n, i(a, {
229
+ }), null), i(r, n(u, {
251
230
  get when() {
252
- return d();
231
+ return a();
253
232
  },
254
233
  get children() {
255
- return i(le, {});
234
+ return n(U, {});
256
235
  }
257
- }), null), N((t) => {
258
- var o = B("flex flex-col h-full min-h-0 bg-background", "border border-border rounded-lg overflow-hidden", "shadow-sm", e.class), R = B(
259
- "flex-shrink-0 border-r border-border bg-sidebar relative",
260
- "transition-all duration-200 ease-out",
261
- "overflow-hidden",
262
- // Mobile overlay
263
- s() && !r.sidebarCollapsed() && "absolute inset-y-0 left-0 z-10 shadow-lg"
264
- ), z = D() ? `${M()}px` : "0px", F = `${M()}px`;
265
- return o !== t.e && L(n, t.e = o), R !== t.t && L(b, t.t = R), z !== t.a && W(b, "width", t.a = z), F !== t.o && W(k, "width", t.o = F), t;
266
- }, {
267
- e: void 0,
268
- t: void 0,
269
- a: void 0,
270
- o: void 0
271
- }), n;
236
+ }), null), k(() => z(r, B("flex flex-col h-full min-h-0 bg-background", "border border-border rounded-lg overflow-hidden", "shadow-sm", e.class))), r;
272
237
  })();
273
238
  }
274
- T(["keydown", "click"]);
239
+ W(["keydown"]);
275
240
  export {
276
- ke as FileBrowser
241
+ me as FileBrowser
277
242
  };
@@ -6,6 +6,7 @@ export declare const FolderIcon: (props: FileIconProps) => JSX.Element;
6
6
  export declare const FolderOpenIcon: (props: FileIconProps) => JSX.Element;
7
7
  export declare const FileIcon: (props: FileIconProps) => JSX.Element;
8
8
  export declare const CodeFileIcon: (props: FileIconProps) => JSX.Element;
9
+ export declare const ShellScriptFileIcon: (props: FileIconProps) => JSX.Element;
9
10
  export declare const ImageFileIcon: (props: FileIconProps) => JSX.Element;
10
11
  export declare const DocumentFileIcon: (props: FileIconProps) => JSX.Element;
11
12
  export declare const ConfigFileIcon: (props: FileIconProps) => JSX.Element;
@@ -1,53 +1,57 @@
1
- import { effect as t, setAttribute as e, template as n } from "solid-js/web";
2
- import { createUniqueId as c } from "solid-js";
3
- var v = /* @__PURE__ */ n('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><defs><linearGradient x1=0% y1=0% x2=0% y2=100%><stop offset=0% style=stop-color:var(--warning);stop-opacity:1></stop><stop offset=100% style="stop-color:color-mix(in srgb, var(--warning) 80%, var(--foreground));stop-opacity:1"></stop></linearGradient></defs><path d="M3 5a2 2 0 0 1 2-2h4.586a1 1 0 0 1 .707.293L12 5h7a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5z">'), h = /* @__PURE__ */ n('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><defs><linearGradient x1=0% y1=0% x2=0% y2=100%><stop offset=0% style=stop-color:var(--warning);stop-opacity:1></stop><stop offset=100% style="stop-color:color-mix(in srgb, var(--warning) 70%, var(--foreground));stop-opacity:1"></stop></linearGradient></defs><path d="M5 3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V7.414A2 2 0 0 0 20.414 6L18 3.586A2 2 0 0 0 16.586 3H5zm4 2h7.586L19 7.414V17H5V5h4z"></path><path fill=var(--background) opacity=0.3 d="M3 8l4-3h14l-4 3H3z">'), u = /* @__PURE__ */ n('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8">'), f = /* @__PURE__ */ n('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><path fill=var(--info) opacity=0.2 d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"></path><path fill=none stroke=var(--info) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline fill=none stroke=var(--info) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round points="14 2 14 8 20 8"></polyline><path fill=none stroke=var(--info) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="m10 13-2 2 2 2m4-4 2 2-2 2">'), k = /* @__PURE__ */ n('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><path fill=var(--success) opacity=0.2 d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"></path><path fill=none stroke=var(--success) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline fill=none stroke=var(--success) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round points="14 2 14 8 20 8"></polyline><circle cx=10 cy=13 r=2 fill=var(--success)></circle><path fill=none stroke=var(--success) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="m20 17-3-3-4 4-2-2-5 3">'), w = /* @__PURE__ */ n('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><path fill=var(--error) opacity=0.2 d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"></path><path fill=none stroke=var(--error) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline fill=none stroke=var(--error) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round points="14 2 14 8 20 8"></polyline><line x1=8 y1=13 x2=16 y2=13 stroke=var(--error) stroke-width=1.5 stroke-linecap=round></line><line x1=8 y1=17 x2=14 y2=17 stroke=var(--error) stroke-width=1.5 stroke-linecap=round>'), g = /* @__PURE__ */ n('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><path fill=var(--warning) opacity=0.2 d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"></path><path fill=none stroke=var(--warning) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline fill=none stroke=var(--warning) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round points="14 2 14 8 20 8"></polyline><path fill=none stroke=var(--warning) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M10 12v4h2m-2-4h2l2 4">'), y = /* @__PURE__ */ n('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><path fill=var(--primary) opacity=0.2 d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"></path><path fill=none stroke=var(--primary) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline fill=none stroke=var(--primary) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round points="14 2 14 8 20 8"></polyline><path fill=none stroke=var(--primary) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M9 14h6m-3-3v6">');
4
- const z = (r) => {
5
- const l = `floe-folder-gradient-${c()}`;
1
+ import { effect as t, setAttribute as r, template as n } from "solid-js/web";
2
+ import { createUniqueId as d } from "solid-js";
3
+ var h = /* @__PURE__ */ n('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><defs><linearGradient x1=0% y1=0% x2=0% y2=100%><stop offset=0% style=stop-color:var(--warning);stop-opacity:1></stop><stop offset=100% style="stop-color:color-mix(in srgb, var(--warning) 80%, var(--foreground));stop-opacity:1"></stop></linearGradient></defs><path d="M3 5a2 2 0 0 1 2-2h4.586a1 1 0 0 1 .707.293L12 5h7a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5z">'), v = /* @__PURE__ */ n('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><defs><linearGradient x1=0% y1=0% x2=0% y2=100%><stop offset=0% style=stop-color:var(--warning);stop-opacity:1></stop><stop offset=100% style="stop-color:color-mix(in srgb, var(--warning) 70%, var(--foreground));stop-opacity:1"></stop></linearGradient></defs><path d="M5 3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V7.414A2 2 0 0 0 20.414 6L18 3.586A2 2 0 0 0 16.586 3H5zm4 2h7.586L19 7.414V17H5V5h4z"></path><path fill=var(--background) opacity=0.3 d="M3 8l4-3h14l-4 3H3z">'), u = /* @__PURE__ */ n('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8">'), k = /* @__PURE__ */ n('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><path fill=var(--info) opacity=0.2 d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"></path><path fill=none stroke=var(--info) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline fill=none stroke=var(--info) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round points="14 2 14 8 20 8"></polyline><path fill=none stroke=var(--info) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="m10 13-2 2 2 2m4-4 2 2-2 2">'), w = /* @__PURE__ */ n('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><path fill=var(--success) opacity=0.2 d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"></path><path fill=none stroke=var(--success) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline fill=none stroke=var(--success) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round points="14 2 14 8 20 8"></polyline><polyline fill=none stroke=var(--success) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round points="8 13 11 15 8 17"></polyline><line x1=13 y1=17 x2=16.5 y2=17 stroke=var(--success) stroke-width=1.5 stroke-linecap=round>'), f = /* @__PURE__ */ n('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><path fill=var(--success) opacity=0.2 d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"></path><path fill=none stroke=var(--success) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline fill=none stroke=var(--success) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round points="14 2 14 8 20 8"></polyline><circle cx=10 cy=13 r=2 fill=var(--success)></circle><path fill=none stroke=var(--success) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="m20 17-3-3-4 4-2-2-5 3">'), g = /* @__PURE__ */ n('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><path fill=var(--error) opacity=0.2 d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"></path><path fill=none stroke=var(--error) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline fill=none stroke=var(--error) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round points="14 2 14 8 20 8"></polyline><line x1=8 y1=13 x2=16 y2=13 stroke=var(--error) stroke-width=1.5 stroke-linecap=round></line><line x1=8 y1=17 x2=14 y2=17 stroke=var(--error) stroke-width=1.5 stroke-linecap=round>'), y = /* @__PURE__ */ n('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><path fill=var(--warning) opacity=0.2 d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"></path><path fill=none stroke=var(--warning) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline fill=none stroke=var(--warning) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round points="14 2 14 8 20 8"></polyline><path fill=none stroke=var(--warning) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M10 12v4h2m-2-4h2l2 4">'), x = /* @__PURE__ */ n('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><path fill=var(--primary) opacity=0.2 d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"></path><path fill=none stroke=var(--primary) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline fill=none stroke=var(--primary) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round points="14 2 14 8 20 8"></polyline><path fill=none stroke=var(--primary) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M9 14h6m-3-3v6">');
4
+ const b = (e) => {
5
+ const l = `floe-folder-gradient-${d()}`;
6
6
  return (() => {
7
- var s = v(), i = s.firstChild, a = i.firstChild, p = a.firstChild;
7
+ var s = h(), i = s.firstChild, a = i.firstChild, p = a.firstChild;
8
8
  p.nextSibling;
9
- var d = i.nextSibling;
10
- return e(a, "id", l), e(d, "fill", `url(#${l})`), t(() => e(s, "class", r.class)), s;
9
+ var c = i.nextSibling;
10
+ return r(a, "id", l), r(c, "fill", `url(#${l})`), t(() => r(s, "class", e.class)), s;
11
11
  })();
12
- }, H = (r) => {
13
- const l = `floe-folder-open-gradient-${c()}`;
12
+ }, C = (e) => {
13
+ const l = `floe-folder-open-gradient-${d()}`;
14
14
  return (() => {
15
- var s = h(), i = s.firstChild, a = i.firstChild, p = a.firstChild;
15
+ var s = v(), i = s.firstChild, a = i.firstChild, p = a.firstChild;
16
16
  p.nextSibling;
17
- var d = i.nextSibling;
18
- return e(a, "id", l), e(d, "fill", `url(#${l})`), t(() => e(s, "class", r.class)), s;
17
+ var c = i.nextSibling;
18
+ return r(a, "id", l), r(c, "fill", `url(#${l})`), t(() => r(s, "class", e.class)), s;
19
19
  })();
20
- }, x = (r) => (() => {
20
+ }, m = (e) => (() => {
21
21
  var o = u();
22
- return t(() => e(o, "class", r.class)), o;
23
- })(), m = (r) => (() => {
24
- var o = f();
25
- return t(() => e(o, "class", r.class)), o;
26
- })(), $ = (r) => (() => {
22
+ return t(() => r(o, "class", e.class)), o;
23
+ })(), $ = (e) => (() => {
27
24
  var o = k();
28
- return t(() => e(o, "class", r.class)), o;
29
- })(), _ = (r) => (() => {
25
+ return t(() => r(o, "class", e.class)), o;
26
+ })(), _ = (e) => (() => {
30
27
  var o = w();
31
- return t(() => e(o, "class", r.class)), o;
32
- })(), j = (r) => (() => {
28
+ return t(() => r(o, "class", e.class)), o;
29
+ })(), j = (e) => (() => {
30
+ var o = f();
31
+ return t(() => r(o, "class", e.class)), o;
32
+ })(), z = (e) => (() => {
33
33
  var o = g();
34
- return t(() => e(o, "class", r.class)), o;
35
- })(), I = (r) => (() => {
34
+ return t(() => r(o, "class", e.class)), o;
35
+ })(), I = (e) => (() => {
36
36
  var o = y();
37
- return t(() => e(o, "class", r.class)), o;
37
+ return t(() => r(o, "class", e.class)), o;
38
+ })(), M = (e) => (() => {
39
+ var o = x();
40
+ return t(() => r(o, "class", e.class)), o;
38
41
  })();
39
- function V(r) {
40
- const o = r?.toLowerCase();
41
- return ["ts", "tsx", "js", "jsx", "py", "rb", "go", "rs", "java", "c", "cpp", "h", "hpp", "vue", "svelte"].includes(o ?? "") ? m : ["png", "jpg", "jpeg", "gif", "svg", "webp", "ico", "bmp"].includes(o ?? "") ? $ : ["pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "txt", "md", "rtf"].includes(o ?? "") ? _ : ["json", "yaml", "yml", "toml", "xml", "ini", "env", "config"].includes(o ?? "") ? j : ["css", "scss", "sass", "less", "styl"].includes(o ?? "") ? I : x;
42
+ function F(e) {
43
+ const o = e?.toLowerCase();
44
+ return ["sh", "bash", "zsh", "fish", "ksh", "csh"].includes(o ?? "") ? _ : ["ts", "tsx", "js", "jsx", "py", "rb", "go", "rs", "java", "c", "cpp", "h", "hpp", "vue", "svelte"].includes(o ?? "") ? $ : ["png", "jpg", "jpeg", "gif", "svg", "webp", "ico", "bmp"].includes(o ?? "") ? j : ["pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "txt", "md", "rtf"].includes(o ?? "") ? z : ["json", "yaml", "yml", "toml", "xml", "ini", "env", "config"].includes(o ?? "") ? I : ["css", "scss", "sass", "less", "styl"].includes(o ?? "") ? M : m;
42
45
  }
43
46
  export {
44
- m as CodeFileIcon,
45
- j as ConfigFileIcon,
46
- _ as DocumentFileIcon,
47
- x as FileIcon,
48
- z as FolderIcon,
49
- H as FolderOpenIcon,
50
- $ as ImageFileIcon,
51
- I as StyleFileIcon,
52
- V as getFileIcon
47
+ $ as CodeFileIcon,
48
+ I as ConfigFileIcon,
49
+ z as DocumentFileIcon,
50
+ m as FileIcon,
51
+ b as FolderIcon,
52
+ C as FolderOpenIcon,
53
+ j as ImageFileIcon,
54
+ _ as ShellScriptFileIcon,
55
+ M as StyleFileIcon,
56
+ F as getFileIcon
53
57
  };
@@ -6,5 +6,5 @@ export { FileGridView, type FileGridViewProps } from './FileGridView';
6
6
  export { FileContextMenu, type FileContextMenuProps, type BuiltinContextMenuAction, type HideItemsValue } from './FileContextMenu';
7
7
  export { Breadcrumb, type BreadcrumbProps } from './Breadcrumb';
8
8
  export { FileBrowserToolbar, type FileBrowserToolbarProps } from './FileBrowserToolbar';
9
- export { FolderIcon, FolderOpenIcon, FileIcon, CodeFileIcon, ImageFileIcon, DocumentFileIcon, ConfigFileIcon, StyleFileIcon, getFileIcon, } from './FileIcons';
9
+ export { FolderIcon, FolderOpenIcon, FileIcon, CodeFileIcon, ShellScriptFileIcon, ImageFileIcon, DocumentFileIcon, ConfigFileIcon, StyleFileIcon, getFileIcon, } from './FileIcons';
10
10
  export type { FileItem, ViewMode, SortField, SortDirection, SortConfig, FileListColumnRatios, FileBrowserContextValue, ContextMenuActionType, ContextMenuItem, ContextMenuEvent, ContextMenuCallbacks, OptimisticUpdateType, OptimisticRemove, OptimisticUpdate, OptimisticInsert, OptimisticOperation, ScrollPosition, } from './types';
@@ -0,0 +1,19 @@
1
+ import { type JSX } from 'solid-js';
2
+ export interface SidebarPaneProps {
3
+ children: JSX.Element;
4
+ title?: JSX.Element;
5
+ headerActions?: JSX.Element;
6
+ width?: number;
7
+ open?: boolean;
8
+ resizable?: boolean;
9
+ onResize?: (delta: number) => void;
10
+ onClose?: () => void;
11
+ mobileOverlay?: boolean;
12
+ mobileBackdrop?: boolean;
13
+ class?: string;
14
+ innerClass?: string;
15
+ bodyClass?: string;
16
+ backdropClass?: string;
17
+ bodyRef?: (el: HTMLDivElement) => void;
18
+ }
19
+ export declare function SidebarPane(props: SidebarPaneProps): JSX.Element;
@@ -0,0 +1,68 @@
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";
2
+ import { Show as l } from "solid-js";
3
+ import { useLayout as j } from "../../context/LayoutContext.js";
4
+ import { cn as d } from "../../utils/cn.js";
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>");
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";
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, {
12
+ get when() {
13
+ return e.headerActions || w();
14
+ },
15
+ get children() {
16
+ var t = E();
17
+ return i(t, o(l, {
18
+ get when() {
19
+ return e.headerActions;
20
+ },
21
+ get children() {
22
+ var r = O();
23
+ return i(r, () => e.headerActions), r;
24
+ }
25
+ }), null), i(t, o(l, {
26
+ get when() {
27
+ return w();
28
+ },
29
+ get children() {
30
+ var r = P();
31
+ return r.$$click = () => e.onClose?.(), r;
32
+ }
33
+ }), null), t;
34
+ }
35
+ }), null), M((t) => e.bodyRef?.(t), b), i(b, () => e.children), i(n, o(l, {
36
+ get when() {
37
+ return R();
38
+ },
39
+ get children() {
40
+ return o(A, {
41
+ direction: "horizontal",
42
+ onResize: (t) => e.onResize?.(t)
43
+ });
44
+ }
45
+ }), 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;
48
+ }, {
49
+ e: void 0,
50
+ t: void 0,
51
+ a: void 0,
52
+ o: void 0,
53
+ i: void 0
54
+ }), n;
55
+ })(), o(l, {
56
+ get when() {
57
+ return _();
58
+ },
59
+ get children() {
60
+ 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;
62
+ }
63
+ })];
64
+ }
65
+ S(["click"]);
66
+ export {
67
+ I as SidebarPane
68
+ };
@@ -6,5 +6,6 @@ export { TopBarIconButton, type TopBarIconButtonProps } from './TopBarIconButton
6
6
  export { BottomBar, BottomBarItem, StatusIndicator, type BottomBarProps, type BottomBarItemProps, type StatusIndicatorProps } from './BottomBar';
7
7
  export { MobileTabBar, type MobileTabBarItem, type MobileTabBarProps } from './MobileTabBar';
8
8
  export { ResizeHandle, type ResizeHandleProps } from './ResizeHandle';
9
+ export { SidebarPane, type SidebarPaneProps } from './SidebarPane';
9
10
  export { Panel, PanelHeader, PanelContent, type PanelProps, type PanelHeaderProps, type PanelContentProps } from './Panel';
10
11
  export { KeepAliveStack, type KeepAliveStackProps, type KeepAliveView } from './KeepAliveStack';
@@ -1,29 +1,30 @@
1
1
  import { Breadcrumb as r } from "./components/file-browser/Breadcrumb.js";
2
- import { CodeFileIcon as l, ConfigFileIcon as t, DocumentFileIcon as F, FileIcon as n, FolderIcon as c, FolderOpenIcon as m, ImageFileIcon as f, StyleFileIcon as p, getFileIcon as x } from "./components/file-browser/FileIcons.js";
3
- import { DirectoryTree as d } from "./components/file-browser/DirectoryTree.js";
4
- import { FileBrowser as w } from "./components/file-browser/FileBrowser.js";
5
- import { FileBrowserProvider as u, useFileBrowser as a } from "./components/file-browser/FileBrowserContext.js";
6
- import { FileBrowserToolbar as C } from "./components/file-browser/FileBrowserToolbar.js";
2
+ import { CodeFileIcon as l, ConfigFileIcon as t, DocumentFileIcon as F, FileIcon as n, FolderIcon as c, FolderOpenIcon as m, ImageFileIcon as p, ShellScriptFileIcon as I, StyleFileIcon as f, getFileIcon as x } from "./components/file-browser/FileIcons.js";
3
+ import { DirectoryTree as s } from "./components/file-browser/DirectoryTree.js";
4
+ import { FileBrowser as B } from "./components/file-browser/FileBrowser.js";
5
+ import { FileBrowserProvider as a, useFileBrowser as g } from "./components/file-browser/FileBrowserContext.js";
6
+ import { FileBrowserToolbar as S } from "./components/file-browser/FileBrowserToolbar.js";
7
7
  import { FileContextMenu as y } from "./components/file-browser/FileContextMenu.js";
8
8
  import { FileGridView as T } from "./components/file-browser/FileGridView.js";
9
- import { FileListView as v } from "./components/file-browser/FileListView.js";
9
+ import { FileListView as h } from "./components/file-browser/FileListView.js";
10
10
  export {
11
11
  r as Breadcrumb,
12
12
  l as CodeFileIcon,
13
13
  t as ConfigFileIcon,
14
- d as DirectoryTree,
14
+ s as DirectoryTree,
15
15
  F as DocumentFileIcon,
16
- w as FileBrowser,
17
- u as FileBrowserProvider,
18
- C as FileBrowserToolbar,
16
+ B as FileBrowser,
17
+ a as FileBrowserProvider,
18
+ S as FileBrowserToolbar,
19
19
  y as FileContextMenu,
20
20
  T as FileGridView,
21
21
  n as FileIcon,
22
- v as FileListView,
22
+ h as FileListView,
23
23
  c as FolderIcon,
24
24
  m as FolderOpenIcon,
25
- f as ImageFileIcon,
26
- p as StyleFileIcon,
25
+ p as ImageFileIcon,
26
+ I as ShellScriptFileIcon,
27
+ f as StyleFileIcon,
27
28
  x as getFileIcon,
28
- a as useFileBrowser
29
+ g as useFileBrowser
29
30
  };