import { DeepKeyTokenMap, SingleToken, TokenTypes } from '@tokens-studio/types'; export interface IResolvedToken { /** * Name of the token */ name: string; /** * Expression that represents the value of the token, botentially jsons stringified */ value: SingleToken['value']; /** * The type of the token */ type: TokenTypes; /** * Optional description of the token */ description?: string; } /** * Takes in a nested object of tokens and returns a flattened array of tokens * @param nested * @param keyPath Optional key path to prefix the name of the token * @returns */ export declare const flatten: (nested: DeepKeyTokenMap, keyPath?: string[]) => IResolvedToken[]; /** * Takes in an array of tokens and returns a map of tokens. * This only works if the tokens are flat, meaning they do not have nested tokens * @param tokens * @returns */ export declare const flatTokensToMap: (tokens: IResolvedToken[]) => Record; /** * Takes an array of tokens and returns a map of tokens. This does result in nested tokens * @param tokens * @returns */ export declare const flatTokensRestoreToMap: (tokens: IResolvedToken[]) => {}; export type W3CToken = { $value: string; $type: TokenTypes; alpha?: number; $extensions?: Record; }; export interface W3CDeepKeyTokenMap { [key: string]: W3CDeepKeyTokenMap | W3CToken; } export declare const convertW3CToStudio: (obj: W3CDeepKeyTokenMap) => DeepKeyTokenMap; //# sourceMappingURL=index.d.ts.map