export interface EmojiShortcode { name: string; emoji: string; } /** The `:shortcode` being typed: the word that ends at `caret` and opens with a colon, with * at least two characters after it and no closing colon yet. A caret inside a word reads as * editing it, not typing it, so it offers nothing. */ export declare function typingShortcode(text: string, caret: number): { query: string; start: number; } | null; /** The shortcodes for `query`: names that start with it before names that only contain it, * and the shorter first within each, so `ey` leads with `eye` rather than a long name that * merely holds it. */ export declare function emojiMatches(query: string): EmojiShortcode[]; /** `text` with what was typed from `start` to `caret` replaced by `emoji` and a space, unless * one already follows, and the caret after them. */ export declare function insertEmoji(text: string, start: number, caret: number, emoji: string): { text: string; caret: number; }; /** When `next` is `previous` with one colon typed before `caret`, and that colon closes a known * `:shortcode:`, the text with the emoji in its place and the caret just after it. Text that * arrives in one piece, such as a paste, stays as written. */ export declare function closeShortcode(previous: string, next: string, caret: number): { text: string; caret: number; } | null;