import Keymap from 'browserkeymap'; import { Plugin, ProseMirror, Schema } from '../../prosemirror'; import { MentionNodeType, MentionQueryMarkType } from '../../schema'; export declare type StateChangeHandler = (state: MentionsPluginState) => any; export declare class MentionsPluginState { private pm; private hasKeymap; private changeHandlers; query?: string; queryActive: boolean; anchorElement?: HTMLElement; keymap: Keymap; onSelectPrevious: () => void; onSelectNext: () => void; onSelectCurrent: () => void; constructor(pm: PM); private update(); dismiss(): void; findMentionQueryMark(): { start: number; end: number; }; insertMention(mentionData?: Mention): void; subscribe(cb: StateChangeHandler): void; unsubscribe(cb: StateChangeHandler): void; } declare var _default: Plugin; export default _default; export interface Mention { name: string; mentionName: string; id: string; } export interface S extends Schema { nodes: { mention?: MentionNodeType; }; marks: { mention_query: MentionQueryMarkType; }; } export interface PM extends ProseMirror { schema: S; }