@floegence/floe-webapp-core 0.1.5 → 0.1.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/components/file-browser/Breadcrumb.d.ts +7 -0
- package/dist/components/file-browser/DirectoryTree.d.ts +7 -0
- package/dist/components/file-browser/FileBrowser.d.ts +35 -0
- package/dist/components/file-browser/FileBrowserContext.d.ts +18 -0
- package/dist/components/file-browser/FileBrowserToolbar.d.ts +8 -0
- package/dist/components/file-browser/FileContextMenu.d.ts +15 -0
- package/dist/components/file-browser/FileGridView.d.ts +7 -0
- package/dist/components/file-browser/FileIcons.d.ts +14 -0
- package/dist/components/file-browser/FileListView.d.ts +7 -0
- package/dist/components/file-browser/index.d.ts +10 -0
- package/dist/components/file-browser/types.d.ts +104 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/layout/Sidebar.d.ts +18 -0
- package/dist/components/layout/index.d.ts +1 -1
- package/dist/components/layout/mobileTabs.d.ts +8 -3
- package/dist/index.js +249 -220
- package/dist/index10.js +2 -2
- package/dist/index11.js +4 -4
- package/dist/index12.js +2 -2
- package/dist/index13.js +4 -4
- package/dist/index14.js +4 -4
- package/dist/index15.js +4 -4
- package/dist/index16.js +3 -3
- package/dist/index17.js +5 -5
- package/dist/index18.js +2 -2
- package/dist/index19.js +1 -1
- package/dist/index2.js +39 -39
- package/dist/index20.js +1 -1
- package/dist/index21.js +3 -3
- package/dist/index22.js +2 -2
- package/dist/index23.js +2 -2
- package/dist/index24.js +1 -1
- package/dist/index25.js +4 -4
- package/dist/index26.js +1 -1
- package/dist/index27.js +1 -1
- package/dist/index28.js +1 -1
- package/dist/index29.js +1 -1
- package/dist/index3.js +1 -1
- package/dist/index36.js +138 -42
- package/dist/index37.js +102 -32
- package/dist/index38.js +90 -23
- package/dist/index39.js +107 -170
- package/dist/index4.js +48 -34
- package/dist/index40.js +86 -40
- package/dist/index41.js +176 -64
- package/dist/index42.js +64 -94
- package/dist/index43.js +64 -110
- package/dist/index44.js +39 -138
- package/dist/index45.js +44 -35
- package/dist/index46.js +34 -379
- package/dist/index47.js +25 -13
- package/dist/index48.js +173 -10
- package/dist/index49.js +40 -16
- package/dist/index5.js +3 -3
- package/dist/index50.js +65 -9
- package/dist/index51.js +96 -8
- package/dist/index52.js +113 -52
- package/dist/index53.js +138 -5
- package/dist/index54.js +39 -3
- package/dist/index55.js +382 -44
- package/dist/index56.js +13 -26
- package/dist/index57.js +10 -32
- package/dist/index58.js +17 -92
- package/dist/index59.js +10 -22
- package/dist/index6.js +2 -2
- package/dist/index60.js +8 -46
- package/dist/index61.js +56 -14
- package/dist/index62.js +5 -35
- package/dist/index63.js +3 -64
- package/dist/index64.js +45 -84
- package/dist/index65.js +25 -13
- package/dist/index66.js +27 -2258
- package/dist/index67.js +92 -8
- package/dist/index68.js +25 -0
- package/dist/index69.js +49 -0
- package/dist/index7.js +1 -1
- package/dist/index70.js +17 -0
- package/dist/index71.js +38 -0
- package/dist/index72.js +67 -0
- package/dist/index73.js +87 -0
- package/dist/index74.js +17 -0
- package/dist/index75.js +2266 -0
- package/dist/index76.js +10 -0
- package/dist/index8.js +2 -2
- package/dist/index9.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index40.js
CHANGED
|
@@ -1,43 +1,89 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
import { delegateEvents as j, template as m, insert as s, createComponent as d, effect as F, className as a, Dynamic as _, setStyleProperty as $, setAttribute as D } from "solid-js/web";
|
|
2
|
+
import { Show as I, For as M } from "solid-js";
|
|
3
|
+
import { cn as c } from "./index62.js";
|
|
4
|
+
import { useFileBrowser as C } from "./index37.js";
|
|
5
|
+
import { FolderIcon as T, getFileIcon as z } from "./index44.js";
|
|
6
|
+
var B = /* @__PURE__ */ m('<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-2">'), G = /* @__PURE__ */ m("<div>"), K = /* @__PURE__ */ m('<div class="flex items-center justify-center h-32 text-xs text-muted-foreground">This folder is empty'), P = /* @__PURE__ */ m('<div class="absolute top-1.5 right-1.5 w-4 h-4 rounded-full bg-primary flex items-center justify-center"><svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=3 stroke-linecap=round stroke-linejoin=round class="w-2.5 h-2.5 text-primary-foreground"><polyline points="20 6 9 17 4 12">'), A = /* @__PURE__ */ m("<button type=button style=animation-fill-mode:backwards><div></div><span></span><div>");
|
|
7
|
+
function H(e) {
|
|
8
|
+
const n = C();
|
|
9
|
+
return (() => {
|
|
10
|
+
var r = G();
|
|
11
|
+
return s(r, d(I, {
|
|
12
|
+
get when() {
|
|
13
|
+
return n.currentFiles().length > 0;
|
|
14
|
+
},
|
|
15
|
+
get fallback() {
|
|
16
|
+
return K();
|
|
17
|
+
},
|
|
18
|
+
get children() {
|
|
19
|
+
var u = B();
|
|
20
|
+
return s(u, d(M, {
|
|
21
|
+
get each() {
|
|
22
|
+
return n.currentFiles();
|
|
23
|
+
},
|
|
24
|
+
children: (f, v) => d(E, {
|
|
25
|
+
item: f,
|
|
26
|
+
get index() {
|
|
27
|
+
return v();
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
})), u;
|
|
31
|
+
}
|
|
32
|
+
})), F(() => a(r, c("h-full min-h-0 overflow-auto p-3", e.class))), r;
|
|
33
|
+
})();
|
|
31
34
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
} =
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
function E(e) {
|
|
36
|
+
const n = C(), r = () => n.isSelected(e.item.id), u = (i) => {
|
|
37
|
+
e.item.type === "folder" ? n.navigateTo(e.item) : n.selectItem(e.item.id, i.metaKey || i.ctrlKey);
|
|
38
|
+
}, f = () => {
|
|
39
|
+
e.item.type === "folder" && n.navigateTo(e.item);
|
|
40
|
+
}, v = (i) => {
|
|
41
|
+
i.preventDefault(), i.stopPropagation(), r() || n.selectItem(e.item.id, !1);
|
|
42
|
+
const l = n.selectedItems(), o = n.currentFiles(), g = l.size > 0 ? o.filter((t) => l.has(t.id)) : [e.item];
|
|
43
|
+
n.showContextMenu({
|
|
44
|
+
x: i.clientX,
|
|
45
|
+
y: i.clientY,
|
|
46
|
+
items: g
|
|
47
|
+
});
|
|
48
|
+
}, S = () => e.item.type === "folder" ? T : z(e.item.extension);
|
|
49
|
+
return (() => {
|
|
50
|
+
var i = A(), l = i.firstChild, o = l.nextSibling, g = o.nextSibling;
|
|
51
|
+
return i.$$contextmenu = v, i.$$dblclick = f, i.$$click = u, s(i, d(I, {
|
|
52
|
+
get when() {
|
|
53
|
+
return r();
|
|
54
|
+
},
|
|
55
|
+
get children() {
|
|
56
|
+
return P();
|
|
57
|
+
}
|
|
58
|
+
}), l), s(l, d(_, {
|
|
59
|
+
get component() {
|
|
60
|
+
return S();
|
|
61
|
+
},
|
|
62
|
+
class: "w-8 h-8"
|
|
63
|
+
})), s(o, () => e.item.name), F((t) => {
|
|
64
|
+
var x = c(
|
|
65
|
+
"group relative flex flex-col items-center gap-2 p-3 rounded-lg cursor-pointer",
|
|
66
|
+
"transition-all duration-150",
|
|
67
|
+
"hover:bg-accent/50 hover:scale-[1.02]",
|
|
68
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
69
|
+
"active:scale-[0.98]",
|
|
70
|
+
r() && "bg-accent ring-2 ring-primary/50",
|
|
71
|
+
// Staggered animation on mount
|
|
72
|
+
"animate-in fade-in zoom-in-95"
|
|
73
|
+
), h = `${Math.min(e.index * 30, 300)}ms`, y = c("w-12 h-12 flex items-center justify-center rounded-lg", "transition-transform duration-200", "group-hover:scale-110", e.item.type === "folder" ? "bg-warning/10" : "bg-muted/50"), b = c("text-xs text-center line-clamp-2 w-full px-1", "transition-colors duration-150", r() && "font-medium"), w = e.item.name, k = c("absolute inset-0 rounded-lg opacity-0 transition-opacity duration-300", "group-hover:opacity-100", "pointer-events-none"), p = e.item.type === "folder" ? "radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--warning) 8%, transparent), transparent 70%)" : "radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--primary) 5%, transparent), transparent 70%)";
|
|
74
|
+
return x !== t.e && a(i, t.e = x), h !== t.t && $(i, "animation-delay", t.t = h), y !== t.a && a(l, t.a = y), b !== t.o && a(o, t.o = b), w !== t.i && D(o, "title", t.i = w), k !== t.n && a(g, t.n = k), p !== t.s && $(g, "background", t.s = p), t;
|
|
75
|
+
}, {
|
|
76
|
+
e: void 0,
|
|
77
|
+
t: void 0,
|
|
78
|
+
a: void 0,
|
|
79
|
+
o: void 0,
|
|
80
|
+
i: void 0,
|
|
81
|
+
n: void 0,
|
|
82
|
+
s: void 0
|
|
83
|
+
}), i;
|
|
84
|
+
})();
|
|
85
|
+
}
|
|
86
|
+
j(["click", "dblclick", "contextmenu"]);
|
|
39
87
|
export {
|
|
40
|
-
|
|
41
|
-
S as createThemeService,
|
|
42
|
-
L as useTheme
|
|
88
|
+
H as FileGridView
|
|
43
89
|
};
|
package/dist/index41.js
CHANGED
|
@@ -1,69 +1,181 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
import { delegateEvents as j, createComponent as h, Portal as F, template as i, insert as m, Dynamic as H, effect as d, className as A, setStyleProperty as B, setAttribute as p, use as P } from "solid-js/web";
|
|
2
|
+
import { createEffect as R, onCleanup as V, Show as x, For as S } from "solid-js";
|
|
3
|
+
import { cn as D } from "./index62.js";
|
|
4
|
+
import { useFileBrowser as T } from "./index37.js";
|
|
5
|
+
var Z = /* @__PURE__ */ i('<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><rect width=14 height=14 x=8 y=8 rx=2 ry=2></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2">'), z = /* @__PURE__ */ i('<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><path d="m12 3-1.9 5.8a2 2 0 0 1-1.3 1.3L3 12l5.8 1.9a2 2 0 0 1 1.3 1.3L12 21l1.9-5.8a2 2 0 0 1 1.3-1.3L21 12l-5.8-1.9a2 2 0 0 1-1.3-1.3Z">'), W = /* @__PURE__ */ i('<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><path d="M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z"></path><path d="M8 10v4"></path><path d="M12 10v2"></path><path d="M16 10v6">'), K = /* @__PURE__ */ i('<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><path d="M12 3v18"></path><path d="m8 7-4 4 4 4"></path><path d="m16 7 4 4-4 4">'), N = /* @__PURE__ */ i('<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><path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2">'), O = /* @__PURE__ */ i('<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><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"></path><path d="m15 5 4 4">'), q = /* @__PURE__ */ i("<div role=menu aria-orientation=vertical>"), G = /* @__PURE__ */ i('<span class="text-[10px] text-muted-foreground opacity-60">'), J = /* @__PURE__ */ i('<button type=button role=menuitem><span class="flex-1 text-left">'), Q = /* @__PURE__ */ i('<div class="my-1 h-px bg-border">');
|
|
6
|
+
const U = (t) => (() => {
|
|
7
|
+
var n = Z();
|
|
8
|
+
return d(() => p(n, "class", t.class)), n;
|
|
9
|
+
})(), X = (t) => (() => {
|
|
10
|
+
var n = z();
|
|
11
|
+
return d(() => p(n, "class", t.class)), n;
|
|
12
|
+
})(), Y = (t) => (() => {
|
|
13
|
+
var n = W();
|
|
14
|
+
return d(() => p(n, "class", t.class)), n;
|
|
15
|
+
})(), ee = (t) => (() => {
|
|
16
|
+
var n = K();
|
|
17
|
+
return d(() => p(n, "class", t.class)), n;
|
|
18
|
+
})(), te = (t) => (() => {
|
|
19
|
+
var n = N();
|
|
20
|
+
return d(() => p(n, "class", t.class)), n;
|
|
21
|
+
})(), ne = (t) => (() => {
|
|
22
|
+
var n = O();
|
|
23
|
+
return d(() => p(n, "class", t.class)), n;
|
|
24
|
+
})();
|
|
25
|
+
function ce(t) {
|
|
26
|
+
const n = T();
|
|
27
|
+
let v;
|
|
28
|
+
const E = [{
|
|
29
|
+
id: "duplicate",
|
|
30
|
+
label: "Duplicate",
|
|
31
|
+
type: "duplicate",
|
|
32
|
+
icon: U,
|
|
33
|
+
shortcut: "Cmd+D"
|
|
34
|
+
}, {
|
|
35
|
+
id: "ask-agent",
|
|
36
|
+
label: "Ask Agent",
|
|
37
|
+
type: "ask-agent",
|
|
38
|
+
icon: X,
|
|
39
|
+
separator: !0
|
|
40
|
+
}, {
|
|
41
|
+
id: "copy-to",
|
|
42
|
+
label: "Copy to...",
|
|
43
|
+
type: "copy-to",
|
|
44
|
+
icon: Y
|
|
45
|
+
}, {
|
|
46
|
+
id: "move-to",
|
|
47
|
+
label: "Move to...",
|
|
48
|
+
type: "move-to",
|
|
49
|
+
icon: ee,
|
|
50
|
+
separator: !0
|
|
51
|
+
}, {
|
|
52
|
+
id: "rename",
|
|
53
|
+
label: "Rename",
|
|
54
|
+
type: "rename",
|
|
55
|
+
icon: ne,
|
|
56
|
+
shortcut: "Enter"
|
|
57
|
+
}, {
|
|
58
|
+
id: "delete",
|
|
59
|
+
label: "Delete",
|
|
60
|
+
type: "delete",
|
|
61
|
+
icon: te,
|
|
62
|
+
shortcut: "Del"
|
|
63
|
+
}], I = () => {
|
|
64
|
+
var o, c;
|
|
65
|
+
if (t.overrideItems)
|
|
66
|
+
return t.overrideItems;
|
|
67
|
+
let l = E;
|
|
68
|
+
return (o = t.hideItems) != null && o.length && (l = l.filter((e) => {
|
|
69
|
+
var r;
|
|
70
|
+
return !((r = t.hideItems) != null && r.includes(e.type));
|
|
71
|
+
})), (c = t.customItems) != null && c.length && (l = [...l, ...t.customItems]), l;
|
|
72
|
+
}, L = (l, o) => {
|
|
73
|
+
var c, e, r, s, a, w, u, M, k, C, g, $, _;
|
|
74
|
+
switch (n.hideContextMenu(), l.type) {
|
|
75
|
+
case "duplicate":
|
|
76
|
+
(e = (c = t.callbacks) == null ? void 0 : c.onDuplicate) == null || e.call(c, o);
|
|
77
|
+
break;
|
|
78
|
+
case "ask-agent":
|
|
79
|
+
(s = (r = t.callbacks) == null ? void 0 : r.onAskAgent) == null || s.call(r, o);
|
|
80
|
+
break;
|
|
81
|
+
case "copy-to":
|
|
82
|
+
(w = (a = t.callbacks) == null ? void 0 : a.onCopyTo) == null || w.call(a, o);
|
|
83
|
+
break;
|
|
84
|
+
case "move-to":
|
|
85
|
+
(M = (u = t.callbacks) == null ? void 0 : u.onMoveTo) == null || M.call(u, o);
|
|
86
|
+
break;
|
|
87
|
+
case "delete":
|
|
88
|
+
(C = (k = t.callbacks) == null ? void 0 : k.onDelete) == null || C.call(k, o);
|
|
89
|
+
break;
|
|
90
|
+
case "rename":
|
|
91
|
+
o.length === 1 && (($ = (g = t.callbacks) == null ? void 0 : g.onRename) == null || $.call(g, o[0]));
|
|
92
|
+
break;
|
|
93
|
+
case "custom":
|
|
94
|
+
(_ = l.onAction) == null || _.call(l, o);
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
}, f = (l) => {
|
|
98
|
+
v && !v.contains(l.target) && n.hideContextMenu();
|
|
99
|
+
}, b = (l) => {
|
|
100
|
+
l.key === "Escape" && n.hideContextMenu();
|
|
101
|
+
};
|
|
102
|
+
R(() => {
|
|
103
|
+
n.contextMenu() && (document.addEventListener("click", f), document.addEventListener("keydown", b));
|
|
104
|
+
}), V(() => {
|
|
105
|
+
document.removeEventListener("click", f), document.removeEventListener("keydown", b);
|
|
106
|
+
});
|
|
107
|
+
const y = () => {
|
|
108
|
+
const l = n.contextMenu();
|
|
109
|
+
if (!l || !v) return {
|
|
110
|
+
x: 0,
|
|
111
|
+
y: 0
|
|
112
|
+
};
|
|
113
|
+
const o = v.getBoundingClientRect(), c = window.innerWidth, e = window.innerHeight;
|
|
114
|
+
let r = l.x, s = l.y;
|
|
115
|
+
return r + o.width > c && (r = c - o.width - 8), s + o.height > e && (s = e - o.height - 8), {
|
|
116
|
+
x: Math.max(8, r),
|
|
117
|
+
y: Math.max(8, s)
|
|
30
118
|
};
|
|
31
|
-
d.persist.debouncedSave(a().storageKey, e);
|
|
32
|
-
}), {
|
|
33
|
-
// Sidebar accessors
|
|
34
|
-
sidebarWidth: () => i.sidebar.width,
|
|
35
|
-
sidebarActiveTab: () => i.sidebar.activeTab,
|
|
36
|
-
sidebarCollapsed: () => i.sidebar.collapsed,
|
|
37
|
-
// Sidebar actions
|
|
38
|
-
setSidebarWidth: (e) => r(l((t) => {
|
|
39
|
-
t.sidebar.width = Math.max(a().sidebar.clamp.min, Math.min(a().sidebar.clamp.max, e));
|
|
40
|
-
})),
|
|
41
|
-
setSidebarActiveTab: (e) => r(l((t) => {
|
|
42
|
-
t.sidebar.activeTab = e, t.sidebar.collapsed = !1;
|
|
43
|
-
})),
|
|
44
|
-
setSidebarCollapsed: (e) => r(l((t) => {
|
|
45
|
-
t.sidebar.collapsed = e;
|
|
46
|
-
})),
|
|
47
|
-
toggleSidebarCollapse: () => r(l((e) => {
|
|
48
|
-
e.sidebar.collapsed = !e.sidebar.collapsed;
|
|
49
|
-
})),
|
|
50
|
-
// Terminal accessors
|
|
51
|
-
terminalOpened: () => i.terminal.opened,
|
|
52
|
-
terminalHeight: () => i.terminal.height,
|
|
53
|
-
// Terminal actions
|
|
54
|
-
toggleTerminal: () => r(l((e) => {
|
|
55
|
-
e.terminal.opened = !e.terminal.opened;
|
|
56
|
-
})),
|
|
57
|
-
setTerminalHeight: (e) => r(l((t) => {
|
|
58
|
-
t.terminal.height = Math.max(a().terminal.clamp.min, Math.min(a().terminal.clamp.max, e));
|
|
59
|
-
})),
|
|
60
|
-
// Mobile
|
|
61
|
-
isMobile: () => i.isMobile,
|
|
62
|
-
setIsMobile: (e) => r("isMobile", e)
|
|
63
119
|
};
|
|
120
|
+
return h(x, {
|
|
121
|
+
get when() {
|
|
122
|
+
return n.contextMenu();
|
|
123
|
+
},
|
|
124
|
+
children: (l) => h(F, {
|
|
125
|
+
get children() {
|
|
126
|
+
var o = q(), c = v;
|
|
127
|
+
return typeof c == "function" ? P(c, o) : v = o, m(o, h(S, {
|
|
128
|
+
get each() {
|
|
129
|
+
return I();
|
|
130
|
+
},
|
|
131
|
+
children: (e) => [(() => {
|
|
132
|
+
var r = J(), s = r.firstChild;
|
|
133
|
+
return r.$$click = () => L(e, l().items), m(r, h(x, {
|
|
134
|
+
get when() {
|
|
135
|
+
return e.icon;
|
|
136
|
+
},
|
|
137
|
+
children: (a) => h(H, {
|
|
138
|
+
get component() {
|
|
139
|
+
return a();
|
|
140
|
+
},
|
|
141
|
+
class: "w-3.5 h-3.5 opacity-60"
|
|
142
|
+
})
|
|
143
|
+
}), s), m(s, () => e.label), m(r, h(x, {
|
|
144
|
+
get when() {
|
|
145
|
+
return e.shortcut;
|
|
146
|
+
},
|
|
147
|
+
get children() {
|
|
148
|
+
var a = G();
|
|
149
|
+
return m(a, () => e.shortcut), a;
|
|
150
|
+
}
|
|
151
|
+
}), null), d((a) => {
|
|
152
|
+
var w = e.disabled || e.type === "rename" && l().items.length > 1, u = D("w-full flex items-center gap-2 px-3 py-1.5 text-xs cursor-pointer", "transition-colors duration-75", "hover:bg-accent hover:text-accent-foreground", "focus:outline-none focus-visible:bg-accent focus-visible:text-accent-foreground", "disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent", e.type === "delete" && "text-error hover:bg-error/10 hover:text-error");
|
|
153
|
+
return w !== a.e && (r.disabled = a.e = w), u !== a.t && A(r, a.t = u), a;
|
|
154
|
+
}, {
|
|
155
|
+
e: void 0,
|
|
156
|
+
t: void 0
|
|
157
|
+
}), r;
|
|
158
|
+
})(), h(x, {
|
|
159
|
+
get when() {
|
|
160
|
+
return e.separator;
|
|
161
|
+
},
|
|
162
|
+
get children() {
|
|
163
|
+
return Q();
|
|
164
|
+
}
|
|
165
|
+
})]
|
|
166
|
+
})), d((e) => {
|
|
167
|
+
var r = D("fixed z-50 min-w-[180px] py-1", "bg-popover border border-border rounded-lg shadow-lg", "animate-in fade-in zoom-in-95 duration-100"), s = `${y().x}px`, a = `${y().y}px`;
|
|
168
|
+
return r !== e.e && A(o, e.e = r), s !== e.t && B(o, "left", e.t = s), a !== e.a && B(o, "top", e.a = a), e;
|
|
169
|
+
}, {
|
|
170
|
+
e: void 0,
|
|
171
|
+
t: void 0,
|
|
172
|
+
a: void 0
|
|
173
|
+
}), o;
|
|
174
|
+
}
|
|
175
|
+
})
|
|
176
|
+
});
|
|
64
177
|
}
|
|
178
|
+
j(["click"]);
|
|
65
179
|
export {
|
|
66
|
-
|
|
67
|
-
v as createLayoutService,
|
|
68
|
-
C as useLayout
|
|
180
|
+
ce as FileContextMenu
|
|
69
181
|
};
|
package/dist/index42.js
CHANGED
|
@@ -1,99 +1,69 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { delegateEvents as g, template as l, insert as m, createComponent as s, effect as f, className as d } from "solid-js/web";
|
|
2
|
+
import { createMemo as p, For as v, Show as x } from "solid-js";
|
|
3
|
+
import { cn as h } from "./index62.js";
|
|
4
|
+
import { useFileBrowser as b } from "./index37.js";
|
|
5
|
+
import { ChevronRight as k } from "./index30.js";
|
|
6
|
+
var C = /* @__PURE__ */ l("<nav aria-label=Breadcrumb>"), w = /* @__PURE__ */ l('<button type=button><span class="truncate max-w-[120px] block">');
|
|
7
|
+
function y(o) {
|
|
8
|
+
const e = b(), i = p(() => {
|
|
9
|
+
const t = e.currentPath();
|
|
10
|
+
if (t === "/" || t === "")
|
|
11
|
+
return [{
|
|
12
|
+
name: "Root",
|
|
13
|
+
path: "/"
|
|
14
|
+
}];
|
|
15
|
+
const n = t.split("/").filter(Boolean), a = [{
|
|
16
|
+
name: "Root",
|
|
17
|
+
path: "/"
|
|
18
|
+
}];
|
|
19
|
+
let u = "";
|
|
20
|
+
for (const c of n)
|
|
21
|
+
u += "/" + c, a.push({
|
|
22
|
+
name: c,
|
|
23
|
+
path: u
|
|
24
|
+
});
|
|
25
|
+
return a;
|
|
26
|
+
}), r = (t) => {
|
|
27
|
+
e.setCurrentPath(t.path);
|
|
9
28
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
o ? (n.preventDefault(), v(() => {
|
|
25
|
-
Promise.resolve(o.execute()).catch((c) => console.error(c));
|
|
26
|
-
})) : r.save.preventDefaultWhenNoHandler && n.preventDefault();
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
if (!t(n)) {
|
|
30
|
-
if (r.palette.enabled && y(n, r.palette.keybind)) {
|
|
31
|
-
n.preventDefault(), l((o) => !o);
|
|
32
|
-
return;
|
|
29
|
+
return (() => {
|
|
30
|
+
var t = C();
|
|
31
|
+
return m(t, s(v, {
|
|
32
|
+
get each() {
|
|
33
|
+
return i();
|
|
34
|
+
},
|
|
35
|
+
children: (n, a) => [s(x, {
|
|
36
|
+
get when() {
|
|
37
|
+
return a() > 0;
|
|
38
|
+
},
|
|
39
|
+
get children() {
|
|
40
|
+
return s(k, {
|
|
41
|
+
class: "w-3 h-3 text-muted-foreground/50 flex-shrink-0"
|
|
42
|
+
});
|
|
33
43
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
filteredCommands: () => {
|
|
56
|
-
const e = C(), t = b().toLowerCase().trim();
|
|
57
|
-
return e === h && t === w ? f : (h = e, w = t, t ? (f = e.filter((s) => {
|
|
58
|
-
var n, r;
|
|
59
|
-
return s.title.toLowerCase().includes(t) || ((n = s.description) == null ? void 0 : n.toLowerCase().includes(t)) || ((r = s.category) == null ? void 0 : r.toLowerCase().includes(t));
|
|
60
|
-
}), f) : (f = e, e));
|
|
61
|
-
},
|
|
62
|
-
// Actions
|
|
63
|
-
open: () => l(!0),
|
|
64
|
-
close: () => {
|
|
65
|
-
l(!1), m("");
|
|
66
|
-
},
|
|
67
|
-
toggle: () => l((e) => !e),
|
|
68
|
-
setSearch: (e) => m(e),
|
|
69
|
-
register: (e) => (i.set(e.id, e), e.keybind && a.set(e.id, k(e.keybind)), d(), () => {
|
|
70
|
-
i.delete(e.id), a.delete(e.id), d();
|
|
71
|
-
}),
|
|
72
|
-
registerAll: (e) => (e.forEach((t) => {
|
|
73
|
-
i.set(t.id, t), t.keybind && a.set(t.id, k(t.keybind));
|
|
74
|
-
}), d(), () => {
|
|
75
|
-
e.forEach((t) => {
|
|
76
|
-
i.delete(t.id), a.delete(t.id);
|
|
77
|
-
}), d();
|
|
78
|
-
}),
|
|
79
|
-
execute: (e) => {
|
|
80
|
-
const t = i.get(e);
|
|
81
|
-
t && (l(!1), m(""), v(() => {
|
|
82
|
-
Promise.resolve(t.execute()).catch((s) => console.error(s));
|
|
83
|
-
}));
|
|
84
|
-
},
|
|
85
|
-
getKeybindDisplay: P
|
|
86
|
-
};
|
|
44
|
+
}), s(B, {
|
|
45
|
+
segment: n,
|
|
46
|
+
get isLast() {
|
|
47
|
+
return a() === i().length - 1;
|
|
48
|
+
},
|
|
49
|
+
onClick: () => r(n)
|
|
50
|
+
})]
|
|
51
|
+
})), f(() => d(t, h("flex items-center gap-1 min-w-0", o.class))), t;
|
|
52
|
+
})();
|
|
53
|
+
}
|
|
54
|
+
function B(o) {
|
|
55
|
+
return (() => {
|
|
56
|
+
var e = w(), i = e.firstChild;
|
|
57
|
+
return e.$$click = () => o.onClick(), m(i, () => o.segment.name), f((r) => {
|
|
58
|
+
var t = o.isLast, n = h("text-xs px-1.5 py-0.5 rounded cursor-pointer", "transition-all duration-100", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring", o.isLast ? "font-medium text-foreground cursor-default" : "text-muted-foreground hover:text-foreground hover:bg-muted/50");
|
|
59
|
+
return t !== r.e && (e.disabled = r.e = t), n !== r.t && d(e, r.t = n), r;
|
|
60
|
+
}, {
|
|
61
|
+
e: void 0,
|
|
62
|
+
t: void 0
|
|
63
|
+
}), e;
|
|
64
|
+
})();
|
|
87
65
|
}
|
|
88
|
-
|
|
89
|
-
Provider: N,
|
|
90
|
-
use: O
|
|
91
|
-
} = D({
|
|
92
|
-
name: "Command",
|
|
93
|
-
init: S
|
|
94
|
-
});
|
|
66
|
+
g(["click"]);
|
|
95
67
|
export {
|
|
96
|
-
|
|
97
|
-
S as createCommandService,
|
|
98
|
-
O as useCommand
|
|
68
|
+
y as Breadcrumb
|
|
99
69
|
};
|