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

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.
@@ -14516,28 +14516,6 @@ function createKnipHighlightLayers(buildings, knipMetrics) {
14516
14516
  function createAlexandriaHighlightLayers(buildings, alexandriaMetrics) {
14517
14517
  return createMetricHighlightLayers(buildings, alexandriaMetrics, "alexandria");
14518
14518
  }
14519
- function isColorModeAvailable(mode, qualityData, hasGitData) {
14520
- var _a, _b, _c, _d, _e;
14521
- if (mode === "fileTypes") return true;
14522
- if (mode === "git") return hasGitData;
14523
- if (!qualityData) return false;
14524
- switch (mode) {
14525
- case "coverage":
14526
- return !!qualityData.fileCoverage && Object.keys(qualityData.fileCoverage).length > 0;
14527
- case "eslint":
14528
- return !!((_a = qualityData.fileMetrics) == null ? void 0 : _a.eslint) && qualityData.fileMetrics.eslint.length > 0;
14529
- case "typescript":
14530
- return !!((_b = qualityData.fileMetrics) == null ? void 0 : _b.typescript) && qualityData.fileMetrics.typescript.length > 0;
14531
- case "prettier":
14532
- return !!((_c = qualityData.fileMetrics) == null ? void 0 : _c.prettier) && qualityData.fileMetrics.prettier.length > 0;
14533
- case "knip":
14534
- return !!((_d = qualityData.fileMetrics) == null ? void 0 : _d.knip) && qualityData.fileMetrics.knip.length > 0;
14535
- case "alexandria":
14536
- return !!((_e = qualityData.fileMetrics) == null ? void 0 : _e.alexandria) && qualityData.fileMetrics.alexandria.length > 0;
14537
- default:
14538
- return false;
14539
- }
14540
- }
14541
14519
  function getLayersForColorMode(mode, buildings, qualityData, fileColorLayers, gitLayers) {
14542
14520
  var _a, _b, _c, _d, _e;
14543
14521
  switch (mode) {
@@ -14704,8 +14682,7 @@ const CodeCityPanelContent = ({
14704
14682
  return COLOR_MODES.filter((mode) => {
14705
14683
  if (mode.id === "fileTypes") return true;
14706
14684
  if (mode.id === "git") return hasGitData;
14707
- if (!(enabledModes == null ? void 0 : enabledModes.includes(mode.id))) return false;
14708
- return isColorModeAvailable(mode.id, qualityData, !!hasGitData);
14685
+ return (enabledModes == null ? void 0 : enabledModes.includes(mode.id)) ?? false;
14709
14686
  });
14710
14687
  }, [gitSlice == null ? void 0 : gitSlice.data, (_d = colorModesSlice == null ? void 0 : colorModesSlice.data) == null ? void 0 : _d.enabledModes, qualityData]);
14711
14688
  useEffect(() => {
@@ -15086,7 +15063,7 @@ const CodeCityPanelContent = ({
15086
15063
  }
15087
15064
  setBaseLayers(modeLayers);
15088
15065
  const activePackagePath = selectedPackagePath ?? hoveredPackagePath;
15089
- if (activePackagePath !== null && modeLayers.length > 0) {
15066
+ if (activePackagePath && activePackagePath !== "" && activePackagePath !== "/" && modeLayers.length > 0) {
15090
15067
  const packageFilteredLayers = [];
15091
15068
  modeLayers.forEach((layer) => {
15092
15069
  const insidePackage = layer.items.filter(