1 | import postcss from 'postcss';
|
2 | import { Diagnostics } from './diagnostics';
|
3 | import { ParsedValue, StateParsedValue } from './types';
|
4 | export declare const valueParserWarnings: {
|
5 | VALUE_CANNOT_BE_STRING(): string;
|
6 | CSS_MIXIN_FORCE_NAMED_PARAMS(): string;
|
7 | };
|
8 | export interface MappedStates {
|
9 | [s: string]: StateParsedValue | string | null;
|
10 | }
|
11 | export interface TypedClass {
|
12 | '-st-root'?: boolean;
|
13 | '-st-states'?: string[] | MappedStates;
|
14 | '-st-extends'?: string;
|
15 | }
|
16 | export interface MixinValue {
|
17 | type: string;
|
18 | options: Array<{
|
19 | value: string;
|
20 | }> | Record<string, string>;
|
21 | }
|
22 | export interface ArgValue {
|
23 | type: string;
|
24 | value: string;
|
25 | }
|
26 | export interface ExtendsValue {
|
27 | symbolName: string;
|
28 | args: ArgValue[][] | null;
|
29 | }
|
30 | export declare type ReportWarning = (message: string, options?: {
|
31 | word: string;
|
32 | }) => void;
|
33 | export declare const rootValueMapping: {
|
34 | vars: ":vars";
|
35 | import: ":import";
|
36 | stScope: "st-scope";
|
37 | namespace: "namespace";
|
38 | };
|
39 | export declare const valueMapping: {
|
40 | from: "-st-from";
|
41 | named: "-st-named";
|
42 | default: "-st-default";
|
43 | root: "-st-root";
|
44 | states: "-st-states";
|
45 | extends: "-st-extends";
|
46 | mixin: "-st-mixin";
|
47 | global: "-st-global";
|
48 | };
|
49 | export declare type stKeys = keyof typeof valueMapping;
|
50 | export declare const stValues: string[];
|
51 | export declare const stValuesMap: Record<string, boolean>;
|
52 | export declare const STYLABLE_VALUE_MATCHER: RegExp;
|
53 | export declare const STYLABLE_NAMED_MATCHER: RegExp;
|
54 | export declare const SBTypesParsers: {
|
55 | '-st-root'(value: string): boolean;
|
56 | '-st-global'(decl: postcss.Declaration, _diagnostics: Diagnostics): any;
|
57 | '-st-states'(value: string, decl: postcss.Declaration, diagnostics: Diagnostics): MappedStates;
|
58 | '-st-extends'(value: string): {
|
59 | ast: any;
|
60 | types: ExtendsValue[];
|
61 | };
|
62 | '-st-named'(value: string): {
|
63 | [key: string]: string;
|
64 | };
|
65 | '-st-mixin'(mixinNode: postcss.Declaration, strategy: (type: string) => 'named' | 'args', diagnostics?: Diagnostics | undefined): {
|
66 | type: string;
|
67 | options: Array<{
|
68 | value: string;
|
69 | }> | Record<string, string>;
|
70 | }[];
|
71 | };
|
72 | export declare function getNamedArgs(node: ParsedValue): ParsedValue[][];
|
73 | export declare function getFormatterArgs(node: ParsedValue, allowComments?: boolean, _reportWarning?: ReportWarning, perserveQuotes?: boolean): string[];
|
74 | export declare function getStringValue(nodes: ParsedValue | ParsedValue[]): string;
|
75 | export declare function groupValues(nodes: any[], divType?: string): any[];
|
76 | export declare const strategies: {
|
77 | named: (node: any, reportWarning?: ReportWarning | undefined) => Record<string, string>;
|
78 | args: (node: any, reportWarning?: ReportWarning | undefined) => {
|
79 | value: string;
|
80 | }[];
|
81 | };
|
82 | export declare function listOptions(node: any): any[];
|
83 | export declare function validateAllowedNodesUntil(node: ParsedValue, i: number, untilType?: string, allowed?: string[]): boolean;
|
84 |
|
\ | No newline at end of file |