@floegence/floe-webapp-core 0.35.6 → 0.35.8

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.
Files changed (36) hide show
  1. package/dist/components/file-browser/DirectoryTree.js +78 -68
  2. package/dist/components/file-browser/FileGridView.js +136 -125
  3. package/dist/components/file-browser/FileListView.js +145 -133
  4. package/dist/components/file-browser/touchInteractionGuard.d.ts +5 -0
  5. package/dist/components/file-browser/touchInteractionGuard.js +8 -0
  6. package/dist/components/ui/MobileKeyboard.d.ts +22 -0
  7. package/dist/components/ui/MobileKeyboard.js +287 -0
  8. package/dist/components/ui/index.d.ts +1 -0
  9. package/dist/components/ui/mobileKeyboardModel.d.ts +24 -0
  10. package/dist/components/ui/mobileKeyboardModel.js +103 -0
  11. package/dist/floe.css +20 -0
  12. package/dist/full.d.ts +1 -0
  13. package/dist/full.js +546 -509
  14. package/dist/styles.css +1 -1
  15. package/dist/terminal/editorModel.d.ts +7 -0
  16. package/dist/terminal/editorModel.js +84 -0
  17. package/dist/terminal/mockRuntime.d.ts +2 -0
  18. package/dist/terminal/mockRuntime.js +287 -0
  19. package/dist/terminal/sessionModel.d.ts +37 -0
  20. package/dist/terminal/sessionModel.js +143 -0
  21. package/dist/terminal/suggestionEngine.d.ts +64 -0
  22. package/dist/terminal/suggestionEngine.js +1020 -0
  23. package/dist/terminal/types.d.ts +44 -0
  24. package/dist/terminal/workspaceProfile.d.ts +3 -0
  25. package/dist/terminal/workspaceProfile.js +30 -0
  26. package/dist/terminal.d.ts +6 -0
  27. package/dist/terminal.js +36 -0
  28. package/dist/ui.css +488 -0
  29. package/dist/ui.js +44 -42
  30. package/dist/utils/touchSurfaceGuard.d.ts +9 -0
  31. package/dist/utils/touchSurfaceGuard.js +16 -0
  32. package/dist/widgets/TerminalWidget.d.ts +17 -1
  33. package/dist/widgets/TerminalWidget.js +160 -65
  34. package/dist/widgets/index.d.ts +1 -1
  35. package/dist/widgets.js +5 -4
  36. package/package.json +5 -1
@@ -1,62 +1,63 @@
1
- import { use as et, insert as u, createComponent as m, effect as E, className as U, setStyleProperty as B, addEventListener as ct, template as _, Dynamic as mt, memo as ot, delegateEvents as ut } from "solid-js/web";
2
- import { createMemo as tt, createSignal as at, Show as W, For as st, untrack as ft, onCleanup as ht } from "solid-js";
1
+ import { use as et, insert as u, createComponent as m, effect as E, className as j, setStyleProperty as B, addEventListener as ct, template as _, spread as mt, mergeProps as ut, Dynamic as ft, memo as ot, delegateEvents as gt } from "solid-js/web";
2
+ import { createMemo as tt, createSignal as at, Show as W, For as st, untrack as ht, onCleanup as xt } from "solid-js";
3
3
  import { cn as H } from "../../utils/cn.js";
4
4
  import { useMediaQuery as nt } from "../../hooks/useMediaQuery.js";
5
- import { useResizeObserver as gt } from "../../hooks/useResizeObserver.js";
6
- import { useVirtualWindow as xt } from "../../hooks/useVirtualWindow.js";
5
+ import { useResizeObserver as vt } from "../../hooks/useResizeObserver.js";
6
+ import { useVirtualWindow as wt } from "../../hooks/useVirtualWindow.js";
7
7
  import { useFileBrowser as lt } from "./FileBrowserContext.js";
8
- import { useFileBrowserDrag as vt } from "../../context/FileBrowserDragContext.js";
9
- import { FolderIcon as wt, getFileIcon as $t } from "./FileIcons.js";
10
- import { ChevronDown as bt } from "../icons/index.js";
11
- import { createLongPressContextMenuHandlers as Ct } from "./longPressContextMenu.js";
8
+ import { useFileBrowserDrag as Ct } from "../../context/FileBrowserDragContext.js";
9
+ import { FolderIcon as bt, getFileIcon as Dt } from "./FileIcons.js";
10
+ import { ChevronDown as St } from "../icons/index.js";
11
+ import { createLongPressContextMenuHandlers as $t } from "./longPressContextMenu.js";
12
12
  import { ResizeHandle as it } from "../layout/ResizeHandle.js";
13
- var Dt = /* @__PURE__ */ _("<span class=truncate>"), St = /* @__PURE__ */ _('<mark class="bg-warning/40 text-inherit rounded-sm">'), Mt = /* @__PURE__ */ _("<span>"), zt = /* @__PURE__ */ _('<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'), _t = /* @__PURE__ */ _('<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'), yt = /* @__PURE__ */ _("<div>"), It = /* @__PURE__ */ _('<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">'), Pt = /* @__PURE__ */ _('<span>No files matching "<!>"'), kt = /* @__PURE__ */ _('<button type=button class="px-2 py-1 rounded bg-muted hover:bg-muted/80 transition-colors">Clear Filter'), pt = /* @__PURE__ */ _('<div class="flex flex-col items-center justify-center h-32 gap-2 text-xs text-muted-foreground">'), Lt = /* @__PURE__ */ _("<span>This folder is empty"), rt = /* @__PURE__ */ _('<div class="shrink-0 px-3 py-1.5 text-left text-muted-foreground truncate">'), Rt = /* @__PURE__ */ _('<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">');
14
- function Tt(t) {
13
+ import { fileBrowserTouchTargetAttrs as Mt } from "./touchInteractionGuard.js";
14
+ var zt = /* @__PURE__ */ _("<span class=truncate>"), _t = /* @__PURE__ */ _('<mark class="bg-warning/40 text-inherit rounded-sm">'), yt = /* @__PURE__ */ _("<span>"), It = /* @__PURE__ */ _('<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'), Pt = /* @__PURE__ */ _('<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'), kt = /* @__PURE__ */ _("<div>"), Tt = /* @__PURE__ */ _('<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">'), Lt = /* @__PURE__ */ _('<span>No files matching "<!>"'), pt = /* @__PURE__ */ _('<button type=button class="px-2 py-1 rounded bg-muted hover:bg-muted/80 transition-colors">Clear Filter'), Rt = /* @__PURE__ */ _('<div class="flex flex-col items-center justify-center h-32 gap-2 text-xs text-muted-foreground">'), Wt = /* @__PURE__ */ _("<span>This folder is empty"), rt = /* @__PURE__ */ _('<div class="shrink-0 px-3 py-1.5 text-left text-muted-foreground truncate">'), Ft = /* @__PURE__ */ _('<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">');
15
+ function Et(t) {
15
16
  const a = tt(() => {
16
17
  if (!t.match || t.match.matchedIndices.length === 0)
17
18
  return [{
18
19
  text: t.name,
19
20
  highlight: !1
20
21
  }];
21
- const $ = [], p = new Set(t.match.matchedIndices);
22
- let D = "", S = !1;
22
+ const C = [], T = new Set(t.match.matchedIndices);
23
+ let S = "", $ = !1;
23
24
  for (let f = 0; f < t.name.length; f++) {
24
- const y = p.has(f);
25
- f === 0 ? (S = y, D = t.name[f]) : y === S ? D += t.name[f] : ($.push({
26
- text: D,
27
- highlight: S
28
- }), D = t.name[f], S = y);
25
+ const y = T.has(f);
26
+ f === 0 ? ($ = y, S = t.name[f]) : y === $ ? S += t.name[f] : (C.push({
27
+ text: S,
28
+ highlight: $
29
+ }), S = t.name[f], $ = y);
29
30
  }
30
- return D && $.push({
31
- text: D,
32
- highlight: S
33
- }), $;
31
+ return S && C.push({
32
+ text: S,
33
+ highlight: $
34
+ }), C;
34
35
  });
35
36
  return (() => {
36
- var $ = Dt();
37
- return u($, m(st, {
37
+ var C = zt();
38
+ return u(C, m(st, {
38
39
  get each() {
39
40
  return a();
40
41
  },
41
- children: (p) => m(W, {
42
+ children: (T) => m(W, {
42
43
  get when() {
43
- return p.highlight;
44
+ return T.highlight;
44
45
  },
45
46
  get fallback() {
46
- return ot(() => p.text);
47
+ return ot(() => T.text);
47
48
  },
48
49
  get children() {
49
- var D = St();
50
- return u(D, () => p.text), D;
50
+ var S = _t();
51
+ return u(S, () => T.text), S;
51
52
  }
52
53
  })
53
- })), $;
54
+ })), C;
54
55
  })();
55
56
  }
56
- function Vt(t) {
57
- const a = lt(), $ = vt(), p = () => (t.enableDragDrop ?? !0) && !!$, D = () => t.instanceId ?? "default", S = 32, f = xt({
57
+ function Jt(t) {
58
+ const a = lt(), C = Ct(), T = () => (t.enableDragDrop ?? !0) && !!C, S = () => t.instanceId ?? "default", $ = 32, f = wt({
58
59
  count: () => a.currentFiles().length,
59
- itemSize: () => S,
60
+ itemSize: () => $,
60
61
  overscan: 12
61
62
  }), y = tt(() => {
62
63
  const {
@@ -77,22 +78,22 @@ function Vt(t) {
77
78
  }) : "-", X = (r) => {
78
79
  const n = () => a.sortConfig(), l = () => n().field === r.field;
79
80
  return (() => {
80
- var d = Mt();
81
- return u(d, m(bt, {
81
+ var d = yt();
82
+ return u(d, m(St, {
82
83
  get class() {
83
84
  return H("w-3 h-3 transition-transform duration-150", l() && n().direction === "asc" && "rotate-180");
84
85
  }
85
- })), E(() => U(d, H("ml-1 transition-all duration-150", l() ? "opacity-100" : "opacity-0 group-hover:opacity-40"))), d;
86
+ })), E(() => j(d, H("ml-1 transition-all duration-150", l() ? "opacity-100" : "opacity-0 group-hover:opacity-40"))), d;
86
87
  })();
87
- }, K = nt("(min-width: 640px)"), A = nt("(min-width: 768px)"), [q, Q] = at(null), L = gt(q), N = (r, n, l) => Math.max(n, Math.min(l, r)), g = tt(() => {
88
- const r = L()?.width ?? 0, n = K(), l = A(), d = a.listColumnRatios(), x = 160, h = 120, v = 80, z = 128, o = 96;
88
+ }, K = nt("(min-width: 640px)"), A = nt("(min-width: 768px)"), [q, U] = at(null), L = vt(q), N = (r, n, l) => Math.max(n, Math.min(l, r)), h = tt(() => {
89
+ const r = L()?.width ?? 0, n = K(), l = A(), d = a.listColumnRatios(), x = 160, g = 120, v = 80, z = 128, o = 96;
89
90
  if (!n || r <= 0)
90
91
  return {
91
92
  width: r,
92
93
  showModified: n,
93
94
  showSize: l,
94
95
  minName: x,
95
- minModified: h,
96
+ minModified: g,
96
97
  minSize: v,
97
98
  modifiedWidth: z,
98
99
  sizeWidth: o
@@ -100,42 +101,42 @@ function Vt(t) {
100
101
  if (!l) {
101
102
  const I = d.size, k = Math.max(0, 1 - I);
102
103
  let P = (k > 0 ? d.modifiedAt / k : d.modifiedAt) * r;
103
- return P = N(P, h, Math.max(h, r - x)), {
104
+ return P = N(P, g, Math.max(g, r - x)), {
104
105
  width: r,
105
106
  showModified: n,
106
107
  showSize: l,
107
108
  minName: x,
108
- minModified: h,
109
+ minModified: g,
109
110
  minSize: v,
110
111
  modifiedWidth: P,
111
112
  sizeWidth: 0
112
113
  };
113
114
  }
114
- let i = Math.max(h, d.modifiedAt * r), s = Math.max(v, d.size * r);
115
+ let i = Math.max(g, d.modifiedAt * r), s = Math.max(v, d.size * r);
115
116
  const b = Math.max(0, r - x);
116
117
  if (i + s > b) {
117
- const I = i + s - b, k = Math.max(0, i - h), P = Math.max(0, s - v), R = k + P;
118
- R > 0 && (i -= I * (k / R), s -= I * (P / R));
118
+ const I = i + s - b, k = Math.max(0, i - g), P = Math.max(0, s - v), p = k + P;
119
+ p > 0 && (i -= I * (k / p), s -= I * (P / p));
119
120
  }
120
- return i = Math.max(h, i), s = Math.max(v, s), {
121
+ return i = Math.max(g, i), s = Math.max(v, s), {
121
122
  width: r,
122
123
  showModified: n,
123
124
  showSize: l,
124
125
  minName: x,
125
- minModified: h,
126
+ minModified: g,
126
127
  minSize: v,
127
128
  modifiedWidth: i,
128
129
  sizeWidth: s
129
130
  };
130
- }), G = () => g().modifiedWidth, V = () => g().sizeWidth, j = (r) => {
131
- const n = g();
131
+ }), G = () => h().modifiedWidth, Q = () => h().sizeWidth, V = (r) => {
132
+ const n = h();
132
133
  if (!n.showModified || n.width <= 0) return;
133
134
  if (!n.showSize) {
134
135
  const I = a.listColumnRatios().size, k = Math.max(0, 1 - I);
135
136
  if (k <= 0) return;
136
- const P = n.width, R = n.modifiedWidth, Y = Math.max(0, P - R), e = n.minName - Y, c = R - n.minModified, w = N(r, e, c);
137
+ const P = n.width, p = n.modifiedWidth, Y = Math.max(0, P - p), e = n.minName - Y, c = p - n.minModified, w = N(r, e, c);
137
138
  if (w === 0) return;
138
- const C = Y + w, T = R - w, Z = C / P * k, dt = T / P * k;
139
+ const D = Y + w, R = p - w, Z = D / P * k, dt = R / P * k;
139
140
  a.setListColumnRatios({
140
141
  name: Z,
141
142
  modifiedAt: dt,
@@ -143,18 +144,18 @@ function Vt(t) {
143
144
  });
144
145
  return;
145
146
  }
146
- const l = n.width, d = n.modifiedWidth, x = n.sizeWidth, h = Math.max(0, l - d - x), v = n.minName - h, z = d - n.minModified, o = N(r, v, z);
147
+ const l = n.width, d = n.modifiedWidth, x = n.sizeWidth, g = Math.max(0, l - d - x), v = n.minName - g, z = d - n.minModified, o = N(r, v, z);
147
148
  if (o === 0) return;
148
- const i = h + o, s = d - o;
149
+ const i = g + o, s = d - o;
149
150
  a.setListColumnRatios({
150
151
  name: i / l,
151
152
  modifiedAt: s / l,
152
153
  size: x / l
153
154
  });
154
155
  }, J = (r) => {
155
- const n = g();
156
+ const n = h();
156
157
  if (!n.showSize || n.width <= 0) return;
157
- const l = n.width, d = n.modifiedWidth, x = n.sizeWidth, h = n.minModified - d, v = x - n.minSize, z = N(r, h, v);
158
+ const l = n.width, d = n.modifiedWidth, x = n.sizeWidth, g = n.minModified - d, v = x - n.minSize, z = N(r, g, v);
158
159
  if (z === 0) return;
159
160
  const o = d + z, i = x - z, s = Math.max(0, l - o - i);
160
161
  a.setListColumnRatios({
@@ -164,32 +165,32 @@ function Vt(t) {
164
165
  });
165
166
  };
166
167
  return (() => {
167
- var r = It(), n = r.firstChild, l = n.firstChild, d = l.firstChild, x = d.firstChild, h = x.firstChild, v = h.nextSibling;
168
+ var r = Tt(), n = r.firstChild, l = n.firstChild, d = l.firstChild, x = d.firstChild, g = x.firstChild, v = g.nextSibling;
168
169
  v.firstChild;
169
170
  var z = n.nextSibling;
170
- return et(Q, n), d.$$click = () => F("name"), u(v, m(X, {
171
+ return et(U, n), d.$$click = () => F("name"), u(v, m(X, {
171
172
  field: "name"
172
173
  }), null), u(l, m(W, {
173
174
  get when() {
174
- return g().showModified;
175
+ return h().showModified;
175
176
  },
176
177
  get children() {
177
178
  return m(it, {
178
179
  direction: "horizontal",
179
- onResize: j
180
+ onResize: V
180
181
  });
181
182
  }
182
183
  }), null), u(n, m(W, {
183
184
  get when() {
184
- return g().showModified;
185
+ return h().showModified;
185
186
  },
186
187
  get children() {
187
- var o = zt(), i = o.firstChild;
188
+ var o = It(), i = o.firstChild;
188
189
  return i.firstChild, i.$$click = () => F("modifiedAt"), u(i, m(X, {
189
190
  field: "modifiedAt"
190
191
  }), null), u(o, m(W, {
191
192
  get when() {
192
- return g().showSize;
193
+ return h().showSize;
193
194
  },
194
195
  get children() {
195
196
  return m(it, {
@@ -198,8 +199,8 @@ function Vt(t) {
198
199
  });
199
200
  }
200
201
  }), null), E((s) => {
201
- var b = H("relative shrink-0", g().showSize && "border-r border-border"), I = `${G()}px`;
202
- return b !== s.e && U(o, s.e = b), I !== s.t && B(o, "width", s.t = I), s;
202
+ var b = H("relative shrink-0", h().showSize && "border-r border-border"), I = `${G()}px`;
203
+ return b !== s.e && j(o, s.e = b), I !== s.t && B(o, "width", s.t = I), s;
203
204
  }, {
204
205
  e: void 0,
205
206
  t: void 0
@@ -207,13 +208,13 @@ function Vt(t) {
207
208
  }
208
209
  }), null), u(n, m(W, {
209
210
  get when() {
210
- return g().showSize;
211
+ return h().showSize;
211
212
  },
212
213
  get children() {
213
- var o = _t(), i = o.firstChild;
214
+ var o = Pt(), i = o.firstChild;
214
215
  return i.firstChild, i.$$click = () => F("size"), u(i, m(X, {
215
216
  field: "size"
216
- }), null), E((s) => B(o, "width", `${V()}px`)), o;
217
+ }), null), E((s) => B(o, "width", `${Q()}px`)), o;
217
218
  }
218
219
  }), null), ct(z, "scroll", f.onScroll), et((o) => {
219
220
  f.scrollRef(o), a.setScrollContainer(o);
@@ -223,20 +224,20 @@ function Vt(t) {
223
224
  },
224
225
  get fallback() {
225
226
  return (() => {
226
- var o = pt();
227
+ var o = Rt();
227
228
  return u(o, m(W, {
228
229
  get when() {
229
230
  return a.filterQueryApplied().trim();
230
231
  },
231
232
  get fallback() {
232
- return Lt();
233
+ return Wt();
233
234
  },
234
235
  get children() {
235
236
  return [(() => {
236
- var i = Pt(), s = i.firstChild, b = s.nextSibling;
237
+ var i = Lt(), s = i.firstChild, b = s.nextSibling;
237
238
  return b.nextSibling, u(i, () => a.filterQueryApplied(), b), i;
238
239
  })(), (() => {
239
- var i = kt();
240
+ var i = pt();
240
241
  return i.$$click = () => a.setFilterQuery(""), i;
241
242
  })()];
242
243
  }
@@ -244,34 +245,34 @@ function Vt(t) {
244
245
  })();
245
246
  },
246
247
  get children() {
247
- var o = yt();
248
+ var o = kt();
248
249
  return u(o, m(st, {
249
250
  get each() {
250
251
  return y();
251
252
  },
252
- children: (i) => m(Wt, {
253
+ children: (i) => m(At, {
253
254
  item: i,
254
255
  formatSize: O,
255
256
  formatDate: M,
256
257
  get showModified() {
257
- return g().showModified;
258
+ return h().showModified;
258
259
  },
259
260
  get showSize() {
260
- return g().showSize;
261
+ return h().showSize;
261
262
  },
262
263
  get modifiedWidthPx() {
263
264
  return G();
264
265
  },
265
266
  get sizeWidthPx() {
266
- return V();
267
+ return Q();
267
268
  },
268
269
  get instanceId() {
269
- return D();
270
+ return S();
270
271
  },
271
272
  get enableDragDrop() {
272
- return p();
273
+ return T();
273
274
  },
274
- dragContext: $
275
+ dragContext: C
275
276
  })
276
277
  })), E((i) => {
277
278
  var s = `${f.paddingTop()}px`, b = `${f.paddingBottom()}px`;
@@ -282,43 +283,43 @@ function Vt(t) {
282
283
  }), o;
283
284
  }
284
285
  })), E((o) => {
285
- var i = H("flex flex-col h-full min-h-0", t.class), s = H("relative flex-1 min-w-0", g().showModified && "border-r border-border");
286
- return i !== o.e && U(r, o.e = i), s !== o.t && U(l, o.t = s), o;
286
+ var i = H("flex flex-col h-full min-h-0", t.class), s = H("relative flex-1 min-w-0", h().showModified && "border-r border-border");
287
+ return i !== o.e && j(r, o.e = i), s !== o.t && j(l, o.t = s), o;
287
288
  }, {
288
289
  e: void 0,
289
290
  t: void 0
290
291
  }), r;
291
292
  })();
292
293
  }
293
- function Wt(t) {
294
- const a = lt(), $ = () => a.isSelected(t.item.id), p = () => a.getFilterMatchForId(t.item.id), D = ft(() => t.item), S = Ct(a, D);
294
+ function At(t) {
295
+ const a = lt(), C = () => a.isSelected(t.item.id), T = () => a.getFilterMatchForId(t.item.id), S = ht(() => t.item), $ = $t(a, S);
295
296
  let f, y = null, F = 0, O = 0, M = !1;
296
297
  const X = 5, K = 500;
297
298
  let A = null;
298
- const [q, Q] = at(!1), L = () => f === "touch" || f === "pen", N = () => t.item.type === "folder", g = () => N() && t.enableDragDrop && t.dragContext, G = () => {
299
- if (!g() || !t.dragContext) return !1;
299
+ const [q, U] = at(!1), L = () => f === "touch" || f === "pen", N = () => t.item.type === "folder", h = () => N() && t.enableDragDrop && t.dragContext, G = () => {
300
+ if (!h() || !t.dragContext) return !1;
300
301
  const e = t.dragContext.dragState();
301
302
  return e.isDragging ? t.dragContext.canDropOn(e.draggedItems, t.item.path, t.item, t.instanceId) : !1;
302
- }, V = () => {
303
+ }, Q = () => {
303
304
  if (!t.dragContext) return !1;
304
305
  const e = t.dragContext.dragState();
305
306
  return e.isDragging ? e.draggedItems.some((c) => c.item.id === t.item.id) : !1;
306
- }, j = () => {
307
+ }, V = () => {
307
308
  A !== null && (clearTimeout(A), A = null);
308
309
  }, J = () => {
309
- typeof document > "u" || (document.removeEventListener("pointermove", d, !0), document.removeEventListener("pointerup", x, !0), document.removeEventListener("pointercancel", h, !0));
310
+ typeof document > "u" || (document.removeEventListener("pointermove", d, !0), document.removeEventListener("pointerup", x, !0), document.removeEventListener("pointercancel", g, !0));
310
311
  }, r = () => {
311
- typeof document > "u" || (document.addEventListener("pointermove", d, !0), document.addEventListener("pointerup", x, !0), document.addEventListener("pointercancel", h, !0));
312
+ typeof document > "u" || (document.addEventListener("pointermove", d, !0), document.addEventListener("pointerup", x, !0), document.addEventListener("pointercancel", g, !0));
312
313
  }, n = (e) => {
313
- j(), J(), M && t.dragContext && t.dragContext.endDrag(e), y = null, M = !1;
314
+ V(), J(), M && t.dragContext && t.dragContext.endDrag(e), y = null, M = !1;
314
315
  };
315
- ht(() => {
316
+ xt(() => {
316
317
  n(!1);
317
318
  });
318
319
  const l = (e, c) => {
319
320
  if (!t.enableDragDrop || !t.dragContext || M) return;
320
- M = !0, $() || a.selectItem(t.item.id, !1);
321
- const w = a.getSelectedItemsList(), T = (w.length > 0 && $() ? w : [t.item]).map((Z) => ({
321
+ M = !0, C() || a.selectItem(t.item.id, !1);
322
+ const w = a.getSelectedItemsList(), R = (w.length > 0 && C() ? w : [t.item]).map((Z) => ({
322
323
  item: Z,
323
324
  sourceInstanceId: t.instanceId,
324
325
  sourcePath: a.currentPath()
@@ -328,39 +329,39 @@ function Wt(t) {
328
329
  navigator.vibrate(50);
329
330
  } catch {
330
331
  }
331
- t.dragContext.startDrag(T, e, c);
332
+ t.dragContext.startDrag(R, e, c);
332
333
  }, d = (e) => {
333
334
  if (y !== e.pointerId) return;
334
- const c = e.clientX - F, w = e.clientY - O, C = Math.sqrt(c * c + w * w);
335
- if (L() && !M && C > 10) {
335
+ const c = e.clientX - F, w = e.clientY - O, D = Math.sqrt(c * c + w * w);
336
+ if (L() && !M && D > 10) {
336
337
  n(!1);
337
338
  return;
338
339
  }
339
- !L() && !M && C > X && l(e.clientX, e.clientY), M && t.dragContext && t.dragContext.updateDrag(e.clientX, e.clientY);
340
+ !L() && !M && D > X && l(e.clientX, e.clientY), M && t.dragContext && t.dragContext.updateDrag(e.clientX, e.clientY);
340
341
  }, x = (e) => {
341
- y === e.pointerId && (S.onPointerUp(), n(!0));
342
- }, h = (e) => {
343
- y === e.pointerId && (S.onPointerCancel(), n(!1));
342
+ y === e.pointerId && ($.onPointerUp(), n(!0));
343
+ }, g = (e) => {
344
+ y === e.pointerId && ($.onPointerCancel(), n(!1));
344
345
  }, v = (e) => {
345
- f = e.pointerType, S.onPointerDown(e), !(e.pointerType === "mouse" && e.button !== 0) && (!t.enableDragDrop || !t.dragContext || (y = e.pointerId, F = e.clientX, O = e.clientY, M = !1, r(), L() && (j(), A = setTimeout(() => {
346
+ f = e.pointerType, $.onPointerDown(e), !(e.pointerType === "mouse" && e.button !== 0) && (!t.enableDragDrop || !t.dragContext || (y = e.pointerId, F = e.clientX, O = e.clientY, M = !1, r(), L() && (V(), A = setTimeout(() => {
346
347
  y !== null && !M && l(F, O);
347
348
  }, K))));
348
349
  }, z = (e) => {
349
- f = e.pointerType, S.onPointerMove(e);
350
+ f = e.pointerType, $.onPointerMove(e);
350
351
  }, o = (e) => {
351
- if (!g() || !t.dragContext) return;
352
+ if (!h() || !t.dragContext) return;
352
353
  const c = t.dragContext.dragState();
353
354
  if (!c.isDragging) return;
354
- Q(!0);
355
- const w = t.dragContext.canDropOn(c.draggedItems, t.item.path, t.item, t.instanceId), T = e.currentTarget?.getBoundingClientRect() ?? null;
355
+ U(!0);
356
+ const w = t.dragContext.canDropOn(c.draggedItems, t.item.path, t.item, t.instanceId), R = e.currentTarget?.getBoundingClientRect() ?? null;
356
357
  t.dragContext.setDropTarget({
357
358
  instanceId: t.instanceId,
358
359
  targetPath: t.item.path,
359
360
  targetItem: t.item
360
- }, w, T);
361
+ }, w, R);
361
362
  }, i = (e) => {
362
363
  if (!t.dragContext) return;
363
- Q(!1);
364
+ U(!1);
364
365
  const c = t.dragContext.dragState();
365
366
  c.isDragging && c.dropTarget?.targetPath === t.item.path && t.dragContext.setDropTarget(null, !1);
366
367
  }, s = (e) => {
@@ -368,7 +369,7 @@ function Wt(t) {
368
369
  M = !1;
369
370
  return;
370
371
  }
371
- if (!S.consumeClickSuppression(e)) {
372
+ if (!$.consumeClickSuppression(e)) {
372
373
  if (L()) {
373
374
  a.openItem(t.item);
374
375
  return;
@@ -379,62 +380,73 @@ function Wt(t) {
379
380
  L() || a.openItem(t.item);
380
381
  }, I = (e) => {
381
382
  if (e.preventDefault(), e.stopPropagation(), L()) return;
382
- $() || a.selectItem(t.item.id, !1);
383
+ C() || a.selectItem(t.item.id, !1);
383
384
  const c = a.getSelectedItemsList(), w = c.length > 0 ? c : [t.item];
384
385
  a.showContextMenu({
385
386
  x: e.clientX,
386
387
  y: e.clientY,
387
388
  items: w
388
389
  });
389
- }, k = () => t.item.type === "folder" ? wt : $t(t.item.extension), P = () => t.dragContext?.dragState(), R = () => P()?.isDragging ?? !1, Y = () => q() && R() && g();
390
+ }, k = () => t.item.type === "folder" ? bt : Dt(t.item.extension), P = () => t.dragContext?.dragState(), p = () => P()?.isDragging ?? !1, Y = () => q() && p() && h();
390
391
  return (() => {
391
- var e = Rt(), c = e.firstChild, w = c.firstChild;
392
- return e.addEventListener("pointerleave", i), e.addEventListener("pointerenter", o), e.$$pointermove = z, e.$$pointerdown = v, e.$$contextmenu = I, e.$$dblclick = b, e.$$click = s, u(w, m(mt, {
392
+ var e = Ft(), c = e.firstChild, w = c.firstChild;
393
+ return mt(e, ut(Mt, {
394
+ onClick: s,
395
+ onDblClick: b,
396
+ onContextMenu: I,
397
+ onPointerDown: v,
398
+ onPointerMove: z,
399
+ onPointerEnter: o,
400
+ onPointerLeave: i,
401
+ get class() {
402
+ return H(
403
+ "group w-full h-8 flex items-center text-xs cursor-pointer",
404
+ "transition-all duration-150 ease-out",
405
+ "hover:bg-accent/50",
406
+ "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring",
407
+ C() && "bg-accent text-accent-foreground",
408
+ // Drag state styling - being dragged items become translucent
409
+ Q() && "opacity-40 scale-[0.98]",
410
+ // Drop target styling - enhanced visual feedback
411
+ Y() && G() && ["bg-primary/15 outline outline-2 outline-primary/60", "scale-[1.01] shadow-sm shadow-primary/10"],
412
+ Y() && !G() && ["bg-destructive/10 outline outline-2 outline-dashed outline-destructive/50"]
413
+ );
414
+ }
415
+ }), !1, !0), u(w, m(ft, {
393
416
  get component() {
394
417
  return k();
395
418
  },
396
419
  class: "w-4 h-4"
397
- })), u(c, m(Tt, {
420
+ })), u(c, m(Et, {
398
421
  get name() {
399
422
  return t.item.name;
400
423
  },
401
424
  get match() {
402
- return p();
425
+ return T();
403
426
  }
404
427
  }), null), u(e, m(W, {
405
428
  get when() {
406
429
  return t.showModified;
407
430
  },
408
431
  get children() {
409
- var C = rt();
410
- return u(C, () => t.formatDate(t.item.modifiedAt)), E((T) => B(C, "width", `${t.modifiedWidthPx}px`)), C;
432
+ var D = rt();
433
+ return u(D, () => t.formatDate(t.item.modifiedAt)), E((R) => B(D, "width", `${t.modifiedWidthPx}px`)), D;
411
434
  }
412
435
  }), null), u(e, m(W, {
413
436
  get when() {
414
437
  return t.showSize;
415
438
  },
416
439
  get children() {
417
- var C = rt();
418
- return u(C, (() => {
419
- var T = ot(() => t.item.type === "folder");
420
- return () => T() ? "-" : t.formatSize(t.item.size);
421
- })()), E((T) => B(C, "width", `${t.sizeWidthPx}px`)), C;
440
+ var D = rt();
441
+ return u(D, (() => {
442
+ var R = ot(() => t.item.type === "folder");
443
+ return () => R() ? "-" : t.formatSize(t.item.size);
444
+ })()), E((R) => B(D, "width", `${t.sizeWidthPx}px`)), D;
422
445
  }
423
- }), null), E(() => U(e, H(
424
- "group w-full h-8 flex items-center text-xs cursor-pointer",
425
- "transition-all duration-150 ease-out",
426
- "hover:bg-accent/50",
427
- "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring",
428
- $() && "bg-accent text-accent-foreground",
429
- // Drag state styling - being dragged items become translucent
430
- V() && "opacity-40 scale-[0.98]",
431
- // Drop target styling - enhanced visual feedback
432
- Y() && G() && ["bg-primary/15 outline outline-2 outline-primary/60", "scale-[1.01] shadow-sm shadow-primary/10"],
433
- Y() && !G() && ["bg-destructive/10 outline outline-2 outline-dashed outline-destructive/50"]
434
- ))), e;
446
+ }), null), e;
435
447
  })();
436
448
  }
437
- ut(["click", "dblclick", "contextmenu", "pointerdown", "pointermove"]);
449
+ gt(["click"]);
438
450
  export {
439
- Vt as FileListView
451
+ Jt as FileListView
440
452
  };
@@ -0,0 +1,5 @@
1
+ export declare const FILE_BROWSER_TOUCH_TARGET_ATTR = "data-file-browser-touch-target";
2
+ export declare const FILE_BROWSER_TOUCH_TARGET_VALUE = "true";
3
+ export declare const fileBrowserTouchTargetAttrs: {
4
+ readonly "data-file-browser-touch-target": "true";
5
+ };
@@ -0,0 +1,8 @@
1
+ const t = "data-file-browser-touch-target", T = "true", r = {
2
+ [t]: T
3
+ };
4
+ export {
5
+ t as FILE_BROWSER_TOUCH_TARGET_ATTR,
6
+ T as FILE_BROWSER_TOUCH_TARGET_VALUE,
7
+ r as fileBrowserTouchTargetAttrs
8
+ };
@@ -0,0 +1,22 @@
1
+ import { type JSX } from 'solid-js';
2
+ export interface MobileKeyboardSuggestionItem {
3
+ id: string;
4
+ label: string;
5
+ detail?: string;
6
+ kind?: string;
7
+ }
8
+ export interface MobileKeyboardProps<TSuggestion extends MobileKeyboardSuggestionItem = MobileKeyboardSuggestionItem> extends JSX.HTMLAttributes<HTMLDivElement> {
9
+ /** Whether the keyboard is visible */
10
+ visible: boolean;
11
+ /** Called whenever a key resolves to a terminal payload */
12
+ onKey?: (key: string) => void;
13
+ /** Called when the user dismisses the keyboard from the built-in control */
14
+ onDismiss?: () => void;
15
+ /** Additional terminal-friendly quick insert keys shown in the utility strip */
16
+ quickInserts?: readonly string[];
17
+ /** Optional terminal suggestions shown in a dedicated candidate rail */
18
+ suggestions?: readonly TSuggestion[];
19
+ /** Called when the user picks one of the terminal suggestions */
20
+ onSuggestionSelect?: (suggestion: TSuggestion) => void;
21
+ }
22
+ export declare function MobileKeyboard<TSuggestion extends MobileKeyboardSuggestionItem = MobileKeyboardSuggestionItem>(props: MobileKeyboardProps<TSuggestion>): JSX.Element;