import type { LookName, Sport } from "./types.ts"; /** The parts of a palette, each a custom property of the stylesheet. */ export type PaletteKey = "ink" | "line" | "apron" | "surface" | "alt" | "zone" | "boards" | "red" | "blue" | "dirt" | "foul" | "infield" | "crease" | "key" | "court" | "post" | "pylon" | "rgo" | "rgm" | "rgi" | "rgb" | "hog" | "hack" | "fgz" | "pebble" | "free" | "net" | "area" | "ropeg" | "ropeb" | "ropey" | "roper" | "ropew" | "pad" | "block" | "track" | "sand" | "mat" | "water" | "concrete" | "trackpad" | "markY" | "markB" | "markG" | "markR"; /** Colours by part. */ export type Palette = Partial>; /** The surfaces that are painted alike: football's three fields are one. */ export type Group = "football" | "nhl" | "nba" | "mlb" | "soccer" | "curling" | "net" | "pool" | "athletics"; /** One mode of a look: a palette for every sport, and what a group of sports changes in it. */ export interface Mode { base: Palette; groups?: Partial>; } /** A named look. */ export interface Look { /** What it is for, in a sentence. */ about: string; light: Mode; dark: Mode; } /** The group a sport is painted with, or `undefined` for a surface with no palette of its own (it takes the look's base). */ export declare const groupOf: (sport: Sport | string) => Group | undefined; /** * The named looks. Each is a light and a dark palette for every sport, as custom properties on `.kyogijo[data-palette=""]`; pass one as `look`. * @example * ```ts * import { LOOKS, drawKyogijo } from "@johnmorrisdotca/kyogijo-stadiums"; * const svg = drawKyogijo({ sport: "nhl", look: "chalkboard" }); * console.log(Object.keys(LOOKS).length, svg.includes('data-palette="chalkboard"')); * // 8 true * ``` */ export declare const LOOKS: Readonly>; /** The names of the looks, in the order a menu lists them. */ export declare const LOOK_NAMES: readonly LookName[]; /** True when a value names a look. */ export declare const isLook: (value: unknown) => value is LookName; /** A look's palette for a sport in one mode: the look's base with what the sport's group changes. */ export declare function lookPalette(look: LookName, mode: "light" | "dark", sport: Sport | string): Palette; /** * The pairs of a palette that must read: what is painted on what, as `[ink, ground, least contrast]` (WCAG 2.2's 3:1 for a line, 4.5:1 for text). The words * of the drawing are on the apron; a line is on the surface and, where its sport paints them under it, on the second tone of the mowing or planks, the key, * the dirt, the infield and the foul ground. */ export declare const LOOK_PAIRS: Readonly>; /** The contrast ratio of two colours (WCAG 2.2): 1 to 21, or `undefined` when a colour cannot be read without a browser. */ export declare function contrastOf(a: string | undefined, b: string | undefined): number | undefined; /** The stylesheet of one look, light and dark, at no weight. A drawing with a `look` carries its look's. */ export declare function lookStyle(name: LookName): string; /** The stylesheet of every look, for a page that draws with `style: "none"`. */ export declare const KYOGIJO_LOOK_STYLE: string;