@industry-theme/file-city-panel 0.2.9 → 0.2.11

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;AA6sCD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAEvD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EA8BxC,CAAC"}
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;AAotCD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAEvD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EA8BxC,CAAC"}
@@ -14682,15 +14682,17 @@ const CodeCityPanelContent = ({
14682
14682
  return COLOR_MODES.filter((mode) => {
14683
14683
  if (mode.id === "fileTypes") return true;
14684
14684
  if (mode.id === "git") return hasGitData;
14685
+ if (sliceSelectedColorMode === mode.id) return true;
14685
14686
  return (enabledModes == null ? void 0 : enabledModes.includes(mode.id)) ?? false;
14686
14687
  });
14687
- }, [gitSlice == null ? void 0 : gitSlice.data, (_d = colorModesSlice == null ? void 0 : colorModesSlice.data) == null ? void 0 : _d.enabledModes, qualityData]);
14688
+ }, [gitSlice == null ? void 0 : gitSlice.data, (_d = colorModesSlice == null ? void 0 : colorModesSlice.data) == null ? void 0 : _d.enabledModes, qualityData, sliceSelectedColorMode]);
14688
14689
  useEffect(() => {
14689
14690
  const currentModeAvailable = availableColorModes.some((m) => m.id === colorMode);
14690
- if (!currentModeAvailable) {
14691
+ const selectedModeAvailable = sliceSelectedColorMode && availableColorModes.some((m) => m.id === sliceSelectedColorMode);
14692
+ if (!currentModeAvailable && !selectedModeAvailable) {
14691
14693
  setColorMode("fileTypes");
14692
14694
  }
14693
- }, [availableColorModes, colorMode]);
14695
+ }, [availableColorModes, colorMode, sliceSelectedColorMode]);
14694
14696
  const currentColorModeConfig = useMemo(() => {
14695
14697
  return COLOR_MODES.find((m) => m.id === colorMode) || COLOR_MODES[0];
14696
14698
  }, [colorMode]);