/** The patterns: a tile of shapes repeated over the ground. */ export type BackgroundPattern = "felt" | "grass" | "wood" | "ice" | "paper" | "grid" | "dots"; /** How a photograph fills the ground: `cover` fills it and cuts what overhangs, `contain` shows all of it, `stretch` fills it out of shape. */ export type BackgroundFit = "cover" | "contain" | "stretch"; /** A ground in full. Every part is optional; with none, there is no ground. */ export interface BackgroundOptions { /** A pattern drawn over the ground, in a low opacity. */ pattern?: BackgroundPattern; /** A colour under the pattern and the photograph (a hex colour, `rgb()`, `hsl()`, a name or `var(--name)`). Without it the ground keeps its own colour. */ color?: string; /** The opacity of the pattern, 0 to 1. Each pattern has its own subtle one. */ opacity?: number; /** The size of the pattern's tile, as a multiple of its usual one (a fortyeighth of the drawing's longer side). 1 by default; 0.25 to 8 are kept. */ scale?: number; /** A photograph behind the surface: an address or `data:` image, held to the rules of a team's `logo` (`safeLogo`). Drawn over the ground's colour and under the pattern. */ image?: string; /** The opacity of the photograph, 0 to 1. 0.35 by default. */ imageOpacity?: number; /** How the photograph fills the ground. `cover` by default. */ imageFit?: BackgroundFit; } /** A ground: a pattern's name, `"none"`, or the options in full. */ export type Background = BackgroundPattern | "none" | BackgroundOptions; /** The patterns, in the order a menu lists them. */ export declare const BACKGROUND_PATTERNS: readonly BackgroundPattern[]; /** The opacity each pattern is drawn at when `opacity` says nothing. */ export declare const BACKGROUND_OPACITY: Readonly>; /** The rules of a ground, written into a drawing that has one (and in `KYOGIJO_STYLE`, for a page that supplies the stylesheet): the pattern's ink and light. */ export declare const KYOGIJO_BACKGROUND_STYLE: string; /** The options of a ground, read: a name becomes a pattern, `"none"`, anything that is not a ground and a ground with nothing in it are `undefined`. */ export declare function resolveBackground(value: unknown): BackgroundOptions | undefined; /** What a ground is made of: the pieces to write in the drawing's `` and the shapes to lay over the apron. */ export interface BackgroundMarkup { defs: string; shapes: string; } /** * The ground as SVG: a rectangle `box` in the drawing's own numbers, filled with the colour, the photograph and the pattern, in that order, and the definitions they need * (a pattern and, for a photograph that overhangs, a clip), with ids that begin with `id`. The tile is a fortyeighth of the box's longer side, times `scale`, so that a ground * looks the same on a rink in feet and on a card in pixels. An empty string for each when there is no ground. */ export declare function backgroundMarkup(background: Background | undefined, box: { x: number; y: number; w: number; h: number; }, id: string): BackgroundMarkup; /** * A drawing's `base` with a ground laid on its apron: the base's first shape is the apron's rectangle, and the ground is written right after it, over exactly the same * rectangle, so that it lies under the surface and over the apron's colour. `defs` is what the ground needs in the drawing's ``. A base that does not begin with a * rectangle, or a ground with nothing in it, leaves the base as it is. */ export declare function laidOn(base: string, background: Background | undefined, id: string): { base: string; defs: string; };