ant-design-x-vue
Version:
Craft AI-driven interfaces effortlessly
29 lines (28 loc) • 1.44 kB
TypeScript
export declare const ATTR_TOKEN = "data-token-hash";
export declare const ATTR_MARK = "data-css-hash";
export declare const ATTR_CACHE_PATH = "data-cache-path";
export type TokenWithCSSVar<V, T extends Record<string, V> = Record<string, V>> = {
[key in keyof T]?: string | V;
};
export declare function flattenToken(token: any): string;
/**
* Convert derivative token to key string
*/
export declare function token2key(token: any, salt: string): string;
export declare function supportLayer(): boolean;
export declare function supportWhere(): boolean;
export declare function supportLogicProps(): boolean;
export declare const isClientSide: boolean;
export declare function unit(num: string | number): string;
export declare const token2CSSVar: (token: string, prefix?: string) => string;
export declare function toStyleStr(style: string, tokenKey?: string, styleId?: string, customizeAttrs?: Record<string, string>, plain?: boolean): string;
export declare const serializeCSSVar: <T extends Record<string, any>>(cssVars: T, hashId: string, options?: {
scope?: string;
}) => string;
export declare const transformToken: <V, T extends Record<string, V> = Record<string, V>>(token: T, themeKey: string, config?: {
prefix?: string;
ignore?: { [key in keyof T]?: boolean; };
unitless?: { [key in keyof T]?: boolean; };
preserve?: { [key in keyof T]?: boolean; };
scope?: string;
}) => [TokenWithCSSVar<V, T>, string];