import { MarkdownEmoji } from './emoji'; import { RichSurface } from './rich-surface'; import { MarkdownEditorSelection } from './types'; /** * `:shortcode` completion on the rich surface. The source mode completes * through CodeMirror's own autocompletion. */ export interface MarkdownSuggestOptions { /** The rich surface, while completion applies to it: active, editable, emoji on. */ surface: () => RichSurface | null; /** The element the list is anchored in. */ page: () => HTMLElement | null; track: (selection: MarkdownEditorSelection) => MarkdownEditorSelection; untrack: (range: MarkdownEditorSelection) => void; /** Asks for the emoji index, which loads on first use. */ load: () => void; /** The list's anchor moved. */ reposition: () => void; } interface SuggestState { /** The `:query` being completed, kept in step with edits. */ range: MarkdownEditorSelection; query: string; items: MarkdownEmoji[]; active: number; } export declare function useMarkdownSuggest(options: MarkdownSuggestOptions): { suggest: import('vue').ShallowRef; open: import('vue').WritableComputedRef; reference: import('vue').Raw<{ getBoundingClientRect: () => DOMRect; }>; close: () => void; update: (typed: boolean) => void; keydown: (event: KeyboardEvent) => boolean; pick: (position: number) => void; hover: (position: number) => void; }; export {};