@floegence/floe-webapp-core 0.35.47 → 0.35.49

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,21 @@
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";
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 { FileBrowserProvider as Q, useFileBrowser as J } from "./FileBrowserContext.js";
8
- import { SidebarPane as U } from "../layout/SidebarPane.js";
9
- import { DirectoryTree as X } from "./DirectoryTree.js";
10
- import { FileListView as Y } from "./FileListView.js";
11
- import { FileGridView as Z } from "./FileGridView.js";
12
- import { FileBrowserToolbar as p } from "./FileBrowserToolbar.js";
13
- import { FileContextMenu as ee } from "./FileContextMenu.js";
14
- import { FileBrowserDragPreview as te } from "./DragPreview.js";
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 we(e) {
17
- return n(Q, {
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(ie, {
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 ie(e) {
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)}`;
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: d(),
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(d());
126
+ o && a() && o.unregisterInstance(s());
126
127
  });
127
- let S = !1, m = !1;
128
+ let M = !1, m = !1;
128
129
  H(() => {
129
130
  const t = h();
130
- if (!S) {
131
- S = !0, m = t, t && e.hideSidebarOnMobile !== !1 && !r.sidebarCollapsed() && r.toggleSidebar();
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.metaKey || t.ctrlKey) && t.key.toLowerCase() === "f" && (t.preventDefault(), r.setFilterActive(!0), G(() => C?.focus()));
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((s) => r.clampSidebarWidth((s ?? r.sidebarWidth()) + t));
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 = ne(), s = t.firstChild, f = s.firstChild, g = f.firstChild, F = g.nextSibling, u = F.firstChild, A = u.firstChild, _ = u.nextSibling;
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 = re();
154
+ var l = ne();
154
155
  return i(l, () => e.header), l;
155
156
  }
156
- }), s), i(s, n(U, {
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(X, {
182
+ return n(Y, {
182
183
  get instanceId() {
183
- return d();
184
+ return s();
184
185
  },
185
186
  get enableDragDrop() {
186
187
  return a();
187
188
  }
188
189
  });
189
190
  }
190
- }), f), i(f, n(p, {
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(Z, {
203
+ return n(p, {
203
204
  get instanceId() {
204
- return d();
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(Y, {
213
+ return n(Z, {
213
214
  get instanceId() {
214
- return d();
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(ee, {
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(te, {});
254
+ return n(re, {});
254
255
  }
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;
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
- L(["keydown"]);
259
+ K(["keydown"]);
259
260
  export {
260
- we as FileBrowser
261
+ Me as FileBrowser
261
262
  };