import { Types } from '../libs'; /** * this match text before cursor, fired when cursor position changing * and the cursor adjacent the aims text at the same time * return attrs for creating ProseMirror.Schema.Node or ProseMirror.Schema.Mark */ declare type TextMatcherHandler = (match: RegExpExecArray, offset?: number, boundStatics?: { getStart: () => Types.BoundingStatic; getEnd: () => Types.BoundingStatic; }) => Types.StringMap | undefined | null | boolean; declare type ParseDOMMatcher = { tag: string; priority?: number; preserveWhitespace?: 'full' | undefined; getAttrs?(dom: HTMLElement): Partial | boolean | void; } | { style: string; priority?: number; preserveWhitespace?: 'full' | undefined; getAttrs?(dom: string): Partial | boolean | void; }; interface IMatcherConfig { name?: string; matcher: MatcherType; inputOnly?: boolean; handler?: HandlerType; timing?: 'enter' | 'input' | string; } export { IMatcherConfig, ParseDOMMatcher, TextMatcherHandler };