Normalize organisms, PaymentStep feedback, cross-page spacing fix
- Organism normalize pass: fix FuneralFinderV3 transition timing (200ms → 150ms ease-in-out), add autodocs tag to V3 stories - Navigation: fix logo a11y — div with role="link" → proper <a> tag - ToggleButtonGroup: add align (start/center) and direction (row/column) props, bump description text from text.secondary to text.primary - PaymentStep: divider under subheading, lock icon alignment, centre- aligned payment options, vertical payment method stack, checkbox align - SummaryStep: save button → text variant (matches other pages), centred - All wizard pages: heading mb: 1 → mb: 2 for better breathing room - Style Dictionary: auto-generate tokens.d.ts, fix TS unused imports - tokens.d.ts: generated type declarations for 398 token exports Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -51,3 +51,25 @@ const sd = new StyleDictionary({
|
||||
});
|
||||
|
||||
await sd.buildAllPlatforms();
|
||||
|
||||
// Generate TypeScript declarations for the JS token output
|
||||
import { readFileSync, writeFileSync } from 'fs';
|
||||
|
||||
const jsPath = 'src/theme/generated/tokens.js';
|
||||
const dtsPath = 'src/theme/generated/tokens.d.ts';
|
||||
|
||||
const jsContent = readFileSync(jsPath, 'utf-8')
|
||||
.replace(/=\n\s+/g, '= '); // join continuation lines
|
||||
|
||||
const declarations = ['/**', ' * Do not edit directly, this file was auto-generated.', ' */'];
|
||||
|
||||
for (const line of jsContent.split('\n')) {
|
||||
const m = line.match(/^export const (\w+)\s*=\s*(.+?)\s*;/);
|
||||
if (!m) continue;
|
||||
const [, name, val] = m;
|
||||
const isNum = !val.startsWith('"') && !val.startsWith("'") && !isNaN(Number(val));
|
||||
declarations.push(`export declare const ${name}: ${isNum ? 'number' : 'string'};`);
|
||||
}
|
||||
|
||||
writeFileSync(dtsPath, declarations.join('\n') + '\n');
|
||||
console.log(`✓ Generated ${declarations.length - 3} TypeScript declarations`);
|
||||
|
||||
Reference in New Issue
Block a user