import { Ref } from 'vue'; import { EditorCommentMark } from './editor-overlay'; import { MarkdownEditorComment, MarkdownEditorCommentReply, MarkdownEditorSelection, MarkdownEditorUser } from './types'; /** * Comment threads: writing, answering, resolving and deleting them, which one * is active, and the highlights they draw. Their ranges belong to the * document, which moves them with every change. */ export interface MarkdownCommentsOptions { enabled: () => boolean; /** Threads can be read, not changed. */ locked: () => boolean; user: () => MarkdownEditorUser; threads: Readonly>; setThreads: (next: MarkdownEditorComment[]) => void; doc: () => string; /** The text a new comment is being written about. */ pending: () => MarkdownEditorSelection | null; reveal: (pos: number) => void; events: { create: (comment: MarkdownEditorComment) => void; reply: (comment: MarkdownEditorComment, reply: MarkdownEditorCommentReply) => void; resolve: (comment: MarkdownEditorComment) => void; delete: (comment: MarkdownEditorComment) => void; }; } export declare function useMarkdownComments(options: MarkdownCommentsOptions): { activeThread: Ref; sidebarOpen: Ref; openCount: import('vue').ComputedRef; marks: () => EditorCommentMark[]; create: (selection: MarkdownEditorSelection, body: string) => MarkdownEditorComment | null; reply: (id: string, body: string) => void; resolve: (id: string, resolved: boolean) => void; remove: (id: string) => void; activate: (id: string) => void; followCaret: (selection: MarkdownEditorSelection) => void; openAt: (caret: MarkdownEditorSelection) => void; };