/** * 0.13.3 (brownfield-extraction track for 0.14 mockup-first refinement) — * walk `**\/*.css` files (excluding build output) and extract design tokens * declared via `:root { --var: value }` and `@theme { --var: value }` blocks. * * Supports the Tailwind v4 idiom (inline `@theme`) and classic CSS-vars * theming. Light/dark variants captured separately when `:root` lives * inside `@media (prefers-color-scheme: dark)`. * * Output: `.brewing/diagrams/tokens.md` — refine reads this so its * mockup proposals reuse the consumer's existing palette / scale rather * than inventing arbitrary hex values. */ export interface TokenEntry { name: string; value: string; variant: "light" | "dark"; source: string; } export interface TokenCatalog { light: TokenEntry[]; dark: TokenEntry[]; themeMappings: TokenEntry[]; filesScanned: number; } /** * Parse a CSS file's :root and @theme blocks into TokenEntry rows. * * Strategy: walk top-level by tracking brace depth + remembering the * last selector / at-rule prefix. We need only enough to distinguish: * - `:root { ... }` at depth 0 → light variant * - `:root { ... }` inside `@media (prefers-color-scheme: dark)` → dark * - `@theme { ... }` → theme mappings (Tailwind v4) * * We are not building a full CSS AST; the regex+brace pass is enough * for the conventional vars-in-:root pattern and degrades gracefully * on weird input by emitting fewer rows. */ export declare function parseCssTokens(content: string, sourceLabel: string): { light: TokenEntry[]; dark: TokenEntry[]; themeMappings: TokenEntry[]; }; export declare function emitTokensCatalog(repoRoot: string): { written: boolean; filesScanned: number; lightCount?: number; darkCount?: number; themeCount?: number; skippedReason?: string; }; export declare function renderTokensMarkdown(catalog: TokenCatalog): string; //# sourceMappingURL=emit-tokens.d.ts.map