import { type PlaceAlias } from "./names.ts"; import type { Language } from "./types.ts"; /** Where an arena's facts were read: an article of Wikipedia at a revision. */ export interface ArenaSource { title: string; revision: number; } /** A name an arena had for some years, first to last. */ export interface ArenaName { name: string; from: number; to: number; } /** A published size of an ice rink or a basketball court, in the unit it was published in, with where it was read and, if the source dates it, the years it had that size. */ export interface ArenaSize { length: number; width: number; unit: "ft" | "m"; /** The first and the last year it had this size, where the source gives them. */ from?: number; to?: number; /** Where it was read: the article and its revision, and in a few words what it says (not a copied passage). */ source: string; } /** The seats an arena holds for each sport, as the infobox of its article gives them (the first number it gives for the sport). */ export interface ArenaCapacity { hockey?: number; basketball?: number; } /** An arena as the data gives it: the rink and the court are the sizes published where they differ from the league's. */ export interface ArenaData { /** The key: `boston-garden`. */ id: string; /** The Wikidata item of the arena (`Q894567`), the key to join an arena to other data. */ wikidata: string; /** The everyday name in English (`Boston Garden`, `TD Garden`); the title of the English article is one of the `aliases`. */ name: string; /** Names the arena had for some years, in order of time: where two share a year the later one is the name at the end of it. */ names?: ArenaName[]; /** The everyday name in Japanese, as Japanese media say it. */ nameJa: string; /** The reading of `nameJa` in kana, given wherever `nameJa` has kanji. */ readingJa?: string; /** The everyday name in the language of the place, where it is not English (`Colisée de Québec`). */ localName?: string; localLanguage?: string; /** Every other name, each with where it was read. */ aliases?: PlaceAlias[]; city: string; /** ISO 3166-1 alpha-2: `US`, `CA`. */ country: string; /** Wikidata's coordinates of the arena (P625), in degrees. */ lat: number; lon: number; /** `current` stands and is in use for a team of the leagues, `past` has been left, closed or pulled down. */ status: "current" | "past"; /** The year it opened, and for a past arena the year it closed or was pulled down. */ from?: number; to?: number; /** The years the article gives for the building itself: when it closed and when it was pulled down. */ closed?: number; demolished?: number; capacity?: ArenaCapacity; /** The ice, end boards to end boards and side boards to side boards, where the sources give a size other than the NHL's 200 by 85 feet: one for each time it was a different size. */ rink?: ArenaSize[]; /** The court, where the sources give a size other than the NBA's 94 by 50 feet. */ court?: ArenaSize[]; /** True where the article says the rink was shorter than the NHL's and gives no size: the drawing says so. */ rinkUnknown?: true; /** Why a size is not given, or what the sources say instead. */ note?: string; /** The English article the facts were read from. */ en: ArenaSource; /** The Japanese article the name in Japanese was read from. */ ja?: ArenaSource; } /** An arena as the package holds it: the data, with the sizes in the unit they were published in (see `arenaRinkIn` and `arenaCourtIn` for them in feet). */ export type Arena = ArenaData; /** * The size of an arena's rink in feet, in a year or today (the latest), when the sources publish one that differs from the NHL's; else `undefined` and the NHL's 200 by 85 feet * is the rink. * @example * ```ts * import { arenaById, arenaRinkIn } from "@johnmorrisdotca/kyogijo-stadiums/arenas"; * console.log(arenaRinkIn(arenaById("boston-garden")!), arenaRinkIn(arenaById("matthews-arena")!, 1926), arenaRinkIn(arenaById("td-garden")!)); * // { length: 190.9, width: 83 } { length: 220, width: 90 } undefined * ``` */ export declare const arenaRinkIn: (arena: Arena | undefined, year?: number) => { length: number; width: number; } | undefined; /** The size of an arena's court in feet, in a year or today, when the sources publish one that differs from the NBA's 94 by 50 feet; else `undefined`. */ export declare const arenaCourtIn: (arena: Arena | undefined, year?: number) => { length: number; width: number; } | undefined; /** * Every arena by its key: the homes of the NHL's, the NBA's, the WNBA's and the PWHL's clubs, today's and the old ones, each with where it stands, when it was in use, its names, * its seats for each sport and, where the sources publish one that differs from the league's, the size of its rink or its court. * @example * ```ts * import { ARENAS } from "@johnmorrisdotca/kyogijo-stadiums/arenas"; * const garden = ARENAS["boston-garden"]; * console.log(garden.name, garden.city, garden.from, garden.to, garden.capacity?.hockey); * // Boston Garden Boston 1928 1995 14448 * ``` */ export declare const ARENAS: Readonly>; /** The keys of `ARENAS`, in the order of the data: the arenas in use first, then those of the past. */ export declare const ARENA_IDS: readonly string[]; /** The arena with a key, or `undefined`. */ export declare const arenaById: (id: string | undefined) => Arena | undefined; /** The arenas that answer to a name, best match first (see `placesByName`): the everyday names, then the official and cited names, then the former names and the nicknames. */ export declare const arenasByName: (name: string | undefined) => Arena[]; /** The arena a name belongs to (the best match when several answer to it), or `undefined`. */ export declare const arenaByName: (name: string | undefined) => Arena | undefined; /** The arena whose Wikidata item is `Q894567`, or `undefined`. */ export declare const arenaByWikidata: (wikidata: string | undefined) => Arena | undefined; /** The name an arena had in a year (the name of the time in English; in Japanese there is one name for every year). */ export declare function arenaNameIn(arena: Arena, year?: number, language?: Language): string; /** The name an arena officially has in a language, when it is not the everyday name; else `undefined`. */ export declare function arenaOfficialName(arena: Arena, language?: Language, year?: number): string | undefined; /** The address of the revision of an article that an arena's facts were read from. */ export declare function arenaSourceUrl(source: ArenaSource, language?: "en" | "ja"): string;