import { EditorState } from '@milkdown/kit/prose/state'; import { Ctx } from '@milkdown/kit/ctx'; import { EditorView } from '@milkdown/kit/prose/view'; import { MentionCandidate, MentionProvider } from '../core/types'; /** `@query` at line/block start; capture group is the query (may be empty). */ export declare const MENTION_TRIGGER: RegExp; /** When caret is in `@query`, returns range to replace and the query text; otherwise null. */ export declare function findMentionTrigger(state: EditorState): { from: number; to: number; query: string; } | null; /** Replaces `@…` trigger range with a mention atom; ref id lives in `extra[refAttr]`. */ export declare function insertMentionInView(view: EditorView, from: number, to: number, candidate: MentionCandidate, provider: MentionProvider): boolean; /** Same as `insertMentionInView` using the editor view from Milkdown ctx. */ export declare function insertMention(ctx: Ctx, from: number, to: number, candidate: MentionCandidate, provider: MentionProvider): void;