@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,38 +1,39 @@
1
- import { insert as s, createComponent as l, effect as C, className as h, template as x, setAttribute as Y, memo as S, setStyleProperty as q, delegateEvents as z } from "solid-js/web";
2
- import { createMemo as I, For as J, untrack as K, createSignal as Q, Show as b } from "solid-js";
3
- import { cn as v } from "../../utils/cn.js";
4
- import { useFileBrowser as _ } from "./FileBrowserContext.js";
5
- import { useFileBrowserDrag as W } from "../../context/FileBrowserDragContext.js";
6
- import { FolderOpenIcon as Z, FolderIcon as ee } from "./FileIcons.js";
7
- import { ChevronRight as te } from "../icons/index.js";
8
- import { createLongPressContextMenuHandlers as ne } from "./longPressContextMenu.js";
9
- var F = /* @__PURE__ */ x("<div>"), re = /* @__PURE__ */ x("<button type=button>"), ie = /* @__PURE__ */ x('<span class="ml-auto mr-2 text-[10px] text-muted-foreground/60 opacity-0 group-hover:opacity-100 transition-opacity">'), ae = /* @__PURE__ */ x('<div class="flex flex-col"><div><button type=button><span class="flex-shrink-0 w-4 h-4"></span><span class=truncate>'), oe = /* @__PURE__ */ x('<span class="flex-shrink-0 w-3.5 h-3.5">');
10
- function ve(e) {
11
- const c = _(), i = W(), y = () => (e.enableDragDrop ?? !0) && !!i, D = () => e.instanceId ?? "default", g = I(() => c.files().filter((r) => r.type === "folder"));
1
+ import { insert as s, createComponent as o, effect as D, className as b, template as h, setAttribute as Y, spread as q, mergeProps as z, memo as _, setStyleProperty as J, delegateEvents as K } from "solid-js/web";
2
+ import { createMemo as T, For as Q, untrack as W, createSignal as Z, Show as v } from "solid-js";
3
+ import { cn as m } from "../../utils/cn.js";
4
+ import { useFileBrowser as E } from "./FileBrowserContext.js";
5
+ import { useFileBrowserDrag as ee } from "../../context/FileBrowserDragContext.js";
6
+ import { FolderOpenIcon as te, FolderIcon as ne } from "./FileIcons.js";
7
+ import { ChevronRight as re } from "../icons/index.js";
8
+ import { createLongPressContextMenuHandlers as ie } from "./longPressContextMenu.js";
9
+ import { fileBrowserTouchTargetAttrs as ae } from "./touchInteractionGuard.js";
10
+ var M = /* @__PURE__ */ h("<div>"), oe = /* @__PURE__ */ h("<button type=button>"), le = /* @__PURE__ */ h('<span class="ml-auto mr-2 text-[10px] text-muted-foreground/60 opacity-0 group-hover:opacity-100 transition-opacity">'), se = /* @__PURE__ */ h('<div class="flex flex-col"><div><button type=button><span class="flex-shrink-0 w-4 h-4"></span><span class=truncate>'), ce = /* @__PURE__ */ h('<span class="flex-shrink-0 w-3.5 h-3.5">');
11
+ function Ce(e) {
12
+ const l = E(), i = ee(), C = () => (e.enableDragDrop ?? !0) && !!i, x = () => e.instanceId ?? "default", d = T(() => l.files().filter((r) => r.type === "folder"));
12
13
  return (() => {
13
- var r = F();
14
- return r.$$contextmenu = ($) => $.preventDefault(), s(r, l(L, {
14
+ var r = M();
15
+ return r.$$contextmenu = (y) => y.preventDefault(), s(r, o(F, {
15
16
  get items() {
16
- return g();
17
+ return d();
17
18
  },
18
19
  depth: 0,
19
20
  get instanceId() {
20
- return D();
21
+ return x();
21
22
  },
22
23
  get enableDragDrop() {
23
- return y();
24
+ return C();
24
25
  },
25
26
  dragContext: i
26
- })), C(() => h(r, v("flex flex-col", e.class))), r;
27
+ })), D(() => b(r, m("flex flex-col", e.class))), r;
27
28
  })();
28
29
  }
29
- function L(e) {
30
- const c = I(() => e.items.filter((i) => i.type === "folder"));
31
- return l(J, {
30
+ function F(e) {
31
+ const l = T(() => e.items.filter((i) => i.type === "folder"));
32
+ return o(Q, {
32
33
  get each() {
33
- return c();
34
+ return l();
34
35
  },
35
- children: (i) => l(le, {
36
+ children: (i) => o(de, {
36
37
  item: i,
37
38
  get depth() {
38
39
  return e.depth;
@@ -49,100 +50,110 @@ function L(e) {
49
50
  })
50
51
  });
51
52
  }
52
- function le(e) {
53
- const c = _(), i = () => c.isExpanded(e.item.path), y = () => c.currentPath() === e.item.path, D = K(() => e.item), g = ne(c, D, {
53
+ function de(e) {
54
+ const l = E(), i = () => l.isExpanded(e.item.path), C = () => l.currentPath() === e.item.path, x = W(() => e.item), d = ie(l, x, {
54
55
  selectOnOpen: !1
55
56
  });
56
57
  let r;
57
- const [$, P] = Q(!1), M = () => r === "touch" || r === "pen", T = I(() => e.item.children?.filter((t) => t.type === "folder").length ?? 0), u = () => T() > 0, k = () => {
58
+ const [y, I] = Z(!1), L = () => r === "touch" || r === "pen", p = T(() => e.item.children?.filter((t) => t.type === "folder").length ?? 0), u = () => p() > 0, $ = () => {
58
59
  if (!e.enableDragDrop || !e.dragContext) return !1;
59
60
  const t = e.dragContext.dragState();
60
61
  return t.isDragging ? e.dragContext.canDropOn(t.draggedItems, e.item.path, e.item, e.instanceId) : !1;
61
- }, O = () => e.dragContext?.dragState(), A = () => O()?.isDragging ?? !1, E = () => $() && A() && e.enableDragDrop, B = (t) => {
62
- r = t.pointerType, g.onPointerDown(t);
62
+ }, O = () => e.dragContext?.dragState(), A = () => O()?.isDragging ?? !1, k = () => y() && A() && e.enableDragDrop, B = (t) => {
63
+ r = t.pointerType, d.onPointerDown(t);
63
64
  }, H = (t) => {
64
- r = t.pointerType, g.onPointerMove(t);
65
+ r = t.pointerType, d.onPointerMove(t);
65
66
  }, N = (t) => {
66
- r = t.pointerType, g.onPointerUp();
67
+ r = t.pointerType, d.onPointerUp();
67
68
  }, R = (t) => {
68
- r = t.pointerType, g.onPointerCancel();
69
+ r = t.pointerType, d.onPointerCancel();
69
70
  }, U = (t) => {
70
71
  if (!e.enableDragDrop || !e.dragContext) return;
71
72
  const a = e.dragContext.dragState();
72
73
  if (!a.isDragging) return;
73
- P(!0);
74
- const o = e.dragContext.canDropOn(a.draggedItems, e.item.path, e.item, e.instanceId), p = t.currentTarget?.getBoundingClientRect() ?? null;
74
+ I(!0);
75
+ const g = e.dragContext.canDropOn(a.draggedItems, e.item.path, e.item, e.instanceId), P = t.currentTarget?.getBoundingClientRect() ?? null;
75
76
  e.dragContext.setDropTarget({
76
77
  instanceId: e.instanceId,
77
78
  targetPath: e.item.path,
78
79
  targetItem: e.item
79
- }, o, p);
80
+ }, g, P);
80
81
  }, V = (t) => {
81
82
  if (!e.dragContext) return;
82
- P(!1);
83
+ I(!1);
83
84
  const a = e.dragContext.dragState();
84
85
  a.isDragging && a.dropTarget?.targetPath === e.item.path && e.dragContext.setDropTarget(null, !1);
85
86
  }, j = (t) => {
86
- g.consumeClickSuppression(t) || c.navigateTo(D);
87
+ d.consumeClickSuppression(t) || l.navigateTo(x);
87
88
  }, G = (t) => {
88
- t.preventDefault(), t.stopPropagation(), !M() && c.showContextMenu({
89
+ t.preventDefault(), t.stopPropagation(), !L() && l.showContextMenu({
89
90
  x: t.clientX,
90
91
  y: t.clientY,
91
92
  items: [e.item]
92
93
  });
93
94
  }, X = () => {
94
- u() && c.toggleFolder(e.item.path);
95
+ u() && l.toggleFolder(e.item.path);
95
96
  };
96
97
  return (() => {
97
- var t = ae(), a = t.firstChild, o = a.firstChild, w = o.firstChild, p = w.nextSibling;
98
- return a.addEventListener("pointerleave", V), a.addEventListener("pointerenter", U), s(a, l(b, {
98
+ var t = se(), a = t.firstChild, g = a.firstChild, w = g.firstChild, P = w.nextSibling;
99
+ return a.addEventListener("pointerleave", V), a.addEventListener("pointerenter", U), s(a, o(v, {
99
100
  get when() {
100
101
  return u();
101
102
  },
102
103
  get fallback() {
103
- return oe();
104
+ return ce();
104
105
  },
105
106
  get children() {
106
- var n = re();
107
- return n.$$click = X, s(n, l(te, {
107
+ var n = oe();
108
+ return n.$$click = X, s(n, o(re, {
108
109
  class: "w-3 h-3 opacity-50"
109
- })), C((d) => {
110
- var f = v("flex-shrink-0 w-3.5 h-3.5 flex items-center justify-center cursor-pointer", "transition-transform duration-150", i() && "rotate-90", "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-sidebar-ring"), m = i() ? "Collapse folder" : "Expand folder";
111
- return f !== d.e && h(n, d.e = f), m !== d.t && Y(n, "aria-label", d.t = m), d;
110
+ })), D((c) => {
111
+ var f = m("flex-shrink-0 w-3.5 h-3.5 flex items-center justify-center cursor-pointer", "transition-transform duration-150", i() && "rotate-90", "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-sidebar-ring"), S = i() ? "Collapse folder" : "Expand folder";
112
+ return f !== c.e && b(n, c.e = f), S !== c.t && Y(n, "aria-label", c.t = S), c;
112
113
  }, {
113
114
  e: void 0,
114
115
  t: void 0
115
116
  }), n;
116
117
  }
117
- }), o), o.addEventListener("pointercancel", R), o.$$pointerup = N, o.$$pointermove = H, o.$$pointerdown = B, o.$$contextmenu = G, o.$$click = j, s(w, l(b, {
118
+ }), g), q(g, z(ae, {
119
+ onClick: j,
120
+ onContextMenu: G,
121
+ onPointerDown: B,
122
+ onPointerMove: H,
123
+ onPointerUp: N,
124
+ onPointerCancel: R,
125
+ get class() {
126
+ return m("flex items-center gap-1 flex-1 min-w-0 text-left cursor-pointer pl-1", "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-sidebar-ring");
127
+ }
128
+ }), !1, !0), s(w, o(v, {
118
129
  get when() {
119
- return S(() => !!u())() && i();
130
+ return _(() => !!u())() && i();
120
131
  },
121
132
  get fallback() {
122
- return l(ee, {
133
+ return o(ne, {
123
134
  class: "w-4 h-4"
124
135
  });
125
136
  },
126
137
  get children() {
127
- return l(Z, {
138
+ return o(te, {
128
139
  class: "w-4 h-4"
129
140
  });
130
141
  }
131
- })), s(p, () => e.item.name), s(o, l(b, {
142
+ })), s(P, () => e.item.name), s(g, o(v, {
132
143
  get when() {
133
144
  return u();
134
145
  },
135
146
  get children() {
136
- var n = ie();
137
- return s(n, T), n;
147
+ var n = le();
148
+ return s(n, p), n;
138
149
  }
139
- }), null), s(t, l(b, {
150
+ }), null), s(t, o(v, {
140
151
  get when() {
141
- return S(() => !!i())() && u();
152
+ return _(() => !!i())() && u();
142
153
  },
143
154
  get children() {
144
- var n = F();
145
- return s(n, l(L, {
155
+ var n = M();
156
+ return s(n, o(F, {
146
157
  get items() {
147
158
  return e.item.children ?? [];
148
159
  },
@@ -158,27 +169,26 @@ function le(e) {
158
169
  get dragContext() {
159
170
  return e.dragContext;
160
171
  }
161
- })), C(() => h(n, v("overflow-hidden transition-all duration-200", i() ? "opacity-100" : "opacity-0"))), n;
172
+ })), D(() => b(n, m("overflow-hidden transition-all duration-200", i() ? "opacity-100" : "opacity-0"))), n;
162
173
  }
163
- }), null), C((n) => {
164
- var d = v(
174
+ }), null), D((n) => {
175
+ var c = m(
165
176
  "group flex items-center w-full py-1 text-xs",
166
177
  "transition-all duration-150 ease-out",
167
178
  "hover:bg-sidebar-accent/60",
168
- y() && "bg-sidebar-accent text-sidebar-accent-foreground font-medium",
179
+ C() && "bg-sidebar-accent text-sidebar-accent-foreground font-medium",
169
180
  // Drop target styling - enhanced visual feedback
170
- E() && k() && ["bg-primary/15 outline outline-2 outline-primary/60", "shadow-sm shadow-primary/10"],
171
- E() && !k() && ["bg-destructive/10 outline outline-2 outline-dashed outline-destructive/50"]
172
- ), f = `${8 + e.depth * 12}px`, m = v("flex items-center gap-1 flex-1 min-w-0 text-left cursor-pointer pl-1", "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-sidebar-ring");
173
- return d !== n.e && h(a, n.e = d), f !== n.t && q(a, "padding-left", n.t = f), m !== n.a && h(o, n.a = m), n;
181
+ k() && $() && ["bg-primary/15 outline outline-2 outline-primary/60", "shadow-sm shadow-primary/10"],
182
+ k() && !$() && ["bg-destructive/10 outline outline-2 outline-dashed outline-destructive/50"]
183
+ ), f = `${8 + e.depth * 12}px`;
184
+ return c !== n.e && b(a, n.e = c), f !== n.t && J(a, "padding-left", n.t = f), n;
174
185
  }, {
175
186
  e: void 0,
176
- t: void 0,
177
- a: void 0
187
+ t: void 0
178
188
  }), t;
179
189
  })();
180
190
  }
181
- z(["contextmenu", "click", "pointerdown", "pointermove", "pointerup"]);
191
+ K(["contextmenu", "click"]);
182
192
  export {
183
- ve as DirectoryTree
193
+ Ce as DirectoryTree
184
194
  };