forked from acss-io/atomizer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
42 lines (35 loc) · 1.26 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
declare module 'atomizer' {
export interface AtomizerConfig {
custom?: Record<string, string | Record<string, string>>;
breakPoints?: Record<string, string>;
classNames?: string[];
}
export interface AtomizerOptions {
verbose?: boolean;
}
export interface AtomizerRule {
[key: string]: any;
}
export interface CSSOptions {
banner?: string;
helpersNamespace?: string;
ie?: boolean;
namespace?: string;
rtl?: boolean;
}
export default class {
public static escapeSelector: (str: string) => string;
public static replaceConstants: (str: string, rtl: boolean) => string;
constructor(options?: AtomizerOptions, rules?: AtomizerRule[]);
public addRules(rules: AtomizerRule[]): void;
public findClassNames(src: string): string[];
public getConfig: (
classNames: string[],
config: AtomizerConfig
) => AtomizerConfig;
public getCss(config: AtomizerConfig, options?: CSSOptions): string;
public getSyntax(isSimple?: boolean): RegExp;
public parseConfig(config: AtomizerConfig, options?: CSSOptions): any;
public sortCSS(classNames: string[]): string[];
}
}