import { EditorPeerMark } from './editor-overlay'; import { MarkdownEditorCollaboration, MarkdownEditorPresence, MarkdownTextChange } from './types'; /** * The editor's side of a collaboration session: the subscription, the peers' * carets and the throttled presence. * * A peer's selection arrives relative to the document it was sent against, and * the text keeps moving under it until the next update — so every applied * change, local or remote, maps the stored selections along. A caret shows its * name tag for a moment after it moves. */ export interface MarkdownCollaborationOptions { collaboration: () => MarkdownEditorCollaboration | undefined; /** Remote changes, relative to the current document. */ onRemote: (changes: MarkdownTextChange[]) => void; presence: () => MarkdownEditorPresence; } export declare function useMarkdownCollaboration(options: MarkdownCollaborationOptions): { peers: import('vue').ComputedRef<{ color: string; selection?: import('./types').MarkdownEditorSelection | null; mode?: import('./types').MarkdownEditorMode; id: string; name: string; avatar?: string; }[]>; marks: import('vue').ComputedRef; start: (collaboration: MarkdownEditorCollaboration | undefined) => void; send: (changes: MarkdownTextChange[]) => void; mapPeers: (changes: readonly MarkdownTextChange[]) => void; presenceChanged: () => void; };