import type { ParagraphChild } from 'docx'; import { type WorkDocumentContentControlProperties } from './work-document-content-control'; export interface DocxContentControlPatch { startMarker: string; endMarker: string; properties: WorkDocumentContentControlProperties; } export interface DocxContentControlMarkerRegistration { startMarker: string; endMarker: string; } /** Collects native content-control patches while the docx package is built. */ export declare class DocxContentControlPatchCollector { readonly patches: DocxContentControlPatch[]; private nextMarker; register(properties: WorkDocumentContentControlProperties): DocxContentControlMarkerRegistration; } export declare function docxContentControlRuns(element: HTMLElement, docx: typeof import('docx'), collector: DocxContentControlPatchCollector, children: ParagraphChild[]): ParagraphChild[]; /** * Replaces generated marker runs with native inline `w:sdt` controls in every * Word story. The patcher is intentionally conservative: a marker pair must * be in one paragraph and may contain only generated runs. */ export declare function patchDocxContentControls(buffer: ArrayBuffer, patches: readonly DocxContentControlPatch[]): Promise;