1 | import postcss from 'postcss';
|
2 | import { Box } from './custom-values';
|
3 | import { StylableMeta } from './stylable-meta';
|
4 | import { StylableResults } from './stylable-transformer';
|
5 | export declare type PartialObject<T> = Partial<T> & object;
|
6 | export declare type CSSObject = any & object;
|
7 | export interface ParsedValue {
|
8 | type: string;
|
9 | value: string;
|
10 | nodes?: any;
|
11 | resolvedValue?: string | Box<string, unknown>;
|
12 | url?: string;
|
13 | }
|
14 | export interface StateTypeValidator {
|
15 | name: string;
|
16 | args: string[];
|
17 | }
|
18 | export declare type StateArguments = Array<StateTypeValidator | string>;
|
19 | export interface StateParsedValue {
|
20 | type: string;
|
21 | defaultValue?: string;
|
22 | arguments: StateArguments;
|
23 | }
|
24 | export interface IStylableOptimizer {
|
25 | classNameOptimizer: IStylableClassNameOptimizer;
|
26 | namespaceOptimizer: IStylableNamespaceOptimizer;
|
27 | minifyCSS(css: string): string;
|
28 | optimize(config: object, stylableResult: StylableResults, usageMapping: Record<string, boolean>, delimiter?: string): void;
|
29 | removeStylableDirectives(root: postcss.Root, shouldComment: boolean): void;
|
30 | }
|
31 | export interface IStylableClassNameOptimizer {
|
32 | context: {
|
33 | names: Record<string, string>;
|
34 | };
|
35 | rewriteSelector(selector: string, usageMapping: Record<string, boolean>, globals: Record<string, boolean>): string;
|
36 | generateName(name: string): string;
|
37 | optimizeAstAndExports(ast: postcss.Root, exported: Record<string, string>, classes: string[], usageMapping: Record<string, boolean>, globals?: Record<string, boolean>): void;
|
38 | }
|
39 | export interface IStylableNamespaceOptimizer {
|
40 | index: number;
|
41 | namespacePrefix: string;
|
42 | namespaceMapping: Record<string, string>;
|
43 | getNamespace(meta: StylableMeta, ..._env: any[]): string;
|
44 | }
|
45 | export declare type ModuleResolver = (directoryPath: string, request: string) => string;
|
46 |
|
\ | No newline at end of file |