@johnmorrisdotca/kyogijo-stadiums 0.5.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +64 -0
- package/NOTICE.md +179 -3
- package/README.md +43 -11
- package/dist/arenas-entry.d.ts +4 -0
- package/dist/arenas-entry.js +3 -0
- package/dist/arenas.d.ts +125 -0
- package/dist/arenas.data.d.ts +2 -0
- package/dist/arenas.data.js +3763 -0
- package/dist/arenas.js +72 -0
- package/dist/atlas-entry.d.ts +3 -1
- package/dist/atlas-entry.js +3 -2
- package/dist/atlas.d.ts +37 -19
- package/dist/atlas.js +92 -7
- package/dist/background.js +2 -1
- package/dist/budo/describe.d.ts +13 -0
- package/dist/budo/describe.js +120 -0
- package/dist/budo/dojo.api.d.ts +64 -0
- package/dist/budo/dojo.api.js +46 -0
- package/dist/budo/dojo.d.ts +72 -0
- package/dist/budo/dojo.js +300 -0
- package/dist/budo/judo.d.ts +61 -0
- package/dist/budo/judo.js +109 -0
- package/dist/budo/karate.d.ts +29 -0
- package/dist/budo/karate.js +80 -0
- package/dist/budo/kendo.d.ts +18 -0
- package/dist/budo/kendo.js +44 -0
- package/dist/budo/kimarite.d.ts +19 -0
- package/dist/budo/kimarite.js +33 -0
- package/dist/budo/kit.d.ts +16 -0
- package/dist/budo/kit.js +24 -0
- package/dist/budo/kyudo.d.ts +28 -0
- package/dist/budo/kyudo.js +66 -0
- package/dist/budo/looks.d.ts +28 -0
- package/dist/budo/looks.js +58 -0
- package/dist/budo/parts.d.ts +32 -0
- package/dist/budo/parts.js +10 -0
- package/dist/budo/plan.d.ts +64 -0
- package/dist/budo/plan.js +139 -0
- package/dist/budo/room.d.ts +133 -0
- package/dist/budo/room.js +111 -0
- package/dist/budo/sumo.d.ts +31 -0
- package/dist/budo/sumo.js +71 -0
- package/dist/budo/tatami.d.ts +55 -0
- package/dist/budo/tatami.js +156 -0
- package/dist/budo/types.d.ts +192 -0
- package/dist/budo/types.js +2 -0
- package/dist/budo-entry.d.ts +22 -0
- package/dist/budo-entry.js +13 -0
- package/dist/budo.board.d.ts +28 -0
- package/dist/budo.board.js +81 -0
- package/dist/budo.score.d.ts +18 -0
- package/dist/budo.score.js +52 -0
- package/dist/budo.style.d.ts +6 -0
- package/dist/budo.style.js +67 -0
- package/dist/charts.baseball.js +1 -1
- package/dist/charts.js +4 -4
- package/dist/charts.soccer.js +3 -3
- package/dist/charts.types.d.ts +10 -0
- package/dist/colour.d.ts +4 -4
- package/dist/colour.js +4 -4
- package/dist/crowd.d.ts +11 -1
- package/dist/crowd.draw.js +15 -9
- package/dist/crowd.js +17 -2
- package/dist/draw.js +156 -31
- package/dist/element-entry.d.ts +2 -0
- package/dist/element-entry.js +1 -0
- package/dist/element.d.ts +2 -2
- package/dist/element.js +2 -1
- package/dist/emblems-source.d.ts +50 -0
- package/dist/emblems-source.js +56 -0
- package/dist/eras.d.ts +3 -1
- package/dist/eras.js +8 -3
- package/dist/features.js +73 -0
- package/dist/field.data.d.ts +16 -0
- package/dist/field.data.js +50 -0
- package/dist/fields.kit.d.ts +2 -2
- package/dist/fields.types.d.ts +9 -3
- package/dist/formations.js +18 -7
- package/dist/formations.sports.d.ts +8 -0
- package/dist/formations.sports.js +251 -0
- package/dist/frames.providers.js +9 -1
- package/dist/halls.d.ts +65 -0
- package/dist/halls.js +122 -0
- package/dist/heat.js +17 -10
- package/dist/heat.zones.d.ts +4 -2
- package/dist/heat.zones.js +55 -3
- package/dist/homeside.js +7 -0
- package/dist/index.d.ts +15 -3
- package/dist/index.js +8 -1
- package/dist/layers-entry.d.ts +2 -1
- package/dist/layers-entry.js +1 -0
- package/dist/layers.d.ts +2 -1
- package/dist/layers.env.d.ts +10 -1
- package/dist/layers.env.js +33 -3
- package/dist/layers.js +30 -11
- package/dist/layers.types.d.ts +9 -2
- package/dist/leagues/budo.d.ts +196 -0
- package/dist/leagues/budo.js +105 -0
- package/dist/leagues/hockey.js +41 -19
- package/dist/leagues/sources.js +21 -0
- package/dist/leagues/types.d.ts +1 -1
- package/dist/leagues.d.ts +4 -1
- package/dist/leagues.js +102 -2
- package/dist/lineup.codes.d.ts +23 -0
- package/dist/lineup.codes.js +122 -0
- package/dist/logo.d.ts +25 -0
- package/dist/logo.js +47 -0
- package/dist/outline.d.ts +1 -1
- package/dist/outline.js +17 -3
- package/dist/pageant.js +7 -3
- package/dist/pointer-entry.d.ts +2 -0
- package/dist/pointer-entry.js +2 -0
- package/dist/pointer.d.ts +113 -0
- package/dist/pointer.js +151 -0
- package/dist/pool.d.ts +7 -7
- package/dist/pool.figures.d.ts +57 -55
- package/dist/pool.figures.js +59 -55
- package/dist/pool.js +7 -7
- package/dist/pool.labels.js +2 -1
- package/dist/ranges.names.js +6 -0
- package/dist/road.draw.js +3 -2
- package/dist/road.js +2 -1
- package/dist/road.types.d.ts +3 -0
- package/dist/rules.d.ts +138 -0
- package/dist/rules.js +511 -0
- package/dist/rules.types.d.ts +4 -0
- package/dist/rules.types.js +64 -0
- package/dist/score.d.ts +3 -0
- package/dist/score.js +23 -1
- package/dist/situation.d.ts +135 -0
- package/dist/situation.draw.d.ts +34 -0
- package/dist/situation.draw.js +202 -0
- package/dist/situation.js +337 -0
- package/dist/situation.style.d.ts +2 -0
- package/dist/situation.style.js +45 -0
- package/dist/situation.types.d.ts +77 -0
- package/dist/situation.types.js +3 -0
- package/dist/situation.widgets.d.ts +39 -0
- package/dist/situation.widgets.js +129 -0
- package/dist/strings.d.ts +175 -1
- package/dist/strings.js +364 -20
- package/dist/style.js +9 -2
- package/dist/surfaces/artistic.d.ts +3 -3
- package/dist/surfaces/artistic.js +3 -3
- package/dist/surfaces/baseball.js +2 -0
- package/dist/surfaces/basketball.js +1 -1
- package/dist/surfaces/budo.d.ts +6 -0
- package/dist/surfaces/budo.js +104 -0
- package/dist/surfaces/dive.d.ts +3 -3
- package/dist/surfaces/dive.js +3 -3
- package/dist/surfaces/football.js +7 -0
- package/dist/surfaces/hockey.js +3 -2
- package/dist/surfaces/polo.d.ts +4 -4
- package/dist/surfaces/polo.js +5 -5
- package/dist/surfaces/pool.d.ts +1 -1
- package/dist/surfaces/pool.js +3 -3
- package/dist/surfaces/surface.d.ts +32 -0
- package/dist/surfaces/venue.d.ts +1 -1
- package/dist/surfaces/venue.js +1 -1
- package/dist/target-entry.d.ts +2 -0
- package/dist/target-entry.js +2 -0
- package/dist/target.d.ts +200 -0
- package/dist/target.js +525 -0
- package/dist/team.common.d.ts +1 -1
- package/dist/team.common.js +3 -3
- package/dist/team.formation.d.ts +3 -1
- package/dist/team.formation.js +3 -3
- package/dist/team.layers.d.ts +2 -2
- package/dist/team.layers.js +4 -1
- package/dist/team.lineup.d.ts +27 -0
- package/dist/team.lineup.js +207 -0
- package/dist/team.network.js +6 -5
- package/dist/team.shape.js +5 -5
- package/dist/team.types.d.ts +40 -1
- package/dist/tenants.data.js +848 -0
- package/dist/turn-entry.d.ts +2 -2
- package/dist/turn-entry.js +1 -1
- package/dist/turn.camera.d.ts +16 -3
- package/dist/turn.camera.js +53 -7
- package/dist/turn.dom.js +11 -9
- package/dist/turn.kit.d.ts +2 -2
- package/dist/turn.style.js +4 -3
- package/dist/types.d.ts +43 -7
- package/dist/units.js +7 -0
- package/dist/uprights.budo.d.ts +17 -0
- package/dist/uprights.budo.js +87 -0
- package/dist/uprights.js +10 -1
- package/dist/uprights.pools.js +4 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/zones-entry.d.ts +2 -0
- package/dist/zones-entry.js +2 -0
- package/package.json +39 -3
package/dist/arenas.d.ts
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { type PlaceAlias } from "./names.ts";
|
|
2
|
+
import type { Language } from "./types.ts";
|
|
3
|
+
/** Where an arena's facts were read: an article of Wikipedia at a revision. */
|
|
4
|
+
export interface ArenaSource {
|
|
5
|
+
title: string;
|
|
6
|
+
revision: number;
|
|
7
|
+
}
|
|
8
|
+
/** A name an arena had for some years, first to last. */
|
|
9
|
+
export interface ArenaName {
|
|
10
|
+
name: string;
|
|
11
|
+
from: number;
|
|
12
|
+
to: number;
|
|
13
|
+
}
|
|
14
|
+
/** 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. */
|
|
15
|
+
export interface ArenaSize {
|
|
16
|
+
length: number;
|
|
17
|
+
width: number;
|
|
18
|
+
unit: "ft" | "m";
|
|
19
|
+
/** The first and the last year it had this size, where the source gives them. */
|
|
20
|
+
from?: number;
|
|
21
|
+
to?: number;
|
|
22
|
+
/** Where it was read: the article and its revision, and in a few words what it says (not a copied passage). */
|
|
23
|
+
source: string;
|
|
24
|
+
}
|
|
25
|
+
/** The seats an arena holds for each sport, as the infobox of its article gives them (the first number it gives for the sport). */
|
|
26
|
+
export interface ArenaCapacity {
|
|
27
|
+
hockey?: number;
|
|
28
|
+
basketball?: number;
|
|
29
|
+
}
|
|
30
|
+
/** An arena as the data gives it: the rink and the court are the sizes published where they differ from the league's. */
|
|
31
|
+
export interface ArenaData {
|
|
32
|
+
/** The key: `boston-garden`. */
|
|
33
|
+
id: string;
|
|
34
|
+
/** The Wikidata item of the arena (`Q894567`), the key to join an arena to other data. */
|
|
35
|
+
wikidata: string;
|
|
36
|
+
/** The everyday name in English (`Boston Garden`, `TD Garden`); the title of the English article is one of the `aliases`. */
|
|
37
|
+
name: string;
|
|
38
|
+
/** 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. */
|
|
39
|
+
names?: ArenaName[];
|
|
40
|
+
/** The everyday name in Japanese, as Japanese media say it. */
|
|
41
|
+
nameJa: string;
|
|
42
|
+
/** The reading of `nameJa` in kana, given wherever `nameJa` has kanji. */
|
|
43
|
+
readingJa?: string;
|
|
44
|
+
/** The everyday name in the language of the place, where it is not English (`Colisée de Québec`). */
|
|
45
|
+
localName?: string;
|
|
46
|
+
localLanguage?: string;
|
|
47
|
+
/** Every other name, each with where it was read. */
|
|
48
|
+
aliases?: PlaceAlias[];
|
|
49
|
+
city: string;
|
|
50
|
+
/** ISO 3166-1 alpha-2: `US`, `CA`. */
|
|
51
|
+
country: string;
|
|
52
|
+
/** Wikidata's coordinates of the arena (P625), in degrees. */
|
|
53
|
+
lat: number;
|
|
54
|
+
lon: number;
|
|
55
|
+
/** `current` stands and is in use for a team of the leagues, `past` has been left, closed or pulled down. */
|
|
56
|
+
status: "current" | "past";
|
|
57
|
+
/** The year it opened, and for a past arena the year it closed or was pulled down. */
|
|
58
|
+
from?: number;
|
|
59
|
+
to?: number;
|
|
60
|
+
/** The years the article gives for the building itself: when it closed and when it was pulled down. */
|
|
61
|
+
closed?: number;
|
|
62
|
+
demolished?: number;
|
|
63
|
+
capacity?: ArenaCapacity;
|
|
64
|
+
/** 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. */
|
|
65
|
+
rink?: ArenaSize[];
|
|
66
|
+
/** The court, where the sources give a size other than the NBA's 94 by 50 feet. */
|
|
67
|
+
court?: ArenaSize[];
|
|
68
|
+
/** True where the article says the rink was shorter than the NHL's and gives no size: the drawing says so. */
|
|
69
|
+
rinkUnknown?: true;
|
|
70
|
+
/** Why a size is not given, or what the sources say instead. */
|
|
71
|
+
note?: string;
|
|
72
|
+
/** The English article the facts were read from. */
|
|
73
|
+
en: ArenaSource;
|
|
74
|
+
/** The Japanese article the name in Japanese was read from. */
|
|
75
|
+
ja?: ArenaSource;
|
|
76
|
+
}
|
|
77
|
+
/** 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). */
|
|
78
|
+
export type Arena = ArenaData;
|
|
79
|
+
/**
|
|
80
|
+
* 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
|
|
81
|
+
* is the rink.
|
|
82
|
+
* @example
|
|
83
|
+
* ```ts
|
|
84
|
+
* import { arenaById, arenaRinkIn } from "@johnmorrisdotca/kyogijo-stadiums/arenas";
|
|
85
|
+
* console.log(arenaRinkIn(arenaById("boston-garden")!), arenaRinkIn(arenaById("matthews-arena")!, 1926), arenaRinkIn(arenaById("td-garden")!));
|
|
86
|
+
* // { length: 190.9, width: 83 } { length: 220, width: 90 } undefined
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
export declare const arenaRinkIn: (arena: Arena | undefined, year?: number) => {
|
|
90
|
+
length: number;
|
|
91
|
+
width: number;
|
|
92
|
+
} | undefined;
|
|
93
|
+
/** 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`. */
|
|
94
|
+
export declare const arenaCourtIn: (arena: Arena | undefined, year?: number) => {
|
|
95
|
+
length: number;
|
|
96
|
+
width: number;
|
|
97
|
+
} | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* 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,
|
|
100
|
+
* 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.
|
|
101
|
+
* @example
|
|
102
|
+
* ```ts
|
|
103
|
+
* import { ARENAS } from "@johnmorrisdotca/kyogijo-stadiums/arenas";
|
|
104
|
+
* const garden = ARENAS["boston-garden"];
|
|
105
|
+
* console.log(garden.name, garden.city, garden.from, garden.to, garden.capacity?.hockey);
|
|
106
|
+
* // Boston Garden Boston 1928 1995 14448
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
export declare const ARENAS: Readonly<Record<string, Arena>>;
|
|
110
|
+
/** The keys of `ARENAS`, in the order of the data: the arenas in use first, then those of the past. */
|
|
111
|
+
export declare const ARENA_IDS: readonly string[];
|
|
112
|
+
/** The arena with a key, or `undefined`. */
|
|
113
|
+
export declare const arenaById: (id: string | undefined) => Arena | undefined;
|
|
114
|
+
/** 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. */
|
|
115
|
+
export declare const arenasByName: (name: string | undefined) => Arena[];
|
|
116
|
+
/** The arena a name belongs to (the best match when several answer to it), or `undefined`. */
|
|
117
|
+
export declare const arenaByName: (name: string | undefined) => Arena | undefined;
|
|
118
|
+
/** The arena whose Wikidata item is `Q894567`, or `undefined`. */
|
|
119
|
+
export declare const arenaByWikidata: (wikidata: string | undefined) => Arena | undefined;
|
|
120
|
+
/** The name an arena had in a year (the name of the time in English; in Japanese there is one name for every year). */
|
|
121
|
+
export declare function arenaNameIn(arena: Arena, year?: number, language?: Language): string;
|
|
122
|
+
/** The name an arena officially has in a language, when it is not the everyday name; else `undefined`. */
|
|
123
|
+
export declare function arenaOfficialName(arena: Arena, language?: Language, year?: number): string | undefined;
|
|
124
|
+
/** The address of the revision of an article that an arena's facts were read from. */
|
|
125
|
+
export declare function arenaSourceUrl(source: ArenaSource, language?: "en" | "ja"): string;
|