import "./frames.providers.ts"; import { type Surface } from "./surfaces/surface.ts"; import type { Box, Language, SurfaceOptions } from "./types.ts"; /** * The sentences a range adds to a drawing's description: what is shown, and, when the drawing has data, that data outside it is not drawn. Empty without a range. */ export declare function describeRange(o: Pick, language: Language, hasData: boolean): string; /** The part of a drawing's `range` that is a name or "custom", for the root's `data-range`. */ export declare function rangeLabel(o: Pick): string | undefined; /** What the margin and the panel of a score ask of the crop. */ export interface CropOptions { /** A prefix for ids. */ id: string; /** The ground the annotations need all round the part that is shown, in feet; the cut's own when missing. */ margin?: number; /** True when the drawing has its score's panel on the surface, which must then fit in what is shown. */ panel: boolean; } /** * Crop a surface to the range the options ask for. The surface's view becomes the range with a small margin (the surface's own ground where the range reaches its edge, a little * beyond the line where it is cut), `box` the part of the playing surface that is shown (`whole` the playing surface), and, when the annotations ask for room, the ground beyond the cut * is the apron's and the surface is clipped to the range. A score's panel is moved into what is shown and made smaller if it needs to be; when it would be too small, `plateFits` says * false and the caller draws the score as a strip. A curling sheet is cropped by its own builder (`sheet.show`), and its named ranges are that. * @throws RangeError when the range lies wholly outside the drawing. */ export declare function cropToRange(surface: Surface, o: Pick, crop: CropOptions): Surface; /** True when a team's place (a banner's) is in the part of the drawing that is shown: always without a range. */ export declare function shows(surface: Surface, zone: { cx: number; cy: number; }): boolean; /** The part of the playing surface that is shown, in feet in the drawing's frame, when the drawing is cropped to a range; `undefined` when it is not. */ export declare function shownBox(surface: Surface): Box | undefined;