@patreon/studio
Version:
Patreon Studio Design System
25 lines (24 loc) • 1.2 kB
TypeScript
import type { HexString } from '~/types/color';
import type { TokenMapConfig } from '~/types/color-system';
interface GenerateTokensDefinitionFromTokenMapProps {
/** The cache key to use for the token map **/
cacheKey?: string;
/** The input color to use when generating the token map **/
inputColor: HexString;
/** The name of the token map to use. @default default **/
tokenMaps: TokenMapConfig;
}
/**
* Generates a token map based on a map definition and an extended color palette.
*
* @param inputColor The input color to use when generating the token map.
* @param tokenMap A JSON mapping of tokens to color ramp stops.
* @param config An optional color palette to use when generating the color palette
*
* @returns A tokens definition object with token keys and hex values
*/
export declare const generateTokensDefinitionFromTokenMap: ({ cacheKey: userCacheKey, inputColor, tokenMaps }: GenerateTokensDefinitionFromTokenMapProps) => {
dark: Partial<import("~/types/token-defs").TokensDefinition<string, import("../../..").AnyTokenName>>;
light: Partial<import("~/types/token-defs").TokensDefinition<string, import("../../..").AnyTokenName>>;
};
export {};