@floegence/floe-webapp-core 0.8.2 → 0.8.4

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,6 +1,6 @@
1
1
  import { type JSX } from 'solid-js';
2
2
  import { type FileContextMenuProps } from './FileContextMenu';
3
- import type { FileItem, ViewMode, ContextMenuCallbacks, ContextMenuItem } from './types';
3
+ import type { FileItem, ViewMode, ContextMenuCallbacks, ContextMenuItem, FileListColumnRatios } from './types';
4
4
  export interface FileBrowserProps {
5
5
  /** File tree data */
6
6
  files: FileItem[];
@@ -8,6 +8,8 @@ export interface FileBrowserProps {
8
8
  initialPath?: string;
9
9
  /** Initial view mode */
10
10
  initialViewMode?: ViewMode;
11
+ /** Initial list view column ratios (for resizable columns) */
12
+ initialListColumnRatios?: FileListColumnRatios;
11
13
  /** Callback when navigation occurs */
12
14
  onNavigate?: (path: string) => void;
13
15
  /** Callback when selection changes */
@@ -1,10 +1,12 @@
1
1
  import { type JSX } from 'solid-js';
2
- import type { FileItem, ViewMode, FileBrowserContextValue } from './types';
2
+ import type { FileItem, ViewMode, FileListColumnRatios, FileBrowserContextValue } from './types';
3
3
  export interface FileBrowserProviderProps {
4
4
  children: JSX.Element;
5
5
  files: FileItem[];
6
6
  initialPath?: string;
7
7
  initialViewMode?: ViewMode;
8
+ /** Initial list view column ratios (for resizable columns) */
9
+ initialListColumnRatios?: FileListColumnRatios;
8
10
  /** Label for the root/home directory in breadcrumb (default: 'Root') */
9
11
  homeLabel?: string;
10
12
  onNavigate?: (path: string) => void;
@@ -7,4 +7,4 @@ export { FileContextMenu, type FileContextMenuProps, type BuiltinContextMenuActi
7
7
  export { Breadcrumb, type BreadcrumbProps } from './Breadcrumb';
8
8
  export { FileBrowserToolbar, type FileBrowserToolbarProps } from './FileBrowserToolbar';
9
9
  export { FolderIcon, FolderOpenIcon, FileIcon, CodeFileIcon, ImageFileIcon, DocumentFileIcon, ConfigFileIcon, StyleFileIcon, getFileIcon, } from './FileIcons';
10
- export type { FileItem, ViewMode, SortField, SortDirection, SortConfig, FileBrowserContextValue, ContextMenuActionType, ContextMenuItem, ContextMenuEvent, ContextMenuCallbacks, OptimisticUpdateType, OptimisticRemove, OptimisticUpdate, OptimisticInsert, OptimisticOperation, ScrollPosition, } from './types';
10
+ export type { FileItem, ViewMode, SortField, SortDirection, SortConfig, FileListColumnRatios, FileBrowserContextValue, ContextMenuActionType, ContextMenuItem, ContextMenuEvent, ContextMenuCallbacks, OptimisticUpdateType, OptimisticRemove, OptimisticUpdate, OptimisticInsert, OptimisticOperation, ScrollPosition, } from './types';
@@ -26,6 +26,15 @@ export interface SortConfig {
26
26
  field: SortField;
27
27
  direction: SortDirection;
28
28
  }
29
+ /**
30
+ * List view column width ratios (sum to ~1.0).
31
+ * Used for user-adjustable column resizing and persistence.
32
+ */
33
+ export interface FileListColumnRatios {
34
+ name: number;
35
+ modifiedAt: number;
36
+ size: number;
37
+ }
29
38
  /**
30
39
  * Built-in context menu action types
31
40
  */
@@ -142,6 +151,8 @@ export interface FileBrowserContextValue {
142
151
  setViewMode: (mode: ViewMode) => void;
143
152
  sortConfig: Accessor<SortConfig>;
144
153
  setSortConfig: (config: SortConfig) => void;
154
+ listColumnRatios: Accessor<FileListColumnRatios>;
155
+ setListColumnRatios: (ratios: FileListColumnRatios) => void;
145
156
  expandedFolders: Accessor<Set<string>>;
146
157
  toggleFolder: (path: string) => void;
147
158
  isExpanded: (path: string) => boolean;
package/dist/index40.js CHANGED
@@ -4,10 +4,10 @@ import { cn as F } from "./index69.js";
4
4
  import { FileBrowserProvider as D, useFileBrowser as K } from "./index41.js";
5
5
  import { DirectoryTree as N } from "./index42.js";
6
6
  import { FileListView as T } from "./index43.js";
7
- import { FileGridView as p } from "./index44.js";
7
+ import { FileGridView as R } from "./index44.js";
8
8
  import { FileBrowserToolbar as q } from "./index47.js";
9
9
  import { FileContextMenu as A } from "./index45.js";
10
- var G = /* @__PURE__ */ b('<div class="border-b border-border">'), Q = /* @__PURE__ */ b('<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">'), H = /* @__PURE__ */ b('<div class="absolute inset-0 bg-background/60 backdrop-blur-sm z-[9]">'), J = /* @__PURE__ */ b('<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]">');
10
+ var G = /* @__PURE__ */ b('<div class="border-b border-border">'), Q = /* @__PURE__ */ b('<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__ */ b('<div class="absolute inset-0 bg-background/60 backdrop-blur-sm z-[9]">'), H = /* @__PURE__ */ b('<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]">');
11
11
  function le(e) {
12
12
  return i(D, {
13
13
  get files() {
@@ -19,6 +19,9 @@ function le(e) {
19
19
  get initialViewMode() {
20
20
  return e.initialViewMode;
21
21
  },
22
+ get initialListColumnRatios() {
23
+ return e.initialListColumnRatios;
24
+ },
22
25
  get onNavigate() {
23
26
  return e.onNavigate;
24
27
  },
@@ -29,7 +32,7 @@ function le(e) {
29
32
  return e.onOpen;
30
33
  },
31
34
  get children() {
32
- return i(R, {
35
+ return i(J, {
33
36
  get class() {
34
37
  return e.class;
35
38
  },
@@ -58,7 +61,7 @@ function le(e) {
58
61
  }
59
62
  });
60
63
  }
61
- function R(e) {
64
+ function J(e) {
62
65
  const r = K(), [m, v] = V(!1), x = () => e.sidebarWidth ?? 220;
63
66
  let h;
64
67
  W(() => {
@@ -73,11 +76,11 @@ function R(e) {
73
76
  };
74
77
  document.addEventListener("keydown", u), _(() => document.removeEventListener("keydown", u));
75
78
  });
76
- const E = () => !r.sidebarCollapsed() || !m();
79
+ const L = () => !r.sidebarCollapsed() || !m();
77
80
  return (() => {
78
- var o = J(), s = o.firstChild, d = s.firstChild, u = d.firstChild, l = u.firstChild;
81
+ var o = H(), s = o.firstChild, d = s.firstChild, u = d.firstChild, l = u.firstChild;
79
82
  l.firstChild;
80
- var B = l.nextSibling, g = d.nextSibling, f = g.firstChild, L = f.nextSibling, c = L.firstChild, O = c.firstChild, P = c.nextSibling;
83
+ var E = l.nextSibling, g = d.nextSibling, f = g.firstChild, B = f.nextSibling, c = B.firstChild, O = c.firstChild, P = c.nextSibling;
81
84
  return n(o, i(a, {
82
85
  get when() {
83
86
  return e.header;
@@ -94,12 +97,12 @@ function R(e) {
94
97
  var t = Q();
95
98
  return y(t, "click", r.toggleSidebar, !0), t;
96
99
  }
97
- }), null), n(B, i(N, {})), n(s, i(a, {
100
+ }), null), n(E, i(N, {})), n(s, i(a, {
98
101
  get when() {
99
102
  return S(() => !!m())() && !r.sidebarCollapsed();
100
103
  },
101
104
  get children() {
102
- var t = H();
105
+ var t = p();
103
106
  return y(t, "click", r.toggleSidebar, !0), t;
104
107
  }
105
108
  }), g), n(g, i(q, {
@@ -109,7 +112,7 @@ function R(e) {
109
112
  return r.viewMode() === "list";
110
113
  },
111
114
  get fallback() {
112
- return i(p, {});
115
+ return i(R, {});
113
116
  },
114
117
  get children() {
115
118
  return i(T, {});
@@ -148,7 +151,7 @@ function R(e) {
148
151
  "overflow-hidden",
149
152
  // Mobile overlay
150
153
  m() && !r.sidebarCollapsed() && "absolute inset-y-0 left-0 z-10 shadow-lg"
151
- ), M = E() ? `${x()}px` : "0px", k = `${x()}px`;
154
+ ), M = L() ? `${x()}px` : "0px", k = `${x()}px`;
152
155
  return w !== t.e && $(o, t.e = w), C !== t.t && $(d, t.t = C), M !== t.a && I(d, "width", t.a = M), k !== t.o && I(u, "width", t.o = k), t;
153
156
  }, {
154
157
  e: void 0,
package/dist/index41.js CHANGED
@@ -1,237 +1,259 @@
1
- import { createComponent as me } from "solid-js/web";
2
- import { createContext as we, createSignal as a, createMemo as N, useContext as Pe } from "solid-js";
3
- import { deferNonBlocking as I } from "./index70.js";
4
- const R = we();
5
- function Q(r, h) {
6
- if (!h) return [];
7
- const x = r.toLowerCase(), w = h.toLowerCase(), p = [];
8
- let g = 0;
9
- for (const S of w) {
10
- const m = x.indexOf(S, g);
11
- if (m === -1) return null;
12
- p.push(m), g = m + 1;
1
+ import { createComponent as Fe } from "solid-js/web";
2
+ import { createContext as ye, createSignal as a, createEffect as Ae, createMemo as q, useContext as Ie } from "solid-js";
3
+ import { useResolvedFloeConfig as Me } from "./index53.js";
4
+ import { deferNonBlocking as A } from "./index70.js";
5
+ const D = ye(), g = {
6
+ name: 0.65,
7
+ modifiedAt: 0.2,
8
+ size: 0.15
9
+ }, Q = "fileBrowser:listColumnRatios";
10
+ function V(s) {
11
+ const w = Number.isFinite(s.name) ? s.name : g.name, r = Number.isFinite(s.modifiedAt) ? s.modifiedAt : g.modifiedAt, h = Number.isFinite(s.size) ? s.size : g.size, S = Math.max(0, w), f = Math.max(0, r), p = Math.max(0, h), d = S + f + p;
12
+ return d <= 0 ? g : {
13
+ name: S / d,
14
+ modifiedAt: f / d,
15
+ size: p / d
16
+ };
17
+ }
18
+ function j(s, w) {
19
+ if (!w) return [];
20
+ const r = s.toLowerCase(), h = w.toLowerCase(), S = [];
21
+ let f = 0;
22
+ for (const p of h) {
23
+ const d = r.indexOf(p, f);
24
+ if (d === -1) return null;
25
+ S.push(d), f = d + 1;
13
26
  }
14
- return p;
27
+ return S;
15
28
  }
16
- function ye(r) {
17
- const [h, x] = a(r.initialPath ?? "/"), [w, p] = a(/* @__PURE__ */ new Set()), [g, S] = a(r.initialViewMode ?? "list"), [m, V] = a({
29
+ function ke(s) {
30
+ const w = Me(), r = (e) => {
31
+ const t = (e ?? "").trim();
32
+ return t === "" ? "/" : t;
33
+ }, [h, S] = a(r(s.initialPath ?? "/")), [f, p] = a(/* @__PURE__ */ new Set()), [d, G] = a(s.initialViewMode ?? "list"), [I, K] = a({
18
34
  field: "name",
19
35
  direction: "asc"
20
- }), [M, b] = a(/* @__PURE__ */ new Set(["/"])), [j, D] = a(!1), [G, O] = a(null), [v, k] = a(""), [H, B] = a(!1), J = () => r.homeLabel ?? "Root", [z, P] = a([]);
21
- let u = null, C = {
36
+ }), Y = V(w.persist.load(Q, s.initialListColumnRatios ?? g)), [M, H] = a(Y), [L, z] = a(/* @__PURE__ */ new Set(["/"])), [J, W] = a(!1), [X, O] = a(null), [P, b] = a(""), [Z, R] = a(!1);
37
+ Ae(() => {
38
+ w.persist.debouncedSave(Q, M());
39
+ });
40
+ const $ = () => s.homeLabel ?? "Root", [T, x] = a([]);
41
+ let C = null, v = {
22
42
  top: 0,
23
43
  left: 0
24
44
  };
25
- const A = () => r.files, c = (e) => {
26
- const t = (e ?? "").trim();
27
- return t === "" ? "/" : t;
28
- }, L = (e) => {
29
- const t = c(e);
45
+ const k = () => s.files, B = (e) => {
46
+ const t = r(e);
30
47
  if (t === "/") return "/";
31
48
  const n = t.split("/").filter(Boolean);
32
49
  return n.pop(), n.length ? "/" + n.join("/") : "/";
33
- }, K = (e, t) => {
34
- const n = z();
50
+ }, ee = (e, t) => {
51
+ const n = T();
35
52
  if (n.length === 0) return e;
36
- let s = [...e];
37
- const d = c(t);
53
+ let i = [...e];
54
+ const u = r(t);
38
55
  for (const o of n)
39
56
  switch (o.type) {
40
57
  case "remove": {
41
- const l = new Set(o.paths.map(c));
42
- s = s.filter((i) => !l.has(c(i.path)));
58
+ const l = new Set(o.paths.map(r));
59
+ i = i.filter((c) => !l.has(r(c.path)));
43
60
  break;
44
61
  }
45
62
  case "update": {
46
- const l = c(o.oldPath), i = s.findIndex((f) => c(f.path) === l);
47
- if (i !== -1) {
48
- const f = o.updates.path ?? s[i].path;
49
- L(f) === d ? s[i] = {
50
- ...s[i],
63
+ const l = r(o.oldPath), c = i.findIndex((m) => r(m.path) === l);
64
+ if (c !== -1) {
65
+ const m = o.updates.path ?? i[c].path;
66
+ B(m) === u ? i[c] = {
67
+ ...i[c],
51
68
  ...o.updates
52
- } : s.splice(i, 1);
69
+ } : i.splice(c, 1);
53
70
  } else {
54
- const f = o.updates.path;
55
- f && L(f);
71
+ const m = o.updates.path;
72
+ m && B(m);
56
73
  }
57
74
  break;
58
75
  }
59
76
  case "insert": {
60
- c(o.parentPath) === d && (s.some((i) => c(i.path) === c(o.item.path)) || s.push(o.item));
77
+ r(o.parentPath) === u && (i.some((c) => r(c.path) === r(o.item.path)) || i.push(o.item));
61
78
  break;
62
79
  }
63
80
  }
64
- return s;
65
- }, W = N(() => {
66
- const e = /* @__PURE__ */ new Map(), t = (s) => {
67
- var d;
68
- for (const o of s)
69
- o.type === "folder" && (e.set(c(o.path), o.children ?? []), (d = o.children) != null && d.length && t(o.children));
70
- }, n = A();
81
+ return i;
82
+ }, te = q(() => {
83
+ const e = /* @__PURE__ */ new Map(), t = (i) => {
84
+ var u;
85
+ for (const o of i)
86
+ o.type === "folder" && (e.set(r(o.path), o.children ?? []), (u = o.children) != null && u.length && t(o.children));
87
+ }, n = k();
71
88
  return e.set("/", n), t(n), e;
72
- }), T = N(() => {
73
- const e = c(h());
74
- let t = W().get(e) ?? [];
75
- t = K(t, e);
76
- const n = v().trim();
77
- n && (t = t.filter((o) => Q(o.name, n) !== null));
78
- const s = m();
89
+ }), N = q(() => {
90
+ const e = r(h());
91
+ let t = te().get(e) ?? [];
92
+ t = ee(t, e);
93
+ const n = P().trim();
94
+ n && (t = t.filter((o) => j(o.name, n) !== null));
95
+ const i = I();
79
96
  return [...t].sort((o, l) => {
80
- var f, F;
97
+ var m, y;
81
98
  if (o.type !== l.type)
82
99
  return o.type === "folder" ? -1 : 1;
83
- let i = 0;
84
- switch (s.field) {
100
+ let c = 0;
101
+ switch (i.field) {
85
102
  case "name":
86
- i = o.name.localeCompare(l.name);
103
+ c = o.name.localeCompare(l.name);
87
104
  break;
88
105
  case "size":
89
- i = (o.size ?? 0) - (l.size ?? 0);
106
+ c = (o.size ?? 0) - (l.size ?? 0);
90
107
  break;
91
108
  case "modifiedAt":
92
- i = (((f = o.modifiedAt) == null ? void 0 : f.getTime()) ?? 0) - (((F = l.modifiedAt) == null ? void 0 : F.getTime()) ?? 0);
109
+ c = (((m = o.modifiedAt) == null ? void 0 : m.getTime()) ?? 0) - (((y = l.modifiedAt) == null ? void 0 : y.getTime()) ?? 0);
93
110
  break;
94
111
  case "type":
95
- i = (o.extension ?? "").localeCompare(l.extension ?? "");
112
+ c = (o.extension ?? "").localeCompare(l.extension ?? "");
96
113
  break;
97
114
  }
98
- return s.direction === "asc" ? i : -i;
115
+ return i.direction === "asc" ? c : -c;
99
116
  });
100
- }), y = (e) => {
101
- var s;
102
- const t = c(e);
103
- x(t), p(/* @__PURE__ */ new Set()), k(""), B(!1);
104
- const n = r.onSelect;
105
- I(() => n == null ? void 0 : n([])), (s = r.onNavigate) == null || s.call(r, t);
106
- }, X = () => {
117
+ }), F = (e) => {
118
+ var i;
119
+ const t = r(e);
120
+ if (t === h()) return;
121
+ S(t), p(/* @__PURE__ */ new Set()), b(""), R(!1);
122
+ const n = s.onSelect;
123
+ A(() => n == null ? void 0 : n([])), (i = s.onNavigate) == null || i.call(s, t);
124
+ }, ne = (e) => {
125
+ H(V(e));
126
+ }, oe = () => {
107
127
  const e = h();
108
128
  if (e === "/" || e === "") return;
109
129
  const t = e.split("/").filter(Boolean);
110
- t.pop(), y(t.length ? "/" + t.join("/") : "/");
111
- }, U = (e) => {
112
- e.type === "folder" && (y(e.path), b((t) => {
130
+ t.pop(), F(t.length ? "/" + t.join("/") : "/");
131
+ }, E = (e) => {
132
+ e.type === "folder" && (F(e.path), z((t) => {
113
133
  const n = new Set(t);
114
134
  return n.add(e.path), n;
115
135
  }));
116
- }, Y = (e, t = !1) => {
117
- const n = w(), s = t ? new Set(n) : /* @__PURE__ */ new Set();
118
- t ? s.has(e) ? s.delete(e) : s.add(e) : (s.clear(), s.add(e)), p(s);
119
- const d = T().filter((l) => s.has(l.id)), o = r.onSelect;
120
- I(() => o == null ? void 0 : o(d));
121
- }, Z = () => {
136
+ }, se = (e, t = !1) => {
137
+ const n = f(), i = t ? new Set(n) : /* @__PURE__ */ new Set();
138
+ t ? i.has(e) ? i.delete(e) : i.add(e) : (i.clear(), i.add(e)), p(i);
139
+ const u = N().filter((l) => i.has(l.id)), o = s.onSelect;
140
+ A(() => o == null ? void 0 : o(u));
141
+ }, ie = () => {
122
142
  p(/* @__PURE__ */ new Set());
123
- const e = r.onSelect;
124
- I(() => e == null ? void 0 : e([]));
125
- }, _ = (e) => w().has(e), $ = (e) => {
126
- b((t) => {
143
+ const e = s.onSelect;
144
+ A(() => e == null ? void 0 : e([]));
145
+ }, re = (e) => f().has(e), ce = (e) => {
146
+ z((t) => {
127
147
  const n = new Set(t);
128
148
  return n.has(e) ? n.delete(e) : n.add(e), n;
129
149
  });
130
- }, ee = (e) => M().has(e), te = () => D((e) => !e), ne = (e) => O(e), oe = () => O(null), se = (e) => {
131
- k(e);
132
- }, re = (e) => {
133
- const t = v().trim();
150
+ }, le = (e) => L().has(e), ae = () => W((e) => !e), de = (e) => O(e), fe = () => O(null), ue = (e) => {
151
+ b(e);
152
+ }, me = (e) => {
153
+ const t = P().trim();
134
154
  if (!t) return null;
135
- const n = Q(e, t);
155
+ const n = j(e, t);
136
156
  return n ? {
137
157
  matchedIndices: n
138
158
  } : null;
139
- }, ie = (e) => {
159
+ }, he = (e) => {
140
160
  var t;
141
- e.type === "folder" ? U(e) : (t = r.onOpen) == null || t.call(r, e);
142
- }, ce = (e) => {
143
- e.length !== 0 && P((t) => [...t, {
161
+ e.type === "folder" ? E(e) : (t = s.onOpen) == null || t.call(s, e);
162
+ }, pe = (e) => {
163
+ e.length !== 0 && x((t) => [...t, {
144
164
  type: "remove",
145
165
  paths: e
146
166
  }]);
147
- }, le = (e, t) => {
148
- P((n) => [...n, {
167
+ }, we = (e, t) => {
168
+ x((n) => [...n, {
149
169
  type: "update",
150
170
  oldPath: e,
151
171
  updates: t
152
172
  }]);
153
- }, ae = (e, t) => {
154
- P((n) => [...n, {
173
+ }, Se = (e, t) => {
174
+ x((n) => [...n, {
155
175
  type: "insert",
156
176
  parentPath: e,
157
177
  item: t
158
178
  }]);
159
- }, de = () => {
160
- P([]);
161
- }, fe = () => {
162
- P([]);
163
- }, ue = () => z().length > 0, he = (e) => {
164
- u = e;
165
- }, E = () => u ? {
166
- top: u.scrollTop,
167
- left: u.scrollLeft
179
+ }, Ce = () => {
180
+ x([]);
181
+ }, xe = () => {
182
+ x([]);
183
+ }, ge = () => T().length > 0, Pe = (e) => {
184
+ C = e;
185
+ }, U = () => C ? {
186
+ top: C.scrollTop,
187
+ left: C.scrollLeft
168
188
  } : {
169
189
  top: 0,
170
190
  left: 0
171
- }, q = (e) => {
172
- u && (u.scrollTop = e.top, u.scrollLeft = e.left);
173
- }, pe = {
191
+ }, _ = (e) => {
192
+ C && (C.scrollTop = e.top, C.scrollLeft = e.left);
193
+ }, ve = {
174
194
  currentPath: h,
175
- setCurrentPath: y,
176
- navigateUp: X,
177
- navigateTo: U,
178
- homeLabel: J,
179
- selectedItems: () => w(),
180
- selectItem: Y,
181
- clearSelection: Z,
182
- isSelected: _,
183
- viewMode: g,
184
- setViewMode: S,
185
- sortConfig: m,
186
- setSortConfig: V,
187
- expandedFolders: M,
188
- toggleFolder: $,
189
- isExpanded: ee,
190
- files: A,
191
- currentFiles: T,
192
- filterQuery: v,
193
- setFilterQuery: se,
194
- isFilterActive: H,
195
- setFilterActive: B,
196
- getFilterMatch: re,
197
- sidebarCollapsed: j,
198
- toggleSidebar: te,
199
- contextMenu: G,
200
- showContextMenu: ne,
201
- hideContextMenu: oe,
202
- openItem: ie,
195
+ setCurrentPath: F,
196
+ navigateUp: oe,
197
+ navigateTo: E,
198
+ homeLabel: $,
199
+ selectedItems: () => f(),
200
+ selectItem: se,
201
+ clearSelection: ie,
202
+ isSelected: re,
203
+ viewMode: d,
204
+ setViewMode: G,
205
+ sortConfig: I,
206
+ setSortConfig: K,
207
+ listColumnRatios: M,
208
+ setListColumnRatios: ne,
209
+ expandedFolders: L,
210
+ toggleFolder: ce,
211
+ isExpanded: le,
212
+ files: k,
213
+ currentFiles: N,
214
+ filterQuery: P,
215
+ setFilterQuery: ue,
216
+ isFilterActive: Z,
217
+ setFilterActive: R,
218
+ getFilterMatch: me,
219
+ sidebarCollapsed: J,
220
+ toggleSidebar: ae,
221
+ contextMenu: X,
222
+ showContextMenu: de,
223
+ hideContextMenu: fe,
224
+ openItem: he,
203
225
  // Optimistic updates
204
- optimisticRemove: ce,
205
- optimisticUpdate: le,
206
- optimisticInsert: ae,
207
- clearOptimisticUpdates: de,
208
- rollbackOptimisticUpdates: fe,
209
- hasOptimisticUpdates: ue,
226
+ optimisticRemove: pe,
227
+ optimisticUpdate: we,
228
+ optimisticInsert: Se,
229
+ clearOptimisticUpdates: Ce,
230
+ rollbackOptimisticUpdates: xe,
231
+ hasOptimisticUpdates: ge,
210
232
  // Scroll position management
211
- setScrollContainer: he,
212
- getScrollPosition: E,
213
- setScrollPosition: q,
214
- saveScrollPosition: () => (C = E(), C),
233
+ setScrollContainer: Pe,
234
+ getScrollPosition: U,
235
+ setScrollPosition: _,
236
+ saveScrollPosition: () => (v = U(), v),
215
237
  restoreScrollPosition: () => {
216
238
  requestAnimationFrame(() => {
217
- q(C);
239
+ _(v);
218
240
  });
219
241
  }
220
242
  };
221
- return me(R.Provider, {
222
- value: pe,
243
+ return Fe(D.Provider, {
244
+ value: ve,
223
245
  get children() {
224
- return r.children;
246
+ return s.children;
225
247
  }
226
248
  });
227
249
  }
228
- function Fe() {
229
- const r = Pe(R);
230
- if (!r)
250
+ function Be() {
251
+ const s = Ie(D);
252
+ if (!s)
231
253
  throw new Error("useFileBrowser must be used within a FileBrowserProvider");
232
- return r;
254
+ return s;
233
255
  }
234
256
  export {
235
- ye as FileBrowserProvider,
236
- Fe as useFileBrowser
257
+ ke as FileBrowserProvider,
258
+ Be as useFileBrowser
237
259
  };