@floegence/floe-webapp-core 0.8.5 → 0.8.7

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/index2.js CHANGED
@@ -11,7 +11,7 @@ import { BottomBar as D } from "./index6.js";
11
11
  import { MobileTabBar as L } from "./index7.js";
12
12
  import { ActivityBar as N } from "./index3.js";
13
13
  import { ResizeHandle as _ } from "./index8.js";
14
- import { resolveMobileTabActiveId as j, resolveMobileTabSelect as q } from "./index82.js";
14
+ import { resolveMobileTabActiveId as j, resolveMobileTabSelect as q } from "./index83.js";
15
15
  var y = /* @__PURE__ */ f('<div class="flex items-center gap-2">'), G = /* @__PURE__ */ f('<div class="absolute inset-0 z-40 bg-black/30 cursor-pointer">'), J = /* @__PURE__ */ f('<div><div class="h-full overflow-auto overscroll-contain">'), K = /* @__PURE__ */ f('<div class="relative shrink-0 border-t border-border bg-terminal-background overflow-hidden">'), U = /* @__PURE__ */ f('<div><div class="flex-1 min-h-0 flex overflow-hidden relative"><div class="flex-1 min-w-0 flex flex-col overflow-hidden"><main class="flex-1 min-h-0 overflow-auto overscroll-contain">');
16
16
  function de(l) {
17
17
  const r = R(), M = H(), d = P(M.config.layout.mobileQuery), [p, g] = F(!1), s = (() => {
package/dist/index29.js CHANGED
@@ -4,7 +4,7 @@ import { cn as m } from "./index69.js";
4
4
  import { Dialog as s } from "./index22.js";
5
5
  import { Button as o } from "./index20.js";
6
6
  import { deferNonBlocking as f } from "./index70.js";
7
- import { usePickerTree as P, PathInputBar as x, PickerBreadcrumb as C, PickerFolderTree as S, NewFolderSection as p } from "./index83.js";
7
+ import { usePickerTree as P, PathInputBar as x, PickerBreadcrumb as C, PickerFolderTree as S, NewFolderSection as p } from "./index82.js";
8
8
  var b = /* @__PURE__ */ i('<div class="flex flex-col gap-2 -mt-1">'), y = /* @__PURE__ */ i('<div class="flex items-center w-full gap-2"><span class="flex-1 text-[11px] text-muted-foreground truncate">');
9
9
  function T(t) {
10
10
  const e = P({
package/dist/index30.js CHANGED
@@ -6,7 +6,7 @@ import { Button as w } from "./index20.js";
6
6
  import { Input as K } from "./index21.js";
7
7
  import { getFileIcon as L } from "./index48.js";
8
8
  import { deferNonBlocking as O } from "./index70.js";
9
- import { usePickerTree as R, normalizePath as G, PathInputBar as M, PickerBreadcrumb as j, PickerFolderTree as q, NewFolderSection as A } from "./index83.js";
9
+ import { usePickerTree as R, normalizePath as G, PathInputBar as M, PickerBreadcrumb as j, PickerFolderTree as q, NewFolderSection as A } from "./index82.js";
10
10
  var H = /* @__PURE__ */ h('<div class="flex flex-col gap-2 -mt-1"><div class="flex border border-border rounded overflow-hidden"style=height:260px><div class="w-1/2 min-w-0 overflow-y-auto">'), J = /* @__PURE__ */ h('<div class="flex flex-col w-full gap-2"><div class="flex items-center gap-1.5"><label class="text-xs text-muted-foreground flex-shrink-0">File name:</label><div class=flex-1></div></div><div class="flex items-center gap-2"><span class="flex-1 text-[11px] text-muted-foreground truncate">'), Q = /* @__PURE__ */ h('<div class="flex items-center justify-center h-full text-xs text-muted-foreground">No files in this directory'), U = /* @__PURE__ */ h('<span class="ml-auto text-[10px] text-muted-foreground/60 flex-shrink-0">'), V = /* @__PURE__ */ h("<button type=button><span class=truncate>");
11
11
  function ae(e) {
12
12
  const [u, f] = $(e.initialFileName ?? ""), [S, s] = $(""), r = R({
package/dist/index43.js CHANGED
@@ -1,341 +1,353 @@
1
- import { delegateEvents as te, template as g, use as ie, insert as a, createComponent as c, effect as k, setStyleProperty as F, className as E, Dynamic as ne, memo as j } from "solid-js/web";
2
- import { createSignal as re, createMemo as O, Show as b, For as V, untrack as oe } from "solid-js";
3
- import { cn as N } from "./index69.js";
1
+ import { delegateEvents as ie, template as p, use as ne, insert as m, createComponent as c, effect as P, className as I, setStyleProperty as N, Dynamic as re, memo as O } from "solid-js/web";
2
+ import { createSignal as oe, createMemo as V, Show as C, For as X, untrack as se } from "solid-js";
3
+ import { cn as R } from "./index69.js";
4
4
  import { useMediaQuery as Q } from "./index63.js";
5
- import { useResizeObserver as se } from "./index65.js";
6
- import { useFileBrowser as X } from "./index41.js";
7
- import { FolderIcon as le, getFileIcon as de } from "./index48.js";
5
+ import { useResizeObserver as le } from "./index65.js";
6
+ import { useFileBrowser as Y } from "./index41.js";
7
+ import { FolderIcon as de, getFileIcon as ae } from "./index48.js";
8
8
  import { ChevronDown as ce } from "./index34.js";
9
- import { createLongPressContextMenuHandlers as ae } from "./index84.js";
10
- import { ResizeHandle as K } from "./index8.js";
11
- var me = /* @__PURE__ */ g("<span class=truncate>"), he = /* @__PURE__ */ g('<mark class="bg-warning/40 text-inherit rounded-sm">'), ue = /* @__PURE__ */ g("<span>"), fe = /* @__PURE__ */ g('<div class="relative shrink-0"><button type=button class="group w-full flex items-center px-3 py-2 cursor-pointer hover:bg-muted/50 transition-colors">Modified'), xe = /* @__PURE__ */ g('<div class=shrink-0><button type=button class="group w-full flex items-center px-3 py-2 text-right justify-end cursor-pointer hover:bg-muted/50 transition-colors">Size'), ge = /* @__PURE__ */ g('<div><div class="flex items-center border-b border-border text-[11px] text-muted-foreground font-medium"><div class="relative flex-1 min-w-0"><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">Name</button></div></div><div class="flex-1 min-h-0 overflow-auto">'), $e = /* @__PURE__ */ g('<span>No files matching "<!>"'), we = /* @__PURE__ */ g('<button type=button class="px-2 py-1 rounded bg-muted hover:bg-muted/80 transition-colors">Clear Filter'), ve = /* @__PURE__ */ g('<div class="flex flex-col items-center justify-center h-32 gap-2 text-xs text-muted-foreground">'), pe = /* @__PURE__ */ g("<span>This folder is empty"), ze = /* @__PURE__ */ g('<div class="shrink-0 px-3 py-1.5 text-muted-foreground truncate">'), Me = /* @__PURE__ */ g('<div class="shrink-0 px-3 py-1.5 text-right text-muted-foreground">'), _e = /* @__PURE__ */ g('<button type=button style=animation-fill-mode:backwards><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">');
12
- function ye(r) {
13
- const d = O(() => {
9
+ import { createLongPressContextMenuHandlers as me } from "./index84.js";
10
+ import { ResizeHandle as j } from "./index8.js";
11
+ var he = /* @__PURE__ */ p("<span class=truncate>"), ue = /* @__PURE__ */ p('<mark class="bg-warning/40 text-inherit rounded-sm">'), fe = /* @__PURE__ */ p("<span>"), xe = /* @__PURE__ */ p('<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'), ge = /* @__PURE__ */ p('<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'), we = /* @__PURE__ */ p('<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="flex-1 min-h-0 overflow-auto">'), ve = /* @__PURE__ */ p('<span>No files matching "<!>"'), $e = /* @__PURE__ */ p('<button type=button class="px-2 py-1 rounded bg-muted hover:bg-muted/80 transition-colors">Clear Filter'), pe = /* @__PURE__ */ p('<div class="flex flex-col items-center justify-center h-32 gap-2 text-xs text-muted-foreground">'), ze = /* @__PURE__ */ p("<span>This folder is empty"), K = /* @__PURE__ */ p('<div class="shrink-0 px-3 py-1.5 text-left text-muted-foreground truncate">'), Me = /* @__PURE__ */ p('<button type=button style=animation-fill-mode:backwards><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">');
12
+ function be(r) {
13
+ const d = V(() => {
14
14
  if (!r.match || r.match.matchedIndices.length === 0)
15
15
  return [{
16
16
  text: r.name,
17
17
  highlight: !1
18
18
  }];
19
- const f = [], _ = new Set(r.match.matchedIndices);
20
- let x = "", u = !1;
21
- for (let m = 0; m < r.name.length; m++) {
22
- const y = _.has(m);
23
- m === 0 ? (u = y, x = r.name[m]) : y === u ? x += r.name[m] : (f.push({
24
- text: x,
25
- highlight: u
26
- }), x = r.name[m], u = y);
19
+ const w = [], M = new Set(r.match.matchedIndices);
20
+ let v = "", f = !1;
21
+ for (let h = 0; h < r.name.length; h++) {
22
+ const b = M.has(h);
23
+ h === 0 ? (f = b, v = r.name[h]) : b === f ? v += r.name[h] : (w.push({
24
+ text: v,
25
+ highlight: f
26
+ }), v = r.name[h], f = b);
27
27
  }
28
- return x && f.push({
29
- text: x,
30
- highlight: u
31
- }), f;
28
+ return v && w.push({
29
+ text: v,
30
+ highlight: f
31
+ }), w;
32
32
  });
33
33
  return (() => {
34
- var f = me();
35
- return a(f, c(V, {
34
+ var w = he();
35
+ return m(w, c(X, {
36
36
  get each() {
37
37
  return d();
38
38
  },
39
- children: (_) => c(b, {
39
+ children: (M) => c(C, {
40
40
  get when() {
41
- return _.highlight;
41
+ return M.highlight;
42
42
  },
43
43
  get fallback() {
44
- return j(() => _.text);
44
+ return O(() => M.text);
45
45
  },
46
46
  get children() {
47
- var x = he();
48
- return a(x, () => _.text), x;
47
+ var v = ue();
48
+ return m(v, () => M.text), v;
49
49
  }
50
50
  })
51
- })), f;
51
+ })), w;
52
52
  })();
53
53
  }
54
- function Ae(r) {
55
- const d = X(), f = (t) => {
54
+ function Ne(r) {
55
+ const d = Y(), w = (t) => {
56
56
  const e = d.sortConfig();
57
57
  d.setSortConfig({
58
58
  field: t,
59
59
  direction: e.field === t && e.direction === "asc" ? "desc" : "asc"
60
60
  });
61
- }, _ = (t) => t === void 0 ? "-" : t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(1)} KB` : `${(t / (1024 * 1024)).toFixed(1)} MB`, x = (t) => t ? t.toLocaleDateString("en-US", {
61
+ }, M = (t) => t === void 0 ? "-" : t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(1)} KB` : `${(t / (1024 * 1024)).toFixed(1)} MB`, v = (t) => t ? t.toLocaleDateString("en-US", {
62
62
  month: "short",
63
63
  day: "numeric",
64
64
  year: "numeric"
65
- }) : "-", u = (t) => {
65
+ }) : "-", f = (t) => {
66
66
  const e = () => d.sortConfig(), i = () => e().field === t.field;
67
67
  return (() => {
68
- var o = ue();
69
- return a(o, c(ce, {
68
+ var l = fe();
69
+ return m(l, c(ce, {
70
70
  get class() {
71
- return N("w-3 h-3 transition-transform duration-150", i() && e().direction === "asc" && "rotate-180");
71
+ return R("w-3 h-3 transition-transform duration-150", i() && e().direction === "asc" && "rotate-180");
72
72
  }
73
- })), k(() => E(o, N("ml-1 transition-all duration-150", i() ? "opacity-100" : "opacity-0 group-hover:opacity-40"))), o;
73
+ })), P(() => I(l, R("ml-1 transition-all duration-150", i() ? "opacity-100" : "opacity-0 group-hover:opacity-40"))), l;
74
74
  })();
75
- }, m = Q("(min-width: 640px)"), y = Q("(min-width: 768px)"), [A, L] = re(null), T = se(A), W = (t, e, i) => Math.max(e, Math.min(i, t)), $ = O(() => {
76
- var D;
77
- const t = ((D = T()) == null ? void 0 : D.width) ?? 0, e = m(), i = y(), o = d.listColumnRatios(), h = 160, s = 120, l = 80, v = 128, p = 96;
75
+ }, h = Q("(min-width: 640px)"), b = Q("(min-width: 768px)"), [T, H] = oe(null), U = le(T), D = (t, e, i) => Math.max(e, Math.min(i, t)), g = V(() => {
76
+ var k;
77
+ const t = ((k = U()) == null ? void 0 : k.width) ?? 0, e = h(), i = b(), l = d.listColumnRatios(), u = 160, x = 120, $ = 80, S = 128, s = 96;
78
78
  if (!e || t <= 0)
79
79
  return {
80
80
  width: t,
81
81
  showModified: e,
82
82
  showSize: i,
83
- minName: h,
84
- minModified: s,
85
- minSize: l,
86
- modifiedWidth: v,
87
- sizeWidth: p
83
+ minName: u,
84
+ minModified: x,
85
+ minSize: $,
86
+ modifiedWidth: S,
87
+ sizeWidth: s
88
88
  };
89
89
  if (!i) {
90
- const C = o.size, S = Math.max(0, 1 - C);
91
- let M = (S > 0 ? o.modifiedAt / S : o.modifiedAt) * t;
92
- return M = W(M, s, Math.max(s, t - h)), {
90
+ const W = l.size, _ = Math.max(0, 1 - W);
91
+ let z = (_ > 0 ? l.modifiedAt / _ : l.modifiedAt) * t;
92
+ return z = D(z, x, Math.max(x, t - u)), {
93
93
  width: t,
94
94
  showModified: e,
95
95
  showSize: i,
96
- minName: h,
97
- minModified: s,
98
- minSize: l,
99
- modifiedWidth: M,
96
+ minName: u,
97
+ minModified: x,
98
+ minSize: $,
99
+ modifiedWidth: z,
100
100
  sizeWidth: 0
101
101
  };
102
102
  }
103
- let w = Math.max(s, o.modifiedAt * t), z = Math.max(l, o.size * t);
104
- const U = Math.max(0, t - h);
105
- if (w + z > U) {
106
- const C = w + z - U, S = Math.max(0, w - s), M = Math.max(0, z - l), P = S + M;
107
- P > 0 && (w -= C * (S / P), z -= C * (M / P));
103
+ let o = Math.max(x, l.modifiedAt * t), a = Math.max($, l.size * t);
104
+ const y = Math.max(0, t - u);
105
+ if (o + a > y) {
106
+ const W = o + a - y, _ = Math.max(0, o - x), z = Math.max(0, a - $), F = _ + z;
107
+ F > 0 && (o -= W * (_ / F), a -= W * (z / F));
108
108
  }
109
- return w = Math.max(s, w), z = Math.max(l, z), {
109
+ return o = Math.max(x, o), a = Math.max($, a), {
110
110
  width: t,
111
111
  showModified: e,
112
112
  showSize: i,
113
- minName: h,
114
- minModified: s,
115
- minSize: l,
116
- modifiedWidth: w,
117
- sizeWidth: z
113
+ minName: u,
114
+ minModified: x,
115
+ minSize: $,
116
+ modifiedWidth: o,
117
+ sizeWidth: a
118
118
  };
119
- }), R = () => $().modifiedWidth, I = () => $().sizeWidth, H = (t) => {
120
- const e = $();
119
+ }), A = () => g().modifiedWidth, L = () => g().sizeWidth, B = (t) => {
120
+ const e = g();
121
121
  if (!e.showModified || e.width <= 0) return;
122
122
  if (!e.showSize) {
123
- const D = d.listColumnRatios().size, C = Math.max(0, 1 - D);
124
- if (C <= 0) return;
125
- const S = e.width, M = e.modifiedWidth, P = Math.max(0, S - M), Y = e.minName - P, q = M - e.minModified, B = W(t, Y, q);
126
- if (B === 0) return;
127
- const G = P + B, J = M - B, Z = G / S * C, ee = J / S * C;
123
+ const k = d.listColumnRatios().size, W = Math.max(0, 1 - k);
124
+ if (W <= 0) return;
125
+ const _ = e.width, z = e.modifiedWidth, F = Math.max(0, _ - z), q = e.minName - F, G = z - e.minModified, E = D(t, q, G);
126
+ if (E === 0) return;
127
+ const J = F + E, Z = z - E, ee = J / _ * W, te = Z / _ * W;
128
128
  d.setListColumnRatios({
129
- name: Z,
130
- modifiedAt: ee,
131
- size: D
129
+ name: ee,
130
+ modifiedAt: te,
131
+ size: k
132
132
  });
133
133
  return;
134
134
  }
135
- const i = e.width, o = e.modifiedWidth, h = e.sizeWidth, s = Math.max(0, i - o - h), l = e.minName - s, v = o - e.minModified, p = W(t, l, v);
136
- if (p === 0) return;
137
- const w = s + p, z = o - p;
135
+ const i = e.width, l = e.modifiedWidth, u = e.sizeWidth, x = Math.max(0, i - l - u), $ = e.minName - x, S = l - e.minModified, s = D(t, $, S);
136
+ if (s === 0) return;
137
+ const o = x + s, a = l - s;
138
138
  d.setListColumnRatios({
139
- name: w / i,
140
- modifiedAt: z / i,
141
- size: h / i
139
+ name: o / i,
140
+ modifiedAt: a / i,
141
+ size: u / i
142
142
  });
143
143
  }, n = (t) => {
144
- const e = $();
144
+ const e = g();
145
145
  if (!e.showSize || e.width <= 0) return;
146
- const i = e.width, o = e.modifiedWidth, h = e.sizeWidth, s = e.minModified - o, l = h - e.minSize, v = W(t, s, l);
147
- if (v === 0) return;
148
- const p = o + v, w = h - v, z = Math.max(0, i - p - w);
146
+ const i = e.width, l = e.modifiedWidth, u = e.sizeWidth, x = e.minModified - l, $ = u - e.minSize, S = D(t, x, $);
147
+ if (S === 0) return;
148
+ const s = l + S, o = u - S, a = Math.max(0, i - s - o);
149
149
  d.setListColumnRatios({
150
- name: z / i,
151
- modifiedAt: p / i,
152
- size: w / i
150
+ name: a / i,
151
+ modifiedAt: s / i,
152
+ size: o / i
153
153
  });
154
154
  };
155
155
  return (() => {
156
- var t = ge(), e = t.firstChild, i = e.firstChild, o = i.firstChild;
157
- o.firstChild;
158
- var h = e.nextSibling;
159
- return ie(L, e), o.$$click = () => f("name"), a(o, c(u, {
156
+ var t = we(), e = t.firstChild, i = e.firstChild, l = i.firstChild, u = l.firstChild, x = u.firstChild, $ = x.nextSibling;
157
+ $.firstChild;
158
+ var S = e.nextSibling;
159
+ return ne(H, e), l.$$click = () => w("name"), m($, c(f, {
160
160
  field: "name"
161
- }), null), a(i, c(b, {
161
+ }), null), m(i, c(C, {
162
162
  get when() {
163
- return $().showModified;
163
+ return g().showModified;
164
164
  },
165
165
  get children() {
166
- return c(K, {
166
+ return c(j, {
167
167
  direction: "horizontal",
168
- onResize: H
168
+ onResize: B
169
169
  });
170
170
  }
171
- }), null), a(e, c(b, {
171
+ }), null), m(e, c(C, {
172
172
  get when() {
173
- return $().showModified;
173
+ return g().showModified;
174
174
  },
175
175
  get children() {
176
- var s = fe(), l = s.firstChild;
177
- return l.firstChild, l.$$click = () => f("modifiedAt"), a(l, c(u, {
176
+ var s = xe(), o = s.firstChild;
177
+ return o.firstChild, o.$$click = () => w("modifiedAt"), m(o, c(f, {
178
178
  field: "modifiedAt"
179
- }), null), a(s, c(b, {
179
+ }), null), m(s, c(C, {
180
180
  get when() {
181
- return $().showSize;
181
+ return g().showSize;
182
182
  },
183
183
  get children() {
184
- return c(K, {
184
+ return c(j, {
185
185
  direction: "horizontal",
186
186
  onResize: n
187
187
  });
188
188
  }
189
- }), null), k((v) => F(s, "width", `${R()}px`)), s;
189
+ }), null), P((a) => {
190
+ var y = R("relative shrink-0", g().showSize && "border-r border-border"), k = `${A()}px`;
191
+ return y !== a.e && I(s, a.e = y), k !== a.t && N(s, "width", a.t = k), a;
192
+ }, {
193
+ e: void 0,
194
+ t: void 0
195
+ }), s;
190
196
  }
191
- }), null), a(e, c(b, {
197
+ }), null), m(e, c(C, {
192
198
  get when() {
193
- return $().showSize;
199
+ return g().showSize;
194
200
  },
195
201
  get children() {
196
- var s = xe(), l = s.firstChild;
197
- return l.firstChild, l.$$click = () => f("size"), a(l, c(u, {
202
+ var s = ge(), o = s.firstChild;
203
+ return o.firstChild, o.$$click = () => w("size"), m(o, c(f, {
198
204
  field: "size"
199
- }), null), k((v) => F(s, "width", `${I()}px`)), s;
205
+ }), null), P((a) => N(s, "width", `${L()}px`)), s;
200
206
  }
201
- }), null), a(h, c(b, {
207
+ }), null), m(S, c(C, {
202
208
  get when() {
203
209
  return d.currentFiles().length > 0;
204
210
  },
205
211
  get fallback() {
206
212
  return (() => {
207
- var s = ve();
208
- return a(s, c(b, {
213
+ var s = pe();
214
+ return m(s, c(C, {
209
215
  get when() {
210
216
  return d.filterQuery().trim();
211
217
  },
212
218
  get fallback() {
213
- return pe();
219
+ return ze();
214
220
  },
215
221
  get children() {
216
222
  return [(() => {
217
- var l = $e(), v = l.firstChild, p = v.nextSibling;
218
- return p.nextSibling, a(l, () => d.filterQuery(), p), l;
223
+ var o = ve(), a = o.firstChild, y = a.nextSibling;
224
+ return y.nextSibling, m(o, () => d.filterQuery(), y), o;
219
225
  })(), (() => {
220
- var l = we();
221
- return l.$$click = () => d.setFilterQuery(""), l;
226
+ var o = $e();
227
+ return o.$$click = () => d.setFilterQuery(""), o;
222
228
  })()];
223
229
  }
224
230
  })), s;
225
231
  })();
226
232
  },
227
233
  get children() {
228
- return c(V, {
234
+ return c(X, {
229
235
  get each() {
230
236
  return d.currentFiles();
231
237
  },
232
- children: (s, l) => c(Se, {
238
+ children: (s, o) => c(Se, {
233
239
  item: s,
234
- formatSize: _,
235
- formatDate: x,
240
+ formatSize: M,
241
+ formatDate: v,
236
242
  get index() {
237
- return l();
243
+ return o();
238
244
  },
239
245
  get showModified() {
240
- return $().showModified;
246
+ return g().showModified;
241
247
  },
242
248
  get showSize() {
243
- return $().showSize;
249
+ return g().showSize;
244
250
  },
245
251
  get modifiedWidthPx() {
246
- return R();
252
+ return A();
247
253
  },
248
254
  get sizeWidthPx() {
249
- return I();
255
+ return L();
250
256
  }
251
257
  })
252
258
  });
253
259
  }
254
- })), k(() => E(t, N("flex flex-col h-full min-h-0", r.class))), t;
260
+ })), P((s) => {
261
+ var o = R("flex flex-col h-full min-h-0", r.class), a = R("relative flex-1 min-w-0", g().showModified && "border-r border-border");
262
+ return o !== s.e && I(t, s.e = o), a !== s.t && I(i, s.t = a), s;
263
+ }, {
264
+ e: void 0,
265
+ t: void 0
266
+ }), t;
255
267
  })();
256
268
  }
257
269
  function Se(r) {
258
- const d = X(), f = () => d.isSelected(r.item.id), _ = () => d.getFilterMatch(r.item.name), x = oe(() => r.item), u = ae(d, x);
259
- let m;
260
- const y = () => m === "touch" || m === "pen", A = (n) => {
261
- m = n.pointerType, u.onPointerDown(n);
262
- }, L = (n) => {
263
- m = n.pointerType, u.onPointerMove(n);
264
- }, T = (n) => {
265
- m = n.pointerType, u.onPointerUp();
266
- }, W = (n) => {
267
- m = n.pointerType, u.onPointerCancel();
268
- }, $ = (n) => {
269
- if (!u.consumeClickSuppression(n)) {
270
- if (y()) {
270
+ const d = Y(), w = () => d.isSelected(r.item.id), M = () => d.getFilterMatch(r.item.name), v = se(() => r.item), f = me(d, v);
271
+ let h;
272
+ const b = () => h === "touch" || h === "pen", T = (n) => {
273
+ h = n.pointerType, f.onPointerDown(n);
274
+ }, H = (n) => {
275
+ h = n.pointerType, f.onPointerMove(n);
276
+ }, U = (n) => {
277
+ h = n.pointerType, f.onPointerUp();
278
+ }, D = (n) => {
279
+ h = n.pointerType, f.onPointerCancel();
280
+ }, g = (n) => {
281
+ if (!f.consumeClickSuppression(n)) {
282
+ if (b()) {
271
283
  d.openItem(r.item);
272
284
  return;
273
285
  }
274
286
  d.selectItem(r.item.id, n.metaKey || n.ctrlKey);
275
287
  }
276
- }, R = () => {
277
- y() || d.openItem(r.item);
278
- }, I = (n) => {
279
- if (n.preventDefault(), n.stopPropagation(), y()) return;
280
- f() || d.selectItem(r.item.id, !1);
281
- const t = d.selectedItems(), e = d.currentFiles(), i = t.size > 0 ? e.filter((o) => t.has(o.id)) : [r.item];
288
+ }, A = () => {
289
+ b() || d.openItem(r.item);
290
+ }, L = (n) => {
291
+ if (n.preventDefault(), n.stopPropagation(), b()) return;
292
+ w() || d.selectItem(r.item.id, !1);
293
+ const t = d.selectedItems(), e = d.currentFiles(), i = t.size > 0 ? e.filter((l) => t.has(l.id)) : [r.item];
282
294
  d.showContextMenu({
283
295
  x: n.clientX,
284
296
  y: n.clientY,
285
297
  items: i
286
298
  });
287
- }, H = () => r.item.type === "folder" ? le : de(r.item.extension);
299
+ }, B = () => r.item.type === "folder" ? de : ae(r.item.extension);
288
300
  return (() => {
289
- var n = _e(), t = n.firstChild, e = t.firstChild;
290
- return n.addEventListener("pointercancel", W), n.$$pointerup = T, n.$$pointermove = L, n.$$pointerdown = A, n.$$contextmenu = I, n.$$dblclick = R, n.$$click = $, a(e, c(ne, {
301
+ var n = Me(), t = n.firstChild, e = t.firstChild;
302
+ return n.addEventListener("pointercancel", D), n.$$pointerup = U, n.$$pointermove = H, n.$$pointerdown = T, n.$$contextmenu = L, n.$$dblclick = A, n.$$click = g, m(e, c(re, {
291
303
  get component() {
292
- return H();
304
+ return B();
293
305
  },
294
306
  class: "w-4 h-4"
295
- })), a(t, c(ye, {
307
+ })), m(t, c(be, {
296
308
  get name() {
297
309
  return r.item.name;
298
310
  },
299
311
  get match() {
300
- return _();
312
+ return M();
301
313
  }
302
- }), null), a(n, c(b, {
314
+ }), null), m(n, c(C, {
303
315
  get when() {
304
316
  return r.showModified;
305
317
  },
306
318
  get children() {
307
- var i = ze();
308
- return a(i, () => r.formatDate(r.item.modifiedAt)), k((o) => F(i, "width", `${r.modifiedWidthPx}px`)), i;
319
+ var i = K();
320
+ return m(i, () => r.formatDate(r.item.modifiedAt)), P((l) => N(i, "width", `${r.modifiedWidthPx}px`)), i;
309
321
  }
310
- }), null), a(n, c(b, {
322
+ }), null), m(n, c(C, {
311
323
  get when() {
312
324
  return r.showSize;
313
325
  },
314
326
  get children() {
315
- var i = Me();
316
- return a(i, (() => {
317
- var o = j(() => r.item.type === "folder");
318
- return () => o() ? "-" : r.formatSize(r.item.size);
319
- })()), k((o) => F(i, "width", `${r.sizeWidthPx}px`)), i;
327
+ var i = K();
328
+ return m(i, (() => {
329
+ var l = O(() => r.item.type === "folder");
330
+ return () => l() ? "-" : r.formatSize(r.item.size);
331
+ })()), P((l) => N(i, "width", `${r.sizeWidthPx}px`)), i;
320
332
  }
321
- }), null), k((i) => {
322
- var o = N(
333
+ }), null), P((i) => {
334
+ var l = R(
323
335
  "group w-full flex items-center text-xs cursor-pointer",
324
336
  "transition-all duration-100",
325
337
  "hover:bg-accent/50",
326
338
  "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring",
327
- f() && "bg-accent text-accent-foreground",
339
+ w() && "bg-accent text-accent-foreground",
328
340
  // Staggered animation on mount
329
341
  "animate-in fade-in slide-in-from-top-2"
330
- ), h = `${Math.min(r.index * 20, 200)}ms`;
331
- return o !== i.e && E(n, i.e = o), h !== i.t && F(n, "animation-delay", i.t = h), i;
342
+ ), u = `${Math.min(r.index * 20, 200)}ms`;
343
+ return l !== i.e && I(n, i.e = l), u !== i.t && N(n, "animation-delay", i.t = u), i;
332
344
  }, {
333
345
  e: void 0,
334
346
  t: void 0
335
347
  }), n;
336
348
  })();
337
349
  }
338
- te(["click", "dblclick", "contextmenu", "pointerdown", "pointermove", "pointerup"]);
350
+ ie(["click", "dblclick", "contextmenu", "pointerdown", "pointermove", "pointerup"]);
339
351
  export {
340
- Ae as FileListView
352
+ Ne as FileListView
341
353
  };
package/dist/index8.js CHANGED
@@ -4,9 +4,9 @@ import { cn as p } from "./index69.js";
4
4
  import { lockBodyStyle as G } from "./index72.js";
5
5
  var L = /* @__PURE__ */ C("<div role=separator style=touch-action:none><div></div><div>");
6
6
  function T(l) {
7
- const [s, g] = E(!1);
7
+ const [s, v] = E(!1);
8
8
  let r = 0, o = 0, c = null, n, u = null, i = null;
9
- const v = (t) => {
9
+ const g = (t) => {
10
10
  if (!t) {
11
11
  i == null || i(), i = null;
12
12
  return;
@@ -19,9 +19,9 @@ function T(l) {
19
19
  if (!s()) return;
20
20
  u !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(u), u = null);
21
21
  const t = o - r;
22
- t !== 0 && (l.onResize(t), r = o), g(!1), c = null, v(!1);
22
+ t !== 0 && (l.onResize(t), r = o), v(!1), c = null, g(!1);
23
23
  }, h = (t) => l.direction === "horizontal" ? t.clientX : t.clientY, x = (t) => {
24
- t.pointerType === "mouse" && t.button !== 0 || (t.preventDefault(), c = t.pointerId, g(!0), r = h(t), o = r, v(!0), n == null || n.setPointerCapture(t.pointerId));
24
+ t.pointerType === "mouse" && t.button !== 0 || (t.preventDefault(), c = t.pointerId, v(!0), r = h(t), o = r, g(!0), n == null || n.setPointerCapture(t.pointerId));
25
25
  }, $ = (t) => {
26
26
  if (!(!s() || c !== t.pointerId) && (o = h(t), u === null)) {
27
27
  if (typeof requestAnimationFrame > "u") {
@@ -51,7 +51,7 @@ function T(l) {
51
51
  t.addEventListener("pointercancel", y), t.$$pointerup = y, t.$$pointermove = $, t.$$pointerdown = x;
52
52
  var b = n;
53
53
  return typeof b == "function" ? q(b, t) : n = t, F((e) => {
54
- var z = p("absolute z-20 group", d() ? "top-0 right-0 w-1 h-full cursor-col-resize hover:w-1.5" : "left-0 top-0 h-1 w-full cursor-row-resize hover:h-1.5", "transition-all duration-100", s() && "bg-primary", !s() && "hover:bg-primary/50", l.class), w = d() ? "vertical" : "horizontal", P = p("absolute pointer-events-none", d() ? "top-0 bottom-0 left-1/2 w-px -translate-x-1/2" : "left-0 right-0 top-1/2 h-px -translate-y-1/2", s() && "bg-primary opacity-100", !s() && "bg-border/60 opacity-70 group-hover:bg-primary/50 group-hover:opacity-100"), I = p("absolute opacity-0 group-hover:opacity-100 transition-opacity duration-150", d() ? "top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-0.5 h-8 rounded-full bg-muted-foreground/30" : "left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 h-0.5 w-8 rounded-full bg-muted-foreground/30");
54
+ var z = p("absolute z-20 group", d() ? "top-0 right-0 w-1 h-full cursor-col-resize hover:w-1.5" : "left-0 top-0 h-1 w-full cursor-row-resize hover:h-1.5", "transition-all duration-100", s() && "bg-primary", !s() && "hover:bg-primary/50", l.class), w = d() ? "vertical" : "horizontal", P = p("absolute pointer-events-none", d() ? "top-0 bottom-0 left-1/2 w-px -translate-x-1/2" : "left-0 right-0 top-1/2 h-px -translate-y-1/2", s() && "bg-primary opacity-100", !s() && "bg-primary/50 opacity-0 group-hover:opacity-100"), I = p("absolute opacity-0 group-hover:opacity-100 transition-opacity duration-150", d() ? "top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-0.5 h-8 rounded-full bg-muted-foreground/30" : "left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 h-0.5 w-8 rounded-full bg-muted-foreground/30");
55
55
  return z !== e.e && f(t, e.e = z), w !== e.t && S(t, "aria-orientation", e.t = w), P !== e.a && f(a, e.a = P), I !== e.o && f(D, e.o = I), e;
56
56
  }, {
57
57
  e: void 0,