open-agreements
Version:
Open-source legal template filling CLI and library
37 lines • 1.64 kB
TypeScript
import type { DocumentViewNode, ToonCommentMarkerMap } from './document_view-types.js';
/**
* Format a single toon data line for one DocumentViewNode.
* Handles table-context-aware style (th/td) and header stripping.
*/
export declare function formatToonDataLine(n: DocumentViewNode, options?: {
compact?: boolean;
commentMarkers?: ToonCommentMarkerMap;
}): string;
/**
* Collect table marker info (dimensions) from nodes for #TABLE markers.
* Column headers are NOT included in the marker — they appear once in the th() rows.
*/
export declare function collectTableMarkerInfo(nodes: readonly Pick<DocumentViewNode, 'table_context'>[]): Map<number, {
id: string;
totalRows: number;
totalCols: number;
}>;
/**
* Format a #TABLE marker line from collected table info.
* Headers are omitted — they appear exactly once in the th(0,N) data rows.
*/
export declare function formatTableMarker(info: {
id: string;
totalRows: number;
totalCols: number;
}): string;
export declare function formatToonCommentLines(node: Pick<DocumentViewNode, 'id' | 'comments'>): string[];
export declare function formatToonCommentEndnoteLines(node: Pick<DocumentViewNode, 'id' | 'comments'>): string[];
export declare function formatToonCommentsEndnotesBlock(nodes: readonly Pick<DocumentViewNode, 'id' | 'comments'>[]): string[];
export declare function renderToon(nodes: DocumentViewNode[], options?: {
compact?: boolean;
}): string;
export declare function renderToonWithCommentEndnotes(nodes: DocumentViewNode[], options?: {
compact?: boolean;
}): string;
//# sourceMappingURL=document_view-toon.d.ts.map