open-agreements
Version:
Open-source legal template filling CLI and library
29 lines • 1.54 kB
TypeScript
/**
* word/numbering.xml emitter.
*
* Each NumberingSpec compiles to one abstract definition plus one instance:
* the spec's string handle (`numId`) maps to sequential numeric ids assigned
* in declaration order, so identical specs always produce identical ids. The
* returned map is what lets paragraph `w:numPr` references bind to the
* numeric `w:numId` deterministically.
*
* Level children follow the CT_Lvl sequence (start, numFmt, suff, lvlText,
* lvlJc, pPr, rPr); level run properties reuse the shared rPr builder so a
* bullet glyph's font serializes exactly like body formatting would.
*
* @conformance ECMA-376 edition 5, Part 1 § 17.9.16
* @conformance ECMA-376 edition 5, Part 1 § 17.9.1
* @conformance ECMA-376 edition 5, Part 1 § 17.9.15
* @conformance ECMA-376 edition 5, Part 1 § 17.9.2
*/
import type { CompileContext } from '../context.js';
import type { DocumentSpec } from '../types.js';
import type { NumberingIdMap } from './emit-context.js';
export declare const NUMBERING_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml";
export declare const NUMBERING_REL_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering";
/**
* Emit word/numbering.xml when the spec declares numbering definitions.
* Returns the handle → numeric id map (empty when no part is emitted).
*/
export declare function emitNumberingPartIfNeeded(spec: DocumentSpec, ctx: CompileContext): NumberingIdMap;
//# sourceMappingURL=numbering-part.d.ts.map