@floegence/floe-webapp-core 0.35.33 → 0.35.34
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/DirectoryTree.js +74 -80
- package/dist/components/file-browser/FileIcons.d.ts +10 -2
- package/dist/components/file-browser/FileIcons.js +289 -181
- package/dist/components/file-browser/index.d.ts +2 -2
- package/dist/components/file-browser/types.d.ts +8 -0
- package/dist/components/ui/picker/PickerBase.js +90 -96
- package/dist/file-browser.js +35 -31
- package/dist/full.js +411 -407
- package/package.json +1 -1
|
@@ -1,284 +1,378 @@
|
|
|
1
|
-
import { createComponent as
|
|
2
|
-
import { Show as
|
|
3
|
-
var
|
|
4
|
-
const
|
|
1
|
+
import { createComponent as i, Dynamic as Y, insert as h, effect as m, className as q, setAttribute as c, template as g, setStyleProperty as F } from "solid-js/web";
|
|
2
|
+
import { Show as C, createUniqueId as K } from "solid-js";
|
|
3
|
+
var U = /* @__PURE__ */ g('<svg><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></svg>', !1, !0, !1), W = /* @__PURE__ */ g('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><path fill=none stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline fill=none stroke-width=1.5 stroke-linecap=round stroke-linejoin=round points="14 2 14 8 20 8">'), J = /* @__PURE__ */ g('<svg><path fill=none stroke=var(--error) stroke-width=1.35 stroke-linecap=round d="M15.9 15.9 20.1 20.1"></svg>', !1, !0, !1), Q = /* @__PURE__ */ g('<svg><g data-file-link-kind=symbolic><circle cx=18 cy=18 r=4 stroke-width=1></circle><path fill=none stroke-width=1.2 stroke-linecap=round stroke-linejoin=round d="M15.8 18h3.4m0 0-1.4-1.4m1.4 1.4-1.4 1.4"></svg>', !1, !0, !1), Z = /* @__PURE__ */ g('<svg><path fill=var(--background) opacity=0.3 d="M3 8l4-3h14l-4 3H3z"></svg>', !1, !0, !1), ee = /* @__PURE__ */ g('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><defs><linearGradient x1=0% y1=0% x2=0% y2=100%><stop offset=0% style=stop-color:var(--warning);stop-opacity:1></stop><stop offset=100% style=stop-opacity:1></stop></linearGradient></defs><path>'), te = /* @__PURE__ */ g('<svg><path fill=none stroke=var(--info) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="m10 13-2 2 2 2m4-4 2 2-2 2"></svg>', !1, !0, !1), ne = /* @__PURE__ */ g('<svg><g><rect x=5 y=13.5 width=14 height=5.75 rx=1.8 opacity=0.12 stroke-width=1></rect><text x=12 y=17.45 font-weight=700 text-anchor=middle style="font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace"></svg>', !1, !0, !1), re = /* @__PURE__ */ g("<svg><circle cx=10 cy=13 r=2 fill=var(--success)></svg>", !1, !0, !1), oe = /* @__PURE__ */ g('<svg><path fill=none stroke=var(--success) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="m20 17-3-3-4 4-2-2-5 3"></svg>', !1, !0, !1), le = /* @__PURE__ */ g("<svg><line x1=8 y1=13 x2=16 y2=13 stroke=var(--error) stroke-width=1.5 stroke-linecap=round></svg>", !1, !0, !1), se = /* @__PURE__ */ g("<svg><line x1=8 y1=17 x2=14 y2=17 stroke=var(--error) stroke-width=1.5 stroke-linecap=round></svg>", !1, !0, !1), ie = /* @__PURE__ */ g('<svg><path fill=none stroke=var(--warning) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M10 12v4h2m-2-4h2l2 4"></svg>', !1, !0, !1), ae = /* @__PURE__ */ g('<svg><path fill=none stroke=var(--primary) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M9 14h6m-3-3v6"></svg>', !1, !0, !1), ce = /* @__PURE__ */ g("<span>");
|
|
4
|
+
const fe = /* @__PURE__ */ new Set(["png", "jpg", "jpeg", "gif", "svg", "webp", "ico", "bmp"]), de = /* @__PURE__ */ new Set(["pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "txt", "md", "rtf"]), ge = /* @__PURE__ */ new Set(["json", "yaml", "yml", "toml", "xml", "ini", "env", "config", "cfg", "conf", "properties"]), ue = /* @__PURE__ */ new Set(["css", "scss", "sass", "less", "styl"]), ve = /* @__PURE__ */ new Set(["clj", "cljs", "cljc", "coffee", "elm", "erl", "ex", "exs", "haml", "handlebars", "hbs", "heex", "hrl", "jinja", "jinja2", "jl", "lisp", "liquid", "m", "mm", "ml", "mli", "nim", "proto", "slim", "twig", "zig"]), Ee = {
|
|
5
5
|
warning: "var(--warning)",
|
|
6
6
|
primary: "var(--primary)",
|
|
7
7
|
info: "var(--info)",
|
|
8
8
|
success: "var(--success)",
|
|
9
9
|
error: "var(--error)",
|
|
10
10
|
neutral: "color-mix(in srgb, var(--foreground) 70%, var(--background))"
|
|
11
|
-
},
|
|
11
|
+
}, O = {
|
|
12
12
|
label: "JS",
|
|
13
13
|
tone: "warning"
|
|
14
|
-
},
|
|
14
|
+
}, L = {
|
|
15
15
|
label: "TS",
|
|
16
16
|
tone: "primary"
|
|
17
|
-
},
|
|
17
|
+
}, x = {
|
|
18
18
|
label: "SH",
|
|
19
19
|
tone: "success"
|
|
20
|
-
},
|
|
20
|
+
}, he = {
|
|
21
21
|
label: "PY",
|
|
22
22
|
tone: "info"
|
|
23
|
-
},
|
|
23
|
+
}, M = {
|
|
24
24
|
label: "RB",
|
|
25
25
|
tone: "error"
|
|
26
|
-
},
|
|
26
|
+
}, me = {
|
|
27
27
|
label: "GO",
|
|
28
28
|
tone: "info"
|
|
29
|
-
},
|
|
29
|
+
}, ke = {
|
|
30
30
|
label: "RS",
|
|
31
31
|
tone: "error"
|
|
32
|
-
},
|
|
32
|
+
}, Se = {
|
|
33
33
|
label: "JAVA",
|
|
34
34
|
tone: "warning"
|
|
35
|
-
},
|
|
35
|
+
}, _e = {
|
|
36
36
|
label: "KT",
|
|
37
37
|
tone: "primary"
|
|
38
|
-
},
|
|
38
|
+
}, be = {
|
|
39
39
|
label: "SC",
|
|
40
40
|
tone: "error"
|
|
41
|
-
},
|
|
41
|
+
}, pe = {
|
|
42
42
|
label: "C",
|
|
43
43
|
tone: "neutral"
|
|
44
|
-
},
|
|
44
|
+
}, ye = {
|
|
45
45
|
label: "C++",
|
|
46
46
|
tone: "neutral"
|
|
47
|
-
},
|
|
47
|
+
}, Ce = {
|
|
48
48
|
label: "C#",
|
|
49
49
|
tone: "primary"
|
|
50
|
-
},
|
|
50
|
+
}, Ae = {
|
|
51
51
|
label: "F#",
|
|
52
52
|
tone: "info"
|
|
53
|
-
},
|
|
53
|
+
}, Be = {
|
|
54
54
|
label: "PHP",
|
|
55
55
|
tone: "primary"
|
|
56
|
-
},
|
|
56
|
+
}, xe = {
|
|
57
57
|
label: "PL",
|
|
58
58
|
tone: "info"
|
|
59
|
-
},
|
|
59
|
+
}, Te = {
|
|
60
60
|
label: "SW",
|
|
61
61
|
tone: "error"
|
|
62
|
-
},
|
|
62
|
+
}, we = {
|
|
63
63
|
label: "LUA",
|
|
64
64
|
tone: "warning"
|
|
65
|
-
},
|
|
65
|
+
}, De = {
|
|
66
66
|
label: "DART",
|
|
67
67
|
tone: "info"
|
|
68
|
-
},
|
|
68
|
+
}, Ie = {
|
|
69
69
|
label: "R",
|
|
70
70
|
tone: "info"
|
|
71
|
-
},
|
|
71
|
+
}, Pe = {
|
|
72
72
|
label: "SQL",
|
|
73
73
|
tone: "warning"
|
|
74
|
-
},
|
|
74
|
+
}, Ge = {
|
|
75
75
|
label: "GQL",
|
|
76
76
|
tone: "primary"
|
|
77
|
-
},
|
|
77
|
+
}, j = {
|
|
78
78
|
label: "GRV",
|
|
79
79
|
tone: "success"
|
|
80
|
-
},
|
|
80
|
+
}, Fe = {
|
|
81
81
|
label: "HTML",
|
|
82
82
|
tone: "warning"
|
|
83
|
-
},
|
|
83
|
+
}, Oe = {
|
|
84
84
|
label: "VUE",
|
|
85
85
|
tone: "success"
|
|
86
|
-
},
|
|
86
|
+
}, Le = {
|
|
87
87
|
label: "SVE",
|
|
88
88
|
tone: "error"
|
|
89
|
-
},
|
|
89
|
+
}, Me = {
|
|
90
90
|
label: "AST",
|
|
91
91
|
tone: "warning"
|
|
92
|
-
},
|
|
92
|
+
}, je = {
|
|
93
93
|
label: "MDX",
|
|
94
94
|
tone: "primary"
|
|
95
|
-
},
|
|
95
|
+
}, B = {
|
|
96
96
|
label: "DKR",
|
|
97
97
|
tone: "info"
|
|
98
|
-
},
|
|
98
|
+
}, Ne = {
|
|
99
99
|
label: "MAKE",
|
|
100
100
|
tone: "warning"
|
|
101
|
-
},
|
|
101
|
+
}, N = {
|
|
102
102
|
label: "CMK",
|
|
103
103
|
tone: "primary"
|
|
104
|
-
},
|
|
104
|
+
}, Re = {
|
|
105
105
|
label: "PS",
|
|
106
106
|
tone: "primary"
|
|
107
|
-
},
|
|
107
|
+
}, ze = {
|
|
108
108
|
label: "BAT",
|
|
109
109
|
tone: "neutral"
|
|
110
|
-
},
|
|
111
|
-
r(
|
|
112
|
-
r(
|
|
113
|
-
r(
|
|
114
|
-
r(
|
|
115
|
-
r(
|
|
116
|
-
r(
|
|
117
|
-
r(
|
|
118
|
-
r(
|
|
119
|
-
r(
|
|
120
|
-
r(
|
|
121
|
-
r(
|
|
122
|
-
r(
|
|
123
|
-
r(
|
|
124
|
-
r(
|
|
125
|
-
r(
|
|
126
|
-
r(
|
|
127
|
-
r(
|
|
128
|
-
r(
|
|
129
|
-
r(
|
|
130
|
-
r(
|
|
131
|
-
r(
|
|
132
|
-
r(
|
|
133
|
-
r(
|
|
134
|
-
r(
|
|
135
|
-
r(
|
|
136
|
-
r(
|
|
137
|
-
r(
|
|
138
|
-
r(
|
|
139
|
-
r(
|
|
140
|
-
r(
|
|
141
|
-
r(
|
|
142
|
-
r(
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
110
|
+
}, T = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new Map(), z = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), G = /* @__PURE__ */ new Map();
|
|
111
|
+
r(O, ["js", "jsx", "mjs", "cjs"]);
|
|
112
|
+
r(L, ["ts", "tsx", "mts", "cts"]);
|
|
113
|
+
r(x, ["sh", "bash", "zsh", "fish", "ksh", "csh"]);
|
|
114
|
+
r(he, ["py", "pyi", "pyw"]);
|
|
115
|
+
r(M, ["rb", "rake", "gemspec", "erb"]);
|
|
116
|
+
r(me, ["go"]);
|
|
117
|
+
r(ke, ["rs"]);
|
|
118
|
+
r(Se, ["java"]);
|
|
119
|
+
r(_e, ["kt", "kts"]);
|
|
120
|
+
r(be, ["scala", "sc"]);
|
|
121
|
+
r(pe, ["c", "h"]);
|
|
122
|
+
r(ye, ["cc", "cp", "cpp", "cxx", "hh", "hpp", "hxx"]);
|
|
123
|
+
r(Ce, ["cs"]);
|
|
124
|
+
r(Ae, ["fs", "fsi", "fsx"]);
|
|
125
|
+
r(Be, ["php", "phtml"]);
|
|
126
|
+
r(xe, ["pl", "pm"]);
|
|
127
|
+
r(Te, ["swift"]);
|
|
128
|
+
r(we, ["lua"]);
|
|
129
|
+
r(De, ["dart"]);
|
|
130
|
+
r(Ie, ["r"]);
|
|
131
|
+
r(Pe, ["sql"]);
|
|
132
|
+
r(Ge, ["graphql", "gql"]);
|
|
133
|
+
r(j, ["groovy", "gradle", "gvy"]);
|
|
134
|
+
r(Fe, ["html", "htm", "xhtml"]);
|
|
135
|
+
r(Oe, ["vue"]);
|
|
136
|
+
r(Le, ["svelte"]);
|
|
137
|
+
r(Me, ["astro"]);
|
|
138
|
+
r(je, ["mdx"]);
|
|
139
|
+
r(Re, ["ps1", "psd1", "psm1"]);
|
|
140
|
+
r(ze, ["bat", "cmd"]);
|
|
141
|
+
r(B, ["dockerfile", "containerfile"]);
|
|
142
|
+
r(N, ["cmake"]);
|
|
143
|
+
k(B, ["dockerfile", "containerfile"]);
|
|
144
|
+
k(Ne, ["makefile", "gnumakefile", "justfile"]);
|
|
145
|
+
k(N, ["cmakelists.txt"]);
|
|
146
|
+
k(x, [".bashrc", ".bash_profile", ".bash_aliases", ".profile", ".zshrc", ".zprofile", ".zshenv", ".zlogin", ".zlogout", ".kshrc", ".cshrc", ".tcshrc", ".envrc"]);
|
|
147
|
+
k(M, ["gemfile", "rakefile", "podfile", "fastfile", "appfile", "brewfile", "vagrantfile"]);
|
|
148
|
+
k(j, ["jenkinsfile"]);
|
|
149
|
+
He(B, ["dockerfile.", "containerfile."]);
|
|
150
|
+
Ve(B, [".dockerfile", ".containerfile"]);
|
|
151
151
|
function r(e, t) {
|
|
152
152
|
for (const n of t)
|
|
153
|
-
|
|
153
|
+
T.set(n, e);
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function k(e, t) {
|
|
156
156
|
for (const n of t)
|
|
157
|
-
|
|
157
|
+
R.set(n, e);
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function He(e, t) {
|
|
160
160
|
for (const n of t)
|
|
161
|
-
|
|
161
|
+
z.set(n, e);
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function Ve(e, t) {
|
|
164
164
|
for (const n of t)
|
|
165
|
-
|
|
165
|
+
H.set(n, e);
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function V(e) {
|
|
168
168
|
const t = e?.trim().toLowerCase();
|
|
169
169
|
if (t)
|
|
170
170
|
return t.startsWith(".") ? t.slice(1) : t;
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function $(e) {
|
|
173
173
|
const t = e?.trim();
|
|
174
174
|
if (!t)
|
|
175
175
|
return;
|
|
176
176
|
const n = t.split(/[\\/]/);
|
|
177
177
|
return n[n.length - 1]?.toLowerCase();
|
|
178
178
|
}
|
|
179
|
-
function
|
|
180
|
-
const t =
|
|
179
|
+
function $e(e) {
|
|
180
|
+
const t = $(e);
|
|
181
181
|
if (!t)
|
|
182
182
|
return;
|
|
183
183
|
const n = t.lastIndexOf(".");
|
|
184
184
|
if (!(n <= 0 || n === t.length - 1))
|
|
185
185
|
return t.slice(n + 1);
|
|
186
186
|
}
|
|
187
|
-
function
|
|
188
|
-
return
|
|
187
|
+
function X(e) {
|
|
188
|
+
return V(e.extension) ?? $e(e.name);
|
|
189
189
|
}
|
|
190
|
-
function
|
|
191
|
-
const t =
|
|
190
|
+
function Xe(e) {
|
|
191
|
+
const t = $(e.name);
|
|
192
192
|
if (t) {
|
|
193
|
-
const
|
|
194
|
-
if (
|
|
195
|
-
return
|
|
196
|
-
for (const [
|
|
197
|
-
if (t.startsWith(
|
|
193
|
+
const d = R.get(t);
|
|
194
|
+
if (d)
|
|
195
|
+
return d;
|
|
196
|
+
for (const [f, o] of z)
|
|
197
|
+
if (t.startsWith(f))
|
|
198
198
|
return o;
|
|
199
|
-
for (const [
|
|
200
|
-
if (t.endsWith(
|
|
199
|
+
for (const [f, o] of H)
|
|
200
|
+
if (t.endsWith(f))
|
|
201
201
|
return o;
|
|
202
202
|
}
|
|
203
|
-
const n =
|
|
204
|
-
return n ?
|
|
203
|
+
const n = X(e);
|
|
204
|
+
return n ? T.get(n) : void 0;
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function Ye(e) {
|
|
207
207
|
return e.length <= 2 ? "6.2" : e.length === 3 ? "5.3" : e.length === 4 ? "4.5" : "4";
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
return (t) =>
|
|
209
|
+
function qe(e) {
|
|
210
|
+
return (t) => i(ot, {
|
|
211
211
|
get class() {
|
|
212
212
|
return t.class;
|
|
213
213
|
},
|
|
214
214
|
spec: e
|
|
215
215
|
});
|
|
216
216
|
}
|
|
217
|
-
function
|
|
218
|
-
const t = `${e.tone}:${e.label}`, n =
|
|
217
|
+
function A(e) {
|
|
218
|
+
const t = `${e.tone}:${e.label}`, n = G.get(t);
|
|
219
219
|
if (n)
|
|
220
220
|
return n;
|
|
221
|
-
const
|
|
222
|
-
return
|
|
221
|
+
const d = qe(e);
|
|
222
|
+
return G.set(t, d), d;
|
|
223
223
|
}
|
|
224
|
-
const
|
|
224
|
+
const E = (e) => {
|
|
225
225
|
const t = () => e.accent ?? "currentColor";
|
|
226
226
|
return (() => {
|
|
227
|
-
var n =
|
|
228
|
-
return h(n,
|
|
227
|
+
var n = W(), d = n.firstChild, f = d.nextSibling;
|
|
228
|
+
return h(n, i(C, {
|
|
229
229
|
get when() {
|
|
230
230
|
return e.accent;
|
|
231
231
|
},
|
|
232
232
|
get children() {
|
|
233
|
-
var o =
|
|
234
|
-
return
|
|
235
|
-
var s = t(),
|
|
236
|
-
return s !==
|
|
233
|
+
var o = U();
|
|
234
|
+
return m((l) => {
|
|
235
|
+
var s = t(), u = e.fillOpacity ?? 0.18;
|
|
236
|
+
return s !== l.e && c(o, "fill", l.e = s), u !== l.t && c(o, "opacity", l.t = u), l;
|
|
237
237
|
}, {
|
|
238
238
|
e: void 0,
|
|
239
239
|
t: void 0
|
|
240
240
|
}), o;
|
|
241
241
|
}
|
|
242
|
-
}),
|
|
243
|
-
var
|
|
244
|
-
return
|
|
242
|
+
}), d), h(n, () => e.children, null), m((o) => {
|
|
243
|
+
var l = e.class, s = e.linkTargetType ? "symbolic" : void 0, u = e.linkTargetType, v = t(), a = t();
|
|
244
|
+
return l !== o.e && c(n, "class", o.e = l), s !== o.t && c(n, "data-file-link-kind", o.t = s), u !== o.a && c(n, "data-file-link-target-type", o.a = u), v !== o.o && c(d, "stroke", o.o = v), a !== o.i && c(f, "stroke", o.i = a), o;
|
|
245
245
|
}, {
|
|
246
246
|
e: void 0,
|
|
247
247
|
t: void 0,
|
|
248
|
-
a: void 0
|
|
248
|
+
a: void 0,
|
|
249
|
+
o: void 0,
|
|
250
|
+
i: void 0
|
|
249
251
|
}), n;
|
|
250
252
|
})();
|
|
251
|
-
},
|
|
252
|
-
const n =
|
|
253
|
+
}, w = (e) => {
|
|
254
|
+
const t = () => e.targetType === "broken" ? "var(--error)" : "color-mix(in srgb, var(--foreground) 82%, var(--background))", n = () => e.targetType === "broken" ? "color-mix(in srgb, var(--error) 18%, var(--background))" : "color-mix(in srgb, var(--background) 92%, var(--foreground) 8%)";
|
|
253
255
|
return (() => {
|
|
254
|
-
var
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
var d = Q(), f = d.firstChild, o = f.nextSibling;
|
|
257
|
+
return h(d, i(C, {
|
|
258
|
+
get when() {
|
|
259
|
+
return e.targetType === "broken";
|
|
260
|
+
},
|
|
261
|
+
get children() {
|
|
262
|
+
return J();
|
|
263
|
+
}
|
|
264
|
+
}), null), m((l) => {
|
|
265
|
+
var s = e.targetType, u = n(), v = t(), a = t();
|
|
266
|
+
return s !== l.e && c(d, "data-file-link-target-type", l.e = s), u !== l.t && c(f, "fill", l.t = u), v !== l.a && c(f, "stroke", l.a = v), a !== l.o && c(o, "stroke", l.o = a), l;
|
|
267
|
+
}, {
|
|
268
|
+
e: void 0,
|
|
269
|
+
t: void 0,
|
|
270
|
+
a: void 0,
|
|
271
|
+
o: void 0
|
|
272
|
+
}), d;
|
|
258
273
|
})();
|
|
259
|
-
},
|
|
260
|
-
const n =
|
|
274
|
+
}, S = (e) => {
|
|
275
|
+
const t = K(), n = () => !!e.open, d = () => `${n() ? "floe-folder-open-gradient" : "floe-folder-gradient"}-${t}`;
|
|
261
276
|
return (() => {
|
|
262
|
-
var
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
277
|
+
var f = ee(), o = f.firstChild, l = o.firstChild, s = l.firstChild, u = s.nextSibling, v = o.nextSibling;
|
|
278
|
+
return h(f, i(C, {
|
|
279
|
+
get when() {
|
|
280
|
+
return n();
|
|
281
|
+
},
|
|
282
|
+
get children() {
|
|
283
|
+
return Z();
|
|
284
|
+
}
|
|
285
|
+
}), null), h(f, i(C, {
|
|
286
|
+
get when() {
|
|
287
|
+
return e.linkTargetType;
|
|
288
|
+
},
|
|
289
|
+
get children() {
|
|
290
|
+
return i(w, {
|
|
291
|
+
get targetType() {
|
|
292
|
+
return e.linkTargetType;
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
}), null), m((a) => {
|
|
297
|
+
var _ = e.class, b = e.linkTargetType ? "symbolic" : void 0, p = e.linkTargetType, y = d(), D = n() ? "color-mix(in srgb, var(--warning) 70%, var(--foreground))" : "color-mix(in srgb, var(--warning) 80%, var(--foreground))", I = `url(#${d()})`, P = n() ? "M5 3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V7.414A2 2 0 0 0 20.414 6L18 3.586A2 2 0 0 0 16.586 3H5zm4 2h7.586L19 7.414V17H5V5h4z" : "M3 5a2 2 0 0 1 2-2h4.586a1 1 0 0 1 .707.293L12 5h7a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5z";
|
|
298
|
+
return _ !== a.e && c(f, "class", a.e = _), b !== a.t && c(f, "data-file-link-kind", a.t = b), p !== a.a && c(f, "data-file-link-target-type", a.a = p), y !== a.o && c(l, "id", a.o = y), D !== a.i && F(u, "stop-color", a.i = D), I !== a.n && c(v, "fill", a.n = I), P !== a.s && c(v, "d", a.s = P), a;
|
|
299
|
+
}, {
|
|
300
|
+
e: void 0,
|
|
301
|
+
t: void 0,
|
|
302
|
+
a: void 0,
|
|
303
|
+
o: void 0,
|
|
304
|
+
i: void 0,
|
|
305
|
+
n: void 0,
|
|
306
|
+
s: void 0
|
|
307
|
+
}), f;
|
|
266
308
|
})();
|
|
267
|
-
},
|
|
309
|
+
}, Ke = (e) => i(S, {
|
|
310
|
+
get class() {
|
|
311
|
+
return e.class;
|
|
312
|
+
}
|
|
313
|
+
}), Ue = (e) => i(S, {
|
|
314
|
+
get class() {
|
|
315
|
+
return e.class;
|
|
316
|
+
},
|
|
317
|
+
open: !0
|
|
318
|
+
}), We = (e) => i(S, {
|
|
319
|
+
get class() {
|
|
320
|
+
return e.class;
|
|
321
|
+
},
|
|
322
|
+
linkTargetType: "folder"
|
|
323
|
+
}), Je = (e) => i(S, {
|
|
324
|
+
get class() {
|
|
325
|
+
return e.class;
|
|
326
|
+
},
|
|
327
|
+
open: !0,
|
|
328
|
+
linkTargetType: "folder"
|
|
329
|
+
}), Qe = (e) => i(S, {
|
|
268
330
|
get class() {
|
|
269
331
|
return e.class;
|
|
332
|
+
},
|
|
333
|
+
linkTargetType: "broken"
|
|
334
|
+
}), Ze = (e) => i(S, {
|
|
335
|
+
get class() {
|
|
336
|
+
return e.class;
|
|
337
|
+
},
|
|
338
|
+
open: !0,
|
|
339
|
+
linkTargetType: "broken"
|
|
340
|
+
}), et = (e) => i(E, {
|
|
341
|
+
get class() {
|
|
342
|
+
return e.class;
|
|
343
|
+
}
|
|
344
|
+
}), tt = (e) => i(E, {
|
|
345
|
+
get class() {
|
|
346
|
+
return e.class;
|
|
347
|
+
},
|
|
348
|
+
linkTargetType: "file",
|
|
349
|
+
get children() {
|
|
350
|
+
return i(w, {
|
|
351
|
+
targetType: "file"
|
|
352
|
+
});
|
|
270
353
|
}
|
|
271
|
-
}),
|
|
354
|
+
}), nt = (e) => i(E, {
|
|
355
|
+
get class() {
|
|
356
|
+
return e.class;
|
|
357
|
+
},
|
|
358
|
+
accent: "var(--muted-foreground)",
|
|
359
|
+
linkTargetType: "broken",
|
|
360
|
+
get children() {
|
|
361
|
+
return i(w, {
|
|
362
|
+
targetType: "broken"
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
}), rt = (e) => i(E, {
|
|
272
366
|
get class() {
|
|
273
367
|
return e.class;
|
|
274
368
|
},
|
|
275
369
|
accent: "var(--info)",
|
|
276
370
|
get children() {
|
|
277
|
-
return
|
|
371
|
+
return te();
|
|
278
372
|
}
|
|
279
|
-
}),
|
|
280
|
-
const t = () =>
|
|
281
|
-
return
|
|
373
|
+
}), ot = (e) => {
|
|
374
|
+
const t = () => Ee[e.spec.tone], n = () => Ye(e.spec.label), d = () => e.spec.label.length > 3 ? "0.02em" : "0.04em";
|
|
375
|
+
return i(E, {
|
|
282
376
|
get class() {
|
|
283
377
|
return e.class;
|
|
284
378
|
},
|
|
@@ -286,10 +380,10 @@ const u = (e) => {
|
|
|
286
380
|
return t();
|
|
287
381
|
},
|
|
288
382
|
get children() {
|
|
289
|
-
var
|
|
290
|
-
return h(
|
|
291
|
-
var
|
|
292
|
-
return
|
|
383
|
+
var f = ne(), o = f.firstChild, l = o.nextSibling;
|
|
384
|
+
return h(l, () => e.spec.label), m((s) => {
|
|
385
|
+
var u = e.spec.label, v = e.spec.tone, a = t(), _ = t(), b = t(), p = n(), y = d();
|
|
386
|
+
return u !== s.e && c(f, "data-code-badge-label", s.e = u), v !== s.t && c(f, "data-code-badge-tone", s.t = v), a !== s.a && c(o, "fill", s.a = a), _ !== s.o && c(o, "stroke", s.o = _), b !== s.i && c(l, "fill", s.i = b), p !== s.n && c(l, "font-size", s.n = p), y !== s.s && F(l, "letter-spacing", s.s = y), s;
|
|
293
387
|
}, {
|
|
294
388
|
e: void 0,
|
|
295
389
|
t: void 0,
|
|
@@ -298,73 +392,83 @@ const u = (e) => {
|
|
|
298
392
|
i: void 0,
|
|
299
393
|
n: void 0,
|
|
300
394
|
s: void 0
|
|
301
|
-
}),
|
|
395
|
+
}), f;
|
|
302
396
|
}
|
|
303
397
|
});
|
|
304
|
-
},
|
|
398
|
+
}, vt = A(O), Et = A(L), ht = A(x), lt = (e) => i(E, {
|
|
305
399
|
get class() {
|
|
306
400
|
return e.class;
|
|
307
401
|
},
|
|
308
402
|
accent: "var(--success)",
|
|
309
403
|
get children() {
|
|
310
|
-
return [
|
|
404
|
+
return [re(), oe()];
|
|
311
405
|
}
|
|
312
|
-
}),
|
|
406
|
+
}), st = (e) => i(E, {
|
|
313
407
|
get class() {
|
|
314
408
|
return e.class;
|
|
315
409
|
},
|
|
316
410
|
accent: "var(--error)",
|
|
317
411
|
get children() {
|
|
318
|
-
return [
|
|
412
|
+
return [le(), se()];
|
|
319
413
|
}
|
|
320
|
-
}),
|
|
414
|
+
}), it = (e) => i(E, {
|
|
321
415
|
get class() {
|
|
322
416
|
return e.class;
|
|
323
417
|
},
|
|
324
418
|
accent: "var(--warning)",
|
|
325
419
|
get children() {
|
|
326
|
-
return
|
|
420
|
+
return ie();
|
|
327
421
|
}
|
|
328
|
-
}),
|
|
422
|
+
}), at = (e) => i(E, {
|
|
329
423
|
get class() {
|
|
330
424
|
return e.class;
|
|
331
425
|
},
|
|
332
426
|
accent: "var(--primary)",
|
|
333
427
|
get children() {
|
|
334
|
-
return
|
|
428
|
+
return ae();
|
|
335
429
|
}
|
|
336
430
|
});
|
|
337
|
-
function
|
|
338
|
-
const t =
|
|
431
|
+
function ct(e) {
|
|
432
|
+
const t = V(e);
|
|
339
433
|
if (t) {
|
|
340
|
-
const n =
|
|
434
|
+
const n = T.get(t);
|
|
341
435
|
if (n)
|
|
342
|
-
return
|
|
436
|
+
return A(n);
|
|
343
437
|
}
|
|
344
|
-
return t &&
|
|
438
|
+
return t && ve.has(t) ? rt : t && fe.has(t) ? lt : t && de.has(t) ? st : t && ge.has(t) ? it : t && ue.has(t) ? at : et;
|
|
345
439
|
}
|
|
346
|
-
function
|
|
347
|
-
|
|
348
|
-
|
|
440
|
+
function ft(e, t) {
|
|
441
|
+
const n = e.link?.kind === "symbolic" ? e.link.targetType : void 0;
|
|
442
|
+
return n === "broken" ? t.open ? Ze : Qe : n ? t.open ? Je : We : t.open ? Ue : Ke;
|
|
443
|
+
}
|
|
444
|
+
function dt(e, t = {}) {
|
|
349
445
|
if (e.icon)
|
|
350
446
|
return e.icon;
|
|
351
|
-
|
|
352
|
-
|
|
447
|
+
if (e.type === "folder")
|
|
448
|
+
return ft(e, t);
|
|
449
|
+
if (e.link?.kind === "symbolic" && e.link.targetType === "broken")
|
|
450
|
+
return nt;
|
|
451
|
+
if (e.link?.kind === "symbolic")
|
|
452
|
+
return tt;
|
|
453
|
+
const n = Xe(e);
|
|
454
|
+
return n ? A(n) : ct(X(e));
|
|
353
455
|
}
|
|
354
|
-
function
|
|
355
|
-
const t = () =>
|
|
356
|
-
|
|
456
|
+
function mt(e) {
|
|
457
|
+
const t = () => dt(e.item, {
|
|
458
|
+
open: e.open
|
|
459
|
+
});
|
|
460
|
+
return i(C, {
|
|
357
461
|
get when() {
|
|
358
462
|
return typeof t() == "function";
|
|
359
463
|
},
|
|
360
464
|
get fallback() {
|
|
361
465
|
return (() => {
|
|
362
|
-
var n =
|
|
363
|
-
return h(n, () => t()),
|
|
466
|
+
var n = ce();
|
|
467
|
+
return h(n, () => t()), m(() => q(n, `inline-flex items-center justify-center ${e.class ?? ""}`.trim())), n;
|
|
364
468
|
})();
|
|
365
469
|
},
|
|
366
470
|
get children() {
|
|
367
|
-
return
|
|
471
|
+
return i(Y, {
|
|
368
472
|
get component() {
|
|
369
473
|
return t();
|
|
370
474
|
},
|
|
@@ -376,18 +480,22 @@ function rt(e) {
|
|
|
376
480
|
});
|
|
377
481
|
}
|
|
378
482
|
export {
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
We as
|
|
483
|
+
nt as BrokenSymlinkIcon,
|
|
484
|
+
rt as CodeFileIcon,
|
|
485
|
+
it as ConfigFileIcon,
|
|
486
|
+
st as DocumentFileIcon,
|
|
487
|
+
et as FileIcon,
|
|
488
|
+
mt as FileItemIcon,
|
|
489
|
+
Ke as FolderIcon,
|
|
490
|
+
Ue as FolderOpenIcon,
|
|
491
|
+
lt as ImageFileIcon,
|
|
492
|
+
vt as JavaScriptFileIcon,
|
|
493
|
+
ht as ShellScriptFileIcon,
|
|
494
|
+
at as StyleFileIcon,
|
|
495
|
+
tt as SymlinkFileIcon,
|
|
496
|
+
We as SymlinkFolderIcon,
|
|
497
|
+
Je as SymlinkFolderOpenIcon,
|
|
498
|
+
Et as TypeScriptFileIcon,
|
|
499
|
+
ct as getFileIcon,
|
|
500
|
+
dt as resolveFileItemIcon
|
|
393
501
|
};
|