/** * @packageDocumentation * * Helpers for normalizing design token inputs into theme records. */ import type { DesignTokens } from '../../core/types.js'; /** * Normalize and validate design token input. * * Accepts either a design token object or a theme record mapping theme names to * token sets. The tokens are parsed using the DTIF parser and returned as a * consistent theme record keyed by theme name. * * @param tokens - Token input to normalize. * @returns A promise resolving to a record of design tokens keyed by theme name. * @throws {DtifTokenParseError} When token parsing fails. * @throws {Error} When token definitions are invalid. * * @example * ```ts * import { normalizeTokens } from '@lapidist/design-lint/utils'; * const themes = await normalizeTokens({ * light: { color: { primary: { $type: 'color', $value: '#000' } } }, * }); * console.log(Object.keys(themes)); * ``` */ export declare function normalizeTokens(tokens: unknown): Promise>; //# sourceMappingURL=normalize-tokens.d.ts.map