@industry-theme/file-city-panel 0.3.11 → 0.3.12
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;AA8BjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAgBpD;;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,E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AAC;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,mBAAmB,CAorEvD,CAAC;AAEF;;;GAGG;AACH,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAEvD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EA8BxC,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -53934,7 +53934,7 @@ const CodeCityPanelContent = ({
|
|
|
53934
53934
|
actions: _actions,
|
|
53935
53935
|
events
|
|
53936
53936
|
}) => {
|
|
53937
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D;
|
|
53937
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F;
|
|
53938
53938
|
const { theme: theme2 } = useTheme();
|
|
53939
53939
|
const [cityData, setCityData] = useState(null);
|
|
53940
53940
|
const [hoverInfo, setHoverInfo] = useState(null);
|
|
@@ -53946,6 +53946,7 @@ const CodeCityPanelContent = ({
|
|
|
53946
53946
|
const [showTourPlayer, setShowTourPlayer] = useState(false);
|
|
53947
53947
|
const [currentTourStepIndex, setCurrentTourStepIndex] = useState(0);
|
|
53948
53948
|
const [tourData, setTourData] = useState(null);
|
|
53949
|
+
const [tourFilePath, setTourFilePath] = useState(null);
|
|
53949
53950
|
const [tourHighlightLayers, setTourHighlightLayers] = useState([]);
|
|
53950
53951
|
const [tourColorMode, setTourColorMode] = useState(null);
|
|
53951
53952
|
const sliceSelectedColorMode = (_b = (_a = context.getSlice("fileCityColorModes")) == null ? void 0 : _a.data) == null ? void 0 : _b.selectedColorMode;
|
|
@@ -54028,33 +54029,38 @@ const CodeCityPanelContent = ({
|
|
|
54028
54029
|
}
|
|
54029
54030
|
const loadTour = async () => {
|
|
54030
54031
|
var _a3;
|
|
54031
|
-
const
|
|
54032
|
-
if (!
|
|
54032
|
+
const foundTourFilePath = findTourFilePathInFileTree(fileTreeSlice.data);
|
|
54033
|
+
if (!foundTourFilePath) {
|
|
54033
54034
|
setTourData(null);
|
|
54035
|
+
setTourFilePath(null);
|
|
54034
54036
|
return;
|
|
54035
54037
|
}
|
|
54036
54038
|
if (!((_a3 = context.adapters) == null ? void 0 : _a3.readFile)) {
|
|
54037
54039
|
console.warn("[Tour] No readFile adapter available - cannot load tour file");
|
|
54038
54040
|
setTourData(null);
|
|
54041
|
+
setTourFilePath(null);
|
|
54039
54042
|
return;
|
|
54040
54043
|
}
|
|
54041
54044
|
const repoPath = context.currentScope.repository.path;
|
|
54042
|
-
const fullPath = `${repoPath}/${
|
|
54045
|
+
const fullPath = `${repoPath}/${foundTourFilePath}`;
|
|
54043
54046
|
try {
|
|
54044
54047
|
const tourContent = await context.adapters.readFile(fullPath);
|
|
54045
54048
|
const tourResult = parseTour(tourContent);
|
|
54046
54049
|
if (tourResult.success && tourResult.tour) {
|
|
54047
|
-
console.log("[Tour] Found and parsed tour file:", tourResult.tour.title, `(${
|
|
54050
|
+
console.log("[Tour] Found and parsed tour file:", tourResult.tour.title, `(${foundTourFilePath})`);
|
|
54048
54051
|
setTourData(tourResult.tour);
|
|
54052
|
+
setTourFilePath(foundTourFilePath);
|
|
54049
54053
|
} else {
|
|
54050
54054
|
if (tourResult.errors && tourResult.errors.length > 0) {
|
|
54051
54055
|
console.warn("[Tour] Tour validation failed:", tourResult.errors.map((e) => e.message).join(", "));
|
|
54052
54056
|
}
|
|
54053
54057
|
setTourData(null);
|
|
54058
|
+
setTourFilePath(null);
|
|
54054
54059
|
}
|
|
54055
54060
|
} catch (error) {
|
|
54056
54061
|
console.warn("[Tour] Failed to read tour file:", error instanceof Error ? error.message : "Unknown error");
|
|
54057
54062
|
setTourData(null);
|
|
54063
|
+
setTourFilePath(null);
|
|
54058
54064
|
}
|
|
54059
54065
|
};
|
|
54060
54066
|
loadTour();
|
|
@@ -55083,6 +55089,22 @@ const CodeCityPanelContent = ({
|
|
|
55083
55089
|
}
|
|
55084
55090
|
return layers;
|
|
55085
55091
|
}, [highlightLayers, gitTreeHoverLayer, selectedFileLayer, previewCoverLayer, hoveredPackagePath, selectedPackagePath, isFileInPackage, tourHighlightLayers]);
|
|
55092
|
+
const tourAudioContext = useMemo(() => {
|
|
55093
|
+
var _a2, _b2, _c2;
|
|
55094
|
+
if (!tourFilePath) return void 0;
|
|
55095
|
+
const githubRepo = (_a2 = context.currentScope.repository) == null ? void 0 : _a2.githubRepo;
|
|
55096
|
+
if (!githubRepo || !githubRepo.includes("/")) return void 0;
|
|
55097
|
+
const [owner, repo] = githubRepo.split("/");
|
|
55098
|
+
if (!owner || !repo) return void 0;
|
|
55099
|
+
const commitSha = (_c2 = (_b2 = fileTreeSlice == null ? void 0 : fileTreeSlice.data) == null ? void 0 : _b2.metadata) == null ? void 0 : _c2.sourceSha;
|
|
55100
|
+
if (!commitSha) return void 0;
|
|
55101
|
+
return {
|
|
55102
|
+
owner,
|
|
55103
|
+
repo,
|
|
55104
|
+
path: tourFilePath,
|
|
55105
|
+
commitSha
|
|
55106
|
+
};
|
|
55107
|
+
}, [tourFilePath, context.currentScope.repository, (_l = (_k = fileTreeSlice == null ? void 0 : fileTreeSlice.data) == null ? void 0 : _k.metadata) == null ? void 0 : _l.sourceSha]);
|
|
55086
55108
|
return /* @__PURE__ */ jsxs(
|
|
55087
55109
|
"div",
|
|
55088
55110
|
{
|
|
@@ -55457,7 +55479,7 @@ const CodeCityPanelContent = ({
|
|
|
55457
55479
|
textOverflow: "ellipsis",
|
|
55458
55480
|
whiteSpace: "nowrap"
|
|
55459
55481
|
},
|
|
55460
|
-
children: ((
|
|
55482
|
+
children: ((_m = hoverInfo.fileTooltip) == null ? void 0 : _m.text) || ((_o = (_n = hoverInfo.hoveredDistrict) == null ? void 0 : _n.path) == null ? void 0 : _o.split("/").pop()) || ((_p = hoverInfo.hoveredDistrict) == null ? void 0 : _p.path) || "Unknown"
|
|
55461
55483
|
}
|
|
55462
55484
|
),
|
|
55463
55485
|
/* @__PURE__ */ jsx(
|
|
@@ -55471,7 +55493,7 @@ const CodeCityPanelContent = ({
|
|
|
55471
55493
|
textOverflow: "ellipsis",
|
|
55472
55494
|
whiteSpace: "nowrap"
|
|
55473
55495
|
},
|
|
55474
|
-
children: ((
|
|
55496
|
+
children: ((_q = hoverInfo.hoveredBuilding) == null ? void 0 : _q.path) || ((_r = hoverInfo.hoveredDistrict) == null ? void 0 : _r.path) || "/"
|
|
55475
55497
|
}
|
|
55476
55498
|
)
|
|
55477
55499
|
]
|
|
@@ -55580,6 +55602,8 @@ const CodeCityPanelContent = ({
|
|
|
55580
55602
|
TourPlayer,
|
|
55581
55603
|
{
|
|
55582
55604
|
tour: tourData,
|
|
55605
|
+
tourAudioContext,
|
|
55606
|
+
actions: _actions,
|
|
55583
55607
|
currentStepIndex: currentTourStepIndex,
|
|
55584
55608
|
onStepChange: (stepIndex, step) => {
|
|
55585
55609
|
setCurrentTourStepIndex(stepIndex);
|
|
@@ -55705,14 +55729,14 @@ const CodeCityPanelContent = ({
|
|
|
55705
55729
|
packageData: legendPackageData.packageData,
|
|
55706
55730
|
workspacePackageCount: legendPackageData.workspacePackageCount,
|
|
55707
55731
|
gitStatus: gitSlice == null ? void 0 : gitSlice.data,
|
|
55708
|
-
prFiles: (
|
|
55709
|
-
prFileStats: (
|
|
55710
|
-
prNumber: (
|
|
55711
|
-
commitFiles: (
|
|
55712
|
-
commitHash: (
|
|
55713
|
-
commitStats: (
|
|
55732
|
+
prFiles: (_s = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _s.filesByStatus,
|
|
55733
|
+
prFileStats: (_t = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _t.files,
|
|
55734
|
+
prNumber: (_u = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _u.pullNumber,
|
|
55735
|
+
commitFiles: (_v = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _v.filesByStatus,
|
|
55736
|
+
commitHash: (_w = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _w.commitHash,
|
|
55737
|
+
commitStats: (_x = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _x.stats,
|
|
55714
55738
|
fileTree: fileTreeSlice == null ? void 0 : fileTreeSlice.data,
|
|
55715
|
-
rootPath: (
|
|
55739
|
+
rootPath: (_y = context.currentScope.repository) == null ? void 0 : _y.path,
|
|
55716
55740
|
onGitFileClick: handleLegendFileClick,
|
|
55717
55741
|
onGitNodeHover: handleGitNodeHover,
|
|
55718
55742
|
onPrFileClick: handleLegendFileClick,
|
|
@@ -55737,14 +55761,14 @@ const CodeCityPanelContent = ({
|
|
|
55737
55761
|
packageData: legendPackageData.packageData,
|
|
55738
55762
|
workspacePackageCount: legendPackageData.workspacePackageCount,
|
|
55739
55763
|
gitStatus: gitSlice == null ? void 0 : gitSlice.data,
|
|
55740
|
-
prFiles: (
|
|
55741
|
-
prFileStats: (
|
|
55742
|
-
prNumber: (
|
|
55743
|
-
commitFiles: (
|
|
55744
|
-
commitHash: (
|
|
55745
|
-
commitStats: (
|
|
55764
|
+
prFiles: (_z = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _z.filesByStatus,
|
|
55765
|
+
prFileStats: (_A = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _A.files,
|
|
55766
|
+
prNumber: (_B = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _B.pullNumber,
|
|
55767
|
+
commitFiles: (_C = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _C.filesByStatus,
|
|
55768
|
+
commitHash: (_D = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _D.commitHash,
|
|
55769
|
+
commitStats: (_E = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _E.stats,
|
|
55746
55770
|
fileTree: fileTreeSlice == null ? void 0 : fileTreeSlice.data,
|
|
55747
|
-
rootPath: (
|
|
55771
|
+
rootPath: (_F = context.currentScope.repository) == null ? void 0 : _F.path,
|
|
55748
55772
|
agentLayers: legendAgentLayers,
|
|
55749
55773
|
qualityMetrics: legendQualityMetrics,
|
|
55750
55774
|
colorMode,
|