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