@industry-theme/file-city-panel 0.2.23 → 0.2.24

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.
@@ -14948,32 +14948,488 @@ function requireDist() {
14948
14948
  return dist$1;
14949
14949
  }
14950
14950
  var distExports = requireDist();
14951
- const COLOR_MODES = [
14952
- { id: "fileTypes", name: "File Types", description: "Color by file extension" },
14953
- { id: "git", name: "Git Status", description: "Color by git changes" },
14954
- { id: "coverage", name: "Test Coverage", description: "Color by test coverage %" },
14955
- { id: "eslint", name: "Linting (ESLint)", description: "Color by ESLint issues" },
14956
- { id: "biome-lint", name: "Linting (Biome)", description: "Color by Biome lint issues" },
14957
- { id: "typescript", name: "Type Safety", description: "Color by TypeScript errors" },
14958
- { id: "prettier", name: "Formatting (Prettier)", description: "Color by Prettier issues" },
14959
- { id: "biome-format", name: "Formatting (Biome)", description: "Color by Biome format issues" },
14960
- { id: "knip", name: "Dead Code", description: "Color by unused exports" },
14961
- { id: "alexandria", name: "Documentation", description: "Color by doc coverage" }
14951
+ var LENS_REGISTRY = [
14952
+ // ============================================================
14953
+ // LINTING - Code style and bug detection
14954
+ // ============================================================
14955
+ // TypeScript/JavaScript linting
14956
+ {
14957
+ id: "eslint",
14958
+ name: "ESLint",
14959
+ category: "linting",
14960
+ languages: ["typescript", "javascript"],
14961
+ outputsFileMetrics: true,
14962
+ outputsAggregate: true,
14963
+ colorScheme: "issues",
14964
+ description: "Pluggable linting utility for JavaScript and TypeScript",
14965
+ command: "eslint"
14966
+ },
14967
+ {
14968
+ id: "biome-lint",
14969
+ name: "Biome Lint",
14970
+ category: "linting",
14971
+ languages: ["typescript", "javascript"],
14972
+ alternativeTo: ["eslint"],
14973
+ outputsFileMetrics: true,
14974
+ outputsAggregate: true,
14975
+ colorScheme: "issues",
14976
+ description: "Fast linter for JavaScript and TypeScript",
14977
+ command: "biome lint"
14978
+ },
14979
+ {
14980
+ id: "oxlint",
14981
+ name: "OxLint",
14982
+ category: "linting",
14983
+ languages: ["typescript", "javascript"],
14984
+ alternativeTo: ["eslint", "biome-lint"],
14985
+ outputsFileMetrics: true,
14986
+ outputsAggregate: true,
14987
+ colorScheme: "issues",
14988
+ description: "Blazing fast JavaScript/TypeScript linter",
14989
+ command: "oxlint"
14990
+ },
14991
+ // Python linting
14992
+ {
14993
+ id: "ruff",
14994
+ name: "Ruff",
14995
+ category: "linting",
14996
+ languages: ["python"],
14997
+ alternativeTo: ["pylint", "flake8"],
14998
+ outputsFileMetrics: true,
14999
+ outputsAggregate: true,
15000
+ colorScheme: "issues",
15001
+ description: "Extremely fast Python linter",
15002
+ command: "ruff check"
15003
+ },
15004
+ {
15005
+ id: "pylint",
15006
+ name: "Pylint",
15007
+ category: "linting",
15008
+ languages: ["python"],
15009
+ outputsFileMetrics: true,
15010
+ outputsAggregate: true,
15011
+ colorScheme: "issues",
15012
+ description: "Python static code analyzer",
15013
+ command: "pylint"
15014
+ },
15015
+ // Go linting
15016
+ {
15017
+ id: "golangci-lint",
15018
+ name: "golangci-lint",
15019
+ category: "linting",
15020
+ languages: ["go"],
15021
+ outputsFileMetrics: true,
15022
+ outputsAggregate: true,
15023
+ colorScheme: "issues",
15024
+ description: "Fast linters runner for Go",
15025
+ command: "golangci-lint run"
15026
+ },
15027
+ // Rust linting
15028
+ {
15029
+ id: "clippy",
15030
+ name: "Clippy",
15031
+ category: "linting",
15032
+ languages: ["rust"],
15033
+ outputsFileMetrics: true,
15034
+ outputsAggregate: true,
15035
+ colorScheme: "issues",
15036
+ description: "Rust linter",
15037
+ command: "cargo clippy"
15038
+ },
15039
+ // ============================================================
15040
+ // FORMATTING - Code formatting
15041
+ // ============================================================
15042
+ // TypeScript/JavaScript formatting
15043
+ {
15044
+ id: "prettier",
15045
+ name: "Prettier",
15046
+ category: "formatting",
15047
+ languages: ["typescript", "javascript"],
15048
+ outputsFileMetrics: true,
15049
+ outputsAggregate: true,
15050
+ colorScheme: "binary",
15051
+ description: "Opinionated code formatter",
15052
+ command: "prettier --check"
15053
+ },
15054
+ {
15055
+ id: "biome-format",
15056
+ name: "Biome Format",
15057
+ category: "formatting",
15058
+ languages: ["typescript", "javascript"],
15059
+ alternativeTo: ["prettier"],
15060
+ outputsFileMetrics: true,
15061
+ outputsAggregate: true,
15062
+ colorScheme: "binary",
15063
+ description: "Fast code formatter for JavaScript and TypeScript",
15064
+ command: "biome format"
15065
+ },
15066
+ // Python formatting
15067
+ {
15068
+ id: "black",
15069
+ name: "Black",
15070
+ category: "formatting",
15071
+ languages: ["python"],
15072
+ outputsFileMetrics: true,
15073
+ outputsAggregate: true,
15074
+ colorScheme: "binary",
15075
+ description: "The uncompromising Python code formatter",
15076
+ command: "black --check"
15077
+ },
15078
+ {
15079
+ id: "ruff-format",
15080
+ name: "Ruff Format",
15081
+ category: "formatting",
15082
+ languages: ["python"],
15083
+ alternativeTo: ["black"],
15084
+ outputsFileMetrics: true,
15085
+ outputsAggregate: true,
15086
+ colorScheme: "binary",
15087
+ description: "Fast Python formatter (Ruff)",
15088
+ command: "ruff format --check"
15089
+ },
15090
+ // Go formatting
15091
+ {
15092
+ id: "gofmt",
15093
+ name: "gofmt",
15094
+ category: "formatting",
15095
+ languages: ["go"],
15096
+ outputsFileMetrics: true,
15097
+ outputsAggregate: true,
15098
+ colorScheme: "binary",
15099
+ description: "Go code formatter",
15100
+ command: "gofmt -l"
15101
+ },
15102
+ // Rust formatting
15103
+ {
15104
+ id: "rustfmt",
15105
+ name: "rustfmt",
15106
+ category: "formatting",
15107
+ languages: ["rust"],
15108
+ outputsFileMetrics: true,
15109
+ outputsAggregate: true,
15110
+ colorScheme: "binary",
15111
+ description: "Rust code formatter",
15112
+ command: "cargo fmt --check"
15113
+ },
15114
+ // ============================================================
15115
+ // TYPES - Type checking
15116
+ // ============================================================
15117
+ // TypeScript
15118
+ {
15119
+ id: "typescript",
15120
+ name: "TypeScript",
15121
+ category: "types",
15122
+ languages: ["typescript"],
15123
+ outputsFileMetrics: true,
15124
+ outputsAggregate: true,
15125
+ colorScheme: "issues",
15126
+ description: "TypeScript type checker",
15127
+ command: "tsc --noEmit"
15128
+ },
15129
+ // Python type checking
15130
+ {
15131
+ id: "mypy",
15132
+ name: "MyPy",
15133
+ category: "types",
15134
+ languages: ["python"],
15135
+ outputsFileMetrics: true,
15136
+ outputsAggregate: true,
15137
+ colorScheme: "issues",
15138
+ description: "Static type checker for Python",
15139
+ command: "mypy"
15140
+ },
15141
+ {
15142
+ id: "pyright",
15143
+ name: "Pyright",
15144
+ category: "types",
15145
+ languages: ["python"],
15146
+ alternativeTo: ["mypy"],
15147
+ outputsFileMetrics: true,
15148
+ outputsAggregate: true,
15149
+ colorScheme: "issues",
15150
+ description: "Static type checker for Python",
15151
+ command: "pyright"
15152
+ },
15153
+ // Go type checking (built into compiler)
15154
+ {
15155
+ id: "go-vet",
15156
+ name: "Go Vet",
15157
+ category: "types",
15158
+ languages: ["go"],
15159
+ outputsFileMetrics: true,
15160
+ outputsAggregate: true,
15161
+ colorScheme: "issues",
15162
+ description: "Go static analyzer",
15163
+ command: "go vet"
15164
+ },
15165
+ // ============================================================
15166
+ // TESTS - Test coverage and results
15167
+ // ============================================================
15168
+ // JavaScript/TypeScript testing
15169
+ {
15170
+ id: "jest",
15171
+ name: "Jest",
15172
+ category: "tests",
15173
+ languages: ["typescript", "javascript"],
15174
+ outputsFileMetrics: true,
15175
+ outputsAggregate: true,
15176
+ colorScheme: "coverage",
15177
+ description: "JavaScript testing framework",
15178
+ command: "jest --coverage"
15179
+ },
15180
+ {
15181
+ id: "vitest",
15182
+ name: "Vitest",
15183
+ category: "tests",
15184
+ languages: ["typescript", "javascript"],
15185
+ alternativeTo: ["jest"],
15186
+ outputsFileMetrics: true,
15187
+ outputsAggregate: true,
15188
+ colorScheme: "coverage",
15189
+ description: "Vite-native testing framework",
15190
+ command: "vitest run --coverage"
15191
+ },
15192
+ {
15193
+ id: "bun-test",
15194
+ name: "Bun Test",
15195
+ category: "tests",
15196
+ languages: ["typescript", "javascript"],
15197
+ alternativeTo: ["jest", "vitest"],
15198
+ outputsFileMetrics: true,
15199
+ outputsAggregate: true,
15200
+ colorScheme: "coverage",
15201
+ description: "Bun native test runner",
15202
+ command: "bun test"
15203
+ },
15204
+ // Python testing
15205
+ {
15206
+ id: "pytest",
15207
+ name: "Pytest",
15208
+ category: "tests",
15209
+ languages: ["python"],
15210
+ outputsFileMetrics: true,
15211
+ outputsAggregate: true,
15212
+ colorScheme: "coverage",
15213
+ description: "Python testing framework",
15214
+ command: "pytest --cov"
15215
+ },
15216
+ // Go testing
15217
+ {
15218
+ id: "go-test",
15219
+ name: "Go Test",
15220
+ category: "tests",
15221
+ languages: ["go"],
15222
+ outputsFileMetrics: true,
15223
+ outputsAggregate: true,
15224
+ colorScheme: "coverage",
15225
+ description: "Go test runner",
15226
+ command: "go test -cover"
15227
+ },
15228
+ // Rust testing
15229
+ {
15230
+ id: "cargo-test",
15231
+ name: "Cargo Test",
15232
+ category: "tests",
15233
+ languages: ["rust"],
15234
+ outputsFileMetrics: true,
15235
+ outputsAggregate: true,
15236
+ colorScheme: "coverage",
15237
+ description: "Rust test runner",
15238
+ command: "cargo test"
15239
+ },
15240
+ // ============================================================
15241
+ // DEAD CODE - Unused code detection
15242
+ // ============================================================
15243
+ // TypeScript/JavaScript
15244
+ {
15245
+ id: "knip",
15246
+ name: "Knip",
15247
+ category: "dead-code",
15248
+ languages: ["typescript", "javascript"],
15249
+ outputsFileMetrics: true,
15250
+ outputsAggregate: true,
15251
+ colorScheme: "issues",
15252
+ description: "Find unused files, dependencies and exports",
15253
+ command: "knip"
15254
+ },
15255
+ // Python
15256
+ {
15257
+ id: "vulture",
15258
+ name: "Vulture",
15259
+ category: "dead-code",
15260
+ languages: ["python"],
15261
+ outputsFileMetrics: true,
15262
+ outputsAggregate: true,
15263
+ colorScheme: "issues",
15264
+ description: "Find dead Python code",
15265
+ command: "vulture"
15266
+ },
15267
+ // ============================================================
15268
+ // DOCUMENTATION - Documentation coverage
15269
+ // ============================================================
15270
+ {
15271
+ id: "alexandria",
15272
+ name: "Alexandria",
15273
+ category: "documentation",
15274
+ languages: ["typescript", "javascript"],
15275
+ outputsFileMetrics: true,
15276
+ outputsAggregate: true,
15277
+ colorScheme: "binary",
15278
+ description: "Documentation coverage checker",
15279
+ command: "alexandria lint"
15280
+ },
15281
+ {
15282
+ id: "typedoc",
15283
+ name: "TypeDoc",
15284
+ category: "documentation",
15285
+ languages: ["typescript"],
15286
+ outputsFileMetrics: false,
15287
+ outputsAggregate: true,
15288
+ colorScheme: "coverage",
15289
+ description: "TypeScript documentation generator",
15290
+ command: "typedoc"
15291
+ },
15292
+ // ============================================================
15293
+ // SECURITY - Security scanning
15294
+ // ============================================================
15295
+ {
15296
+ id: "npm-audit",
15297
+ name: "npm audit",
15298
+ category: "security",
15299
+ languages: ["typescript", "javascript"],
15300
+ outputsFileMetrics: false,
15301
+ outputsAggregate: true,
15302
+ colorScheme: "issues",
15303
+ description: "Check for known vulnerabilities in dependencies",
15304
+ command: "npm audit"
15305
+ },
15306
+ {
15307
+ id: "bandit",
15308
+ name: "Bandit",
15309
+ category: "security",
15310
+ languages: ["python"],
15311
+ outputsFileMetrics: true,
15312
+ outputsAggregate: true,
15313
+ colorScheme: "issues",
15314
+ description: "Python security linter",
15315
+ command: "bandit -r"
15316
+ }
14962
15317
  ];
14963
- const DEFAULT_COLOR_MODES = [
14964
- { id: "fileTypes", name: "File Types", description: "Color by file extension" },
14965
- { id: "git", name: "Git Status", description: "Color by git changes" }
15318
+ var CATEGORY_CONFIGS = [
15319
+ {
15320
+ id: "linting",
15321
+ name: "Linting",
15322
+ description: "Code style and bug detection",
15323
+ icon: "AlertCircle"
15324
+ },
15325
+ {
15326
+ id: "formatting",
15327
+ name: "Formatting",
15328
+ description: "Code formatting consistency",
15329
+ icon: "AlignLeft"
15330
+ },
15331
+ {
15332
+ id: "types",
15333
+ name: "Types",
15334
+ description: "Type safety and checking",
15335
+ icon: "FileType"
15336
+ },
15337
+ {
15338
+ id: "tests",
15339
+ name: "Tests",
15340
+ description: "Test coverage and results",
15341
+ icon: "TestTube"
15342
+ },
15343
+ {
15344
+ id: "dead-code",
15345
+ name: "Dead Code",
15346
+ description: "Unused code detection",
15347
+ icon: "Trash2",
15348
+ invertedScale: true
15349
+ },
15350
+ {
15351
+ id: "documentation",
15352
+ name: "Documentation",
15353
+ description: "Documentation coverage",
15354
+ icon: "FileText"
15355
+ },
15356
+ {
15357
+ id: "security",
15358
+ name: "Security",
15359
+ description: "Security vulnerability scanning",
15360
+ icon: "Shield"
15361
+ },
15362
+ {
15363
+ id: "complexity",
15364
+ name: "Complexity",
15365
+ description: "Code complexity metrics",
15366
+ icon: "GitBranch"
15367
+ }
14966
15368
  ];
14967
- const QUALITY_COLOR_MODES = [
14968
- { id: "coverage", name: "Test Coverage", description: "Color by test coverage %" },
14969
- { id: "eslint", name: "Linting (ESLint)", description: "Color by ESLint issues" },
14970
- { id: "biome-lint", name: "Linting (Biome)", description: "Color by Biome lint issues" },
14971
- { id: "typescript", name: "Type Safety", description: "Color by TypeScript errors" },
14972
- { id: "prettier", name: "Formatting (Prettier)", description: "Color by Prettier issues" },
14973
- { id: "biome-format", name: "Formatting (Biome)", description: "Color by Biome format issues" },
14974
- { id: "knip", name: "Dead Code", description: "Color by unused exports" },
14975
- { id: "alexandria", name: "Documentation", description: "Color by doc coverage" }
15369
+ function getLensById(id2) {
15370
+ return LENS_REGISTRY.find((lens) => lens.id === id2);
15371
+ }
15372
+ function getCategoryConfig(category) {
15373
+ return CATEGORY_CONFIGS.find((c) => c.id === category);
15374
+ }
15375
+ var BUILT_IN_COLOR_MODES = [
15376
+ {
15377
+ id: "fileTypes",
15378
+ name: "File Types",
15379
+ description: "Color by file extension/type",
15380
+ icon: "FileCode",
15381
+ colorScheme: "categorical",
15382
+ isBuiltIn: true
15383
+ },
15384
+ {
15385
+ id: "git",
15386
+ name: "Git Status",
15387
+ description: "Color by git status (modified, added, etc.)",
15388
+ icon: "GitBranch",
15389
+ colorScheme: "categorical",
15390
+ isBuiltIn: true
15391
+ },
15392
+ {
15393
+ id: "coverage",
15394
+ name: "Test Coverage",
15395
+ description: "Color by test coverage percentage",
15396
+ icon: "TestTube",
15397
+ colorScheme: "coverage",
15398
+ isBuiltIn: true,
15399
+ category: "tests"
15400
+ }
14976
15401
  ];
15402
+ function getLensColorModes() {
15403
+ return LENS_REGISTRY.filter((lens) => lens.outputsFileMetrics).map((lens) => lens.id);
15404
+ }
15405
+ function isLensColorMode(mode) {
15406
+ return getLensColorModes().includes(mode);
15407
+ }
15408
+ function getAllColorModeConfigs() {
15409
+ const configs = [...BUILT_IN_COLOR_MODES];
15410
+ for (const lens of LENS_REGISTRY) {
15411
+ if (lens.outputsFileMetrics) {
15412
+ const category = getCategoryConfig(lens.category);
15413
+ configs.push({
15414
+ id: lens.id,
15415
+ name: lens.name,
15416
+ description: lens.description ?? `${lens.name} analysis`,
15417
+ icon: category == null ? void 0 : category.icon,
15418
+ colorScheme: lens.colorScheme,
15419
+ isBuiltIn: false,
15420
+ category: lens.category
15421
+ });
15422
+ }
15423
+ }
15424
+ return configs;
15425
+ }
15426
+ const COLOR_MODES = getAllColorModeConfigs();
15427
+ const DEFAULT_COLOR_MODES = getAllColorModeConfigs().filter(
15428
+ (mode) => mode.isBuiltIn
15429
+ );
15430
+ const QUALITY_COLOR_MODES = getAllColorModeConfigs().filter(
15431
+ (mode) => !mode.isBuiltIn
15432
+ );
14977
15433
  function normalizePath(path) {
14978
15434
  return path.startsWith("/") ? path.slice(1) : path;
14979
15435
  }
@@ -15046,6 +15502,110 @@ function createCoverageHighlightLayers(buildings, fileCoverage) {
15046
15502
  }
15047
15503
  return layers;
15048
15504
  }
15505
+ function createMetricHighlightLayers(buildings, metrics, metricId, _metricName) {
15506
+ const buildingsByPath = new Map(buildings.map((b) => [b.path, b]));
15507
+ const metricsByPath = new Map(metrics.map((m) => [normalizePath(m.file), m]));
15508
+ const layerGroups = {
15509
+ clean: [],
15510
+ // 0 issues
15511
+ minor: [],
15512
+ // 1-3 issues
15513
+ moderate: [],
15514
+ // 4-10 issues
15515
+ significant: [],
15516
+ // 11-25 issues
15517
+ severe: [],
15518
+ // 26+ issues
15519
+ noData: []
15520
+ // No metric data
15521
+ };
15522
+ for (const [path, building] of buildingsByPath) {
15523
+ const normalizedPath = normalizePath(path);
15524
+ const metric = metricsByPath.get(normalizedPath);
15525
+ if (!metric) {
15526
+ layerGroups.noData.push({
15527
+ path: building.path,
15528
+ type: "file",
15529
+ renderStrategy: "fill"
15530
+ });
15531
+ } else {
15532
+ const issues = metric.issueCount;
15533
+ let bucket;
15534
+ if (issues === 0) bucket = "clean";
15535
+ else if (issues <= 3) bucket = "minor";
15536
+ else if (issues <= 10) bucket = "moderate";
15537
+ else if (issues <= 25) bucket = "significant";
15538
+ else bucket = "severe";
15539
+ layerGroups[bucket].push({
15540
+ path: building.path,
15541
+ type: "file",
15542
+ renderStrategy: "fill"
15543
+ });
15544
+ }
15545
+ }
15546
+ const layers = [];
15547
+ if (layerGroups.clean.length > 0) {
15548
+ layers.push({
15549
+ id: `${metricId}-clean`,
15550
+ name: "0 issues",
15551
+ enabled: true,
15552
+ color: "#22c55e",
15553
+ priority: 50,
15554
+ items: layerGroups.clean
15555
+ });
15556
+ }
15557
+ if (layerGroups.minor.length > 0) {
15558
+ layers.push({
15559
+ id: `${metricId}-minor`,
15560
+ name: "1-3 issues",
15561
+ enabled: true,
15562
+ color: "#84cc16",
15563
+ priority: 50,
15564
+ items: layerGroups.minor
15565
+ });
15566
+ }
15567
+ if (layerGroups.moderate.length > 0) {
15568
+ layers.push({
15569
+ id: `${metricId}-moderate`,
15570
+ name: "4-10 issues",
15571
+ enabled: true,
15572
+ color: "#eab308",
15573
+ priority: 50,
15574
+ items: layerGroups.moderate
15575
+ });
15576
+ }
15577
+ if (layerGroups.significant.length > 0) {
15578
+ layers.push({
15579
+ id: `${metricId}-significant`,
15580
+ name: "11-25 issues",
15581
+ enabled: true,
15582
+ color: "#f97316",
15583
+ priority: 50,
15584
+ items: layerGroups.significant
15585
+ });
15586
+ }
15587
+ if (layerGroups.severe.length > 0) {
15588
+ layers.push({
15589
+ id: `${metricId}-severe`,
15590
+ name: "26+ issues",
15591
+ enabled: true,
15592
+ color: "#ef4444",
15593
+ priority: 50,
15594
+ items: layerGroups.severe
15595
+ });
15596
+ }
15597
+ if (layerGroups.noData.length > 0) {
15598
+ layers.push({
15599
+ id: `${metricId}-nodata`,
15600
+ name: "No data",
15601
+ enabled: true,
15602
+ color: "#6b7280",
15603
+ priority: 40,
15604
+ items: layerGroups.noData
15605
+ });
15606
+ }
15607
+ return layers;
15608
+ }
15049
15609
  function createEslintHighlightLayers(buildings, eslintMetrics) {
15050
15610
  const buildingsByPath = new Map(buildings.map((b) => [b.path, b]));
15051
15611
  const metricsByPath = new Map(eslintMetrics.map((m) => [normalizePath(m.file), m]));
@@ -15777,54 +16337,38 @@ function createAlexandriaHighlightLayers(buildings, alexandriaMetrics) {
15777
16337
  return layers;
15778
16338
  }
15779
16339
  function getLayersForColorMode(mode, buildings, qualityData, fileColorLayers, gitLayers) {
15780
- var _a, _b, _c, _d, _e, _f, _g;
16340
+ var _a;
16341
+ if (mode === "fileTypes") return fileColorLayers;
16342
+ if (mode === "git") return gitLayers;
16343
+ if (mode === "coverage") {
16344
+ if (qualityData == null ? void 0 : qualityData.fileCoverage) {
16345
+ return createCoverageHighlightLayers(buildings, qualityData.fileCoverage);
16346
+ }
16347
+ return [];
16348
+ }
16349
+ if (!isLensColorMode(mode)) return fileColorLayers;
16350
+ const metrics = (_a = qualityData == null ? void 0 : qualityData.fileMetrics) == null ? void 0 : _a[mode];
16351
+ if (!metrics || metrics.length === 0) return [];
15781
16352
  switch (mode) {
15782
- case "fileTypes":
15783
- return fileColorLayers;
15784
- case "git":
15785
- return gitLayers;
15786
- case "coverage":
15787
- if (qualityData == null ? void 0 : qualityData.fileCoverage) {
15788
- return createCoverageHighlightLayers(buildings, qualityData.fileCoverage);
15789
- }
15790
- return [];
15791
16353
  case "eslint":
15792
- if ((_a = qualityData == null ? void 0 : qualityData.fileMetrics) == null ? void 0 : _a.eslint) {
15793
- return createEslintHighlightLayers(buildings, qualityData.fileMetrics.eslint);
15794
- }
15795
- return [];
16354
+ return createEslintHighlightLayers(buildings, metrics);
15796
16355
  case "biome-lint":
15797
- if ((_b = qualityData == null ? void 0 : qualityData.fileMetrics) == null ? void 0 : _b["biome-lint"]) {
15798
- return createBiomeLintHighlightLayers(buildings, qualityData.fileMetrics["biome-lint"]);
15799
- }
15800
- return [];
16356
+ return createBiomeLintHighlightLayers(buildings, metrics);
15801
16357
  case "typescript":
15802
- if ((_c = qualityData == null ? void 0 : qualityData.fileMetrics) == null ? void 0 : _c.typescript) {
15803
- return createTypescriptHighlightLayers(buildings, qualityData.fileMetrics.typescript);
15804
- }
15805
- return [];
16358
+ return createTypescriptHighlightLayers(buildings, metrics);
15806
16359
  case "prettier":
15807
- if ((_d = qualityData == null ? void 0 : qualityData.fileMetrics) == null ? void 0 : _d.prettier) {
15808
- return createPrettierHighlightLayers(buildings, qualityData.fileMetrics.prettier);
15809
- }
15810
- return [];
16360
+ return createPrettierHighlightLayers(buildings, metrics);
15811
16361
  case "biome-format":
15812
- if ((_e = qualityData == null ? void 0 : qualityData.fileMetrics) == null ? void 0 : _e["biome-format"]) {
15813
- return createBiomeFormatHighlightLayers(buildings, qualityData.fileMetrics["biome-format"]);
15814
- }
15815
- return [];
16362
+ return createBiomeFormatHighlightLayers(buildings, metrics);
15816
16363
  case "knip":
15817
- if ((_f = qualityData == null ? void 0 : qualityData.fileMetrics) == null ? void 0 : _f.knip) {
15818
- return createKnipHighlightLayers(buildings, qualityData.fileMetrics.knip);
15819
- }
15820
- return [];
16364
+ return createKnipHighlightLayers(buildings, metrics);
15821
16365
  case "alexandria":
15822
- if ((_g = qualityData == null ? void 0 : qualityData.fileMetrics) == null ? void 0 : _g.alexandria) {
15823
- return createAlexandriaHighlightLayers(buildings, qualityData.fileMetrics.alexandria);
15824
- }
15825
- return [];
15826
- default:
15827
- return fileColorLayers;
16366
+ return createAlexandriaHighlightLayers(buildings, metrics);
16367
+ default: {
16368
+ const lens = getLensById(mode);
16369
+ (lens == null ? void 0 : lens.name) ?? mode;
16370
+ return createMetricHighlightLayers(buildings, metrics, mode);
16371
+ }
15828
16372
  }
15829
16373
  }
15830
16374
  const GIT_STATUS_COLORS = {