@industry-theme/file-city-panel 0.4.1 → 0.4.2
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeCityPanel.d.ts","sourceRoot":"","sources":["../../src/panels/CodeCityPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAmCjF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAexD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,KAAK,CAAC;QACd,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE;YACX,IAAI,EAAE,MAAM,CAAC;YACb,IAAI,EAAE,MAAM,CAAC;YACb,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,cAAc,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;YACpG,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YACrC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YACxC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YACzC,iBAAiB,CAAC,EAAE,KAAK,CAAC;gBAAE,IAAI,EAAE,MAAM,CAAC;gBAAC,OAAO,EAAE,MAAM,CAAA;aAAE,CAAC,CAAC;YAC7D,cAAc,CAAC,EAAE,OAAO,CAAC;SAC1B,CAAC;KACH,CAAC,CAAC;IACH,OAAO,EAAE;QACP,UAAU,EAAE,OAAO,CAAC;QACpB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,aAAa,EAA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QAClB,OAAO,EAAE,MAAM,EAAE,CAAC;KACnB,CAAC;IACF,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAGD,YAAY,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAmCpF;;GAEG;AACH,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA2jE3D,CAAC;AAEF;;;GAGG;AACH,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAE3D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EA8BxC,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -98695,7 +98695,7 @@ const CodeCityPanelContent = ({
|
|
|
98695
98695
|
actions,
|
|
98696
98696
|
events
|
|
98697
98697
|
}) => {
|
|
98698
|
-
var _a, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
|
|
98698
|
+
var _a, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
98699
98699
|
const autoShowTour = ("autoShowTour" in context ? context.autoShowTour : false) ?? false;
|
|
98700
98700
|
const { theme: theme2 } = useTheme();
|
|
98701
98701
|
const [cityData, setCityData] = useState(null);
|
|
@@ -98764,6 +98764,8 @@ const CodeCityPanelContent = ({
|
|
|
98764
98764
|
const repositoryEntrySlice = context.repositoryEntry;
|
|
98765
98765
|
const qualityData = (_c = colorModesSlice == null ? void 0 : colorModesSlice.data) == null ? void 0 : _c.qualityData;
|
|
98766
98766
|
const isGitHubPublic = (_e2 = (_d = repositoryEntrySlice == null ? void 0 : repositoryEntrySlice.data) == null ? void 0 : _d.github) == null ? void 0 : _e2.isPublic;
|
|
98767
|
+
const githubRepoString = (_f = context.currentScope.repository) == null ? void 0 : _f.githubRepo;
|
|
98768
|
+
const [repoOwner, repoName] = (githubRepoString == null ? void 0 : githubRepoString.includes("/")) ? githubRepoString.split("/") : [void 0, void 0];
|
|
98767
98769
|
const packagesSlice = context.packages;
|
|
98768
98770
|
const fileColorLayersRegistered = useRef(false);
|
|
98769
98771
|
const gitLayersRegistered = useRef(false);
|
|
@@ -98771,7 +98773,7 @@ const CodeCityPanelContent = ({
|
|
|
98771
98773
|
const commitFilesLayersRegistered = useRef(false);
|
|
98772
98774
|
const agentLayersRegistered = useRef(false);
|
|
98773
98775
|
const lastHasGitOrAgentLayers = useRef(null);
|
|
98774
|
-
const currentRepoPath = (
|
|
98776
|
+
const currentRepoPath = (_g = context.currentScope.repository) == null ? void 0 : _g.path;
|
|
98775
98777
|
const lastRepoPath = useRef(currentRepoPath);
|
|
98776
98778
|
useEffect(() => {
|
|
98777
98779
|
if (lastRepoPath.current !== currentRepoPath) {
|
|
@@ -98827,7 +98829,7 @@ const CodeCityPanelContent = ({
|
|
|
98827
98829
|
}
|
|
98828
98830
|
};
|
|
98829
98831
|
loadTour();
|
|
98830
|
-
}, [fileTreeSlice == null ? void 0 : fileTreeSlice.data, (
|
|
98832
|
+
}, [fileTreeSlice == null ? void 0 : fileTreeSlice.data, (_h = context.currentScope.repository) == null ? void 0 : _h.path, context.adapters]);
|
|
98831
98833
|
useEffect(() => {
|
|
98832
98834
|
if (autoShowTour && tourData && !hasAutoShownTourRef.current) {
|
|
98833
98835
|
setShowTourPlayer(true);
|
|
@@ -99099,7 +99101,7 @@ const CodeCityPanelContent = ({
|
|
|
99099
99101
|
}
|
|
99100
99102
|
}
|
|
99101
99103
|
return layers;
|
|
99102
|
-
}, [cityData, (
|
|
99104
|
+
}, [cityData, (_i = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _i.filesByStatus, prFilesVersion]);
|
|
99103
99105
|
const commitFilesLayers = useMemo(() => {
|
|
99104
99106
|
var _a2;
|
|
99105
99107
|
if (!cityData || !cityData.buildings || !((_a2 = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _a2.filesByStatus)) {
|
|
@@ -99177,7 +99179,7 @@ const CodeCityPanelContent = ({
|
|
|
99177
99179
|
}
|
|
99178
99180
|
}
|
|
99179
99181
|
return layers;
|
|
99180
|
-
}, [cityData, (
|
|
99182
|
+
}, [cityData, (_j = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _j.filesByStatus, commitFilesVersion]);
|
|
99181
99183
|
const storyboardLayers = useMemo(() => {
|
|
99182
99184
|
if (!cityData || !cityData.buildings || !(storyboardContextSlice == null ? void 0 : storyboardContextSlice.data)) {
|
|
99183
99185
|
return [];
|
|
@@ -99278,7 +99280,7 @@ const CodeCityPanelContent = ({
|
|
|
99278
99280
|
if (!((_a2 = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _a2.filesByStatus)) return 0;
|
|
99279
99281
|
const { added, modified, removed, renamed } = prFilesSlice.data.filesByStatus;
|
|
99280
99282
|
return added.length + modified.length + removed.length + renamed.length;
|
|
99281
|
-
}, [(
|
|
99283
|
+
}, [(_k = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _k.filesByStatus]);
|
|
99282
99284
|
const legendAgentLayers = useMemo(() => {
|
|
99283
99285
|
const agentLayers = highlightLayers.filter(
|
|
99284
99286
|
(layer) => layer.id.startsWith("event-highlight")
|
|
@@ -99571,7 +99573,7 @@ const CodeCityPanelContent = ({
|
|
|
99571
99573
|
} finally {
|
|
99572
99574
|
setLoading(false);
|
|
99573
99575
|
}
|
|
99574
|
-
}, [fileTreeSlice == null ? void 0 : fileTreeSlice.data, fileTreeSlice == null ? void 0 : fileTreeSlice.loading, (
|
|
99576
|
+
}, [fileTreeSlice == null ? void 0 : fileTreeSlice.data, fileTreeSlice == null ? void 0 : fileTreeSlice.loading, (_l = context.currentScope.repository) == null ? void 0 : _l.path]);
|
|
99575
99577
|
const handleFileClick = useCallback(
|
|
99576
99578
|
(filePath, type) => {
|
|
99577
99579
|
if (type === "file") {
|
|
@@ -99797,7 +99799,7 @@ const CodeCityPanelContent = ({
|
|
|
99797
99799
|
path: tourFilePath,
|
|
99798
99800
|
commitSha
|
|
99799
99801
|
};
|
|
99800
|
-
}, [tourFilePath, context.currentScope.repository, (
|
|
99802
|
+
}, [tourFilePath, context.currentScope.repository, (_n = (_m = fileTreeSlice == null ? void 0 : fileTreeSlice.data) == null ? void 0 : _m.metadata) == null ? void 0 : _n.sourceSha]);
|
|
99801
99803
|
return /* @__PURE__ */ jsxs(
|
|
99802
99804
|
"div",
|
|
99803
99805
|
{
|
|
@@ -99834,7 +99836,11 @@ const CodeCityPanelContent = ({
|
|
|
99834
99836
|
flex: 1
|
|
99835
99837
|
},
|
|
99836
99838
|
title: isGitHubPublic === false ? "This repository is private on GitHub" : isGitHubPublic === true ? "This repository is public on GitHub" : void 0,
|
|
99837
|
-
children:
|
|
99839
|
+
children: repoName && repoOwner ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
99840
|
+
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.text }, children: repoName }),
|
|
99841
|
+
" by ",
|
|
99842
|
+
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.text }, children: repoOwner })
|
|
99843
|
+
] }) : "File City"
|
|
99838
99844
|
}
|
|
99839
99845
|
),
|
|
99840
99846
|
!showTourPlayer && tourData && /* @__PURE__ */ jsxs(
|
|
@@ -100136,14 +100142,14 @@ const CodeCityPanelContent = ({
|
|
|
100136
100142
|
workspacePackageCount: legendPackageData.workspacePackageCount,
|
|
100137
100143
|
gitStatus: gitSlice == null ? void 0 : gitSlice.data,
|
|
100138
100144
|
panelActions: actions,
|
|
100139
|
-
prFiles: (
|
|
100140
|
-
prFileStats: (
|
|
100141
|
-
prNumber: (
|
|
100142
|
-
commitFiles: (
|
|
100143
|
-
commitHash: (
|
|
100144
|
-
commitStats: (
|
|
100145
|
+
prFiles: (_o = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _o.filesByStatus,
|
|
100146
|
+
prFileStats: (_p = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _p.files,
|
|
100147
|
+
prNumber: (_q = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _q.pullNumber,
|
|
100148
|
+
commitFiles: (_r = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _r.filesByStatus,
|
|
100149
|
+
commitHash: (_s = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _s.commitHash,
|
|
100150
|
+
commitStats: (_t = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _t.stats,
|
|
100145
100151
|
fileTree: fileTreeSlice == null ? void 0 : fileTreeSlice.data,
|
|
100146
|
-
rootPath: (
|
|
100152
|
+
rootPath: (_u = context.currentScope.repository) == null ? void 0 : _u.path,
|
|
100147
100153
|
onGitFileClick: handleLegendFileClick,
|
|
100148
100154
|
onGitNodeHover: handleGitNodeHover,
|
|
100149
100155
|
onPrFileClick: handleLegendFileClick,
|