@johnmorrisdotca/kyogijo-stadiums 0.0.0-stage → 0.4.0
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 +129 -0
- package/LICENSE +21 -0
- package/NOTICE.md +293 -0
- package/README.md +600 -2
- package/dist/annotate.d.ts +47 -0
- package/dist/annotate.js +349 -0
- package/dist/atlas-entry.d.ts +4 -0
- package/dist/atlas-entry.js +3 -0
- package/dist/atlas.d.ts +131 -0
- package/dist/atlas.js +149 -0
- package/dist/background.d.ts +56 -0
- package/dist/background.js +127 -0
- package/dist/ballpark.d.ts +48 -0
- package/dist/ballpark.js +129 -0
- package/dist/canvas-entry.d.ts +2 -0
- package/dist/canvas-entry.js +2 -0
- package/dist/canvas.d.ts +85 -0
- package/dist/canvas.js +279 -0
- package/dist/charts-entry.d.ts +10 -0
- package/dist/charts-entry.js +8 -0
- package/dist/charts.baseball.d.ts +30 -0
- package/dist/charts.baseball.js +152 -0
- package/dist/charts.curling.d.ts +52 -0
- package/dist/charts.curling.js +196 -0
- package/dist/charts.d.ts +172 -0
- package/dist/charts.js +508 -0
- package/dist/charts.network.d.ts +66 -0
- package/dist/charts.network.js +64 -0
- package/dist/charts.soccer.d.ts +43 -0
- package/dist/charts.soccer.js +191 -0
- package/dist/charts.types.d.ts +396 -0
- package/dist/charts.types.js +1 -0
- package/dist/colour.d.ts +29 -0
- package/dist/colour.js +97 -0
- package/dist/common.d.ts +14 -0
- package/dist/common.js +32 -0
- package/dist/court.d.ts +89 -0
- package/dist/court.js +248 -0
- package/dist/courts.style.d.ts +20 -0
- package/dist/courts.style.js +54 -0
- package/dist/cricket.board.d.ts +18 -0
- package/dist/cricket.board.js +67 -0
- package/dist/curling.board.d.ts +24 -0
- package/dist/curling.board.js +147 -0
- package/dist/d3-entry.d.ts +3 -0
- package/dist/d3-entry.js +2 -0
- package/dist/d3.d.ts +45 -0
- package/dist/d3.js +56 -0
- package/dist/draw.d.ts +52 -0
- package/dist/draw.js +705 -0
- package/dist/element-define.d.ts +2 -0
- package/dist/element-define.js +4 -0
- package/dist/element-entry.d.ts +1 -0
- package/dist/element-entry.js +2 -0
- package/dist/element.d.ts +39 -0
- package/dist/element.js +321 -0
- package/dist/eras-entry.d.ts +2 -0
- package/dist/eras-entry.js +2 -0
- package/dist/eras.d.ts +204 -0
- package/dist/eras.js +396 -0
- package/dist/events-entry.d.ts +3 -0
- package/dist/events-entry.js +3 -0
- package/dist/events.d.ts +54 -0
- package/dist/events.data.d.ts +59 -0
- package/dist/events.data.js +297 -0
- package/dist/events.js +127 -0
- package/dist/features.d.ts +31 -0
- package/dist/features.js +284 -0
- package/dist/field.score.d.ts +5 -0
- package/dist/field.score.js +33 -0
- package/dist/fields/afl.d.ts +11 -0
- package/dist/fields/afl.js +103 -0
- package/dist/fields/cricket.d.ts +9 -0
- package/dist/fields/cricket.js +81 -0
- package/dist/fields/fieldhockey.d.ts +6 -0
- package/dist/fields/fieldhockey.js +81 -0
- package/dist/fields/gaelic.d.ts +10 -0
- package/dist/fields/gaelic.js +86 -0
- package/dist/fields/handball.d.ts +6 -0
- package/dist/fields/handball.js +85 -0
- package/dist/fields/lacrosse.d.ts +17 -0
- package/dist/fields/lacrosse.js +169 -0
- package/dist/fields/rugby.d.ts +10 -0
- package/dist/fields/rugby.js +130 -0
- package/dist/fields.d.ts +12 -0
- package/dist/fields.js +44 -0
- package/dist/fields.kit.d.ts +63 -0
- package/dist/fields.kit.js +108 -0
- package/dist/fields.style.d.ts +4 -0
- package/dist/fields.style.js +19 -0
- package/dist/fields.types.d.ts +155 -0
- package/dist/fields.types.js +1 -0
- package/dist/format.d.ts +10 -0
- package/dist/format.js +28 -0
- package/dist/formations.d.ts +18 -0
- package/dist/formations.js +211 -0
- package/dist/frames-entry.d.ts +8 -0
- package/dist/frames-entry.js +7 -0
- package/dist/frames.d.ts +199 -0
- package/dist/frames.js +271 -0
- package/dist/frames.providers.d.ts +16 -0
- package/dist/frames.providers.js +302 -0
- package/dist/geojson-entry.d.ts +2 -0
- package/dist/geojson-entry.js +2 -0
- package/dist/geojson.d.ts +79 -0
- package/dist/geojson.js +147 -0
- package/dist/geometry-entry.d.ts +7 -0
- package/dist/geometry-entry.js +5 -0
- package/dist/geometry.d.ts +295 -0
- package/dist/geometry.js +361 -0
- package/dist/grounds-entry.d.ts +4 -0
- package/dist/grounds-entry.js +3 -0
- package/dist/grounds.d.ts +134 -0
- package/dist/grounds.data.d.ts +2 -0
- package/dist/grounds.data.js +1849 -0
- package/dist/grounds.js +74 -0
- package/dist/heat.colour.d.ts +37 -0
- package/dist/heat.colour.js +54 -0
- package/dist/heat.d.ts +43 -0
- package/dist/heat.js +614 -0
- package/dist/heat.stats.d.ts +123 -0
- package/dist/heat.stats.js +413 -0
- package/dist/heat.types.d.ts +145 -0
- package/dist/heat.types.js +1 -0
- package/dist/heat.zones.d.ts +54 -0
- package/dist/heat.zones.js +424 -0
- package/dist/homeside.d.ts +16 -0
- package/dist/homeside.js +43 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +29 -0
- package/dist/layers-entry.d.ts +19 -0
- package/dist/layers-entry.js +11 -0
- package/dist/layers.d.ts +41 -0
- package/dist/layers.env.d.ts +72 -0
- package/dist/layers.env.js +79 -0
- package/dist/layers.js +533 -0
- package/dist/layers.marks.d.ts +45 -0
- package/dist/layers.marks.js +168 -0
- package/dist/layers.types.d.ts +226 -0
- package/dist/layers.types.js +1 -0
- package/dist/layout.d.ts +97 -0
- package/dist/layout.js +381 -0
- package/dist/layout.style.d.ts +6 -0
- package/dist/layout.style.js +17 -0
- package/dist/layouts-entry.d.ts +5 -0
- package/dist/layouts-entry.js +4 -0
- package/dist/leagues/aussie.d.ts +57 -0
- package/dist/leagues/aussie.js +36 -0
- package/dist/leagues/baseball.d.ts +58 -0
- package/dist/leagues/baseball.js +171 -0
- package/dist/leagues/basketball.d.ts +67 -0
- package/dist/leagues/basketball.js +128 -0
- package/dist/leagues/courts.d.ts +212 -0
- package/dist/leagues/courts.js +114 -0
- package/dist/leagues/cricket.d.ts +45 -0
- package/dist/leagues/cricket.js +34 -0
- package/dist/leagues/curling.d.ts +64 -0
- package/dist/leagues/curling.js +53 -0
- package/dist/leagues/fieldhockey.d.ts +48 -0
- package/dist/leagues/fieldhockey.js +29 -0
- package/dist/leagues/fields.d.ts +10 -0
- package/dist/leagues/fields.js +6 -0
- package/dist/leagues/football.d.ts +8 -0
- package/dist/leagues/football.js +82 -0
- package/dist/leagues/gaelic.d.ts +50 -0
- package/dist/leagues/gaelic.js +29 -0
- package/dist/leagues/handball.d.ts +45 -0
- package/dist/leagues/handball.js +32 -0
- package/dist/leagues/hockey.d.ts +63 -0
- package/dist/leagues/hockey.js +166 -0
- package/dist/leagues/lacrosse.d.ts +103 -0
- package/dist/leagues/lacrosse.js +175 -0
- package/dist/leagues/rugby.d.ts +59 -0
- package/dist/leagues/rugby.js +72 -0
- package/dist/leagues/sources.d.ts +18 -0
- package/dist/leagues/sources.js +95 -0
- package/dist/leagues/types.d.ts +43 -0
- package/dist/leagues/types.js +5 -0
- package/dist/leagues-entry.d.ts +23 -0
- package/dist/leagues-entry.js +15 -0
- package/dist/leagues.d.ts +172 -0
- package/dist/leagues.js +462 -0
- package/dist/look.d.ts +50 -0
- package/dist/look.js +186 -0
- package/dist/mark.d.ts +35 -0
- package/dist/mark.js +59 -0
- package/dist/mount-entry.d.ts +2 -0
- package/dist/mount-entry.js +2 -0
- package/dist/mount.d.ts +63 -0
- package/dist/mount.js +167 -0
- package/dist/mow.d.ts +36 -0
- package/dist/mow.js +111 -0
- package/dist/names.d.ts +77 -0
- package/dist/names.js +97 -0
- package/dist/outline.d.ts +25 -0
- package/dist/outline.js +112 -0
- package/dist/parks-entry.d.ts +4 -0
- package/dist/parks-entry.js +3 -0
- package/dist/parks.d.ts +200 -0
- package/dist/parks.data.d.ts +2 -0
- package/dist/parks.data.js +4489 -0
- package/dist/parks.js +92 -0
- package/dist/plot-entry.d.ts +2 -0
- package/dist/plot-entry.js +2 -0
- package/dist/plot.d.ts +74 -0
- package/dist/plot.js +68 -0
- package/dist/png-entry.d.ts +2 -0
- package/dist/png-entry.js +2 -0
- package/dist/png.d.ts +26 -0
- package/dist/png.js +46 -0
- package/dist/ranges.d.ts +33 -0
- package/dist/ranges.js +178 -0
- package/dist/ranges.names.d.ts +31 -0
- package/dist/ranges.names.js +65 -0
- package/dist/react-entry.d.ts +2 -0
- package/dist/react-entry.js +2 -0
- package/dist/react.d.ts +53 -0
- package/dist/react.js +58 -0
- package/dist/replay-entry.d.ts +5 -0
- package/dist/replay-entry.js +4 -0
- package/dist/replay.control.d.ts +47 -0
- package/dist/replay.control.js +184 -0
- package/dist/replay.d.ts +170 -0
- package/dist/replay.dom.d.ts +21 -0
- package/dist/replay.dom.js +388 -0
- package/dist/replay.js +579 -0
- package/dist/replay.types.d.ts +152 -0
- package/dist/replay.types.js +1 -0
- package/dist/restyle.d.ts +21 -0
- package/dist/restyle.js +70 -0
- package/dist/road.d.ts +26 -0
- package/dist/road.draw.d.ts +6 -0
- package/dist/road.draw.js +269 -0
- package/dist/road.js +59 -0
- package/dist/road.model.d.ts +63 -0
- package/dist/road.model.js +215 -0
- package/dist/road.style.d.ts +7 -0
- package/dist/road.style.js +26 -0
- package/dist/road.types.d.ts +122 -0
- package/dist/road.types.js +1 -0
- package/dist/scene-entry.d.ts +7 -0
- package/dist/scene-entry.js +5 -0
- package/dist/scene.css.d.ts +44 -0
- package/dist/scene.css.js +296 -0
- package/dist/scene.d.ts +27 -0
- package/dist/scene.fit.d.ts +12 -0
- package/dist/scene.fit.js +18 -0
- package/dist/scene.flat.d.ts +38 -0
- package/dist/scene.flat.js +167 -0
- package/dist/scene.js +420 -0
- package/dist/scene.path.d.ts +40 -0
- package/dist/scene.path.js +357 -0
- package/dist/scene.types.d.ts +172 -0
- package/dist/scene.types.js +1 -0
- package/dist/scene.xml.d.ts +31 -0
- package/dist/scene.xml.js +81 -0
- package/dist/score.d.ts +70 -0
- package/dist/score.js +212 -0
- package/dist/sets.board.d.ts +22 -0
- package/dist/sets.board.js +89 -0
- package/dist/sheet.d.ts +18 -0
- package/dist/sheet.js +38 -0
- package/dist/special.d.ts +44 -0
- package/dist/special.js +204 -0
- package/dist/special.style.d.ts +8 -0
- package/dist/special.style.js +36 -0
- package/dist/strings.d.ts +581 -0
- package/dist/strings.js +411 -0
- package/dist/style.d.ts +35 -0
- package/dist/style.js +177 -0
- package/dist/surfaces/baseball.d.ts +33 -0
- package/dist/surfaces/baseball.js +208 -0
- package/dist/surfaces/baseball.walls.d.ts +16 -0
- package/dist/surfaces/baseball.walls.js +150 -0
- package/dist/surfaces/basketball.d.ts +8 -0
- package/dist/surfaces/basketball.js +199 -0
- package/dist/surfaces/curling.d.ts +23 -0
- package/dist/surfaces/curling.js +128 -0
- package/dist/surfaces/field.d.ts +12 -0
- package/dist/surfaces/field.js +163 -0
- package/dist/surfaces/football.d.ts +12 -0
- package/dist/surfaces/football.js +208 -0
- package/dist/surfaces/hockey.d.ts +10 -0
- package/dist/surfaces/hockey.js +166 -0
- package/dist/surfaces/net.d.ts +7 -0
- package/dist/surfaces/net.js +151 -0
- package/dist/surfaces/soccer-providers.d.ts +124 -0
- package/dist/surfaces/soccer-providers.js +334 -0
- package/dist/surfaces/soccer-spec.d.ts +138 -0
- package/dist/surfaces/soccer-spec.js +175 -0
- package/dist/surfaces/soccer.d.ts +25 -0
- package/dist/surfaces/soccer.js +270 -0
- package/dist/surfaces/surface.d.ts +180 -0
- package/dist/surfaces/surface.js +49 -0
- package/dist/team.common.d.ts +75 -0
- package/dist/team.common.js +97 -0
- package/dist/team.formation.d.ts +24 -0
- package/dist/team.formation.js +121 -0
- package/dist/team.geometry.d.ts +66 -0
- package/dist/team.geometry.js +304 -0
- package/dist/team.layers.d.ts +16 -0
- package/dist/team.layers.js +32 -0
- package/dist/team.motion.d.ts +9 -0
- package/dist/team.motion.js +325 -0
- package/dist/team.network.d.ts +43 -0
- package/dist/team.network.js +215 -0
- package/dist/team.shape.d.ts +12 -0
- package/dist/team.shape.js +217 -0
- package/dist/team.types.d.ts +189 -0
- package/dist/team.types.js +1 -0
- package/dist/text.d.ts +31 -0
- package/dist/text.js +88 -0
- package/dist/themes.d.ts +14 -0
- package/dist/themes.js +24 -0
- package/dist/types.d.ts +565 -0
- package/dist/types.js +1 -0
- package/dist/units.d.ts +45 -0
- package/dist/units.js +90 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.js +2 -0
- package/package.json +234 -4
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { fixed, span } from "./fields.js";
|
|
2
|
+
import { inFeet } from "./types.js";
|
|
3
|
+
/** A rugby field's figures in feet, from the unit its rulebook gives them in. */
|
|
4
|
+
export const rugbyInFeet = (figures, unit) => inFeet(figures, unit);
|
|
5
|
+
const none = () => ({ twentyTwo: null, tenFromHalfway: null, dash: null, dashFromTouch: [], dashFromTry: null, halfwayMark: null, flagsOutside: null });
|
|
6
|
+
const noLeague = () => ({ step: null, red: [], scrum: [], scrumWidth: null });
|
|
7
|
+
/**
|
|
8
|
+
* World Rugby's field, from Law 1 of the Laws of the Game, Rugby Union, 2026: the field of play 94 to 100 m between the try lines and 68 to 70 m wide; each in-goal 6 to 22 m deep
|
|
9
|
+
* (10 m is drawn: the Laws name none); the 22-metre lines 22 m from the try lines; the 10-metre dash lines 10 m either side of the half-way line; dash lines 5 m and 15 m from the touchlines and 5 m
|
|
10
|
+
* from the try lines, each dash 5 m; the half-way mark 0.5 m long; the goal posts 5.6 m apart on the try line, the crossbar 3 m to its top edge; flags 2 m outside the touchlines. Law 1 gives
|
|
11
|
+
* no width for the lines: 0.1 m is drawn.
|
|
12
|
+
*/
|
|
13
|
+
export const WORLD_RUGBY_FIELD = {
|
|
14
|
+
code: "union",
|
|
15
|
+
length: span(94, 100),
|
|
16
|
+
width: span(68, 70),
|
|
17
|
+
inGoal: span(6, 22, 10),
|
|
18
|
+
lineWidth: 0.1,
|
|
19
|
+
postsApart: 5.6,
|
|
20
|
+
crossbar: 3,
|
|
21
|
+
twentyTwo: 22,
|
|
22
|
+
tenFromHalfway: 10,
|
|
23
|
+
dash: 5,
|
|
24
|
+
dashFromTouch: [5, 15],
|
|
25
|
+
dashFromTry: 5,
|
|
26
|
+
halfwayMark: 0.5,
|
|
27
|
+
flagsOutside: 2,
|
|
28
|
+
...noLeague(),
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* The NRL's field, from Section 1 and Section 18 of the Rugby League Laws of the Game, International Level (2023 edition): 100 m between the goal lines, 68 m wide, in-goal areas 68 by 8 m,
|
|
32
|
+
* goal posts 5.5 m apart and 16 m high, lines 15 cm wide, white, at every 10 m from each goal line to the half-way line, those at 20 m and 40 m red; scrum lines 10 m and 20 m in from each touchline
|
|
33
|
+
* (10 cm). The section also prints a media line 1.5 m outside each touchline, which is not drawn: it gives no length. The crossbar's height, 3 m, is the plan's label in Section 1.
|
|
34
|
+
*/
|
|
35
|
+
export const NRL_FIELD = {
|
|
36
|
+
code: "league",
|
|
37
|
+
length: fixed(100),
|
|
38
|
+
width: fixed(68),
|
|
39
|
+
inGoal: fixed(8),
|
|
40
|
+
lineWidth: 0.15,
|
|
41
|
+
postsApart: 5.5,
|
|
42
|
+
crossbar: 3,
|
|
43
|
+
...none(),
|
|
44
|
+
step: 10,
|
|
45
|
+
red: [20, 40],
|
|
46
|
+
scrum: [10, 20],
|
|
47
|
+
scrumWidth: 0.1,
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* The IRL's field, from Section 1 of the International Laws of the Game (2024): 100 m between the goal lines, 68 m wide, in-goal 6 to 11 m (8 m, the NRL's, is drawn), goal posts 5.5 m apart
|
|
51
|
+
* with the crossbar 3 m up, a line across the field at every 10 m from each goal line to the half-way line. The book prints no line width and no red lines: the NRL's 15 cm is drawn, in white.
|
|
52
|
+
*/
|
|
53
|
+
export const IRL_FIELD = {
|
|
54
|
+
code: "league",
|
|
55
|
+
length: fixed(100),
|
|
56
|
+
width: fixed(68),
|
|
57
|
+
inGoal: span(6, 11, 8),
|
|
58
|
+
lineWidth: 0.15,
|
|
59
|
+
postsApart: 5.5,
|
|
60
|
+
crossbar: 3,
|
|
61
|
+
...none(),
|
|
62
|
+
step: 10,
|
|
63
|
+
red: [],
|
|
64
|
+
scrum: [],
|
|
65
|
+
scrumWidth: null,
|
|
66
|
+
};
|
|
67
|
+
/** The rugby leagues, World Rugby's first. */
|
|
68
|
+
export const RUGBY_LEAGUES = [
|
|
69
|
+
{ id: "world-rugby", family: "rugby", name: { en: "World Rugby field (rugby union)", ja: "ワールドラグビーのグラウンド(ラグビーユニオン)" }, unit: "m", dimensions: WORLD_RUGBY_FIELD, sources: ["world-rugby-laws"], builtIn: true },
|
|
70
|
+
{ id: "nrl", family: "rugby", name: { en: "NRL field (rugby league)", ja: "NRLのグラウンド(ラグビーリーグ)" }, unit: "m", dimensions: NRL_FIELD, sources: ["nrl-laws"] },
|
|
71
|
+
{ id: "irl", family: "rugby", name: { en: "International Rugby League field", ja: "国際ラグビーリーグ連盟のグラウンド" }, unit: "m", dimensions: IRL_FIELD, sources: ["irl-laws"] },
|
|
72
|
+
];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** A rulebook (or a page that publishes its figures). */
|
|
2
|
+
export interface LeagueSource {
|
|
3
|
+
id: string;
|
|
4
|
+
/** The document: "NCAA Men's and Women's Basketball Rules and Interpretations". */
|
|
5
|
+
title: string;
|
|
6
|
+
/** Who publishes it. */
|
|
7
|
+
by: string;
|
|
8
|
+
/** The edition: a season or a year. */
|
|
9
|
+
edition: string;
|
|
10
|
+
/** The address it was read at, on the date in `read`. */
|
|
11
|
+
url: string;
|
|
12
|
+
/** The date it was read (yyyy-mm-dd). */
|
|
13
|
+
read: string;
|
|
14
|
+
/** What was taken from it. */
|
|
15
|
+
note?: string;
|
|
16
|
+
}
|
|
17
|
+
/** Every document a league's figures were read from, by id. */
|
|
18
|
+
export declare const LEAGUE_SOURCES: Readonly<Record<string, Readonly<LeagueSource>>>;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// Where each league's figures were read: the rulebook, its edition, and the page it was read on. docs/sources.md has the rule for
|
|
2
|
+
// each figure. A rulebook's text is not copied; only its dimensions, which are facts.
|
|
3
|
+
const source = (s) => [s.id, Object.freeze(s)];
|
|
4
|
+
const READ = "2026-10-13";
|
|
5
|
+
/** Every document a league's figures were read from, by id. */
|
|
6
|
+
export const LEAGUE_SOURCES = Object.freeze(Object.fromEntries([
|
|
7
|
+
// The leagues the package started with.
|
|
8
|
+
source({ id: "nba-rules", title: "Official Rules of the National Basketball Association, Rule No. 1, Section I and the court diagram", by: "NBA", edition: "2026-27", url: "https://ak-static.cms.nba.com/wp-content/uploads/sites/4/2026/10/2026-27-Official-NBA-Playing-Rules.pdf", read: READ, note: "the NBA court" }),
|
|
9
|
+
source({ id: "nhl-rules", title: "National Hockey League Official Rules, Rule 1 and the rink diagram", by: "NHL", edition: "2025-26 (the 2026-27 Rule 1 is the same)", url: "https://media.nhl.com/site/asset/public/ext/2025-26/2025-26Rules.pdf", read: READ, note: "the NHL rink" }),
|
|
10
|
+
source({ id: "nfl-rules", title: "Official Playing Rules of the National Football League, Rule 1", by: "NFL", edition: "2025", url: "https://operations.nfl.com/the-rules/nfl-rulebook/", read: "2026-10-13", note: "the NFL field" }),
|
|
11
|
+
source({ id: "cfl-rules", title: "CFL Rule Book, The Field", by: "Canadian Football League", edition: "2025", url: "https://www.cfldb.ca/rulebook/conduct-of-the-game/the-field/", read: "2026-10-13", note: "the CFL field" }),
|
|
12
|
+
source({ id: "ifaf-2021", title: "IFAF Rules 2021, Appendix D, Field Diagrams", by: "International Federation of American Football", edition: "2021", url: "http://www.myiafoa.org/rules/ifaf2021/FieldDiagrams.pdf", read: "2026-10-12", note: "the IFAF field" }),
|
|
13
|
+
source({ id: "obr", title: "Official Baseball Rules, 2.01 to 2.05", by: "Major League Baseball", edition: "2025", url: "https://www.mlb.com/official-information/official-rules", read: "2026-10-13", note: "the baseball field" }),
|
|
14
|
+
// Hockey.
|
|
15
|
+
source({ id: "iihf-2025", title: "IIHF Official Rule Book, Rule 1 (1.2, 1.5, 1.7 to 1.9) and Appendix VI", by: "International Ice Hockey Federation", edition: "2025/26 (v1, 30 June 2025); 2026/27 the same", url: "https://blob.iihf.com/iihf-media/iihfmvc/media/contentimages/4_sport/officiating/rule_book/25_26/2025-26_iihf_rulebook_30062025-v1.pdf", read: READ, note: "60 m long, 26 to 30 m wide, corners 7.0 to 8.5 m, goal line 4.0 m, blue line 22.50 m (diagram), circle 4.50 m, neutral spots 1.50 m, trapezoid 6.80 and 8.60 m, officials' crease 3.0 m; the end-zone spots (6.00 and 7.00 m) and the crease are read from the diagram" }),
|
|
16
|
+
source({ id: "iihf-2018", title: "IIHF Official Rule Book 2018-2022, Rules 12, 17, 18 and 19 (Hungarian federation's translation)", by: "International Ice Hockey Federation, translated by the Hungarian Ice Hockey Federation", edition: "2018-2022", url: "https://www.jegkorongszovetseg.hu/_upload/editor/jatekvezetes/IIHF_Szabalykonyv_2018-2022_HUN.pdf", read: READ, note: "blue lines 22.86 m (75 feet) from the end boards, no goalkeeper's restricted area; the goal crease changed in 2018 to match the NHL's (IIHF news, 2 July 2018, eu-west.iihf.com/en/news/7618/new-rule-book-is-here)" }),
|
|
17
|
+
source({ id: "iihf-2021", title: "The new rule book is here (the unified rule book of 2021/22 introduced a restricted area for goalkeepers behind the net)", by: "IIHF news, 25 June 2021", edition: "2021/22", url: "https://eu-west.iihf.com/en/news/26475/the_new_rule_book_is_here", read: READ, note: "the goalkeepers' restricted area" }),
|
|
18
|
+
source({ id: "iihf-2022-23", title: "IIHF Ice Hockey Rules 2022-2023, Appendix diagram (a flipbook of the rule book)", by: "Suomen Jääkiekkoliitto, reproducing the IIHF rule book", edition: "2022/23", url: "https://www.jaakiekkokirja.fi/digijulkaisut/icehockeyrules2022-2023/233/", read: READ, note: "the diagram's 2250 (22.50 m) blue-line distance and the trapezoid; third-party copy" }),
|
|
19
|
+
source({ id: "ncaa-hockey", title: "NCAA Men's and Women's Ice Hockey Rules and Interpretations, Rules 1.2 to 1.10 and the diagrams", by: "NCAA", edition: "2026-27 and 2027-28 (August 2026)", url: "https://ncaaorg.s3.amazonaws.com/championships/sports/icehockey/rules/PRXIH_RulesBook.pdf", read: READ, note: "200 by 85 feet, corners 20 feet (1.2), goal line 11 feet preferred (1.4), blue line 64 feet from the goal lines preferred (1.4), hash marks 5 ft 7 in recommended (1.9)" }),
|
|
20
|
+
source({ id: "ncaa-news-2026", title: "Cut-resistant equipment approved in ice hockey for DI men, NC women", by: "NCAA.org, 23 July 2026", edition: "2026-27", url: "https://www.ncaa.org/cut-resistant-equipment-approved-in-ice-hockey-for-di-men-nc-women/", read: READ, note: "Division I men's games use a trapezoid from 2026-27, Division III from 2027-28" }),
|
|
21
|
+
source({ id: "ahl-2025", title: "American Hockey League Official Rules, Rule 1", by: "American Hockey League", edition: "2025-26", url: "https://www.amerks.com/assets/doc/2025-26_AHLRuleBook-7cdc4508dc.pdf", read: READ, note: "the same Rule 1 as the NHL's; copy hosted by a member club" }),
|
|
22
|
+
source({ id: "ahl-2005", title: "AHL announces rules package for 2005-06", by: "American Hockey League, 10 August 2005", edition: "2005-06", url: "https://theahl.com/news/ahl-announces-rules-package-for-2005-06", read: READ, note: "the neutral-zone edge of the blue lines moved 4 feet towards centre ice, 64-foot attack zones and a 50-foot neutral zone; the goal lines stay at 11 feet" }),
|
|
23
|
+
source({ id: "echl-2025", title: "ECHL Official Rules, Rule 1", by: "ECHL", edition: "2025-26 and 2026-27", url: "https://echl.s3.us-east-2.amazonaws.com/production/echl/uploads/files/2026-27%20ECHL%20Official%20Rulebook.pdf", read: READ, note: "the same Rule 1 as the NHL's" }),
|
|
24
|
+
source({ id: "ohl-2025", title: "Ontario Hockey League Official Rules, Rule 1", by: "Ontario Hockey League", edition: "2025-26", url: "https://media.chl.ca/wp-content/uploads/sites/5/2025/10/24132227/2025-2026-OHL-Rule-Book.pdf", read: READ, note: "the same Rule 1 as the NHL's" }),
|
|
25
|
+
source({ id: "whl-2025", title: "WHL Rule Book, Rule 1", by: "Western Hockey League", edition: "2025-26", url: "https://media.chl.ca/wp-content/uploads/sites/6/2025/10/01111556/2025-26-WHL-Rule-Book.pdf", read: READ, note: "the same Rule 1 as the NHL's" }),
|
|
26
|
+
source({ id: "qmjhl-2025", title: "QMJHL Playing Rules, Rule 1", by: "Quebec Maritimes Junior Hockey League", edition: "2025-26", url: "https://media.chl.ca/wp-content/uploads/sites/2/2025/10/07110453/QMJHL-Playing-Rules-2025-2026.pdf", read: READ, note: "the NHL's Rule 1 with hash marks 2 feet long and 5 feet apart" }),
|
|
27
|
+
source({ id: "usa-hockey-junior", title: "Official Rules of Ice Hockey, Junior Hockey Edition, Rules 101 to 105 and the rink diagrams", by: "USA Hockey", edition: "2025-29 (adopted 19 January 2025)", url: "https://cdn3.sportngin.com/attachments/document/e6a1-3442852/2025-29_USAH_Playing_Rules_-_Junior.pdf", read: READ, note: "the rink the USHL's own rules send its clubs to" }),
|
|
28
|
+
source({ id: "ushl-2021", title: "USHL Rules and Regulations, 9.2", by: "United States Hockey League", edition: "2021-22 (the only USHL document found)", url: "https://cdn1.sportngin.com/attachments/document/69ff-2563252/USHL_Rules_and_Regulations_2021-22.pdf", read: READ, note: "rinks must comply with the USA Hockey Junior rulebook" }),
|
|
29
|
+
source({ id: "pwhl-2025", title: "PWHL Official Rulebook, Rule 1, 1.8 and 27.8", by: "Professional Women's Hockey League", edition: "2025-26", url: "https://assets.contentstack.io/v3/assets/bltebdb4296e05d53db/bltb8440fe08a5e6dc5/69178cd0a582d7db321ad107/2025-2026_PWHL_Rulebook.pdf", read: READ, note: "the NHL's Rule 1 with no restricted area for goalkeepers" }),
|
|
30
|
+
// Basketball.
|
|
31
|
+
source({ id: "wnba-rules", title: "Official Rules of the WNBA, Rule No. 1, Section I and diagram A", by: "WNBA", edition: "2026", url: "https://cdn.wnba.com/sites/4/2026/05/2026-WNBA-Official-Rule-Book.pdf", read: READ, note: "the WNBA court: three-point 22 ft 1¾ in, parallel lines 36 in from the sidelines, lane 16 feet, restricted area 4 feet" }),
|
|
32
|
+
source({ id: "seattle-times-2003", title: "WNBA to have wider lane, extended three-point line", by: "The Seattle Times, 18 December 2003", edition: "2004 season", url: "https://archive.seattletimes.com/archive/20031218/digs18/wnba-to-have-wider-lane-extended-three-point-line", read: READ, note: "the lane widened from 12 to 16 feet for 2004" }),
|
|
33
|
+
source({ id: "fiba-rules", title: "FIBA Official Basketball Rules, Rule Two, Article 2 Court, and the Equipment rules 1.1.8 and 1.2.1", by: "FIBA", edition: "2026 (v1.0, valid 1 October 2026)", url: "https://assets.fiba.basketball/image/upload/documents-corporate-fiba-official-rules-2026-v1-0.pdf", read: READ, note: "the FIBA court in metres; the backboard and ring from the Equipment rules (documents-corporate-fiba-official-rules-2026-equipment-v1-0.pdf)" }),
|
|
34
|
+
source({ id: "ncaa-men-basketball", title: "NCAA Men's Basketball Rules, Rule 1 and the court diagram", by: "NCAA", edition: "2026-27", url: "https://ncaaorg.s3.amazonaws.com/championships/sports/basketball/rules/men/PRMBB_RulesBook.pdf", read: READ, note: "the men's court: lane 12 feet, three-point 22 ft 1¾ in (21 ft 7⅞ in in the corners), restricted-area arc 4 feet (1-8)" }),
|
|
35
|
+
source({ id: "ncaa-women-basketball", title: "NCAA Women's Basketball Rules, Rule 1 and the court diagram", by: "NCAA", edition: "2025-26 and 2026-27", url: "https://ncaaorg.s3.amazonaws.com/championships/sports/basketball/rules/women/PRWBB_RulesBook.pdf", read: READ, note: "the women's court, the same as the men's except that the restricted area needs no arc (1-8-1)" }),
|
|
36
|
+
source({ id: "ncaa-women-history", title: "Women's Basketball Playing Rules History", by: "NCAA", edition: "2023-24", url: "https://ncaaorg.s3.amazonaws.com/championships/sports/basketball/rules/women/2023-24PRWBB_PlayingRulesHistory.pdf", read: READ, note: "the restricted-area arc increased to 4 feet (2017-18) and reduced to the area under the basket (2023-24)" }),
|
|
37
|
+
source({ id: "ncaa-news-2011", title: "Rules panel approves restricted-area arc for Division I", by: "NCAA News, 26 May 2011", edition: "2011-12", url: "https://s3.amazonaws.com/ncaanewsarchive/2011/may/rules-panel-approves-restricted-area-arc-for-division-i.html", read: READ, note: "a restricted-area arc 3 feet from the centre of the basket in Division I men's and women's games from 2011-12" }),
|
|
38
|
+
source({ id: "ncaa-news-2015", title: "Men's basketball rules committee recommends package of proposals", by: "NCAA.com, 15 May 2015", edition: "2015-16", url: "https://www.ncaa.com/news/basketball-men/article/2015-05-15/mens-basketball-rules-committee-recommends-package-proposals", read: READ, note: "the restricted-area arc from 3 to 4 feet" }),
|
|
39
|
+
source({ id: "nfhs-basketball", title: "NFHS Basketball Rules, Rule 1 (2017-18 text) and the Basketball Court Diagram", by: "National Federation of State High School Associations", edition: "2017-18 text; undated current diagram; no Rule 1 change in 2025-26", url: "https://assets.nfhs.org/umbraco/media/7213108/basketball-court-diagram.pdf", read: READ, note: "the 84 by 50 foot ideal court, 12-foot lane, 19 ft 9 in three-point line; the current rule text is sold, not posted" }),
|
|
40
|
+
source({ id: "gleague-faq", title: "NBA G League FAQ, item 23", by: "NBA G League", edition: "2025-26", url: "https://gleague.nba.com/faq", read: READ, note: "the court is 50 feet wide and 94 feet long with the NBA's three-point arc" }),
|
|
41
|
+
source({ id: "gleague-rules", title: "NBA G League playing rules", by: "NBA G League", edition: "2025-26", url: "https://gleague.nba.com/gleague-playing-rules", read: READ, note: "its rules are in addition to the standard NBA game rules" }),
|
|
42
|
+
// Football.
|
|
43
|
+
source({ id: "ncaa-football", title: "NCAA Football Rules and Interpretations, Rules 1-2, 2-12 and Appendix D", by: "NCAA", edition: "2026", url: "https://ncaaorg.s3.amazonaws.com/championships/sports/football/rules/PRMFB_RulesBook.pdf", read: READ, note: "100 yards between the goal lines, hash marks 60 feet from the sidelines (1-2-1-j), numbers' tops 9 yards in (1-2-1-h), posts 18 ft 6 in apart on the end line (1-2-5)" }),
|
|
44
|
+
source({ id: "nfhs-football", title: "NFHS Football Rules Book, Rules 1-1, 1-2 and 2-10, and Nine-, Eight- and Six-Player Rules Differences", by: "National Federation of State High School Associations", edition: "2021 text (the 2026 text is sold, not posted)", url: "https://dt5602vnjxv0c.cloudfront.net/portals/50139/docs/2021%20nfhs%20football%20rules%20book.pdf", read: READ, note: "360 by 160 feet, hash marks 53 ft 4 in (1-2-3e), posts 23 ft 4 in apart (1-2-5c); 80 by 40 yards for 9, 8 and 6 players" }),
|
|
45
|
+
source({ id: "nfhs-diagrams", title: "NFHS Football Field Diagrams: eleven-player, nine-player, eight- and six-player", by: "National Federation of State High School Associations", edition: "2026", url: "https://khsaa.org/common_documents/Rules-Football-Rules%20and%20NFHS%20Guidance/2026//2026%20NFHS%20Football%20Field%20Diagrams%20-%20FINAL.pdf", read: READ, note: "hash marks 48 ft 4 in (nine-player) and 45 feet (eight- and six-player) from each sideline; copy hosted by the KHSAA" }),
|
|
46
|
+
source({ id: "nsaa-eight", title: "Eight-Player Rules Differences", by: "Nebraska School Activities Association", edition: "updated 11 June 2026", url: "https://nsaa-static.s3.amazonaws.com/textfile/fbl/8player.pdf", read: READ, note: "80 yards between the goal lines, 40 wide, 15-yard side zones" }),
|
|
47
|
+
source({ id: "uil-six", title: "UIL Exceptions for Six Player Football to the NCAA Rules", by: "University Interscholastic League (Texas)", edition: "effective August 28, 2026", url: "https://taso.org/wp-content/uploads/2026/09/2026-UIL-6-Player-Exceptions-to-NCAA-Rules-AUGUST-2026-REVISION.pdf", read: READ, note: "80 by 40 yards, hash marks 40 feet from the sidelines, goal posts 25 feet apart; copy hosted by TASO" }),
|
|
48
|
+
source({ id: "ifl-2024", title: "2024 IFL Rule Book, Rule 1 Articles 2, 3 and 5", by: "Indoor Football League", edition: "revised 4 February 2024", url: "https://s3.us-east-2.amazonaws.com/sidearm.nextgen.sites/nazwranglers.com/documents/2024/4/19/IFL_2024_Website_Rule_Book.pdf", read: READ, note: "50 by 28 yards, 8-yard end zones, hash marks 30 feet apart (wide set), posts 10 feet apart on the end line; copy hosted by a member club" }),
|
|
49
|
+
// Curling.
|
|
50
|
+
source({ id: "wcf-rules", title: "The Rules of Curling and Rules of Competition, R1 Sheet, R2 Stones, R6 Free Guard Zone, R12 Scoring and the definitions", by: "World Curling", edition: "1 September 2026", url: "https://www.worldcurling.org/wp-content/uploads/2026/10/Rules-2026_Clean.pdf", read: READ, note: "sheet at least 45.720 m (146 ft in an existing facility) by at most 4.750 m (at least 4.420 m), tee line centre 17.375 m (57 ft) from the middle, back line outside edge 1.829 m from the tee, hog line inside edge 6.401 m, circles 1.829, 1.219, 0.610 m and a button of at least 0.152 m, hog line 102 mm wide, centre line 3.658 m beyond the tee, hack line 457 mm, courtesy lines 152 mm and 1.219 m outside the hog lines, hacks 76 mm from the middle; a stone's circumference at most 914 mm; the free guard zone between the tee line and the hog line, excluding the house; a stone in or touching the house scores" }),
|
|
51
|
+
source({ id: "curling-canada-rules", title: "Rules of Curling for General Play, Rule 3 Sheet of Ice, 4 Stones, 12 Free Guard Zone and 13 Stones in Play and Scoring", by: "Curling Canada", edition: "September 2022 to August 2026", url: "https://apollocurling.com/docs/Rule-Book-2022_General-Play_ENG_CC.pdf", read: READ, note: "read from a club's copy of the book (the book is listed at curling.ca/?p=614): 146 to 150 ft by 14 ft 2 in to 15 ft 7 in, 114 ft from tee to tee, back line 6 ft from the tee, hog line inside edge 21 ft, circles of 6, 4 and 2 ft and a button of at least 6 in, centre line and hacks 12 ft beyond the tee, a stone's circumference at most 36 in; any part of a stone within 6 ft of the tee is eligible to count; no hack line and no courtesy line" }),
|
|
52
|
+
// The net sports.
|
|
53
|
+
source({ id: "itf-rules", title: "Rules of Tennis, Rule 1 The Court, Rule 5 Score in a Game, Rule 6 Score in a Set and Appendix X", by: "International Tennis Federation", edition: "2026", url: "https://www.itftennis.com/media/7221/2026-rules-of-tennis-english.pdf", read: READ, note: "read in Tennis Canada's Rules of the Court 2026 (https://assets.tenniscanada.com/production/Rules-of-the-Court-2026.pdf), which prints the ITF's Rules of Tennis in full, because the ITF's own server refused an automated download: 78 ft by 27 ft (singles) or 36 ft (doubles), net 3 ft 6 in at the posts and 3 ft at the centre, posts' centres 3 ft outside the doubles court and singles sticks' 3 ft outside the singles court, service lines 21 ft from the net, centre mark 4 in, centre service line and centre mark 2 in wide, other lines 1 to 2 in and baselines up to 4 in, all measured to the outside of the lines; Appendix X's 21 ft behind the baselines and 12 ft beside the sidelines for international play, 18 ft and 10 ft for clubs; the ATP and the WTA play by these rules" }),
|
|
54
|
+
source({ id: "fivb-volleyball", title: "Official Volleyball Rules 2025-2028, Rules 1 Playing Area and 2 Net and Posts, and Diagram 2", by: "FIVB", edition: "2025-2028 (approved by the 39th FIVB World Congress 2024, in force from 1 January 2025)", url: "https://www.fivb.com/wp-content/uploads/2025/01/FIVB-Volleyball_Rules2025_2028-EN-v05.pdf", read: READ, note: "18 by 9 m inside a free zone of at least 3 m (5 m beside the side lines and 6.5 m behind the end lines for FIVB competitions) (1.1), lines 5 cm wide drawn inside the dimensions (1.3.1, 1.3.2), the axis of the centre line (1.3.3), the attack line's rear edge 3 m from it and, for FIVB competitions, extended by five 15 cm lines 20 cm apart to 1.75 m (1.3.4), the service zone 9 m wide limited by two 15 cm lines 20 cm behind the end line (1.4.2), the net 1 m wide and 9.50 to 10 m long (2.2), 2.43 m (men) and 2.24 m (women) high (2.1.1), side bands over the side lines (2.3), antennae 1.80 m long and 10 mm across at the outer edge of the side bands (2.4), posts 0.50 to 1.00 m outside the side lines, 1 m for FIVB competitions (2.5.1); a set to 25 (6.2), the deciding fifth to 15 (6.3.2)" }),
|
|
55
|
+
source({ id: "fivb-beach", title: "Official Beach Volleyball Rules 2025-2028, Rules 1 Playing Area and 2 Net and Posts, and Diagram 2", by: "FIVB", edition: "2025-2028 (approved by the 39th FIVB World Congress 2024, in force from 1 January 2025)", url: "https://www.fivb.com/wp-content/uploads/2025/02/FIVB-BeachVolleyball_Rules2025_2028-EN-v01.pdf", read: READ, note: "16 by 8 m inside a free zone of at least 3 m, at least 5 m and at most 6 m for FIVB competitions (1.1.1, 1.1.2), lines 5 cm wide placed inside the dimensions, no centre line (1.3.1, 1.3.2), the service zone 8 m wide (1.4.1), the net 8.5 m long and 1 m wide (2.2), 2.43 m and 2.24 m high (2.1.1), side bands and antennae as indoors (2.3, 2.4), posts 0.70 to 1.00 m outside the side lines, 1 m for FIVB competitions (2.5.1); a set to 21 (6.2), the deciding third to 15 (6.3.2)" }),
|
|
56
|
+
source({ id: "bwf-laws", title: "Laws of Badminton, Law 1 Court and Court Equipment and Diagram A, Law 7 Scoring System", by: "Badminton World Federation", edition: "as amended and adopted by the BWF 26 April 2025 (the 2026 amendments take effect on 4 January 2027 and could not be read)", url: "https://worldbadminton.com/laws/rules_2025.htm", read: READ, note: "lines 40 mm wide (1.1), posts 1.55 m on the doubles side lines (1.4, 1.5), net 760 mm deep and at least 6.1 m wide (1.7), 1.524 m at the centre and 1.55 m over the side lines (1.10); Diagram A (https://worldbadminton.com/laws/images/courtDiagram.png): 13 400 by 6 100 mm overall, singles side lines 460 mm inside the doubles side lines (40 + 420), doubles long service lines 760 mm inside the back boundary lines (40 + 720), short service lines 1 980 mm from the net, centre lines from the short service lines to the back boundary lines; a game to 21, at 20-all a two-point lead, at 29-all the 30th point (7.2, 7.4, 7.5), best of three games (7.1)" }),
|
|
57
|
+
source({ id: "usap-rulebook", title: "USA Pickleball Official Rulebook, Section 3 Court and Equipment (3.A and 3.B)", by: "USA Pickleball", edition: "2026", url: "https://pickleballcanada.org/wp-content/uploads/2026/03/2026-Official-Rulebook-EN.pdf", read: READ, note: "the 2026 rulebook as hosted by Pickleball Canada: 20 by 44 ft to the outside edge of the lines (3.A.1, 3.A.2), a playing surface of at least 30 by 60 ft and the recommended 34 by 64 ft for tournaments (3.A.3), the non-volley zone 7 ft from the net (3.A.4.c), the centerline (3.A.4.d), lines 2 in wide (3.A.4.e), posts 22 ft apart inside to inside and at most 3 in across (3.B.2), net at least 21 ft 9 in long (3.B.3), 36 in at the sidelines and 34 in at the center (3.B.6, 3.B.7); games to 11, 15 or 21 (15.C)" }),
|
|
58
|
+
source({ id: "ittf-laws", title: "Laws of Table Tennis, 2.1 The Table, 2.2 The Net Assembly, 2.11 A Game and 2.12 A Match", by: "International Table Tennis Federation", edition: "2026 statutes, as reproduced by Table Tennis England (issue 1, July 2026)", url: "https://www.tabletennisengland.co.uk/content/uploads/2026/07/Laws-of-Table-Tennis-2026-27.pdf", read: READ, note: "the ITTF Handbook itself was not read: the playing surface 2.74 by 1.525 m and 76 cm above the floor (2.1.1), a white side line and end line 2 cm wide (2.1.4), a white centre line 3 mm wide for doubles (2.1.6), the net 15.25 cm above the playing surface (2.2.3) on posts 15.25 cm high whose outside limits are 15.25 cm outside the side line (2.2.2); a game to 11 (2.11.1), a match the best of an odd number of games (2.12.1)" }),
|
|
59
|
+
// The field sports.
|
|
60
|
+
source({ id: "world-rugby-laws", title: "Laws of the Game, Rugby Union, Law 1 The ground (1.3 to 1.10) and its ground diagram", by: "World Rugby", edition: "2026 (the book's own label; no date of effect is printed)", url: "https://passport.world.rugby/media/jxrnmptk/2026en-laws-of-the-game-compressed.pdf", read: READ, note: "the field of play, in-goal, the 22-metre line, the 10-metre, 5-metre and 15-metre dash lines (each dash 5 m), the half-way mark, the goal posts and the flag posts; the places of the dashes are read from the ground diagram on page 26" }),
|
|
61
|
+
source({ id: "nrl-laws", title: "Rugby League Laws of the Game, International Level, with Notes on the Laws and NRL Telstra Premiership Interpretations, Section 1 The Playing Field and Section 18 Ground Markings and Dimension Guidelines", by: "National Rugby League", edition: "2023 edition (April 2023)", url: "https://Nrl.Com/siteassets/operations/the-game/nrl-international-rules-book-2023.pdf", read: READ, note: "100 m by 68 m, in-goal 68 by 8 m, posts 5.5 m apart and 16 m high, lines 15 cm, red 20 m and 40 m lines, scrum lines 10 m and 20 m in from the touchlines" }),
|
|
62
|
+
source({ id: "irl-laws", title: "The International Laws of the Game and Notes on the Laws, Section 1 The Playing Field and its plan", by: "International Rugby League", edition: "2024 (the cover's year; the file is named 2022)", url: "https://intrl.sport/uploads/docs/international-rugby-league-laws-of-the-game-2022%20%283%29.pdf", read: READ, note: "100 m between the goal lines, 68 m wide, in-goal 6 to 11 m, a line every 10 m, posts 5.50 m apart and 16 m high, the crossbar 3 m" }),
|
|
63
|
+
source({ id: "afl-laws", title: "Laws of Australian Football, Law 3 Playing Surface and Posts (3.2 to 3.5) and Diagram 1", by: "Australian Football League", edition: "2026", url: "https://play.afl/sites/default/files/2026-02/Laws%20of%20Australian%20Football%202026.pdf", read: READ, note: "the oval, its length and width, the posts, the goal square, the centre square and circles, the Fifty Metre Arcs" }),
|
|
64
|
+
source({ id: "afl-venue-mcg", title: "MCG, Ground dimensions", by: "afl.com.au", edition: "the page as read", url: "https://www.afl.com.au/venues/13", read: READ, note: "160m x 141m" }),
|
|
65
|
+
source({ id: "afl-venue-optus", title: "Optus Stadium, Ground dimensions", by: "afl.com.au", edition: "the page as read", url: "https://www.afl.com.au/venues/65", read: READ, note: "165m x 130m; the stadium's own fact sheet says \"boundary line to boundary line\"" }),
|
|
66
|
+
source({ id: "afl-venue-gabba", title: "Gabba, Ground dimensions", by: "afl.com.au", edition: "the page as read", url: "https://www.afl.com.au/venues/22", read: READ, note: "156m x 138m" }),
|
|
67
|
+
source({ id: "afl-venue-scg", title: "SCG, Ground dimensions", by: "afl.com.au", edition: "the page as read", url: "https://www.afl.com.au/venues/9", read: READ, note: "149m x 136m" }),
|
|
68
|
+
source({ id: "afl-venue-marvel", title: "Marvel Stadium, Ground dimensions", by: "afl.com.au", edition: "the page as read", url: "https://www.afl.com.au/venues/3", read: READ, note: "159.5m x 128.8m" }),
|
|
69
|
+
source({ id: "afl-venue-gmhba", title: "GMHBA Stadium, Ground dimensions", by: "afl.com.au", edition: "the page as read", url: "https://www.afl.com.au/venues/15", read: READ, note: "170m x 114m" }),
|
|
70
|
+
source({ id: "gaa-guide", title: "Official Guide Part 2, Rules of Specification, Rule 1 The Field of Play (1.1 to 1.7) and its diagram", by: "Gaelic Athletic Association", edition: "effective from 27 March 2026 (the 2025 edition's Rule 1 is word for word the same)", url: "https://www.gaa.ie/api/images/image/upload/t_q-best/prd/xi4oyuttzqpaqr2vfhbn.pdf", read: READ, note: "one field for hurling and football: 130 to 145 m by 80 to 90 m, the lines at 13, 20, 45 and 65 m, the rectangles, the arcs, the posts" }),
|
|
71
|
+
source({ id: "mcc-laws", title: "The Laws of Cricket (2017 Code), Laws 6 The pitch, 7 The creases and 8 The wickets", by: "Marylebone Cricket Club", edition: "4th Edition, 2026", url: "https://www.lords.org/getmedia/1d908298-5c44-468d-b6a7-e1414a1296e0/Laws-of-Cricket-2017-Code-4th-Edition-(2026)_3.pdf", read: READ, note: "the pitch, the creases and the wickets; the Laws give the boundary no size" }),
|
|
72
|
+
source({ id: "icc-men-odi", title: "ICC Men's One-Day International Playing Conditions, 6 to 8, 19.1 Boundaries, 28.7 Restrictions on the placement of fielders and Appendix C The venue", by: "International Cricket Council", edition: "effective from October 2026 (the men's Test and T20I conditions have the same 19.1.3 and the T20I's 28.7.3 the same circle)", url: "https://images.icc-cricket.com/image/upload/prd/bxkzkcyvfn6tvi70zh0w.pdf", read: READ, note: "the 30-yard circle, the boundary of 65 to 90 yards, the popping crease marked 25 ft either side" }),
|
|
73
|
+
source({ id: "icc-women-odi", title: "ICC Women's One-Day International Playing Conditions, 19.1.3 Boundaries and 28.7.2.1 the fielding restriction circle", by: "International Cricket Council", edition: "effective from October 2026", url: "https://images.icc-cricket.com/image/upload/prd/qunpw1kfh3ibxlz58jlw.pdf", read: READ, note: "a boundary of 60 to 70 yards and semicircles of 25.15 yards (23 m)" }),
|
|
74
|
+
source({ id: "fih-rules", title: "Rules of Hockey including explanations, Rule 1 and the Field and Equipment Specifications 1.1 to 1.8", by: "International Hockey Federation", edition: "effective from 1 March 2026", url: "https://www.fih.hockey/static-assets/pdf/fih-Rules-of-hockey-2026-final.pdf", read: READ, note: "91.40 by 55.00 m, lines 75 mm, the 22.90 m lines, the circles, the penalty spots, the goals, the marks outside the pitch" }),
|
|
75
|
+
source({ id: "ihf-rules", title: "IX. Rules of the Game for Indoor Handball, Rule 1 The Playing Court (1:1 to 1:11) and the Guidelines for Playing Courts and Goals, V", by: "International Handball Federation", edition: "1 July 2025", url: "https://www.ihf.info/sites/default/files/2025-07/09A%20-%20Rules%20of%20the%20Game_Indoor%20Handball_E.pdf", read: READ, note: "40 by 20 m, the goal, the 6 m, 7 m, 4 m and 9 m lines, the throw-off area, the substitution lines; the net's depth is from the Guidelines, which are not part of the rules" }),
|
|
76
|
+
source({ id: "nll-rules", title: "NLL Official Rules, Section 1 The Arena (1.5, 2.1, 2.2, 3.1, 6.1, 6.2), Diagram A Official dimensions of the floor and Diagram B Detail of goal crease", by: "National Lacrosse League", edition: "2025-26 season (the 2024-25 and 2019-20 books have the same figures)", url: "https://www.nll.com/wp-content/uploads/2025/12/NLL-2025-26-Rulebook-FINAL-1.pdf", read: READ, note: "the floor's size and corner radius are the diagram's labels (180'-200', 85, 28' r)" }),
|
|
77
|
+
source({ id: "wl-box", title: "Box Lacrosse Official Playing Rules, Rule 1 (1.1.3 to 1.1.9, 1.2.1) and the diagram of Appendix B", by: "World Lacrosse", edition: "2026-2028, version 2.0 (May 2026)", url: "https://worldlacrosse.sport/wp-content/uploads/2026/05/26-28-Box-Rule-Book_v2_0526.pdf", read: READ, note: "all lines 2 in; the floor 200 ft by 85 ft is the diagram's labels" }),
|
|
78
|
+
source({ id: "wl-men", title: "Men's Field Lacrosse Official Playing Rules, Rules 1 to 7 and 12", by: "World Lacrosse", edition: "2025-2027, version 1.1 (January 2025)", url: "https://worldlacrosse.sport/wp-content/uploads/2026/01/WL_Mens-Rules_25-27_FINAL_1.1.pdf", read: READ, note: "the field, the goals, the crease, the goal area lines, the wing lines" }),
|
|
79
|
+
source({ id: "wl-women", title: "Women's Field Lacrosse Official Playing Rules, Rule 1.A and 2.A", by: "World Lacrosse", edition: "2025-2026, version 1.1 (January 2025)", url: "https://worldlacrosse.sport/wp-content/uploads/2025/03/2025_2026-WF-Rulebook_FINALv1.1-1.pdf", read: READ, note: "the field, the goal circle, the marking areas, the restraining lines, the centre circle" }),
|
|
80
|
+
source({ id: "ncaa-men-lacrosse", title: "NCAA Men's Lacrosse Rules and Interpretations, Rule 1, Sections 2 to 9 and the Men's Lacrosse Field of Play diagram", by: "NCAA", edition: "2027 and 2028 (August 2026)", url: "https://ncaaorg.s3.amazonaws.com/championships/sports/lacrosse/rules/men/PRMLA_RulesBook.pdf", read: READ, note: "110 by 60 yards, the goal, the crease and goal mouth, the attack-area and defensive-area lines, the wing lines" }),
|
|
81
|
+
source({ id: "ncaa-women-lacrosse", title: "NCAA Women's Lacrosse Rules, Rule 1 The Playing Area and Goals (1-1 to 1-21) and Diagram 2", by: "NCAA", edition: "2026 and 2027 (February 2026)", url: "https://ncaaorg.s3.amazonaws.com/championships/sports/lacrosse/rules/women/PRWLA_RulesBook.pdf", read: READ, note: "the field, the goal circle, the restraining line, the centre circle, the 8 m arc and the 12 m fan" }),
|
|
82
|
+
source({ id: "pll-2024", title: "2024 PLL Rulebook, Section II The Field (A to H)", by: "Premier Lacrosse League", edition: "2024, the newest book found: the 2025 and 2026 books could not be read", url: "https://premierlacrosseleague.com/wp-content/uploads/2024/03/2024-PLL-Rulebook.pdf", read: READ, note: "100 by 60 yards, the goal, the crease, the two-point arc, the wing areas" }),
|
|
83
|
+
// Baseball and softball.
|
|
84
|
+
source({ id: "obr-2026", title: "Official Baseball Rules, 2.01, 2.03 and 2.04 (the rules Minor League Baseball plays under)", by: "Major League Baseball", edition: "2026", url: "https://mktg.mlbstatic.com/mlb/official-information/2026-official-baseball-rules.pdf", read: READ, note: "bases 18 inches (2.03), the fence at least 325 and 400 feet (2.01 note); Minor League Baseball's own facility standards are not public" }),
|
|
85
|
+
source({ id: "ncaa-baseball", title: "NCAA Baseball Rules, Rule 1, and the field diagram", by: "NCAA", edition: "2027 and 2028 rules book (printed October 2026)", url: "https://ncaaorg.s3.amazonaws.com/championships/sports/baseball/rules/PRMBA_RulesBook.pdf", read: READ, note: "90-foot square (1-2-a), recommended fence 330, 375 and 400 feet (1-2-b), boxes 4 by 6 feet (1-3-a), backstop 45 feet (1-5-b); diagram: PRMBA_Re-imagedFieldDiagrams.pdf" }),
|
|
86
|
+
source({ id: "nfhs-baseball", title: "NFHS Baseball Rules, Rule 1-2 and Diagram 2", by: "National Federation of State High School Associations", edition: "2026 text; 2023 diagram", url: "https://alyb.org/wp-content/uploads/2026/03/NFHS-2026-Baseball-Rules.pdf", read: READ, note: "90-foot square (1-2-1), plate 60 ft 6 in (1-2-11), mound centre 59 feet (1-2-6), box 4 by 6 feet (2-7-2), a new fence 300 and 350 feet (1-2-5); copy hosted by a umpires' association, the diagram from cmbua.org/NFHS-Baseball-RB.pdf" }),
|
|
87
|
+
source({ id: "little-league-specs", title: "Field Specifications", by: "Little League International", edition: "2026", url: "https://www.littleleague.org/league-officials/field-specifications/", read: READ, note: "bases 60 feet and pitching 46 feet for the Major Division and below, 70 and 50 for Intermediate (50/70), a fence of 200 feet; the rule book's own text is in the Rulebook App only" }),
|
|
88
|
+
source({ id: "little-league-major", title: "Little League Baseball Field Layout (Major/Minor)", by: "Little League International", edition: "undated", url: "https://www.littleleague.org/downloads/ll-baseball-field-layout/", read: READ, note: "the 10-foot pitcher's circle, the 25-foot backstop, 200 feet or more to the fence (diagram labels)" }),
|
|
89
|
+
source({ id: "little-league-intermediate", title: "Little League Baseball Intermediate Field Layout", by: "Little League International", edition: "last updated 2 March 2018", url: "https://ll-production-uploads.s3.amazonaws.com/uploads/2018/03/LL-Baseball-Intermediate-Field-Layout.pdf", read: READ, note: "the 12-foot circle, the 95-foot radius, the 35-foot running lane (diagram labels)" }),
|
|
90
|
+
source({ id: "pony-2026", title: "PONY Baseball Rule Book, Rule 7 Playing Fields (7-A, 7-B, 7-D)", by: "PONY Baseball and Softball", edition: "2026 (final proof)", url: "https://cdn3.sportngin.com/attachments/document/f8cc-2645833/2026_PONY_Baseball_Rule_Book_Final_Proof__1_.pdf", read: READ, note: "bases, pitching distance and recommended home run distances by division; copy hosted by a league" }),
|
|
91
|
+
source({ id: "ncaa-softball", title: "NCAA Softball Rules, Rule 2 and its Dimension Table", by: "NCAA", edition: "2026 and 2027 rules book", url: "https://ncaaorg.s3.amazonaws.com/championships/sports/softball/rules/PRWSB_RulesBook.pdf", read: READ, note: "base lines 60 feet (2.4), plate 43 feet (2.27), pitcher's circle 8 feet (2.25), boxes 3 by 7 feet (2.8), skinned arc 60 feet (2.19), a new fence 200 and 220 feet (2.15)" }),
|
|
92
|
+
source({ id: "nfhs-softball", title: "NFHS Softball Rules, Rule 1-1 field diagram, and the 2026 comparison of USA Softball, NCAA and NFHS rules", by: "National Federation of State High School Associations", edition: "2025 diagram; comparison revised 1 January 2026", url: "https://assets.nfhs.org/umbraco/media/881555/softball_field_diagram_24.pdf", read: READ, note: "60 feet and 43 feet (1-1-2), the 16-foot circle, the 60-foot skinned infield (1-2-2), a fence arc of 185 to 235 feet (1-1-3a); the rule text is sold, not posted, and the base size is not stated" }),
|
|
93
|
+
source({ id: "usa-softball-2026", title: "Official Rules of Softball, Rule 2 Section 1 (Official Distance Table), Section 3 and the Dimension Table", by: "USA Softball", edition: "2026", url: "https://www.usasoftball.com/wp-content/uploads/sites/120/2026/01/USAS-2026-Rulebook_Digital.pdf", read: READ, note: "adult women's fast pitch 60 and 43 feet, fence 200 to 250; adult women's slow pitch 70 and 50 feet, fence 265 to 300; the 8-foot circle, boxes 3 by 7 feet, the skinned arc equal to the base distance" }),
|
|
94
|
+
source({ id: "wbsc-slowpitch", title: "WBSC Slow Pitch Softball rules, Appendix 1 F Quick Reference Table", by: "World Baseball Softball Confederation", edition: "2026-2029 (released March 2026)", url: "https://static.wbsc.org/uploads/federations/0/cms/documents/5f45c5e4-54ed-3659-8116-4d7cb5051f69.pdf", read: READ, note: "65-foot bases, pitching 50 feet, the 60-foot arc, women's fence at least 275 feet" }),
|
|
95
|
+
]));
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type Scaled, type Unit } from "../units.ts";
|
|
2
|
+
/** The words of a league in both languages. */
|
|
3
|
+
export interface Named {
|
|
4
|
+
en: string;
|
|
5
|
+
ja: string;
|
|
6
|
+
}
|
|
7
|
+
/** The families of surface a league is a variant of. */
|
|
8
|
+
export type Family = "basketball" | "hockey" | "football" | "baseball" | "curling" | "tennis" | "volleyball" | "badminton" | "pickleball" | "tabletennis" | "lacrosse" | "rugby" | "afl" | "gaelic" | "cricket" | "fieldhockey" | "handball";
|
|
9
|
+
/** The state of one marking from a season on, in a league's own history: the season it began, what it was, and its sources. */
|
|
10
|
+
export interface LeagueSpan<T> {
|
|
11
|
+
/** The first season it was in force, or `null` for the state before the first change that is cited. */
|
|
12
|
+
from: number | null;
|
|
13
|
+
value: T;
|
|
14
|
+
/** What it was, in a sentence. */
|
|
15
|
+
what: string;
|
|
16
|
+
/** The same in Japanese. */
|
|
17
|
+
ja: string;
|
|
18
|
+
/** Keys of `LEAGUE_SOURCES`; at least one. */
|
|
19
|
+
sources: string[];
|
|
20
|
+
}
|
|
21
|
+
/** What every league has. */
|
|
22
|
+
export interface LeagueBase<F extends Family, D> {
|
|
23
|
+
/** The id the `league` option takes: `fiba`, `ncaa-women`. */
|
|
24
|
+
id: string;
|
|
25
|
+
family: F;
|
|
26
|
+
name: Named;
|
|
27
|
+
/** The unit its rulebook states its principal figures in: the one its size is written in, and `units: "rulebook"`. */
|
|
28
|
+
unit: Unit;
|
|
29
|
+
/** The unit `dimensions` are kept in: `unit`, unless said. A football field's figures are in feet, its size in yards. */
|
|
30
|
+
figuresUnit?: Unit;
|
|
31
|
+
/** The rulebook's figures. */
|
|
32
|
+
dimensions: D;
|
|
33
|
+
/** True for the league a sport draws without a `league` (the NBA, the NHL, the NFL, the CFL, the IFAF, MLB): its history is `rulesFor`'s. */
|
|
34
|
+
builtIn?: boolean;
|
|
35
|
+
/** Keys of `LEAGUE_SOURCES`. */
|
|
36
|
+
sources: string[];
|
|
37
|
+
/** The markings that changed, by name: only what a source dates. */
|
|
38
|
+
history?: {
|
|
39
|
+
[K in keyof D]?: LeagueSpan<D[K]>[];
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/** A table of figures in a league's unit, as feet. */
|
|
43
|
+
export declare const inFeet: <T>(table: T, unit: Unit) => Scaled<T>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// What a league's surface is made of: the figures its rulebook gives, in the unit it gives them in. The drawings are made in
|
|
2
|
+
// feet (geometry.ts), so `inFeet` turns a league's table into one. Nothing here draws.
|
|
3
|
+
import { lengthsIn } from "../units.js";
|
|
4
|
+
/** A table of figures in a league's unit, as feet. */
|
|
5
|
+
export const inFeet = (table, unit) => lengthsIn(table, "ft", unit);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { FAMILY_OF, LEAGUES, LEAGUE_SOURCES, VARIANTS, aflOf, chooseLeague, courtOf, cricketOf, diamondOf, fieldHockeyOf, fieldOf, gaelicOf, handballOf, lacrosseOf, rugbyOf, hasHistory, leagueAt, leagueAtOf, leagueById, leagueChanges, leagueFigures, leagueIds, leagueSeason, leagueSize, netOf, rinkOf, sheetOf } from "./leagues.ts";
|
|
2
|
+
export type { BaseballLeague, BasketballLeague, CourtFigures, CurlingLeague, SheetFigures, BadmintonFigures, BadmintonLeague, FreeZone, FreeZones, NetFigures, NetLeague, NetSport, PickleballFigures, PickleballLeague, TableTennisFigures, TableTennisLeague, TennisFigures, TennisLeague, VolleyballFigures, VolleyballLeague, CourtMarks, DiamondFigures, Family, FootballLeague, HockeyLeague, League, LeagueAt, LeagueChange, LeagueSource, LeagueSpan, Named, RinkFigures } from "./leagues.ts";
|
|
3
|
+
export { MLB_DIAMOND } from "./leagues/baseball.ts";
|
|
4
|
+
export { NBA_COURT } from "./leagues/basketball.ts";
|
|
5
|
+
export { NHL_RINK } from "./leagues/hockey.ts";
|
|
6
|
+
export { CURLING_CANADA_SHEET, CURLING_LEAGUES, WCF_SHEET } from "./leagues/curling.ts";
|
|
7
|
+
export { BADMINTON_LEAGUES, BWF_BADMINTON, FIVB_BEACH, FIVB_INDOOR, ITF_TENNIS, ITTF_TABLE, PICKLEBALL_LEAGUES, TABLE_TENNIS_LEAGUES, TENNIS_LEAGUES, USAP_PICKLEBALL, VOLLEYBALL_LEAGUES } from "./leagues/courts.ts";
|
|
8
|
+
export { AFL_GROUND, AFL_GROUNDS, AFL_LEAGUES } from "./leagues/aussie.ts";
|
|
9
|
+
export type { AflFigures, AflGround, AflLeague } from "./leagues/aussie.ts";
|
|
10
|
+
export { CRICKET_LEAGUES, ICC_MEN_GROUND, ICC_WOMEN_GROUND, MCC_GROUND } from "./leagues/cricket.ts";
|
|
11
|
+
export type { CricketFigures, CricketLeague } from "./leagues/cricket.ts";
|
|
12
|
+
export { FIELD_HOCKEY_LEAGUES, FIH_PITCH } from "./leagues/fieldhockey.ts";
|
|
13
|
+
export type { FieldHockeyFigures, FieldHockeyLeague } from "./leagues/fieldhockey.ts";
|
|
14
|
+
export { GAA_FOOTBALL_FIELD, GAA_HURLING_FIELD, GAELIC_LEAGUES } from "./leagues/gaelic.ts";
|
|
15
|
+
export type { GaelicFigures, GaelicLeague } from "./leagues/gaelic.ts";
|
|
16
|
+
export { HANDBALL_LEAGUES, IHF_COURT } from "./leagues/handball.ts";
|
|
17
|
+
export type { HandballFigures, HandballLeague } from "./leagues/handball.ts";
|
|
18
|
+
export { LACROSSE_LEAGUES, NCAA_MEN_FIELD, NCAA_WOMEN_FIELD, NLL_FLOOR, PLL_FIELD, WORLD_BOX_FLOOR, WORLD_MEN_FIELD, WORLD_WOMEN_FIELD } from "./leagues/lacrosse.ts";
|
|
19
|
+
export type { LacrosseFigures, LacrosseLeague } from "./leagues/lacrosse.ts";
|
|
20
|
+
export { IRL_FIELD, NRL_FIELD, RUGBY_LEAGUES, WORLD_RUGBY_FIELD } from "./leagues/rugby.ts";
|
|
21
|
+
export type { RugbyFigures, RugbyLeague } from "./leagues/rugby.ts";
|
|
22
|
+
export { fixed, span } from "./leagues/fields.ts";
|
|
23
|
+
export type { Span } from "./leagues/fields.ts";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// The leagues: each variant of a family of surface, with its rulebook's figures, its names and its sources.
|
|
2
|
+
export { FAMILY_OF, LEAGUES, LEAGUE_SOURCES, VARIANTS, aflOf, chooseLeague, courtOf, cricketOf, diamondOf, fieldHockeyOf, fieldOf, gaelicOf, handballOf, lacrosseOf, rugbyOf, hasHistory, leagueAt, leagueAtOf, leagueById, leagueChanges, leagueFigures, leagueIds, leagueSeason, leagueSize, netOf, rinkOf, sheetOf } from "./leagues.js";
|
|
3
|
+
export { MLB_DIAMOND } from "./leagues/baseball.js";
|
|
4
|
+
export { NBA_COURT } from "./leagues/basketball.js";
|
|
5
|
+
export { NHL_RINK } from "./leagues/hockey.js";
|
|
6
|
+
export { CURLING_CANADA_SHEET, CURLING_LEAGUES, WCF_SHEET } from "./leagues/curling.js";
|
|
7
|
+
export { BADMINTON_LEAGUES, BWF_BADMINTON, FIVB_BEACH, FIVB_INDOOR, ITF_TENNIS, ITTF_TABLE, PICKLEBALL_LEAGUES, TABLE_TENNIS_LEAGUES, TENNIS_LEAGUES, USAP_PICKLEBALL, VOLLEYBALL_LEAGUES } from "./leagues/courts.js";
|
|
8
|
+
export { AFL_GROUND, AFL_GROUNDS, AFL_LEAGUES } from "./leagues/aussie.js";
|
|
9
|
+
export { CRICKET_LEAGUES, ICC_MEN_GROUND, ICC_WOMEN_GROUND, MCC_GROUND } from "./leagues/cricket.js";
|
|
10
|
+
export { FIELD_HOCKEY_LEAGUES, FIH_PITCH } from "./leagues/fieldhockey.js";
|
|
11
|
+
export { GAA_FOOTBALL_FIELD, GAA_HURLING_FIELD, GAELIC_LEAGUES } from "./leagues/gaelic.js";
|
|
12
|
+
export { HANDBALL_LEAGUES, IHF_COURT } from "./leagues/handball.js";
|
|
13
|
+
export { LACROSSE_LEAGUES, NCAA_MEN_FIELD, NCAA_WOMEN_FIELD, NLL_FLOOR, PLL_FIELD, WORLD_BOX_FLOOR, WORLD_MEN_FIELD, WORLD_WOMEN_FIELD } from "./leagues/lacrosse.js";
|
|
14
|
+
export { IRL_FIELD, NRL_FIELD, RUGBY_LEAGUES, WORLD_RUGBY_FIELD } from "./leagues/rugby.js";
|
|
15
|
+
export { fixed, span } from "./leagues/fields.js";
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { type BaseballLeague, type DiamondSpec } from "./leagues/baseball.ts";
|
|
2
|
+
import { type BasketballLeague, type CourtSpec } from "./leagues/basketball.ts";
|
|
3
|
+
import { type FootballLeague } from "./leagues/football.ts";
|
|
4
|
+
import { type HockeyLeague, type RinkSpec } from "./leagues/hockey.ts";
|
|
5
|
+
import { type CurlingLeague, type SheetSpec } from "./leagues/curling.ts";
|
|
6
|
+
import { type NetLeague } from "./leagues/courts.ts";
|
|
7
|
+
import { type AflLeague, type AflSpec } from "./leagues/aussie.ts";
|
|
8
|
+
import { type CricketLeague, type CricketSpec } from "./leagues/cricket.ts";
|
|
9
|
+
import { type FieldHockeyLeague, type FieldHockeySpec } from "./leagues/fieldhockey.ts";
|
|
10
|
+
import { type GaelicLeague, type GaelicSpec } from "./leagues/gaelic.ts";
|
|
11
|
+
import { type HandballLeague, type HandballSpec } from "./leagues/handball.ts";
|
|
12
|
+
import { type LacrosseLeague, type LacrosseSpec } from "./leagues/lacrosse.ts";
|
|
13
|
+
import { type RugbyLeague, type RugbySpec } from "./leagues/rugby.ts";
|
|
14
|
+
import { LEAGUE_SOURCES } from "./leagues/sources.ts";
|
|
15
|
+
import type { Family } from "./leagues/types.ts";
|
|
16
|
+
import type { FootballSpec } from "./geometry.ts";
|
|
17
|
+
import type { Sport, SurfaceOptions } from "./types.ts";
|
|
18
|
+
import { type Unit } from "./units.ts";
|
|
19
|
+
export { LEAGUE_SOURCES };
|
|
20
|
+
export type { LeagueSource } from "./leagues/sources.ts";
|
|
21
|
+
export type { BaseballLeague, BasketballLeague, CurlingLeague, FootballLeague, HockeyLeague };
|
|
22
|
+
export { AFL_GROUNDS } from "./leagues/aussie.ts";
|
|
23
|
+
export type { AflFigures, AflGround, AflLeague } from "./leagues/aussie.ts";
|
|
24
|
+
export type { CricketFigures, CricketLeague } from "./leagues/cricket.ts";
|
|
25
|
+
export type { FieldHockeyFigures, FieldHockeyLeague } from "./leagues/fieldhockey.ts";
|
|
26
|
+
export type { GaelicFigures, GaelicLeague } from "./leagues/gaelic.ts";
|
|
27
|
+
export type { HandballFigures, HandballLeague } from "./leagues/handball.ts";
|
|
28
|
+
export type { LacrosseFigures, LacrosseLeague } from "./leagues/lacrosse.ts";
|
|
29
|
+
export type { RugbyFigures, RugbyLeague } from "./leagues/rugby.ts";
|
|
30
|
+
export type { Span } from "./leagues/fields.ts";
|
|
31
|
+
export type { BadmintonFigures, BadmintonLeague, FreeZone, FreeZones, NetFigures, NetLeague, NetSport, PickleballFigures, PickleballLeague, TableTennisFigures, TableTennisLeague, TennisFigures, TennisLeague, VolleyballFigures, VolleyballLeague } from "./leagues/courts.ts";
|
|
32
|
+
export type { CourtFigures, CourtMarks } from "./leagues/basketball.ts";
|
|
33
|
+
export type { RinkFigures } from "./leagues/hockey.ts";
|
|
34
|
+
export type { SheetFigures } from "./leagues/curling.ts";
|
|
35
|
+
export type { DiamondFigures } from "./leagues/baseball.ts";
|
|
36
|
+
export type { Family, LeagueSpan, Named } from "./leagues/types.ts";
|
|
37
|
+
/** A league: a variant of a family of surface. */
|
|
38
|
+
export type League = BasketballLeague | HockeyLeague | FootballLeague | BaseballLeague | CurlingLeague | NetLeague | LacrosseLeague | RugbyLeague | AflLeague | GaelicLeague | CricketLeague | FieldHockeyLeague | HandballLeague;
|
|
39
|
+
/** The family of surface each sport draws; soccer's variants are its pitches (`pitch`), not leagues. */
|
|
40
|
+
export declare const FAMILY_OF: Readonly<Record<Sport, Family | undefined>>;
|
|
41
|
+
/**
|
|
42
|
+
* The leagues each sport can draw, in the order a menu lists them, the sport's own first (the three football sports share their
|
|
43
|
+
* list, the football leagues). Soccer has none.
|
|
44
|
+
*/
|
|
45
|
+
export declare const LEAGUES: Readonly<Record<Sport, readonly League[]>>;
|
|
46
|
+
/** Every league of every family, once each. */
|
|
47
|
+
export declare const VARIANTS: readonly League[];
|
|
48
|
+
/** The ids of a sport's leagues. */
|
|
49
|
+
export declare const leagueIds: (sport: Sport) => string[];
|
|
50
|
+
/** A league by its sport and id, or `undefined`. */
|
|
51
|
+
export declare function leagueById(sport: Sport, id: string): League | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* 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
|
|
54
|
+
* 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
|
|
55
|
+
* sport. A league of another family, or one that does not exist, is an error that says what to use.
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* import { chooseLeague } from "@johnmorrisdotca/kyogijo-stadiums/leagues";
|
|
59
|
+
* console.log(chooseLeague({ sport: "nba", league: "fiba" }).league?.name.en, chooseLeague({ sport: "nfl", league: "cfl" }).sport);
|
|
60
|
+
* // FIBA basketball court cfl
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
export declare function chooseLeague(o: Pick<SurfaceOptions, "sport" | "league">): {
|
|
64
|
+
sport: Sport;
|
|
65
|
+
league: League | undefined;
|
|
66
|
+
};
|
|
67
|
+
/** One change of a league's markings: a state of one marking from a season on. */
|
|
68
|
+
export interface LeagueChange {
|
|
69
|
+
/** `ncaa-men.threePoint.2019`. */
|
|
70
|
+
id: string;
|
|
71
|
+
league: string;
|
|
72
|
+
/** The marking's name: a key of the league's dimensions. */
|
|
73
|
+
feature: string;
|
|
74
|
+
/** The first season, or `null` for the state before the first change that is cited. */
|
|
75
|
+
from: number | null;
|
|
76
|
+
value: unknown;
|
|
77
|
+
what: string;
|
|
78
|
+
ja: string;
|
|
79
|
+
sources: string[];
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Every change a source dates in a league's markings, in season order, each with a sentence in English and in Japanese and its
|
|
83
|
+
* sources. A league with no cited history has none (a drawing with a `year` is then the league's rulebook as it is now).
|
|
84
|
+
* @example
|
|
85
|
+
* ```ts
|
|
86
|
+
* import { leagueChanges } from "@johnmorrisdotca/kyogijo-stadiums/leagues";
|
|
87
|
+
* console.log(leagueChanges("nba", "ncaa-men").map((change) => change.id));
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
export declare function leagueChanges(sport: Sport, id: string): LeagueChange[];
|
|
91
|
+
/** True when a league has markings a source dates, so that `year` changes its drawing. */
|
|
92
|
+
export declare const hasHistory: (league: League | undefined) => boolean;
|
|
93
|
+
/** 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. */
|
|
94
|
+
export interface LeagueAt<L extends League = League> {
|
|
95
|
+
league: L;
|
|
96
|
+
/** The season asked for, or `undefined` for today's. */
|
|
97
|
+
year: number | undefined;
|
|
98
|
+
/** The figures in the unit the league keeps them in. */
|
|
99
|
+
figures: L["dimensions"];
|
|
100
|
+
/** The markings that differ from today's. */
|
|
101
|
+
differences: LeagueChange[];
|
|
102
|
+
/** Markings whose history starts later than the season asked for (the first cited state is used). */
|
|
103
|
+
gaps: string[];
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* 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
|
|
107
|
+
* it is now.
|
|
108
|
+
* @example
|
|
109
|
+
* ```ts
|
|
110
|
+
* import { leagueAt } from "@johnmorrisdotca/kyogijo-stadiums/leagues";
|
|
111
|
+
* console.log(leagueAt("nba", "ncaa-men", 2010).differences.map((change) => change.id));
|
|
112
|
+
* // [ 'ncaa-men.restricted.start' ]
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
export declare function leagueAt(sport: Sport, id: string, year?: number): LeagueAt;
|
|
116
|
+
/** `leagueAt` for a league already in hand. */
|
|
117
|
+
export declare function leagueAtOf<L extends League>(league: L, year?: number): LeagueAt<L>;
|
|
118
|
+
/** The name of a season as the family writes it: `1979–80` for basketball and hockey, which play across the new year, else `1979`. */
|
|
119
|
+
export declare function leagueSeason(family: Family, year: number): string;
|
|
120
|
+
/** A basketball court of a league in a season, in feet. */
|
|
121
|
+
export declare const courtOf: (league: BasketballLeague, year?: number) => CourtSpec;
|
|
122
|
+
/** An ice rink of a league in a season, in feet. */
|
|
123
|
+
export declare const rinkOf: (league: HockeyLeague, year?: number) => RinkSpec;
|
|
124
|
+
/** A curling sheet of a league, in feet. A sheet has no history; a year is ignored. */
|
|
125
|
+
export declare const sheetOf: (league?: CurlingLeague) => SheetSpec;
|
|
126
|
+
/** A net sport's court of a league (tennis, volleyball and beach volleyball, badminton, pickleball, table tennis), in feet. These courts have no history; a year is ignored. */
|
|
127
|
+
export declare const netOf: <L extends NetLeague>(league: L) => L["dimensions"];
|
|
128
|
+
/** A lacrosse surface of a league, in feet (the box floor, or a field). These have no history; a year is ignored. */
|
|
129
|
+
export declare const lacrosseOf: (league: LacrosseLeague) => LacrosseSpec;
|
|
130
|
+
/** A rugby field of a league, in feet. */
|
|
131
|
+
export declare const rugbyOf: (league: RugbyLeague) => RugbySpec;
|
|
132
|
+
/** The Australian football ground, in feet. */
|
|
133
|
+
export declare const aflOf: (league: AflLeague) => AflSpec;
|
|
134
|
+
/** A Gaelic games field of a league (football or hurling), in feet. */
|
|
135
|
+
export declare const gaelicOf: (league: GaelicLeague) => GaelicSpec;
|
|
136
|
+
/** A cricket ground of a league, in feet. */
|
|
137
|
+
export declare const cricketOf: (league: CricketLeague) => CricketSpec;
|
|
138
|
+
/** A field hockey pitch, in feet. */
|
|
139
|
+
export declare const fieldHockeyOf: (league: FieldHockeyLeague) => FieldHockeySpec;
|
|
140
|
+
/** A handball court, in feet. */
|
|
141
|
+
export declare const handballOf: (league: HandballLeague) => HandballSpec;
|
|
142
|
+
/** A football field of a league in a season: the spec, in feet. */
|
|
143
|
+
export declare const fieldOf: (league: FootballLeague, year?: number) => FootballSpec;
|
|
144
|
+
/** A diamond of a league in a season, in feet. */
|
|
145
|
+
export declare const diamondOf: (league: BaseballLeague, year?: number) => DiamondSpec;
|
|
146
|
+
/**
|
|
147
|
+
* 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
|
|
148
|
+
* zones, end line to end line. A diamond has no fixed size, its fence is its size.
|
|
149
|
+
* @example
|
|
150
|
+
* ```ts
|
|
151
|
+
* import { leagueSize } from "@johnmorrisdotca/kyogijo-stadiums/leagues";
|
|
152
|
+
* console.log(leagueSize("nba", "nba"));
|
|
153
|
+
* // { length: 94, width: 50, unit: 'ft' }
|
|
154
|
+
* ```
|
|
155
|
+
*/
|
|
156
|
+
export declare function leagueSize(sport: Sport, id: string, unit?: Unit): {
|
|
157
|
+
length: number;
|
|
158
|
+
width: number;
|
|
159
|
+
unit: Unit;
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* 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
|
|
163
|
+
* test that holds the drawing to the rulebook.
|
|
164
|
+
* @example
|
|
165
|
+
* ```ts
|
|
166
|
+
* import { LEAGUES, leagueFigures } from "@johnmorrisdotca/kyogijo-stadiums/leagues";
|
|
167
|
+
* const fiba = LEAGUES.nba.find((league) => league.id === "fiba")!;
|
|
168
|
+
* console.log(leagueFigures(fiba).slice(0, 2).map(([name, value]) => `${name}: ${value}`).join("; "));
|
|
169
|
+
* // court: 28 m by 15 m; lane: 4.9 m wide
|
|
170
|
+
* ```
|
|
171
|
+
*/
|
|
172
|
+
export declare function leagueFigures(league: League): [string, string][];
|