/** * Design token extracted from theme CSS (app.css). * * @property {string} name - CSS custom property name (e.g., "--color-primary") * @property {string} value - Raw value (may be var() reference) * @property {'dark'|'light'|'shared'} theme - Theme context: 'dark', 'light', or 'shared' * @property {'color'|'fontFamily'|'fontSize'|'opacity'|'other'|'radius'|'spacing'} type - Token type for matching: color, spacing, radius, etc. * @property {string} [resolvedValue] - Resolved value for var() references (actual hex/value) */ export interface ThemeToken { name: string; value: string; theme: 'dark' | 'light' | 'shared'; type: 'color' | 'fontFamily' | 'fontSize' | 'opacity' | 'other' | 'radius' | 'spacing'; resolvedValue?: string; } /** * Parsed theme file with tokens organized by theme context. * * @property {ThemeToken[]} tokens - All resolved tokens (excludes unresolved var() references) * @property {Map} lightTokens - Map of token name to ThemeToken for light theme * @property {Map} darkTokens - Map of token name to ThemeToken for dark theme * @property {Map} sharedTokens - Map of token name to ThemeToken for shared tokens * @property {string[]} warnings - Warnings (e.g., unresolved var() references) */ export interface ParsedTheme { tokens: ThemeToken[]; lightTokens: Map; darkTokens: Map; sharedTokens: Map; warnings: string[]; } /** * Finds the theme file path (app.css) in the workspace. * * @param workspaceRoot - Workspace root directory to search * @returns Absolute path to app.css if found, or null */ export declare function findThemeFilePath(workspaceRoot?: string): null | string; /** * Parses theme file and extracts all CSS custom properties. * * When themeFilePath is not provided, searches for app.css in src/app.css or app.css relative to workspaceRoot. * * @param themeFilePath - Optional absolute path to theme CSS file * @param workspaceRoot - Optional workspace root for theme file discovery when themeFilePath is omitted * @returns Parsed theme with tokens organized by light/dark/shared * @throws {Error} When theme file is not found */ export declare function parseThemeFile(themeFilePath?: string, workspaceRoot?: string): ParsedTheme; /** * Gets all color tokens from parsed theme. * * @param parsedTheme - Parsed theme from parseThemeFile * @returns Array of color-type tokens */ export declare function getColorTokens(parsedTheme: ParsedTheme): ThemeToken[]; /** * Gets all spacing tokens from parsed theme. * * @param parsedTheme - Parsed theme from parseThemeFile * @returns Array of spacing-type tokens */ export declare function getSpacingTokens(parsedTheme: ParsedTheme): ThemeToken[]; /** * Gets all radius tokens from parsed theme. * * @param parsedTheme - Parsed theme from parseThemeFile * @returns Array of radius-type tokens */ export declare function getRadiusTokens(parsedTheme: ParsedTheme): ThemeToken[];