import type { ExtractionResult, VariantInfo, VariantsExtractionConfig } from '../../types'; import { TypeScriptBaseExtractor } from '../typescript/TypeScriptBaseExtractor'; interface VariantsExtractionInput { componentPath: string; componentName: string; variantsFilePath?: string; } /** * Extracts variant information from Tailwind Variants files * Supports tv() function calls and various variant configurations */ export declare class VariantsExtractor extends TypeScriptBaseExtractor { config: VariantsExtractionConfig; constructor(tsConfig?: Record); /** * Extract variants from component variants file */ extract(input: VariantsExtractionInput): Promise>; /** * Extract the slot names declared on the component's tv() config * (`slots: { base: [...], header: [...] }`). These are the authoritative * `slotClasses` keys: the repo derives the public `XSlots` type from them * via `SlotNames`, an alias no prop-type regex can * resolve — so the tv() config is the only place the real names exist. * * Returns `[]` when the component has no variants file, no tv() call, or a * tv() config with no `slots` block (single-slot components). Kept separate * from `extract()` so the `VariantInfo[]` contract stays a pure variant list * (slots are not variants and must not surface as bogus API props). */ extractSlotNames(input: VariantsExtractionInput): Promise; private findVariantsFile; private parseVariantsFile; private findVariantsDeclaration; private parseVariantsDeclaration; private findTailwindVariantsCall; private parseTailwindVariants; private findPropertyInObject; /** * Helper method to extract property names from object literal properties */ private getObjectPropertyName; /** * Helper method to extract property names from PropertyName nodes */ private extractPropertyName; /** * Collect the property-name keys of an object literal in source order. * Used for the tv() `slots: { … }` block, whose keys are the slot names. */ private extractObjectKeys; private extractDefaultVariants; private parseVariantGroups; private parseVariantGroup; private extractVariantClasses; private extractLiteralValue; /** * Clear any caches */ clearCache(): void; } export {}; //# sourceMappingURL=VariantsExtractor.d.ts.map