@floegence/floe-webapp-core 0.35.21 → 0.35.23

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 (33) hide show
  1. package/dist/chat.css +33 -7
  2. package/dist/components/chat/blocks/FileBlock.js +42 -27
  3. package/dist/components/chat/blocks/ToolCallBlock.js +150 -149
  4. package/dist/components/file-browser/Breadcrumb.js +73 -72
  5. package/dist/components/file-browser/DragPreview.d.ts +2 -2
  6. package/dist/components/file-browser/DragPreview.js +15 -15
  7. package/dist/components/file-browser/FileBrowser.js +13 -13
  8. package/dist/components/file-browser/index.d.ts +1 -0
  9. package/dist/components/layout/ActivityBar.d.ts +1 -0
  10. package/dist/components/layout/ActivityBar.js +51 -45
  11. package/dist/components/layout/MobileTabBar.d.ts +1 -0
  12. package/dist/components/layout/MobileTabBar.js +109 -65
  13. package/dist/components/layout/Shell.js +190 -158
  14. package/dist/components/layout/Sidebar.d.ts +1 -0
  15. package/dist/components/layout/Sidebar.js +33 -31
  16. package/dist/components/layout/SidebarPane.d.ts +1 -0
  17. package/dist/components/layout/SidebarPane.js +40 -37
  18. package/dist/components/layout/TopBar.d.ts +1 -0
  19. package/dist/components/layout/TopBar.js +23 -22
  20. package/dist/components/ui/Dropdown.d.ts +13 -0
  21. package/dist/components/ui/Dropdown.js +263 -145
  22. package/dist/components/ui/Tabs.d.ts +4 -0
  23. package/dist/components/ui/Tabs.js +207 -149
  24. package/dist/context/FloeConfigContext.d.ts +17 -0
  25. package/dist/context/FloeConfigContext.js +34 -25
  26. package/dist/context/NotificationContext.js +76 -69
  27. package/dist/file-browser.js +19 -17
  28. package/dist/full.js +302 -300
  29. package/dist/styles/tokens.d.ts +4 -4
  30. package/dist/styles/tokens.js +55 -14
  31. package/dist/styles.css +1 -1
  32. package/dist/themes/light.css +2 -2
  33. package/package.json +1 -1
@@ -1,106 +1,106 @@
1
- import { insert as R, createComponent as a, memo as A, effect as b, className as x, template as W, use as H, delegateEvents as P } from "solid-js/web";
2
- import { createSignal as y, onMount as B, createMemo as M, For as O, Show as T, onCleanup as F } from "solid-js";
3
- import { cn as C } from "../../utils/cn.js";
1
+ import { insert as E, createComponent as a, memo as $, effect as D, className as L, template as b, use as H, delegateEvents as P } from "solid-js/web";
2
+ import { createSignal as B, onMount as y, createMemo as I, For as O, Show as k, onCleanup as F } from "solid-js";
3
+ import { cn as x } from "../../utils/cn.js";
4
4
  import { useFileBrowser as G } from "./FileBrowserContext.js";
5
- import { ChevronRight as E } from "../icons/index.js";
5
+ import { ChevronRight as M } from "../icons/index.js";
6
6
  import { Dropdown as z } from "../ui/Dropdown.js";
7
- var X = /* @__PURE__ */ W("<nav aria-label=Breadcrumb>"), j = /* @__PURE__ */ W('<button type=button title="Show hidden path segments">…'), q = /* @__PURE__ */ W('<button type=button><span class="truncate max-w-[120px] block">');
8
- const p = 16, J = 28, D = 12, K = 7, Q = 120, U = 100;
9
- function V(r) {
10
- const n = r.length * K;
11
- return Math.min(n + D, Q + D);
7
+ var X = /* @__PURE__ */ b("<nav aria-label=Breadcrumb>"), j = /* @__PURE__ */ b("<span>…"), q = /* @__PURE__ */ b('<button type=button><span class="truncate max-w-[120px] block">');
8
+ const p = 16, J = 28, T = 12, K = 7, Q = 120, U = 100;
9
+ function V(n) {
10
+ const t = n.length * K;
11
+ return Math.min(t + T, Q + T);
12
12
  }
13
- function ce(r) {
14
- const n = G();
15
- let s;
16
- const [t, c] = y(0);
17
- B(() => {
18
- if (!s) return;
13
+ function ce(n) {
14
+ const t = G();
15
+ let o;
16
+ const [r, c] = B(0);
17
+ y(() => {
18
+ if (!o) return;
19
19
  const e = () => {
20
- s && c(s.offsetWidth);
20
+ o && c(o.offsetWidth);
21
21
  };
22
22
  e();
23
- const o = new ResizeObserver(e);
24
- o.observe(s), F(() => o.disconnect());
23
+ const s = new ResizeObserver(e);
24
+ s.observe(o), F(() => s.disconnect());
25
25
  });
26
- const d = M(() => {
27
- const e = n.currentPath(), o = n.homeLabel();
26
+ const h = I(() => {
27
+ const e = t.currentPath(), s = t.homeLabel();
28
28
  if (e === "/" || e === "")
29
29
  return [{
30
- name: o,
30
+ name: s,
31
31
  path: "/"
32
32
  }];
33
33
  const l = e.split("/").filter(Boolean), i = [{
34
- name: o,
34
+ name: s,
35
35
  path: "/"
36
36
  }];
37
- let f = "";
38
- for (const g of l)
39
- f += "/" + g, i.push({
40
- name: g,
41
- path: f
37
+ let g = "";
38
+ for (const f of l)
39
+ g += "/" + f, i.push({
40
+ name: f,
41
+ path: g
42
42
  });
43
43
  return i;
44
- }), m = M(() => {
45
- const e = d(), o = t();
46
- if (o < U || e.length <= 2)
44
+ }), m = I(() => {
45
+ const e = h(), s = r();
46
+ if (s < U || e.length <= 2)
47
47
  return {
48
48
  collapsed: [],
49
49
  visible: e,
50
50
  shouldCollapse: !1
51
51
  };
52
- const l = e.map((u) => V(u.name)), i = l[0], f = l[e.length - 1], g = p, $ = e.length > 1 ? p : 0, _ = i + f + g + $;
53
- if (_ > o && e.length > 2)
52
+ const l = e.map((d) => V(d.name)), i = l[0], g = l[e.length - 1], f = p, R = e.length > 1 ? p : 0, C = i + g + f + R;
53
+ if (C > s && e.length > 2)
54
54
  return {
55
55
  collapsed: e.slice(1, -1),
56
56
  visible: [e[0], e[e.length - 1]],
57
57
  shouldCollapse: !0
58
58
  };
59
- const h = e.slice(1, -1), v = [];
60
- let w = o - _;
61
- const L = h.length > 0 ? J + p : 0;
62
- for (let u = h.length - 1; u >= 0; u--) {
63
- const k = l[u + 1] + p, N = u > 0 ? L : 0;
64
- if (w - N >= k)
65
- v.unshift(h[u]), w -= k;
59
+ const u = e.slice(1, -1), v = [];
60
+ let S = s - C;
61
+ const A = u.length > 0 ? J + p : 0;
62
+ for (let d = u.length - 1; d >= 0; d--) {
63
+ const _ = l[d + 1] + p, N = d > 0 ? A : 0;
64
+ if (S - N >= _)
65
+ v.unshift(u[d]), S -= _;
66
66
  else
67
67
  break;
68
68
  }
69
- const I = h.slice(0, h.length - v.length);
69
+ const w = u.slice(0, u.length - v.length);
70
70
  return {
71
- collapsed: I,
71
+ collapsed: w,
72
72
  visible: [e[0], ...v, e[e.length - 1]],
73
- shouldCollapse: I.length > 0
73
+ shouldCollapse: w.length > 0
74
74
  };
75
- }), S = (e) => {
76
- n.setCurrentPath(e.path);
75
+ }), W = (e) => {
76
+ t.setCurrentPath(e.path);
77
77
  };
78
78
  return (() => {
79
- var e = X(), o = s;
80
- return typeof o == "function" ? H(o, e) : s = e, R(e, a(O, {
79
+ var e = X(), s = o;
80
+ return typeof s == "function" ? H(s, e) : o = e, E(e, a(O, {
81
81
  get each() {
82
82
  return m().visible;
83
83
  },
84
- children: (l, i) => [a(T, {
84
+ children: (l, i) => [a(k, {
85
85
  get when() {
86
86
  return i() > 0;
87
87
  },
88
88
  get children() {
89
- return a(E, {
89
+ return a(M, {
90
90
  class: "w-3 h-3 text-muted-foreground/50 flex-shrink-0"
91
91
  });
92
92
  }
93
- }), a(T, {
93
+ }), a(k, {
94
94
  get when() {
95
- return A(() => !!m().shouldCollapse)() && i() === 1;
95
+ return $(() => !!m().shouldCollapse)() && i() === 1;
96
96
  },
97
97
  get children() {
98
98
  return [a(Y, {
99
99
  get segments() {
100
100
  return m().collapsed;
101
101
  },
102
- onSelect: S
103
- }), a(E, {
102
+ onSelect: W
103
+ }), a(M, {
104
104
  class: "w-3 h-3 text-muted-foreground/50 flex-shrink-0"
105
105
  })];
106
106
  }
@@ -109,43 +109,44 @@ function ce(r) {
109
109
  get isLast() {
110
110
  return i() === m().visible.length - 1;
111
111
  },
112
- onClick: () => S(l)
112
+ onClick: () => W(l)
113
113
  })]
114
- })), b(() => x(e, C("flex items-center gap-1 min-w-0 overflow-hidden", r.class))), e;
114
+ })), D(() => L(e, x("flex items-center gap-1 min-w-0 overflow-hidden", n.class))), e;
115
115
  })();
116
116
  }
117
- function Y(r) {
118
- const n = () => r.segments.map((t) => ({
119
- id: t.path,
120
- label: t.name
117
+ function Y(n) {
118
+ const t = () => n.segments.map((r) => ({
119
+ id: r.path,
120
+ label: r.name
121
121
  }));
122
122
  return a(z, {
123
123
  get trigger() {
124
- return (() => {
125
- var t = j();
126
- return b(() => x(t, C("text-xs px-1.5 py-0.5 rounded cursor-pointer flex-shrink-0", "transition-all duration-100", "text-muted-foreground hover:text-foreground hover:bg-muted/50", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring"))), t;
127
- })();
124
+ return j();
128
125
  },
126
+ get triggerClass() {
127
+ return x("inline-flex items-center text-xs px-1.5 py-0.5 rounded flex-shrink-0", "transition-all duration-100", "text-muted-foreground hover:text-foreground hover:bg-muted/50");
128
+ },
129
+ triggerAriaLabel: "Show hidden path segments",
129
130
  get items() {
130
- return n();
131
+ return t();
131
132
  },
132
- onSelect: (t) => {
133
- const c = r.segments.find((d) => d.path === t);
134
- c && r.onSelect(c);
133
+ onSelect: (r) => {
134
+ const c = n.segments.find((h) => h.path === r);
135
+ c && n.onSelect(c);
135
136
  },
136
137
  align: "start"
137
138
  });
138
139
  }
139
- function Z(r) {
140
+ function Z(n) {
140
141
  return (() => {
141
- var n = q(), s = n.firstChild;
142
- return n.$$click = () => r.onClick(), R(s, () => r.segment.name), b((t) => {
143
- var c = r.isLast, d = C("text-xs px-1.5 py-0.5 rounded cursor-pointer flex-shrink-0", "transition-all duration-100", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring", r.isLast ? "font-medium text-foreground cursor-default" : "text-muted-foreground hover:text-foreground hover:bg-muted/50");
144
- return c !== t.e && (n.disabled = t.e = c), d !== t.t && x(n, t.t = d), t;
142
+ var t = q(), o = t.firstChild;
143
+ return t.$$click = () => n.onClick(), E(o, () => n.segment.name), D((r) => {
144
+ var c = n.isLast, h = x("text-xs px-1.5 py-0.5 rounded cursor-pointer flex-shrink-0", "transition-all duration-100", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring", n.isLast ? "font-medium text-foreground cursor-default" : "text-muted-foreground hover:text-foreground hover:bg-muted/50");
145
+ return c !== r.e && (t.disabled = r.e = c), h !== r.t && L(t, r.t = h), r;
145
146
  }, {
146
147
  e: void 0,
147
148
  t: void 0
148
- }), n;
149
+ }), t;
149
150
  })();
150
151
  }
151
152
  P(["click"]);
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Floating preview that follows the cursor during drag operations.
2
+ * Floating preview that follows the cursor during file-browser drag operations.
3
3
  * Shows dragged items with a count badge for multiple items.
4
4
  * Uses Motion library for smooth animations.
5
5
  * Includes fly-to-target animation when dropping onto a valid target.
6
6
  */
7
- export declare function DragPreview(): import("solid-js").JSX.Element;
7
+ export declare function FileBrowserDragPreview(): import("solid-js").JSX.Element;
@@ -1,15 +1,15 @@
1
- import { createComponent as o, Portal as N, insert as a, effect as u, className as $, memo as V, template as l, setAttribute as A } from "solid-js/web";
2
- import { createSignal as F, createEffect as j, createMemo as d, Show as m, For as B } from "solid-js";
1
+ import { createComponent as o, Portal as N, insert as l, effect as u, className as $, memo as B, template as a, setAttribute as A } from "solid-js/web";
2
+ import { createSignal as F, createEffect as V, createMemo as d, Show as m, For as j } from "solid-js";
3
3
  import { Presence as U, Motion as X } from "../../node_modules/.pnpm/solid-motionone@1.0.4_solid-js@1.9.11/node_modules/solid-motionone/dist/index.js";
4
4
  import { cn as f } from "../../utils/cn.js";
5
5
  import { useFileBrowserDrag as G } from "../../context/FileBrowserDragContext.js";
6
6
  import { FileItemIcon as W } from "./FileIcons.js";
7
- var Y = /* @__PURE__ */ l('<div class="text-[10px] text-muted-foreground pl-6">and <!> more...'), q = /* @__PURE__ */ l("<span>Drop to move"), y = /* @__PURE__ */ l("<div>"), H = /* @__PURE__ */ l('<div class="flex items-center gap-2.5 text-xs text-foreground"><span class="flex-shrink-0 w-4 h-4"></span><span class="truncate font-medium">'), J = /* @__PURE__ */ l("<span>Cannot drop here"), K = /* @__PURE__ */ l('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><polyline points="20 6 9 17 4 12">'), L = /* @__PURE__ */ l('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><line x1=18 y1=6 x2=6 y2=18></line><line x1=6 y1=6 x2=18 y2=18>');
7
+ var Y = /* @__PURE__ */ a('<div class="text-[10px] text-muted-foreground pl-6">and <!> more...'), q = /* @__PURE__ */ a("<span>Drop to move"), y = /* @__PURE__ */ a("<div>"), H = /* @__PURE__ */ a('<div class="flex items-center gap-2.5 text-xs text-foreground"><span class="flex-shrink-0 w-4 h-4"></span><span class="truncate font-medium">'), J = /* @__PURE__ */ a("<span>Cannot drop here"), K = /* @__PURE__ */ a('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><polyline points="20 6 9 17 4 12">'), L = /* @__PURE__ */ a('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><line x1=18 y1=6 x2=6 y2=18></line><line x1=6 y1=6 x2=18 y2=18>');
8
8
  const x = 3, P = 4, T = 4, Q = 0.2;
9
- function at() {
9
+ function lt() {
10
10
  const g = G(), n = () => g?.dragState(), S = () => n()?.isDragging ?? !1, C = () => n()?.isDragEnding ?? !1, [c, h] = F(null), [s, w] = F(!1);
11
11
  let _ = !1;
12
- j(() => {
12
+ V(() => {
13
13
  const t = S(), e = C();
14
14
  if (t && !e && !_ && (h(null), w(!1)), e && !_) {
15
15
  const r = n();
@@ -57,7 +57,7 @@ function at() {
57
57
  get children() {
58
58
  return o(m, {
59
59
  get when() {
60
- return V(() => !!R())() && E().length > 0;
60
+ return B(() => !!R())() && E().length > 0;
61
61
  },
62
62
  get children() {
63
63
  return o(N, {
@@ -91,32 +91,32 @@ function at() {
91
91
  get children() {
92
92
  return [(() => {
93
93
  var t = y();
94
- return a(t, o(B, {
94
+ return l(t, o(j, {
95
95
  get each() {
96
96
  return E();
97
97
  },
98
98
  children: (e) => (() => {
99
99
  var r = H(), i = r.firstChild, D = i.nextSibling;
100
- return a(i, o(W, {
100
+ return l(i, o(W, {
101
101
  item: e,
102
102
  class: "w-4 h-4"
103
- })), a(D, () => e.name), r;
103
+ })), l(D, () => e.name), r;
104
104
  })()
105
- }), null), a(t, o(m, {
105
+ }), null), l(t, o(m, {
106
106
  get when() {
107
107
  return k() > 0;
108
108
  },
109
109
  get children() {
110
110
  var e = Y(), r = e.firstChild, i = r.nextSibling;
111
- return i.nextSibling, a(e, k, i), e;
111
+ return i.nextSibling, l(e, k, i), e;
112
112
  }
113
- }), null), a(t, o(m, {
113
+ }), null), l(t, o(m, {
114
114
  get when() {
115
115
  return I();
116
116
  },
117
117
  get children() {
118
118
  var e = y();
119
- return a(e, o(m, {
119
+ return l(e, o(m, {
120
120
  get when() {
121
121
  return p();
122
122
  },
@@ -152,7 +152,7 @@ function at() {
152
152
  },
153
153
  get children() {
154
154
  var t = y();
155
- return a(t, v), u(() => $(t, f(
155
+ return l(t, v), u(() => $(t, f(
156
156
  "absolute -top-2 -right-2",
157
157
  "min-w-[20px] h-5 px-1.5 rounded-full",
158
158
  "bg-foreground text-background",
@@ -186,5 +186,5 @@ function tt(g) {
186
186
  })();
187
187
  }
188
188
  export {
189
- at as DragPreview
189
+ lt as FileBrowserDragPreview
190
190
  };
@@ -1,4 +1,4 @@
1
- import { createComponent as n, insert as i, use as k, memo as E, effect as K, className as L, template as I, delegateEvents as B } from "solid-js/web";
1
+ import { createComponent as n, insert as i, use as k, memo as E, effect as B, className as K, template as I, delegateEvents as L } from "solid-js/web";
2
2
  import { createSignal as O, onMount as V, onCleanup as H, createEffect as N, Show as c } from "solid-js";
3
3
  import { cn as T } from "../../utils/cn.js";
4
4
  import { useLayout as j } from "../../context/LayoutContext.js";
@@ -11,9 +11,9 @@ import { FileListView as Y } from "./FileListView.js";
11
11
  import { FileGridView as Z } from "./FileGridView.js";
12
12
  import { FileBrowserToolbar as p } from "./FileBrowserToolbar.js";
13
13
  import { FileContextMenu as ee } from "./FileContextMenu.js";
14
- import { DragPreview as te } from "./DragPreview.js";
14
+ import { FileBrowserDragPreview as te } from "./DragPreview.js";
15
15
  var re = /* @__PURE__ */ I('<div class="border-b border-border">'), ne = /* @__PURE__ */ I('<div><div class="flex flex-1 min-h-0 relative"><div class="flex-1 min-w-0 flex flex-col"><div class="flex-1 min-h-0"></div><div class="flex items-center justify-between px-3 py-1 border-t border-border text-[10px] text-muted-foreground"><span> items</span><span class="truncate max-w-[200px]">');
16
- function we(e) {
16
+ function Ce(e) {
17
17
  return n(q, {
18
18
  get files() {
19
19
  return e.files;
@@ -101,7 +101,7 @@ function we(e) {
101
101
  }
102
102
  function ie(e) {
103
103
  const r = J(), M = j(), o = G(), h = () => M.isMobile(), [v, b] = O(null), D = () => v() ?? r.sidebarWidth(), y = () => e.sidebarResizable ?? !0, a = () => (e.enableDragDrop ?? !0) && !!o, d = () => e.instanceId ?? `filebrowser-${Math.random().toString(36).slice(2, 9)}`;
104
- let C, w = null, x = null;
104
+ let w, C = null, x = null;
105
105
  V(() => {
106
106
  if (!o || !a()) return;
107
107
  const t = {
@@ -109,7 +109,7 @@ function ie(e) {
109
109
  currentPath: r.currentPath,
110
110
  files: r.files,
111
111
  onDragMove: e.onDragMove,
112
- getScrollContainer: () => w,
112
+ getScrollContainer: () => C,
113
113
  getSidebarScrollContainer: () => x,
114
114
  optimisticRemove: r.optimisticRemove,
115
115
  optimisticInsert: r.optimisticInsert
@@ -128,7 +128,7 @@ function ie(e) {
128
128
  !m && t && e.hideSidebarOnMobile !== !1 && !r.sidebarCollapsed() && r.toggleSidebar(), m = t;
129
129
  });
130
130
  const R = (t) => {
131
- (t.metaKey || t.ctrlKey) && t.key.toLowerCase() === "f" && (t.preventDefault(), r.setFilterActive(!0), Q(() => C?.focus()));
131
+ (t.metaKey || t.ctrlKey) && t.key.toLowerCase() === "f" && (t.preventDefault(), r.setFilterActive(!0), Q(() => w?.focus()));
132
132
  }, P = () => !r.sidebarCollapsed() || !h(), $ = () => {
133
133
  b(r.sidebarWidth());
134
134
  }, W = (t) => {
@@ -138,7 +138,7 @@ function ie(e) {
138
138
  t !== null && (r.setSidebarWidth(t), b(null));
139
139
  };
140
140
  return (() => {
141
- var t = ne(), s = t.firstChild, f = s.firstChild, g = f.firstChild, A = g.nextSibling, u = A.firstChild, F = u.firstChild, _ = u.nextSibling;
141
+ var t = ne(), s = t.firstChild, f = s.firstChild, g = f.firstChild, F = g.nextSibling, u = F.firstChild, A = u.firstChild, _ = u.nextSibling;
142
142
  return t.$$keydown = R, i(t, n(c, {
143
143
  get when() {
144
144
  return e.header;
@@ -182,12 +182,12 @@ function ie(e) {
182
182
  });
183
183
  }
184
184
  }), f), i(f, n(p, {
185
- filterInputRef: (l) => C = l,
185
+ filterInputRef: (l) => w = l,
186
186
  get endActions() {
187
187
  return e.toolbarEndActions;
188
188
  }
189
189
  }), g), k((l) => {
190
- w = l;
190
+ C = l;
191
191
  }, g), i(g, n(c, {
192
192
  get when() {
193
193
  return r.viewMode() === "list";
@@ -212,7 +212,7 @@ function ie(e) {
212
212
  }
213
213
  });
214
214
  }
215
- })), i(u, () => r.currentFiles().length, F), i(u, n(c, {
215
+ })), i(u, () => r.currentFiles().length, A), i(u, n(c, {
216
216
  get when() {
217
217
  return r.filterQueryApplied().trim();
218
218
  },
@@ -246,10 +246,10 @@ function ie(e) {
246
246
  get children() {
247
247
  return n(te, {});
248
248
  }
249
- }), null), K(() => L(t, T("flex flex-col h-full min-h-0 bg-background", "border border-border rounded-lg overflow-hidden", "shadow-sm", e.class))), t;
249
+ }), null), B(() => K(t, T("flex flex-col h-full min-h-0 bg-background", "border border-border rounded-lg overflow-hidden", "shadow-sm", e.class))), t;
250
250
  })();
251
251
  }
252
- B(["keydown"]);
252
+ L(["keydown"]);
253
253
  export {
254
- we as FileBrowser
254
+ Ce as FileBrowser
255
255
  };
@@ -6,5 +6,6 @@ export { FileGridView, type FileGridViewProps } from './FileGridView';
6
6
  export { FileContextMenu, type FileContextMenuProps, type BuiltinContextMenuAction, type HideItemsValue } from './FileContextMenu';
7
7
  export { Breadcrumb, type BreadcrumbProps } from './Breadcrumb';
8
8
  export { FileBrowserToolbar, type FileBrowserToolbarProps } from './FileBrowserToolbar';
9
+ export { FileBrowserDragPreview } from './DragPreview';
9
10
  export { FolderIcon, FolderOpenIcon, FileIcon, CodeFileIcon, JavaScriptFileIcon, TypeScriptFileIcon, ShellScriptFileIcon, ImageFileIcon, DocumentFileIcon, ConfigFileIcon, StyleFileIcon, FileItemIcon, getFileIcon, resolveFileItemIcon, } from './FileIcons';
10
11
  export type { FileItem, FileItemIconOverride, ViewMode, SortField, SortDirection, SortConfig, FileListColumnRatios, FileBrowserContextValue, ContextMenuActionType, ContextMenuItem, ContextMenuEvent, ContextMenuCallbacks, OptimisticUpdateType, OptimisticRemove, OptimisticUpdate, OptimisticInsert, OptimisticOperation, ScrollPosition, } from './types';
@@ -25,6 +25,7 @@ export interface ActivityBarProps {
25
25
  }) => void;
26
26
  collapsed?: boolean;
27
27
  onCollapsedChange?: (collapsed: boolean) => void;
28
+ ariaLabel?: string;
28
29
  class?: string;
29
30
  }
30
31
  /**
@@ -1,104 +1,110 @@
1
- import { insert as a, createComponent as l, effect as f, className as b, template as s, Dynamic as A, memo as k, setAttribute as y, delegateEvents as w } from "solid-js/web";
2
- import { createMemo as v, For as x, Show as g } from "solid-js";
3
- import { cn as m } from "../../utils/cn.js";
4
- import { deferNonBlocking as I } from "../../utils/defer.js";
5
- import { Tooltip as $ } from "../ui/Tooltip.js";
1
+ import { insert as c, createComponent as a, effect as f, className as g, setAttribute as m, template as s, Dynamic as k, memo as w, delegateEvents as I } from "solid-js/web";
2
+ import { createMemo as b, For as C, Show as h } from "solid-js";
3
+ import { cn as y } from "../../utils/cn.js";
4
+ import { deferNonBlocking as $ } from "../../utils/defer.js";
5
+ import { Tooltip as B } from "../ui/Tooltip.js";
6
6
  import { resolveActivityBarClick as _ } from "./activityBarBehavior.js";
7
- var B = /* @__PURE__ */ s('<div class="flex flex-col">'), p = /* @__PURE__ */ s('<div data-floe-shell-slot=activity-bar style=border-right-color:var(--activity-bar-border)><div class="flex flex-col">'), S = /* @__PURE__ */ s('<div class="absolute left-0 top-0 w-1 h-full bg-primary rounded-r">'), j = /* @__PURE__ */ s("<span>"), N = /* @__PURE__ */ s("<button type=button>");
8
- function V(e) {
9
- const o = v(() => e.activeId), r = v(() => e.collapsed ?? !1), t = v(() => e.onActiveChange), c = v(() => e.onCollapsedChange), u = (i) => {
7
+ var S = /* @__PURE__ */ s('<div class="flex flex-col">'), j = /* @__PURE__ */ s('<nav data-floe-shell-slot=activity-bar style=border-right-color:var(--activity-bar-border)><div class="flex flex-col">'), N = /* @__PURE__ */ s('<div class="absolute left-0 top-0 w-1 h-full bg-primary rounded-r">'), q = /* @__PURE__ */ s("<span>"), D = /* @__PURE__ */ s("<button type=button>");
8
+ function z(e) {
9
+ const o = b(() => e.activeId), n = b(() => e.collapsed ?? !1), t = b(() => e.onActiveChange), d = b(() => e.onCollapsedChange), v = (i) => {
10
10
  if (i.onClick) {
11
- I(() => i.onClick());
11
+ $(() => i.onClick());
12
12
  return;
13
13
  }
14
- const n = _({
14
+ const l = _({
15
15
  clickedId: i.id,
16
16
  activeId: o(),
17
- collapsed: r(),
17
+ collapsed: n(),
18
18
  behavior: i.collapseBehavior
19
19
  });
20
- n.nextActiveId !== o() && (typeof n.openSidebar == "boolean" ? t()(n.nextActiveId, {
21
- openSidebar: n.openSidebar
22
- }) : t()(n.nextActiveId)), typeof n.nextCollapsed == "boolean" && c()?.(n.nextCollapsed);
20
+ l.nextActiveId !== o() && (typeof l.openSidebar == "boolean" ? t()(l.nextActiveId, {
21
+ openSidebar: l.openSidebar
22
+ }) : t()(l.nextActiveId)), typeof l.nextCollapsed == "boolean" && d()?.(l.nextCollapsed);
23
23
  };
24
24
  return (() => {
25
- var i = p(), n = i.firstChild;
26
- return a(n, l(x, {
25
+ var i = j(), l = i.firstChild;
26
+ return c(l, a(C, {
27
27
  get each() {
28
28
  return e.items;
29
29
  },
30
- children: (d) => l(C, {
31
- item: d,
30
+ children: (r) => a(A, {
31
+ item: r,
32
32
  get isActive() {
33
- return o() === d.id;
33
+ return o() === r.id;
34
34
  },
35
- onClick: () => u(d)
35
+ onClick: () => v(r)
36
36
  })
37
- })), a(i, l(g, {
37
+ })), c(i, a(h, {
38
38
  get when() {
39
39
  return e.bottomItems?.length;
40
40
  },
41
41
  get children() {
42
- var d = B();
43
- return a(d, l(x, {
42
+ var r = S();
43
+ return c(r, a(C, {
44
44
  get each() {
45
45
  return e.bottomItems;
46
46
  },
47
- children: (h) => l(C, {
48
- item: h,
47
+ children: (u) => a(A, {
48
+ item: u,
49
49
  isActive: !1,
50
- onClick: () => u(h)
50
+ onClick: () => v(u)
51
51
  })
52
- })), d;
52
+ })), r;
53
53
  }
54
- }), null), f(() => b(i, m("w-10 md:w-12 flex flex-col justify-between shrink-0 min-h-0", "bg-activity-bar border-r border-border", e.class))), i;
54
+ }), null), f((r) => {
55
+ var u = y("w-10 md:w-12 flex flex-col justify-between shrink-0 min-h-0", "bg-activity-bar border-r border-border", e.class), x = e.ariaLabel;
56
+ return u !== r.e && g(i, r.e = u), x !== r.t && m(i, "aria-label", r.t = x), r;
57
+ }, {
58
+ e: void 0,
59
+ t: void 0
60
+ }), i;
55
61
  })();
56
62
  }
57
- function C(e) {
63
+ function A(e) {
58
64
  const o = () => typeof e.item.badge == "function" ? e.item.badge() : e.item.badge;
59
- return l($, {
65
+ return a(B, {
60
66
  get content() {
61
67
  return e.item.label;
62
68
  },
63
69
  placement: "right",
64
70
  delay: 0,
65
71
  get children() {
66
- var r = N();
67
- return r.$$click = () => e.onClick(), a(r, l(g, {
72
+ var n = D();
73
+ return n.$$click = () => e.onClick(), c(n, a(h, {
68
74
  get when() {
69
75
  return e.isActive;
70
76
  },
71
77
  get children() {
72
- return S();
78
+ return N();
73
79
  }
74
- }), null), a(r, l(A, {
80
+ }), null), c(n, a(k, {
75
81
  get component() {
76
82
  return e.item.icon;
77
83
  },
78
84
  class: "w-5 h-5"
79
- }), null), a(r, l(g, {
85
+ }), null), c(n, a(h, {
80
86
  get when() {
81
87
  return o();
82
88
  },
83
89
  get children() {
84
- var t = j();
85
- return a(t, (() => {
86
- var c = k(() => typeof o() == "number" && o() > 99);
87
- return () => c() ? "99+" : o();
88
- })()), f(() => b(t, m("absolute top-0.5 right-0.5 min-w-3.5 h-3.5 px-1", "flex items-center justify-center", "text-[9px] font-medium rounded-full", "bg-activity-bar-badge text-activity-bar-badge-foreground"))), t;
90
+ var t = q();
91
+ return c(t, (() => {
92
+ var d = w(() => typeof o() == "number" && o() > 99);
93
+ return () => d() ? "99+" : o();
94
+ })()), f(() => g(t, y("absolute top-0.5 right-0.5 min-w-3.5 h-3.5 px-1", "flex items-center justify-center", "text-[9px] font-medium rounded-full", "bg-activity-bar-badge text-activity-bar-badge-foreground"))), t;
89
95
  }
90
96
  }), null), f((t) => {
91
- var c = m("relative w-full aspect-square flex items-center justify-center cursor-pointer", "transition-[color,background-color] duration-100", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset", e.isActive ? "text-activity-bar-foreground-active bg-accent/80" : "text-activity-bar-foreground hover:text-activity-bar-foreground-active hover:bg-accent/40"), u = e.item.label, i = e.isActive;
92
- return c !== t.e && b(r, t.e = c), u !== t.t && y(r, "aria-label", t.t = u), i !== t.a && y(r, "aria-pressed", t.a = i), t;
97
+ var d = y("relative w-full aspect-square flex items-center justify-center cursor-pointer", "transition-[color,background-color] duration-100", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset", e.isActive ? "text-activity-bar-foreground-active bg-accent/80" : "text-activity-bar-foreground hover:text-activity-bar-foreground-active hover:bg-accent/40"), v = e.item.label, i = e.isActive;
98
+ return d !== t.e && g(n, t.e = d), v !== t.t && m(n, "aria-label", t.t = v), i !== t.a && m(n, "aria-pressed", t.a = i), t;
93
99
  }, {
94
100
  e: void 0,
95
101
  t: void 0,
96
102
  a: void 0
97
- }), r;
103
+ }), n;
98
104
  }
99
105
  });
100
106
  }
101
- w(["click"]);
107
+ I(["click"]);
102
108
  export {
103
- V as ActivityBar
109
+ z as ActivityBar
104
110
  };
@@ -13,6 +13,7 @@ export interface MobileTabBarProps {
13
13
  items: MobileTabBarItem[];
14
14
  activeId: string;
15
15
  onSelect: (id: string) => void;
16
+ ariaLabel?: string;
16
17
  class?: string;
17
18
  }
18
19
  /**