/** * Style declaration extractor — Spec 10. * * Extracts normalized declarations from all five style mechanisms: * 1. CSS/SCSS files — tree-sitter-css parsed rule sets * 2. Tailwind — className/class attributes in JSX/HTML * 3. Inline styles — style={{...}} object expressions * 4. CSS-in-JS — styled-components / emotion tagged templates * 5. Design tokens — CSS custom property definitions * * Single entry point: extractDeclarations(filePath, adapter, sourceCode, ast?) */ import type { AST, LanguageAdapter } from '../languages/types.js'; import type { NormalizedDeclaration, StyleToken } from './types.js'; import type { TailwindThemeTokens } from './tailwindConfigLoader.js'; /** * Extract all style declarations from a file. * * Dispatches to the correct sub-extractor based on file extension. * Returns an empty array for files that don't contain styles. * * @param filePath - Project-relative file path * @param adapter - Language adapter for this file * @param sourceCode - Raw file content * @param ast - Optional pre-parsed AST (avoids re-parsing) * @param tailwindTokens - Optional pre-loaded Tailwind tokens (avoids re-loading per file) */ export declare function extractDeclarations(filePath: string, adapter: LanguageAdapter, sourceCode: string, ast?: AST, tailwindTokens?: TailwindThemeTokens): NormalizedDeclaration[]; /** * Extract CSS custom property definitions from all CSS/SCSS files * and produce design tokens. */ export declare function extractTokens(filePath: string, sourceCode: string): StyleToken[]; /** * Load Tailwind tokens, optionally from a cached result. */ export declare function getOrLoadTailwindTokens(projectRoot: string, existing?: TailwindThemeTokens): TailwindThemeTokens; //# sourceMappingURL=styleExtractor.d.ts.map