@floegence/floe-webapp-core 0.35.46 → 0.35.48
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/FileBrowser.js +38 -37
- package/dist/components/file-browser/FileBrowserContext.js +359 -297
- package/dist/components/file-browser/FileGridView.js +186 -163
- package/dist/components/file-browser/FileListView.js +321 -300
- package/dist/components/file-browser/index.d.ts +1 -1
- package/dist/components/file-browser/longPressContextMenu.js +32 -33
- package/dist/components/file-browser/types.d.ts +10 -0
- package/dist/components/file-browser/useFileBrowserMarqueeSelection.d.ts +15 -0
- package/dist/components/file-browser/useFileBrowserMarqueeSelection.js +68 -0
- package/dist/components/notes/NotesBoard.d.ts +4 -0
- package/dist/components/notes/NotesBoard.js +37 -34
- package/dist/components/notes/NotesBoardNote.d.ts +1 -0
- package/dist/components/notes/NotesBoardNote.js +29 -29
- package/dist/components/notes/NotesOverlay.js +19 -16
- package/dist/components/notes/useNotesOverlayModel.d.ts +4 -0
- package/dist/components/notes/useNotesOverlayModel.js +339 -305
- package/dist/full.js +66 -64
- package/dist/index.js +53 -51
- package/dist/utils/keybind.d.ts +2 -0
- package/dist/utils/keybind.js +24 -16
- package/package.json +1 -1
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { createComponent as n, insert as i, use as k, memo as E, effect as B, className as
|
|
1
|
+
import { createComponent as n, insert as i, use as k, memo as E, effect as B, className as L, template as S, delegateEvents as K } from "solid-js/web";
|
|
2
2
|
import { createSignal as O, onMount as q, onCleanup as V, createEffect as H, Show as c } from "solid-js";
|
|
3
3
|
import { cn as N } from "../../utils/cn.js";
|
|
4
4
|
import { useLayout as T } from "../../context/LayoutContext.js";
|
|
5
5
|
import { useFileBrowserDrag as j } from "../../context/FileBrowserDragContext.js";
|
|
6
6
|
import { deferAfterPaint as G } from "../../utils/defer.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
import { isPrimaryModKeyPressed as Q } from "../../utils/keybind.js";
|
|
8
|
+
import { FileBrowserProvider as J, useFileBrowser as U } from "./FileBrowserContext.js";
|
|
9
|
+
import { SidebarPane as X } from "../layout/SidebarPane.js";
|
|
10
|
+
import { DirectoryTree as Y } from "./DirectoryTree.js";
|
|
11
|
+
import { FileListView as Z } from "./FileListView.js";
|
|
12
|
+
import { FileGridView as p } from "./FileGridView.js";
|
|
13
|
+
import { FileBrowserToolbar as ee } from "./FileBrowserToolbar.js";
|
|
14
|
+
import { FileContextMenu as te } from "./FileContextMenu.js";
|
|
15
|
+
import { FileBrowserDragPreview as re } from "./DragPreview.js";
|
|
16
|
+
var ne = /* @__PURE__ */ S('<div class="border-b border-border">'), ie = /* @__PURE__ */ S('<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]">');
|
|
17
|
+
function Me(e) {
|
|
18
|
+
return n(J, {
|
|
18
19
|
get files() {
|
|
19
20
|
return e.files;
|
|
20
21
|
},
|
|
@@ -61,7 +62,7 @@ function we(e) {
|
|
|
61
62
|
return e.onRevealRequestConsumed;
|
|
62
63
|
},
|
|
63
64
|
get children() {
|
|
64
|
-
return n(
|
|
65
|
+
return n(le, {
|
|
65
66
|
get class() {
|
|
66
67
|
return e.class;
|
|
67
68
|
},
|
|
@@ -105,13 +106,13 @@ function we(e) {
|
|
|
105
106
|
}
|
|
106
107
|
});
|
|
107
108
|
}
|
|
108
|
-
function
|
|
109
|
-
const r =
|
|
109
|
+
function le(e) {
|
|
110
|
+
const r = U(), I = T(), o = j(), h = () => I.isMobile(), [v, b] = O(null), R = () => v() ?? r.sidebarWidth(), D = () => e.sidebarResizable ?? !0, a = () => (e.enableDragDrop ?? !0) && !!o, s = () => e.instanceId ?? `filebrowser-${Math.random().toString(36).slice(2, 9)}`;
|
|
110
111
|
let C, w = null, x = null;
|
|
111
112
|
q(() => {
|
|
112
113
|
if (!o || !a()) return;
|
|
113
114
|
const t = {
|
|
114
|
-
instanceId:
|
|
115
|
+
instanceId: s(),
|
|
115
116
|
currentPath: r.currentPath,
|
|
116
117
|
files: r.files,
|
|
117
118
|
onDragMove: e.onDragMove,
|
|
@@ -122,38 +123,38 @@ function ie(e) {
|
|
|
122
123
|
};
|
|
123
124
|
o.registerInstance(t);
|
|
124
125
|
}), V(() => {
|
|
125
|
-
o && a() && o.unregisterInstance(
|
|
126
|
+
o && a() && o.unregisterInstance(s());
|
|
126
127
|
});
|
|
127
|
-
let
|
|
128
|
+
let M = !1, m = !1;
|
|
128
129
|
H(() => {
|
|
129
130
|
const t = h();
|
|
130
|
-
if (!
|
|
131
|
-
|
|
131
|
+
if (!M) {
|
|
132
|
+
M = !0, m = t, t && e.hideSidebarOnMobile !== !1 && !r.sidebarCollapsed() && r.toggleSidebar();
|
|
132
133
|
return;
|
|
133
134
|
}
|
|
134
135
|
!m && t && e.hideSidebarOnMobile !== !1 && !r.sidebarCollapsed() && r.toggleSidebar(), m = t;
|
|
135
136
|
});
|
|
136
137
|
const y = (t) => {
|
|
137
|
-
(t
|
|
138
|
+
Q(t) && t.key.toLowerCase() === "f" && (t.preventDefault(), r.setFilterActive(!0), G(() => C?.focus()));
|
|
138
139
|
}, P = () => !r.sidebarCollapsed() || !h(), $ = () => {
|
|
139
140
|
b(r.sidebarWidth());
|
|
140
141
|
}, W = (t) => {
|
|
141
|
-
b((
|
|
142
|
+
b((d) => r.clampSidebarWidth((d ?? r.sidebarWidth()) + t));
|
|
142
143
|
}, z = () => {
|
|
143
144
|
const t = v();
|
|
144
145
|
t !== null && (r.setSidebarWidth(t), b(null));
|
|
145
146
|
};
|
|
146
147
|
return (() => {
|
|
147
|
-
var t =
|
|
148
|
+
var t = ie(), d = t.firstChild, f = d.firstChild, g = f.firstChild, F = g.nextSibling, u = F.firstChild, A = u.firstChild, _ = u.nextSibling;
|
|
148
149
|
return t.$$keydown = y, i(t, n(c, {
|
|
149
150
|
get when() {
|
|
150
151
|
return e.header;
|
|
151
152
|
},
|
|
152
153
|
get children() {
|
|
153
|
-
var l =
|
|
154
|
+
var l = ne();
|
|
154
155
|
return i(l, () => e.header), l;
|
|
155
156
|
}
|
|
156
|
-
}),
|
|
157
|
+
}), d), i(d, n(X, {
|
|
157
158
|
title: "Explorer",
|
|
158
159
|
get width() {
|
|
159
160
|
return R();
|
|
@@ -178,16 +179,16 @@ function ie(e) {
|
|
|
178
179
|
},
|
|
179
180
|
bodyClass: "py-1",
|
|
180
181
|
get children() {
|
|
181
|
-
return n(
|
|
182
|
+
return n(Y, {
|
|
182
183
|
get instanceId() {
|
|
183
|
-
return
|
|
184
|
+
return s();
|
|
184
185
|
},
|
|
185
186
|
get enableDragDrop() {
|
|
186
187
|
return a();
|
|
187
188
|
}
|
|
188
189
|
});
|
|
189
190
|
}
|
|
190
|
-
}), f), i(f, n(
|
|
191
|
+
}), f), i(f, n(ee, {
|
|
191
192
|
filterInputRef: (l) => C = l,
|
|
192
193
|
get endActions() {
|
|
193
194
|
return e.toolbarEndActions;
|
|
@@ -199,9 +200,9 @@ function ie(e) {
|
|
|
199
200
|
return r.viewMode() === "list";
|
|
200
201
|
},
|
|
201
202
|
get fallback() {
|
|
202
|
-
return n(
|
|
203
|
+
return n(p, {
|
|
203
204
|
get instanceId() {
|
|
204
|
-
return
|
|
205
|
+
return s();
|
|
205
206
|
},
|
|
206
207
|
get enableDragDrop() {
|
|
207
208
|
return a();
|
|
@@ -209,9 +210,9 @@ function ie(e) {
|
|
|
209
210
|
});
|
|
210
211
|
},
|
|
211
212
|
get children() {
|
|
212
|
-
return n(
|
|
213
|
+
return n(Z, {
|
|
213
214
|
get instanceId() {
|
|
214
|
-
return
|
|
215
|
+
return s();
|
|
215
216
|
},
|
|
216
217
|
get enableDragDrop() {
|
|
217
218
|
return a();
|
|
@@ -232,7 +233,7 @@ function ie(e) {
|
|
|
232
233
|
get children() {
|
|
233
234
|
return [" · ", E(() => r.selectedItems().size), " selected"];
|
|
234
235
|
}
|
|
235
|
-
}), null), i(_, () => r.currentPath()), i(t, n(
|
|
236
|
+
}), null), i(_, () => r.currentPath()), i(t, n(te, {
|
|
236
237
|
get callbacks() {
|
|
237
238
|
return e.contextMenuCallbacks;
|
|
238
239
|
},
|
|
@@ -250,12 +251,12 @@ function ie(e) {
|
|
|
250
251
|
return a();
|
|
251
252
|
},
|
|
252
253
|
get children() {
|
|
253
|
-
return n(
|
|
254
|
+
return n(re, {});
|
|
254
255
|
}
|
|
255
|
-
}), null), B(() =>
|
|
256
|
+
}), null), B(() => L(t, N("flex flex-col h-full min-h-0 bg-background", "border border-border rounded-lg overflow-hidden", "shadow-sm", e.class))), t;
|
|
256
257
|
})();
|
|
257
258
|
}
|
|
258
|
-
|
|
259
|
+
K(["keydown"]);
|
|
259
260
|
export {
|
|
260
|
-
|
|
261
|
+
Me as FileBrowser
|
|
261
262
|
};
|