@stylable/core
Version:
CSS for Components
26 lines • 2.09 kB
TypeScript
import postcss from 'postcss';
import { Diagnostics } from './diagnostics';
import { StylableMeta } from './stylable-processor';
import { CSSResolve, JSResolve, StylableResolver } from './stylable-resolver';
import { replaceValueHook, StylableTransformer } from './stylable-transformer';
export declare type ValueFormatter = (name: string) => string;
export declare type ResolvedFormatter = Record<string, JSResolve | CSSResolve | ValueFormatter | null>;
export declare const functionWarnings: {
FAIL_TO_EXECUTE_FORMATTER: (resolvedValue: string, message: string) => string;
CYCLIC_VALUE: (cyclicChain: string[]) => string;
CANNOT_USE_AS_VALUE: (type: string, varName: string) => string;
CANNOT_USE_JS_AS_VALUE: (varName: string) => string;
CANNOT_FIND_IMPORTED_VAR: (varName: string) => string;
MULTI_ARGS_IN_VALUE: (args: string) => string;
COULD_NOT_RESOLVE_VALUE: (args: string) => string;
UNKNOWN_FORMATTER: (name: string) => string;
UNKNOWN_VAR: (name: string) => string;
};
export declare function resolveArgumentsValue(options: Record<string, string>, transformer: StylableTransformer, meta: StylableMeta, diagnostics: Diagnostics, node: postcss.Node, variableOverride?: Record<string, string>, path?: string[], cssVarsMapping?: Record<string, string>): Record<string, string>;
export declare function processDeclarationValue(resolver: StylableResolver, value: string, meta: StylableMeta, node?: postcss.Node, variableOverride?: Record<string, string> | null, valueHook?: replaceValueHook, diagnostics?: Diagnostics, passedThrough?: string[], cssVarsMapping?: Record<string, string>, args?: string[]): {
topLevelType: any;
outputValue: string;
typeError: Error;
};
export declare function evalDeclarationValue(resolver: StylableResolver, value: string, meta: StylableMeta, node?: postcss.Node, variableOverride?: Record<string, string> | null, valueHook?: replaceValueHook, diagnostics?: Diagnostics, passedThrough?: string[], cssVarsMapping?: Record<string, string>, args?: string[]): string;
//# sourceMappingURL=functions.d.ts.map