export declare const METRES_PER_YARD = 0.9144; export declare const METRES_PER_FOOT = 0.3048; /** How a pitch's penalty area is shaped: a box (two lines and a line across), futsal's two quarter circles and a line, or the FA small-sided laws' semicircle round the middle of the goal line. */ export type SoccerArea = "box" | "arcs" | "semicircle"; /** The formats: eleven a side under the IFAB Laws, the small-sided ones of the FA, and futsal under FIFA's Futsal Laws. */ export type SoccerFormat = "11" | "9" | "7" | "5" | "futsal"; /** A pitch: its size and every marking. All lengths in metres. */ export interface SoccerSpec { id: string; /** The name written in the title. */ name: string; format: SoccerFormat; /** Goal line to goal line (the touchline). */ length: number; /** Touchline to touchline (the goal line). */ width: number; /** The penalty area: how far it reaches into the field from the goal line, and its width along the goal line. */ penaltyDepth: number; penaltyWidth: number; /** The goal area (the six-yard box). `0` when the format has none. */ goalAreaDepth: number; goalAreaWidth: number; /** The penalty mark, from the goal line. `0` when there is none. */ spot: number; /** A second penalty mark (futsal's 10 metres), from the goal line. */ secondSpot: number; /** The radius of the centre circle. */ centreRadius: number; /** The radius of the penalty arc, drawn outside the penalty area. `0` when there is none. */ arcRadius: number; /** The radius of the corner arc. */ cornerRadius: number; /** The goal, inside the posts. */ goalWidth: number; goalHeight: number; /** How deep the net is drawn behind the goal line. The Laws do not fix it. */ goalDepth: number; /** The shape of the penalty area. */ area: SoccerArea; /** Futsal: the line across the front of the penalty area, between its two quarter circles. */ areaLine: number; /** The width of the lines, at most this (the Laws: 12 cm; futsal: 8 cm). */ lineWidth: number; } /** * Law 1 of the IFAB Laws of the Game (2025/26), the markings of a full pitch: the goal area reaches 5.5 m from the * posts and into the field, the penalty area 16.5 m, the penalty mark is 11 m from the goal line, the arcs and the * centre circle have a radius of 9.15 m, the corner arc 1 m; the goal is 7.32 m between the posts and 2.44 m high; the * lines are at most 12 cm wide. The Laws give yards beside each (6, 18, 12, 10 and 8 yards and 8 feet). */ export declare const SOCCER: { readonly goalWidth: 7.32; readonly goalHeight: 2.44; readonly goalAreaReach: 5.5; readonly penaltyReach: 16.5; readonly spot: 11; readonly centreRadius: 9.15; readonly arcRadius: 9.15; readonly cornerRadius: 1; /** Corner flags stand at least 1.5 m high. */ readonly flagHeight: 1.5; /** The least and the most of a pitch's length and width in any match, and in an international one. */ readonly limits: { readonly length: readonly [90, 120]; readonly width: readonly [45, 90]; readonly internationalLength: readonly [100, 110]; readonly internationalWidth: readonly [64, 75]; }; readonly lineWidth: 0.12; /** The marks off the field that show the distance of a corner kick: 9.15 m from the corner arc. */ readonly cornerMark: 9.15; }; /** The goal area's width and the penalty area's, which follow from the goal and the reach. */ export declare const goalAreaWidth: (goal?: number, reach?: number) => number; export declare const penaltyAreaWidth: (goal?: number, reach?: number) => number; /** A full-size, eleven-a-side pitch of any size, with the Laws' markings. */ export declare function fullPitch(id: string, name: string, length: number, width: number): SoccerSpec; /** Where the markings stand, in metres: the spec's, or a data provider's own. */ export interface SoccerLayout { penaltyDepth: number; penaltyHalfWidth: number; goalAreaDepth: number; goalAreaHalfWidth: number; spot: number; goalHalfWidth: number; } /** The layout of a spec as the Laws and the federation give it. */ export declare function layoutOf(spec: SoccerSpec): SoccerLayout; /** Which of the Laws' ranges a length and a width fall in. */ export type SoccerPitchClass = "international" | "within-laws" | "outside-laws"; /** * Where a pitch of this size stands under Law 1: `international` (100 to 110 m by 64 to 75 m, for international * matches), `within-laws` (90 to 120 m by 45 to 90 m, and the touchline longer than the goal line) or `outside-laws`. * @example * ```ts * import { soccerPitchClass } from "@johnmorrisdotca/kyogijo-stadiums"; * console.log(soccerPitchClass(105, 68), soccerPitchClass(95, 60), soccerPitchClass(60, 40)); * // international within-laws outside-laws * ``` */ export declare function soccerPitchClass(length: number, width: number): SoccerPitchClass; /** The ids of the presets. */ export type SoccerPitchId = "fifa" | "uefa" | "mls" | "ncaa" | "law-min" | "law-max" | "9-a-side" | "7-a-side" | "5-a-side" | "futsal"; /** The ids of the presets, in the order a menu lists them. */ export declare const SOCCER_PITCH_IDS: readonly SoccerPitchId[]; /** * The presets: the international pitch of 105 by 68 m (the Laws' usual, the Premier League's and UEFA's categories 3 and * 4), the least size the MLS requires (110 by 70 yards) and the NCAA's best (120 by 75 yards), the least and most the Laws * allow, the FA's 9-, 7- and 5-a-side pitches and FIFA's futsal court. Each is a full `SoccerSpec`. * @example * ```ts * import { SOCCER_PITCHES } from "@johnmorrisdotca/kyogijo-stadiums"; * const { length, width, name } = SOCCER_PITCHES.fifa; * console.log(name, length, width); * // International (FIFA) 105 68 * ``` */ export declare const SOCCER_PITCHES: Readonly>; /** A pitch given by size: any positive length and width, in metres, yards or feet. */ export interface SoccerSize { length: number; width: number; /** `m` (the default), `yd`, `ft`, `in`, `cm` or `mm`. */ unit?: "m" | "yd" | "ft" | "in" | "cm" | "mm"; } /** * The pitch an option asks for: a preset's id, or a size. An unknown id, or a size that is not a positive number (or * is more than 400 m), gives the international pitch. A size has the Laws' markings of a full pitch, sized to fit: * the areas are never wider than the pitch. * @example * ```ts * import { soccerSpec } from "@johnmorrisdotca/kyogijo-stadiums"; * const pitch = soccerSpec({ length: 110, width: 70, unit: "yd" }); * console.log(pitch.length.toFixed(2), pitch.width.toFixed(2)); * // 100.58 64.01 * ``` */ export declare function soccerSpec(pitch?: SoccerPitchId | SoccerSize | string, defaultUnit?: NonNullable): SoccerSpec;