import type { DecodedImage } from './mask.js'; /** * The pixels of a change sheet: a title, a label over each column, and under * them each window, before beside after, marked where they changed, with a * gutter between them that says which rows only moved. * * `change.ts` decides what is shown; this draws it. Nothing here reads an * alignment or a region, only rows, rectangles, colours and words. */ /** The colours of the sheet, exported so a test can find each part of it. */ export declare const CHANGE_COLOURS: { /** The before column's mark beside its label, and what changed on it. */ readonly before: readonly [207, 34, 46, 255]; /** The after column's mark beside its label, and what changed on it. */ readonly after: readonly [26, 127, 55, 255]; /** The gutter's mark beside rows that moved and did not change. */ readonly moved: readonly [9, 105, 218, 255]; /** Around and between the panels, the gutter included. */ readonly canvas: readonly [246, 248, 250, 255]; /** The line around each panel, so a white page and a dark one both read as a picture. */ readonly frame: readonly [208, 215, 222, 255]; /** The title and the column labels. */ readonly ink: readonly [31, 35, 40, 255]; /** Where each column came from, under the label's weight. */ readonly muted: readonly [89, 99, 110, 255]; /** The stripes opposite rows the other side does not have. */ readonly filler: readonly [readonly [234, 238, 242, 255], readonly [208, 215, 222, 255]]; }; /** * The sizes of a sheet whose panels are `panel` pixels wide. * * The comment column scales a wide sheet down, so everything grows with the * crop: at 1280 a two-pixel line would vanish on a phone, and a label set at a * page's own size would be a smudge. One unit, the label's size, sets the * rhythm: the margin around the sheet and the space between two windows are * that unit, and so is the space under the labels. * * `titled` reserves the line the subject's name is set on. */ export declare function changeLayout(panel: number, titled?: boolean): { stroke: number; gutter: number; frame: number; /** The label's size, and the margin around the sheet. */ unit: number; /** The title's size. */ title: number; /** From the sheet's top edge to the first window's first row. */ header: number; }; /** What a sheet says about itself: whose page, and where each side came from. */ export interface ChangeLabels { /** The subject the two pages are of. */ readonly subject?: string; /** Where the before page came from, set beside "Before": a baseline, a commit. */ readonly before?: string; /** Where the after page came from, set beside "After". */ readonly after?: string; } /** One row of a sheet: the before row and the after row shown on it, `-1` for filler. */ export interface SheetRow { readonly before: number; readonly after: number; } /** A rectangle on one panel, in sheet rows and panel columns, end-exclusive. */ export interface Mark { readonly side: 'before' | 'after'; readonly top: number; readonly bottom: number; readonly left: number; readonly right: number; } /** Sheet rows that moved, and which way. */ export interface Moved { readonly top: number; readonly bottom: number; readonly down: boolean; } /** Sheet rows a gap grew by, end-exclusive; `top === bottom` where a gap shrank. */ export interface Gap { readonly top: number; readonly bottom: number; } /** One window: before and after, columns `left` to `right`, side by side. */ export declare function drawWindow(was: DecodedImage, now: DecodedImage, left: number, right: number, rows: readonly SheetRow[], marks: readonly Mark[], moved: readonly Moved[], gaps?: readonly Gap[]): DecodedImage; /** * The sheet: the windows one under another, every one the same width, on a * canvas with a margin all round, each panel framed, under a label per column * and, when there is one, the subject's name. */ export declare function composeSheet(windows: readonly DecodedImage[], panel: number, labels?: ChangeLabels): DecodedImage; //# sourceMappingURL=change-draw.d.ts.map