import postcss from 'postcss'; import { ClassSymbol, ElementSymbol } from './stylable-meta'; import { CSSResolve } from './stylable-resolver'; export interface SelectorAstNode { type: string; name: string; nodes: SelectorAstNode[]; content?: string; before?: string; value?: string; operator?: string; } export interface PseudoSelectorAstNode extends SelectorAstNode { type: 'pseudo-class'; content: string; } export declare type Visitor = (node: SelectorAstNode, index: number, nodes: SelectorAstNode[]) => boolean | void; export declare function parseSelector(selector: string): SelectorAstNode; export declare function stringifySelector(ast: SelectorAstNode): string; export declare function traverseNode(node: SelectorAstNode, visitor: Visitor, index?: number, nodes?: SelectorAstNode[]): boolean | void; export declare function createChecker(types: Array): () => (node: SelectorAstNode) => boolean; export declare function isGlobal(node: SelectorAstNode): boolean; export declare function isRootValid(ast: SelectorAstNode, rootName: string): boolean; export declare const createSimpleSelectorChecker: () => (node: SelectorAstNode) => boolean; export declare function isSimpleSelector(selectorAst: SelectorAstNode): boolean | void; export declare function isImport(ast: SelectorAstNode): boolean; export declare function matchAtKeyframes(selector: string): RegExpMatchArray | null; export declare function matchAtMedia(selector: string): RegExpMatchArray | null; export declare function isNodeMatch(nodeA: Partial, nodeB: Partial): boolean; export interface SelectorChunk { type: string; operator?: string; value?: string; nodes: Array>; } export interface SelectorChunk2 { type: string; operator?: string; value?: string; nodes: SelectorAstNode[]; before?: string; } export declare function mergeChunks(chunks: SelectorChunk2[][]): any; export declare function separateChunks2(selectorNode: SelectorAstNode): SelectorChunk2[][]; export declare function getOriginDefinition(resolved: Array>): CSSResolve; export declare function separateChunks(selectorNode: SelectorAstNode): SelectorChunk[][]; export declare function filterChunkNodesByType(chunk: SelectorChunk, typeOptions: string[]): Array>; export declare function matchSelectorTarget(sourceSelector: string, targetSelector: string): boolean; export declare function fixChunkOrdering(selectorNode: SelectorAstNode, prefixType: SelectorAstNode): void; export declare function isChildOfAtRule(rule: postcss.Container, atRuleName: string): boolean; export declare function isCompRoot(name: string): RegExpMatchArray | null; export declare function createWarningRule(extendedNode: string, scopedExtendedNode: string, extendedFile: string, extendingNode: string, scopedExtendingNode: string, extendingFile: string, useScoped?: boolean): postcss.Rule; //# sourceMappingURL=selector-utils.d.ts.map