diff --git a/packages/pen-core/src/__tests__/semantic-palette.test.ts b/packages/pen-core/src/__tests__/semantic-palette.test.ts index 92bae55e3..dedb8d380 100644 --- a/packages/pen-core/src/__tests__/semantic-palette.test.ts +++ b/packages/pen-core/src/__tests__/semantic-palette.test.ts @@ -33,8 +33,8 @@ describe('getSemanticPalette', () => { it('every light/dark color variable is type="color"', () => { const p = getSemanticPalette(); // All color variables (light/dark or single) must have type "color" - const colorVars = Object.entries(p.variables).filter(([, def]) => - (def as VariableDefinition).type === 'color' + const colorVars = Object.entries(p.variables).filter( + ([, def]) => (def as VariableDefinition).type === 'color', ); expect(colorVars.length).toBeGreaterThanOrEqual(28); }); @@ -97,7 +97,10 @@ describe('getSemanticPalette', () => { const arr = d.value as ThemedValue[]; for (const v of arr) { expect(typeof v.value).toBe('string'); - expect((v.value as string).match(hexRe), `${name} ${JSON.stringify(v.theme)}`).toBeTruthy(); + expect( + (v.value as string).match(hexRe), + `${name} ${JSON.stringify(v.theme)}`, + ).toBeTruthy(); } } else { // single-value color @@ -337,8 +340,7 @@ describe('alert tokens (8 light/dark pairs)', () => { it('color-warning-text: light=#92400E dark=#FDE68A', () => { const p = getSemanticPalette(); - const arr = (p.variables['color-warning-text'] as VariableDefinition) - .value as ThemedValue[]; + const arr = (p.variables['color-warning-text'] as VariableDefinition).value as ThemedValue[]; expect(arr[0].value).toBe('#92400E'); expect(arr[1].value).toBe('#FDE68A'); }); @@ -421,7 +423,9 @@ describe('palette count snapshot (color additions complete)', () => { it('applySemanticPalette seeds all palette variables on an empty document', () => { const doc: PenDocument = createEmptyDocument(); const out = applySemanticPalette(doc); - expect(Object.keys(out.variables ?? {}).length).toBe(Object.keys(getSemanticPalette().variables).length); + expect(Object.keys(out.variables ?? {}).length).toBe( + Object.keys(getSemanticPalette().variables).length, + ); }); }); diff --git a/packages/pen-core/src/variables/semantic-palette.ts b/packages/pen-core/src/variables/semantic-palette.ts index 20b5671ed..3ea009d21 100644 --- a/packages/pen-core/src/variables/semantic-palette.ts +++ b/packages/pen-core/src/variables/semantic-palette.ts @@ -225,7 +225,10 @@ const PALETTE: Record = { 'type-body-line-height': { single: 1.5, description: 'Body text — line height multiplier' }, 'type-caption-size': { single: 12, description: 'Caption / helper text — font size (px)' }, 'type-caption-weight': { single: 400, description: 'Caption / helper text — font weight' }, - 'type-caption-line-height': { single: 1.4, description: 'Caption / helper text — line height multiplier' }, + 'type-caption-line-height': { + single: 1.4, + description: 'Caption / helper text — line height multiplier', + }, // ── Border radius (3 numeric) ───────────────────────────────────────────── 'radius-sm': { single: 4, description: 'Border radius small — 4 px (chip, badge, input)' }, diff --git a/scripts/measure-v0-hex-coverage.ts b/scripts/measure-v0-hex-coverage.ts index fd853d9c7..e61aad9db 100644 --- a/scripts/measure-v0-hex-coverage.ts +++ b/scripts/measure-v0-hex-coverage.ts @@ -95,7 +95,9 @@ function main() { } if (coverRate < 0.95) { - console.error(`\n❌ HARD GATE FAILED: semantic cover rate ${(coverRate * 100).toFixed(1)}% < 95%`); + console.error( + `\n❌ HARD GATE FAILED: semantic cover rate ${(coverRate * 100).toFixed(1)}% < 95%`, + ); console.error('Per spec §7.4, must pause and revisit D2 namespace boundary before P2.'); process.exit(1); }