@industry-theme/file-city-panel 0.2.3 → 0.2.5
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;AAsBjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAYpD;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;
|
|
1
|
+
{"version":3,"file":"CodeCityPanel.d.ts","sourceRoot":"","sources":["../../src/panels/CodeCityPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAsBjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAYpD;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAguCD;;;;;;;;;;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
|
@@ -14681,9 +14681,16 @@ const CodeCityPanelContent = ({
|
|
|
14681
14681
|
const payload = event.payload;
|
|
14682
14682
|
setSelectedPackagePath((payload == null ? void 0 : payload.packagePath) ?? null);
|
|
14683
14683
|
});
|
|
14684
|
+
const cleanupColorMode = events.on("quality:colorMode:select", (event) => {
|
|
14685
|
+
const payload = event.payload;
|
|
14686
|
+
if (payload == null ? void 0 : payload.colorMode) {
|
|
14687
|
+
setColorMode(payload.colorMode);
|
|
14688
|
+
}
|
|
14689
|
+
});
|
|
14684
14690
|
return () => {
|
|
14685
14691
|
cleanupHover == null ? void 0 : cleanupHover();
|
|
14686
14692
|
cleanupSelect == null ? void 0 : cleanupSelect();
|
|
14693
|
+
cleanupColorMode == null ? void 0 : cleanupColorMode();
|
|
14687
14694
|
};
|
|
14688
14695
|
}, [events]);
|
|
14689
14696
|
const availableColorModes = useMemo(() => {
|
|
@@ -14700,13 +14707,7 @@ const CodeCityPanelContent = ({
|
|
|
14700
14707
|
useEffect(() => {
|
|
14701
14708
|
const currentModeAvailable = availableColorModes.some((m) => m.id === colorMode);
|
|
14702
14709
|
if (!currentModeAvailable) {
|
|
14703
|
-
|
|
14704
|
-
setColorMode((nonFileTypesMode == null ? void 0 : nonFileTypesMode.id) || "fileTypes");
|
|
14705
|
-
} else if (availableColorModes.length > 1 && colorMode === "fileTypes") {
|
|
14706
|
-
const nonFileTypesMode = availableColorModes.find((m) => m.id !== "fileTypes");
|
|
14707
|
-
if (nonFileTypesMode) {
|
|
14708
|
-
setColorMode(nonFileTypesMode.id);
|
|
14709
|
-
}
|
|
14710
|
+
setColorMode("fileTypes");
|
|
14710
14711
|
}
|
|
14711
14712
|
}, [availableColorModes, colorMode]);
|
|
14712
14713
|
const currentColorModeConfig = useMemo(() => {
|