kapom-report - v0.1.2
    Preparing search index...

    Interface RenderContext

    context during render — a block draws onto the doc; the cursor is managed by the engine

    interface RenderContext {
        advanceY: (amount: number) => void;
        contentBottom: number;
        contentTop: number;
        contentWidth: number;
        cursor: CursorState;
        doc: jsPDF;
        ensureSpace: (requiredHeight: number) => void;
        forcePageBreak: () => void;
        margins: PageMargins;
        numeric: NumericStrategy;
        syncCursor: (pageIndex: number, y: number) => void;
        theme: ResolvedTheme;
        typography: Typography;
    }
    Index
    advanceY: (amount: number) => void

    the engine handles page-breaks — a block calls this to advance y

    contentBottom: number

    bottom edge of the content area (above the reserved page-footer) — absolute Y

    contentTop: number

    top edge of the content area (below the reserved page-header) — absolute Y; a block that paginates itself (AutoTable) must use this to avoid drawing over a band

    contentWidth: number
    cursor: CursorState
    doc: jsPDF
    ensureSpace: (requiredHeight: number) => void
    forcePageBreak: () => void

    force a new page regardless of whether there's enough room left (unlike ensureSpace, which only breaks when there isn't enough space) — a no-op if the cursor is already at the top of a page (avoids stacking blank pages); used for the page-break policy between sections of a Composite Report

    margins: PageMargins
    syncCursor: (pageIndex: number, y: number) => void

    for a block that paginates across pages itself (e.g. AutoTable) — tells the engine which page/position the doc ended up at; pageIndex is 0-based and can't go backwards

    resolved colour scheme — table blocks read fills/on-fill text from here

    typography: Typography