@industry-theme/file-city-panel 0.3.32 → 0.3.33
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/panels.bundle.js +21 -21
- package/dist/panels.bundle.js.map +1 -1
- package/package.json +10 -10
package/dist/panels.bundle.js
CHANGED
|
@@ -48735,26 +48735,26 @@ class G {
|
|
|
48735
48735
|
let V = K.split("/");
|
|
48736
48736
|
for (let X2 = 1; X2 < V.length; X2++) Y.add(V.slice(0, X2).join("/"));
|
|
48737
48737
|
}), Array.from(Y).forEach((K) => {
|
|
48738
|
-
let V = K.split("/"), X2 = V[V.length - 1] || "",
|
|
48738
|
+
let V = K.split("/"), X2 = V[V.length - 1] || "", $2 = V.length - 1, O = { path: K, name: X2, children: [], fileCount: 0, totalSize: 0, depth: $2, relativePath: this.calculateRelativePath(K, q) };
|
|
48739
48739
|
E.set(K, O), Q.push(O);
|
|
48740
48740
|
}), j.forEach((K) => {
|
|
48741
|
-
let V = K.split("/"), X2 = V[V.length - 1] || "",
|
|
48741
|
+
let V = K.split("/"), X2 = V[V.length - 1] || "", $2 = this.extractExtension(X2), O = V.slice(0, -1).join("/"), H = { path: K, name: X2, extension: $2, size: 0, lastModified: /* @__PURE__ */ new Date(), isDirectory: false, relativePath: this.calculateRelativePath(K, q) };
|
|
48742
48742
|
J.push(H);
|
|
48743
|
-
let
|
|
48744
|
-
if (
|
|
48743
|
+
let A = E.get(O);
|
|
48744
|
+
if (A && "children" in A) A.children.push(H), A.fileCount++;
|
|
48745
48745
|
}), Array.from(Y).sort((K, V) => V.length - K.length).forEach((K) => {
|
|
48746
48746
|
let V = K.split("/");
|
|
48747
48747
|
if (V.length > 1) {
|
|
48748
|
-
let X2 = V.slice(0, -1).join("/"),
|
|
48749
|
-
if (
|
|
48748
|
+
let X2 = V.slice(0, -1).join("/"), $2 = E.get(X2), O = E.get(K);
|
|
48749
|
+
if ($2 && O && "children" in $2) $2.children.push(O);
|
|
48750
48750
|
}
|
|
48751
48751
|
});
|
|
48752
|
-
let
|
|
48752
|
+
let Z = q ? q.split("/").pop() || "root" : "root", _ = [];
|
|
48753
48753
|
return Q.forEach((K) => {
|
|
48754
48754
|
if (K.path.split("/").length === 1) _.push(K);
|
|
48755
48755
|
}), J.forEach((K) => {
|
|
48756
48756
|
if (K.path.split("/").length === 1) _.push(K);
|
|
48757
|
-
}), { root: { path: q || ".", name:
|
|
48757
|
+
}), { root: { path: q || ".", name: Z, children: _, fileCount: J.length, totalSize: 0, depth: 0, relativePath: "" }, allFiles: J, allDirectories: Q };
|
|
48758
48758
|
}
|
|
48759
48759
|
static buildTreeFromFileInfos(j, k = "") {
|
|
48760
48760
|
let q = k.endsWith("/") ? k.slice(0, -1) : k, E = /* @__PURE__ */ new Map(), J = [], Q = /* @__PURE__ */ new Set();
|
|
@@ -48770,16 +48770,16 @@ class G {
|
|
|
48770
48770
|
}), Array.from(Q).sort((W, K) => K.length - W.length).forEach((W) => {
|
|
48771
48771
|
let K = W.split("/");
|
|
48772
48772
|
if (K.length > 1) {
|
|
48773
|
-
let V = K.slice(0, -1).join("/"), X2 = E.get(V),
|
|
48774
|
-
if (X2 &&
|
|
48773
|
+
let V = K.slice(0, -1).join("/"), X2 = E.get(V), $2 = E.get(W);
|
|
48774
|
+
if (X2 && $2) X2.children.push($2), X2.fileCount += $2.fileCount, X2.totalSize += $2.totalSize;
|
|
48775
48775
|
}
|
|
48776
48776
|
});
|
|
48777
|
-
let Y = q ? q.split("/").pop() || "root" : "root",
|
|
48777
|
+
let Y = q ? q.split("/").pop() || "root" : "root", Z = [];
|
|
48778
48778
|
return J.forEach((W) => {
|
|
48779
|
-
if (W.path.split("/").length === 1)
|
|
48779
|
+
if (W.path.split("/").length === 1) Z.push(W);
|
|
48780
48780
|
}), j.forEach((W) => {
|
|
48781
|
-
if (W.path.split("/").length === 1)
|
|
48782
|
-
}), { root: { path: q || ".", name: Y, children:
|
|
48781
|
+
if (W.path.split("/").length === 1) Z.push(W);
|
|
48782
|
+
}), { root: { path: q || ".", name: Y, children: Z, fileCount: j.length, totalSize: j.reduce((W, K) => W + (K.size || 0), 0), depth: 0, relativePath: "" }, allFiles: j, allDirectories: J };
|
|
48783
48783
|
}
|
|
48784
48784
|
static calculateStats(j, k) {
|
|
48785
48785
|
return { totalFiles: j.length, totalDirectories: k.length, totalSize: j.reduce((q, E) => q + (E.size || 0), 0), maxDepth: this.calculateMaxDepth(k) };
|
|
@@ -48823,13 +48823,13 @@ class G {
|
|
|
48823
48823
|
var _a, _b;
|
|
48824
48824
|
if (!k || k.length === 0) return j;
|
|
48825
48825
|
let E = j.metadata.sourceInfo.rootPath || "", J = ((_a = q == null ? void 0 : q.fileDefaults) == null ? void 0 : _a.lastModified) || /* @__PURE__ */ new Date(0), Q = ((_b = q == null ? void 0 : q.fileDefaults) == null ? void 0 : _b.size) ?? 0, Y = k.map((O) => {
|
|
48826
|
-
let { path: H, ...
|
|
48827
|
-
return { path: H, name: N, extension: B, size: Q, lastModified: J, isDirectory: false, relativePath: this.calculateRelativePath(H, E), ...
|
|
48828
|
-
}),
|
|
48829
|
-
return { sha: X2, root: _, allFiles: W, allDirectories: K, stats: V, metadata:
|
|
48826
|
+
let { path: H, ...A } = O, L = H.split("/"), N = L[L.length - 1] || "", B = N.includes(".") ? "." + N.split(".").pop().toLowerCase() : "";
|
|
48827
|
+
return { path: H, name: N, extension: B, size: Q, lastModified: J, isDirectory: false, relativePath: this.calculateRelativePath(H, E), ...A };
|
|
48828
|
+
}), Z = [...j.allFiles, ...Y], { root: _, allFiles: W, allDirectories: K } = this.buildTreeFromFileInfos(Z, E), V = this.calculateStats(W, K), X2 = (q == null ? void 0 : q.updateSha) ? q.updateSha(j.sha, k.length) : `${j.sha}-augmented:${k.length}`, $2 = { id: `${j.metadata.id}-augmented-${Date.now().toString(36)}`, timestamp: /* @__PURE__ */ new Date(), sourceType: "augmented", sourceSha: X2, sourceInfo: { ...j.metadata.sourceInfo, baseTreeId: j.metadata.id, baseTreeSha: j.sha, additionalFileCount: k.length, augmentedAt: (/* @__PURE__ */ new Date()).toISOString() } };
|
|
48829
|
+
return { sha: X2, root: _, allFiles: W, allDirectories: K, stats: V, metadata: $2 };
|
|
48830
48830
|
}
|
|
48831
48831
|
}
|
|
48832
|
-
class
|
|
48832
|
+
class M {
|
|
48833
48833
|
generateTimestampId() {
|
|
48834
48834
|
return Date.now().toString(36);
|
|
48835
48835
|
}
|
|
@@ -48842,7 +48842,7 @@ class A {
|
|
|
48842
48842
|
return Math.abs(k).toString(36);
|
|
48843
48843
|
}
|
|
48844
48844
|
}
|
|
48845
|
-
class U extends
|
|
48845
|
+
class U extends M {
|
|
48846
48846
|
build(j) {
|
|
48847
48847
|
let { files: k, rootPath: q = "" } = j, { root: E, allFiles: J, allDirectories: Q } = G.buildTreeFromPaths(k, q), Y = G.calculateStats(J, Q);
|
|
48848
48848
|
return { sha: this.calculateSha(j), metadata: this.generateMetadata(j), root: E, allFiles: J, allDirectories: Q, stats: Y };
|
|
@@ -50963,8 +50963,8 @@ const LegendTabs = ({
|
|
|
50963
50963
|
flex: 1,
|
|
50964
50964
|
padding: "10px 12px",
|
|
50965
50965
|
backgroundColor: theme2.colors.background,
|
|
50966
|
-
border: `1px solid ${theme2.colors.border}`,
|
|
50967
50966
|
borderTop: "none",
|
|
50967
|
+
borderRight: `1px solid ${theme2.colors.border}`,
|
|
50968
50968
|
borderBottom: isActive ? `1px solid ${theme2.colors.background}` : `1px solid ${theme2.colors.border}`,
|
|
50969
50969
|
borderLeft: index2 === 0 ? `1px solid ${theme2.colors.border}` : "none",
|
|
50970
50970
|
marginBottom: "-1px",
|