open-agreements
Version:
Open-source legal template filling CLI and library
24 lines • 1.2 kB
TypeScript
/**
* word/document.xml emitter.
*
* Builds the main document part from a namespace-declaring skeleton: the
* skeleton string carries every namespace the part uses on the root element,
* and all children are created through the namespace-safe DOM helpers.
* xmldom's serializer omits the XML declaration, so it is prepended here;
* the structural validator asserts every part starts with one.
*/
import type { DocumentSpec } from '../types.js';
import type { BlockEmitContext } from './emit-context.js';
import { type SectionHeaderFooterRefs } from './section.js';
/**
* Compile the body: each section's blocks in order. Every non-final section
* ends with a dedicated break paragraph whose pPr contains only that
* section's sectPr (what Word itself emits on Insert → Section Break; it
* also sidesteps the trailing-table case), and the final section's
* properties bind as the body's last child.
*
* @conformance ECMA-376 edition 5, Part 1 § 17.6.18
* @conformance ECMA-376 edition 5, Part 1 § 17.6.17
*/
export declare function emitDocumentPart(spec: DocumentSpec, refs?: SectionHeaderFooterRefs[], ctx?: BlockEmitContext): string;
//# sourceMappingURL=document-part.d.ts.map