@floegence/floe-webapp-core 0.35.33 → 0.35.35
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.
- package/dist/components/file-browser/DirectoryTree.js +74 -80
- package/dist/components/file-browser/FileBrowser.d.ts +5 -1
- package/dist/components/file-browser/FileBrowser.js +29 -23
- package/dist/components/file-browser/FileBrowserContext.d.ts +3 -1
- package/dist/components/file-browser/FileBrowserContext.js +264 -248
- package/dist/components/file-browser/FileGridView.js +211 -160
- package/dist/components/file-browser/FileIcons.d.ts +10 -2
- package/dist/components/file-browser/FileIcons.js +289 -181
- package/dist/components/file-browser/FileListView.js +332 -279
- package/dist/components/file-browser/index.d.ts +2 -2
- package/dist/components/file-browser/types.d.ts +29 -0
- package/dist/components/ui/picker/PickerBase.js +90 -96
- package/dist/file-browser.js +35 -31
- package/dist/full.js +411 -407
- package/package.json +1 -1
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { insert as
|
|
2
|
-
import { createMemo as I, For as Q, untrack as W, createSignal as Z, Show as
|
|
3
|
-
import { cn as
|
|
1
|
+
import { insert as l, createComponent as s, effect as v, className as D, template as m, setAttribute as X, spread as Y, mergeProps as q, memo as z, setStyleProperty as J, delegateEvents as K } from "solid-js/web";
|
|
2
|
+
import { createMemo as I, For as Q, untrack as W, createSignal as Z, Show as w } from "solid-js";
|
|
3
|
+
import { cn as f } from "../../utils/cn.js";
|
|
4
4
|
import { useFileBrowser as _ } from "./FileBrowserContext.js";
|
|
5
5
|
import { useFileBrowserDrag as ee } from "../../context/FileBrowserDragContext.js";
|
|
6
|
-
import {
|
|
7
|
-
import { ChevronRight as
|
|
8
|
-
import { createLongPressContextMenuHandlers as
|
|
9
|
-
import { fileBrowserTouchTargetAttrs as
|
|
10
|
-
import { createItemContextMenuEvent as
|
|
11
|
-
var
|
|
12
|
-
function
|
|
13
|
-
const
|
|
6
|
+
import { FileItemIcon as te } from "./FileIcons.js";
|
|
7
|
+
import { ChevronRight as ne } from "../icons/index.js";
|
|
8
|
+
import { createLongPressContextMenuHandlers as re } from "./longPressContextMenu.js";
|
|
9
|
+
import { fileBrowserTouchTargetAttrs as ie } from "./touchInteractionGuard.js";
|
|
10
|
+
import { createItemContextMenuEvent as ae } from "./contextMenuEvent.js";
|
|
11
|
+
var k = /* @__PURE__ */ m("<div>"), oe = /* @__PURE__ */ m("<button type=button>"), le = /* @__PURE__ */ m('<span class="ml-auto mr-2 text-[10px] text-muted-foreground/60 opacity-0 group-hover:opacity-100 transition-opacity">'), se = /* @__PURE__ */ m('<div class="flex flex-col"><div><button type=button><span class="flex-shrink-0 w-4 h-4"></span><span class=truncate>'), ce = /* @__PURE__ */ m('<span class="flex-shrink-0 w-3.5 h-3.5">');
|
|
12
|
+
function ye(e) {
|
|
13
|
+
const o = _(), i = ee(), b = () => (e.enableDragDrop ?? !0) && !!i, h = () => e.instanceId ?? "default", g = I(() => o.files().filter((r) => r.type === "folder"));
|
|
14
14
|
return (() => {
|
|
15
|
-
var r =
|
|
16
|
-
return r.$$contextmenu = (
|
|
15
|
+
var r = k();
|
|
16
|
+
return r.$$contextmenu = (C) => C.preventDefault(), l(r, s(M, {
|
|
17
17
|
get items() {
|
|
18
18
|
return g();
|
|
19
19
|
},
|
|
20
20
|
depth: 0,
|
|
21
21
|
get instanceId() {
|
|
22
|
-
return
|
|
22
|
+
return h();
|
|
23
23
|
},
|
|
24
24
|
get enableDragDrop() {
|
|
25
|
-
return
|
|
25
|
+
return b();
|
|
26
26
|
},
|
|
27
27
|
dragContext: i
|
|
28
|
-
})),
|
|
28
|
+
})), v(() => D(r, f("flex flex-col", e.class))), r;
|
|
29
29
|
})();
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
const
|
|
33
|
-
return
|
|
31
|
+
function M(e) {
|
|
32
|
+
const o = I(() => e.items.filter((i) => i.type === "folder"));
|
|
33
|
+
return s(Q, {
|
|
34
34
|
get each() {
|
|
35
|
-
return
|
|
35
|
+
return o();
|
|
36
36
|
},
|
|
37
|
-
children: (i) =>
|
|
37
|
+
children: (i) => s(ge, {
|
|
38
38
|
item: i,
|
|
39
39
|
get depth() {
|
|
40
40
|
return e.depth;
|
|
@@ -51,25 +51,25 @@ function F(e) {
|
|
|
51
51
|
})
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
const
|
|
54
|
+
function ge(e) {
|
|
55
|
+
const o = _(), i = () => o.isExpanded(e.item.path), b = () => o.currentPath() === e.item.path, h = W(() => e.item), g = re(o, h, {
|
|
56
56
|
selectOnOpen: !1,
|
|
57
57
|
source: "tree"
|
|
58
58
|
});
|
|
59
59
|
let r;
|
|
60
|
-
const [
|
|
60
|
+
const [C, T] = Z(!1), F = () => r === "touch" || r === "pen", $ = I(() => e.item.children?.filter((t) => t.type === "folder").length ?? 0), x = () => $() > 0, p = () => {
|
|
61
61
|
if (!e.enableDragDrop || !e.dragContext) return !1;
|
|
62
62
|
const t = e.dragContext.dragState();
|
|
63
63
|
return t.isDragging ? e.dragContext.canDropOn(t.draggedItems, e.item.path, e.item, e.instanceId) : !1;
|
|
64
|
-
},
|
|
64
|
+
}, L = () => e.dragContext?.dragState(), A = () => L()?.isDragging ?? !1, E = () => C() && A() && e.enableDragDrop, B = (t) => {
|
|
65
65
|
r = t.pointerType, g.onPointerDown(t);
|
|
66
|
-
},
|
|
66
|
+
}, O = (t) => {
|
|
67
67
|
r = t.pointerType, g.onPointerMove(t);
|
|
68
|
-
},
|
|
68
|
+
}, H = (t) => {
|
|
69
69
|
r = t.pointerType, g.onPointerUp();
|
|
70
|
-
},
|
|
70
|
+
}, N = (t) => {
|
|
71
71
|
r = t.pointerType, g.onPointerCancel();
|
|
72
|
-
},
|
|
72
|
+
}, R = (t) => {
|
|
73
73
|
if (!e.enableDragDrop || !e.dragContext) return;
|
|
74
74
|
const a = e.dragContext.dragState();
|
|
75
75
|
if (!a.isDragging) return;
|
|
@@ -80,84 +80,78 @@ function de(e) {
|
|
|
80
80
|
targetPath: e.item.path,
|
|
81
81
|
targetItem: e.item
|
|
82
82
|
}, d, P);
|
|
83
|
-
},
|
|
83
|
+
}, U = (t) => {
|
|
84
84
|
if (!e.dragContext) return;
|
|
85
85
|
T(!1);
|
|
86
86
|
const a = e.dragContext.dragState();
|
|
87
87
|
a.isDragging && a.dropTarget?.targetPath === e.item.path && e.dragContext.setDropTarget(null, !1);
|
|
88
|
+
}, V = (t) => {
|
|
89
|
+
g.consumeClickSuppression(t) || o.navigateTo(h);
|
|
88
90
|
}, j = (t) => {
|
|
89
|
-
|
|
90
|
-
}, G = (t) => {
|
|
91
|
-
t.preventDefault(), t.stopPropagation(), !L() && l.showContextMenu(oe({
|
|
91
|
+
t.preventDefault(), t.stopPropagation(), !F() && o.showContextMenu(ae({
|
|
92
92
|
x: t.clientX,
|
|
93
93
|
y: t.clientY,
|
|
94
94
|
triggerItem: e.item,
|
|
95
95
|
items: [e.item],
|
|
96
96
|
source: "tree"
|
|
97
97
|
}));
|
|
98
|
-
},
|
|
99
|
-
|
|
98
|
+
}, G = () => {
|
|
99
|
+
x() && o.toggleFolder(e.item.path);
|
|
100
100
|
};
|
|
101
101
|
return (() => {
|
|
102
|
-
var t =
|
|
103
|
-
return a.addEventListener("pointerleave",
|
|
102
|
+
var t = se(), a = t.firstChild, d = a.firstChild, y = d.firstChild, P = y.nextSibling;
|
|
103
|
+
return a.addEventListener("pointerleave", U), a.addEventListener("pointerenter", R), l(a, s(w, {
|
|
104
104
|
get when() {
|
|
105
|
-
return
|
|
105
|
+
return x();
|
|
106
106
|
},
|
|
107
107
|
get fallback() {
|
|
108
|
-
return
|
|
108
|
+
return ce();
|
|
109
109
|
},
|
|
110
110
|
get children() {
|
|
111
|
-
var n =
|
|
112
|
-
return n.$$click =
|
|
111
|
+
var n = oe();
|
|
112
|
+
return n.$$click = G, l(n, s(ne, {
|
|
113
113
|
class: "w-3 h-3 opacity-50"
|
|
114
|
-
})),
|
|
115
|
-
var
|
|
116
|
-
return
|
|
114
|
+
})), v((c) => {
|
|
115
|
+
var u = f("flex-shrink-0 w-3.5 h-3.5 flex items-center justify-center cursor-pointer", "transition-transform duration-150", i() && "rotate-90", "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-sidebar-ring"), S = i() ? "Collapse folder" : "Expand folder";
|
|
116
|
+
return u !== c.e && D(n, c.e = u), S !== c.t && X(n, "aria-label", c.t = S), c;
|
|
117
117
|
}, {
|
|
118
118
|
e: void 0,
|
|
119
119
|
t: void 0
|
|
120
120
|
}), n;
|
|
121
121
|
}
|
|
122
|
-
}), d),
|
|
123
|
-
onClick:
|
|
124
|
-
onContextMenu:
|
|
122
|
+
}), d), Y(d, q(ie, {
|
|
123
|
+
onClick: V,
|
|
124
|
+
onContextMenu: j,
|
|
125
125
|
onPointerDown: B,
|
|
126
|
-
onPointerMove:
|
|
127
|
-
onPointerUp:
|
|
128
|
-
onPointerCancel:
|
|
126
|
+
onPointerMove: O,
|
|
127
|
+
onPointerUp: H,
|
|
128
|
+
onPointerCancel: N,
|
|
129
129
|
get class() {
|
|
130
|
-
return
|
|
130
|
+
return f("flex items-center gap-1 flex-1 min-w-0 text-left cursor-pointer pl-1", "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-sidebar-ring");
|
|
131
131
|
}
|
|
132
|
-
}), !1, !0),
|
|
133
|
-
get
|
|
134
|
-
return
|
|
132
|
+
}), !1, !0), l(y, s(te, {
|
|
133
|
+
get item() {
|
|
134
|
+
return e.item;
|
|
135
135
|
},
|
|
136
|
-
get
|
|
137
|
-
return
|
|
138
|
-
class: "w-4 h-4"
|
|
139
|
-
});
|
|
136
|
+
get open() {
|
|
137
|
+
return i();
|
|
140
138
|
},
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
class: "w-4 h-4"
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
})), s(P, () => e.item.name), s(d, o(v, {
|
|
139
|
+
class: "w-4 h-4"
|
|
140
|
+
})), l(P, () => e.item.name), l(d, s(w, {
|
|
147
141
|
get when() {
|
|
148
|
-
return
|
|
142
|
+
return x();
|
|
149
143
|
},
|
|
150
144
|
get children() {
|
|
151
|
-
var n =
|
|
152
|
-
return
|
|
145
|
+
var n = le();
|
|
146
|
+
return l(n, $), n;
|
|
153
147
|
}
|
|
154
|
-
}), null),
|
|
148
|
+
}), null), l(t, s(w, {
|
|
155
149
|
get when() {
|
|
156
|
-
return
|
|
150
|
+
return z(() => !!i())() && x();
|
|
157
151
|
},
|
|
158
152
|
get children() {
|
|
159
|
-
var n =
|
|
160
|
-
return
|
|
153
|
+
var n = k();
|
|
154
|
+
return l(n, s(M, {
|
|
161
155
|
get items() {
|
|
162
156
|
return e.item.children ?? [];
|
|
163
157
|
},
|
|
@@ -173,19 +167,19 @@ function de(e) {
|
|
|
173
167
|
get dragContext() {
|
|
174
168
|
return e.dragContext;
|
|
175
169
|
}
|
|
176
|
-
})),
|
|
170
|
+
})), v(() => D(n, f("overflow-hidden transition-all duration-200", i() ? "opacity-100" : "opacity-0"))), n;
|
|
177
171
|
}
|
|
178
|
-
}), null),
|
|
179
|
-
var c =
|
|
172
|
+
}), null), v((n) => {
|
|
173
|
+
var c = f(
|
|
180
174
|
"group flex items-center w-full py-1 text-xs",
|
|
181
175
|
"transition-all duration-150 ease-out",
|
|
182
176
|
"hover:bg-sidebar-accent/60",
|
|
183
|
-
|
|
177
|
+
b() && "bg-sidebar-accent text-sidebar-accent-foreground font-medium",
|
|
184
178
|
// Drop target styling - enhanced visual feedback
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
),
|
|
188
|
-
return c !== n.e &&
|
|
179
|
+
E() && p() && ["bg-primary/15 outline outline-2 outline-primary/60", "shadow-sm shadow-primary/10"],
|
|
180
|
+
E() && !p() && ["bg-destructive/10 outline outline-2 outline-dashed outline-destructive/50"]
|
|
181
|
+
), u = `${8 + e.depth * 12}px`;
|
|
182
|
+
return c !== n.e && D(a, n.e = c), u !== n.t && J(a, "padding-left", n.t = u), n;
|
|
189
183
|
}, {
|
|
190
184
|
e: void 0,
|
|
191
185
|
t: void 0
|
|
@@ -194,5 +188,5 @@ function de(e) {
|
|
|
194
188
|
}
|
|
195
189
|
K(["contextmenu", "click"]);
|
|
196
190
|
export {
|
|
197
|
-
|
|
191
|
+
ye as DirectoryTree
|
|
198
192
|
};
|
|
@@ -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, FileListColumnRatios } from './types';
|
|
3
|
+
import type { FileItem, ViewMode, ContextMenuCallbacks, ContextMenuItem, FileListColumnRatios, FileBrowserRevealRequest } from './types';
|
|
4
4
|
export interface FileBrowserProps {
|
|
5
5
|
/** File tree data */
|
|
6
6
|
files: FileItem[];
|
|
@@ -26,6 +26,10 @@ export interface FileBrowserProps {
|
|
|
26
26
|
onSelect?: (items: FileItem[]) => void;
|
|
27
27
|
/** Callback when a file is opened */
|
|
28
28
|
onOpen?: (item: FileItem) => void;
|
|
29
|
+
/** Controlled programmatic reveal request for a specific item in the current directory. */
|
|
30
|
+
revealRequest?: FileBrowserRevealRequest | null;
|
|
31
|
+
/** Callback fired after the current reveal request has been consumed. */
|
|
32
|
+
onRevealRequestConsumed?: (requestId: string) => void;
|
|
29
33
|
/** Additional class names */
|
|
30
34
|
class?: string;
|
|
31
35
|
/** Custom header content */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createComponent as n, insert as i, use as k, memo as E, effect as B, className as K, template as I, delegateEvents as L } from "solid-js/web";
|
|
2
|
-
import { createSignal as O, onMount as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { useLayout as
|
|
5
|
-
import { useFileBrowserDrag as
|
|
6
|
-
import { deferAfterPaint as
|
|
7
|
-
import { FileBrowserProvider as
|
|
2
|
+
import { createSignal as O, onMount as q, onCleanup as V, createEffect as H, Show as c } from "solid-js";
|
|
3
|
+
import { cn as N } from "../../utils/cn.js";
|
|
4
|
+
import { useLayout as T } from "../../context/LayoutContext.js";
|
|
5
|
+
import { useFileBrowserDrag as j } from "../../context/FileBrowserDragContext.js";
|
|
6
|
+
import { deferAfterPaint as G } from "../../utils/defer.js";
|
|
7
|
+
import { FileBrowserProvider as Q, useFileBrowser as J } from "./FileBrowserContext.js";
|
|
8
8
|
import { SidebarPane as U } from "../layout/SidebarPane.js";
|
|
9
9
|
import { DirectoryTree as X } from "./DirectoryTree.js";
|
|
10
10
|
import { FileListView as Y } from "./FileListView.js";
|
|
@@ -13,8 +13,8 @@ import { FileBrowserToolbar as p } from "./FileBrowserToolbar.js";
|
|
|
13
13
|
import { FileContextMenu as ee } from "./FileContextMenu.js";
|
|
14
14
|
import { FileBrowserDragPreview as te } from "./DragPreview.js";
|
|
15
15
|
var re = /* @__PURE__ */ I('<div class="border-b border-border">'), ne = /* @__PURE__ */ I('<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
|
|
17
|
-
return n(
|
|
16
|
+
function we(e) {
|
|
17
|
+
return n(Q, {
|
|
18
18
|
get files() {
|
|
19
19
|
return e.files;
|
|
20
20
|
},
|
|
@@ -54,6 +54,12 @@ function Ce(e) {
|
|
|
54
54
|
get onOpen() {
|
|
55
55
|
return e.onOpen;
|
|
56
56
|
},
|
|
57
|
+
get revealRequest() {
|
|
58
|
+
return e.revealRequest;
|
|
59
|
+
},
|
|
60
|
+
get onRevealRequestConsumed() {
|
|
61
|
+
return e.onRevealRequestConsumed;
|
|
62
|
+
},
|
|
57
63
|
get children() {
|
|
58
64
|
return n(ie, {
|
|
59
65
|
get class() {
|
|
@@ -100,26 +106,26 @@ function Ce(e) {
|
|
|
100
106
|
});
|
|
101
107
|
}
|
|
102
108
|
function ie(e) {
|
|
103
|
-
const r = J(), M =
|
|
104
|
-
let
|
|
105
|
-
|
|
109
|
+
const r = J(), M = T(), o = j(), h = () => M.isMobile(), [v, b] = O(null), R = () => v() ?? r.sidebarWidth(), D = () => e.sidebarResizable ?? !0, a = () => (e.enableDragDrop ?? !0) && !!o, d = () => e.instanceId ?? `filebrowser-${Math.random().toString(36).slice(2, 9)}`;
|
|
110
|
+
let C, w = null, x = null;
|
|
111
|
+
q(() => {
|
|
106
112
|
if (!o || !a()) return;
|
|
107
113
|
const t = {
|
|
108
114
|
instanceId: d(),
|
|
109
115
|
currentPath: r.currentPath,
|
|
110
116
|
files: r.files,
|
|
111
117
|
onDragMove: e.onDragMove,
|
|
112
|
-
getScrollContainer: () =>
|
|
118
|
+
getScrollContainer: () => w,
|
|
113
119
|
getSidebarScrollContainer: () => x,
|
|
114
120
|
optimisticRemove: r.optimisticRemove,
|
|
115
121
|
optimisticInsert: r.optimisticInsert
|
|
116
122
|
};
|
|
117
123
|
o.registerInstance(t);
|
|
118
|
-
}),
|
|
124
|
+
}), V(() => {
|
|
119
125
|
o && a() && o.unregisterInstance(d());
|
|
120
126
|
});
|
|
121
127
|
let S = !1, m = !1;
|
|
122
|
-
|
|
128
|
+
H(() => {
|
|
123
129
|
const t = h();
|
|
124
130
|
if (!S) {
|
|
125
131
|
S = !0, m = t, t && e.hideSidebarOnMobile !== !1 && !r.sidebarCollapsed() && r.toggleSidebar();
|
|
@@ -127,8 +133,8 @@ function ie(e) {
|
|
|
127
133
|
}
|
|
128
134
|
!m && t && e.hideSidebarOnMobile !== !1 && !r.sidebarCollapsed() && r.toggleSidebar(), m = t;
|
|
129
135
|
});
|
|
130
|
-
const
|
|
131
|
-
(t.metaKey || t.ctrlKey) && t.key.toLowerCase() === "f" && (t.preventDefault(), r.setFilterActive(!0),
|
|
136
|
+
const y = (t) => {
|
|
137
|
+
(t.metaKey || t.ctrlKey) && t.key.toLowerCase() === "f" && (t.preventDefault(), r.setFilterActive(!0), G(() => C?.focus()));
|
|
132
138
|
}, P = () => !r.sidebarCollapsed() || !h(), $ = () => {
|
|
133
139
|
b(r.sidebarWidth());
|
|
134
140
|
}, W = (t) => {
|
|
@@ -139,7 +145,7 @@ function ie(e) {
|
|
|
139
145
|
};
|
|
140
146
|
return (() => {
|
|
141
147
|
var t = ne(), s = t.firstChild, f = s.firstChild, g = f.firstChild, F = g.nextSibling, u = F.firstChild, A = u.firstChild, _ = u.nextSibling;
|
|
142
|
-
return t.$$keydown =
|
|
148
|
+
return t.$$keydown = y, i(t, n(c, {
|
|
143
149
|
get when() {
|
|
144
150
|
return e.header;
|
|
145
151
|
},
|
|
@@ -150,7 +156,7 @@ function ie(e) {
|
|
|
150
156
|
}), s), i(s, n(U, {
|
|
151
157
|
title: "Explorer",
|
|
152
158
|
get width() {
|
|
153
|
-
return
|
|
159
|
+
return R();
|
|
154
160
|
},
|
|
155
161
|
get open() {
|
|
156
162
|
return P();
|
|
@@ -159,7 +165,7 @@ function ie(e) {
|
|
|
159
165
|
return e.sidebarHeaderActions;
|
|
160
166
|
},
|
|
161
167
|
get resizable() {
|
|
162
|
-
return
|
|
168
|
+
return D();
|
|
163
169
|
},
|
|
164
170
|
onResize: W,
|
|
165
171
|
get onClose() {
|
|
@@ -182,12 +188,12 @@ function ie(e) {
|
|
|
182
188
|
});
|
|
183
189
|
}
|
|
184
190
|
}), f), i(f, n(p, {
|
|
185
|
-
filterInputRef: (l) =>
|
|
191
|
+
filterInputRef: (l) => C = l,
|
|
186
192
|
get endActions() {
|
|
187
193
|
return e.toolbarEndActions;
|
|
188
194
|
}
|
|
189
195
|
}), g), k((l) => {
|
|
190
|
-
|
|
196
|
+
w = l;
|
|
191
197
|
}, g), i(g, n(c, {
|
|
192
198
|
get when() {
|
|
193
199
|
return r.viewMode() === "list";
|
|
@@ -246,10 +252,10 @@ function ie(e) {
|
|
|
246
252
|
get children() {
|
|
247
253
|
return n(te, {});
|
|
248
254
|
}
|
|
249
|
-
}), null), B(() => K(t,
|
|
255
|
+
}), null), B(() => K(t, N("flex flex-col h-full min-h-0 bg-background", "border border-border rounded-lg overflow-hidden", "shadow-sm", e.class))), t;
|
|
250
256
|
})();
|
|
251
257
|
}
|
|
252
258
|
L(["keydown"]);
|
|
253
259
|
export {
|
|
254
|
-
|
|
260
|
+
we as FileBrowser
|
|
255
261
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type JSX } from 'solid-js';
|
|
2
|
-
import type { FileItem, ViewMode, FileListColumnRatios, FileBrowserContextValue } from './types';
|
|
2
|
+
import type { FileItem, ViewMode, FileListColumnRatios, FileBrowserContextValue, FileBrowserRevealRequest } from './types';
|
|
3
3
|
export interface FileBrowserProviderProps {
|
|
4
4
|
children: JSX.Element;
|
|
5
5
|
files: FileItem[];
|
|
@@ -30,6 +30,8 @@ export interface FileBrowserProviderProps {
|
|
|
30
30
|
onPathChange?: (path: string, source: 'user' | 'programmatic') => void;
|
|
31
31
|
onSelect?: (items: FileItem[]) => void;
|
|
32
32
|
onOpen?: (item: FileItem) => void;
|
|
33
|
+
revealRequest?: FileBrowserRevealRequest | null;
|
|
34
|
+
onRevealRequestConsumed?: (requestId: string) => void;
|
|
33
35
|
}
|
|
34
36
|
/**
|
|
35
37
|
* Provider for file browser state management
|