import type { JudgingOptions } from "./judging.types.ts"; /** The paper sizes, in millimetres (ISO 216 for A4, ANSI for US letter), portrait. */ export declare const JUDGING_PAPER: Readonly<{ a4: Readonly<{ name: "A4"; width: 210; height: 297; }>; letter: Readonly<{ name: "US letter"; width: 215.9; height: 279.4; }>; }>; /** What a printout is asked for: the paper, how it lies and the margin all round, in millimetres. */ export interface JudgingPrintOptions { /** `a4` (the default) or `letter`. */ paper?: keyof typeof JUDGING_PAPER; /** `portrait` (the default: the plan above the chart) or `landscape` (the chart beside the plan). */ orientation?: "portrait" | "landscape"; /** The margin on all four sides, 5 to 30 mm (12 by default). */ margin?: number; } /** * The stylesheet of a printout: the `@page` rule (the paper's name, how it lies and the margin), a page break after every sheet but the last, and each sheet as tall as the printable area less a millimetre (a sheet exactly as * tall as the page makes some browsers print a blank page after it). The colours are kept as they are on paper (`print-color-adjust`). * @example * ```ts * import { judgingPrintStyle } from "@johnmorrisdotca/kyogijo-stadiums/judging"; * console.log(judgingPrintStyle({ paper: "letter" }).includes("size:Letter portrait")); * // true * ``` */ export declare function judgingPrintStyle(print?: JudgingPrintOptions): string; /** * The pages of a printout as markup: one `
` for each mat (all of them, or the one `mat` names), each holding that mat's picture in the plan-and-chart layout, light, and held to the page's * shape (portrait or landscape). The picture is anchored at the top of its page and scaled as a whole, so no type in it is stretched. Add `judgingPrintStyle` for the pages to be what is printed. * @example * ```ts * import { judgingPrintSheets } from "@johnmorrisdotca/kyogijo-stadiums/judging"; * const html = judgingPrintSheets({ style: "kata", mats: [{ officials: [{ seat: 1, name: "Aiko Mori", id: "J-1042" }] }, {}] }); * console.log(html.split("ky-ju-sheet\"").length - 1); * // 2 * ``` */ export declare function judgingPrintSheets(options: JudgingOptions, print?: JudgingPrintOptions): string; /** * A whole HTML document to print or save as a PDF: the pages (`judgingPrintSheets`) under the printout's stylesheet, which on a screen shows each sheet as a page of the paper laid on a grey desk. Open it in a browser and * print; choose "Save as PDF" for a file. Nothing in it is fetched. * @example * ```ts * import { judgingPrint } from "@johnmorrisdotca/kyogijo-stadiums/judging"; * const html = judgingPrint({ style: "kata", mats: [{ label: "Mat 1", officials: [{ seat: 1, name: "Aiko Mori", id: "J-1042" }] }] }, { paper: "letter" }); * console.log(html.startsWith(""), html.includes("size:Letter portrait")); * // true true * ``` */ export declare function judgingPrint(options: JudgingOptions, print?: JudgingPrintOptions): string;