/** * The parts of the mention model that are pure strings and offsets — no * ProseMirror. Kept in its own module so `PromptInput`'s root, its textarea and * the mention registry can share the vocabulary without pulling the editor * engine into their module graph. */ /** Attributes carried by a mention node. All of them survive serialization. */ export interface MentionAttrs { id: string; label: string; /** Entity kind — `"project"`, `"user"`, … */ type: string; /** The character that opened the menu this mention was picked from. */ trigger: string; } /** * A mention as it appears in a value change or a submitted message. Offsets * index into the derived plain text. */ export interface EditorMention extends MentionAttrs { start: number; end: number; } /** Cache key for the item store that backs a chip's icon, trailing and data. */ export declare function mentionKey(trigger: string, type: string, id: string): string; export declare function isTriggerCharacter(char: string): boolean; /** Serializes one mention — `@[label](type:id)`. */ export declare function serializeMention(attrs: MentionAttrs): string; /** * Drops whitespace at the document edges — including the space auto-inserted * after a chip — while leaving mentions alone, then re-bases the offsets. A * chip is never at an edge in the whitespace sense, so trimming can only ever * remove text. */ export declare function trimDetails(details: T): T; //# sourceMappingURL=mention.d.ts.map