import { SelectorList } from '@tokey/css-selector-parser'; import type * as postcss from 'postcss'; export * from './create-forcestate-matchers'; export declare const OVERRIDE_STATE_PREFIX = "stylable-force-state-"; export declare const MATCH_STATE_CLASS: RegExp; export declare const MATCH_STATE_ATTR: RegExp; export declare function createDataAttr(dataAttrPrefix: string, stateName: string, param?: string): string; /** * * @param targetAst - target ast to transform * @param namespaceMapping - known namespaces (use to detect framework specific namespaces like Stylable) * @param dataPrefix - prefix for the data attribute * @param plugin - plugin to override the context */ export declare function applyStylableForceStateSelectors(targetAst: postcss.Root, namespaceMapping?: Record | ((namespace: string) => boolean), dataPrefix?: string, plugin?: (ctx: AddForceStateSelectorsContext) => AddForceStateSelectorsContext): Record; export interface AddForceStateSelectorsContext { getForceStateAttrContentFromNative(name: string): string; getForceStateAttrContent(name: string): string; getStateClassName(content: string): string; getStateAttr(content: string): string; isStateClassName(content: string): boolean; isStateAttr(content: string): boolean; onMapping(key: string, value: string): void; } /** * adds force state selectors to the entire ast * @param targetAst - target ast to transform * @param context - context to use for the transformation */ export declare function addForceStateSelectors(targetAst: postcss.Root, context: AddForceStateSelectorsContext): void; /** * creates a context to share across the transformation of addForceStateSelectors * @param dataPrefix - prefix for the data attribute * @param namespaceMapping - known namespaces (use to detect framework specific namespaces like Stylable) * @param mapping - mapping of the original state to the override state * @param plugin - plugin to override the context */ export declare function createForceStatesContext(dataPrefix: string, namespaceMapping: Record | ((namespace: string) => boolean), mapping: Record, plugin: (ctx: AddForceStateSelectorsContext) => AddForceStateSelectorsContext): AddForceStateSelectorsContext; /** * * @param selectorAst - selector ast to override * @param context - context to use for the transformation * @param rule - optional rule to update the selector on (if not provided only the selector ast will be mutated) */ export declare function mutateWithForceStates(selectorAst: SelectorList, context: AddForceStateSelectorsContext, rule?: postcss.Rule): void; //# sourceMappingURL=stylable-forcestates-plugin.d.ts.map