@floegence/floe-webapp-core 0.58.0 → 0.60.0

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.
@@ -1,302 +1,56 @@
1
- import { createComponent as i, Dynamic as q, insert as E, effect as k, className as K, setAttribute as c, template as d, setStyleProperty as F } from "solid-js/web";
2
- import { Show as w, createUniqueId as W } from "solid-js";
3
- import { classifyArchiveFileName as O } from "./archiveFiles.js";
4
- var J = /* @__PURE__ */ d('<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), Q = /* @__PURE__ */ d('<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">'), Z = /* @__PURE__ */ d('<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), ee = /* @__PURE__ */ d('<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), ne = /* @__PURE__ */ d('<svg><path fill=var(--background) opacity=0.3 d="M3 8l4-3h14l-4 3H3z"></svg>', !1, !0, !1), re = /* @__PURE__ */ d('<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(--floe-file-icon-warning, var(--warning));stop-opacity:1"></stop><stop offset=100% style=stop-opacity:1></stop></linearGradient></defs><path>'), te = /* @__PURE__ */ d('<svg><g data-file-icon-kind=archive><path d="M10 9.75h4M10 12.25h4M10 14.75h4"fill=none stroke="var(--floe-file-icon-warning, var(--warning))"stroke-width=1.35 stroke-linecap=round></path><rect x=9.25 y=17 width=5.5 height=2.25 rx=0.7 fill="var(--floe-file-icon-warning, var(--warning))"opacity=0.18 stroke="var(--floe-file-icon-warning, var(--warning))"stroke-width=1></svg>', !1, !0, !1), oe = /* @__PURE__ */ d('<svg><path fill=none stroke="var(--floe-file-icon-info, 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), ie = /* @__PURE__ */ d('<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, &quot;Liberation Mono&quot;, &quot;Courier New&quot;, monospace"></svg>', !1, !0, !1), le = /* @__PURE__ */ d('<svg><circle cx=10 cy=13 r=2 fill="var(--floe-file-icon-success, var(--success))"></svg>', !1, !0, !1), ae = /* @__PURE__ */ d('<svg><path fill=none stroke="var(--floe-file-icon-success, 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), se = /* @__PURE__ */ d('<svg><g data-file-icon-kind=video><rect x=6.75 y=12 width=10.5 height=6.25 rx=1.5 fill="color-mix(in srgb, #8b5cf6 86%, var(--foreground))"opacity=0.14 stroke="color-mix(in srgb, #8b5cf6 86%, var(--foreground))"stroke-width=1.2></rect><path fill="color-mix(in srgb, #8b5cf6 86%, var(--foreground))"d="M10.75 13.7v2.85a.45.45 0 0 0 .68.39l2.45-1.43a.45.45 0 0 0 0-.78l-2.45-1.42a.45.45 0 0 0-.68.39z"></path><line x1=8 y1=19.5 x2=16 y2=19.5 stroke="color-mix(in srgb, #8b5cf6 86%, var(--foreground))"stroke-width=1.2 stroke-linecap=round opacity=0.72></svg>', !1, !0, !1), ce = /* @__PURE__ */ d('<svg><g data-file-icon-kind=audio><path fill=none stroke="var(--floe-file-icon-info, var(--info))"stroke-width=1.45 stroke-linecap=round stroke-linejoin=round d="M9 16.25v-5.2l5.5-1.15v5.15"></path><ellipse cx=8.2 cy=17.2 rx=1.75 ry=1.25 fill="var(--floe-file-icon-info, var(--info))"opacity=0.2 stroke="var(--floe-file-icon-info, var(--info))"stroke-width=1.1></ellipse><ellipse cx=13.7 cy=16 rx=1.75 ry=1.25 fill="var(--floe-file-icon-info, var(--info))"opacity=0.2 stroke="var(--floe-file-icon-info, var(--info))"stroke-width=1.1></svg>', !1, !0, !1), fe = /* @__PURE__ */ d('<svg><line x1=8 y1=13 x2=16 y2=13 stroke="var(--floe-file-icon-error, var(--error))"stroke-width=1.5 stroke-linecap=round></svg>', !1, !0, !1), ge = /* @__PURE__ */ d('<svg><line x1=8 y1=17 x2=14 y2=17 stroke="var(--floe-file-icon-error, var(--error))"stroke-width=1.5 stroke-linecap=round></svg>', !1, !0, !1), de = /* @__PURE__ */ d('<svg><path fill=none stroke="var(--floe-file-icon-warning, var(--warning))"stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M10 12v4h2m-2-4h2l2 4"></svg>', !1, !0, !1), ve = /* @__PURE__ */ d('<svg><path fill=none stroke="var(--floe-file-icon-primary, var(--primary))"stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M9 14h6m-3-3v6"></svg>', !1, !0, !1), ue = /* @__PURE__ */ d("<span>");
5
- const he = /* @__PURE__ */ new Set(["png", "jpg", "jpeg", "gif", "svg", "webp", "ico", "bmp"]), Ee = /* @__PURE__ */ new Set(["mp4", "webm", "mov", "m4v", "ogv", "mkv"]), ke = /* @__PURE__ */ new Set(["mp3", "m4a", "aac", "wav", "ogg", "oga", "opus", "flac"]), me = /* @__PURE__ */ new Set(["pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "txt", "md", "rtf"]), _e = /* @__PURE__ */ new Set(["json", "yaml", "yml", "toml", "xml", "ini", "env", "config", "cfg", "conf", "properties"]), Se = /* @__PURE__ */ new Set(["css", "scss", "sass", "less", "styl"]), pe = /* @__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"]), ye = "color-mix(in srgb, #8b5cf6 86%, var(--foreground))", be = {
6
- warning: "var(--floe-file-icon-warning, var(--warning))",
7
- primary: "var(--floe-file-icon-primary, var(--primary))",
8
- info: "var(--floe-file-icon-info, var(--info))",
9
- success: "var(--floe-file-icon-success, var(--success))",
10
- error: "var(--floe-file-icon-error, var(--error))",
11
- neutral: "color-mix(in srgb, var(--foreground) 70%, var(--background))"
12
- }, M = {
13
- label: "JS",
14
- tone: "warning"
15
- }, L = {
16
- label: "TS",
17
- tone: "primary"
18
- }, A = {
19
- label: "SH",
20
- tone: "success"
21
- }, we = {
22
- label: "PY",
23
- tone: "info"
24
- }, N = {
25
- label: "RB",
26
- tone: "error"
27
- }, Ce = {
28
- label: "GO",
29
- tone: "info"
30
- }, xe = {
31
- label: "RS",
32
- tone: "error"
33
- }, Ae = {
34
- label: "JAVA",
35
- tone: "warning"
36
- }, Be = {
37
- label: "KT",
38
- tone: "primary"
39
- }, Te = {
40
- label: "SC",
41
- tone: "error"
42
- }, Ie = {
43
- label: "C",
44
- tone: "neutral"
45
- }, De = {
46
- label: "C++",
47
- tone: "neutral"
48
- }, Pe = {
49
- label: "C#",
50
- tone: "primary"
51
- }, Ge = {
52
- label: "F#",
53
- tone: "info"
54
- }, Fe = {
55
- label: "PHP",
56
- tone: "primary"
57
- }, Oe = {
58
- label: "PL",
59
- tone: "info"
60
- }, Me = {
61
- label: "SW",
62
- tone: "error"
63
- }, Le = {
64
- label: "LUA",
65
- tone: "warning"
66
- }, Ne = {
67
- label: "DART",
68
- tone: "info"
69
- }, je = {
70
- label: "R",
71
- tone: "info"
72
- }, Re = {
73
- label: "SQL",
74
- tone: "warning"
75
- }, ze = {
76
- label: "GQL",
77
- tone: "primary"
78
- }, j = {
79
- label: "GRV",
80
- tone: "success"
81
- }, $e = {
82
- label: "HTML",
83
- tone: "warning"
84
- }, He = {
85
- label: "VUE",
86
- tone: "success"
87
- }, Ve = {
88
- label: "SVE",
89
- tone: "error"
90
- }, Xe = {
91
- label: "AST",
92
- tone: "warning"
93
- }, Ue = {
94
- label: "MDX",
95
- tone: "primary"
96
- }, x = {
97
- label: "DKR",
98
- tone: "info"
99
- }, Ye = {
100
- label: "MAKE",
101
- tone: "warning"
102
- }, R = {
103
- label: "CMK",
104
- tone: "primary"
105
- }, qe = {
106
- label: "PS",
107
- tone: "primary"
108
- }, Ke = {
109
- label: "BAT",
110
- tone: "neutral"
111
- }, B = /* @__PURE__ */ new Map(), z = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), G = /* @__PURE__ */ new Map();
112
- t(M, ["js", "jsx", "mjs", "cjs"]);
113
- t(L, ["ts", "tsx", "mts", "cts"]);
114
- t(A, ["sh", "bash", "zsh", "fish", "ksh", "csh"]);
115
- t(we, ["py", "pyi", "pyw"]);
116
- t(N, ["rb", "rake", "gemspec", "erb"]);
117
- t(Ce, ["go"]);
118
- t(xe, ["rs"]);
119
- t(Ae, ["java"]);
120
- t(Be, ["kt", "kts"]);
121
- t(Te, ["scala", "sc"]);
122
- t(Ie, ["c", "h"]);
123
- t(De, ["cc", "cp", "cpp", "cxx", "hh", "hpp", "hxx"]);
124
- t(Pe, ["cs"]);
125
- t(Ge, ["fs", "fsi", "fsx"]);
126
- t(Fe, ["php", "phtml"]);
127
- t(Oe, ["pl", "pm"]);
128
- t(Me, ["swift"]);
129
- t(Le, ["lua"]);
130
- t(Ne, ["dart"]);
131
- t(je, ["r"]);
132
- t(Re, ["sql"]);
133
- t(ze, ["graphql", "gql"]);
134
- t(j, ["groovy", "gradle", "gvy"]);
135
- t($e, ["html", "htm", "xhtml"]);
136
- t(He, ["vue"]);
137
- t(Ve, ["svelte"]);
138
- t(Xe, ["astro"]);
139
- t(Ue, ["mdx"]);
140
- t(qe, ["ps1", "psd1", "psm1"]);
141
- t(Ke, ["bat", "cmd"]);
142
- t(x, ["dockerfile", "containerfile"]);
143
- t(R, ["cmake"]);
144
- m(x, ["dockerfile", "containerfile"]);
145
- m(Ye, ["makefile", "gnumakefile", "justfile"]);
146
- m(R, ["cmakelists.txt"]);
147
- m(A, [".bashrc", ".bash_profile", ".bash_aliases", ".profile", ".zshrc", ".zprofile", ".zshenv", ".zlogin", ".zlogout", ".kshrc", ".cshrc", ".tcshrc", ".envrc"]);
148
- m(N, ["gemfile", "rakefile", "podfile", "fastfile", "appfile", "brewfile", "vagrantfile"]);
149
- m(j, ["jenkinsfile"]);
150
- We(x, ["dockerfile.", "containerfile."]);
151
- Je(x, [".dockerfile", ".containerfile"]);
152
- function t(e, n) {
153
- for (const r of n)
154
- B.set(r, e);
155
- }
156
- function m(e, n) {
157
- for (const r of n)
158
- z.set(r, e);
159
- }
160
- function We(e, n) {
161
- for (const r of n)
162
- $.set(r, e);
163
- }
164
- function Je(e, n) {
165
- for (const r of n)
166
- H.set(r, e);
167
- }
168
- function V(e) {
169
- const n = e?.trim().toLowerCase();
170
- if (n)
171
- return n.startsWith(".") ? n.slice(1) : n;
172
- }
173
- function X(e) {
174
- const n = e?.trim();
175
- if (!n)
176
- return;
177
- const r = n.split(/[\\/]/);
178
- return r[r.length - 1]?.toLowerCase();
179
- }
180
- function Qe(e) {
181
- const n = X(e);
182
- if (!n)
183
- return;
184
- const r = n.lastIndexOf(".");
185
- if (!(r <= 0 || r === n.length - 1))
186
- return n.slice(r + 1);
187
- }
188
- function U(e) {
189
- return V(e.extension) ?? Qe(e.name);
190
- }
191
- function Ze(e) {
192
- const n = X(e.name);
193
- if (n) {
194
- const g = z.get(n);
195
- if (g)
196
- return g;
197
- for (const [f, o] of $)
198
- if (n.startsWith(f))
199
- return o;
200
- for (const [f, o] of H)
201
- if (n.endsWith(f))
202
- return o;
203
- }
204
- const r = U(e);
205
- return r ? B.get(r) : void 0;
206
- }
207
- function en(e) {
208
- return e.length <= 2 ? "6.2" : e.length === 3 ? "5.3" : e.length === 4 ? "4.5" : "4";
209
- }
210
- function nn(e) {
211
- return (n) => i(vn, {
212
- get class() {
213
- return n.class;
214
- },
215
- spec: e
216
- });
217
- }
218
- function C(e) {
219
- const n = `${e.tone}:${e.label}`, r = G.get(n);
220
- if (r)
221
- return r;
222
- const g = nn(e);
223
- return G.set(n, g), g;
224
- }
225
- const u = (e) => {
226
- const n = () => e.accent ?? "currentColor";
1
+ import { createComponent as a, mergeProps as s, Dynamic as M, insert as m, effect as I, className as P, setAttribute as o, template as h } from "solid-js/web";
2
+ import { Show as y, createUniqueId as T } from "solid-js";
3
+ import { fileIconDefinition as t, fileIconForExtension as q, resolveFileIconDefinition as E, fileIconCatalog as J } from "./fileIconCatalog.js";
4
+ import { fileIconArtwork as L } from "./fileIconArtwork.generated.js";
5
+ var N = /* @__PURE__ */ h('<svg><path d="m31 31 12 12"stroke-width=2.4></svg>', !1, !0, !1), U = /* @__PURE__ */ h('<svg><g transform="translate(1 1)"data-file-link-kind=symbolic><circle cx=37 cy=37 r=9 fill=var(--background) stroke-width=2></circle><path d="M32 37h9m0 0-4-4m4 4-4 4"fill=none stroke-width=2.2 stroke-linecap=round stroke-linejoin=round></svg>', !1, !0, !1), V = /* @__PURE__ */ h('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 48 48"fill=none aria-hidden=true><defs><linearGradient x1=0 y1=0 x2=0 y2=1><stop stop-color=var(--floe-icon-paper-top)></stop><stop offset=1 stop-color=var(--floe-icon-paper-bottom)></stop></linearGradient><linearGradient x1=0 y1=0 x2=.75 y2=1><stop></stop><stop offset=1>'), H = /* @__PURE__ */ h("<span>");
6
+ function K(e) {
7
+ const r = () => e.target === "broken" ? "var(--error)" : "var(--foreground)";
227
8
  return (() => {
228
- var r = Q(), g = r.firstChild, f = g.nextSibling;
229
- return E(r, i(w, {
9
+ var i = U(), f = i.firstChild, g = f.nextSibling;
10
+ return m(i, a(y, {
230
11
  get when() {
231
- return e.accent;
12
+ return e.target === "broken";
232
13
  },
233
14
  get children() {
234
- var o = J();
235
- return k((l) => {
236
- var a = n(), v = e.fillOpacity ?? 0.18;
237
- return a !== l.e && c(o, "fill", l.e = a), v !== l.t && c(o, "opacity", l.t = v), l;
238
- }, {
239
- e: void 0,
240
- t: void 0
241
- }), o;
15
+ var d = N();
16
+ return I(() => o(d, "stroke", r())), d;
242
17
  }
243
- }), g), E(r, () => e.children, null), k((o) => {
244
- var l = e.class, a = e.linkTargetType ? "symbolic" : void 0, v = e.linkTargetType, h = n(), s = n();
245
- return l !== o.e && c(r, "class", o.e = l), a !== o.t && c(r, "data-file-link-kind", o.t = a), v !== o.a && c(r, "data-file-link-target-type", o.a = v), h !== o.o && c(g, "stroke", o.o = h), s !== o.i && c(f, "stroke", o.i = s), o;
18
+ }), null), I((d) => {
19
+ var l = e.target, k = r(), v = r();
20
+ return l !== d.e && o(i, "data-file-link-target-type", d.e = l), k !== d.t && o(f, "stroke", d.t = k), v !== d.a && o(g, "stroke", d.a = v), d;
246
21
  }, {
247
22
  e: void 0,
248
23
  t: void 0,
249
- a: void 0,
250
- o: void 0,
251
- i: void 0
252
- }), r;
24
+ a: void 0
25
+ }), i;
253
26
  })();
254
- }, T = (e) => {
255
- const n = () => e.targetType === "broken" ? "var(--error)" : "color-mix(in srgb, var(--foreground) 82%, var(--background))", r = () => e.targetType === "broken" ? "color-mix(in srgb, var(--error) 18%, var(--background))" : "color-mix(in srgb, var(--background) 92%, var(--foreground) 8%)";
256
- return (() => {
257
- var g = ee(), f = g.firstChild, o = f.nextSibling;
258
- return E(g, i(w, {
259
- get when() {
260
- return e.targetType === "broken";
261
- },
262
- get children() {
263
- return Z();
264
- }
265
- }), null), k((l) => {
266
- var a = e.targetType, v = r(), h = n(), s = n();
267
- return a !== l.e && c(g, "data-file-link-target-type", l.e = a), v !== l.t && c(f, "fill", l.t = v), h !== l.a && c(f, "stroke", l.a = h), s !== l.o && c(o, "stroke", l.o = s), l;
268
- }, {
269
- e: void 0,
270
- t: void 0,
271
- a: void 0,
272
- o: void 0
273
- }), g;
274
- })();
275
- }, _ = (e) => {
276
- const n = W(), r = () => !!e.open, g = () => `${r() ? "floe-folder-open-gradient" : "floe-folder-gradient"}-${n}`;
27
+ }
28
+ function u(e) {
29
+ const r = `floe-file-${T()}`, i = () => e.size ?? 24, f = () => e.definition.palette ?? {}, g = () => f().darkPrimary ? "var(--floe-icon-monochrome)" : f().primary || `var(--floe-icon-${e.definition.tone})`, d = () => L[e.definition.id + (e.definition.id === "folder" && e.open ? "-open" : "")];
277
30
  return (() => {
278
- var f = re(), o = f.firstChild, l = o.firstChild, a = l.firstChild, v = a.nextSibling, h = o.nextSibling;
279
- return E(f, i(w, {
280
- get when() {
281
- return r();
31
+ var l = V(), k = l.firstChild, v = k.firstChild, F = v.nextSibling, b = F.firstChild, w = b.nextSibling;
32
+ return o(v, "id", `${r}-paper`), o(F, "id", `${r}-color`), m(l, a(M, {
33
+ get component() {
34
+ return d();
282
35
  },
283
- get children() {
284
- return ne();
36
+ id: r,
37
+ get compact() {
38
+ return i() <= 20;
285
39
  }
286
- }), null), E(f, i(w, {
40
+ }), null), m(l, a(y, {
287
41
  get when() {
288
- return e.linkTargetType;
42
+ return e.link;
289
43
  },
290
44
  get children() {
291
- return i(T, {
292
- get targetType() {
293
- return e.linkTargetType;
45
+ return a(K, {
46
+ get target() {
47
+ return e.link;
294
48
  }
295
49
  });
296
50
  }
297
- }), null), k((s) => {
298
- var S = e.class, p = e.linkTargetType ? "symbolic" : void 0, y = e.linkTargetType, b = g(), I = r() ? "color-mix(in srgb, var(--floe-file-icon-warning, var(--warning)) 70%, var(--foreground))" : "color-mix(in srgb, var(--floe-file-icon-warning, var(--warning)) 80%, var(--foreground))", D = `url(#${g()})`, P = r() ? "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";
299
- return S !== s.e && c(f, "class", s.e = S), p !== s.t && c(f, "data-file-link-kind", s.t = p), y !== s.a && c(f, "data-file-link-target-type", s.a = y), b !== s.o && c(l, "id", s.o = b), I !== s.i && F(v, "stop-color", s.i = I), D !== s.n && c(h, "fill", s.n = D), P !== s.s && c(h, "d", s.s = P), s;
51
+ }), null), I((n) => {
52
+ var S = i(), x = i(), C = e.class, z = e.definition.id, D = e.definition.category === "archive" ? "archive" : e.definition.id, $ = i() <= 20 ? "compact" : "detailed", j = e.open || void 0, A = e.link ? "symbolic" : void 0, B = e.link, p = f().gradientStart || g(), G = f().gradientEnd || g(), O = f().primary ? 1 : 0.83;
53
+ return S !== n.e && o(l, "width", n.e = S), x !== n.t && o(l, "height", n.t = x), C !== n.a && o(l, "class", n.a = C), z !== n.o && o(l, "data-file-icon-type", n.o = z), D !== n.i && o(l, "data-file-icon-kind", n.i = D), $ !== n.n && o(l, "data-file-icon-size", n.n = $), j !== n.s && o(l, "data-file-icon-open", n.s = j), A !== n.h && o(l, "data-file-link-kind", n.h = A), B !== n.r && o(l, "data-file-link-target-type", n.r = B), p !== n.d && o(b, "stop-color", n.d = p), G !== n.l && o(w, "stop-color", n.l = G), O !== n.u && o(w, "stop-opacity", n.u = O), n;
300
54
  }, {
301
55
  e: void 0,
302
56
  t: void 0,
@@ -304,231 +58,118 @@ const u = (e) => {
304
58
  o: void 0,
305
59
  i: void 0,
306
60
  n: void 0,
307
- s: void 0
308
- }), f;
61
+ s: void 0,
62
+ h: void 0,
63
+ r: void 0,
64
+ d: void 0,
65
+ l: void 0,
66
+ u: void 0
67
+ }), l;
309
68
  })();
310
- }, rn = (e) => i(_, {
311
- get class() {
312
- return e.class;
313
- }
314
- }), tn = (e) => i(_, {
315
- get class() {
316
- return e.class;
69
+ }
70
+ const Q = new Map(J.map((e) => [e.id, (r) => a(u, s(r, {
71
+ definition: e
72
+ }))])), c = (e) => Q.get(e.id), R = c(t("folder")), W = (e) => a(u, s(e, {
73
+ get definition() {
74
+ return t("folder");
317
75
  },
318
76
  open: !0
319
- }), on = (e) => i(_, {
320
- get class() {
321
- return e.class;
322
- },
323
- linkTargetType: "folder"
324
- }), ln = (e) => i(_, {
325
- get class() {
326
- return e.class;
327
- },
328
- open: !0,
329
- linkTargetType: "folder"
330
- }), an = (e) => i(_, {
331
- get class() {
332
- return e.class;
333
- },
334
- linkTargetType: "broken"
335
- }), sn = (e) => i(_, {
336
- get class() {
337
- return e.class;
338
- },
339
- open: !0,
340
- linkTargetType: "broken"
341
- }), cn = (e) => i(u, {
342
- get class() {
343
- return e.class;
344
- }
345
- }), fn = (e) => i(u, {
346
- get class() {
347
- return e.class;
348
- },
349
- linkTargetType: "file",
350
- get children() {
351
- return i(T, {
352
- targetType: "file"
353
- });
354
- }
355
- }), gn = (e) => i(u, {
356
- get class() {
357
- return e.class;
358
- },
359
- accent: "var(--muted-foreground)",
360
- linkTargetType: "broken",
361
- get children() {
362
- return i(T, {
363
- targetType: "broken"
364
- });
365
- }
366
- }), Y = (e) => i(u, {
367
- get class() {
368
- return e.class;
369
- },
370
- accent: "var(--floe-file-icon-warning, var(--warning))",
371
- get children() {
372
- return te();
373
- }
374
- }), dn = (e) => i(u, {
375
- get class() {
376
- return e.class;
377
- },
378
- accent: "var(--floe-file-icon-info, var(--info))",
379
- get children() {
380
- return oe();
381
- }
382
- }), vn = (e) => {
383
- const n = () => be[e.spec.tone], r = () => en(e.spec.label), g = () => e.spec.label.length > 3 ? "0.02em" : "0.04em";
384
- return i(u, {
385
- get class() {
386
- return e.class;
387
- },
388
- get accent() {
389
- return n();
390
- },
391
- get children() {
392
- var f = ie(), o = f.firstChild, l = o.nextSibling;
393
- return E(l, () => e.spec.label), k((a) => {
394
- var v = e.spec.label, h = e.spec.tone, s = n(), S = n(), p = n(), y = r(), b = g();
395
- return v !== a.e && c(f, "data-code-badge-label", a.e = v), h !== a.t && c(f, "data-code-badge-tone", a.t = h), s !== a.a && c(o, "fill", a.a = s), S !== a.o && c(o, "stroke", a.o = S), p !== a.i && c(l, "fill", a.i = p), y !== a.n && c(l, "font-size", a.n = y), b !== a.s && F(l, "letter-spacing", a.s = b), a;
396
- }, {
397
- e: void 0,
398
- t: void 0,
399
- a: void 0,
400
- o: void 0,
401
- i: void 0,
402
- n: void 0,
403
- s: void 0
404
- }), f;
405
- }
406
- });
407
- }, xn = C(M), An = C(L), Bn = C(A), un = (e) => i(u, {
408
- get class() {
409
- return e.class;
77
+ })), X = (e) => a(u, s(e, {
78
+ get definition() {
79
+ return t("folder");
410
80
  },
411
- accent: "var(--floe-file-icon-success, var(--success))",
412
- get children() {
413
- return [le(), ae()];
414
- }
415
- }), hn = (e) => i(u, {
416
- get class() {
417
- return e.class;
81
+ link: "folder"
82
+ })), Y = (e) => a(u, s(e, {
83
+ get definition() {
84
+ return t("folder");
418
85
  },
419
- accent: ye,
420
- get children() {
421
- var n = se(), r = n.firstChild, g = r.nextSibling;
422
- return g.nextSibling, n;
423
- }
424
- }), En = (e) => i(u, {
425
- get class() {
426
- return e.class;
86
+ link: "folder",
87
+ open: !0
88
+ })), Z = (e) => a(u, s(e, {
89
+ get definition() {
90
+ return t("folder");
427
91
  },
428
- accent: "var(--floe-file-icon-info, var(--info))",
429
- get children() {
430
- return ce();
431
- }
432
- }), kn = (e) => i(u, {
433
- get class() {
434
- return e.class;
92
+ link: "broken"
93
+ })), _ = (e) => a(u, s(e, {
94
+ get definition() {
95
+ return t("folder");
435
96
  },
436
- accent: "var(--floe-file-icon-error, var(--error))",
437
- get children() {
438
- return [fe(), ge()];
439
- }
440
- }), mn = (e) => i(u, {
441
- get class() {
442
- return e.class;
97
+ link: "broken",
98
+ open: !0
99
+ })), ce = c(t("file")), ee = (e) => a(u, s(e, {
100
+ get definition() {
101
+ return t("file");
443
102
  },
444
- accent: "var(--floe-file-icon-warning, var(--warning))",
445
- get children() {
446
- return de();
447
- }
448
- }), _n = (e) => i(u, {
449
- get class() {
450
- return e.class;
103
+ link: "file"
104
+ })), ne = (e) => a(u, s(e, {
105
+ get definition() {
106
+ return t("file");
451
107
  },
452
- accent: "var(--floe-file-icon-primary, var(--primary))",
453
- get children() {
454
- return ve();
455
- }
456
- });
457
- function Sn(e) {
458
- const n = V(e);
459
- if (n && O(`file.${n}`))
460
- return Y;
461
- if (n) {
462
- const r = B.get(n);
463
- if (r)
464
- return C(r);
108
+ link: "broken"
109
+ })), ae = c(t("archive")), de = c(t("code")), fe = c(t("js")), se = c(t("ts")), ue = c(t("shell")), ve = c(t("image")), ge = c(t("video")), ke = c(t("audio")), me = c(t("pdf")), Ie = c(t("json")), he = c(t("css"));
110
+ function ye(e) {
111
+ return c(q(e));
112
+ }
113
+ function te(e, r = {}) {
114
+ if (e.icon) return e.icon;
115
+ const i = e.link?.kind === "symbolic" ? e.link.targetType : void 0;
116
+ if (e.type === "folder") {
117
+ if (i === "broken") return r.open ? _ : Z;
118
+ if (i) return r.open ? Y : X;
119
+ const f = E(e.name, !0);
120
+ return f.id !== "folder" ? c(f) : r.open ? W : R;
465
121
  }
466
- return n && pe.has(n) ? dn : n && he.has(n) ? un : n && Ee.has(n) ? hn : n && ke.has(n) ? En : n && me.has(n) ? kn : n && _e.has(n) ? mn : n && Se.has(n) ? _n : cn;
122
+ return i === "broken" ? ne : i ? ee : c(E(e.name, !1, e.extension));
467
123
  }
468
- function pn(e, n) {
469
- const r = e.link?.kind === "symbolic" ? e.link.targetType : void 0;
470
- return r === "broken" ? n.open ? sn : an : r ? n.open ? ln : on : n.open ? tn : rn;
471
- }
472
- function yn(e, n = {}) {
473
- if (e.icon)
474
- return e.icon;
475
- if (e.type === "folder")
476
- return pn(e, n);
477
- if (e.link?.kind === "symbolic" && e.link.targetType === "broken")
478
- return gn;
479
- if (e.link?.kind === "symbolic")
480
- return fn;
481
- if (O(e.name))
482
- return Y;
483
- const r = Ze(e);
484
- return r ? C(r) : Sn(U(e));
485
- }
486
- function Tn(e) {
487
- const n = () => yn(e.item, {
124
+ function Fe(e) {
125
+ const r = () => te(e.item, {
488
126
  open: e.open
489
127
  });
490
- return i(w, {
128
+ return a(y, {
491
129
  get when() {
492
- return typeof n() == "function";
130
+ return typeof r() == "function";
493
131
  },
494
132
  get fallback() {
495
133
  return (() => {
496
- var r = ue();
497
- return E(r, () => n()), k(() => K(r, `inline-flex items-center justify-center ${e.class ?? ""}`.trim())), r;
134
+ var i = H();
135
+ return m(i, () => r()), I(() => P(i, `inline-flex items-center justify-center ${e.class ?? ""}`.trim())), i;
498
136
  })();
499
137
  },
500
138
  get children() {
501
- return i(q, {
139
+ return a(M, {
502
140
  get component() {
503
- return n();
141
+ return r();
504
142
  },
505
143
  get class() {
506
144
  return e.class;
145
+ },
146
+ get size() {
147
+ return e.size;
507
148
  }
508
149
  });
509
150
  }
510
151
  });
511
152
  }
512
153
  export {
513
- Y as ArchiveFileIcon,
514
- En as AudioFileIcon,
515
- gn as BrokenSymlinkIcon,
516
- dn as CodeFileIcon,
517
- mn as ConfigFileIcon,
518
- kn as DocumentFileIcon,
519
- cn as FileIcon,
520
- Tn as FileItemIcon,
521
- rn as FolderIcon,
522
- tn as FolderOpenIcon,
523
- un as ImageFileIcon,
524
- xn as JavaScriptFileIcon,
525
- Bn as ShellScriptFileIcon,
526
- _n as StyleFileIcon,
527
- fn as SymlinkFileIcon,
528
- on as SymlinkFolderIcon,
529
- ln as SymlinkFolderOpenIcon,
530
- An as TypeScriptFileIcon,
531
- hn as VideoFileIcon,
532
- Sn as getFileIcon,
533
- yn as resolveFileItemIcon
154
+ ae as ArchiveFileIcon,
155
+ ke as AudioFileIcon,
156
+ ne as BrokenSymlinkIcon,
157
+ de as CodeFileIcon,
158
+ Ie as ConfigFileIcon,
159
+ me as DocumentFileIcon,
160
+ ce as FileIcon,
161
+ Fe as FileItemIcon,
162
+ R as FolderIcon,
163
+ W as FolderOpenIcon,
164
+ ve as ImageFileIcon,
165
+ fe as JavaScriptFileIcon,
166
+ ue as ShellScriptFileIcon,
167
+ he as StyleFileIcon,
168
+ ee as SymlinkFileIcon,
169
+ X as SymlinkFolderIcon,
170
+ Y as SymlinkFolderOpenIcon,
171
+ se as TypeScriptFileIcon,
172
+ ge as VideoFileIcon,
173
+ ye as getFileIcon,
174
+ te as resolveFileItemIcon
534
175
  };