import { MarkdownEditorComment, MarkdownTextChange } from './types'; /** * Comment threads hold a source range and the text it covered. * * Every edit maps the ranges: text typed at either edge stays outside the * thread, text typed inside it joins it, and the quote follows the edited * text. A range whose text was deleted collapses; it is then detached until * `anchorMarkdownComments` finds its quote again (the text was moved, or an * undo brought it back). */ /** The threads after `changes`, or null when none changed. `doc` is the document after them. */ export declare function mapMarkdownComments(comments: readonly MarkdownEditorComment[], changes: readonly MarkdownTextChange[], doc: string): MarkdownEditorComment[] | null; /** Whether the thread no longer covers any text. */ export declare function isCommentDetached(comment: Pick): boolean; /** * Checks stored ranges against `doc`, e.g. after the document was replaced * or threads were loaded: a range that no longer holds its quote moves to the * nearest copy of it, or collapses (detached). Null when nothing changed. */ export declare function anchorMarkdownComments(comments: readonly MarkdownEditorComment[], doc: string): MarkdownEditorComment[] | null;