import type { ThemeTokens } from '../types.js'; import type { CSSVariableMapping, HSLVariableMapping, HSLColorMapping, ComponentTokenMapping } from './types.js'; /** * Unified token path resolver options. */ interface ResolveTokenOptions { /** Optional path prefix (e.g., 'components' for component tokens) */ prefix?: string; /** Fallback path to try if primary path fails */ fallbackPath?: string; } /** * Unified token path resolver. * Gets a value from tokens using a dot-separated path with optional prefix and fallback. */ export declare function resolveTokenPath(tokens: ThemeTokens, path: string, options?: ResolveTokenOptions): string | undefined; /** * Gets a nested value from an object using a dot-separated path. * Convenience wrapper around resolveTokenPath. */ export declare function getTokenValue(tokens: ThemeTokens, path: string): string | undefined; /** * Gets a component token value with fallback. * Convenience wrapper around resolveTokenPath for component tokens. */ export declare function getComponentTokenValue(tokens: ThemeTokens, componentPath: string, fallbackPath: string): string; /** * Converts a hex color to an HSL string. */ export declare function hexToHslString(hex: string): string; /** * Escapes a string for use in CSS selectors. * Fallback implements CSS.escape algorithm per CSSOM spec when native is unavailable. */ export declare function escapeCssId(id: string): string; /** * Validates and sanitizes a CSS color value. * Returns the value if valid, or a transparent fallback if invalid. */ export declare function sanitizeCssColor(value: string | undefined): string; /** * Generates CSS variable declarations from a mapping array. */ export declare function generateVariables(tokens: ThemeTokens, mappings: CSSVariableMapping[]): string[]; /** * Generates HSL component variables (h, s%, l%). */ export declare function generateHSLComponents(tokens: ThemeTokens, mapping: HSLVariableMapping): string[]; /** * Generates HSL color variables. */ export declare function generateHSLColors(tokens: ThemeTokens, mappings: HSLColorMapping[]): string[]; /** * Generates component token variables with fallbacks. */ export declare function generateComponentVariables(tokens: ThemeTokens, mappings: ComponentTokenMapping[]): string[]; export {}; //# sourceMappingURL=helpers.d.ts.map