@floegence/floe-webapp-core 0.35.48 → 0.35.50

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 { use as ee, insert as f, createComponent as u, effect as k, className as V, setStyleProperty as E, addEventListener as ie, style as be, template as D, spread as Se, mergeProps as Ce, memo as se, delegateEvents as Me } from "solid-js/web";
2
- import { createMemo as te, createEffect as De, onCleanup as de, createSignal as ce, Show as P, For as me, untrack as Ie } from "solid-js";
3
- import { cn as L } from "../../utils/cn.js";
1
+ import { use as ee, insert as f, createComponent as m, effect as p, className as N, setStyleProperty as L, addEventListener as ie, style as Ce, template as z, spread as be, mergeProps as Me, memo as ce, delegateEvents as De } from "solid-js/web";
2
+ import { createMemo as te, createEffect as Ie, onCleanup as de, createSignal as ue, Show as P, For as me, untrack as $e } from "solid-js";
3
+ import { cn as E } from "../../utils/cn.js";
4
4
  import { useMediaQuery as re } from "../../hooks/useMediaQuery.js";
5
- import { useResizeObserver as $e } from "../../hooks/useResizeObserver.js";
6
- import { useVirtualWindow as ye } from "../../hooks/useVirtualWindow.js";
7
- import { useFileBrowser as ue } from "./FileBrowserContext.js";
8
- import { useFileBrowserDrag as ze } from "../../context/FileBrowserDragContext.js";
9
- import { FileItemIcon as _e } from "./FileIcons.js";
10
- import { ChevronDown as Pe } from "../icons/index.js";
11
- import { createLongPressContextMenuHandlers as Re } from "./longPressContextMenu.js";
5
+ import { useResizeObserver as _e } from "../../hooks/useResizeObserver.js";
6
+ import { useVirtualWindow as ze } from "../../hooks/useVirtualWindow.js";
7
+ import { useFileBrowser as fe } from "./FileBrowserContext.js";
8
+ import { useFileBrowserDrag as ye } from "../../context/FileBrowserDragContext.js";
9
+ import { FileItemIcon as Pe } from "./FileIcons.js";
10
+ import { ChevronDown as Re } from "../icons/index.js";
11
+ import { createLongPressContextMenuHandlers as Te } from "./longPressContextMenu.js";
12
12
  import { ResizeHandle as oe } from "../layout/ResizeHandle.js";
13
- import { fileBrowserTouchTargetAttrs as pe } from "./touchInteractionGuard.js";
14
- import { createItemContextMenuEvent as Te } from "./contextMenuEvent.js";
15
- import { createFileBrowserMarqueeSelection as Fe } from "./useFileBrowserMarqueeSelection.js";
13
+ import { fileBrowserTouchTargetAttrs as Fe } from "./touchInteractionGuard.js";
14
+ import { createItemContextMenuEvent as ke } from "./contextMenuEvent.js";
15
+ import { createFileBrowserMarqueeSelection as pe, FILE_BROWSER_MARQUEE_OVERLAY_CLASS as Ae } from "./useFileBrowserMarqueeSelection.js";
16
16
  import { isPrimaryModKeyPressed as ae } from "../../utils/keybind.js";
17
- var ke = /* @__PURE__ */ D("<span class=truncate>"), Ae = /* @__PURE__ */ D('<mark class="bg-warning/40 text-inherit rounded-sm">'), Le = /* @__PURE__ */ D("<span>"), Ee = /* @__PURE__ */ D('<div><button type=button class="group w-full flex items-center justify-start text-left px-3 py-2 cursor-pointer hover:bg-muted/50 transition-colors">Modified'), We = /* @__PURE__ */ D('<div class=shrink-0><button type=button class="group w-full flex items-center justify-start text-left px-3 py-2 cursor-pointer hover:bg-muted/50 transition-colors">Size'), He = /* @__PURE__ */ D("<div>"), qe = /* @__PURE__ */ D('<div><div class="flex items-center border-b border-border text-[11px] text-muted-foreground font-medium"><div><button type=button class="group w-full flex items-center min-w-0 px-3 py-2 cursor-pointer hover:bg-muted/50 transition-colors"><span class="flex items-center gap-2 min-w-0"><span class="flex-shrink-0 w-4 h-4"aria-hidden=true></span><span class="flex items-center min-w-0"><span class=truncate>Name</span></span></span></button></div></div><div class="relative flex-1 min-h-0 overflow-auto">'), Be = /* @__PURE__ */ D('<span>No files matching "<!>"'), Ne = /* @__PURE__ */ D('<button type=button class="px-2 py-1 rounded bg-muted hover:bg-muted/80 transition-colors">Clear Filter'), Oe = /* @__PURE__ */ D('<div class="flex flex-col items-center justify-center h-32 gap-2 text-xs text-muted-foreground">'), Xe = /* @__PURE__ */ D("<span>This folder is empty"), Ge = /* @__PURE__ */ D('<div class="pointer-events-none fixed z-40 rounded-md border border-primary/60 bg-primary/15 shadow-sm shadow-primary/10">'), le = /* @__PURE__ */ D('<div class="shrink-0 px-3 py-1.5 text-left text-muted-foreground truncate">'), Ye = /* @__PURE__ */ D('<button type=button><div class="flex items-center gap-2 flex-1 min-w-0 px-3 py-1.5"><span class="flex-shrink-0 w-4 h-4">');
17
+ var Ee = /* @__PURE__ */ z("<span class=truncate>"), Le = /* @__PURE__ */ z('<mark class="bg-warning/40 text-inherit rounded-sm">'), We = /* @__PURE__ */ z("<span>"), He = /* @__PURE__ */ z('<div><button type=button class="group w-full flex items-center justify-start text-left px-3 py-2 cursor-pointer hover:bg-muted/50 transition-colors">Modified'), Be = /* @__PURE__ */ z('<div class=shrink-0><button type=button class="group w-full flex items-center justify-start text-left px-3 py-2 cursor-pointer hover:bg-muted/50 transition-colors">Size'), le = /* @__PURE__ */ z("<div>"), qe = /* @__PURE__ */ z('<div><div class="flex items-center border-b border-border text-[11px] text-muted-foreground font-medium"><div><button type=button class="group w-full flex items-center min-w-0 px-3 py-2 cursor-pointer hover:bg-muted/50 transition-colors"><span class="flex items-center gap-2 min-w-0"><span class="flex-shrink-0 w-4 h-4"aria-hidden=true></span><span class="flex items-center min-w-0"><span class=truncate>Name</span></span></span></button></div></div><div class="relative flex-1 min-h-0 overflow-auto">'), Ne = /* @__PURE__ */ z('<span>No files matching "<!>"'), Oe = /* @__PURE__ */ z('<button type=button class="px-2 py-1 rounded bg-muted hover:bg-muted/80 transition-colors">Clear Filter'), Xe = /* @__PURE__ */ z('<div class="flex flex-col items-center justify-center h-32 gap-2 text-xs text-muted-foreground">'), Ye = /* @__PURE__ */ z("<span>This folder is empty"), se = /* @__PURE__ */ z('<div class="shrink-0 px-3 py-1.5 text-left text-muted-foreground truncate">'), Ge = /* @__PURE__ */ z('<button type=button><div class="flex items-center gap-2 flex-1 min-w-0 px-3 py-1.5"><span class="flex-shrink-0 w-4 h-4">');
18
18
  function Ve(t) {
19
19
  const o = te(() => {
20
20
  if (!t.match || t.match.matchedIndices.length === 0)
@@ -22,81 +22,81 @@ function Ve(t) {
22
22
  text: t.name,
23
23
  highlight: !1
24
24
  }];
25
- const I = [], R = new Set(t.match.matchedIndices);
26
- let $ = "", S = !1;
25
+ const D = [], R = new Set(t.match.matchedIndices);
26
+ let I = "", C = !1;
27
27
  for (let g = 0; g < t.name.length; g++) {
28
- const y = R.has(g);
29
- g === 0 ? (S = y, $ = t.name[g]) : y === S ? $ += t.name[g] : (I.push({
30
- text: $,
31
- highlight: S
32
- }), $ = t.name[g], S = y);
28
+ const $ = R.has(g);
29
+ g === 0 ? (C = $, I = t.name[g]) : $ === C ? I += t.name[g] : (D.push({
30
+ text: I,
31
+ highlight: C
32
+ }), I = t.name[g], C = $);
33
33
  }
34
- return $ && I.push({
35
- text: $,
36
- highlight: S
37
- }), I;
34
+ return I && D.push({
35
+ text: I,
36
+ highlight: C
37
+ }), D;
38
38
  });
39
39
  return (() => {
40
- var I = ke();
41
- return f(I, u(me, {
40
+ var D = Ee();
41
+ return f(D, m(me, {
42
42
  get each() {
43
43
  return o();
44
44
  },
45
- children: (R) => u(P, {
45
+ children: (R) => m(P, {
46
46
  get when() {
47
47
  return R.highlight;
48
48
  },
49
49
  get fallback() {
50
- return se(() => R.text);
50
+ return ce(() => R.text);
51
51
  },
52
52
  get children() {
53
- var $ = Ae();
54
- return f($, () => R.text), $;
53
+ var I = Le();
54
+ return f(I, () => R.text), I;
55
55
  }
56
56
  })
57
- })), I;
57
+ })), D;
58
58
  })();
59
59
  }
60
- function mt(t) {
61
- const o = ue(), I = ze(), R = () => (t.enableDragDrop ?? !0) && !!I, $ = () => t.instanceId ?? "default", S = 32, g = ye({
60
+ function ut(t) {
61
+ const o = fe(), D = ye(), R = () => (t.enableDragDrop ?? !0) && !!D, I = () => t.instanceId ?? "default", C = 32, g = ze({
62
62
  count: () => o.currentFiles().length,
63
- itemSize: () => S,
63
+ itemSize: () => C,
64
64
  overscan: 12
65
- }), y = te(() => {
65
+ }), $ = te(() => {
66
66
  const {
67
67
  start: n,
68
68
  end: i
69
69
  } = g.range();
70
70
  return o.currentFiles().slice(n, i);
71
- }), p = /* @__PURE__ */ new Map();
72
- let z = null, x = 0;
71
+ }), T = /* @__PURE__ */ new Map();
72
+ let _ = null, x = 0;
73
73
  const U = (n, i) => {
74
74
  if (i) {
75
- p.set(n, i);
75
+ T.set(n, i);
76
76
  return;
77
77
  }
78
- p.delete(n);
78
+ T.delete(n);
79
79
  }, Q = (n) => {
80
- if (!z) return;
81
- const i = n * S, l = i + S, d = z.scrollTop, h = d + z.clientHeight;
82
- if (i < d) {
83
- z.scrollTop = i, g.onScroll();
80
+ if (!_) return;
81
+ const i = n * C, l = i + C, c = _.scrollTop, h = c + _.clientHeight;
82
+ if (i < c) {
83
+ _.scrollTop = i, g.onScroll();
84
84
  return;
85
85
  }
86
- l > h && (z.scrollTop = Math.max(0, l - z.clientHeight), g.onScroll());
86
+ l > h && (_.scrollTop = Math.max(0, l - _.clientHeight), g.onScroll());
87
87
  };
88
- De(() => {
88
+ Ie(() => {
89
89
  const n = o.revealRequest(), i = o.currentFiles();
90
- if (y(), !n) return;
90
+ if ($(), !n) return;
91
91
  const l = i.findIndex((v) => v.id === n.targetId);
92
92
  if (l < 0) return;
93
- if (!p.get(n.targetId)) {
93
+ if (!T.get(n.targetId)) {
94
94
  Q(l);
95
95
  return;
96
96
  }
97
97
  typeof cancelAnimationFrame == "function" && x && (cancelAnimationFrame(x), x = 0);
98
98
  const h = () => {
99
- o.revealRequest()?.requestId === n.requestId && (p.get(n.targetId)?.scrollIntoView({
99
+ o.revealRequest()?.requestId === n.requestId && (T.get(n.targetId)?.scrollIntoView({
100
100
  block: "nearest",
101
101
  inline: "nearest"
102
102
  }), o.selectItem(n.targetId, !1), o.consumeRevealRequest(n.requestId));
@@ -111,35 +111,36 @@ function mt(t) {
111
111
  }), de(() => {
112
112
  typeof cancelAnimationFrame == "function" && x && cancelAnimationFrame(x);
113
113
  });
114
- const F = (n) => {
114
+ const k = (n) => {
115
115
  const i = o.sortConfig();
116
116
  o.setSortConfig({
117
117
  field: n,
118
118
  direction: i.field === n && i.direction === "asc" ? "desc" : "asc"
119
119
  });
120
- }, j = (n) => n === void 0 ? "-" : n < 1024 ? `${n} B` : n < 1024 * 1024 ? `${(n / 1024).toFixed(1)} KB` : `${(n / (1024 * 1024)).toFixed(1)} MB`, N = (n) => n ? n.toLocaleDateString("en-US", {
120
+ }, j = (n) => n === void 0 ? "-" : n < 1024 ? `${n} B` : n < 1024 * 1024 ? `${(n / 1024).toFixed(1)} KB` : `${(n / (1024 * 1024)).toFixed(1)} MB`, O = (n) => n ? n.toLocaleDateString("en-US", {
121
121
  month: "short",
122
122
  day: "numeric",
123
123
  year: "numeric"
124
- }) : "-", _ = Fe({
125
- getContainer: () => z,
124
+ }) : "-", y = pe({
125
+ getContainer: () => _,
126
+ getOverlayHost: () => _,
126
127
  getVisibleItemIdsInOrder: () => o.currentFiles().map((n) => n.id),
127
- getElementForId: (n) => p.get(n) ?? null,
128
+ getElementForId: (n) => T.get(n) ?? null,
128
129
  getSelectedIds: () => [...o.selectedItems()],
129
130
  replaceSelection: (n, i) => o.replaceSelection(n, i),
130
131
  clearSelection: o.clearSelection
131
132
  }), W = (n) => {
132
133
  const i = () => o.sortConfig(), l = () => i().field === n.field;
133
134
  return (() => {
134
- var d = Le();
135
- return f(d, u(Pe, {
135
+ var c = We();
136
+ return f(c, m(Re, {
136
137
  get class() {
137
- return L("w-3 h-3 transition-transform duration-150", l() && i().direction === "asc" && "rotate-180");
138
+ return E("w-3 h-3 transition-transform duration-150", l() && i().direction === "asc" && "rotate-180");
138
139
  }
139
- })), k(() => V(d, L("ml-1 transition-all duration-150", l() ? "opacity-100" : "opacity-0 group-hover:opacity-40"))), d;
140
+ })), p(() => N(c, E("ml-1 transition-all duration-150", l() ? "opacity-100" : "opacity-0 group-hover:opacity-40"))), c;
140
141
  })();
141
- }, H = re("(min-width: 640px)"), O = re("(min-width: 768px)"), [K, X] = ce(null), J = $e(K), A = (n, i, l) => Math.max(i, Math.min(l, n)), b = te(() => {
142
- const n = J()?.width ?? 0, i = H(), l = O(), d = o.listColumnRatios(), h = 160, v = 120, C = 80, M = 128, a = 96;
142
+ }, H = re("(min-width: 640px)"), X = re("(min-width: 768px)"), [K, Y] = ue(null), J = _e(K), A = (n, i, l) => Math.max(i, Math.min(l, n)), S = te(() => {
143
+ const n = J()?.width ?? 0, i = H(), l = X(), c = o.listColumnRatios(), h = 160, v = 120, b = 80, M = 128, a = 96;
143
144
  if (!i || n <= 0)
144
145
  return {
145
146
  width: n,
@@ -147,70 +148,70 @@ function mt(t) {
147
148
  showSize: l,
148
149
  minName: h,
149
150
  minModified: v,
150
- minSize: C,
151
+ minSize: b,
151
152
  modifiedWidth: M,
152
153
  sizeWidth: a
153
154
  };
154
155
  if (!l) {
155
- const m = d.size, c = Math.max(0, 1 - m);
156
- let w = (c > 0 ? d.modifiedAt / c : d.modifiedAt) * n;
156
+ const u = c.size, d = Math.max(0, 1 - u);
157
+ let w = (d > 0 ? c.modifiedAt / d : c.modifiedAt) * n;
157
158
  return w = A(w, v, Math.max(v, n - h)), {
158
159
  width: n,
159
160
  showModified: i,
160
161
  showSize: l,
161
162
  minName: h,
162
163
  minModified: v,
163
- minSize: C,
164
+ minSize: b,
164
165
  modifiedWidth: w,
165
166
  sizeWidth: 0
166
167
  };
167
168
  }
168
- let r = Math.max(v, d.modifiedAt * n), e = Math.max(C, d.size * n);
169
+ let r = Math.max(v, c.modifiedAt * n), e = Math.max(b, c.size * n);
169
170
  const s = Math.max(0, n - h);
170
171
  if (r + e > s) {
171
- const m = r + e - s, c = Math.max(0, r - v), w = Math.max(0, e - C), T = c + w;
172
- T > 0 && (r -= m * (c / T), e -= m * (w / T));
172
+ const u = r + e - s, d = Math.max(0, r - v), w = Math.max(0, e - b), F = d + w;
173
+ F > 0 && (r -= u * (d / F), e -= u * (w / F));
173
174
  }
174
- return r = Math.max(v, r), e = Math.max(C, e), {
175
+ return r = Math.max(v, r), e = Math.max(b, e), {
175
176
  width: n,
176
177
  showModified: i,
177
178
  showSize: l,
178
179
  minName: h,
179
180
  minModified: v,
180
- minSize: C,
181
+ minSize: b,
181
182
  modifiedWidth: r,
182
183
  sizeWidth: e
183
184
  };
184
- }), q = () => b().modifiedWidth, B = () => b().sizeWidth, G = (n) => {
185
- const i = b();
185
+ }), B = () => S().modifiedWidth, q = () => S().sizeWidth, G = (n) => {
186
+ const i = S();
186
187
  if (!i.showModified || i.width <= 0) return;
187
188
  if (!i.showSize) {
188
- const m = o.listColumnRatios().size, c = Math.max(0, 1 - m);
189
- if (c <= 0) return;
190
- const w = i.width, T = i.modifiedWidth, ne = Math.max(0, w - T), fe = i.minName - ne, ge = T - i.minModified, Z = A(n, fe, ge);
189
+ const u = o.listColumnRatios().size, d = Math.max(0, 1 - u);
190
+ if (d <= 0) return;
191
+ const w = i.width, F = i.modifiedWidth, ne = Math.max(0, w - F), ge = i.minName - ne, he = F - i.minModified, Z = A(n, ge, he);
191
192
  if (Z === 0) return;
192
- const he = ne + Z, xe = T - Z, ve = he / w * c, we = xe / w * c;
193
+ const xe = ne + Z, ve = F - Z, we = xe / w * d, Se = ve / w * d;
193
194
  o.setListColumnRatios({
194
- name: ve,
195
- modifiedAt: we,
196
- size: m
195
+ name: we,
196
+ modifiedAt: Se,
197
+ size: u
197
198
  });
198
199
  return;
199
200
  }
200
- const l = i.width, d = i.modifiedWidth, h = i.sizeWidth, v = Math.max(0, l - d - h), C = i.minName - v, M = d - i.minModified, a = A(n, C, M);
201
+ const l = i.width, c = i.modifiedWidth, h = i.sizeWidth, v = Math.max(0, l - c - h), b = i.minName - v, M = c - i.minModified, a = A(n, b, M);
201
202
  if (a === 0) return;
202
- const r = v + a, e = d - a;
203
+ const r = v + a, e = c - a;
203
204
  o.setListColumnRatios({
204
205
  name: r / l,
205
206
  modifiedAt: e / l,
206
207
  size: h / l
207
208
  });
208
- }, Y = (n) => {
209
- const i = b();
209
+ }, V = (n) => {
210
+ const i = S();
210
211
  if (!i.showSize || i.width <= 0) return;
211
- const l = i.width, d = i.modifiedWidth, h = i.sizeWidth, v = i.minModified - d, C = h - i.minSize, M = A(n, v, C);
212
+ const l = i.width, c = i.modifiedWidth, h = i.sizeWidth, v = i.minModified - c, b = h - i.minSize, M = A(n, v, b);
212
213
  if (M === 0) return;
213
- const a = d + M, r = h - M, e = Math.max(0, l - a - r);
214
+ const a = c + M, r = h - M, e = Math.max(0, l - a - r);
214
215
  o.setListColumnRatios({
215
216
  name: e / l,
216
217
  modifiedAt: a / l,
@@ -218,79 +219,79 @@ function mt(t) {
218
219
  });
219
220
  };
220
221
  return (() => {
221
- var n = qe(), i = n.firstChild, l = i.firstChild, d = l.firstChild, h = d.firstChild, v = h.firstChild, C = v.nextSibling;
222
- C.firstChild;
222
+ var n = qe(), i = n.firstChild, l = i.firstChild, c = l.firstChild, h = c.firstChild, v = h.firstChild, b = v.nextSibling;
223
+ b.firstChild;
223
224
  var M = i.nextSibling;
224
- return ee(X, i), d.$$click = () => F("name"), f(C, u(W, {
225
+ return ee(Y, i), c.$$click = () => k("name"), f(b, m(W, {
225
226
  field: "name"
226
- }), null), f(l, u(P, {
227
+ }), null), f(l, m(P, {
227
228
  get when() {
228
- return b().showModified;
229
+ return S().showModified;
229
230
  },
230
231
  get children() {
231
- return u(oe, {
232
+ return m(oe, {
232
233
  direction: "horizontal",
233
234
  onResize: G
234
235
  });
235
236
  }
236
- }), null), f(i, u(P, {
237
+ }), null), f(i, m(P, {
237
238
  get when() {
238
- return b().showModified;
239
+ return S().showModified;
239
240
  },
240
241
  get children() {
241
- var a = Ee(), r = a.firstChild;
242
- return r.firstChild, r.$$click = () => F("modifiedAt"), f(r, u(W, {
242
+ var a = He(), r = a.firstChild;
243
+ return r.firstChild, r.$$click = () => k("modifiedAt"), f(r, m(W, {
243
244
  field: "modifiedAt"
244
- }), null), f(a, u(P, {
245
+ }), null), f(a, m(P, {
245
246
  get when() {
246
- return b().showSize;
247
+ return S().showSize;
247
248
  },
248
249
  get children() {
249
- return u(oe, {
250
+ return m(oe, {
250
251
  direction: "horizontal",
251
- onResize: Y
252
+ onResize: V
252
253
  });
253
254
  }
254
- }), null), k((e) => {
255
- var s = L("relative shrink-0", b().showSize && "border-r border-border"), m = `${q()}px`;
256
- return s !== e.e && V(a, e.e = s), m !== e.t && E(a, "width", e.t = m), e;
255
+ }), null), p((e) => {
256
+ var s = E("relative shrink-0", S().showSize && "border-r border-border"), u = `${B()}px`;
257
+ return s !== e.e && N(a, e.e = s), u !== e.t && L(a, "width", e.t = u), e;
257
258
  }, {
258
259
  e: void 0,
259
260
  t: void 0
260
261
  }), a;
261
262
  }
262
- }), null), f(i, u(P, {
263
+ }), null), f(i, m(P, {
263
264
  get when() {
264
- return b().showSize;
265
+ return S().showSize;
265
266
  },
266
267
  get children() {
267
- var a = We(), r = a.firstChild;
268
- return r.firstChild, r.$$click = () => F("size"), f(r, u(W, {
268
+ var a = Be(), r = a.firstChild;
269
+ return r.firstChild, r.$$click = () => k("size"), f(r, m(W, {
269
270
  field: "size"
270
- }), null), k((e) => E(a, "width", `${B()}px`)), a;
271
+ }), null), p((e) => L(a, "width", `${q()}px`)), a;
271
272
  }
272
- }), null), ie(M, "pointerdown", _.onPointerDown, !0), ie(M, "scroll", g.onScroll), ee((a) => {
273
- z = a, g.scrollRef(a), o.setScrollContainer(a);
274
- }, M), f(M, u(P, {
273
+ }), null), ie(M, "pointerdown", y.onPointerDown, !0), ie(M, "scroll", g.onScroll), ee((a) => {
274
+ _ = a, g.scrollRef(a), o.setScrollContainer(a);
275
+ }, M), f(M, m(P, {
275
276
  get when() {
276
277
  return o.currentFiles().length > 0;
277
278
  },
278
279
  get fallback() {
279
280
  return (() => {
280
- var a = Oe();
281
- return f(a, u(P, {
281
+ var a = Xe();
282
+ return f(a, m(P, {
282
283
  get when() {
283
284
  return o.filterQueryApplied().trim();
284
285
  },
285
286
  get fallback() {
286
- return Xe();
287
+ return Ye();
287
288
  },
288
289
  get children() {
289
290
  return [(() => {
290
- var r = Be(), e = r.firstChild, s = e.nextSibling;
291
+ var r = Ne(), e = r.firstChild, s = e.nextSibling;
291
292
  return s.nextSibling, f(r, () => o.filterQueryApplied(), s), r;
292
293
  })(), (() => {
293
- var r = Ne();
294
+ var r = Oe();
294
295
  return r.$$click = () => o.setFilterQuery(""), r;
295
296
  })()];
296
297
  }
@@ -298,55 +299,55 @@ function mt(t) {
298
299
  })();
299
300
  },
300
301
  get children() {
301
- var a = He();
302
- return f(a, u(me, {
302
+ var a = le();
303
+ return f(a, m(me, {
303
304
  get each() {
304
- return y();
305
+ return $();
305
306
  },
306
- children: (r) => u(Ue, {
307
+ children: (r) => m(Ue, {
307
308
  item: r,
308
309
  formatSize: j,
309
- formatDate: N,
310
+ formatDate: O,
310
311
  get showModified() {
311
- return b().showModified;
312
+ return S().showModified;
312
313
  },
313
314
  get showSize() {
314
- return b().showSize;
315
+ return S().showSize;
315
316
  },
316
317
  get modifiedWidthPx() {
317
- return q();
318
+ return B();
318
319
  },
319
320
  get sizeWidthPx() {
320
- return B();
321
+ return q();
321
322
  },
322
323
  get instanceId() {
323
- return $();
324
+ return I();
324
325
  },
325
326
  get enableDragDrop() {
326
327
  return R();
327
328
  },
328
- dragContext: I,
329
+ dragContext: D,
329
330
  registerRow: U
330
331
  })
331
- })), k((r) => {
332
+ })), p((r) => {
332
333
  var e = `${g.paddingTop()}px`, s = `${g.paddingBottom()}px`;
333
- return e !== r.e && E(a, "padding-top", r.e = e), s !== r.t && E(a, "padding-bottom", r.t = s), r;
334
+ return e !== r.e && L(a, "padding-top", r.e = e), s !== r.t && L(a, "padding-bottom", r.t = s), r;
334
335
  }, {
335
336
  e: void 0,
336
337
  t: void 0
337
338
  }), a;
338
339
  }
339
- }), null), f(M, u(P, {
340
+ }), null), f(M, m(P, {
340
341
  get when() {
341
- return _.overlayStyle();
342
+ return y.overlayStyle();
342
343
  },
343
344
  children: (a) => (() => {
344
- var r = Ge();
345
- return k((e) => be(r, a(), e)), r;
345
+ var r = le();
346
+ return N(r, Ae), p((e) => Ce(r, a(), e)), r;
346
347
  })()
347
- }), null), k((a) => {
348
- var r = L("flex flex-col h-full min-h-0", t.class), e = L("relative flex-1 min-w-0", b().showModified && "border-r border-border");
349
- return r !== a.e && V(n, a.e = r), e !== a.t && V(l, a.t = e), a;
348
+ }), null), p((a) => {
349
+ var r = E("flex flex-col h-full min-h-0", t.class), e = E("relative flex-1 min-w-0", S().showModified && "border-r border-border");
350
+ return r !== a.e && N(n, a.e = r), e !== a.t && N(l, a.t = e), a;
350
351
  }, {
351
352
  e: void 0,
352
353
  t: void 0
@@ -354,13 +355,13 @@ function mt(t) {
354
355
  })();
355
356
  }
356
357
  function Ue(t) {
357
- const o = ue(), I = () => o.isSelected(t.item.id), R = () => o.getFilterMatchForId(t.item.id), $ = Ie(() => t.item), S = Re(o, $, {
358
+ const o = fe(), D = () => o.isSelected(t.item.id), R = () => o.getFilterMatchForId(t.item.id), I = $e(() => t.item), C = Te(o, I, {
358
359
  source: "list"
359
360
  });
360
- let g, y = null, p = 0, z = 0, x = !1;
361
+ let g, $ = null, T = 0, _ = 0, x = !1;
361
362
  const U = 5, Q = 500;
362
- let F = null;
363
- const [j, N] = ce(!1), _ = () => g === "touch" || g === "pen", W = () => t.item.type === "folder", H = () => W() && t.enableDragDrop && t.dragContext, O = () => {
363
+ let k = null;
364
+ const [j, O] = ue(!1), y = () => g === "touch" || g === "pen", W = () => t.item.type === "folder", H = () => W() && t.enableDragDrop && t.dragContext, X = () => {
364
365
  if (!H() || !t.dragContext) return !1;
365
366
  const e = t.dragContext.dragState();
366
367
  return e.isDragging ? t.dragContext.canDropOn(e.draggedItems, t.item.path, t.item, t.instanceId) : !1;
@@ -368,64 +369,64 @@ function Ue(t) {
368
369
  if (!t.dragContext) return !1;
369
370
  const e = t.dragContext.dragState();
370
371
  return e.isDragging ? e.draggedItems.some((s) => s.item.id === t.item.id) : !1;
371
- }, X = () => {
372
- F !== null && (clearTimeout(F), F = null);
372
+ }, Y = () => {
373
+ k !== null && (clearTimeout(k), k = null);
373
374
  }, J = () => {
374
- typeof document > "u" || (document.removeEventListener("pointermove", B, !0), document.removeEventListener("pointerup", G, !0), document.removeEventListener("pointercancel", Y, !0));
375
+ typeof document > "u" || (document.removeEventListener("pointermove", q, !0), document.removeEventListener("pointerup", G, !0), document.removeEventListener("pointercancel", V, !0));
375
376
  }, A = () => {
376
- typeof document > "u" || (document.addEventListener("pointermove", B, !0), document.addEventListener("pointerup", G, !0), document.addEventListener("pointercancel", Y, !0));
377
- }, b = (e) => {
378
- X(), J(), x && t.dragContext && t.dragContext.endDrag(e), y = null, x = !1;
377
+ typeof document > "u" || (document.addEventListener("pointermove", q, !0), document.addEventListener("pointerup", G, !0), document.addEventListener("pointercancel", V, !0));
378
+ }, S = (e) => {
379
+ Y(), J(), x && t.dragContext && t.dragContext.endDrag(e), $ = null, x = !1;
379
380
  };
380
381
  de(() => {
381
- t.registerRow(t.item.id, null), b(!1);
382
+ t.registerRow(t.item.id, null), S(!1);
382
383
  });
383
- const q = (e, s) => {
384
+ const B = (e, s) => {
384
385
  if (!t.enableDragDrop || !t.dragContext || x) return;
385
- x = !0, I() || o.selectItem(t.item.id, !1);
386
- const m = o.getSelectedItemsList(), w = (m.length > 0 && I() ? m : [t.item]).map((T) => ({
387
- item: T,
386
+ x = !0, D() || o.selectItem(t.item.id, !1);
387
+ const u = o.getSelectedItemsList(), w = (u.length > 0 && D() ? u : [t.item]).map((F) => ({
388
+ item: F,
388
389
  sourceInstanceId: t.instanceId,
389
390
  sourcePath: o.currentPath()
390
391
  }));
391
- if (_() && "vibrate" in navigator)
392
+ if (y() && "vibrate" in navigator)
392
393
  try {
393
394
  navigator.vibrate(50);
394
395
  } catch {
395
396
  }
396
397
  t.dragContext.startDrag(w, e, s);
397
- }, B = (e) => {
398
- if (y !== e.pointerId) return;
399
- const s = e.clientX - p, m = e.clientY - z, c = Math.sqrt(s * s + m * m);
400
- if (_() && !x && c > 10) {
401
- b(!1);
398
+ }, q = (e) => {
399
+ if ($ !== e.pointerId) return;
400
+ const s = e.clientX - T, u = e.clientY - _, d = Math.sqrt(s * s + u * u);
401
+ if (y() && !x && d > 10) {
402
+ S(!1);
402
403
  return;
403
404
  }
404
- !_() && !x && c > U && q(e.clientX, e.clientY), x && t.dragContext && t.dragContext.updateDrag(e.clientX, e.clientY);
405
+ !y() && !x && d > U && B(e.clientX, e.clientY), x && t.dragContext && t.dragContext.updateDrag(e.clientX, e.clientY);
405
406
  }, G = (e) => {
406
- y === e.pointerId && (S.onPointerUp(), b(!0));
407
- }, Y = (e) => {
408
- y === e.pointerId && (S.onPointerCancel(), b(!1));
407
+ $ === e.pointerId && (C.onPointerUp(), S(!0));
408
+ }, V = (e) => {
409
+ $ === e.pointerId && (C.onPointerCancel(), S(!1));
409
410
  }, n = (e) => {
410
- g = e.pointerType, S.onPointerDown(e), !(e.pointerType === "mouse" && e.button !== 0) && (!t.enableDragDrop || !t.dragContext || (y = e.pointerId, p = e.clientX, z = e.clientY, x = !1, A(), _() && (X(), F = setTimeout(() => {
411
- y !== null && !x && q(p, z);
411
+ g = e.pointerType, C.onPointerDown(e), !(e.pointerType === "mouse" && e.button !== 0) && (!t.enableDragDrop || !t.dragContext || ($ = e.pointerId, T = e.clientX, _ = e.clientY, x = !1, A(), y() && (Y(), k = setTimeout(() => {
412
+ $ !== null && !x && B(T, _);
412
413
  }, Q))));
413
414
  }, i = (e) => {
414
- g = e.pointerType, S.onPointerMove(e);
415
+ g = e.pointerType, C.onPointerMove(e);
415
416
  }, l = (e) => {
416
417
  if (!H() || !t.dragContext) return;
417
418
  const s = t.dragContext.dragState();
418
419
  if (!s.isDragging) return;
419
- N(!0);
420
- const m = t.dragContext.canDropOn(s.draggedItems, t.item.path, t.item, t.instanceId), w = e.currentTarget?.getBoundingClientRect() ?? null;
420
+ O(!0);
421
+ const u = t.dragContext.canDropOn(s.draggedItems, t.item.path, t.item, t.instanceId), w = e.currentTarget?.getBoundingClientRect() ?? null;
421
422
  t.dragContext.setDropTarget({
422
423
  instanceId: t.instanceId,
423
424
  targetPath: t.item.path,
424
425
  targetItem: t.item
425
- }, m, w);
426
- }, d = (e) => {
426
+ }, u, w);
427
+ }, c = (e) => {
427
428
  if (!t.dragContext) return;
428
- N(!1);
429
+ O(!1);
429
430
  const s = t.dragContext.dragState();
430
431
  s.isDragging && s.dropTarget?.targetPath === t.item.path && t.dragContext.setDropTarget(null, !1);
431
432
  }, h = (e) => {
@@ -433,8 +434,8 @@ function Ue(t) {
433
434
  x = !1;
434
435
  return;
435
436
  }
436
- if (!S.consumeClickSuppression(e)) {
437
- if (_()) {
437
+ if (!C.consumeClickSuppression(e)) {
438
+ if (y()) {
438
439
  o.openItem(t.item);
439
440
  return;
440
441
  }
@@ -445,87 +446,87 @@ function Ue(t) {
445
446
  o.selectItem(t.item.id, ae(e));
446
447
  }
447
448
  }, v = () => {
448
- _() || o.openItem(t.item);
449
- }, C = (e) => {
450
- if (e.preventDefault(), e.stopPropagation(), _()) return;
449
+ y() || o.openItem(t.item);
450
+ }, b = (e) => {
451
+ if (e.preventDefault(), e.stopPropagation(), y()) return;
451
452
  o.ensureContextMenuSelection(t.item.id);
452
- const s = o.getSelectedItemsList(), m = s.length > 0 ? s : [t.item];
453
- o.showContextMenu(Te({
453
+ const s = o.getSelectedItemsList(), u = s.length > 0 ? s : [t.item];
454
+ o.showContextMenu(ke({
454
455
  x: e.clientX,
455
456
  y: e.clientY,
456
457
  triggerItem: t.item,
457
- items: m,
458
+ items: u,
458
459
  source: "list"
459
460
  }));
460
461
  }, M = () => t.dragContext?.dragState(), a = () => M()?.isDragging ?? !1, r = () => j() && a() && H();
461
462
  return (() => {
462
- var e = Ye(), s = e.firstChild, m = s.firstChild;
463
- return ee((c) => {
464
- t.registerRow(t.item.id, c);
465
- }, e), Se(e, Ce({
463
+ var e = Ge(), s = e.firstChild, u = s.firstChild;
464
+ return ee((d) => {
465
+ t.registerRow(t.item.id, d);
466
+ }, e), be(e, Me({
466
467
  get "data-file-browser-item-id"() {
467
468
  return t.item.id;
468
469
  },
469
470
  get "data-file-browser-item-path"() {
470
471
  return t.item.path;
471
472
  }
472
- }, pe, {
473
+ }, Fe, {
473
474
  onClick: h,
474
475
  onDblClick: v,
475
- onContextMenu: C,
476
+ onContextMenu: b,
476
477
  onPointerDown: n,
477
478
  onPointerMove: i,
478
479
  onPointerEnter: l,
479
- onPointerLeave: d,
480
+ onPointerLeave: c,
480
481
  get class() {
481
- return L(
482
+ return E(
482
483
  "group w-full h-8 flex items-center text-xs cursor-pointer",
483
484
  "transition-all duration-150 ease-out",
484
485
  "hover:bg-accent/50",
485
486
  "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring",
486
- I() && "bg-accent text-accent-foreground",
487
+ D() && "bg-accent text-accent-foreground",
487
488
  // Drag state styling - being dragged items become translucent
488
489
  K() && "opacity-40 scale-[0.98]",
489
490
  // Drop target styling - enhanced visual feedback
490
- r() && O() && ["bg-primary/15 outline outline-2 outline-primary/60", "scale-[1.01] shadow-sm shadow-primary/10"],
491
- r() && !O() && ["bg-destructive/10 outline outline-2 outline-dashed outline-destructive/50"]
491
+ r() && X() && ["bg-primary/15 outline outline-2 outline-primary/60", "scale-[1.01] shadow-sm shadow-primary/10"],
492
+ r() && !X() && ["bg-destructive/10 outline outline-2 outline-dashed outline-destructive/50"]
492
493
  );
493
494
  }
494
- }), !1, !0), f(m, u(_e, {
495
+ }), !1, !0), f(u, m(Pe, {
495
496
  get item() {
496
497
  return t.item;
497
498
  },
498
499
  class: "w-4 h-4"
499
- })), f(s, u(Ve, {
500
+ })), f(s, m(Ve, {
500
501
  get name() {
501
502
  return t.item.name;
502
503
  },
503
504
  get match() {
504
505
  return R();
505
506
  }
506
- }), null), f(e, u(P, {
507
+ }), null), f(e, m(P, {
507
508
  get when() {
508
509
  return t.showModified;
509
510
  },
510
511
  get children() {
511
- var c = le();
512
- return f(c, () => t.formatDate(t.item.modifiedAt)), k((w) => E(c, "width", `${t.modifiedWidthPx}px`)), c;
512
+ var d = se();
513
+ return f(d, () => t.formatDate(t.item.modifiedAt)), p((w) => L(d, "width", `${t.modifiedWidthPx}px`)), d;
513
514
  }
514
- }), null), f(e, u(P, {
515
+ }), null), f(e, m(P, {
515
516
  get when() {
516
517
  return t.showSize;
517
518
  },
518
519
  get children() {
519
- var c = le();
520
- return f(c, (() => {
521
- var w = se(() => t.item.type === "folder");
520
+ var d = se();
521
+ return f(d, (() => {
522
+ var w = ce(() => t.item.type === "folder");
522
523
  return () => w() ? "-" : t.formatSize(t.item.size);
523
- })()), k((w) => E(c, "width", `${t.sizeWidthPx}px`)), c;
524
+ })()), p((w) => L(d, "width", `${t.sizeWidthPx}px`)), d;
524
525
  }
525
526
  }), null), e;
526
527
  })();
527
528
  }
528
- Me(["click", "pointerdown"]);
529
+ De(["click", "pointerdown"]);
529
530
  export {
530
- mt as FileListView
531
+ ut as FileListView
531
532
  };