@stylable/core
Version:
CSS for Components
25 lines • 2.01 kB
TypeScript
import postcss from 'postcss';
import { Diagnostics } from './diagnostics';
import { DeclStylableProps, Imported, SDecl, StylableMeta, StylableSymbol } from './stylable-processor';
import { SelectorAstNode } from './selector-utils';
import { ImportSymbol } from './stylable-meta';
export declare const CUSTOM_SELECTOR_RE: RegExp;
export declare function isValidDeclaration(decl: postcss.Declaration): boolean;
export declare function expandCustomSelectors(rule: postcss.Rule, customSelectors: Record<string, string>, diagnostics?: Diagnostics): string;
export declare function transformMatchesOnRule(rule: postcss.Rule, lineBreak: boolean): string;
export declare function scopeSelector(scopeSelectorRule: string, targetSelectorRule: string, rootScopeLevel?: boolean): {
selector: string;
selectorAst: SelectorAstNode;
};
export declare function mergeRules(mixinAst: postcss.Root, rule: postcss.Rule): postcss.Rule;
export declare function createSubsetAst<T extends postcss.Root | postcss.AtRule>(root: postcss.Root | postcss.AtRule, selectorPrefix: string, mixinTarget?: T, isRoot?: boolean): T;
export declare function removeUnusedRules(ast: postcss.Root, meta: StylableMeta, _import: Imported, usedFiles: string[], resolvePath: (ctx: string, path: string) => string): void;
export declare function findDeclaration(importNode: Imported, test: any): postcss.Declaration;
export declare function findRule(root: postcss.Root, selector: string, test?: any): null | postcss.Declaration;
export declare function getDeclStylable(decl: SDecl): DeclStylableProps;
export declare function getSourcePath(root: postcss.Root, diagnostics: Diagnostics): string;
export declare function getAlias(symbol: StylableSymbol): ImportSymbol | undefined;
export declare function generateScopedCSSVar(namespace: string, varName: string): string;
export declare function isCSSVarProp(value: string): boolean;
export declare function isValidClassName(className: string): boolean;
//# sourceMappingURL=stylable-utils.d.ts.map