1 | import postcss from 'postcss';
|
2 | import { ClassSymbol, ElementSymbol } from './stylable-meta';
|
3 | import { CSSResolve } from './stylable-resolver';
|
4 | export interface SelectorAstNode {
|
5 | type: string;
|
6 | name: string;
|
7 | nodes: SelectorAstNode[];
|
8 | content?: string;
|
9 | before?: string;
|
10 | value?: string;
|
11 | operator?: string;
|
12 | }
|
13 | export interface PseudoSelectorAstNode extends SelectorAstNode {
|
14 | type: 'pseudo-class';
|
15 | content: string;
|
16 | }
|
17 | export declare type Visitor = (node: SelectorAstNode, index: number, nodes: SelectorAstNode[]) => boolean | void;
|
18 | export declare function parseSelector(selector: string): SelectorAstNode;
|
19 | export declare function stringifySelector(ast: SelectorAstNode): string;
|
20 | export declare function traverseNode(node: SelectorAstNode, visitor: Visitor, index?: number, nodes?: SelectorAstNode[]): boolean | void;
|
21 | export declare function createChecker(types: Array<string | string[]>): () => (node: SelectorAstNode) => boolean;
|
22 | export declare function isGlobal(node: SelectorAstNode): boolean;
|
23 | export declare function isRootValid(ast: SelectorAstNode, rootName: string): boolean;
|
24 | export declare const createSimpleSelectorChecker: () => (node: SelectorAstNode) => boolean;
|
25 | export declare function isSimpleSelector(selectorAst: SelectorAstNode): boolean | void;
|
26 | export declare function isImport(ast: SelectorAstNode): boolean;
|
27 | export declare function matchAtKeyframes(selector: string): RegExpMatchArray | null;
|
28 | export declare function matchAtMedia(selector: string): RegExpMatchArray | null;
|
29 | export declare function isNodeMatch(nodeA: Partial<SelectorAstNode>, nodeB: Partial<SelectorAstNode>): boolean;
|
30 | export interface SelectorChunk {
|
31 | type: string;
|
32 | operator?: string;
|
33 | value?: string;
|
34 | nodes: Array<Partial<SelectorAstNode>>;
|
35 | }
|
36 | export interface SelectorChunk2 {
|
37 | type: string;
|
38 | operator?: string;
|
39 | value?: string;
|
40 | nodes: SelectorAstNode[];
|
41 | before?: string;
|
42 | }
|
43 | export declare function mergeChunks(chunks: SelectorChunk2[][]): any;
|
44 | export declare function separateChunks2(selectorNode: SelectorAstNode): SelectorChunk2[][];
|
45 | export declare function getOriginDefinition(resolved: Array<CSSResolve<ClassSymbol | ElementSymbol>>): CSSResolve<ClassSymbol | ElementSymbol>;
|
46 | export declare function separateChunks(selectorNode: SelectorAstNode): SelectorChunk[][];
|
47 | export declare function filterChunkNodesByType(chunk: SelectorChunk, typeOptions: string[]): Array<Partial<SelectorAstNode>>;
|
48 | export declare function matchSelectorTarget(sourceSelector: string, targetSelector: string): boolean;
|
49 | export declare function fixChunkOrdering(selectorNode: SelectorAstNode, prefixType: SelectorAstNode): void;
|
50 | export declare function isChildOfAtRule(rule: postcss.Container, atRuleName: string): boolean;
|
51 | export declare function isCompRoot(name: string): RegExpMatchArray | null;
|
52 | export declare function createWarningRule(extendedNode: string, scopedExtendedNode: string, extendedFile: string, extendingNode: string, scopedExtendingNode: string, extendingFile: string, useScoped?: boolean): postcss.Rule;
|
53 |
|
\ | No newline at end of file |