@principal-ade/code-quality-panels 0.1.14 → 0.1.16
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":"QualityEmptyState.d.ts","sourceRoot":"","sources":["../../src/components/QualityEmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"QualityEmptyState.d.ts","sourceRoot":"","sources":["../../src/components/QualityEmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAE3D,UAAU,sBAAsB;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,QAAA,MAAM,kBAAkB,uCAAuC,CAAC;AAEhE;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,GAAG,SAAS,EACpF,UAAU,EAAE,MAAM,GACjB,OAAO,CAST;AAmHD;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAiQ9D,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QualityHexagon.d.ts","sourceRoot":"","sources":["../../src/components/QualityHexagon.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzE,YAAY,EAAE,cAAc,EAAE,CAAC;AAC/B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AAED,UAAU,6BAA8B,SAAQ,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,WAAW,CAAC;IACnH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,sDAAsD;IACtD,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACnG,4CAA4C;IAC5C,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,CAAC;CAC7C;AAED,wBAAgB,wBAAwB,CAAC,EACvC,OAAO,EACP,IAAI,EACJ,KAAK,EACL,SAAS,EACT,WAAW,EACX,cAAc,EACd,WAAW,EACX,SAAS,EACT,YAAoB,EACpB,eAAuB,EACvB,cAAc,EACd,aAAa,GACd,EAAE,6BAA6B,2CAqO/B;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,cAAc,GAAG,WAAW,CAYzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QualityHexagonPanel.d.ts","sourceRoot":"","sources":["../../src/panels/QualityHexagonPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"QualityHexagonPanel.d.ts","sourceRoot":"","sources":["../../src/panels/QualityHexagonPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AA2SpD;;GAEG;AACH,eAAO,MAAM,mBAAmB,+BAA6B,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -106,47 +106,121 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
106
106
|
* This source code is licensed under the ISC license.
|
|
107
107
|
* See the LICENSE file in the root directory of this source tree.
|
|
108
108
|
*/
|
|
109
|
-
const __iconNode$
|
|
110
|
-
|
|
109
|
+
const __iconNode$d = [
|
|
110
|
+
["path", { d: "M12 7v14", key: "1akyts" }],
|
|
111
|
+
[
|
|
112
|
+
"path",
|
|
113
|
+
{
|
|
114
|
+
d: "M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",
|
|
115
|
+
key: "ruj8y"
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
];
|
|
119
|
+
const BookOpen = createLucideIcon("book-open", __iconNode$d);
|
|
111
120
|
/**
|
|
112
121
|
* @license lucide-react v0.552.0 - ISC
|
|
113
122
|
*
|
|
114
123
|
* This source code is licensed under the ISC license.
|
|
115
124
|
* See the LICENSE file in the root directory of this source tree.
|
|
116
125
|
*/
|
|
117
|
-
const __iconNode$
|
|
118
|
-
|
|
126
|
+
const __iconNode$c = [
|
|
127
|
+
[
|
|
128
|
+
"path",
|
|
129
|
+
{ d: "M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1", key: "ezmyqa" }
|
|
130
|
+
],
|
|
131
|
+
[
|
|
132
|
+
"path",
|
|
133
|
+
{
|
|
134
|
+
d: "M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",
|
|
135
|
+
key: "e1hn23"
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
];
|
|
139
|
+
const Braces = createLucideIcon("braces", __iconNode$c);
|
|
119
140
|
/**
|
|
120
141
|
* @license lucide-react v0.552.0 - ISC
|
|
121
142
|
*
|
|
122
143
|
* This source code is licensed under the ISC license.
|
|
123
144
|
* See the LICENSE file in the root directory of this source tree.
|
|
124
145
|
*/
|
|
125
|
-
const __iconNode$
|
|
146
|
+
const __iconNode$b = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
147
|
+
const Check = createLucideIcon("check", __iconNode$b);
|
|
148
|
+
/**
|
|
149
|
+
* @license lucide-react v0.552.0 - ISC
|
|
150
|
+
*
|
|
151
|
+
* This source code is licensed under the ISC license.
|
|
152
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
153
|
+
*/
|
|
154
|
+
const __iconNode$a = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
155
|
+
const ChevronRight = createLucideIcon("chevron-right", __iconNode$a);
|
|
156
|
+
/**
|
|
157
|
+
* @license lucide-react v0.552.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/
|
|
162
|
+
const __iconNode$9 = [
|
|
126
163
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
127
164
|
["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
|
|
128
165
|
];
|
|
129
|
-
const Copy = createLucideIcon("copy", __iconNode$
|
|
166
|
+
const Copy = createLucideIcon("copy", __iconNode$9);
|
|
130
167
|
/**
|
|
131
168
|
* @license lucide-react v0.552.0 - ISC
|
|
132
169
|
*
|
|
133
170
|
* This source code is licensed under the ISC license.
|
|
134
171
|
* See the LICENSE file in the root directory of this source tree.
|
|
135
172
|
*/
|
|
136
|
-
const __iconNode$
|
|
173
|
+
const __iconNode$8 = [
|
|
174
|
+
[
|
|
175
|
+
"path",
|
|
176
|
+
{
|
|
177
|
+
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
178
|
+
key: "1oefj6"
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
|
|
182
|
+
["circle", { cx: "11.5", cy: "14.5", r: "2.5", key: "1bq0ko" }],
|
|
183
|
+
["path", { d: "M13.3 16.3 15 18", key: "2quom7" }]
|
|
184
|
+
];
|
|
185
|
+
const FileSearch = createLucideIcon("file-search", __iconNode$8);
|
|
186
|
+
/**
|
|
187
|
+
* @license lucide-react v0.552.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/
|
|
192
|
+
const __iconNode$7 = [
|
|
193
|
+
[
|
|
194
|
+
"path",
|
|
195
|
+
{
|
|
196
|
+
d: "M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",
|
|
197
|
+
key: "18mbvz"
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
["path", { d: "M6.453 15h11.094", key: "3shlmq" }],
|
|
201
|
+
["path", { d: "M8.5 2h7", key: "csnxdl" }]
|
|
202
|
+
];
|
|
203
|
+
const FlaskConical = createLucideIcon("flask-conical", __iconNode$7);
|
|
204
|
+
/**
|
|
205
|
+
* @license lucide-react v0.552.0 - ISC
|
|
206
|
+
*
|
|
207
|
+
* This source code is licensed under the ISC license.
|
|
208
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
+
*/
|
|
210
|
+
const __iconNode$6 = [
|
|
137
211
|
["line", { x1: "6", x2: "6", y1: "3", y2: "15", key: "17qcm7" }],
|
|
138
212
|
["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
|
|
139
213
|
["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
|
|
140
214
|
["path", { d: "M18 9a9 9 0 0 1-9 9", key: "n2h4wq" }]
|
|
141
215
|
];
|
|
142
|
-
const GitBranch = createLucideIcon("git-branch", __iconNode$
|
|
216
|
+
const GitBranch = createLucideIcon("git-branch", __iconNode$6);
|
|
143
217
|
/**
|
|
144
218
|
* @license lucide-react v0.552.0 - ISC
|
|
145
219
|
*
|
|
146
220
|
* This source code is licensed under the ISC license.
|
|
147
221
|
* See the LICENSE file in the root directory of this source tree.
|
|
148
222
|
*/
|
|
149
|
-
const __iconNode$
|
|
223
|
+
const __iconNode$5 = [
|
|
150
224
|
[
|
|
151
225
|
"path",
|
|
152
226
|
{
|
|
@@ -155,30 +229,63 @@ const __iconNode$3 = [
|
|
|
155
229
|
}
|
|
156
230
|
]
|
|
157
231
|
];
|
|
158
|
-
const Hexagon = createLucideIcon("hexagon", __iconNode$
|
|
232
|
+
const Hexagon = createLucideIcon("hexagon", __iconNode$5);
|
|
159
233
|
/**
|
|
160
234
|
* @license lucide-react v0.552.0 - ISC
|
|
161
235
|
*
|
|
162
236
|
* This source code is licensed under the ISC license.
|
|
163
237
|
* See the LICENSE file in the root directory of this source tree.
|
|
164
238
|
*/
|
|
165
|
-
const __iconNode$
|
|
239
|
+
const __iconNode$4 = [
|
|
166
240
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
167
241
|
["path", { d: "M12 16v-4", key: "1dtifu" }],
|
|
168
242
|
["path", { d: "M12 8h.01", key: "e9boi3" }]
|
|
169
243
|
];
|
|
170
|
-
const Info = createLucideIcon("info", __iconNode$
|
|
244
|
+
const Info = createLucideIcon("info", __iconNode$4);
|
|
171
245
|
/**
|
|
172
246
|
* @license lucide-react v0.552.0 - ISC
|
|
173
247
|
*
|
|
174
248
|
* This source code is licensed under the ISC license.
|
|
175
249
|
* See the LICENSE file in the root directory of this source tree.
|
|
176
250
|
*/
|
|
177
|
-
const __iconNode$
|
|
251
|
+
const __iconNode$3 = [
|
|
252
|
+
[
|
|
253
|
+
"path",
|
|
254
|
+
{
|
|
255
|
+
d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
|
|
256
|
+
key: "1s2grr"
|
|
257
|
+
}
|
|
258
|
+
],
|
|
259
|
+
["path", { d: "M20 2v4", key: "1rf3ol" }],
|
|
260
|
+
["path", { d: "M22 4h-4", key: "gwowj6" }],
|
|
261
|
+
["circle", { cx: "4", cy: "20", r: "2", key: "6kqj1y" }]
|
|
262
|
+
];
|
|
263
|
+
const Sparkles = createLucideIcon("sparkles", __iconNode$3);
|
|
264
|
+
/**
|
|
265
|
+
* @license lucide-react v0.552.0 - ISC
|
|
266
|
+
*
|
|
267
|
+
* This source code is licensed under the ISC license.
|
|
268
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
269
|
+
*/
|
|
270
|
+
const __iconNode$2 = [
|
|
178
271
|
["path", { d: "M12 19h8", key: "baeox8" }],
|
|
179
272
|
["path", { d: "m4 17 6-6-6-6", key: "1yngyt" }]
|
|
180
273
|
];
|
|
181
|
-
const Terminal = createLucideIcon("terminal", __iconNode$
|
|
274
|
+
const Terminal = createLucideIcon("terminal", __iconNode$2);
|
|
275
|
+
/**
|
|
276
|
+
* @license lucide-react v0.552.0 - ISC
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the ISC license.
|
|
279
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/
|
|
281
|
+
const __iconNode$1 = [
|
|
282
|
+
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
283
|
+
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
284
|
+
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
285
|
+
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
286
|
+
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
287
|
+
];
|
|
288
|
+
const Trash2 = createLucideIcon("trash-2", __iconNode$1);
|
|
182
289
|
/**
|
|
183
290
|
* @license lucide-react v0.552.0 - ISC
|
|
184
291
|
*
|
|
@@ -241,11 +348,11 @@ function getThemeColors(theme) {
|
|
|
241
348
|
textColor: theme.colors.text,
|
|
242
349
|
scoreColor: theme.colors.text,
|
|
243
350
|
tierColors: {
|
|
244
|
-
none: { fill:
|
|
245
|
-
bronze: { fill:
|
|
246
|
-
silver: { fill:
|
|
247
|
-
gold: { fill:
|
|
248
|
-
platinum: { fill:
|
|
351
|
+
none: { fill: "#808080", stroke: "#808080", bg: theme.colors.backgroundLight },
|
|
352
|
+
bronze: { fill: "#CD7F32", stroke: "#CD7F32", bg: theme.colors.backgroundLight },
|
|
353
|
+
silver: { fill: "#C0C0C0", stroke: "#C0C0C0", bg: theme.colors.backgroundLight },
|
|
354
|
+
gold: { fill: "#FFD700", stroke: "#FFD700", bg: theme.colors.backgroundLight },
|
|
355
|
+
platinum: { fill: "#E5E4E2", stroke: "#E5E4E2", bg: theme.colors.backgroundLight }
|
|
249
356
|
},
|
|
250
357
|
metricColors: {
|
|
251
358
|
types: theme.colors.warning,
|
|
@@ -262,13 +369,19 @@ function getThemeColors(theme) {
|
|
|
262
369
|
}
|
|
263
370
|
};
|
|
264
371
|
}
|
|
372
|
+
function getValueColor$1(value, key) {
|
|
373
|
+
const effectiveValue = key === "deadCode" ? 100 - value : value;
|
|
374
|
+
if (effectiveValue >= 80) return "#2E7D32";
|
|
375
|
+
if (effectiveValue >= 60) return "#E6A700";
|
|
376
|
+
return "#C62828";
|
|
377
|
+
}
|
|
265
378
|
const getMetricConfig = (themeColors) => [
|
|
266
|
-
{ key: "
|
|
267
|
-
{ key: "
|
|
268
|
-
{ key: "
|
|
269
|
-
{ key: "
|
|
270
|
-
{ key: "
|
|
271
|
-
{ key: "
|
|
379
|
+
{ key: "formatting", label: "Format", color: themeColors.metricColors.formatting, angle: -120 },
|
|
380
|
+
{ key: "linting", label: "Linting", color: themeColors.metricColors.linting, angle: -60 },
|
|
381
|
+
{ key: "types", label: "Types", color: themeColors.metricColors.types, angle: 0 },
|
|
382
|
+
{ key: "tests", label: "Tests", color: themeColors.metricColors.tests, angle: 60 },
|
|
383
|
+
{ key: "deadCode", label: "Dead Code", color: themeColors.metricColors.deadCode, angle: 120 },
|
|
384
|
+
{ key: "documentation", label: "Docs", color: themeColors.metricColors.documentation, angle: 180 }
|
|
272
385
|
];
|
|
273
386
|
function calculateHexagonPoints(center, radius, metricConfig) {
|
|
274
387
|
return metricConfig.map(({ angle }) => {
|
|
@@ -624,9 +737,8 @@ function QualityHexagonDetailed({
|
|
|
624
737
|
showValues: false
|
|
625
738
|
}
|
|
626
739
|
) }),
|
|
627
|
-
/* @__PURE__ */ jsx("div", { style: { flex: "1 1 200px", minWidth: 200, display: "flex", flexDirection: "column", gap: 8, padding: "8px 24px" }, children: metricConfig.map(({ key, label
|
|
740
|
+
/* @__PURE__ */ jsx("div", { style: { flex: "1 1 200px", minWidth: 200, display: "flex", flexDirection: "column", gap: 8, padding: "8px 24px" }, children: metricConfig.map(({ key, label }) => {
|
|
628
741
|
const value = metrics[key];
|
|
629
|
-
const displayValue = value;
|
|
630
742
|
return /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 12 }, children: [
|
|
631
743
|
/* @__PURE__ */ jsxs("span", { style: {
|
|
632
744
|
fontSize: 14,
|
|
@@ -638,9 +750,9 @@ function QualityHexagonDetailed({
|
|
|
638
750
|
/* @__PURE__ */ jsxs("span", { style: {
|
|
639
751
|
fontSize: 14,
|
|
640
752
|
fontWeight: 500,
|
|
641
|
-
color
|
|
753
|
+
color: getValueColor$1(value, key)
|
|
642
754
|
}, children: [
|
|
643
|
-
|
|
755
|
+
value,
|
|
644
756
|
"%"
|
|
645
757
|
] })
|
|
646
758
|
] }, key);
|
|
@@ -798,7 +910,7 @@ function QualityHexagonExpandable({
|
|
|
798
910
|
padding: "8px 24px",
|
|
799
911
|
borderTop: `1px solid ${theme.colors.border}`,
|
|
800
912
|
marginTop: 8
|
|
801
|
-
}, children: metricConfig.map(({ key, label
|
|
913
|
+
}, children: metricConfig.map(({ key, label }) => {
|
|
802
914
|
const value = metrics[key];
|
|
803
915
|
return /* @__PURE__ */ jsxs(
|
|
804
916
|
"div",
|
|
@@ -837,7 +949,7 @@ function QualityHexagonExpandable({
|
|
|
837
949
|
/* @__PURE__ */ jsxs("span", { style: {
|
|
838
950
|
fontSize: 14,
|
|
839
951
|
fontWeight: 500,
|
|
840
|
-
color
|
|
952
|
+
color: getValueColor$1(value, key)
|
|
841
953
|
}, children: [
|
|
842
954
|
value,
|
|
843
955
|
"%"
|
|
@@ -957,12 +1069,12 @@ const CommandLine = ({ command, theme, label }) => {
|
|
|
957
1069
|
};
|
|
958
1070
|
const MetricsPreview = ({ theme }) => {
|
|
959
1071
|
const metrics = [
|
|
960
|
-
{ key: "
|
|
961
|
-
{ key: "linting", label: "Linting", description: "ESLint code quality",
|
|
962
|
-
{ key: "types", label: "Types", description: "TypeScript type safety",
|
|
963
|
-
{ key: "
|
|
964
|
-
{ key: "deadCode", label: "Dead Code", description: "Unused exports & deps",
|
|
965
|
-
{ key: "documentation", label: "Docs", description: "Code documentation",
|
|
1072
|
+
{ key: "formatting", label: "Formatting", description: "Prettier code style", Icon: Sparkles },
|
|
1073
|
+
{ key: "linting", label: "Linting", description: "ESLint code quality", Icon: FileSearch },
|
|
1074
|
+
{ key: "types", label: "Types", description: "TypeScript type safety", Icon: Braces },
|
|
1075
|
+
{ key: "tests", label: "Tests", description: "Test coverage & pass rate", Icon: FlaskConical },
|
|
1076
|
+
{ key: "deadCode", label: "Dead Code", description: "Unused exports & deps", Icon: Trash2 },
|
|
1077
|
+
{ key: "documentation", label: "Docs", description: "Code documentation", Icon: BookOpen }
|
|
966
1078
|
];
|
|
967
1079
|
return /* @__PURE__ */ jsx(
|
|
968
1080
|
"div",
|
|
@@ -988,7 +1100,7 @@ const MetricsPreview = ({ theme }) => {
|
|
|
988
1100
|
fontSize: 12
|
|
989
1101
|
},
|
|
990
1102
|
children: [
|
|
991
|
-
/* @__PURE__ */ jsx(
|
|
1103
|
+
/* @__PURE__ */ jsx(m.Icon, { size: 14, color: theme.colors.textMuted }),
|
|
992
1104
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
993
1105
|
/* @__PURE__ */ jsx("span", { style: { fontWeight: 500, color: theme.colors.text }, children: m.label }),
|
|
994
1106
|
/* @__PURE__ */ jsx("span", { style: { fontSize: 11, color: theme.colors.textMuted }, children: m.description })
|
|
@@ -1376,11 +1488,11 @@ const QualityHexagonPanelContent = ({
|
|
|
1376
1488
|
return () => unsubscribers.forEach((unsub) => unsub());
|
|
1377
1489
|
}, [events, context, packages]);
|
|
1378
1490
|
const tierColors = {
|
|
1379
|
-
none:
|
|
1380
|
-
bronze:
|
|
1381
|
-
silver:
|
|
1382
|
-
gold:
|
|
1383
|
-
platinum:
|
|
1491
|
+
none: "#808080",
|
|
1492
|
+
bronze: "#CD7F32",
|
|
1493
|
+
silver: "#C0C0C0",
|
|
1494
|
+
gold: "#FFD700",
|
|
1495
|
+
platinum: "#E5E4E2"
|
|
1384
1496
|
};
|
|
1385
1497
|
const overallTier = packages.length > 0 ? calculateQualityTier(
|
|
1386
1498
|
packages.reduce((acc, pkg) => ({
|
|
@@ -1392,7 +1504,7 @@ const QualityHexagonPanelContent = ({
|
|
|
1392
1504
|
documentation: acc.documentation + pkg.metrics.documentation / packages.length
|
|
1393
1505
|
}), { tests: 0, deadCode: 0, linting: 0, formatting: 0, types: 0, documentation: 0 })
|
|
1394
1506
|
) : "none";
|
|
1395
|
-
return /* @__PURE__ */
|
|
1507
|
+
return /* @__PURE__ */ jsxs(
|
|
1396
1508
|
"div",
|
|
1397
1509
|
{
|
|
1398
1510
|
style: {
|
|
@@ -1402,60 +1514,73 @@ const QualityHexagonPanelContent = ({
|
|
|
1402
1514
|
backgroundColor: theme.colors.background,
|
|
1403
1515
|
color: theme.colors.text,
|
|
1404
1516
|
overflowY: "auto",
|
|
1405
|
-
boxSizing: "border-box"
|
|
1517
|
+
boxSizing: "border-box",
|
|
1518
|
+
display: "flex",
|
|
1519
|
+
flexDirection: "column"
|
|
1406
1520
|
},
|
|
1407
|
-
children:
|
|
1408
|
-
"div",
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
}
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
fontSize: 20,
|
|
1425
|
-
fontWeight: 600,
|
|
1426
|
-
color: theme.colors.text
|
|
1427
|
-
},
|
|
1428
|
-
children: "Code Quality"
|
|
1429
|
-
}
|
|
1430
|
-
),
|
|
1431
|
-
/* @__PURE__ */ jsx(
|
|
1432
|
-
"span",
|
|
1433
|
-
{
|
|
1434
|
-
title: "Platinum: 90%+ avg | Gold: 75%+ | Silver: 60%+ | Bronze: 40%+",
|
|
1435
|
-
style: {
|
|
1436
|
-
display: "inline-flex",
|
|
1437
|
-
alignItems: "center",
|
|
1438
|
-
justifyContent: "center",
|
|
1439
|
-
width: 18,
|
|
1440
|
-
height: 18,
|
|
1441
|
-
borderRadius: "50%",
|
|
1442
|
-
border: `1px solid ${theme.colors.border}`,
|
|
1443
|
-
fontSize: 12,
|
|
1444
|
-
color: theme.colors.textMuted,
|
|
1445
|
-
cursor: "help"
|
|
1446
|
-
},
|
|
1447
|
-
children: "?"
|
|
1448
|
-
}
|
|
1449
|
-
),
|
|
1450
|
-
packages.length > 1 && /* @__PURE__ */ jsxs("span", { style: {
|
|
1521
|
+
children: [
|
|
1522
|
+
/* @__PURE__ */ jsxs("div", { style: {
|
|
1523
|
+
display: "flex",
|
|
1524
|
+
alignItems: "center",
|
|
1525
|
+
gap: 12,
|
|
1526
|
+
height: 40,
|
|
1527
|
+
flexShrink: 0,
|
|
1528
|
+
padding: "0 16px",
|
|
1529
|
+
borderBottom: `1px solid ${theme.colors.border}`,
|
|
1530
|
+
boxSizing: "border-box"
|
|
1531
|
+
}, children: [
|
|
1532
|
+
/* @__PURE__ */ jsx(Hexagon, { size: 20, color: tierColors[overallTier] }),
|
|
1533
|
+
/* @__PURE__ */ jsx(
|
|
1534
|
+
"h2",
|
|
1535
|
+
{
|
|
1536
|
+
style: {
|
|
1537
|
+
margin: 0,
|
|
1451
1538
|
fontSize: 14,
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1539
|
+
fontWeight: 600,
|
|
1540
|
+
color: theme.colors.text
|
|
1541
|
+
},
|
|
1542
|
+
children: "Code Quality"
|
|
1543
|
+
}
|
|
1544
|
+
),
|
|
1545
|
+
/* @__PURE__ */ jsx(
|
|
1546
|
+
"span",
|
|
1547
|
+
{
|
|
1548
|
+
title: "Platinum: 90%+ avg | Gold: 75%+ | Silver: 60%+ | Bronze: 40%+",
|
|
1549
|
+
style: {
|
|
1550
|
+
display: "inline-flex",
|
|
1551
|
+
alignItems: "center",
|
|
1552
|
+
justifyContent: "center",
|
|
1553
|
+
width: 16,
|
|
1554
|
+
height: 16,
|
|
1555
|
+
borderRadius: "50%",
|
|
1556
|
+
border: `1px solid ${theme.colors.border}`,
|
|
1557
|
+
fontSize: 11,
|
|
1558
|
+
color: theme.colors.textMuted,
|
|
1559
|
+
cursor: "help"
|
|
1560
|
+
},
|
|
1561
|
+
children: "?"
|
|
1562
|
+
}
|
|
1563
|
+
),
|
|
1564
|
+
packages.length > 1 && /* @__PURE__ */ jsxs("span", { style: {
|
|
1565
|
+
fontSize: 13,
|
|
1566
|
+
color: theme.colors.textMuted
|
|
1567
|
+
}, children: [
|
|
1568
|
+
packages.length,
|
|
1569
|
+
" packages"
|
|
1570
|
+
] })
|
|
1571
|
+
] }),
|
|
1572
|
+
/* @__PURE__ */ jsx(
|
|
1573
|
+
"div",
|
|
1574
|
+
{
|
|
1575
|
+
style: {
|
|
1576
|
+
padding: 16,
|
|
1577
|
+
display: "flex",
|
|
1578
|
+
flexDirection: "column",
|
|
1579
|
+
gap: 16,
|
|
1580
|
+
flex: 1,
|
|
1581
|
+
minHeight: 0
|
|
1582
|
+
},
|
|
1583
|
+
children: /* @__PURE__ */ jsx("div", { style: { display: "flex", flexWrap: "wrap", gap: 16, minHeight: 0 }, children: isLoading ? /* @__PURE__ */ jsx("div", { style: {
|
|
1459
1584
|
padding: 40,
|
|
1460
1585
|
textAlign: "center",
|
|
1461
1586
|
color: theme.colors.textMuted
|
|
@@ -1503,20 +1628,20 @@ const QualityHexagonPanelContent = ({
|
|
|
1503
1628
|
pkg.name
|
|
1504
1629
|
);
|
|
1505
1630
|
}) })
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1631
|
+
}
|
|
1632
|
+
)
|
|
1633
|
+
]
|
|
1509
1634
|
}
|
|
1510
1635
|
);
|
|
1511
1636
|
};
|
|
1512
1637
|
const QualityHexagonPanel = QualityHexagonPanelContent;
|
|
1513
1638
|
const METRIC_OPTIONS = [
|
|
1639
|
+
{ key: "formatting", label: "Format" },
|
|
1640
|
+
{ key: "linting", label: "Linting" },
|
|
1514
1641
|
{ key: "types", label: "Types" },
|
|
1515
|
-
{ key: "documentation", label: "Docs" },
|
|
1516
1642
|
{ key: "tests", label: "Tests" },
|
|
1517
1643
|
{ key: "deadCode", label: "Dead Code" },
|
|
1518
|
-
{ key: "
|
|
1519
|
-
{ key: "linting", label: "Linting" }
|
|
1644
|
+
{ key: "documentation", label: "Docs" }
|
|
1520
1645
|
];
|
|
1521
1646
|
function flattenRepositories(repositories) {
|
|
1522
1647
|
const items = [];
|
|
@@ -1557,11 +1682,11 @@ function formatLabel(item, showRepositoryName, isSameAsRepo) {
|
|
|
1557
1682
|
}
|
|
1558
1683
|
return `${item.repositoryName} / ${item.packageName}`;
|
|
1559
1684
|
}
|
|
1560
|
-
function getValueColor(value, key
|
|
1685
|
+
function getValueColor(value, key) {
|
|
1561
1686
|
const effectiveValue = key === "deadCode" ? 100 - value : value;
|
|
1562
|
-
if (effectiveValue >= 80) return
|
|
1563
|
-
if (effectiveValue >= 60) return
|
|
1564
|
-
return
|
|
1687
|
+
if (effectiveValue >= 80) return "#2E7D32";
|
|
1688
|
+
if (effectiveValue >= 60) return "#E6A700";
|
|
1689
|
+
return "#C62828";
|
|
1565
1690
|
}
|
|
1566
1691
|
function RepositoryQualityGridItem({
|
|
1567
1692
|
item,
|
|
@@ -1576,11 +1701,11 @@ function RepositoryQualityGridItem({
|
|
|
1576
1701
|
const isSameAsRepo = item.packageName === item.repositoryName;
|
|
1577
1702
|
const label = formatLabel(item, showRepositoryName, isSameAsRepo);
|
|
1578
1703
|
const tierColors = {
|
|
1579
|
-
none:
|
|
1580
|
-
bronze:
|
|
1581
|
-
silver:
|
|
1582
|
-
gold:
|
|
1583
|
-
platinum:
|
|
1704
|
+
none: "#808080",
|
|
1705
|
+
bronze: "#CD7F32",
|
|
1706
|
+
silver: "#C0C0C0",
|
|
1707
|
+
gold: "#FFD700",
|
|
1708
|
+
platinum: "#E5E4E2"
|
|
1584
1709
|
};
|
|
1585
1710
|
const displayInfo = React2.useMemo(() => {
|
|
1586
1711
|
if (selectedMetric) {
|
|
@@ -1590,7 +1715,7 @@ function RepositoryQualityGridItem({
|
|
|
1590
1715
|
return {
|
|
1591
1716
|
label: option.label,
|
|
1592
1717
|
value,
|
|
1593
|
-
valueColor: getValueColor(value, selectedMetric
|
|
1718
|
+
valueColor: getValueColor(value, selectedMetric)
|
|
1594
1719
|
};
|
|
1595
1720
|
}
|
|
1596
1721
|
}
|
|
@@ -1598,11 +1723,11 @@ function RepositoryQualityGridItem({
|
|
|
1598
1723
|
return {
|
|
1599
1724
|
label: hoveredVertex.label,
|
|
1600
1725
|
value: hoveredVertex.value,
|
|
1601
|
-
valueColor: getValueColor(hoveredVertex.value, hoveredVertex.key
|
|
1726
|
+
valueColor: getValueColor(hoveredVertex.value, hoveredVertex.key)
|
|
1602
1727
|
};
|
|
1603
1728
|
}
|
|
1604
1729
|
return null;
|
|
1605
|
-
}, [selectedMetric, hoveredVertex, item.metrics
|
|
1730
|
+
}, [selectedMetric, hoveredVertex, item.metrics]);
|
|
1606
1731
|
return /* @__PURE__ */ jsxs(
|
|
1607
1732
|
"div",
|
|
1608
1733
|
{
|
|
@@ -1757,11 +1882,11 @@ function RepositoryQualityGrid({
|
|
|
1757
1882
|
});
|
|
1758
1883
|
}, [items, selectedMetric]);
|
|
1759
1884
|
const tierColors = {
|
|
1760
|
-
none:
|
|
1761
|
-
bronze:
|
|
1762
|
-
silver:
|
|
1763
|
-
gold:
|
|
1764
|
-
platinum:
|
|
1885
|
+
none: "#808080",
|
|
1886
|
+
bronze: "#CD7F32",
|
|
1887
|
+
silver: "#C0C0C0",
|
|
1888
|
+
gold: "#FFD700",
|
|
1889
|
+
platinum: "#E5E4E2"
|
|
1765
1890
|
};
|
|
1766
1891
|
const tierLabels = {
|
|
1767
1892
|
none: "No Data",
|