import { FlowDoc } from '../core/ir/flow.js'; import { Loss } from '../core/ir/loss.js'; import { SheetDoc } from '../core/ir/sheet.js'; /** * Projection knobs (E-SHEET W9). */ export interface ProjectSheetOptions { /** * The injected reference date that drives conditional-format `timePeriod` * windows and `TODAY()`/`NOW()` in `expression` rules. Omitted ⇒ those * clock-relative constructs no-op, so the projection stays deterministic and * byte-identical to before. */ readonly now?: Date; /** * Sink the projection writes its {@link Loss} entries into — the print * model's defence-in-depth caps (grid size, per-sheet text budget, sparkline * range) fire on pathological input, and a cap that fires without saying so * is a silent wrongness. {@link readXlsx} always supplies one and returns it * as the read result's loss report; omitted ⇒ the caps still apply but go * unreported. */ readonly losses?: Array; /** * Width of a digit in the font the document will actually be rendered in, at * the workbook's default size, in points. * * §18.3.1.13 measures a column in Maximum Digit Widths of the workbook's own * default font — the unit is a property of the font, not a constant. Laying * columns out in one font's digit and then drawing the text in another makes * every column the wrong width for its contents: with Calibri's 5.25 pt * assumed and Roboto's 6.18 pt drawn, a column holds a sixth less than the * file says, and the text that does not fit is clipped away. * * Omitted ⇒ Excel's own 7 px, which is right only if the render font matches * the workbook's. */ readonly digitWidthPt?: number; /** * §18.3.1.34 `&F` — the workbook's file name, for a header or footer that * prints it. The reader takes bytes and cannot know it, so the caller * supplies it; absent, the code is dropped exactly as before. */ readonly fileName?: string; /** * Open each printed sheet with a heading carrying its NAME. * * Off by default, and deliberately: a printed page shows no tab name — Excel * and Calc both emit it nowhere — so the paginated targets must not see one. * A flowed target has no pages to tell one sheet from the next by, and a * workbook rendered without them is a pile of tables with nothing to say * which is which; markdown asks for this, and gets `# Sheet1`. */ readonly sheetHeadings?: boolean; } /** * Project a {@link SheetDoc} into a {@link FlowDoc} (E-SHEET SA2): each grid sheet * becomes flow blocks (a table + chart/picture/shape/slicer frames, then comment * / control listings), with sheets after the first starting on a new page. Each * sheet gets its own section — its page geometry and its own header/footer. * * @param sheet The SpreadsheetML IR tree. * @param options Projection knobs (the W9 reference date). * @returns The format-neutral flow document the render path consumes. */ export declare function projectSheetDoc(sheet: SheetDoc, options?: ProjectSheetOptions): FlowDoc;