/** * The box of a task-list item (`- [ ]`, `- [x]`) as the engine draws it * (#765). Up to postext 1.28 the box was the character ☐ (☑ when ticked) * set in the list's face; no text face holds it, so the browser took it * from a font of the system and the PDF from whatever the face answered, * and its width, which the item's text starts after, was another on every * machine. The engine now draws it: a square outline, with a tick when * the item is done, the same on the canvas, in the PDF, in the HTML and in * the EPUB, and its room is worked out with no font. * * The square's side is {@link TASK_BOX_SIDE_EM} of the marker's size (the * list level's `fontSize`) and that is all the room it takes: the list's * `gap` comes after it. It is centred on the marker's `bulletY`, as a * bullet is, so at the text's own size it stands on the first line's * baseline. Its outline is drawn inside the square, as heavy as the * level's `fontWeight` asks ({@link taskBoxSize}); the tick has the same * stroke, with round ends. */ /** The side of the box, in ems of the marker's size. */ export declare const TASK_BOX_SIDE_EM = 0.6; /** The tick of a ticked box: its three points in units of the side, from * the box's top left corner, y down. */ export declare const TASK_BOX_TICK: ReadonlyArray; /** The side and the stroke (px) of the box of a marker `markerSizePx` * large in a level of weight `fontWeight`: the stroke is a tenth of the * side at 700, the default weight of a bullet, lighter and heavier with * the weight, and never under a twentieth. */ export declare function taskBoxSize(markerSizePx: number, fontWeight: number): { side: number; stroke: number; }; /** Whether a task item's box is drawn: `char`, the character the list * settings give its state, is the default one (☐, or ☑ when `checked`). * Any other character is the author's own and is set as text. */ export declare function isDrawnTaskBox(char: string, checked: boolean): boolean; /** The character a drawn box stands for: what assistive technology reads * and a copy takes. */ export declare function taskBoxText(checked: boolean): string; /** * The tick's points (px) from the centre of a box of `side`, in the axes * of the flow it is painted in, y down. A tick reads the same on every * page, so in a flow the sheet shows turned or mirrored its points are * turned or mirrored back: `'vertical'` for the flow of a vertical page * (a quarter turn clockwise on the sheet), `'mirrored'` for the flow of a * right-to-left page (turned over the sheet's vertical axis). */ export declare function taskBoxTick(side: number, flow?: 'vertical' | 'mirrored'): Array<[number, number]>; /** * The box as the content of an ``, painted in * `currentColor`: the outline inside the square and, when `checked`, the * tick. `strokeRatio` is the stroke over the side; `flow` as in * {@link taskBoxTick}. */ export declare function taskBoxSvgBody(strokeRatio: number, checked: boolean, flow?: 'vertical' | 'mirrored'): string; //# sourceMappingURL=taskBox.d.ts.map