/**
 * Document-level "view as markdown source" toggle for a single editor.
 *
 * The editor is bound to a Byline form field that accumulates
 * `DocumentPatch[]`, so this hook is deliberate about persistence:
 *
 *  - While in markdown mode the surface is a single `CodeNode` of raw
 *    markdown text. `markdownModeRef` suppresses the editor's
 *    `OnChangePlugin` so none of those keystrokes reach the form.
 *  - A pure round-trip (WYSIWYG → markdown → WYSIWYG with no edits)
 *    restores the *exact* captured `EditorState` — identical serialized
 *    state, so the form sees no change and records **no patch**.
 *  - Edits made in markdown produce a single conversion back to rich
 *    nodes on exit, emitting one field value change → **one patch**.
 */
export declare function useMarkdownToggle(): {
    isMarkdown: boolean;
    toggleMarkdown: () => void;
};
