@johnmorrisdotca/kyogijo-stadiums 0.4.0 → 0.5.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 +75 -0
- package/NOTICE.md +4 -0
- package/README.md +71 -16
- package/dist/annotate.js +1 -1
- package/dist/athletics/describe.d.ts +8 -0
- package/dist/athletics/describe.js +41 -0
- package/dist/athletics/events.d.ts +17 -0
- package/dist/athletics/events.js +48 -0
- package/dist/athletics/facilities.d.ts +80 -0
- package/dist/athletics/facilities.js +176 -0
- package/dist/athletics/infield.d.ts +79 -0
- package/dist/athletics/infield.js +166 -0
- package/dist/athletics/layout.d.ts +13 -0
- package/dist/athletics/layout.js +98 -0
- package/dist/athletics/oval.d.ts +57 -0
- package/dist/athletics/oval.js +116 -0
- package/dist/athletics/plan.d.ts +97 -0
- package/dist/athletics/plan.js +355 -0
- package/dist/athletics/races.d.ts +102 -0
- package/dist/athletics/races.js +355 -0
- package/dist/athletics/steeplechase.d.ts +72 -0
- package/dist/athletics/steeplechase.js +196 -0
- package/dist/athletics/stencil.d.ts +13 -0
- package/dist/athletics/stencil.js +85 -0
- package/dist/athletics/track.d.ts +54 -0
- package/dist/athletics/track.js +105 -0
- package/dist/athletics/types.d.ts +77 -0
- package/dist/athletics/types.js +1 -0
- package/dist/athletics-entry.d.ts +17 -0
- package/dist/athletics-entry.js +11 -0
- package/dist/athletics.style.d.ts +16 -0
- package/dist/athletics.style.js +51 -0
- package/dist/atlas-entry.d.ts +4 -2
- package/dist/atlas-entry.js +3 -2
- package/dist/atlas.d.ts +83 -7
- package/dist/atlas.js +108 -8
- package/dist/charts-entry.d.ts +6 -1
- package/dist/charts-entry.js +3 -0
- package/dist/charts.athletics.d.ts +183 -0
- package/dist/charts.athletics.js +455 -0
- package/dist/charts.curling.heat.d.ts +24 -0
- package/dist/charts.curling.heat.js +116 -0
- package/dist/charts.curling.js +14 -3
- package/dist/charts.pool.d.ts +67 -0
- package/dist/charts.pool.js +76 -0
- package/dist/charts.skating.d.ts +204 -0
- package/dist/charts.skating.js +426 -0
- package/dist/charts.types.d.ts +53 -1
- package/dist/court.d.ts +85 -2
- package/dist/court.js +102 -7
- package/dist/court.more.d.ts +46 -0
- package/dist/court.more.js +219 -0
- package/dist/courts.style.d.ts +14 -2
- package/dist/courts.style.js +51 -4
- package/dist/crowd.d.ts +154 -0
- package/dist/crowd.draw.d.ts +17 -0
- package/dist/crowd.draw.js +198 -0
- package/dist/crowd.js +465 -0
- package/dist/crowd.park.d.ts +19 -0
- package/dist/crowd.park.js +153 -0
- package/dist/curling.stats.d.ts +271 -0
- package/dist/curling.stats.js +301 -0
- package/dist/draw.d.ts +16 -0
- package/dist/draw.js +318 -35
- package/dist/element-entry.d.ts +1 -1
- package/dist/element-entry.js +1 -1
- package/dist/element.d.ts +13 -2
- package/dist/element.js +77 -3
- package/dist/features.js +131 -0
- package/dist/fields.kit.d.ts +2 -2
- package/dist/fields.types.d.ts +18 -4
- package/dist/frames.providers.js +63 -8
- package/dist/geojson.js +3 -0
- package/dist/geometry-entry.d.ts +2 -1
- package/dist/geometry-entry.js +2 -1
- package/dist/geometry.d.ts +20 -0
- package/dist/geometry.js +78 -1
- package/dist/grounds.d.ts +4 -0
- package/dist/grounds.data.js +12 -0
- package/dist/hardwood.d.ts +31 -0
- package/dist/hardwood.js +157 -0
- package/dist/heat.js +4 -3
- package/dist/heat.types.d.ts +5 -0
- package/dist/heat.zones.d.ts +2 -2
- package/dist/heat.zones.js +154 -6
- package/dist/homeside.js +17 -0
- package/dist/index.d.ts +16 -2
- package/dist/index.js +10 -1
- package/dist/layers.d.ts +1 -1
- package/dist/layers.env.d.ts +3 -1
- package/dist/layers.env.js +4 -2
- package/dist/layers.js +4 -4
- package/dist/leagues/athletics.d.ts +63 -0
- package/dist/leagues/athletics.js +87 -0
- package/dist/leagues/courts.d.ts +269 -4
- package/dist/leagues/courts.js +155 -1
- package/dist/leagues/skating.d.ts +145 -0
- package/dist/leagues/skating.js +73 -0
- package/dist/leagues/sources.js +20 -0
- package/dist/leagues/types.d.ts +1 -1
- package/dist/leagues-entry.d.ts +4 -2
- package/dist/leagues-entry.js +2 -1
- package/dist/leagues.d.ts +14 -4
- package/dist/leagues.js +146 -5
- package/dist/look.d.ts +3 -3
- package/dist/look.js +39 -6
- package/dist/outline.d.ts +1 -1
- package/dist/outline.js +30 -2
- package/dist/pageant.d.ts +120 -0
- package/dist/pageant.draw.d.ts +21 -0
- package/dist/pageant.draw.js +171 -0
- package/dist/pageant.js +207 -0
- package/dist/pageant.style.d.ts +8 -0
- package/dist/pageant.style.js +42 -0
- package/dist/png.d.ts +8 -1
- package/dist/png.js +21 -1
- package/dist/pool.d.ts +176 -0
- package/dist/pool.figures.d.ts +304 -0
- package/dist/pool.figures.js +144 -0
- package/dist/pool.js +304 -0
- package/dist/pool.kit.d.ts +48 -0
- package/dist/pool.kit.js +141 -0
- package/dist/pool.labels.d.ts +20 -0
- package/dist/pool.labels.js +257 -0
- package/dist/pool.race.d.ts +65 -0
- package/dist/pool.race.js +140 -0
- package/dist/pool.replay.d.ts +46 -0
- package/dist/pool.replay.js +127 -0
- package/dist/pool.section.d.ts +13 -0
- package/dist/pool.section.js +83 -0
- package/dist/pool.style.d.ts +20 -0
- package/dist/pool.style.js +169 -0
- package/dist/pool.types.d.ts +145 -0
- package/dist/pool.types.js +3 -0
- package/dist/pool.words.d.ts +13 -0
- package/dist/pool.words.js +101 -0
- package/dist/ranges.names.js +47 -3
- package/dist/replay-entry.d.ts +3 -0
- package/dist/replay-entry.js +2 -0
- package/dist/restyle.js +1 -1
- package/dist/score.js +70 -5
- package/dist/sheet.d.ts +3 -0
- package/dist/sheet.js +7 -3
- package/dist/skating/describe.d.ts +7 -0
- package/dist/skating/describe.js +44 -0
- package/dist/skating/events.d.ts +24 -0
- package/dist/skating/events.js +47 -0
- package/dist/skating/figure.d.ts +24 -0
- package/dist/skating/figure.js +37 -0
- package/dist/skating/long.d.ts +54 -0
- package/dist/skating/long.js +111 -0
- package/dist/skating/parts.d.ts +43 -0
- package/dist/skating/parts.js +40 -0
- package/dist/skating/plan.d.ts +55 -0
- package/dist/skating/plan.js +197 -0
- package/dist/skating/short.d.ts +47 -0
- package/dist/skating/short.js +89 -0
- package/dist/skating/track.d.ts +66 -0
- package/dist/skating/track.js +94 -0
- package/dist/skating/types.d.ts +57 -0
- package/dist/skating/types.js +3 -0
- package/dist/skating-entry.d.ts +17 -0
- package/dist/skating-entry.js +11 -0
- package/dist/skating.style.d.ts +4 -0
- package/dist/skating.style.js +24 -0
- package/dist/strings.d.ts +296 -0
- package/dist/strings.js +328 -11
- package/dist/style.d.ts +2 -0
- package/dist/style.js +11 -1
- package/dist/surfaces/artistic.d.ts +9 -0
- package/dist/surfaces/artistic.js +94 -0
- package/dist/surfaces/athletics.d.ts +16 -0
- package/dist/surfaces/athletics.js +132 -0
- package/dist/surfaces/baseball.js +15 -0
- package/dist/surfaces/basketball.floor.d.ts +27 -0
- package/dist/surfaces/basketball.floor.js +83 -0
- package/dist/surfaces/basketball.gear.d.ts +27 -0
- package/dist/surfaces/basketball.gear.js +90 -0
- package/dist/surfaces/basketball.js +43 -21
- package/dist/surfaces/curling.d.ts +16 -0
- package/dist/surfaces/curling.fold.d.ts +67 -0
- package/dist/surfaces/curling.fold.js +107 -0
- package/dist/surfaces/curling.js +37 -3
- package/dist/surfaces/dive.d.ts +9 -0
- package/dist/surfaces/dive.js +128 -0
- package/dist/surfaces/field.d.ts +7 -2
- package/dist/surfaces/field.js +15 -9
- package/dist/surfaces/hockey.js +1 -0
- package/dist/surfaces/net.d.ts +2 -1
- package/dist/surfaces/net.js +160 -15
- package/dist/surfaces/polo.d.ts +12 -0
- package/dist/surfaces/polo.js +159 -0
- package/dist/surfaces/pool.d.ts +27 -0
- package/dist/surfaces/pool.js +198 -0
- package/dist/surfaces/skating.d.ts +6 -0
- package/dist/surfaces/skating.js +62 -0
- package/dist/surfaces/soccer.js +2 -1
- package/dist/surfaces/surface.d.ts +44 -0
- package/dist/surfaces/venue.d.ts +15 -0
- package/dist/surfaces/venue.js +95 -0
- package/dist/tenants.d.ts +77 -0
- package/dist/tenants.data.d.ts +8 -0
- package/dist/tenants.data.js +945 -0
- package/dist/tenants.js +46 -0
- package/dist/turn-entry.d.ts +12 -0
- package/dist/turn-entry.js +7 -0
- package/dist/turn.camera.d.ts +105 -0
- package/dist/turn.camera.js +168 -0
- package/dist/turn.dom.d.ts +40 -0
- package/dist/turn.dom.js +351 -0
- package/dist/turn.kit.d.ts +86 -0
- package/dist/turn.kit.js +110 -0
- package/dist/turn.markup.d.ts +48 -0
- package/dist/turn.markup.js +108 -0
- package/dist/turn.model.d.ts +78 -0
- package/dist/turn.model.js +91 -0
- package/dist/turn.style.d.ts +5 -0
- package/dist/turn.style.js +55 -0
- package/dist/types.d.ts +183 -18
- package/dist/units.d.ts +1 -1
- package/dist/units.js +15 -1
- package/dist/uprights.board.d.ts +17 -0
- package/dist/uprights.board.js +59 -0
- package/dist/uprights.d.ts +37 -0
- package/dist/uprights.fields.d.ts +32 -0
- package/dist/uprights.fields.js +172 -0
- package/dist/uprights.goal.d.ts +49 -0
- package/dist/uprights.goal.js +69 -0
- package/dist/uprights.js +160 -0
- package/dist/uprights.more.d.ts +7 -0
- package/dist/uprights.more.js +183 -0
- package/dist/uprights.net.d.ts +12 -0
- package/dist/uprights.net.js +109 -0
- package/dist/uprights.netkit.d.ts +28 -0
- package/dist/uprights.netkit.js +67 -0
- package/dist/uprights.pools.d.ts +8 -0
- package/dist/uprights.pools.js +190 -0
- package/dist/uprights.rinks.d.ts +27 -0
- package/dist/uprights.rinks.js +106 -0
- package/dist/uprights.track.d.ts +50 -0
- package/dist/uprights.track.js +246 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +19 -2
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// The ice skating rinks and tracks of the International Skating Union: the standard 400 m speed skating track (Special Regulations and Technical Rules Speed Skating, Rules 203, 205, 226 and 227, and the
|
|
2
|
+
// layout plan and measurements of "H. Track"), the short track speed skating oval of 111.12 m on a rink of 60 by 30 m (Special Regulations and Technical Rules Short Track Speed Skating, Rule 280 and
|
|
3
|
+
// its diagram) and the rink of figure skating (Special Regulations and Technical Rules Single and Pair Skating and Ice Dance, Rule 342), with every figure in metres. Nothing here draws.
|
|
4
|
+
import { convertLength } from "../units.js";
|
|
5
|
+
/** The figures in feet, as the drawing's units are: the lengths only, not the counts, the laps or the angles. */
|
|
6
|
+
export function skatingInFeet(figures, unit) {
|
|
7
|
+
const k = (v) => convertLength(v, unit, "ft");
|
|
8
|
+
const span = (s) => ({ min: k(s.min), max: k(s.max), drawn: k(s.drawn) });
|
|
9
|
+
if (figures.kind === "long-track") {
|
|
10
|
+
return { ...figures, innerRadius: span(figures.innerRadius), innerLane: k(figures.innerLane), outerLane: span(figures.outerLane), warmUpLane: k(figures.warmUpLane), lap: k(figures.lap), measure: k(figures.measure), line: k(figures.line), blocks: { near: k(figures.blocks.near), nearLength: k(figures.blocks.nearLength), far: k(figures.blocks.far), height: k(figures.blocks.height) }, preStart: k(figures.preStart), finishMetres: k(figures.finishMetres), coaches: { offset: k(figures.coaches.offset), after: k(figures.coaches.after), before: k(figures.coaches.before) }, padding: { thick: k(figures.padding.thick), clear: k(figures.padding.clear) } };
|
|
11
|
+
}
|
|
12
|
+
if (figures.kind === "short-track") {
|
|
13
|
+
return { ...figures, lap: k(figures.lap), straight: k(figures.straight), radius: k(figures.radius), blocks: k(figures.blocks), straightWidth: k(figures.straightWidth), apexClear: k(figures.apexClear), rink: { length: k(figures.rink.length), width: k(figures.rink.width) }, tracks: { five: { shift: k(figures.tracks.five.shift), lines: k(figures.tracks.five.lines) }, seven: { shift: k(figures.tracks.seven.shift), lines: k(figures.tracks.seven.lines) } }, finishExtra: k(figures.finishExtra), line: k(figures.line), dots: { ...figures.dots, step: k(figures.dots.step), from: k(figures.dots.from), diameter: k(figures.dots.diameter) }, inner: k(figures.inner) };
|
|
14
|
+
}
|
|
15
|
+
return { ...figures, length: span(figures.length), width: span(figures.width), corner: k(figures.corner), boards: k(figures.boards) };
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The standard 400 m speed skating track (Rules 203 and 227 and "Measurements of standard 400m speed skating tracks"): two lanes, the inner 4 m wide and the outer at least 4 m, the inner curve of radius
|
|
19
|
+
* 25 m to 26 m, the track measured 0.5 m outside the inner edge of each lane, a lap of 400 m made of two straights, an inner curve, an outer curve and the crossing, since a skater changes lanes once a lap.
|
|
20
|
+
*/
|
|
21
|
+
export const ISU_LONG_TRACK = {
|
|
22
|
+
kind: "long-track",
|
|
23
|
+
innerRadius: { min: 25, max: 26, drawn: 25 },
|
|
24
|
+
innerLane: 4,
|
|
25
|
+
outerLane: { min: 4, max: 6, drawn: 4 },
|
|
26
|
+
warmUpLane: 4,
|
|
27
|
+
lap: 400,
|
|
28
|
+
measure: 0.5,
|
|
29
|
+
line: 0.05,
|
|
30
|
+
blocks: { near: 0.5, nearLength: 15, far: 2, height: 0.05 },
|
|
31
|
+
preStart: 2,
|
|
32
|
+
finishMetres: 5,
|
|
33
|
+
coaches: { offset: 1, after: 25, before: 10 },
|
|
34
|
+
padding: { thick: 0.3, clear: 3 },
|
|
35
|
+
};
|
|
36
|
+
/** The short track oval (Rule 280 and the diagram "Track numbers"): S = 28.85 m, C = R8.50 m, a lap of 111.12 m on a rink of 60 by 30 m at the least. */
|
|
37
|
+
export const ISU_SHORT_TRACK = {
|
|
38
|
+
kind: "short-track",
|
|
39
|
+
lap: 111.12,
|
|
40
|
+
straight: 28.85,
|
|
41
|
+
radius: 8.5,
|
|
42
|
+
blocks: 8,
|
|
43
|
+
blocksPerCurve: 7,
|
|
44
|
+
straightWidth: 7,
|
|
45
|
+
apexClear: 4,
|
|
46
|
+
rink: { length: 60, width: 30 },
|
|
47
|
+
tracks: { five: { shift: 1, lines: 2 }, seven: { shift: 0.7, lines: 1.4 } },
|
|
48
|
+
finishExtra: 1.5,
|
|
49
|
+
line: 0.02,
|
|
50
|
+
dots: { count: 5, step: 1.3, from: 0.5, diameter: 0.02 },
|
|
51
|
+
laps: { "500m": 4.5, "1000m": 9, "1500m": 13.5, "3000m": 27, "3000m-relay": 27, "5000m-relay": 45, "2000m-mixed-relay": 18 },
|
|
52
|
+
inner: 1.5,
|
|
53
|
+
};
|
|
54
|
+
/** The figure skating rink (Rule 342.1): 60 m by 30 m if possible, 56 m by 26 m at the least. The corners and the boards are ours. */
|
|
55
|
+
export const ISU_FIGURE_RINK = {
|
|
56
|
+
kind: "figure",
|
|
57
|
+
length: { min: 56, max: 60, drawn: 60 },
|
|
58
|
+
width: { min: 26, max: 30, drawn: 30 },
|
|
59
|
+
corner: 8.5,
|
|
60
|
+
boards: 0.3,
|
|
61
|
+
};
|
|
62
|
+
/** The measurements of the three options of the standard 400 m track (the table "Measurements of standard 400m speed skating tracks"): the half of the mean axis (the straight, f) and the lengths a skater skates. */
|
|
63
|
+
export const ISU_LONG_TRACK_TABLE = Object.freeze({
|
|
64
|
+
"25m": { radius: 25, straight: 113.57, crossing: 113.64 },
|
|
65
|
+
"25.5m": { radius: 25.5, straight: 112, crossing: 112.07 },
|
|
66
|
+
"26m": { radius: 26, straight: 110.43, crossing: 110.5 },
|
|
67
|
+
});
|
|
68
|
+
/** The skating leagues: the long track (the sport's own), the short track and the figure skating rink. */
|
|
69
|
+
export const SKATING_LEAGUES = [
|
|
70
|
+
{ id: "isu-long-track", family: "skating", name: { en: "ISU 400 m speed skating track", ja: "ISU 400mスピードスケートのリンク" }, unit: "m", dimensions: ISU_LONG_TRACK, sources: ["isu-speed-skating-rules"], builtIn: true },
|
|
71
|
+
{ id: "isu-short-track", family: "skating", name: { en: "ISU 111.12 m short track speed skating oval", ja: "ISU 111.12mショートトラックのリンク" }, unit: "m", dimensions: ISU_SHORT_TRACK, sources: ["isu-short-track-rules"] },
|
|
72
|
+
{ id: "isu-figure", family: "skating", name: { en: "ISU figure skating rink", ja: "ISUフィギュアスケートのリンク" }, unit: "m", dimensions: ISU_FIGURE_RINK, sources: ["isu-figure-skating-rules"] },
|
|
73
|
+
];
|
package/dist/leagues/sources.js
CHANGED
|
@@ -56,6 +56,17 @@ export const LEAGUE_SOURCES = Object.freeze(Object.fromEntries([
|
|
|
56
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
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
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 racket, wall and net sports added after the first five.
|
|
60
|
+
source({ id: "wpv-sitting", title: "Official Sitting Volleyball Rules 2025-2028, Rules 1 Playing Area and 2 Net and Posts", by: "World ParaVolley", edition: "2025-2028 (the English text of 25 July 2025)", url: "https://worldparavolley.org/wp-content/uploads/2025/09/2025-2028-WPV-Official-Sitting-Volleyball-Rules-English-2025-07-25.pdf", read: READ, note: "a court of 10 by 6 m inside a free zone of at least 3 m, and for World ParaVolley, World and Official Competitions 4 m beside the side lines and 6 m behind the end lines (1.1); lines 5 cm wide inside the dimensions (1.3.1, 1.3.2); the centre line's axis dividing the court into two of 6 by 5 m (1.3.3); the attack line's rear edge 2 m from that axis and, for those competitions, extended by five 15 cm lines 20 cm apart to 1.75 m (1.3.4); the service zone 6 m wide, limited by two 15 cm lines 20 cm behind the end line (1.4.2); the net 1.15 m (men) and 1.05 m (women) high (2.1.1), 0.80 m wide and 6.5 to 7 m long (2.2), antennae 1.60 m long and 10 mm across (2.4), posts 0.5 to 1.0 m outside the side lines and 1 m for those competitions (2.5.1)" }),
|
|
61
|
+
source({ id: "fip-padel", title: "Rules of Padel, The Court: Dimensions, Net and Enclosures, and Rule 1 Score in a Game", by: "International Padel Federation", edition: "review of application 1 January 2026", url: "https://www.padelfip.com/wp-content/uploads/2025/12/FIP_Rules-of-Padel.pdf", read: READ, note: "the court 10 m wide by 20 m long (interior measurements, 0.5% tolerance), the service lines 6.95 m from the net, the central service line extending at least 20 cm beyond the service line, all lines 5 cm wide (The Court: Dimensions); the net 10 m long, 0.88 m high at the centre and 0.92 m at the ends, on posts at most 1.05 m high whose outer side coincides with the lateral limit of the court (The Court: Net, 1, 2 and 4); the enclosure, with end walls 4 m high (3 m of wall and 1 m of metal fence) and side walls with a wall area at each end 4 m long and 3 m high (The Court: Enclosures, Ends and Sides); the preferred floor colours green, blue or terracotta (The Court: Ground surface, 2); a match the best of three sets, a set to six games (Rule 1). The rules are headed, not numbered, in the part that describes the court" }),
|
|
62
|
+
source({ id: "wsf-court-specs", title: "Specifications for Squash Courts, clauses 4.01 to 4.03 and 5, and Appendices 1 and 2", by: "World Squash Federation (World Squash)", edition: "28 November 2017, the full specification that applies in World Squash's 2026 transition year", url: "https://www.worldsquash.sport/wp-content/uploads/2021/08/171128_Court-Specifications.pdf", read: READ, note: "a singles court 9,750 by 6,400 mm, a doubles court 7,620 mm wide and the international competition width doubles court 8,420 mm wide (4.01 to 4.03); all markings 50 mm wide (5.01.01); the front wall line 4,570 mm and the service line 1,780 mm up, to the underside (5.02.01, 5.02.02); the tin 480 mm to its top, 330 mm for the competition width (Appendix 2 note 8); the back wall line 2,130 mm up (5.03); the short line's nearest edge 4,260 mm from the back wall, marked for the full width (5.05.01); the half court line from the back wall to the short line (5.05.02); service boxes square with internal sides of 1,600 mm, bounded by lines on three sides and a side wall on the fourth (5.05.03)" }),
|
|
63
|
+
source({ id: "wsf-singles-rules", title: "World Squash Singles Rules, Rule 2 Scoring (2.1 to 2.3)", by: "World Squash", edition: "2024, effective 1 January 2024 (updated November 2023)", url: "https://www.squashireland.ie/wp-content/uploads/2025/04/Rules-of-Singles-Squash-2024-V1.2.pdf", read: READ, note: "World Squash's own copy was not found; the rules were read in the copy Squash Ireland hosts, whose title page reads \"World Squash Singles Rules 2024\": a game to 11 points, to a lead of two from 10-all, and a match normally the best of five games (2.2, 2.3)" }),
|
|
64
|
+
source({ id: "irf-racquetball-rules", title: "Official Rules 2026-2028, Indoor Racquetball, Rule 1.5 Match, Games, Tiebreaker and Rule 2.1 Court Specifications", by: "International Racquetball Federation", edition: "March 2026 (the 2024 Official Rules of Racquetball, copyright IRF, reprinted for 2026-2028)", url: "https://www.internationalracquetball.com/wp-content/uploads/2026/06/1-irf-rulebook_mar26-1.pdf", read: READ, note: "20 feet wide, 40 feet long and 20 feet high with a ceiling, the back wall at least 12 feet high (2.1(a)); lines 1 to 1 1/2 inches wide (2.1(b)); the short line's back edge midway between the walls (2.1(b)1), the service line's front edge 5 feet in front of it (2.1(b)2), the service zone 5 by 20 feet (2.1(b)3), service boxes whose line's nearest edge is 18 inches from the side wall (2.1(b)4), drive serve lines 3 feet from the side wall (2.1(b)5), the receiving line's back edge 5 feet behind the short line's back edge, a broken line of two 21 inch and sixteen 6 inch lines (2.1(b)6), the safety zone (2.1(b)7), the out-of-court line's upper edge 12 feet up the back wall (2.1(b)8); a match three games of five, each to 11 (1.5). The rules are copyrighted and not copied: only these dimensions are used" }),
|
|
65
|
+
source({ id: "irf-racquetball-courts", title: "Racquetball Court Specifications, Section Two Court Dimensions and Tolerances and Section Three Court Markings", by: "International Racquetball Federation", edition: "2025 (revised 1988, 1997, 2013, 2014 and 2024)", url: "https://www.internationalracquetball.com/wp-content/uploads/2026/07/IRF_Courts-specifications-2025.pdf", read: READ, note: "plan dimensions 40 feet by 20 feet by 20 feet (Section Two); markings recommended 1 1/2 inches wide and bright red, black or bright blue on a convertible court with a movable glass back wall (Section Three, Application); the short line, service line, service zone, service boxes, receiving line (a 21 inch end segment and sixteen 6 inch segments with 6 inch spaces) and the back wall out-of-bounds line at 144 inches (Section Three, Required Markings); the screen lines' outside edge three feet from the side wall" }),
|
|
66
|
+
source({ id: "istaf-law", title: "Law of the Game (Regu team event), Laws 1 The Court, 2 The Posts and 3 The Net", by: "International Sepaktakraw Federation", edition: "2013, dated 9 December 2013", url: "https://sepaktakrawindia.com/wp-content/uploads/2022/04/REGU_TEAM-EVENT.pdf", read: READ, note: "the ISTAF's own site refused a connection from a program (a certificate that is not its own), so the 2013 edition was read in the copy a member federation, Sepaktakraw India, hosts, and no later edition was read: the court 13.4 by 6.1 m, free of obstacles to 8 m (1.1); the boundary lines at most 0.04 m wide, drawn inwards (1.1); the centre line 0.02 m (1.2); the quarter circle of 0.9 m radius at both ends of the centre line (1.3); the service circle of 0.3 m radius and 0.04 m width, its centre 2.45 m from the back line and 3.05 m from the sidelines (1.4); a free zone of 3.0 m (1.5); posts 1.55 m for men and 1.45 m for women, 0.3 m from the sidelines in line with the centre line (2.1, 2.2); the net 0.7 m wide and at least 6.1 m long, 1.52 m (men) and 1.42 m (women) at the centre (3.2, 3.5); a match the best of three sets (12.4)" }),
|
|
67
|
+
source({ id: "fiteq-rules", title: "The Official Rules and Regulations of Teqball, 1 The official TEQ table, 2 The teqball court and 6.2 Scoring system", by: "FITEQ (the International Teqball Federation)", edition: "2026", url: "https://cdn.buttercms.com/s6Mb1gRkRJuFP38kpMTh", read: READ, note: "a table 3,000 mm long, 1,500 mm wide (1,700 mm with the net) and 900 mm high with the net (1.1.1 to 1.1.4); a net 1,700 mm wide, 20 mm thick and 140 mm above the table (1.2.1 to 1.2.3); court surrounds 500 to 1,500 mm high (2.1.1.1); the table in the exact middle of the court with the net parallel to the shorter sides (2.1.1.3); the halfway line in the middle, 20 to 50 mm wide (2.1.2); the service line parallel to the net and 3.5 m from the middle of the table, 20 to 50 mm wide (2.1.3); a court of at least 12 m by 16 m by 7 m high, the sides parallel to the net at least 12 m (2.1.4); a set to 12 points, a match the best of three sets (6.2.1, 6.2.2). The rules are copyrighted and not copied: only these dimensions are used" }),
|
|
68
|
+
source({ id: "roundnet-rules", title: "International Roundnet Federation Rules, Chapter 1 Equipment and Court (1.1.2, 1.2.1 to 1.2.4) and 3.4 and 3.5", by: "International Roundnet Federation", edition: "adopted 21 October 2022", url: "https://www.roundnetfederation.org/s/IRF-Rules-10212021docx-1.pdf", read: READ, note: "a set of 91.4 cm diameter and 20.3 cm height (1.1.2); a court of at least 10 by 10 m (33 by 33 feet) recommended, with no out of bounds (1.2.2); a serving line circle 2.6 m (8.5 feet) from the centre of the set, 2.13 m (7 feet) from its edge, with marks at each of the four starting service positions (1.2.3), which are 90 degrees apart (3.8.1), typically parallel and perpendicular to the field (3.8.2); a no hit zone line circle 90 cm (3 feet) from the centre (1.2.4); a game to 15 or 21 and a match typically two games (3.4, 3.5)" }),
|
|
69
|
+
source({ id: "world-netball-rules", title: "Rules of Netball, Rule 1 Technical specifications (Court and related areas, items 1 to 14)", by: "World Netball", edition: "2024 edition (copyright World Netball)", url: "https://netball.sport/wp-content/uploads/2024/01/World-Netball-Rules-Book-2024.pdf", read: READ, note: "side lines 30.5 m (100 ft) and goal lines 15.25 m (50 ft) (items 2 and 3); two transverse lines dividing the court into three equal areas (4); a centre circle 0.9 m (3 ft) across (5); goal circles, semicircles of radius 4.9 m (16 ft) centred on the middle of the outside of the goal line (6); all lines 50 mm wide and part of the area they outline (7); a court surround of 3.05 m (10 ft) (8); a goalpost at the middle of each goal line, its pole 65 to 100 mm across and 3.05 m high, the back of the pole at the outer edge of the goal line, with a ring of 380 mm inside diameter (13, 14). The rules are copyrighted and not copied: only these dimensions are used. World Netball's facilities page gives the same figures" }),
|
|
59
70
|
// The field sports.
|
|
60
71
|
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
72
|
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" }),
|
|
@@ -80,6 +91,15 @@ export const LEAGUE_SOURCES = Object.freeze(Object.fromEntries([
|
|
|
80
91
|
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
92
|
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
93
|
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" }),
|
|
94
|
+
// Athletics.
|
|
95
|
+
source({ id: "wa-facilities-manual", title: "Track and Field Facilities Manual, 2019 Edition, Chapter 2 Competition Arena (2.1 to 2.5)", by: "World Athletics", edition: "2019 (1 November 2019)", url: "https://worldathletics.org/download/download?filename=7d39b677-8043-45f4-89f4-6c8814023057.pdf&urlslug=Track+and+Field+Facilities+Manual+2019+Edition+-+Chapters+1-3", read: READ, note: "the 400 m standard track, its lanes and running lines, the staggers (Table 2.2.1.6a), the breakline and the curved starts, the hurdles, the steeplechase and its water jump, the facilities of the jumps and throws and the standard arena (Figure 2.5a)" }),
|
|
96
|
+
source({ id: "wa-marking-plan", title: "400 Metre Standard Track, Marking Plan (Figure 2.2.1.6a), scale 1:350", by: "World Athletics", edition: "2019 (13 November 2019)", url: "https://worldathletics.org/download/download?filename=596848ce-6afe-4f00-8eb0-62a019ee215e.pdf&urlslug=Track+and+Field+Facilities+Manual+2019+Edition+-+Marking+Plan+400m+Standard+Track", read: READ, note: "where each start, takeover zone, hurdle and field facility stands, and the colour of each mark" }),
|
|
97
|
+
source({ id: "wa-technical-rules", title: "C1.1 Competition Rules and C2.1 Technical Rules (Rules 14 to 17, 22 to 24, 25 to 38 and 41 to 44 of the Technical Rules)", by: "World Athletics", edition: "in force 1 July 2026", url: "https://worldathletics.org/about-iaaf/documents/book-of-rules", read: READ, note: "the track, the start, the race, hurdles, steeplechase, relays and the field events' runways, circles and sectors" }),
|
|
98
|
+
source({ id: "wa-short-track-plan", title: "Marking Plan for the World Athletics Standard Short Track (Figure 8.3.6c), 200M Standard Short Track Stadium", by: "World Athletics", edition: "1 January 2026", url: "https://worldathletics.org/download/download?filename=0c5f7661-1146-4c45-976b-57f9a232a38d.pdf&urlslug=Track%20and%20Field%20Facilities%20Manual%20-%20Marking%20Plan%20Standard%20Short%20Track", read: READ, note: "the covered track's radius, straights, banking and lane staggers" }),
|
|
99
|
+
// Ice skating.
|
|
100
|
+
source({ id: "isu-speed-skating-rules", title: "Sports Rules - Speed Skating: Special Regulations and Technical Rules, Rules 203 to 206, 226 to 228 and 253 to 257, and H. Track (the layout plan and the measurements of standard 400m tracks)", by: "International Skating Union", edition: "effective 12 June 2026 (dated 1 June 2026)", url: "https://www.isu.org/en/figure-skating-rules/speed-skating-rules", read: READ, note: "the standard 400 m track: two lanes, the inner curve of 25 m to 26 m, the track measured 0.5 m outside the inner edge, a lap made of two straights, an inner and an outer curve and the crossing, the lines of each distance, the blocks, the coaches' area, the padding" }),
|
|
101
|
+
source({ id: "isu-short-track-rules", title: "Special Regulations and Technical Rules Short Track Speed Skating, Rule 280 and the diagram of the tracks", by: "International Skating Union", edition: "2024 (accepted by the 59th ISU Ordinary Congress, June 2024)", url: "https://knsb.nl/documents/558/2024_Special_Regulations_Technical_Rules_Short_Track.pdf", read: READ, note: "the 111.12 m oval on a rink of 60 by 30 m at least: S = 28.85 m, C = R8.50 m, seven blocks in each curve, five or seven tracks, the starting positions of the 500 m and the 1000 m, the laps of each distance; a copy kept by the Dutch federation, the ISU's own page lists the file" }),
|
|
102
|
+
source({ id: "isu-figure-skating-rules", title: "Sports Rules - Figure Skating (Single and Pair Skating and Ice Dance): Rule 342 Required rinks", by: "International Skating Union", edition: "effective 12 June 2026 (dated 10 June 2026)", url: "https://www.isu.org/en/figure-skating-rules/figure-skating-rules", read: READ, note: "the skating area of 60 m by 30 m if possible, not larger and not less than 56 m by 26 m; the judges and the referee at the rinkboard, the technical panel in an elevated position if possible" }),
|
|
83
103
|
// Baseball and softball.
|
|
84
104
|
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
105
|
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" }),
|
package/dist/leagues/types.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export interface Named {
|
|
|
5
5
|
ja: string;
|
|
6
6
|
}
|
|
7
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";
|
|
8
|
+
export type Family = "basketball" | "hockey" | "football" | "baseball" | "curling" | "tennis" | "volleyball" | "badminton" | "pickleball" | "tabletennis" | "padel" | "squash" | "racquetball" | "sepaktakraw" | "teqball" | "roundnet" | "netball" | "lacrosse" | "rugby" | "afl" | "gaelic" | "cricket" | "fieldhockey" | "handball" | "athletics" | "skating";
|
|
9
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
10
|
export interface LeagueSpan<T> {
|
|
11
11
|
/** The first season it was in force, or `null` for the state before the first change that is cited. */
|
package/dist/leagues-entry.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
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";
|
|
2
|
+
export type { BaseballLeague, BasketballLeague, CourtFigures, CurlingLeague, SheetFigures, BadmintonFigures, BadmintonLeague, FreeZone, FreeZones, NetFigures, NetLeague, NetSport, NetballFigures, NetballLeague, PadelFigures, PadelLeague, PickleballFigures, PickleballLeague, RacquetballFigures, RacquetballLeague, RoundnetFigures, RoundnetLeague, SepakTakrawFigures, SepakTakrawLeague, SquashFigures, SquashLeague, TableTennisFigures, TableTennisLeague, TennisFigures, TennisLeague, TeqballFigures, TeqballLeague, VolleyballFigures, VolleyballLeague, CourtMarks, DiamondFigures, Family, FootballLeague, HockeyLeague, League, LeagueAt, LeagueChange, LeagueSource, LeagueSpan, Named, RinkFigures } from "./leagues.ts";
|
|
3
3
|
export { MLB_DIAMOND } from "./leagues/baseball.ts";
|
|
4
4
|
export { NBA_COURT } from "./leagues/basketball.ts";
|
|
5
5
|
export { NHL_RINK } from "./leagues/hockey.ts";
|
|
6
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";
|
|
7
|
+
export { BADMINTON_LEAGUES, BWF_BADMINTON, FIP_PADEL, FITEQ_TEQBALL, FIVB_BEACH, FIVB_INDOOR, IRF_RACQUETBALL, IRF_ROUNDNET, ISTAF_SEPAK_TAKRAW, ITF_TENNIS, ITTF_TABLE, NETBALL_LEAGUES, PADEL_LEAGUES, PICKLEBALL_LEAGUES, RACQUETBALL_LEAGUES, ROUNDNET_LEAGUES, SEPAK_TAKRAW_LEAGUES, SQUASH_LEAGUES, TABLE_TENNIS_LEAGUES, TENNIS_LEAGUES, TEQBALL_LEAGUES, USAP_PICKLEBALL, VOLLEYBALL_LEAGUES, WN_NETBALL, WPV_SITTING, WSF_SQUASH, WSF_SQUASH_DOUBLES, WSF_SQUASH_WIDE } from "./leagues/courts.ts";
|
|
8
8
|
export { AFL_GROUND, AFL_GROUNDS, AFL_LEAGUES } from "./leagues/aussie.ts";
|
|
9
9
|
export type { AflFigures, AflGround, AflLeague } from "./leagues/aussie.ts";
|
|
10
10
|
export { CRICKET_LEAGUES, ICC_MEN_GROUND, ICC_WOMEN_GROUND, MCC_GROUND } from "./leagues/cricket.ts";
|
|
@@ -19,5 +19,7 @@ export { LACROSSE_LEAGUES, NCAA_MEN_FIELD, NCAA_WOMEN_FIELD, NLL_FLOOR, PLL_FIEL
|
|
|
19
19
|
export type { LacrosseFigures, LacrosseLeague } from "./leagues/lacrosse.ts";
|
|
20
20
|
export { IRL_FIELD, NRL_FIELD, RUGBY_LEAGUES, WORLD_RUGBY_FIELD } from "./leagues/rugby.ts";
|
|
21
21
|
export type { RugbyFigures, RugbyLeague } from "./leagues/rugby.ts";
|
|
22
|
+
export { ATHLETICS_LEAGUES, WA_SHORT_STAGGER_TABLE, WA_SHORT_TRACK, WA_STAGGER_TABLE, WA_STANDARD_TRACK } from "./leagues/athletics.ts";
|
|
23
|
+
export type { AthleticsFigures, AthleticsLeague } from "./leagues/athletics.ts";
|
|
22
24
|
export { fixed, span } from "./leagues/fields.ts";
|
|
23
25
|
export type { Span } from "./leagues/fields.ts";
|
package/dist/leagues-entry.js
CHANGED
|
@@ -4,7 +4,7 @@ export { MLB_DIAMOND } from "./leagues/baseball.js";
|
|
|
4
4
|
export { NBA_COURT } from "./leagues/basketball.js";
|
|
5
5
|
export { NHL_RINK } from "./leagues/hockey.js";
|
|
6
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";
|
|
7
|
+
export { BADMINTON_LEAGUES, BWF_BADMINTON, FIP_PADEL, FITEQ_TEQBALL, FIVB_BEACH, FIVB_INDOOR, IRF_RACQUETBALL, IRF_ROUNDNET, ISTAF_SEPAK_TAKRAW, ITF_TENNIS, ITTF_TABLE, NETBALL_LEAGUES, PADEL_LEAGUES, PICKLEBALL_LEAGUES, RACQUETBALL_LEAGUES, ROUNDNET_LEAGUES, SEPAK_TAKRAW_LEAGUES, SQUASH_LEAGUES, TABLE_TENNIS_LEAGUES, TENNIS_LEAGUES, TEQBALL_LEAGUES, USAP_PICKLEBALL, VOLLEYBALL_LEAGUES, WN_NETBALL, WPV_SITTING, WSF_SQUASH, WSF_SQUASH_DOUBLES, WSF_SQUASH_WIDE } from "./leagues/courts.js";
|
|
8
8
|
export { AFL_GROUND, AFL_GROUNDS, AFL_LEAGUES } from "./leagues/aussie.js";
|
|
9
9
|
export { CRICKET_LEAGUES, ICC_MEN_GROUND, ICC_WOMEN_GROUND, MCC_GROUND } from "./leagues/cricket.js";
|
|
10
10
|
export { FIELD_HOCKEY_LEAGUES, FIH_PITCH } from "./leagues/fieldhockey.js";
|
|
@@ -12,4 +12,5 @@ export { GAA_FOOTBALL_FIELD, GAA_HURLING_FIELD, GAELIC_LEAGUES } from "./leagues
|
|
|
12
12
|
export { HANDBALL_LEAGUES, IHF_COURT } from "./leagues/handball.js";
|
|
13
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
14
|
export { IRL_FIELD, NRL_FIELD, RUGBY_LEAGUES, WORLD_RUGBY_FIELD } from "./leagues/rugby.js";
|
|
15
|
+
export { ATHLETICS_LEAGUES, WA_SHORT_STAGGER_TABLE, WA_SHORT_TRACK, WA_STAGGER_TABLE, WA_STANDARD_TRACK } from "./leagues/athletics.js";
|
|
15
16
|
export { fixed, span } from "./leagues/fields.js";
|
package/dist/leagues.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ import { type NetLeague } from "./leagues/courts.ts";
|
|
|
7
7
|
import { type AflLeague, type AflSpec } from "./leagues/aussie.ts";
|
|
8
8
|
import { type CricketLeague, type CricketSpec } from "./leagues/cricket.ts";
|
|
9
9
|
import { type FieldHockeyLeague, type FieldHockeySpec } from "./leagues/fieldhockey.ts";
|
|
10
|
+
import { type AthleticsFigures, type AthleticsLeague } from "./leagues/athletics.ts";
|
|
11
|
+
import { type SkatingFigures, type SkatingLeague } from "./leagues/skating.ts";
|
|
10
12
|
import { type GaelicLeague, type GaelicSpec } from "./leagues/gaelic.ts";
|
|
11
13
|
import { type HandballLeague, type HandballSpec } from "./leagues/handball.ts";
|
|
12
14
|
import { type LacrosseLeague, type LacrosseSpec } from "./leagues/lacrosse.ts";
|
|
@@ -28,19 +30,23 @@ export type { HandballFigures, HandballLeague } from "./leagues/handball.ts";
|
|
|
28
30
|
export type { LacrosseFigures, LacrosseLeague } from "./leagues/lacrosse.ts";
|
|
29
31
|
export type { RugbyFigures, RugbyLeague } from "./leagues/rugby.ts";
|
|
30
32
|
export type { Span } from "./leagues/fields.ts";
|
|
31
|
-
export type {
|
|
33
|
+
export type { AthleticsFigures, AthleticsLeague } from "./leagues/athletics.ts";
|
|
34
|
+
export { WA_STANDARD_TRACK, WA_SHORT_TRACK, WA_STAGGER_TABLE, WA_SHORT_STAGGER_TABLE } from "./leagues/athletics.ts";
|
|
35
|
+
export type { SkatingFigures, SkatingLeague, LongTrackFigures, ShortTrackFigures, FigureRinkFigures } from "./leagues/skating.ts";
|
|
36
|
+
export { ISU_LONG_TRACK, ISU_SHORT_TRACK, ISU_FIGURE_RINK, ISU_LONG_TRACK_TABLE } from "./leagues/skating.ts";
|
|
37
|
+
export type { BadmintonFigures, BadmintonLeague, FreeZone, FreeZones, NetFigures, NetLeague, NetSport, NetballFigures, NetballLeague, PadelFigures, PadelLeague, PickleballFigures, PickleballLeague, RacquetballFigures, RacquetballLeague, RoundnetFigures, RoundnetLeague, SepakTakrawFigures, SepakTakrawLeague, SquashFigures, SquashLeague, TableTennisFigures, TableTennisLeague, TennisFigures, TennisLeague, TeqballFigures, TeqballLeague, VolleyballFigures, VolleyballLeague } from "./leagues/courts.ts";
|
|
32
38
|
export type { CourtFigures, CourtMarks } from "./leagues/basketball.ts";
|
|
33
39
|
export type { RinkFigures } from "./leagues/hockey.ts";
|
|
34
40
|
export type { SheetFigures } from "./leagues/curling.ts";
|
|
35
41
|
export type { DiamondFigures } from "./leagues/baseball.ts";
|
|
36
42
|
export type { Family, LeagueSpan, Named } from "./leagues/types.ts";
|
|
37
43
|
/** 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;
|
|
44
|
+
export type League = BasketballLeague | HockeyLeague | FootballLeague | BaseballLeague | CurlingLeague | NetLeague | LacrosseLeague | RugbyLeague | AflLeague | GaelicLeague | CricketLeague | FieldHockeyLeague | HandballLeague | AthleticsLeague | SkatingLeague;
|
|
39
45
|
/** The family of surface each sport draws; soccer's variants are its pitches (`pitch`), not leagues. */
|
|
40
46
|
export declare const FAMILY_OF: Readonly<Record<Sport, Family | undefined>>;
|
|
41
47
|
/**
|
|
42
48
|
* 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
|
|
49
|
+
* list, the football leagues). Soccer and the pools have none.
|
|
44
50
|
*/
|
|
45
51
|
export declare const LEAGUES: Readonly<Record<Sport, readonly League[]>>;
|
|
46
52
|
/** Every league of every family, once each. */
|
|
@@ -123,7 +129,7 @@ export declare const courtOf: (league: BasketballLeague, year?: number) => Court
|
|
|
123
129
|
export declare const rinkOf: (league: HockeyLeague, year?: number) => RinkSpec;
|
|
124
130
|
/** A curling sheet of a league, in feet. A sheet has no history; a year is ignored. */
|
|
125
131
|
export declare const sheetOf: (league?: CurlingLeague) => SheetSpec;
|
|
126
|
-
/** A net sport's court of a league (tennis, volleyball and
|
|
132
|
+
/** A net sport's court of a league (tennis, volleyball, beach and sitting volleyball, badminton, pickleball, table tennis, padel, squash, racquetball, sepak takraw, teqball, roundnet and netball), in feet. These courts have no history; a year is ignored. */
|
|
127
133
|
export declare const netOf: <L extends NetLeague>(league: L) => L["dimensions"];
|
|
128
134
|
/** A lacrosse surface of a league, in feet (the box floor, or a field). These have no history; a year is ignored. */
|
|
129
135
|
export declare const lacrosseOf: (league: LacrosseLeague) => LacrosseSpec;
|
|
@@ -137,6 +143,10 @@ export declare const gaelicOf: (league: GaelicLeague) => GaelicSpec;
|
|
|
137
143
|
export declare const cricketOf: (league: CricketLeague) => CricketSpec;
|
|
138
144
|
/** A field hockey pitch, in feet. */
|
|
139
145
|
export declare const fieldHockeyOf: (league: FieldHockeyLeague) => FieldHockeySpec;
|
|
146
|
+
/** A skating rink of a league, in feet. */
|
|
147
|
+
export declare const skatingOf: (league: SkatingLeague) => SkatingFigures;
|
|
148
|
+
/** An athletics track of a league, in feet. */
|
|
149
|
+
export declare const athleticsOf: (league: AthleticsLeague) => AthleticsFigures;
|
|
140
150
|
/** A handball court, in feet. */
|
|
141
151
|
export declare const handballOf: (league: HandballLeague) => HandballSpec;
|
|
142
152
|
/** A football field of a league in a season: the spec, in feet. */
|
package/dist/leagues.js
CHANGED
|
@@ -8,10 +8,13 @@ import { BASKETBALL_LEAGUES, courtInFeet } from "./leagues/basketball.js";
|
|
|
8
8
|
import { FOOTBALL_LEAGUES } from "./leagues/football.js";
|
|
9
9
|
import { HOCKEY_LEAGUES, rinkInFeet } from "./leagues/hockey.js";
|
|
10
10
|
import { CURLING_LEAGUES, sheetInFeet } from "./leagues/curling.js";
|
|
11
|
-
import { BADMINTON_LEAGUES, PICKLEBALL_LEAGUES, TABLE_TENNIS_LEAGUES, TENNIS_LEAGUES, VOLLEYBALL_LEAGUES, netInFeet } from "./leagues/courts.js";
|
|
11
|
+
import { BADMINTON_LEAGUES, NETBALL_LEAGUES, PADEL_LEAGUES, PICKLEBALL_LEAGUES, RACQUETBALL_LEAGUES, ROUNDNET_LEAGUES, SEPAK_TAKRAW_LEAGUES, SQUASH_LEAGUES, TABLE_TENNIS_LEAGUES, TENNIS_LEAGUES, TEQBALL_LEAGUES, VOLLEYBALL_LEAGUES, netInFeet } from "./leagues/courts.js";
|
|
12
12
|
import { AFL_LEAGUES, aflInFeet } from "./leagues/aussie.js";
|
|
13
13
|
import { CRICKET_LEAGUES, cricketInFeet } from "./leagues/cricket.js";
|
|
14
14
|
import { FIELD_HOCKEY_LEAGUES, fieldHockeyInFeet } from "./leagues/fieldhockey.js";
|
|
15
|
+
import { ATHLETICS_LEAGUES, athleticsInFeet } from "./leagues/athletics.js";
|
|
16
|
+
import { longOval, outerEdge } from "./skating/track.js";
|
|
17
|
+
import { SKATING_LEAGUES, skatingInFeet } from "./leagues/skating.js";
|
|
15
18
|
import { GAELIC_LEAGUES, gaelicInFeet } from "./leagues/gaelic.js";
|
|
16
19
|
import { HANDBALL_LEAGUES, handballInFeet } from "./leagues/handball.js";
|
|
17
20
|
import { LACROSSE_LEAGUES, lacrosseInFeet } from "./leagues/lacrosse.js";
|
|
@@ -21,11 +24,13 @@ import { inFeet } from "./leagues/types.js";
|
|
|
21
24
|
import { convertLength } from "./units.js";
|
|
22
25
|
export { LEAGUE_SOURCES };
|
|
23
26
|
export { AFL_GROUNDS } from "./leagues/aussie.js";
|
|
27
|
+
export { WA_STANDARD_TRACK, WA_SHORT_TRACK, WA_STAGGER_TABLE, WA_SHORT_STAGGER_TABLE } from "./leagues/athletics.js";
|
|
28
|
+
export { ISU_LONG_TRACK, ISU_SHORT_TRACK, ISU_FIGURE_RINK, ISU_LONG_TRACK_TABLE } from "./leagues/skating.js";
|
|
24
29
|
/** The family of surface each sport draws; soccer's variants are its pitches (`pitch`), not leagues. */
|
|
25
|
-
export const FAMILY_OF = Object.freeze({ nfl: "football", cfl: "football", ifaf: "football", nhl: "hockey", nba: "basketball", mlb: "baseball", soccer: undefined, curling: "curling", tennis: "tennis", volleyball: "volleyball", badminton: "badminton", pickleball: "pickleball", tabletennis: "tabletennis", lacrosse: "lacrosse", rugby: "rugby", afl: "afl", gaelic: "gaelic", cricket: "cricket", fieldhockey: "fieldhockey", handball: "handball" });
|
|
30
|
+
export const FAMILY_OF = Object.freeze({ nfl: "football", cfl: "football", ifaf: "football", nhl: "hockey", nba: "basketball", mlb: "baseball", soccer: undefined, curling: "curling", tennis: "tennis", volleyball: "volleyball", badminton: "badminton", pickleball: "pickleball", tabletennis: "tabletennis", padel: "padel", squash: "squash", racquetball: "racquetball", sepaktakraw: "sepaktakraw", teqball: "teqball", roundnet: "roundnet", netball: "netball", lacrosse: "lacrosse", rugby: "rugby", afl: "afl", gaelic: "gaelic", cricket: "cricket", fieldhockey: "fieldhockey", handball: "handball", swimming: undefined, waterpolo: undefined, diving: undefined, artisticswimming: undefined, athletics: "athletics", skating: "skating" });
|
|
26
31
|
/**
|
|
27
32
|
* The leagues each sport can draw, in the order a menu lists them, the sport's own first (the three football sports share their
|
|
28
|
-
* list, the football leagues). Soccer
|
|
33
|
+
* list, the football leagues). Soccer and the pools have none.
|
|
29
34
|
*/
|
|
30
35
|
export const LEAGUES = Object.freeze({
|
|
31
36
|
nba: BASKETBALL_LEAGUES,
|
|
@@ -41,6 +46,13 @@ export const LEAGUES = Object.freeze({
|
|
|
41
46
|
badminton: BADMINTON_LEAGUES,
|
|
42
47
|
pickleball: PICKLEBALL_LEAGUES,
|
|
43
48
|
tabletennis: TABLE_TENNIS_LEAGUES,
|
|
49
|
+
padel: PADEL_LEAGUES,
|
|
50
|
+
squash: SQUASH_LEAGUES,
|
|
51
|
+
racquetball: RACQUETBALL_LEAGUES,
|
|
52
|
+
sepaktakraw: SEPAK_TAKRAW_LEAGUES,
|
|
53
|
+
teqball: TEQBALL_LEAGUES,
|
|
54
|
+
roundnet: ROUNDNET_LEAGUES,
|
|
55
|
+
netball: NETBALL_LEAGUES,
|
|
44
56
|
lacrosse: LACROSSE_LEAGUES,
|
|
45
57
|
rugby: RUGBY_LEAGUES,
|
|
46
58
|
afl: AFL_LEAGUES,
|
|
@@ -48,9 +60,16 @@ export const LEAGUES = Object.freeze({
|
|
|
48
60
|
cricket: CRICKET_LEAGUES,
|
|
49
61
|
fieldhockey: FIELD_HOCKEY_LEAGUES,
|
|
50
62
|
handball: HANDBALL_LEAGUES,
|
|
63
|
+
// The pools have one rulebook, World Aquatics', and no leagues.
|
|
64
|
+
swimming: [],
|
|
65
|
+
waterpolo: [],
|
|
66
|
+
diving: [],
|
|
67
|
+
artisticswimming: [],
|
|
68
|
+
athletics: ATHLETICS_LEAGUES,
|
|
69
|
+
skating: SKATING_LEAGUES,
|
|
51
70
|
});
|
|
52
71
|
/** Every league of every family, once each. */
|
|
53
|
-
export const VARIANTS = Object.freeze([...BASKETBALL_LEAGUES, ...HOCKEY_LEAGUES, ...FOOTBALL_LEAGUES, ...BASEBALL_LEAGUES, ...CURLING_LEAGUES, ...TENNIS_LEAGUES, ...VOLLEYBALL_LEAGUES, ...BADMINTON_LEAGUES, ...PICKLEBALL_LEAGUES, ...TABLE_TENNIS_LEAGUES, ...LACROSSE_LEAGUES, ...RUGBY_LEAGUES, ...AFL_LEAGUES, ...GAELIC_LEAGUES, ...CRICKET_LEAGUES, ...FIELD_HOCKEY_LEAGUES, ...HANDBALL_LEAGUES]);
|
|
72
|
+
export const VARIANTS = Object.freeze([...BASKETBALL_LEAGUES, ...HOCKEY_LEAGUES, ...FOOTBALL_LEAGUES, ...BASEBALL_LEAGUES, ...CURLING_LEAGUES, ...TENNIS_LEAGUES, ...VOLLEYBALL_LEAGUES, ...BADMINTON_LEAGUES, ...PICKLEBALL_LEAGUES, ...TABLE_TENNIS_LEAGUES, ...PADEL_LEAGUES, ...SQUASH_LEAGUES, ...RACQUETBALL_LEAGUES, ...SEPAK_TAKRAW_LEAGUES, ...TEQBALL_LEAGUES, ...ROUNDNET_LEAGUES, ...NETBALL_LEAGUES, ...LACROSSE_LEAGUES, ...RUGBY_LEAGUES, ...AFL_LEAGUES, ...GAELIC_LEAGUES, ...CRICKET_LEAGUES, ...FIELD_HOCKEY_LEAGUES, ...HANDBALL_LEAGUES, ...ATHLETICS_LEAGUES]);
|
|
54
73
|
/** The ids of a sport's leagues. */
|
|
55
74
|
export const leagueIds = (sport) => LEAGUES[sport].map((league) => league.id);
|
|
56
75
|
/** A league by its sport and id, or `undefined`. */
|
|
@@ -160,7 +179,7 @@ export const courtOf = (league, year) => courtInFeet(leagueAtOf(league, year).fi
|
|
|
160
179
|
export const rinkOf = (league, year) => rinkInFeet(leagueAtOf(league, year).figures, figuresUnit(league));
|
|
161
180
|
/** A curling sheet of a league, in feet. A sheet has no history; a year is ignored. */
|
|
162
181
|
export const sheetOf = (league = CURLING_LEAGUES[0]) => sheetInFeet(league.dimensions, league.figuresUnit ?? league.unit);
|
|
163
|
-
/** A net sport's court of a league (tennis, volleyball and
|
|
182
|
+
/** A net sport's court of a league (tennis, volleyball, beach and sitting volleyball, badminton, pickleball, table tennis, padel, squash, racquetball, sepak takraw, teqball, roundnet and netball), in feet. These courts have no history; a year is ignored. */
|
|
164
183
|
export const netOf = (league) => netInFeet(league.dimensions, figuresUnit(league));
|
|
165
184
|
/** A lacrosse surface of a league, in feet (the box floor, or a field). These have no history; a year is ignored. */
|
|
166
185
|
export const lacrosseOf = (league) => lacrosseInFeet(league.dimensions, figuresUnit(league));
|
|
@@ -174,6 +193,10 @@ export const gaelicOf = (league) => gaelicInFeet(league.dimensions, figuresUnit(
|
|
|
174
193
|
export const cricketOf = (league) => cricketInFeet(league.dimensions, figuresUnit(league));
|
|
175
194
|
/** A field hockey pitch, in feet. */
|
|
176
195
|
export const fieldHockeyOf = (league) => fieldHockeyInFeet(league.dimensions, figuresUnit(league));
|
|
196
|
+
/** A skating rink of a league, in feet. */
|
|
197
|
+
export const skatingOf = (league) => skatingInFeet(league.dimensions, figuresUnit(league));
|
|
198
|
+
/** An athletics track of a league, in feet. */
|
|
199
|
+
export const athleticsOf = (league) => athleticsInFeet(league.dimensions, figuresUnit(league));
|
|
177
200
|
/** A handball court, in feet. */
|
|
178
201
|
export const handballOf = (league) => handballInFeet(league.dimensions, figuresUnit(league));
|
|
179
202
|
/** A football field of a league in a season: the spec, in feet. */
|
|
@@ -215,6 +238,13 @@ export function leagueSize(sport, id, unit) {
|
|
|
215
238
|
case "badminton":
|
|
216
239
|
case "pickleball":
|
|
217
240
|
case "tabletennis":
|
|
241
|
+
case "padel":
|
|
242
|
+
case "squash":
|
|
243
|
+
case "racquetball":
|
|
244
|
+
case "sepaktakraw":
|
|
245
|
+
case "teqball":
|
|
246
|
+
case "roundnet":
|
|
247
|
+
case "netball":
|
|
218
248
|
feet = netOf(league);
|
|
219
249
|
break;
|
|
220
250
|
case "football": {
|
|
@@ -245,6 +275,20 @@ export function leagueSize(sport, id, unit) {
|
|
|
245
275
|
feet = { length: 2 * f.boundary.drawn, width: 2 * f.boundary.drawn };
|
|
246
276
|
break;
|
|
247
277
|
}
|
|
278
|
+
case "athletics": {
|
|
279
|
+
// The oval's outer edge with its last lane drawn: two semicircles and a straight long, a diameter wide.
|
|
280
|
+
const f = athleticsOf(league);
|
|
281
|
+
const outer = f.radius + f.lanes.drawn * f.lane;
|
|
282
|
+
feet = { length: f.straight + 2 * outer, width: 2 * outer };
|
|
283
|
+
break;
|
|
284
|
+
}
|
|
285
|
+
case "skating": {
|
|
286
|
+
// The long track: the ice out to the padding; the others: the rink.
|
|
287
|
+
const d = league.dimensions;
|
|
288
|
+
const m = d.kind === "long-track" ? (() => { const o = longOval(undefined, undefined, d); const R = outerEdge(o) + d.padding.clear; return { length: o.straight + 2 * R, width: 2 * R }; })() : d.kind === "short-track" ? d.rink : { length: d.length.drawn, width: d.width.drawn };
|
|
289
|
+
feet = { length: convertLength(m.length, league.unit, "ft"), width: convertLength(m.width, league.unit, "ft") };
|
|
290
|
+
break;
|
|
291
|
+
}
|
|
248
292
|
default:
|
|
249
293
|
throw new Error(`No fixed size for the ${league.family} league "${id}": a diamond's size is its fence`);
|
|
250
294
|
}
|
|
@@ -356,6 +400,69 @@ export function leagueFigures(league) {
|
|
|
356
400
|
["lines", `${w(t.edgeLine)} at the edges, a ${w(t.centreLine)} centre line`],
|
|
357
401
|
];
|
|
358
402
|
}
|
|
403
|
+
case "padel": {
|
|
404
|
+
const p = netOf(league);
|
|
405
|
+
return [
|
|
406
|
+
["court", `${w(p.length)} by ${w(p.width)}, inside its walls`],
|
|
407
|
+
["service line", `${w(p.serviceLine)} from the net`],
|
|
408
|
+
["net", `${w(p.net.heightCentre)} at the centre, ${w(p.net.heightEnds)} at the ends, ${w(p.net.length)} long`],
|
|
409
|
+
["walls", `the end walls ${w(p.enclosure.endHeight)} high, the side walls ${w(p.enclosure.sideWall)} long at each end`],
|
|
410
|
+
];
|
|
411
|
+
}
|
|
412
|
+
case "squash": {
|
|
413
|
+
const q = netOf(league);
|
|
414
|
+
return [
|
|
415
|
+
["court", `${w(q.length)} by ${w(q.width)}`],
|
|
416
|
+
["short line", `${w(q.shortLine)} from the back wall to its nearest edge`],
|
|
417
|
+
["service box", `${w(q.serviceBox)} square inside its lines`],
|
|
418
|
+
["front wall", `the tin ${w(q.wall.tin)}, the service line ${w(q.wall.serviceLine)} and the front wall line ${w(q.wall.frontWallLine)} up`],
|
|
419
|
+
];
|
|
420
|
+
}
|
|
421
|
+
case "racquetball": {
|
|
422
|
+
const r = netOf(league);
|
|
423
|
+
return [
|
|
424
|
+
["court", `${w(r.length)} by ${w(r.width)}, ${w(r.height)} high`],
|
|
425
|
+
["short line", `${w(r.shortLine)} from the back wall to its back edge`],
|
|
426
|
+
["service line", `${w(r.serviceLine)} in front of the short line`],
|
|
427
|
+
["receiving line", `${w(r.receiving.behind)} behind the short line`],
|
|
428
|
+
];
|
|
429
|
+
}
|
|
430
|
+
case "sepaktakraw": {
|
|
431
|
+
const t = netOf(league);
|
|
432
|
+
return [
|
|
433
|
+
["court", `${w(t.length)} by ${w(t.width)}`],
|
|
434
|
+
["quarter circles", `${w(t.quarterCircle)} radius, at the ends of the centre line`],
|
|
435
|
+
["service circles", `${w(t.serviceCircle.radius)} radius, ${w(t.serviceCircle.fromBack)} from the back line`],
|
|
436
|
+
["net", `${w(t.net.heightMen)} high at the centre (women's ${w(t.net.heightWomen)})`],
|
|
437
|
+
];
|
|
438
|
+
}
|
|
439
|
+
case "teqball": {
|
|
440
|
+
const t = netOf(league);
|
|
441
|
+
return [
|
|
442
|
+
["court", `at least ${w(t.length)} by ${w(t.width)}`],
|
|
443
|
+
["table", `${w(t.table.length)} by ${w(t.table.width)}`],
|
|
444
|
+
["service line", `${w(t.serviceLine)} from the middle of the table`],
|
|
445
|
+
["net", `${w(t.net.width)} wide, ${w(t.net.height)} high`],
|
|
446
|
+
];
|
|
447
|
+
}
|
|
448
|
+
case "roundnet": {
|
|
449
|
+
const t = netOf(league);
|
|
450
|
+
return [
|
|
451
|
+
["court", `at least ${w(t.length)} by ${w(t.width)}, with no out of bounds`],
|
|
452
|
+
["set", `${w(t.set.diameter)} across`],
|
|
453
|
+
["serving line", `a circle of ${w(t.servingRadius)} radius`],
|
|
454
|
+
["no hit zone", `a circle of ${w(t.noHitRadius)} radius`],
|
|
455
|
+
];
|
|
456
|
+
}
|
|
457
|
+
case "netball": {
|
|
458
|
+
const n = netOf(league);
|
|
459
|
+
return [
|
|
460
|
+
["court", `${w(n.length)} by ${w(n.width)}`],
|
|
461
|
+
["centre circle", `${w(n.centreCircle)} across`],
|
|
462
|
+
["goal circles", `semicircles of ${w(n.goalCircle)} radius`],
|
|
463
|
+
["goalposts", `${w(n.post.height)} high, at the middle of each goal line`],
|
|
464
|
+
];
|
|
465
|
+
}
|
|
359
466
|
case "football": {
|
|
360
467
|
const f = fieldOf(league);
|
|
361
468
|
return [
|
|
@@ -439,6 +546,40 @@ export function leagueFigures(league) {
|
|
|
439
546
|
["goal", `${w(f.goalWidth)} wide and ${w(f.goalHeight)} high`],
|
|
440
547
|
];
|
|
441
548
|
}
|
|
549
|
+
case "skating": {
|
|
550
|
+
const f = skatingOf(league);
|
|
551
|
+
if (f.kind === "long-track") {
|
|
552
|
+
return [
|
|
553
|
+
["track", `a lap of ${w(f.lap)} measured ${w(f.measure)} outside the inner edge, the inner curve ${w(f.innerRadius.min)} to ${w(f.innerRadius.max)} in radius`],
|
|
554
|
+
["lanes", `an inner lane of ${w(f.innerLane)} and an outer lane of at least ${w(f.outerLane.min)}, the warm-up lane at least ${w(f.warmUpLane)} wide`],
|
|
555
|
+
["blocks", `${w(f.blocks.near)} apart for the first ${w(f.blocks.nearLength)} of a curve, ${w(f.blocks.far)} after`],
|
|
556
|
+
["coaches' area", `a line ${w(f.coaches.offset)} from the outside edge, from ${w(f.coaches.after)} after the end of a curve to ${w(f.coaches.before)} before the next`],
|
|
557
|
+
["padding", `${w(f.padding.thick)} thick, nothing fixed within ${w(f.padding.clear)} of the edge`],
|
|
558
|
+
];
|
|
559
|
+
}
|
|
560
|
+
if (f.kind === "short-track") {
|
|
561
|
+
return [
|
|
562
|
+
["oval", `a lap of ${w(f.lap)}: straights of ${w(f.straight)} between the centres of the curves, a track line of ${w(f.radius)} radius`],
|
|
563
|
+
["blocks", `${f.blocksPerCurve} in each curve, on a radius of ${w(f.blocks)}`],
|
|
564
|
+
["rink", `at least ${w(f.rink.length)} by ${w(f.rink.width)}`],
|
|
565
|
+
["tracks", `5 (${w(f.tracks.five.shift)} apart, starting lines ${w(f.tracks.five.lines)} apart) or 7 (${w(f.tracks.seven.shift)} and ${w(f.tracks.seven.lines)})`],
|
|
566
|
+
["starting positions", `${f.dots.count} dots every ${w(f.dots.step)}, from ${w(f.dots.from)} out from the inner side`],
|
|
567
|
+
];
|
|
568
|
+
}
|
|
569
|
+
return [
|
|
570
|
+
["rink", `${w(f.length.max)} by ${w(f.width.max)} if possible, at least ${w(f.length.min)} by ${w(f.width.min)}`],
|
|
571
|
+
];
|
|
572
|
+
}
|
|
573
|
+
case "athletics": {
|
|
574
|
+
const f = athleticsOf(league);
|
|
575
|
+
return [
|
|
576
|
+
["track", `two straights of ${w(f.straight)} and two bends of ${w(f.radius)} radius at the kerb`],
|
|
577
|
+
["lanes", `${f.lanes.drawn} of ${w(f.lane)} (${f.lanes.min} to ${f.lanes.max})`],
|
|
578
|
+
["running line", `${w(f.inner)} outside the kerb in lane 1, ${w(f.outer)} outside the line in the others`],
|
|
579
|
+
["straight", `${f.straightLanes.min} to ${f.straightLanes.max} lanes of ${w(f.straightLane)}, a starting area of ${w(f.startArea)} and a run-out of ${w(f.runOut)}`],
|
|
580
|
+
["banking", f.banking === null ? "none" : `${f.banking} degrees`],
|
|
581
|
+
];
|
|
582
|
+
}
|
|
442
583
|
case "handball": {
|
|
443
584
|
const f = handballOf(league);
|
|
444
585
|
return [
|
package/dist/look.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { LookName, Sport } from "./types.ts";
|
|
2
2
|
/** The parts of a palette, each a custom property of the stylesheet. */
|
|
3
|
-
export type PaletteKey = "ink" | "line" | "apron" | "surface" | "alt" | "zone" | "boards" | "red" | "blue" | "dirt" | "foul" | "infield" | "crease" | "key" | "court" | "post" | "pylon" | "rgo" | "rgm" | "rgi" | "rgb" | "hog" | "hack" | "fgz" | "pebble" | "free" | "net" | "area";
|
|
3
|
+
export type PaletteKey = "ink" | "line" | "apron" | "surface" | "alt" | "zone" | "boards" | "red" | "blue" | "dirt" | "foul" | "infield" | "crease" | "key" | "court" | "post" | "pylon" | "rgo" | "rgm" | "rgi" | "rgb" | "hog" | "hack" | "fgz" | "pebble" | "free" | "net" | "area" | "ropeg" | "ropeb" | "ropey" | "roper" | "ropew" | "pad" | "block" | "track" | "sand" | "mat" | "water" | "concrete" | "trackpad" | "markY" | "markB" | "markG" | "markR";
|
|
4
4
|
/** Colours by part. */
|
|
5
5
|
export type Palette = Partial<Record<PaletteKey, string>>;
|
|
6
6
|
/** The surfaces that are painted alike: football's three fields are one. */
|
|
7
|
-
export type Group = "football" | "nhl" | "nba" | "mlb" | "soccer" | "curling" | "net";
|
|
7
|
+
export type Group = "football" | "nhl" | "nba" | "mlb" | "soccer" | "curling" | "net" | "pool" | "athletics";
|
|
8
8
|
/** One mode of a look: a palette for every sport, and what a group of sports changes in it. */
|
|
9
9
|
export interface Mode {
|
|
10
10
|
base: Palette;
|
|
@@ -26,7 +26,7 @@ export declare const groupOf: (sport: Sport | string) => Group | undefined;
|
|
|
26
26
|
* import { LOOKS, drawKyogijo } from "@johnmorrisdotca/kyogijo-stadiums";
|
|
27
27
|
* const svg = drawKyogijo({ sport: "nhl", look: "chalkboard" });
|
|
28
28
|
* console.log(Object.keys(LOOKS).length, svg.includes('data-palette="chalkboard"'));
|
|
29
|
-
* //
|
|
29
|
+
* // 8 true
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
32
|
export declare const LOOKS: Readonly<Record<LookName, Look>>;
|