import { type BaseballLeague, type DiamondSpec } from "./leagues/baseball.ts"; import { type BasketballLeague, type CourtSpec } from "./leagues/basketball.ts"; import { type FootballLeague } from "./leagues/football.ts"; import { type HockeyLeague, type RinkSpec } from "./leagues/hockey.ts"; import { type CurlingLeague, type SheetSpec } from "./leagues/curling.ts"; import { type NetLeague } from "./leagues/courts.ts"; import { type AflLeague, type AflSpec } from "./leagues/aussie.ts"; import { type CricketLeague, type CricketSpec } from "./leagues/cricket.ts"; import { type FieldHockeyLeague, type FieldHockeySpec } from "./leagues/fieldhockey.ts"; import { type AthleticsFigures, type AthleticsLeague } from "./leagues/athletics.ts"; import { type SkatingFigures, type SkatingLeague } from "./leagues/skating.ts"; import { type BudoLeague } from "./leagues/budo.ts"; import { type GaelicLeague, type GaelicSpec } from "./leagues/gaelic.ts"; import { type HandballLeague, type HandballSpec } from "./leagues/handball.ts"; import { type LacrosseLeague, type LacrosseSpec } from "./leagues/lacrosse.ts"; import { type RugbyLeague, type RugbySpec } from "./leagues/rugby.ts"; import { LEAGUE_SOURCES } from "./leagues/sources.ts"; import type { Family } from "./leagues/types.ts"; import type { FootballSpec } from "./geometry.ts"; import type { Sport, SurfaceOptions } from "./types.ts"; import { type Unit } from "./units.ts"; export { LEAGUE_SOURCES }; export type { LeagueSource } from "./leagues/sources.ts"; export type { BaseballLeague, BasketballLeague, CurlingLeague, FootballLeague, HockeyLeague }; export { AFL_GROUNDS } from "./leagues/aussie.ts"; export type { AflFigures, AflGround, AflLeague } from "./leagues/aussie.ts"; export type { CricketFigures, CricketLeague } from "./leagues/cricket.ts"; export type { FieldHockeyFigures, FieldHockeyLeague } from "./leagues/fieldhockey.ts"; export type { GaelicFigures, GaelicLeague } from "./leagues/gaelic.ts"; export type { HandballFigures, HandballLeague } from "./leagues/handball.ts"; export type { LacrosseFigures, LacrosseLeague } from "./leagues/lacrosse.ts"; export type { RugbyFigures, RugbyLeague } from "./leagues/rugby.ts"; export type { Span } from "./leagues/fields.ts"; export type { AthleticsFigures, AthleticsLeague } from "./leagues/athletics.ts"; export { WA_STANDARD_TRACK, WA_SHORT_TRACK, WA_STAGGER_TABLE, WA_SHORT_STAGGER_TABLE } from "./leagues/athletics.ts"; export type { SkatingFigures, SkatingLeague, LongTrackFigures, ShortTrackFigures, FigureRinkFigures } from "./leagues/skating.ts"; export { ISU_LONG_TRACK, ISU_SHORT_TRACK, ISU_FIGURE_RINK, ISU_LONG_TRACK_TABLE } from "./leagues/skating.ts"; export type { BudoFigures, BudoLeague, DojoFigures, DojoLeague, JudoFigures, JudoLeague, KarateFigures, KarateLeague, KendoFigures, KendoLeague, KyudoFigures, KyudoLeague, Mat, SumoFigures, SumoLeague } from "./leagues/budo.ts"; export { AJJF_CONTEST, BUDO_LEAGUES, ENTEKI, FIK_SHIAI_JO, IJF_CONTEST, IJF_KATA, JSA_DOHYO, KINTEKI, WKF_KATA, WKF_KUMITE } from "./leagues/budo.ts"; export type { BadmintonFigures, BadmintonLeague, FreeZone, FreeZones, NetFigures, NetLeague, NetSport, NetballFigures, NetballLeague, PadelFigures, PadelLeague, PickleballFigures, PickleballLeague, RacquetballFigures, RacquetballLeague, RoundnetFigures, RoundnetLeague, SepakTakrawFigures, SepakTakrawLeague, SquashFigures, SquashLeague, TableTennisFigures, TableTennisLeague, TennisFigures, TennisLeague, TeqballFigures, TeqballLeague, VolleyballFigures, VolleyballLeague } from "./leagues/courts.ts"; export type { CourtFigures, CourtMarks } from "./leagues/basketball.ts"; export type { RinkFigures } from "./leagues/hockey.ts"; export type { SheetFigures } from "./leagues/curling.ts"; export type { DiamondFigures } from "./leagues/baseball.ts"; export type { Family, LeagueSpan, Named } from "./leagues/types.ts"; /** A league: a variant of a family of surface. */ export type League = BasketballLeague | HockeyLeague | FootballLeague | BaseballLeague | CurlingLeague | NetLeague | LacrosseLeague | RugbyLeague | AflLeague | GaelicLeague | CricketLeague | FieldHockeyLeague | HandballLeague | AthleticsLeague | SkatingLeague | BudoLeague; /** The family of surface each sport draws; soccer's variants are its pitches (`pitch`), not leagues. */ export declare const FAMILY_OF: Readonly>; /** * The leagues each sport can draw, in the order a menu lists them, the sport's own first (the three football sports share their * list, the football leagues). Soccer and the pools have none. */ export declare const LEAGUES: Readonly>; /** Every league of every family, once each. */ export declare const VARIANTS: readonly League[]; /** The ids of a sport's leagues. */ export declare const leagueIds: (sport: Sport) => string[]; /** A league by its sport and id, or `undefined`. */ export declare function leagueById(sport: Sport, id: string): League | undefined; /** * Which league the options ask for: the league, and the sport it is drawn as. No `league` is the sport's own. A league the sport's * own (`nba` for `nba`) is the sport as it is drawn without one; one of the football leagues that is a sport of its own (`cfl`) is that * sport. A league of another family, or one that does not exist, is an error that says what to use. * @example * ```ts * import { chooseLeague } from "@johnmorrisdotca/kyogijo-stadiums/leagues"; * console.log(chooseLeague({ sport: "nba", league: "fiba" }).league?.name.en, chooseLeague({ sport: "nfl", league: "cfl" }).sport); * // FIBA basketball court cfl * ``` */ export declare function chooseLeague(o: Pick): { sport: Sport; league: League | undefined; }; /** One change of a league's markings: a state of one marking from a season on. */ export interface LeagueChange { /** `ncaa-men.threePoint.2019`. */ id: string; league: string; /** The marking's name: a key of the league's dimensions. */ feature: string; /** The first season, or `null` for the state before the first change that is cited. */ from: number | null; value: unknown; what: string; ja: string; sources: string[]; } /** * Every change a source dates in a league's markings, in season order, each with a sentence in English and in Japanese and its * sources. A league with no cited history has none (a drawing with a `year` is then the league's rulebook as it is now). * @example * ```ts * import { leagueChanges } from "@johnmorrisdotca/kyogijo-stadiums/leagues"; * console.log(leagueChanges("nba", "ncaa-men").map((change) => change.id)); * ``` */ export declare function leagueChanges(sport: Sport, id: string): LeagueChange[]; /** True when a league has markings a source dates, so that `year` changes its drawing. */ export declare const hasHistory: (league: League | undefined) => boolean; /** The league's figures in a season: the rulebook's as it is now, with each marking that has a dated history as it stood then. */ export interface LeagueAt { league: L; /** The season asked for, or `undefined` for today's. */ year: number | undefined; /** The figures in the unit the league keeps them in. */ figures: L["dimensions"]; /** The markings that differ from today's. */ differences: LeagueChange[]; /** Markings whose history starts later than the season asked for (the first cited state is used). */ gaps: string[]; } /** * A league's figures as they were in a season. Without a year, or for a league with no dated history, they are the rulebook's as * it is now. * @example * ```ts * import { leagueAt } from "@johnmorrisdotca/kyogijo-stadiums/leagues"; * console.log(leagueAt("nba", "ncaa-men", 2010).differences.map((change) => change.id)); * // [ 'ncaa-men.restricted.start' ] * ``` */ export declare function leagueAt(sport: Sport, id: string, year?: number): LeagueAt; /** `leagueAt` for a league already in hand. */ export declare function leagueAtOf(league: L, year?: number): LeagueAt; /** The name of a season as the family writes it: `1979–80` for basketball and hockey, which play across the new year, else `1979`. */ export declare function leagueSeason(family: Family, year: number): string; /** A basketball court of a league in a season, in feet. */ export declare const courtOf: (league: BasketballLeague, year?: number) => CourtSpec; /** An ice rink of a league in a season, in feet. */ export declare const rinkOf: (league: HockeyLeague, year?: number) => RinkSpec; /** A curling sheet of a league, in feet. A sheet has no history; a year is ignored. */ export declare const sheetOf: (league?: CurlingLeague) => SheetSpec; /** A net sport's court of a league (tennis, volleyball, beach and sitting volleyball, badminton, pickleball, table tennis, padel, squash, racquetball, sepak takraw, teqball, roundnet and netball), in feet. These courts have no history; a year is ignored. */ export declare const netOf: (league: L) => L["dimensions"]; /** A lacrosse surface of a league, in feet (the box floor, or a field). These have no history; a year is ignored. */ export declare const lacrosseOf: (league: LacrosseLeague) => LacrosseSpec; /** A rugby field of a league, in feet. */ export declare const rugbyOf: (league: RugbyLeague) => RugbySpec; /** The Australian football ground, in feet. */ export declare const aflOf: (league: AflLeague) => AflSpec; /** A Gaelic games field of a league (football or hurling), in feet. */ export declare const gaelicOf: (league: GaelicLeague) => GaelicSpec; /** A cricket ground of a league, in feet. */ export declare const cricketOf: (league: CricketLeague) => CricketSpec; /** A field hockey pitch, in feet. */ export declare const fieldHockeyOf: (league: FieldHockeyLeague) => FieldHockeySpec; /** A skating rink of a league, in feet. */ export declare const skatingOf: (league: SkatingLeague) => SkatingFigures; /** An athletics track of a league, in feet. */ export declare const athleticsOf: (league: AthleticsLeague) => AthleticsFigures; /** A handball court, in feet. */ export declare const handballOf: (league: HandballLeague) => HandballSpec; /** A football field of a league in a season: the spec, in feet. */ export declare const fieldOf: (league: FootballLeague, year?: number) => FootballSpec; /** A diamond of a league in a season, in feet. */ export declare const diamondOf: (league: BaseballLeague, year?: number) => DiamondSpec; /** * The length and the width of a league's surface in a unit (the league's own when none is given): a football field with its end * zones, end line to end line. A diamond has no fixed size, its fence is its size. * @example * ```ts * import { leagueSize } from "@johnmorrisdotca/kyogijo-stadiums/leagues"; * console.log(leagueSize("nba", "nba")); * // { length: 94, width: 50, unit: 'ft' } * ``` */ export declare function leagueSize(sport: Sport, id: string, unit?: Unit): { length: number; width: number; unit: Unit; }; /** * The key figures of a league in words, each in the unit its rulebook uses: for a table of the leagues (docs/variants.md) and for a * test that holds the drawing to the rulebook. * @example * ```ts * import { LEAGUES, leagueFigures } from "@johnmorrisdotca/kyogijo-stadiums/leagues"; * const fiba = LEAGUES.nba.find((league) => league.id === "fiba")!; * console.log(leagueFigures(fiba).slice(0, 2).map(([name, value]) => `${name}: ${value}`).join("; ")); * // court: 28 m by 15 m; lane: 4.9 m wide * ``` */ export declare function leagueFigures(league: League): [string, string][];