+ {/* Header row */}
+
+
+ {rowAxisLabel} \ {colAxisLabel}
+
+
+ {colLabels.map((col) => (
+
+
+ {col}
+
+
+ ))}
+
+ {/* Body rows */}
+ {rowLabels.map((row) => (
+
+
+ {row}
+
+ {colLabels.map((col) => {
+ const cell = cells[row]?.[col];
+ const score = cell ? cell.score : null;
+ const severity = scoreToSeverity(score);
+ const bg = cell ? getColor(severity) : "transparent";
+ const label = formatScore(score);
+ const cellEl = (
+
+ {/* The severity fills are fixed light pastels (--color-*-200),
+ so use a fixed dark from the raw palette for legibility in
+ both themes; empty cells keep the default muted foreground. */}
+
+ {label}
+
+
+ );
+ if (!cell) {
+ return {cellEl}
;
+ }
+ return (
+
+ {cellEl}
+
+ );
+ })}
+
+ ))}
+
+