import { Editor } from '../../core/Editor.js'; /** * Generates a deterministic `_Toc`-prefixed bookmark name from a block ID. * * Uses percent-style encoding to produce a valid OOXML bookmark name that is * **injective** — no two distinct block IDs can produce the same output. * * Encoding rules (using `_` as escape character): * - Alphanumeric chars except `_` pass through unchanged * - `_` is escaped as `__` (escape-the-escape) * - Any other character is escaped as `_xx` (two-digit lowercase hex) * * Examples: * - `ba2b746a-930a-...` → `_Tocba2b746a_2d930a_2d...` * - `p-1` → `_Tocp_2d1` * - `p1` → `_Tocp1` (no collision with `p-1`) */ export declare function generateTocBookmarkName(blockId: string): string; /** * Ensures `_Toc` bookmarks exist around heading paragraphs referenced by * TOC entry hyperlinks. * * Call after the TOC content has been committed to the editor state. This * builds and dispatches a follow-up transaction that inserts any missing * `bookmarkStart` / `bookmarkEnd` pairs. * * Skips silently when: * - No sources require bookmarks * - All required bookmarks already exist * - The schema lacks bookmark node types (headless/test environments) */ export declare function syncTocBookmarks(editor: Editor, sources: Array<{ sdBlockId: string; }>): void; //# sourceMappingURL=toc-bookmark-sync.d.ts.map