import type { Match } from 'linkify-it';
import type Token from 'markdown-it/lib/token';
import type { Node } from 'prosemirror-model';
export interface Parser {
    /** Parse raw markup to prosemirror's root node */
    parse(markup: string): Node;
    validateLink(url: string): boolean;
    normalizeLink(url: string): string;
    normalizeLinkText(url: string): string;
    matchLinks(text: string): Readonly<Match>[] | null;
}
export interface ParserToken {
    name: string;
    type: 'node' | 'block' | 'mark';
    attrs?: {
        [name: string]: unknown;
    };
    getAttrs?: (token: Token, tokens: Token[], index: number) => NonNullable<ParserToken['attrs']>;
    noCloseToken?: boolean;
    ignore?: boolean;
    code?: boolean;
    /** only for tokens with type=block */
    prepareContent?: (content: string) => string;
    /**
     * only for tokens with type=block and noCloseToken=true
     * @default 'content'
     */
    contentField?: 'content' | 'children';
}
