1 | import { Style, StyleSheet } from '../utils/style';
|
2 | import { HandlerCreator } from './utilities/handler';
|
3 | import type { Config, DictStr, DefaultConfig, DynamicUtility, DefaultTheme, Shortcut, PluginUtils, PluginUtilOptions, PluginOutput, PluginWithOptions, DeepNestObject, UtilityGenerator, VariantGenerator, Validata, StyleArrayObject, PluginCache, ResolvedVariants, VariantTypes, VariantUtils } from '../interfaces';
|
4 | export declare class Processor {
|
5 | private _config;
|
6 | private _theme;
|
7 | private _variants;
|
8 | private _cache;
|
9 | _handler: HandlerCreator;
|
10 | readonly _plugin: PluginCache;
|
11 | pluginUtils: PluginUtils;
|
12 | variantUtils: VariantUtils;
|
13 | constructor(config?: Config);
|
14 | private _resolveConfig;
|
15 | private _reduceFunction;
|
16 | private _resolvePresets;
|
17 | private _resolveFunction;
|
18 | private _replaceStyleVariants;
|
19 | private _addPluginProcessorCache;
|
20 | private _loadVariables;
|
21 | loadConfig(config?: Config): Config;
|
22 | resolveConfig(config: Config | undefined, presets: Config): Config;
|
23 | resolveVariants(type?: VariantTypes): ResolvedVariants;
|
24 | resolveStaticUtilities(includePlugins?: boolean): StyleArrayObject;
|
25 | resolveDynamicUtilities(includePlugins?: boolean): DynamicUtility;
|
26 | get allConfig(): DefaultConfig;
|
27 | get allTheme(): DefaultTheme;
|
28 | get allVariant(): string[];
|
29 | wrapWithVariants(variants: string[], styles: Style | Style[]): Style[] | undefined;
|
30 | removePrefix(className: string): string;
|
31 | markAsImportant(style: Style, force?: boolean | string): Style;
|
32 | extract(className: string, addComment?: boolean, prefix?: string): Style | Style[] | undefined;
|
33 | test(className: string, prefix?: string): boolean;
|
34 | preflight(html?: string, includeBase?: boolean, includeGlobal?: boolean, includePlugins?: boolean, ignoreProcessed?: boolean): StyleSheet;
|
35 | interpret(classNames: string, ignoreProcessed?: boolean, handleIgnored?: (ignored: string) => Style | Style[] | undefined): {
|
36 | success: string[];
|
37 | ignored: string[];
|
38 | styleSheet: StyleSheet;
|
39 | };
|
40 | validate(classNames: string): {
|
41 | success: Validata[];
|
42 | ignored: Validata[];
|
43 | };
|
44 | compile(classNames: string, prefix?: string, showComment?: boolean, ignoreGenerated?: boolean, handleIgnored?: (ignored: string) => Style | Style[] | undefined, outputClassName?: string): {
|
45 | success: string[];
|
46 | ignored: string[];
|
47 | className?: string;
|
48 | styleSheet: StyleSheet;
|
49 | };
|
50 | attributify(attrs: {
|
51 | [key: string]: string | string[];
|
52 | }, ignoreProcessed?: boolean): {
|
53 | success: string[];
|
54 | ignored: string[];
|
55 | styleSheet: StyleSheet;
|
56 | };
|
57 | loadPlugin({ handler, config, }: PluginOutput): void;
|
58 | loadPluginWithOptions(optionsFunction: PluginWithOptions<any>, userOptions?: DictStr): void;
|
59 | loadShortcuts(shortcuts: {
|
60 | [key: string]: Shortcut;
|
61 | }): void;
|
62 | loadAlias(alias: {
|
63 | [key: string]: string;
|
64 | }): void;
|
65 | config(path: string, defaultValue?: unknown): unknown;
|
66 | theme(path: string, defaultValue?: unknown): unknown;
|
67 | corePlugins(path: string): boolean;
|
68 | variants(path: string, defaultValue?: string[]): string[];
|
69 | e(selector: string): string;
|
70 | prefix(selector: string): string;
|
71 | addUtilities(utilities: DeepNestObject | DeepNestObject[], options?: PluginUtilOptions): Style[];
|
72 | addDynamic(key: string, generator: UtilityGenerator, options?: PluginUtilOptions): UtilityGenerator;
|
73 | addComponents(components: DeepNestObject | DeepNestObject[], options?: PluginUtilOptions): Style[];
|
74 | addBase(baseStyles: DeepNestObject): Style[];
|
75 | addVariant(name: string, generator: VariantGenerator): Style | Style[];
|
76 | dumpConfig(): string;
|
77 | }
|