import { IClassNameValidator } from '../core/interfaces'; import { Logger } from '../utils/Logger'; /** * Class validator for Tailwind CSS v4 * This loads the design system once and caches it for validation * Implements IClassNameValidator for dependency inversion */ export declare class TailwindValidator implements IClassNameValidator { private classSet; private designSystem; private cssFilePath; private logger; private validationCache; private allowedClasses; constructor(cssFilePath: string, logger: Logger); /** * Load the design system and cache the class list */ initialize(): Promise; isInitialized(): boolean; /** * Set custom allowed classes from configuration */ setAllowedClasses(allowedClasses: string[]): void; /** * Check if a class name is valid * This handles both static classes and arbitrary values (e.g., w-[100px]) * PERFORMANCE OPTIMIZED: Reduced logging, faster cache checks */ isValidClass(className: string): boolean; /** * Validate multiple class names and return invalid ones * PERFORMANCE OPTIMIZED: Batch validation for arbitrary values */ getInvalidClasses(classNames: string[]): string[]; /** * Reload the design system (useful when CSS file changes) */ reload(): Promise; /** * Get cache statistics (for performance monitoring) */ getCacheStats(): { size: number; maxSize: number; }; /** * Get similar class names for a given invalid class (for "Did you mean?" suggestions) * Uses Levenshtein distance to find closest matches */ getSimilarClasses(invalidClass: string, maxSuggestions?: number): string[]; /** * Calculate Levenshtein distance between two strings * This measures the minimum number of single-character edits needed to transform one string into another */ private levenshteinDistance; /** * Get all valid class names (for completions or other purposes) */ getAllClasses(): string[]; } //# sourceMappingURL=TailwindValidator.d.ts.map