@patreon/studio
Version:
Patreon Studio Design System
32 lines (31 loc) • 1.8 kB
TypeScript
import type { ColorScheme } from '../../../types/color-scheme';
import type { TokenMapConfig, HexString } 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 **/
tokenMap: 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 function uncachedGenerateTokensDefinitionFromTokenMap({ inputColor, tokenMap: tokenMapByColorMode, }: GenerateTokensDefinitionFromTokenMapProps): ColorScheme<Partial<import("../../../types/token-defs").TokensDefinition<string, import("../../..").AnyTokenName>>>;
/**
* 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, tokenMap }: GenerateTokensDefinitionFromTokenMapProps) => ColorScheme<Partial<import("../../../types/token-defs").TokensDefinition<string, import("../../..").AnyTokenName>>>;
export {};