/** * Unresolved variable detection * Detects CSS variables with var() references that couldn't be resolved */ import type { CSSVariable } from '../../types'; /** * Represents an unresolved CSS variable reference */ export interface UnresolvedVariable { /** Original variable name (e.g., '--font-sans') */ variableName: string; /** Original value containing var() (e.g., 'var(--font-geist-sans)') */ originalValue: string; /** Referenced variable name (e.g., '--font-geist-sans') */ referencedVariable: string; /** Fallback value if provided in var() */ fallbackValue?: string; /** Source of the variable ('theme', 'root', 'variant') */ source: 'theme' | 'root' | 'variant'; /** Variant name if source is 'variant' */ variantName?: string; /** CSS selector if from variant */ selector?: string; /** Likely cause of unresolved reference */ likelyCause: UnresolvedCause; } /** * Categories of unresolved variable causes */ export type UnresolvedCause = 'external' | 'self-referential' | 'unknown'; /** * Detects unresolved variable references in CSS variables * * Compares original variables with resolved variables to identify * var() references that couldn't be resolved. * * @param originalVariables - Variables before resolution * @param resolvedVariables - Variables after resolution attempt * @returns Array of unresolved variable references */ export declare function detectUnresolvedVariables(originalVariables: Array, resolvedVariables: Array): Array; /** * Groups unresolved variables by their likely cause * * @param unresolved - Array of unresolved variables * @returns Map of cause to unresolved variables */ export declare function groupByLikelyCause(unresolved: Array): Map>; /** * Groups unresolved variables by source * * @param unresolved - Array of unresolved variables * @returns Map of source to unresolved variables */ export declare function groupBySource(unresolved: Array): Map<'theme' | 'root' | 'variant', Array>;