import { StylableMeta } from './stylable-meta'; import { StylableResolver } from './stylable-resolver'; import { ParsedValue } from './types'; export interface Box { type: Type; value: Value; } export declare function box(type: Type, value: Value): Box; export declare function unbox>(boxed: B | string): any; export interface BoxedValueMap { [k: string]: string | Box; } export declare type BoxedValueArray = Array>; declare type CustomTypes = Record>; export interface CustomValueExtension { evalVarAst(valueAst: ParsedValue, customTypes: { [typeID: string]: CustomValueExtension; }): Box; getValue(path: string[], value: Box, node: ParsedValue, customTypes: CustomTypes): string; } export declare const stTypes: CustomTypes; export declare const CustomValueStrategy: { args: (fnNode: ParsedValue, customTypes: CustomTypes) => (string | Box)[]; named: (fnNode: ParsedValue, customTypes: CustomTypes) => BoxedValueMap; }; export interface JSValueExtension { _kind: 'CustomValue'; register(localTypeSymbol: string): CustomValueExtension; } interface ExtensionApi { processArgs: (fnNode: ParsedValue, customTypes: CustomTypes) => Args; createValue: (args: Args) => Value; getValue: (v: Value, key: string) => string | Box; flattenValue?: (v: Box) => { parts: Array>; delimiter: ',' | ' '; }; } export declare function resolveCustomValues(meta: StylableMeta, resolver: StylableResolver): { [x: string]: CustomValueExtension; }; export declare function createCustomValue({ processArgs, createValue, flattenValue, getValue, }: ExtensionApi): JSValueExtension; export declare function getBoxValue(path: string[], value: string | Box, node: ParsedValue, customTypes: CustomTypes): string; export declare function isCustomValue(symbol: any): symbol is JSValueExtension; export {}; //# sourceMappingURL=custom-values.d.ts.map