11// Maturity Score webview
22import { buttonHtml } from '../shared/buttonConfig' ;
33import type { ContextReferenceUsage } from '../shared/contextRefUtils' ;
4+ import themeStyles from '../shared/theme.css' ;
45import styles from './styles.css' ;
56
67// ── Types ──────────────────────────────────────────────────────────────
@@ -113,15 +114,15 @@ function renderRadarChart(categories: CategoryScore[]): string {
113114 const angle = startAngle + i * angleStep ;
114115 return `${ cx + r * Math . cos ( angle ) } ,${ cy + r * Math . sin ( angle ) } ` ;
115116 } ) . join ( ' ' ) ;
116- return `<polygon points="${ points } " fill="none" stroke="#2a2a40 " stroke-width="1" />` ;
117+ return `<polygon points="${ points } " fill="none" class="radar-grid " stroke-width="1" />` ;
117118 } ) . join ( '' ) ;
118119
119120 // Axis lines
120121 const axes = Array . from ( { length : n } , ( _ , i ) => {
121122 const angle = startAngle + i * angleStep ;
122123 const x2 = cx + maxR * Math . cos ( angle ) ;
123124 const y2 = cy + maxR * Math . sin ( angle ) ;
124- return `<line x1="${ cx } " y1="${ cy } " x2="${ x2 } " y2="${ y2 } " stroke="#2a2a40 " stroke-width="1" />` ;
125+ return `<line x1="${ cx } " y1="${ cy } " x2="${ x2 } " y2="${ y2 } " class="radar-grid " stroke-width="1" />` ;
125126 } ) . join ( '' ) ;
126127
127128 // Data polygon
@@ -142,7 +143,7 @@ function renderRadarChart(categories: CategoryScore[]): string {
142143 if ( Math . cos ( angle ) < - 0.3 ) { anchor = 'end' ; }
143144 else if ( Math . cos ( angle ) > 0.3 ) { anchor = 'start' ; }
144145 return `<text x="${ x } " y="${ y } " text-anchor="${ anchor } " dominant-baseline="central"
145- font-size="14" fill="#d0d0d0 " font-weight="600">${ cat . icon } ${ cat . category } </text>` ;
146+ class="radar-label" font-size="14 " font-weight="600">${ cat . icon } ${ cat . category } </text>` ;
146147 } ) . join ( '' ) ;
147148
148149 // Stage dots
@@ -152,13 +153,13 @@ function renderRadarChart(categories: CategoryScore[]): string {
152153 const x = cx + r * Math . cos ( angle ) ;
153154 const y = cy + r * Math . sin ( angle ) ;
154155 const color = stageColor ( cat . stage ) ;
155- return `<circle cx="${ x } " cy="${ y } " r="5" fill="${ color } " stroke="#fff " stroke-width="1.5" />` ;
156+ return `<circle cx="${ x } " cy="${ y } " r="5" fill="${ color } " class="radar-dot " stroke-width="1.5" />` ;
156157 } ) . join ( '' ) ;
157158
158159 // Ring labels
159160 const ringLabels = [ 1 , 2 , 3 , 4 ] . map ( level => {
160161 const r = ( level / 4 ) * maxR ;
161- return `<text x="${ cx + 4 } " y="${ cy - r + 3 } " font-size="9" fill="#555 ">${ level } </text>` ;
162+ return `<text x="${ cx + 4 } " y="${ cy - r + 3 } " class="radar-ring-label" font-size="9 ">${ level } </text>` ;
162163 } ) . join ( '' ) ;
163164
164165 return `<svg viewBox="0 0 650 650" class="radar-svg" xmlns="http://www.w3.org/2000/svg">
@@ -384,6 +385,7 @@ function renderLayout(data: MaturityData): void {
384385 } ) . join ( '' ) ;
385386
386387 root . innerHTML = `
388+ <style>${ themeStyles } </style>
387389 <style>${ styles } </style>
388390 <div class="container">
389391 <div class="header">
0 commit comments