{code}
- ),
+ default: ({ code }: { code: string }) => {code},
}));
// Mock the constants module to avoid import.meta issues
@@ -101,7 +100,7 @@ describe('SpecTabs', () => {
applications={['Data analysis', 'Statistical visualization']}
data={['Random numeric data', 'CSV files']}
notes={['Use for small datasets', 'Works best with 2D data']}
- />,
+ />
);
await user.click(screen.getByRole('tab', { name: /spec/i }));
@@ -140,7 +139,7 @@ describe('SpecTabs', () => {
imageDescription="A colorful scatter plot with labeled axes"
strengths={['Clear layout', 'Good color choices']}
weaknesses={['Missing legend', 'Overlapping points']}
- />,
+ />
);
await user.click(screen.getByRole('tab', { name: /impl/i }));
@@ -187,7 +186,14 @@ describe('SpecTabs', () => {
score: 18,
max: 20,
items: [
- { id: 'vq1', name: 'Color harmony', score: 9, max: 10, passed: true, comment: 'Great palette' },
+ {
+ id: 'vq1',
+ name: 'Color harmony',
+ score: 9,
+ max: 10,
+ passed: true,
+ comment: 'Great palette',
+ },
{ id: 'vq2', name: 'Layout balance', score: 9, max: 10, passed: true },
],
},
@@ -217,7 +223,7 @@ describe('SpecTabs', () => {
{...baseProps}
tags={{ plot_type: ['scatter', 'bubble'], data_type: ['numeric'] }}
implTags={{ dependencies: ['numpy'], techniques: ['vectorized'] }}
- />,
+ />
);
// Spec tags
@@ -243,7 +249,7 @@ describe('SpecTabs', () => {
overviewMode
tags={{ plot_type: ['scatter'] }}
implTags={{ dependencies: ['numpy'] }}
- />,
+ />
);
expect(screen.getByText('scatter')).toBeInTheDocument();
@@ -313,7 +319,7 @@ describe('SpecTabs', () => {
imageDescription={undefined}
strengths={undefined}
weaknesses={undefined}
- />,
+ />
);
await user.click(screen.getByRole('tab', { name: /impl/i }));
@@ -327,9 +333,7 @@ describe('SpecTabs', () => {
await user.click(screen.getByRole('tab', { name: /impl/i }));
- expect(
- screen.queryByText('No implementation review data available.'),
- ).not.toBeInTheDocument();
+ expect(screen.queryByText('No implementation review data available.')).not.toBeInTheDocument();
});
// -------------------------------------------------------
@@ -351,12 +355,7 @@ describe('SpecTabs', () => {
it('renders tags and fetch mock is configured for tag counts', async () => {
// The module-level cache means fetch may or may not be called depending
// on test execution order. We verify the component renders tags correctly.
- render(
- palette[:n] — reached only by name. two of them flip per theme.
+ three additional anchors that live outside the categorical pool. they
+ are never returned by palette[:n] — reached only by name. two of them
+ flip per theme.
#FAF8F1 on cream bg / #1A1A17
- on warm-near-black — so the zero point reads as part of the page rather than as a grey blob.
+ #FAF8F1 on cream bg /{' '}
+ #1A1A17
+ on warm-near-black — so the zero point reads as part of the page rather than as a grey
+ blob.
#F5F3EC, four categorical hues + amber fall under
- WCAG 2.1 SC 1.4.11's 3:1 minimum. The industry-standard fix is a 1px ink-color
- stroke on affected series — but it's a renderer judgment call, not a hard rule. the
- swatches below carry that stroke wherever a series fails in the current theme.
+ muted palettes share a known limit: the lighter members carry their distinguishability
+ through chroma, not L-spread. On cream bg #F5F3EC, four categorical hues
+ + amber fall under WCAG 2.1 SC 1.4.11's 3:1 minimum. The industry-standard fix is
+ a 1px ink-color stroke on affected series — but it's a renderer
+ judgment call, not a hard rule. the swatches below carry that stroke wherever a series
+ fails in the current theme.
norm / cvd readout, in full — pairwise
- ΔE in CAM02-UCS for the 8 hues plus the amber and neutral anchors. lower = closer = harder to
- tell apart. the worst-CVD grid takes the lowest of the deuteranopia / protanopia / tritanopia
- simulations per pair; hover any cell for the breakdown.
+ the numbers behind each hue's norm / cvd readout, in
+ full — pairwise ΔE in CAM02-UCS for the 8 hues plus the amber and neutral anchors.
+ lower = closer = harder to tell apart. the worst-CVD grid takes the lowest of the
+ deuteranopia / protanopia / tritanopia simulations per pair; hover any cell for the
+ breakdown.