@principal-ade/code-quality-panels 0.1.2 → 0.1.4

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,6 +1,6 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import * as React2 from "react";
3
- import React2__default, { forwardRef, createElement, createContext, useState, useEffect, useContext } from "react";
3
+ import React2__default, { forwardRef, createElement, createContext, useContext } from "react";
4
4
  /**
5
5
  * @license lucide-react v0.552.0 - ISC
6
6
  *
@@ -154,158 +154,6 @@ const __iconNode = [
154
154
  ["path", { d: "m4 17 6-6-6-6", key: "1yngyt" }]
155
155
  ];
156
156
  const Terminal = createLucideIcon("terminal", __iconNode);
157
- var terminalTheme = {
158
- space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
159
- fonts: {
160
- body: '"SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace',
161
- heading: '"SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace',
162
- monospace: '"SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace'
163
- },
164
- fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],
165
- fontScale: 1,
166
- fontWeights: {
167
- body: 400,
168
- heading: 500,
169
- bold: 600,
170
- light: 300,
171
- medium: 500,
172
- semibold: 600
173
- },
174
- lineHeights: {
175
- body: 1.6,
176
- heading: 1.3,
177
- tight: 1.4,
178
- relaxed: 1.8
179
- },
180
- breakpoints: ["640px", "768px", "1024px", "1280px"],
181
- sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],
182
- radii: [0, 2, 4, 6, 8, 12, 16, 24],
183
- shadows: [
184
- "none",
185
- "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
186
- "0 2px 4px 0 rgba(0, 0, 0, 0.06)",
187
- "0 4px 6px 0 rgba(0, 0, 0, 0.07)",
188
- "0 8px 12px 0 rgba(0, 0, 0, 0.08)",
189
- "0 16px 24px 0 rgba(0, 0, 0, 0.10)"
190
- ],
191
- zIndices: [0, 1, 10, 20, 30, 40, 50],
192
- colors: {
193
- text: "#e4e4e4",
194
- background: "rgba(10, 10, 10, 0.85)",
195
- primary: "#66b3ff",
196
- secondary: "#80c4ff",
197
- accent: "#66ff99",
198
- highlight: "rgba(102, 179, 255, 0.15)",
199
- muted: "rgba(26, 26, 26, 0.8)",
200
- success: "#66ff99",
201
- warning: "#ffcc66",
202
- error: "#ff6666",
203
- info: "#66b3ff",
204
- border: "rgba(255, 255, 255, 0.1)",
205
- backgroundSecondary: "rgba(15, 15, 15, 0.9)",
206
- backgroundTertiary: "rgba(20, 20, 20, 0.9)",
207
- backgroundLight: "rgba(255, 255, 255, 0.05)",
208
- backgroundHover: "rgba(102, 179, 255, 0.08)",
209
- surface: "rgba(15, 15, 15, 0.95)",
210
- textSecondary: "rgba(255, 255, 255, 0.7)",
211
- textTertiary: "rgba(255, 255, 255, 0.5)",
212
- textMuted: "rgba(255, 255, 255, 0.4)",
213
- highlightBg: "rgba(255, 235, 59, 0.25)",
214
- highlightBorder: "rgba(255, 235, 59, 0.5)"
215
- },
216
- modes: {
217
- light: {
218
- text: "#1a1a1a",
219
- background: "rgba(255, 255, 255, 0.9)",
220
- primary: "#0066cc",
221
- secondary: "#0052a3",
222
- accent: "#00cc88",
223
- highlight: "rgba(0, 102, 204, 0.08)",
224
- muted: "rgba(245, 245, 245, 0.8)",
225
- success: "#00cc88",
226
- warning: "#ffaa00",
227
- error: "#ff3333",
228
- info: "#0066cc",
229
- border: "rgba(0, 0, 0, 0.1)",
230
- backgroundSecondary: "rgba(250, 250, 250, 0.9)",
231
- backgroundTertiary: "rgba(245, 245, 245, 0.9)",
232
- backgroundLight: "rgba(0, 0, 0, 0.02)",
233
- backgroundHover: "rgba(0, 102, 204, 0.04)",
234
- surface: "rgba(255, 255, 255, 0.95)",
235
- textSecondary: "rgba(0, 0, 0, 0.6)",
236
- textTertiary: "rgba(0, 0, 0, 0.4)",
237
- textMuted: "rgba(0, 0, 0, 0.3)",
238
- highlightBg: "rgba(255, 235, 59, 0.3)",
239
- highlightBorder: "rgba(255, 235, 59, 0.6)"
240
- }
241
- },
242
- buttons: {
243
- primary: {
244
- color: "white",
245
- bg: "primary",
246
- borderWidth: 0,
247
- "&:hover": {
248
- bg: "secondary"
249
- }
250
- },
251
- secondary: {
252
- color: "primary",
253
- bg: "transparent",
254
- borderWidth: 1,
255
- borderStyle: "solid",
256
- borderColor: "primary",
257
- "&:hover": {
258
- bg: "highlight"
259
- }
260
- },
261
- ghost: {
262
- color: "text",
263
- bg: "transparent",
264
- "&:hover": {
265
- bg: "backgroundHover"
266
- }
267
- }
268
- },
269
- text: {
270
- heading: {
271
- fontFamily: "heading",
272
- fontWeight: "heading",
273
- lineHeight: "heading"
274
- },
275
- body: {
276
- fontFamily: "body",
277
- fontWeight: "body",
278
- lineHeight: "body"
279
- },
280
- caption: {
281
- fontSize: 1,
282
- color: "textSecondary"
283
- }
284
- },
285
- cards: {
286
- primary: {
287
- bg: "surface",
288
- border: "1px solid",
289
- borderColor: "border",
290
- borderRadius: 1
291
- },
292
- secondary: {
293
- bg: "backgroundSecondary",
294
- border: "1px solid",
295
- borderColor: "border",
296
- borderRadius: 1
297
- }
298
- }
299
- };
300
- function getMode(theme2, mode) {
301
- if (!mode || !theme2.modes || !theme2.modes[mode]) {
302
- return theme2.colors;
303
- }
304
- return {
305
- ...theme2.colors,
306
- ...theme2.modes[mode]
307
- };
308
- }
309
157
  var ThemeContext;
310
158
  var getThemeContext = () => {
311
159
  if (typeof window !== "undefined") {
@@ -329,46 +177,6 @@ var useTheme = () => {
329
177
  }
330
178
  return context;
331
179
  };
332
- var ThemeProvider = ({
333
- children,
334
- theme: customTheme = theme,
335
- initialMode
336
- }) => {
337
- const [mode, setMode] = useState(initialMode);
338
- const activeTheme = React2__default.useMemo(() => {
339
- if (!mode || !customTheme.modes || !customTheme.modes[mode]) {
340
- return customTheme;
341
- }
342
- return {
343
- ...customTheme,
344
- colors: getMode(customTheme, mode)
345
- };
346
- }, [customTheme, mode]);
347
- useEffect(() => {
348
- if (!initialMode) {
349
- const savedMode = localStorage.getItem("principlemd-theme-mode");
350
- if (savedMode) {
351
- setMode(savedMode);
352
- }
353
- }
354
- }, [initialMode]);
355
- useEffect(() => {
356
- if (mode) {
357
- localStorage.setItem("principlemd-theme-mode", mode);
358
- } else {
359
- localStorage.removeItem("principlemd-theme-mode");
360
- }
361
- }, [mode]);
362
- const value = {
363
- theme: activeTheme,
364
- mode,
365
- setMode
366
- };
367
- return /* @__PURE__ */ React2__default.createElement(ThemeContextSingleton.Provider, {
368
- value
369
- }, children);
370
- };
371
- var theme = terminalTheme;
372
180
  function r(e) {
373
181
  var t, f, n = "";
374
182
  if ("string" == typeof e || "number" == typeof e) n += e;
@@ -385,31 +193,31 @@ function clsx() {
385
193
  function cn(...inputs) {
386
194
  return clsx(inputs);
387
195
  }
388
- function getThemeColors(theme2) {
196
+ function getThemeColors(theme) {
389
197
  return {
390
- gridColor: theme2.colors.border,
391
- axisColor: theme2.colors.muted,
392
- textColor: theme2.colors.text,
393
- scoreColor: theme2.colors.text,
198
+ gridColor: theme.colors.border,
199
+ axisColor: theme.colors.muted,
200
+ textColor: theme.colors.text,
201
+ scoreColor: theme.colors.text,
394
202
  tierColors: {
395
- none: { fill: theme2.colors.muted, stroke: theme2.colors.border, bg: theme2.colors.backgroundLight },
396
- bronze: { fill: theme2.colors.warning, stroke: theme2.colors.warning, bg: theme2.colors.backgroundLight },
397
- silver: { fill: theme2.colors.secondary, stroke: theme2.colors.secondary, bg: theme2.colors.backgroundLight },
398
- gold: { fill: theme2.colors.accent, stroke: theme2.colors.accent, bg: theme2.colors.backgroundLight },
399
- platinum: { fill: theme2.colors.primary, stroke: theme2.colors.primary, bg: theme2.colors.backgroundLight }
203
+ none: { fill: theme.colors.muted, stroke: theme.colors.border, bg: theme.colors.backgroundLight },
204
+ bronze: { fill: theme.colors.warning, stroke: theme.colors.warning, bg: theme.colors.backgroundLight },
205
+ silver: { fill: theme.colors.secondary, stroke: theme.colors.secondary, bg: theme.colors.backgroundLight },
206
+ gold: { fill: theme.colors.accent, stroke: theme.colors.accent, bg: theme.colors.backgroundLight },
207
+ platinum: { fill: theme.colors.primary, stroke: theme.colors.primary, bg: theme.colors.backgroundLight }
400
208
  },
401
209
  metricColors: {
402
- types: theme2.colors.warning,
403
- documentation: theme2.colors.info,
404
- tests: theme2.colors.success,
405
- deadCode: theme2.colors.error,
406
- formatting: theme2.colors.accent,
407
- linting: theme2.colors.primary
210
+ types: theme.colors.warning,
211
+ documentation: theme.colors.info,
212
+ tests: theme.colors.success,
213
+ deadCode: theme.colors.error,
214
+ formatting: theme.colors.accent,
215
+ linting: theme.colors.primary
408
216
  },
409
217
  qualityIndicators: {
410
- good: theme2.colors.success,
411
- medium: theme2.colors.warning,
412
- poor: theme2.colors.error
218
+ good: theme.colors.success,
219
+ medium: theme.colors.warning,
220
+ poor: theme.colors.error
413
221
  }
414
222
  };
415
223
  }
@@ -440,7 +248,7 @@ function calculateMetricPoint(center, radius, angle, value) {
440
248
  function QualityHexagon({
441
249
  metrics,
442
250
  tier,
443
- theme: theme2,
251
+ theme,
444
252
  showLabels = false,
445
253
  showValues = false,
446
254
  className,
@@ -448,7 +256,7 @@ function QualityHexagon({
448
256
  onVertexLeave,
449
257
  onVertexClick
450
258
  }) {
451
- const themeColors = getThemeColors(theme2);
259
+ const themeColors = getThemeColors(theme);
452
260
  const colors = themeColors.tierColors[tier] ?? themeColors.tierColors.none;
453
261
  const metricConfig = getMetricConfig(themeColors);
454
262
  const viewBoxSize = 300;
@@ -644,7 +452,7 @@ function QualityHexagon({
644
452
  function QualityHexagonCompact({
645
453
  metrics,
646
454
  tier,
647
- theme: theme2,
455
+ theme,
648
456
  className
649
457
  }) {
650
458
  return /* @__PURE__ */ jsx("div", { className: cn("w-20 h-20", className), children: /* @__PURE__ */ jsx(
@@ -652,7 +460,7 @@ function QualityHexagonCompact({
652
460
  {
653
461
  metrics,
654
462
  tier,
655
- theme: theme2,
463
+ theme,
656
464
  showLabels: false,
657
465
  showValues: false
658
466
  }
@@ -661,14 +469,14 @@ function QualityHexagonCompact({
661
469
  function QualityHexagonDetailed({
662
470
  metrics,
663
471
  tier,
664
- theme: theme2,
472
+ theme,
665
473
  className,
666
474
  packageName,
667
475
  packageVersion,
668
476
  onRefresh,
669
477
  isRefreshing = false
670
478
  }) {
671
- const themeColors = getThemeColors(theme2);
479
+ const themeColors = getThemeColors(theme);
672
480
  const colors = themeColors.tierColors[tier] ?? themeColors.tierColors.none;
673
481
  const metricConfig = getMetricConfig(themeColors);
674
482
  const hasHeader = packageName || onRefresh;
@@ -695,7 +503,7 @@ function QualityHexagonDetailed({
695
503
  packageName.startsWith("@") && packageName.includes("/") ? /* @__PURE__ */ jsxs(Fragment, { children: [
696
504
  /* @__PURE__ */ jsx("span", { style: {
697
505
  fontSize: 12,
698
- color: theme2.colors.textMuted
506
+ color: theme.colors.textMuted
699
507
  }, children: packageName.split("/")[0] }),
700
508
  /* @__PURE__ */ jsx("span", { style: {
701
509
  fontSize: 14,
@@ -709,7 +517,7 @@ function QualityHexagonDetailed({
709
517
  }, children: packageName }),
710
518
  packageVersion && /* @__PURE__ */ jsxs("span", { style: {
711
519
  fontSize: 12,
712
- color: theme2.colors.textMuted
520
+ color: theme.colors.textMuted
713
521
  }, children: [
714
522
  "v",
715
523
  packageVersion
@@ -725,10 +533,10 @@ function QualityHexagonDetailed({
725
533
  display: "flex",
726
534
  alignItems: "center",
727
535
  justifyContent: "center",
728
- border: `1px solid ${theme2.colors.border}`,
536
+ border: `1px solid ${theme.colors.border}`,
729
537
  borderRadius: 4,
730
- background: theme2.colors.surface,
731
- color: theme2.colors.textMuted,
538
+ background: theme.colors.surface,
539
+ color: theme.colors.textMuted,
732
540
  cursor: isRefreshing ? "not-allowed" : "pointer",
733
541
  opacity: isRefreshing ? 0.6 : 1
734
542
  },
@@ -770,7 +578,7 @@ function QualityHexagonDetailed({
770
578
  {
771
579
  metrics,
772
580
  tier,
773
- theme: theme2,
581
+ theme,
774
582
  showLabels: true,
775
583
  showValues: false
776
584
  }
@@ -781,7 +589,7 @@ function QualityHexagonDetailed({
781
589
  return /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 12 }, children: [
782
590
  /* @__PURE__ */ jsxs("span", { style: {
783
591
  fontSize: 14,
784
- color: theme2.colors.textMuted
592
+ color: theme.colors.textMuted
785
593
  }, children: [
786
594
  label,
787
595
  key === "deadCode" ? " ↓" : ""
@@ -804,7 +612,7 @@ function QualityHexagonDetailed({
804
612
  function QualityHexagonExpandable({
805
613
  metrics,
806
614
  tier,
807
- theme: theme2,
615
+ theme,
808
616
  className,
809
617
  packageName,
810
618
  packageVersion,
@@ -813,7 +621,7 @@ function QualityHexagonExpandable({
813
621
  defaultExpanded = false
814
622
  }) {
815
623
  const [expanded, setExpanded] = React2.useState(defaultExpanded);
816
- const themeColors = getThemeColors(theme2);
624
+ const themeColors = getThemeColors(theme);
817
625
  const colors = themeColors.tierColors[tier] ?? themeColors.tierColors.none;
818
626
  const metricConfig = getMetricConfig(themeColors);
819
627
  const hasHeader = packageName || onRefresh;
@@ -841,7 +649,7 @@ function QualityHexagonExpandable({
841
649
  packageName.startsWith("@") && packageName.includes("/") ? /* @__PURE__ */ jsxs(Fragment, { children: [
842
650
  /* @__PURE__ */ jsx("span", { style: {
843
651
  fontSize: 12,
844
- color: theme2.colors.textMuted
652
+ color: theme.colors.textMuted
845
653
  }, children: packageName.split("/")[0] }),
846
654
  /* @__PURE__ */ jsx("span", { style: {
847
655
  fontSize: 14,
@@ -855,7 +663,7 @@ function QualityHexagonExpandable({
855
663
  }, children: packageName }),
856
664
  packageVersion && /* @__PURE__ */ jsxs("span", { style: {
857
665
  fontSize: 12,
858
- color: theme2.colors.textMuted
666
+ color: theme.colors.textMuted
859
667
  }, children: [
860
668
  "v",
861
669
  packageVersion
@@ -871,10 +679,10 @@ function QualityHexagonExpandable({
871
679
  display: "flex",
872
680
  alignItems: "center",
873
681
  justifyContent: "center",
874
- border: `1px solid ${theme2.colors.border}`,
682
+ border: `1px solid ${theme.colors.border}`,
875
683
  borderRadius: 4,
876
- background: theme2.colors.surface,
877
- color: theme2.colors.textMuted,
684
+ background: theme.colors.surface,
685
+ color: theme.colors.textMuted,
878
686
  cursor: isRefreshing ? "not-allowed" : "pointer",
879
687
  opacity: isRefreshing ? 0.6 : 1
880
688
  },
@@ -919,7 +727,7 @@ function QualityHexagonExpandable({
919
727
  {
920
728
  metrics,
921
729
  tier,
922
- theme: theme2,
730
+ theme,
923
731
  showLabels: true,
924
732
  showValues: false
925
733
  }
@@ -939,14 +747,14 @@ function QualityHexagonExpandable({
939
747
  flexDirection: "column",
940
748
  gap: 8,
941
749
  padding: "8px 24px",
942
- borderTop: `1px solid ${theme2.colors.border}`,
750
+ borderTop: `1px solid ${theme.colors.border}`,
943
751
  marginTop: 8
944
752
  }, children: metricConfig.map(({ key, label, color }) => {
945
753
  const value = metrics[key];
946
754
  return /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 12 }, children: [
947
755
  /* @__PURE__ */ jsxs("span", { style: {
948
756
  fontSize: 14,
949
- color: theme2.colors.textMuted
757
+ color: theme.colors.textMuted
950
758
  }, children: [
951
759
  label,
952
760
  key === "deadCode" ? " ↓" : ""
@@ -980,7 +788,7 @@ function QualityHexagonExpandable({
980
788
  height: "16",
981
789
  viewBox: "0 0 24 24",
982
790
  fill: "none",
983
- stroke: theme2.colors.textMuted,
791
+ stroke: theme.colors.textMuted,
984
792
  strokeWidth: "2",
985
793
  strokeLinecap: "round",
986
794
  strokeLinejoin: "round",
@@ -1016,7 +824,7 @@ function checkFileExistsInTree(treeData, targetPath) {
1016
824
  return filePath.endsWith(normalizedTarget) || filePath === normalizedTarget;
1017
825
  });
1018
826
  }
1019
- const CommandLine = ({ command, theme: theme2 }) => {
827
+ const CommandLine$1 = ({ command, theme }) => {
1020
828
  const [copied, setCopied] = React2__default.useState(false);
1021
829
  const handleCopy = async () => {
1022
830
  try {
@@ -1037,13 +845,13 @@ const CommandLine = ({ command, theme: theme2 }) => {
1037
845
  gap: 12,
1038
846
  padding: "10px 14px",
1039
847
  borderRadius: 6,
1040
- backgroundColor: theme2.colors.background,
1041
- border: `1px solid ${theme2.colors.border}`,
848
+ backgroundColor: theme.colors.background,
849
+ border: `1px solid ${theme.colors.border}`,
1042
850
  fontFamily: "monospace",
1043
851
  fontSize: 13
1044
852
  },
1045
853
  children: [
1046
- /* @__PURE__ */ jsx("code", { style: { color: theme2.colors.text }, children: command }),
854
+ /* @__PURE__ */ jsx("code", { style: { color: theme.colors.text }, children: command }),
1047
855
  /* @__PURE__ */ jsx(
1048
856
  "button",
1049
857
  {
@@ -1055,11 +863,11 @@ const CommandLine = ({ command, theme: theme2 }) => {
1055
863
  padding: 4,
1056
864
  border: "none",
1057
865
  backgroundColor: "transparent",
1058
- color: theme2.colors.textMuted,
866
+ color: theme.colors.textMuted,
1059
867
  cursor: "pointer"
1060
868
  },
1061
869
  title: "Copy command",
1062
- children: copied ? /* @__PURE__ */ jsx(Check, { size: 16, color: theme2.colors.success }) : /* @__PURE__ */ jsx(Copy, { size: 16 })
870
+ children: copied ? /* @__PURE__ */ jsx(Check, { size: 16, color: theme.colors.success }) : /* @__PURE__ */ jsx(Copy, { size: 16 })
1063
871
  }
1064
872
  )
1065
873
  ]
@@ -1067,7 +875,7 @@ const CommandLine = ({ command, theme: theme2 }) => {
1067
875
  );
1068
876
  };
1069
877
  const QualityEmptyState = ({
1070
- theme: theme2,
878
+ theme,
1071
879
  hasWorkflow
1072
880
  }) => {
1073
881
  if (hasWorkflow) {
@@ -1088,7 +896,7 @@ const QualityEmptyState = ({
1088
896
  style: {
1089
897
  margin: 0,
1090
898
  fontSize: 14,
1091
- color: theme2.colors.textMuted,
899
+ color: theme.colors.textMuted,
1092
900
  lineHeight: 1.5
1093
901
  },
1094
902
  children: "Quality metrics will appear here after your next CI run completes."
@@ -1103,8 +911,8 @@ const QualityEmptyState = ({
1103
911
  gap: 8,
1104
912
  padding: "10px 14px",
1105
913
  borderRadius: 6,
1106
- backgroundColor: `${theme2.colors.success}15`,
1107
- color: theme2.colors.success,
914
+ backgroundColor: `${theme.colors.success}15`,
915
+ color: theme.colors.success,
1108
916
  fontSize: 13
1109
917
  },
1110
918
  children: [
@@ -1137,7 +945,7 @@ const QualityEmptyState = ({
1137
945
  style: {
1138
946
  margin: 0,
1139
947
  fontSize: 14,
1140
- color: theme2.colors.textMuted,
948
+ color: theme.colors.textMuted,
1141
949
  lineHeight: 1.5
1142
950
  },
1143
951
  children: "Track your code quality with automated analysis of tests, linting, types, formatting, dead code, and documentation."
@@ -1152,8 +960,8 @@ const QualityEmptyState = ({
1152
960
  gap: 16,
1153
961
  padding: 20,
1154
962
  borderRadius: 8,
1155
- backgroundColor: theme2.colors.surface,
1156
- border: `1px solid ${theme2.colors.border}`
963
+ backgroundColor: theme.colors.surface,
964
+ border: `1px solid ${theme.colors.border}`
1157
965
  },
1158
966
  children: [
1159
967
  /* @__PURE__ */ jsxs(
@@ -1166,7 +974,7 @@ const QualityEmptyState = ({
1166
974
  marginBottom: 4
1167
975
  },
1168
976
  children: [
1169
- /* @__PURE__ */ jsx(Terminal, { size: 20, color: theme2.colors.text }),
977
+ /* @__PURE__ */ jsx(Terminal, { size: 20, color: theme.colors.text }),
1170
978
  /* @__PURE__ */ jsx(
1171
979
  "h4",
1172
980
  {
@@ -1174,7 +982,7 @@ const QualityEmptyState = ({
1174
982
  margin: 0,
1175
983
  fontSize: 15,
1176
984
  fontWeight: 600,
1177
- color: theme2.colors.text
985
+ color: theme.colors.text
1178
986
  },
1179
987
  children: "Get Started"
1180
988
  }
@@ -1192,7 +1000,7 @@ const QualityEmptyState = ({
1192
1000
  gap: 8,
1193
1001
  marginBottom: 8,
1194
1002
  fontSize: 13,
1195
- color: theme2.colors.textMuted
1003
+ color: theme.colors.textMuted
1196
1004
  },
1197
1005
  children: [
1198
1006
  /* @__PURE__ */ jsx(
@@ -1205,8 +1013,8 @@ const QualityEmptyState = ({
1205
1013
  width: 20,
1206
1014
  height: 20,
1207
1015
  borderRadius: "50%",
1208
- backgroundColor: theme2.colors.primary,
1209
- color: theme2.colors.background,
1016
+ backgroundColor: theme.colors.primary,
1017
+ color: theme.colors.background,
1210
1018
  fontSize: 11,
1211
1019
  fontWeight: 600
1212
1020
  },
@@ -1218,10 +1026,10 @@ const QualityEmptyState = ({
1218
1026
  }
1219
1027
  ),
1220
1028
  /* @__PURE__ */ jsx(
1221
- CommandLine,
1029
+ CommandLine$1,
1222
1030
  {
1223
1031
  command: "npm install -g @principal-ai/quality-lens-cli",
1224
- theme: theme2
1032
+ theme
1225
1033
  }
1226
1034
  )
1227
1035
  ] }),
@@ -1235,7 +1043,7 @@ const QualityEmptyState = ({
1235
1043
  gap: 8,
1236
1044
  marginBottom: 8,
1237
1045
  fontSize: 13,
1238
- color: theme2.colors.textMuted
1046
+ color: theme.colors.textMuted
1239
1047
  },
1240
1048
  children: [
1241
1049
  /* @__PURE__ */ jsx(
@@ -1248,8 +1056,8 @@ const QualityEmptyState = ({
1248
1056
  width: 20,
1249
1057
  height: 20,
1250
1058
  borderRadius: "50%",
1251
- backgroundColor: theme2.colors.primary,
1252
- color: theme2.colors.background,
1059
+ backgroundColor: theme.colors.primary,
1060
+ color: theme.colors.background,
1253
1061
  fontSize: 11,
1254
1062
  fontWeight: 600
1255
1063
  },
@@ -1260,7 +1068,7 @@ const QualityEmptyState = ({
1260
1068
  ]
1261
1069
  }
1262
1070
  ),
1263
- /* @__PURE__ */ jsx(CommandLine, { command: "quality-lens list", theme: theme2 })
1071
+ /* @__PURE__ */ jsx(CommandLine$1, { command: "quality-lens list", theme })
1264
1072
  ] }),
1265
1073
  /* @__PURE__ */ jsxs("div", { children: [
1266
1074
  /* @__PURE__ */ jsxs(
@@ -1272,7 +1080,7 @@ const QualityEmptyState = ({
1272
1080
  gap: 8,
1273
1081
  marginBottom: 8,
1274
1082
  fontSize: 13,
1275
- color: theme2.colors.textMuted
1083
+ color: theme.colors.textMuted
1276
1084
  },
1277
1085
  children: [
1278
1086
  /* @__PURE__ */ jsx(
@@ -1285,8 +1093,8 @@ const QualityEmptyState = ({
1285
1093
  width: 20,
1286
1094
  height: 20,
1287
1095
  borderRadius: "50%",
1288
- backgroundColor: theme2.colors.primary,
1289
- color: theme2.colors.background,
1096
+ backgroundColor: theme.colors.primary,
1097
+ color: theme.colors.background,
1290
1098
  fontSize: 11,
1291
1099
  fontWeight: 600
1292
1100
  },
@@ -1297,7 +1105,7 @@ const QualityEmptyState = ({
1297
1105
  ]
1298
1106
  }
1299
1107
  ),
1300
- /* @__PURE__ */ jsx(CommandLine, { command: "quality-lens init", theme: theme2 })
1108
+ /* @__PURE__ */ jsx(CommandLine$1, { command: "quality-lens init", theme })
1301
1109
  ] }),
1302
1110
  /* @__PURE__ */ jsxs(
1303
1111
  "div",
@@ -1308,7 +1116,7 @@ const QualityEmptyState = ({
1308
1116
  gap: 6,
1309
1117
  paddingTop: 8,
1310
1118
  fontSize: 13,
1311
- color: theme2.colors.textMuted
1119
+ color: theme.colors.textMuted
1312
1120
  },
1313
1121
  children: [
1314
1122
  /* @__PURE__ */ jsx(ChevronRight, { size: 14 }),
@@ -1342,7 +1150,7 @@ const QualityHexagonPanelContent = ({
1342
1150
  events
1343
1151
  }) => {
1344
1152
  var _a;
1345
- const { theme: theme2 } = useTheme();
1153
+ const { theme } = useTheme();
1346
1154
  const [refreshingPackages, setRefreshingPackages] = React2__default.useState(/* @__PURE__ */ new Set());
1347
1155
  const qualitySlice = context.getSlice("quality");
1348
1156
  const hasQualitySlice = context.hasSlice("quality");
@@ -1381,11 +1189,11 @@ const QualityHexagonPanelContent = ({
1381
1189
  return () => unsubscribers.forEach((unsub) => unsub());
1382
1190
  }, [events, context, packages]);
1383
1191
  const tierColors = {
1384
- none: theme2.colors.muted,
1385
- bronze: theme2.colors.warning,
1386
- silver: theme2.colors.secondary,
1387
- gold: theme2.colors.accent,
1388
- platinum: theme2.colors.primary
1192
+ none: theme.colors.muted,
1193
+ bronze: theme.colors.warning,
1194
+ silver: theme.colors.secondary,
1195
+ gold: theme.colors.accent,
1196
+ platinum: theme.colors.primary
1389
1197
  };
1390
1198
  const overallTier = packages.length > 0 ? calculateQualityTier(
1391
1199
  packages.reduce((acc, pkg) => ({
@@ -1401,11 +1209,11 @@ const QualityHexagonPanelContent = ({
1401
1209
  "div",
1402
1210
  {
1403
1211
  style: {
1404
- fontFamily: theme2.fonts.body,
1212
+ fontFamily: theme.fonts.body,
1405
1213
  height: "100%",
1406
1214
  minHeight: 0,
1407
- backgroundColor: theme2.colors.background,
1408
- color: theme2.colors.text,
1215
+ backgroundColor: theme.colors.background,
1216
+ color: theme.colors.text,
1409
1217
  overflowY: "auto",
1410
1218
  boxSizing: "border-box"
1411
1219
  },
@@ -1428,7 +1236,7 @@ const QualityHexagonPanelContent = ({
1428
1236
  margin: 0,
1429
1237
  fontSize: 20,
1430
1238
  fontWeight: 600,
1431
- color: theme2.colors.text
1239
+ color: theme.colors.text
1432
1240
  },
1433
1241
  children: "Code Quality"
1434
1242
  }
@@ -1444,9 +1252,9 @@ const QualityHexagonPanelContent = ({
1444
1252
  width: 18,
1445
1253
  height: 18,
1446
1254
  borderRadius: "50%",
1447
- border: `1px solid ${theme2.colors.border}`,
1255
+ border: `1px solid ${theme.colors.border}`,
1448
1256
  fontSize: 12,
1449
- color: theme2.colors.textMuted,
1257
+ color: theme.colors.textMuted,
1450
1258
  cursor: "help"
1451
1259
  },
1452
1260
  children: "?"
@@ -1454,7 +1262,7 @@ const QualityHexagonPanelContent = ({
1454
1262
  ),
1455
1263
  packages.length > 1 && /* @__PURE__ */ jsxs("span", { style: {
1456
1264
  fontSize: 14,
1457
- color: theme2.colors.textMuted
1265
+ color: theme.colors.textMuted
1458
1266
  }, children: [
1459
1267
  packages.length,
1460
1268
  " packages"
@@ -1463,11 +1271,11 @@ const QualityHexagonPanelContent = ({
1463
1271
  /* @__PURE__ */ jsx("div", { style: { display: "flex", flexWrap: "wrap", gap: 16, minHeight: 0 }, children: isLoading ? /* @__PURE__ */ jsx("div", { style: {
1464
1272
  padding: 40,
1465
1273
  textAlign: "center",
1466
- color: theme2.colors.textMuted
1274
+ color: theme.colors.textMuted
1467
1275
  }, children: "Loading quality metrics..." }) : packages.length === 0 ? /* @__PURE__ */ jsx(
1468
1276
  QualityEmptyState,
1469
1277
  {
1470
- theme: theme2,
1278
+ theme,
1471
1279
  hasWorkflow
1472
1280
  }
1473
1281
  ) : packages.map((pkg) => {
@@ -1477,7 +1285,7 @@ const QualityHexagonPanelContent = ({
1477
1285
  {
1478
1286
  metrics: pkg.metrics,
1479
1287
  tier,
1480
- theme: theme2,
1288
+ theme,
1481
1289
  packageName: pkg.name,
1482
1290
  packageVersion: pkg.version
1483
1291
  },
@@ -1490,9 +1298,7 @@ const QualityHexagonPanelContent = ({
1490
1298
  }
1491
1299
  );
1492
1300
  };
1493
- const QualityHexagonPanel = (props) => {
1494
- return /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(QualityHexagonPanelContent, { ...props }) });
1495
- };
1301
+ const QualityHexagonPanel = QualityHexagonPanelContent;
1496
1302
  const METRIC_OPTIONS = [
1497
1303
  { key: "types", label: "Types" },
1498
1304
  { key: "documentation", label: "Docs" },
@@ -1539,15 +1345,15 @@ function formatLabel(item, showRepositoryName, isSameAsRepo) {
1539
1345
  }
1540
1346
  return `${item.repositoryName} / ${item.packageName}`;
1541
1347
  }
1542
- function getValueColor(value, key, theme2) {
1348
+ function getValueColor(value, key, theme) {
1543
1349
  const effectiveValue = key === "deadCode" ? 100 - value : value;
1544
- if (effectiveValue >= 80) return theme2.colors.success;
1545
- if (effectiveValue >= 60) return theme2.colors.warning;
1546
- return theme2.colors.error;
1350
+ if (effectiveValue >= 80) return theme.colors.success;
1351
+ if (effectiveValue >= 60) return theme.colors.warning;
1352
+ return theme.colors.error;
1547
1353
  }
1548
1354
  function RepositoryQualityGridItem({
1549
1355
  item,
1550
- theme: theme2,
1356
+ theme,
1551
1357
  onClick,
1552
1358
  onVertexClick,
1553
1359
  showRepositoryName = true,
@@ -1558,11 +1364,11 @@ function RepositoryQualityGridItem({
1558
1364
  const isSameAsRepo = item.packageName === item.repositoryName;
1559
1365
  const label = formatLabel(item, showRepositoryName, isSameAsRepo);
1560
1366
  const tierColors = {
1561
- none: theme2.colors.muted,
1562
- bronze: theme2.colors.warning,
1563
- silver: theme2.colors.secondary,
1564
- gold: theme2.colors.accent,
1565
- platinum: theme2.colors.primary
1367
+ none: theme.colors.muted,
1368
+ bronze: theme.colors.warning,
1369
+ silver: theme.colors.secondary,
1370
+ gold: theme.colors.accent,
1371
+ platinum: theme.colors.primary
1566
1372
  };
1567
1373
  const displayInfo = React2.useMemo(() => {
1568
1374
  if (selectedMetric) {
@@ -1572,7 +1378,7 @@ function RepositoryQualityGridItem({
1572
1378
  return {
1573
1379
  label: option.label,
1574
1380
  value,
1575
- valueColor: getValueColor(value, selectedMetric, theme2)
1381
+ valueColor: getValueColor(value, selectedMetric, theme)
1576
1382
  };
1577
1383
  }
1578
1384
  }
@@ -1580,11 +1386,11 @@ function RepositoryQualityGridItem({
1580
1386
  return {
1581
1387
  label: hoveredVertex.label,
1582
1388
  value: hoveredVertex.value,
1583
- valueColor: getValueColor(hoveredVertex.value, hoveredVertex.key, theme2)
1389
+ valueColor: getValueColor(hoveredVertex.value, hoveredVertex.key, theme)
1584
1390
  };
1585
1391
  }
1586
1392
  return null;
1587
- }, [selectedMetric, hoveredVertex, item.metrics, theme2]);
1393
+ }, [selectedMetric, hoveredVertex, item.metrics, theme]);
1588
1394
  return /* @__PURE__ */ jsxs(
1589
1395
  "div",
1590
1396
  {
@@ -1597,8 +1403,8 @@ function RepositoryQualityGridItem({
1597
1403
  gap: 8,
1598
1404
  padding: 12,
1599
1405
  borderRadius: 8,
1600
- backgroundColor: theme2.colors.surface,
1601
- border: `1px solid ${theme2.colors.border}`,
1406
+ backgroundColor: theme.colors.surface,
1407
+ border: `1px solid ${theme.colors.border}`,
1602
1408
  cursor: onClick ? "pointer" : "default",
1603
1409
  transition: "all 0.2s ease"
1604
1410
  },
@@ -1609,7 +1415,7 @@ function RepositoryQualityGridItem({
1609
1415
  }
1610
1416
  },
1611
1417
  onMouseLeave: (e) => {
1612
- e.currentTarget.style.borderColor = theme2.colors.border;
1418
+ e.currentTarget.style.borderColor = theme.colors.border;
1613
1419
  e.currentTarget.style.transform = "translateY(0)";
1614
1420
  setHoveredVertex(null);
1615
1421
  },
@@ -1633,7 +1439,7 @@ function RepositoryQualityGridItem({
1633
1439
  style: {
1634
1440
  fontSize: 14,
1635
1441
  fontWeight: 500,
1636
- color: theme2.colors.text
1442
+ color: theme.colors.text
1637
1443
  },
1638
1444
  children: displayInfo.label
1639
1445
  }
@@ -1652,7 +1458,7 @@ function RepositoryQualityGridItem({
1652
1458
  ]
1653
1459
  }
1654
1460
  )
1655
- ] }) : /* @__PURE__ */ jsx("span", { style: { fontSize: 12, color: theme2.colors.textMuted }, children: "Hover a corner" })
1461
+ ] }) : /* @__PURE__ */ jsx("span", { style: { fontSize: 12, color: theme.colors.textMuted }, children: "Hover a corner" })
1656
1462
  }
1657
1463
  ),
1658
1464
  /* @__PURE__ */ jsx("div", { style: { width: 200, height: 200 }, children: /* @__PURE__ */ jsx(
@@ -1660,7 +1466,7 @@ function RepositoryQualityGridItem({
1660
1466
  {
1661
1467
  metrics: item.metrics,
1662
1468
  tier: item.tier,
1663
- theme: theme2,
1469
+ theme,
1664
1470
  showLabels: false,
1665
1471
  showValues: false,
1666
1472
  onVertexHover: setHoveredVertex,
@@ -1684,7 +1490,7 @@ function RepositoryQualityGridItem({
1684
1490
  style: {
1685
1491
  fontSize: 12,
1686
1492
  fontWeight: 500,
1687
- color: theme2.colors.text,
1493
+ color: theme.colors.text,
1688
1494
  textAlign: "center"
1689
1495
  },
1690
1496
  children: label
@@ -1695,7 +1501,7 @@ function RepositoryQualityGridItem({
1695
1501
  {
1696
1502
  style: {
1697
1503
  fontSize: 10,
1698
- color: theme2.colors.textMuted
1504
+ color: theme.colors.textMuted
1699
1505
  },
1700
1506
  children: [
1701
1507
  "v",
@@ -1717,7 +1523,7 @@ function calculateAverageScore(metrics) {
1717
1523
  }
1718
1524
  function RepositoryQualityGrid({
1719
1525
  repositories,
1720
- theme: theme2,
1526
+ theme,
1721
1527
  onItemClick,
1722
1528
  onVertexClick,
1723
1529
  className,
@@ -1739,11 +1545,11 @@ function RepositoryQualityGrid({
1739
1545
  });
1740
1546
  }, [items, selectedMetric]);
1741
1547
  const tierColors = {
1742
- none: theme2.colors.muted,
1743
- bronze: theme2.colors.warning,
1744
- silver: theme2.colors.secondary,
1745
- gold: theme2.colors.accent,
1746
- platinum: theme2.colors.primary
1548
+ none: theme.colors.muted,
1549
+ bronze: theme.colors.warning,
1550
+ silver: theme.colors.secondary,
1551
+ gold: theme.colors.accent,
1552
+ platinum: theme.colors.primary
1747
1553
  };
1748
1554
  const tierLabels = {
1749
1555
  none: "No Data",
@@ -1760,8 +1566,8 @@ function RepositoryQualityGrid({
1760
1566
  style: {
1761
1567
  padding: 40,
1762
1568
  textAlign: "center",
1763
- color: theme2.colors.textMuted,
1764
- backgroundColor: theme2.colors.background,
1569
+ color: theme.colors.textMuted,
1570
+ backgroundColor: theme.colors.background,
1765
1571
  borderRadius: 8
1766
1572
  },
1767
1573
  children: "No repositories to display"
@@ -1776,8 +1582,8 @@ function RepositoryQualityGrid({
1776
1582
  display: "flex",
1777
1583
  flexDirection: "column",
1778
1584
  gap: 16,
1779
- backgroundColor: theme2.colors.background,
1780
- fontFamily: theme2.fonts.body
1585
+ backgroundColor: theme.colors.background,
1586
+ fontFamily: theme.fonts.body
1781
1587
  },
1782
1588
  children: [
1783
1589
  showSummary && /* @__PURE__ */ jsxs(
@@ -1790,8 +1596,8 @@ function RepositoryQualityGrid({
1790
1596
  flexWrap: "wrap",
1791
1597
  gap: 12,
1792
1598
  padding: "12px 16px",
1793
- backgroundColor: theme2.colors.surface,
1794
- border: `1px solid ${theme2.colors.border}`
1599
+ backgroundColor: theme.colors.surface,
1600
+ border: `1px solid ${theme.colors.border}`
1795
1601
  },
1796
1602
  children: [
1797
1603
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 12 }, children: [
@@ -1801,7 +1607,7 @@ function RepositoryQualityGrid({
1801
1607
  style: {
1802
1608
  fontSize: 14,
1803
1609
  fontWeight: 500,
1804
- color: theme2.colors.text
1610
+ color: theme.colors.text
1805
1611
  },
1806
1612
  children: [
1807
1613
  items.length,
@@ -1810,13 +1616,13 @@ function RepositoryQualityGrid({
1810
1616
  ]
1811
1617
  }
1812
1618
  ),
1813
- /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textMuted }, children: "•" }),
1619
+ /* @__PURE__ */ jsx("span", { style: { color: theme.colors.textMuted }, children: "•" }),
1814
1620
  /* @__PURE__ */ jsxs(
1815
1621
  "span",
1816
1622
  {
1817
1623
  style: {
1818
1624
  fontSize: 14,
1819
- color: theme2.colors.textMuted
1625
+ color: theme.colors.textMuted
1820
1626
  },
1821
1627
  children: [
1822
1628
  repositories.length,
@@ -1835,9 +1641,9 @@ function RepositoryQualityGrid({
1835
1641
  style: {
1836
1642
  padding: "4px 8px",
1837
1643
  fontSize: 13,
1838
- backgroundColor: theme2.colors.background,
1839
- color: theme2.colors.text,
1840
- border: `1px solid ${theme2.colors.border}`,
1644
+ backgroundColor: theme.colors.background,
1645
+ color: theme.colors.text,
1646
+ border: `1px solid ${theme.colors.border}`,
1841
1647
  borderRadius: 4,
1842
1648
  cursor: "pointer",
1843
1649
  outline: "none"
@@ -1856,7 +1662,7 @@ function RepositoryQualityGrid({
1856
1662
  alignItems: "center",
1857
1663
  gap: 8,
1858
1664
  padding: "4px 12px",
1859
- backgroundColor: theme2.colors.backgroundLight,
1665
+ backgroundColor: theme.colors.backgroundLight,
1860
1666
  borderRadius: 16,
1861
1667
  border: `1px solid ${tierColors[overallTier]}`
1862
1668
  },
@@ -1903,7 +1709,7 @@ function RepositoryQualityGrid({
1903
1709
  RepositoryQualityGridItem,
1904
1710
  {
1905
1711
  item,
1906
- theme: theme2,
1712
+ theme,
1907
1713
  onClick: onItemClick ? () => onItemClick(item) : void 0,
1908
1714
  onVertexClick,
1909
1715
  showRepositoryName,
@@ -1917,70 +1723,273 @@ function RepositoryQualityGrid({
1917
1723
  }
1918
1724
  );
1919
1725
  }
1920
- const mockRepositories = [
1921
- {
1922
- id: "platform",
1923
- name: "platform",
1924
- packages: [
1925
- {
1926
- name: "@org/core",
1927
- version: "2.0.0",
1928
- metrics: { tests: 94, deadCode: 4, linting: 98, formatting: 100, types: 97, documentation: 90 }
1726
+ const CommandLine = ({ command, theme }) => {
1727
+ const [copied, setCopied] = React2__default.useState(false);
1728
+ const handleCopy = async () => {
1729
+ try {
1730
+ await navigator.clipboard.writeText(command);
1731
+ setCopied(true);
1732
+ setTimeout(() => setCopied(false), 2e3);
1733
+ } catch {
1734
+ console.log("Copy:", command);
1735
+ }
1736
+ };
1737
+ return /* @__PURE__ */ jsxs(
1738
+ "div",
1739
+ {
1740
+ style: {
1741
+ display: "flex",
1742
+ alignItems: "center",
1743
+ justifyContent: "space-between",
1744
+ gap: 12,
1745
+ padding: "10px 14px",
1746
+ borderRadius: 6,
1747
+ backgroundColor: theme.colors.background,
1748
+ border: `1px solid ${theme.colors.border}`,
1749
+ fontFamily: "monospace",
1750
+ fontSize: 13
1929
1751
  },
1930
- {
1931
- name: "@org/ui-components",
1932
- version: "2.0.0",
1933
- metrics: { tests: 85, deadCode: 8, linting: 95, formatting: 98, types: 92, documentation: 80 }
1752
+ children: [
1753
+ /* @__PURE__ */ jsx("code", { style: { color: theme.colors.text }, children: command }),
1754
+ /* @__PURE__ */ jsx(
1755
+ "button",
1756
+ {
1757
+ onClick: handleCopy,
1758
+ style: {
1759
+ display: "flex",
1760
+ alignItems: "center",
1761
+ justifyContent: "center",
1762
+ padding: 4,
1763
+ border: "none",
1764
+ backgroundColor: "transparent",
1765
+ color: theme.colors.textMuted,
1766
+ cursor: "pointer"
1767
+ },
1768
+ title: "Copy command",
1769
+ children: copied ? /* @__PURE__ */ jsx(Check, { size: 16, color: theme.colors.success }) : /* @__PURE__ */ jsx(Copy, { size: 16 })
1770
+ }
1771
+ )
1772
+ ]
1773
+ }
1774
+ );
1775
+ };
1776
+ const RepositoryQualityEmptyState = ({ theme }) => {
1777
+ return /* @__PURE__ */ jsxs(
1778
+ "div",
1779
+ {
1780
+ style: {
1781
+ display: "flex",
1782
+ flexDirection: "column",
1783
+ alignItems: "center",
1784
+ justifyContent: "center",
1785
+ padding: 40,
1786
+ gap: 24,
1787
+ height: "100%",
1788
+ minHeight: 400
1934
1789
  },
1935
- {
1936
- name: "@org/hooks",
1937
- version: "2.0.0",
1938
- metrics: { tests: 88, deadCode: 6, linting: 96, formatting: 100, types: 94, documentation: 85 }
1939
- }
1940
- ]
1941
- },
1942
- {
1943
- id: "backend",
1944
- name: "backend-services",
1945
- packages: [
1946
- {
1947
- name: "backend-services",
1948
- version: "1.5.0",
1949
- metrics: { tests: 80, deadCode: 15, linting: 90, formatting: 95, types: 85, documentation: 72 }
1950
- }
1951
- ]
1952
- },
1953
- {
1954
- id: "docs",
1955
- name: "documentation-site",
1956
- packages: [
1957
- {
1958
- name: "documentation-site",
1959
- version: "1.0.0",
1960
- metrics: { tests: 45, deadCode: 25, linting: 75, formatting: 85, types: 60, documentation: 95 }
1961
- }
1962
- ]
1963
- }
1964
- ];
1790
+ children: [
1791
+ /* @__PURE__ */ jsx(
1792
+ "div",
1793
+ {
1794
+ style: {
1795
+ display: "flex",
1796
+ alignItems: "center",
1797
+ justifyContent: "center",
1798
+ width: 64,
1799
+ height: 64,
1800
+ borderRadius: 16,
1801
+ backgroundColor: theme.colors.surface,
1802
+ border: `1px solid ${theme.colors.border}`
1803
+ },
1804
+ children: /* @__PURE__ */ jsx(Hexagon, { size: 32, color: theme.colors.textMuted })
1805
+ }
1806
+ ),
1807
+ /* @__PURE__ */ jsxs("div", { style: { textAlign: "center", maxWidth: 400 }, children: [
1808
+ /* @__PURE__ */ jsx(
1809
+ "h3",
1810
+ {
1811
+ style: {
1812
+ margin: "0 0 8px 0",
1813
+ fontSize: 18,
1814
+ fontWeight: 600,
1815
+ color: theme.colors.text
1816
+ },
1817
+ children: "No Quality Metrics"
1818
+ }
1819
+ ),
1820
+ /* @__PURE__ */ jsx(
1821
+ "p",
1822
+ {
1823
+ style: {
1824
+ margin: 0,
1825
+ fontSize: 14,
1826
+ color: theme.colors.textMuted,
1827
+ lineHeight: 1.5
1828
+ },
1829
+ children: "Configure the Quality Lens GitHub Action on your repositories to track code quality metrics across your projects."
1830
+ }
1831
+ )
1832
+ ] }),
1833
+ /* @__PURE__ */ jsxs(
1834
+ "div",
1835
+ {
1836
+ style: {
1837
+ display: "flex",
1838
+ flexDirection: "column",
1839
+ gap: 16,
1840
+ padding: 20,
1841
+ borderRadius: 8,
1842
+ backgroundColor: theme.colors.surface,
1843
+ border: `1px solid ${theme.colors.border}`,
1844
+ width: "100%",
1845
+ maxWidth: 400
1846
+ },
1847
+ children: [
1848
+ /* @__PURE__ */ jsxs(
1849
+ "div",
1850
+ {
1851
+ style: {
1852
+ display: "flex",
1853
+ alignItems: "center",
1854
+ gap: 10,
1855
+ marginBottom: 4
1856
+ },
1857
+ children: [
1858
+ /* @__PURE__ */ jsx(Terminal, { size: 20, color: theme.colors.text }),
1859
+ /* @__PURE__ */ jsx(
1860
+ "h4",
1861
+ {
1862
+ style: {
1863
+ margin: 0,
1864
+ fontSize: 15,
1865
+ fontWeight: 600,
1866
+ color: theme.colors.text
1867
+ },
1868
+ children: "Get Started"
1869
+ }
1870
+ )
1871
+ ]
1872
+ }
1873
+ ),
1874
+ /* @__PURE__ */ jsxs("div", { children: [
1875
+ /* @__PURE__ */ jsxs(
1876
+ "div",
1877
+ {
1878
+ style: {
1879
+ display: "flex",
1880
+ alignItems: "center",
1881
+ gap: 8,
1882
+ marginBottom: 8,
1883
+ fontSize: 13,
1884
+ color: theme.colors.textMuted
1885
+ },
1886
+ children: [
1887
+ /* @__PURE__ */ jsx(
1888
+ "span",
1889
+ {
1890
+ style: {
1891
+ display: "flex",
1892
+ alignItems: "center",
1893
+ justifyContent: "center",
1894
+ width: 20,
1895
+ height: 20,
1896
+ borderRadius: "50%",
1897
+ backgroundColor: theme.colors.primary,
1898
+ color: theme.colors.background,
1899
+ fontSize: 11,
1900
+ fontWeight: 600
1901
+ },
1902
+ children: "1"
1903
+ }
1904
+ ),
1905
+ /* @__PURE__ */ jsx("span", { children: "Install the CLI" })
1906
+ ]
1907
+ }
1908
+ ),
1909
+ /* @__PURE__ */ jsx(
1910
+ CommandLine,
1911
+ {
1912
+ command: "npm install -g @principal-ai/quality-lens-cli",
1913
+ theme
1914
+ }
1915
+ )
1916
+ ] }),
1917
+ /* @__PURE__ */ jsxs("div", { children: [
1918
+ /* @__PURE__ */ jsxs(
1919
+ "div",
1920
+ {
1921
+ style: {
1922
+ display: "flex",
1923
+ alignItems: "center",
1924
+ gap: 8,
1925
+ marginBottom: 8,
1926
+ fontSize: 13,
1927
+ color: theme.colors.textMuted
1928
+ },
1929
+ children: [
1930
+ /* @__PURE__ */ jsx(
1931
+ "span",
1932
+ {
1933
+ style: {
1934
+ display: "flex",
1935
+ alignItems: "center",
1936
+ justifyContent: "center",
1937
+ width: 20,
1938
+ height: 20,
1939
+ borderRadius: "50%",
1940
+ backgroundColor: theme.colors.primary,
1941
+ color: theme.colors.background,
1942
+ fontSize: 11,
1943
+ fontWeight: 600
1944
+ },
1945
+ children: "2"
1946
+ }
1947
+ ),
1948
+ /* @__PURE__ */ jsx("span", { children: "Initialize in each repository" })
1949
+ ]
1950
+ }
1951
+ ),
1952
+ /* @__PURE__ */ jsx(CommandLine, { command: "quality-lens init", theme })
1953
+ ] }),
1954
+ /* @__PURE__ */ jsxs(
1955
+ "div",
1956
+ {
1957
+ style: {
1958
+ display: "flex",
1959
+ alignItems: "center",
1960
+ gap: 6,
1961
+ paddingTop: 8,
1962
+ fontSize: 13,
1963
+ color: theme.colors.textMuted
1964
+ },
1965
+ children: [
1966
+ /* @__PURE__ */ jsx(ChevronRight, { size: 14 }),
1967
+ /* @__PURE__ */ jsx("span", { children: "Commit, push, and quality data will appear after CI runs" })
1968
+ ]
1969
+ }
1970
+ )
1971
+ ]
1972
+ }
1973
+ )
1974
+ ]
1975
+ }
1976
+ );
1977
+ };
1965
1978
  const RepositoryQualityGridPanelContent = ({
1966
1979
  context,
1967
1980
  events
1968
1981
  }) => {
1969
1982
  var _a;
1970
- const { theme: theme2 } = useTheme();
1983
+ const { theme } = useTheme();
1971
1984
  const qualitySlice = context.getSlice("repositoriesQuality");
1972
- const hasQualitySlice = context.hasSlice("repositoriesQuality");
1973
1985
  const isLoading = (qualitySlice == null ? void 0 : qualitySlice.loading) ?? false;
1974
1986
  const repositories = React2__default.useMemo(() => {
1975
1987
  var _a2;
1976
1988
  if ((_a2 = qualitySlice == null ? void 0 : qualitySlice.data) == null ? void 0 : _a2.repositories) {
1977
1989
  return qualitySlice.data.repositories;
1978
1990
  }
1979
- if (hasQualitySlice) {
1980
- return [];
1981
- }
1982
- return mockRepositories;
1983
- }, [(_a = qualitySlice == null ? void 0 : qualitySlice.data) == null ? void 0 : _a.repositories, hasQualitySlice]);
1991
+ return [];
1992
+ }, [(_a = qualitySlice == null ? void 0 : qualitySlice.data) == null ? void 0 : _a.repositories]);
1984
1993
  const handleItemClick = (item) => {
1985
1994
  events.emit({
1986
1995
  type: "principal-ade.repository-quality-grid:item:click",
@@ -2026,11 +2035,11 @@ const RepositoryQualityGridPanelContent = ({
2026
2035
  "div",
2027
2036
  {
2028
2037
  style: {
2029
- fontFamily: theme2.fonts.body,
2038
+ fontFamily: theme.fonts.body,
2030
2039
  height: "100%",
2031
2040
  minHeight: 0,
2032
- backgroundColor: theme2.colors.background,
2033
- color: theme2.colors.text,
2041
+ backgroundColor: theme.colors.background,
2042
+ color: theme.colors.text,
2034
2043
  overflowY: "auto",
2035
2044
  boxSizing: "border-box"
2036
2045
  },
@@ -2040,25 +2049,15 @@ const RepositoryQualityGridPanelContent = ({
2040
2049
  style: {
2041
2050
  padding: 40,
2042
2051
  textAlign: "center",
2043
- color: theme2.colors.textMuted
2052
+ color: theme.colors.textMuted
2044
2053
  },
2045
2054
  children: "Loading repository quality metrics..."
2046
2055
  }
2047
- ) : repositories.length === 0 ? /* @__PURE__ */ jsx(
2048
- "div",
2049
- {
2050
- style: {
2051
- padding: 40,
2052
- textAlign: "center",
2053
- color: theme2.colors.textMuted
2054
- },
2055
- children: "No repositories with quality metrics found."
2056
- }
2057
- ) : /* @__PURE__ */ jsx(
2056
+ ) : repositories.length === 0 ? /* @__PURE__ */ jsx(RepositoryQualityEmptyState, { theme }) : /* @__PURE__ */ jsx(
2058
2057
  RepositoryQualityGrid,
2059
2058
  {
2060
2059
  repositories,
2061
- theme: theme2,
2060
+ theme,
2062
2061
  onItemClick: handleItemClick,
2063
2062
  onVertexClick: handleVertexClick,
2064
2063
  showRepositoryName: true,
@@ -2068,9 +2067,7 @@ const RepositoryQualityGridPanelContent = ({
2068
2067
  }
2069
2068
  );
2070
2069
  };
2071
- const RepositoryQualityGridPanel = (props) => {
2072
- return /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(RepositoryQualityGridPanelContent, { ...props }) });
2073
- };
2070
+ const RepositoryQualityGridPanel = RepositoryQualityGridPanelContent;
2074
2071
  const panels = [
2075
2072
  {
2076
2073
  metadata: {