/** * Site-native theme token validation (#944). * * A "site-native theme" is a theme token file maintained in a consuming * repo and loaded as `[data-theme="…"] { --turbo-*: … }` CSS (or an * equivalent JSON map). This module validates such files against the * contract generated from the CSS generator itself * (generated/native-contract.json), so a missing or misspelled token fails * loudly in CI instead of silently falling back in shipped components. * * The audited contrast pairs behind most of these tokens live separately * in schema/contrast-pairs.json (#922); the WCAG AA normalizer guarantees * those inks for published flavors. */ /** CSS variable names a native theme must declare (emitted for every flavor). */ export declare const REQUIRED_NATIVE_TOKENS: readonly string[]; /** CSS variable names a native theme may declare (emitted for some flavors). */ export declare const OPTIONAL_NATIVE_TOKENS: readonly string[]; export interface NativeThemeValidation { /** true when no required token is missing and nothing unknown/empty is declared. */ valid: boolean; requiredCount: number; declaredCount: number; /** Required tokens the file does not declare. */ missing: string[]; /** `--turbo-*` declarations that are not part of the contract (likely typos). */ unknown: string[]; /** `--turbo-*` tokens declared more than once; last declaration wins in CSS. */ duplicates: string[]; /** Declarations whose value is empty. */ empty: string[]; /** Declarations whose value is the scaffold placeholder keyword `initial`. */ placeholders: string[]; /** Token map values that are not strings (JSON token maps only). */ nonStringValues: string[]; } /** * Validate a token map (`--turbo-x` name → value). */ export declare function validateNativeThemeTokens(tokens: Record): NativeThemeValidation; export declare function parseNativeThemeCss(css: string): { tokens: Record; duplicates: string[]; }; /** * Validate a native theme given as CSS source. */ export declare function validateNativeThemeCss(css: string): NativeThemeValidation; /** * Format a validation result as a human-readable report (used by the CLI * and the assert helper). */ export declare function formatNativeThemeValidation(result: NativeThemeValidation, source?: string): string; //# sourceMappingURL=validator.d.ts.map