/** * @packageDocumentation * * Helpers for flattening design token objects and aggregating them across themes. */ import type { DesignTokens, DtifFlattenedToken } from '../../core/types.js'; import { type NameTransform } from './path.js'; export interface FlattenOptions { /** * Optional transform applied to each path segment when normalizing derived * names. Consumers converting DTIF tokens to path-based views should reuse * the same transform to ensure consistent results. */ nameTransform?: NameTransform; } /** * Flatten a nested design token object into an array of tokens. * * @param tokens - Nested design token structure. * @param options - Optional normalization settings. * @returns Array of flattened DTIF entries backed by the parser cache. */ export declare function flattenDesignTokens(tokens: DesignTokens | readonly DtifFlattenedToken[], _options?: FlattenOptions): readonly DtifFlattenedToken[]; /** * Collect flattened tokens from a set of themes with optional aggregation. * * @param tokensByTheme - Record of theme names to token objects. * @param theme - Specific theme to flatten; when omitted all themes are merged. * @param options - Optional normalization settings. * @returns Array of flattened DTIF entries. */ export declare function getFlattenedTokens(tokensByTheme: Record, theme?: string, options?: FlattenOptions): readonly DtifFlattenedToken[]; //# sourceMappingURL=flatten.d.ts.map