@johnmorrisdotca/kyogijo-stadiums 0.22.0 → 0.24.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 CHANGED
@@ -7,6 +7,26 @@ All notable changes to this project are written here. The format follows
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.24.0] - 2026-10-20
11
+
12
+ ### Added
13
+
14
+ - **A board over a surface** (`board` in the options of a drawing and of the 3D view, [boards over a surface](./docs/boards.md)): a results board, a bout presentation or a medal table that another package drew (Taisen Brackets', say) is taken as an SVG string with its size and laid over the surface. The package draws no board and imports none: the SVG is written as one image, which cannot run anything, never changed and never stretched (its own shape is kept, so no letter is stretched).
15
+ - **Placed by name or by point.** `position` is `top` (the default), `bottom`, `side` (the right edge), `left`, `corner` (the top right), `top-left`, `top-right`, `bottom-left`, `bottom-right`, or a point of your own, `{ x, y, anchor? }`, as shares of the drawing. A named position keeps to its edge, one margin in, and is made smaller, never moved, where it would reach into the middle of the surface (`BOARD_CLEAR`, a third of the width and height, where the score's panel stands), so the middle is never covered unless `cover: true` or a point of your own says so. `share`, `margin`, `opacity` and a `label` for assistive technology are options; `BOARD_POSITIONS` and `placeBoard(board, box)` are exported.
16
+ - **In 3D the board is a layer over the view, not a plane**: it does not turn, tip or zoom with the surface, never takes the pointer (a drag on it turns the view), is a share of the view's width in its own shape, and its height is held to what keeps the middle of the view clear. `update` replaces it and keeps the view's turn; where the browser cannot draw in 3D the flat drawing is shown with the board on it.
17
+ - **A compact card** takes the board over its surface and not over its strip; **a badge** takes none. A drawing with no board, or with a value that is not a board, is the same text as before.
18
+ - **The demo's boards page** (`boards.html`): a swimming final over the pool, a bout over a judo mat, a 100 m final over the athletics stadium, speed skating over the oval and a medal table in a corner, in 2D and 3D, with the position, the width, the opacity and a point of your own in the address, in English and Japanese. **The docs** have [a page](./docs/boards.md) and [a gallery](https://johnmorrisdotca.github.io/kyogijo-stadiums/docs/gallery-boards.html) of every position, how large a board may be, covering the middle and dark and Japanese.
19
+ - Taisen Brackets 0.17.1 is a development dependency, for the demo's and the gallery's boards (`pnpm boards` writes `demo/boards-data.js`); it is not imported by the package.
20
+
21
+ ## [0.23.0] - 2026-10-20
22
+
23
+ ### Added
24
+
25
+ - **The professional wrestling ring** (`sport: "prowrestling"`, [the combat sports page](./docs/combat.md)): the boxing ring's engine with three ropes that are not tied together, a canvas with an apron of a foot, a platform of 40 inches, four padded posts and steel steps at two corners. No rulebook gives a wrestling ring's figures, so every one is typical and says so: most rings are 14 to 20 feet a side between the ropes, 20 feet drawn (`budo.size`, 4.27 m to 6.10 m); the ropes are at about 1, 3 and 5 feet; the platform (`budo.height`) is 0 to 6 feet. The sources (English Wikipedia's "Wrestling ring", Dimensions.com and a 2012 description of a large promotion's ring) differ, the page says where, and the figures that cannot be right (an 8 foot top rope, posts of 9 to 10 feet) are not used. The league is `pro-ring`, the looks are the boxing ring's, `RANGES.prowrestling` has `ropes` and `half`, and in 3D the ring stands as the boxing ring does with three ropes and no ties. It is the forty-third sport.
26
+ - **A figure of a ring is now the league's:** `RingFigures` carries whether the ropes are tied and whether the corners are the boxers' (a boxing ring's are, a wrestling ring's are not), and the number of sets of steps.
27
+ - **The demo** has the ring in its sport picker, with its looks, the score and the 3D view.
28
+
29
+
10
30
  ## [0.22.0] - 2026-10-20
11
31
 
12
32
  ### Added
package/NOTICE.md CHANGED
@@ -35,7 +35,7 @@ picture or code of the sources is copied; each source is named here so that the
35
35
  | `leagues`: the skating rinks | The International Skating Union's Sports Rules - Speed Skating (Special Regulations and Technical Rules, Rules 203 to 206, 226 to 228 and 253 to 257, and "H. Track", effective 12 June 2026), Special Regulations and Technical Rules Short Track Speed Skating (Rule 280 and the diagram of the tracks, 2024) and Sports Rules - Figure Skating (Rule 342, effective 12 June 2026) | Facts; no text or drawing copied |
36
36
  | `leagues` and `halls`: the budō surfaces | The International Judo Federation's Sport and Organisation Rules (version of 21 January 2026, 8.7, Article 9, B1.8; and the June 2020 version, 18.1) and its Kata Commission's Tournament Handbook (2024) and Criteria for the Evaluation (January 2025); the All Japan Judo Federation's 大会運営ガイドブック2023; the World Karate Federation's Kumite and Kata Competition Rules (2026); the International Kendo Federation's Regulations of Kendo Shiai and Shinpan (Article 2 and Figure 1); the Japan Sumo Association's 相撲規則 土俵規定 第一条 and 大相撲クイズ, as the Sasakawa Sports Foundation and ozumo.jp quote them; the All Nippon Kyudo Federation's 弓道競技運営要領 (2016) and the National Sports Festival 2015's rules for kinteki and enteki; the tatami sizes of English and Japanese Wikipedia; the Kodokan's 施設のご案内, the Nippon Budokan's 日本武道館建物等概要 (October 2021), and English and Japanese Wikipedia and Wikidata on the five halls and the kimarite | Facts |
37
37
  | `frames`: the soccer providers' coordinates | StatsBomb's Open Data Events specification (Appendix 2), the Wyscout and Impect glossaries, the Metrica Sports and SkillCorner open-data READMEs; for Opta, Tracab and Second Spectrum, whose specifications are not public, the figures of mplsoccer, ggsoccer, kloppy and floodlight (docs/sources.md) | Facts; no text, table or code copied |
38
- | `leagues`: the MMA cage, the boxing ring and the wrestling mats | The Nevada Rules of Unarmed Combat (NRUC 5.010, the file of 20 November 2024), Oregon Administrative Rule 230-070-0025, the IMMAF's Unified Rules for amateur, junior and senior competition (January 2021), Wisconsin's SPS 192.38, the UWW's Wrestling Rules (January 2026), the NCAA's Wrestling Rules (2025-26 and 2026-27), the NFHS's mat rules as the KHSAA, Resilite and the NJSIAA quote them, the WBC Amateur competition rules (2026), Ontario's Amateur combative sport rules: Boxing (Part II), and the English Wikipedia articles "Mixed martial arts cage" (revision 1377260922), "Mixed martial arts" (revision 1381048799) and "Boxing ring" (revision 1370389178), for the sizes that are typical | Facts, CC BY-SA 4.0 for the Wikipedia text read |
38
+ | `leagues`: the MMA cage, the boxing ring the wrestling mats and the professional wrestling ring | The Nevada Rules of Unarmed Combat (NRUC 5.010, the file of 20 November 2024), Oregon Administrative Rule 230-070-0025, the IMMAF's Unified Rules for amateur, junior and senior competition (January 2021), Wisconsin's SPS 192.38, the UWW's Wrestling Rules (January 2026), the NCAA's Wrestling Rules (2025-26 and 2026-27), the NFHS's mat rules as the KHSAA, Resilite and the NJSIAA quote them, the WBC Amateur competition rules (2026), Ontario's Amateur combative sport rules: Boxing (Part II), Dimensions.com's professional wrestling ring page, a 2012 blog's description of a large promotion's ring, and the English Wikipedia articles "Wrestling ring" (revision 1379090810), "Mixed martial arts cage" (revision 1377260922), "Mixed martial arts" (revision 1381048799) and "Boxing ring" (revision 1370389178), for the sizes that are typical | Facts, CC BY-SA 4.0 for the Wikipedia text read |
39
39
  | `parks`: the fence of each ballpark, current and past, and the seasons of a past park | The distances (and, for a park whose fence moved, the years an article dates them) published in the English and Japanese Wikipedia article of each park, at the revision cited below; the seasons a club played there from the same article's list of tenants | Facts. The articles are CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/); none of their text, tables or images is used, and the angles between the distances are our own reading |
40
40
  | `parks`: the Wikidata item of each ballpark (`wikidata`) | The item (`Q49136`) that each cited article is linked to, read with the MediaWiki API (`pageprops`, `wikibase_item`) and checked against the item's label | Wikidata's data is CC0 (https://creativecommons.org/publicdomain/zero/1.0/) |
41
41
  | `parks` and `grounds`: the names (`name`, `nameJa`, `readingJa`, `localName`, `aliases`) | The names are facts. Each alias says where it was read (`source`): the title of the English or Japanese Wikipedia article a place cites (with its revision), a name the infobox or the opening text of the same revision gives (a former or sponsor's name with the years it dates, a nickname, the name in Japanese and its reading), or Wikidata's labels, aliases and properties "official name" (P1448), "nickname" (P1449), "name" (P2561), "short name" (P1813), read with the Wikidata API by `scripts/fetch-names.mjs` into `scripts/names.wikidata.json` | Facts; Wikidata's data is CC0 (https://creativecommons.org/publicdomain/zero/1.0/), and the articles are CC BY-SA 4.0 as above, none of their text copied. Which name is the everyday one is our reading, in docs/references.md ("Names") |
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <h1 align="center">Kyogijo Stadiums <sub>競技場</sub></h1>
2
2
 
3
3
  <p align="center"><strong>Sports surfaces as SVG, drawn to scale, with the score on them.</strong><br>
4
- The surfaces of forty-two sports, from football and curling to the budō and the combat sports, each drawn from its rulebook or its published distances, with each team's name and logo on its side and the score in the middle, a lineup, stands and a crowd, a pageant of flags and a 3D view. Wide or tall, light or dark, a badge for a list, a helper for React, a custom element and a frame for a page that runs no script. One function, no dependencies.</p>
4
+ The surfaces of forty-three sports, from football and curling to the budō and the combat sports, each drawn from its rulebook or its published distances, with each team's name and logo on its side and the score in the middle, a lineup, stands and a crowd, a pageant of flags and a 3D view. Wide or tall, light or dark, a badge for a list, a helper for React, a custom element and a frame for a page that runs no script. One function, no dependencies.</p>
5
5
 
6
6
  <p align="center">
7
7
  <a href="https://github.com/johnmorrisdotca/kyogijo-stadiums/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/johnmorrisdotca/kyogijo-stadiums/actions/workflows/ci.yml/badge.svg"></a>
@@ -20,14 +20,14 @@ The surfaces of forty-two sports, from football and curling to the budō and the
20
20
  <td align="center" valign="top">
21
21
  <picture>
22
22
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/hero-desk-dark.webp">
23
- <img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/hero-desk-light.webp" alt="The demo on a desk, in English: the heading, the language chooser and links, and an NHL rink drawn wide on an ice-blue background with a made-up game on it, the USA on the left, Canada on the right and the score 3 to 2, Final/OT, in the middle. The controls on the right list the sports, the layout and the teams." width="640">
23
+ <img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/hero-desk-light.webp" alt="The demo on a desk: an NHL rink drawn wide on an ice-blue background, the USA on the left, Canada on the right and the score 3 to 2, Final/OT, in the middle, with the controls beside it." width="640">
24
24
  </picture>
25
25
  <br><em>The demo on a desk: a rink, with the teams on their sides and the score in the middle.</em>
26
26
  </td>
27
27
  <td align="center" valign="top">
28
28
  <picture>
29
29
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/hero-phone-dark.webp">
30
- <img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/hero-phone-light.webp" alt="The demo on a phone: the heading and controls, and under them, on a background of floodlight beams, a football field standing tall, Mexico's green end zone at the top and the USA's navy one at the bottom, each with its flag and name, and a score panel at midfield reading 27 to 24, Final." width="240">
30
+ <img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/hero-phone-light.webp" alt="The demo on a phone: a football field standing tall under floodlight beams, Mexico's green end zone at the top and the USA's navy one at the bottom, and a score panel at midfield reading 27 to 24, Final." width="240">
31
31
  </picture>
32
32
  <br><em>On a phone the same surface stands tall, the words still upright.</em>
33
33
  </td>
@@ -72,62 +72,62 @@ console.log(svg.startsWith("<svg"), svg.includes("USA 3, Canada 2"));
72
72
 
73
73
  ## Features
74
74
 
75
- - **Forty-two surfaces, to scale.** The NFL, CFL and IFAF fields, the NHL rink, the NBA court, the soccer pitch and futsal court, the baseball field, the curling sheet, twelve net and racket sports, the pools, the athletics stadium, the skating rinks, seven field sports, the budō, the MMA cage, the boxing ring and the wrestling mats. Every figure is cited in [sources](./docs/sources.md). [The surfaces](./docs/surfaces.md).
76
- - **Each league's rulebook.** `league: "fiba"` draws a court as FIBA marks it: 48 variants, from the WNBA, the NCAA and the IIHF to Little League, PONY, softball, Curling Canada, FIVB's beach volleyball, rugby league and the NLL's box lacrosse, each cited. [League variants](./docs/variants.md).
77
- - **A realistic basketball floor.** `court: { hardwood: true }` draws maple boards that run the length of the court with staggered ends, grain, stained keys, the baskets and stanchions with soft shadows, a coaching box and benches, and a satin sheen, in every league and renderer. The clean floor stays the default. [Hardwood](./docs/hardwood.md).
75
+ - **Forty-three surfaces, to scale.** The NFL, CFL and IFAF fields, the NHL rink, the NBA court, the soccer pitch and futsal court, the baseball field, the curling sheet, twelve net and racket sports, the pools, the athletics stadium, the skating rinks, seven field sports, the budō, the MMA cage, the rings and the wrestling mats. Every figure is cited in [sources](./docs/sources.md). [The surfaces](./docs/surfaces.md).
76
+ - **Each league's rulebook.** `league: "fiba"` draws a court as FIBA marks it: 48 variants, from the WNBA and the IIHF to Little League, softball, rugby league and box lacrosse, each cited. [League variants](./docs/variants.md).
77
+ - **A realistic basketball floor.** `court: { hardwood: true }` draws maple boards that run the length of the court with staggered ends, grain and stained keys, the baskets with soft shadows, and benches. The clean floor stays the default. [Hardwood](./docs/hardwood.md).
78
78
  - **The stands and the crowd.** `crowd: true` draws the seating round any surface that has spectators: a bowl, two sides, a horseshoe, courtside rows or a ballpark's grandstands, with the people as seeded heads and shoulders in the home colours and the empty seats showing (`density`, or `attendance` over `capacity`). [The crowd](./docs/crowd.md).
79
79
  - **Curling, from the rule books.** A sheet from World Curling's and Curling Canada's rules, tall by default, with the board and the hammer in a score, `curlingStones` for the stones of an end, `show: "folded"` for the whole sheet with both houses enlarged beside it. [Curling](./docs/curling.md).
80
80
  - **Net, racket and court sports, from their rulebooks.** The ITF's, FIVB's (indoor, beach, sitting), BWF's, USA Pickleball's and ITTF's courts and table, the padel, squash, racquetball, sepak takraw, teqball, roundnet and netball courts, each in its look, with a board of sets and games. [Net, racket and court sports](./docs/courts.md).
81
- - **Swimming, water polo, diving and artistic swimming, from World Aquatics' regulations.** The 50 or 25 m pool with its lanes, ropes, blocks and touch panels; the water polo field; the diving well; the artistic swimming area. A race's lanes carry names, flags, places and times, with a replay. [Pools](./docs/pools.md).
82
- - **Lacrosse, rugby, Australian football, Gaelic games, cricket, field hockey and handball, from their rulebooks.** The fields and floors of World Lacrosse, World Rugby, the NRL, the AFL, the GAA, the FIH and the IHF, and a cricket ground with a boundary of your own. A score is goals and behinds, goals and points, or runs, wickets and overs. [Field sports](./docs/field-sports.md).
83
- - **The athletics stadium, from World Athletics' rules.** The 400 m track with its lanes and staggers worked out from the running lines, curved and relay starts, hurdles, the steeplechase, every field event, a close-up of each start, the covered 200 m track, with lane draws, results and a race replay. [The athletics stadium](./docs/athletics.md).
84
- - **The skating rinks, from the ISU's rules.** The 400 m speed skating track with its lanes, blocks and the lines of every race worked out lane by lane; the short track's oval; the figure skating rink with its judges' seats; and results, a race replay and the elements of a programme. [The skating rinks](./docs/skating.md).
81
+ - **Swimming, water polo, diving and artistic swimming, from World Aquatics' regulations.** The 50 or 25 m pool with its lanes, ropes, blocks and touch panels; the water polo field; the diving well; the artistic swimming area. [Pools](./docs/pools.md).
82
+ - **Lacrosse, rugby, Australian football, Gaelic games, cricket, field hockey and handball, from their rulebooks.** The fields and floors of World Lacrosse, World Rugby, the NRL, the AFL, the GAA, the FIH and the IHF, and a cricket ground. [Field sports](./docs/field-sports.md).
83
+ - **The athletics stadium, from World Athletics' rules.** The 400 m track with its lanes and staggers worked out from the running lines, every race start, hurdles, the steeplechase and every field event, with lane draws, results and a race replay. [The athletics stadium](./docs/athletics.md).
84
+ - **The skating rinks, from the ISU's rules.** The 400 m speed skating track with its lanes, blocks and the lines of every race worked out lane by lane; the short track's oval; the figure skating rink; and results, a race replay and the elements of a programme. [The skating rinks](./docs/skating.md).
85
85
  - **The budō, from the federations' rules.** The IJF's and the All Japan Judo Federation's judo areas, the WKF's karate areas, the kendo shiai-jo, the sumo dohyō, the kyūdōjō, and **a dojo builder**: a floor of tatami laid as real units, in jō or metres, with its walls, doors, windows and shrine. Scores are judo's ippon, waza-ari and shido, karate's and kendo's points and sumo's kimarite. [The budō](./docs/budo.md).
86
- - **Soccer, to the Laws.** A pitch from Law 1 of the IFAB Laws of the Game of any size, with presets (international, UEFA, MLS, NCAA, the FA's 9-, 7- and 5-a-side, FIFA's futsal), half pitches, five mowing patterns, four goal styles, penalties and extra time in a score. [Soccer](./docs/soccer.md).
86
+ - **Soccer, to the Laws.** A pitch from Law 1 of the IFAB Laws of the Game of any size, with presets from international to 5-a-side, half pitches, five mowing patterns and four goal styles. [Soccer](./docs/soccer.md).
87
87
  - **Every ballpark.** The 30 current MLB parks and 44 that MLB clubs have left, and the 12 home parks of Nippon Professional Baseball with eight other NPB grounds, each with its fence drawn from the distances published for it, as it stood in a season. [Ballparks](./docs/ballparks.md).
88
88
  - **Soccer grounds, arenas and an atlas.** 64 soccer grounds at their published sizes, 167 NHL, NBA, WNBA and PWHL arenas (`drawKyogijo({ sport: "nhl", arena: "boston-garden" })`), and every park, ground, arena and budō hall (330 places) on a map, found by any of its names. [The grounds](./docs/grounds.md), [the arenas](./docs/arenas.md), [the atlas](./docs/atlas.md), [names](./docs/ballparks.md#names).
89
- - **Walls and quirks.** How high the fence stands, stretch by stretch and season by season (the Green Monster at 37 feet 2 inches) (`walls`); and Tal's Hill, Wrigley Field's ivy and basket, poles, bullpens and dugouts (`quirks`), each from the park's article, none guessed: [ballparks](./docs/ballparks.md).
89
+ - **Walls and quirks.** How high the fence stands, stretch by stretch and season by season (`walls`), and a park's hills, ivy, poles, bullpens and dugouts (`quirks`), each from the park's article, none guessed: [ballparks](./docs/ballparks.md).
90
90
  - **Special games.** A surface set inside another, to scale: an NHL rink on a ballpark's infield or a football stadium's field or a baseball field laid over a London stadium's pitch. 18 games, each cited. [Special games](./docs/special-games.md).
91
91
  - **Surfaces through the years.** `year: 1975` draws a surface as its league's rules marked it that season, each change cited. [Surfaces through the years](./docs/eras.md).
92
- - **Score mode.** Each team's name and logo on its side (the end zones, the ends of the ice, the halves of the court, the dugouts) and the score large in the middle, with the competition, the status and the date, and the winner emphasised; a flag or a crest can be round, in a circle with a ring (`markShape: "round"`). [Score and layout](./docs/score.md#round-marks).
93
- - **The situation of a game.** `situation` draws what is happening: hockey's power play or empty net and a shootout; baseball's runners lit on the diamond with a scorebug; football's line of scrimmage, first-down line, red zone and down-and-distance tag, with a drive chart; in the badge and the compact card too. [The situation](./docs/situation.md).
92
+ - **Score mode.** Each team's name and logo on its side (the end zones, the ends of the ice, the halves of the court, the dugouts) and the score large in the middle, with the competition, the status and the date, and the winner emphasised. [Score and layout](./docs/score.md#round-marks).
93
+ - **The situation of a game.** `situation` draws what is happening: hockey's power play and shootout, baseball's runners and count, football's line of scrimmage, first-down line, red zone and down and distance, with a drive chart. [The situation](./docs/situation.md).
94
94
  - **Lineups.** A `lineup` layer places a team's players by position code (`GK`, `CB`, `HK`, `C`) with no coordinates: it reads where each stands from a formation (36 of them, in 13 sports), draws a disc or a jersey with the shirt number and the name under it, a captain's C and a flag. [Lineups](./docs/team-shape.md#lineups).
95
- - **A pageant.** Each team's flag or crest laid large over its half of the surface: `pageant: "carpet"` (a flag at its own ratio with a border) or `"stage"` (a crest on a round disc with a gold ring), an emblem or a trophy in the centre circle, the score in the middle or in the strip; an entrance in CSS for readers who have not asked for less motion. [The pageant](./docs/pageant.md).
95
+ - **A pageant.** Each team's flag or crest laid large over its half of the surface: `pageant: "carpet"` (a flag at its own ratio with a border) or `"stage"` (a crest on a round disc with a gold ring), an emblem or a trophy in the centre circle, the score in the middle or in the strip. [The pageant](./docs/pageant.md).
96
96
  - **Trophies, medals, balls and crests, by id.** `useEmblems(renderEmblem)` plugs in the sister package [Dougu Sports](https://johnmorrisdotca.github.io/dougu-sports/) in one line, and an id goes wherever a logo, a flag or a mark is taken: `logo: "crest:shield"`, `pageant: { emblem: "trophy:hockey-cup" }`, `"ball:puck"`. [Emblems](./docs/emblems.md).
97
97
  - **Country flags, by code.** `useFlags(render)` plugs in the sister package [Hata](https://github.com/johnmorrisdotca/hata) through a small adapter, and a team's `flag: "CA"` is its flag: round in a round mark, at its own proportions on a banner, a badge or a carpet. [Flags](./docs/flags.md).
98
- - **Zoom to a part of a surface.** `range: "offensive-zone"` crops a drawing to a rink's zone, a half court, the paint, the red zone, a soccer half, third or penalty area, the infield, a curling house, or a box of your own in any frame, with its data, heat, labels and score following. [Display ranges](./docs/ranges.md).
98
+ - **Zoom to a part of a surface.** `range: "offensive-zone"` crops a drawing to a rink's zone, a half court, the paint, the red zone, a penalty area, the infield, a curling house, or a box of your own, with its data and score following. [Display ranges](./docs/ranges.md).
99
99
  - **Wide, tall or fit the box.** Every surface lies wide or tall: tall turns it a quarter, keeps every word upright and puts the teams top and bottom. With `orientation: "auto"` the browser helpers follow the box.
100
- - **Where a point lies, by the rules, and a click as a place.** `zoneAt("nhl", [69, 22], { frame: "nhl-api" })` names the zone and the area in it from the surface's own figures, with `isThreePointer`, `inSlot`, `isFair`, `isHomeRun` and the like; `clientPointToField(svg, x, y, { provider })` is a pointer's place in any of the frames, with the zone. [Zones](./docs/zones.md), [pointing](./docs/pointer.md).
101
- - **Goals, the strike zone and the stumps, end-on.** A goal mouth for six sports with the shots laid on it and its zones, the catcher's view of the strike zone with its pitches numbered, and the wicket from the bowler's end with its line and length zones. [Targets](./docs/targets.md).
102
- - **Data on the surface.** Points, lines, arrows, text, heat maps, hexagons, zone charts and density contours over any surface, in its feet or a data provider's frame, cut to its outline, with a table for each layer; ready-made shot and pass charts. [Data layers](./docs/layers.md), [charts](./docs/charts.md).
103
- - **Small multiples and backgrounds.** `drawGrid` puts many drawings in one SVG, under a title and a subtitle, over a credit line, with a key they share, in a size for a social card, a square post or a phone; `background` lays a quiet pattern (felt, grass, wood, ice, paper, a grid, dots) or a photograph behind a drawing or a grid. [Layouts and backgrounds](./docs/layouts.md).
104
- - **Tournament layouts.** Several surfaces laid out together for one large event, to scale, on one floor, as one SVG: thirteen presets from table tennis, pickleball, curling, judo, karate, badminton and tennis, each with its rule and sources, whether it fits a hall, and a real stadium round it. [Tournament layouts](./docs/multi.md).
105
- - **Judging assignments.** Who judges where. [Judging](./docs/judging.md).
106
- - **Replay.** Tracking data played on any surface: the players with their numbers, the ball and its trail, and the passes, shots and goals as they happen, with controls, the keyboard and a live region, steps for a reader who prefers reduced motion, and a pause when the page is hidden. [Replay](./docs/replay.md).
107
- - **A 3D view.** Any surface as a floor that turns by mouse, touch, wheel or keys, with four viewpoints (overhead, broadcast, end-on, low corner), and what the rulebook stands on it at its height (nets, baskets, rink boards and glass, goals, a ballpark's fence, a pool's blocks, a table tennis area's surrounds) and the venue round it (raked stands, roofs, a dojo's walls). Plain DOM and CSS. [The 3D view](./docs/turn.md).
108
- - **Renderers.** The same drawing as plain data (a scene), on a canvas (a browser's or a Node canvas), in a d3 selection, as a mark of an Observable Plot, as GeoJSON and as a PNG in Node, each an entry of its own that imports nothing from outside the package. [Renderers](./docs/renderers.md).
109
- - **Units and frames.** Each surface in its rulebook's unit and any other, and 48 coordinate frames (ten soccer providers, the NHL API, HockeyTech, NBA stats, NFL tracking, MLBAM, Retrosheet, and a place from the net, the centre or the middle of the water of each other surface) to move a provider's points onto a surface. [Units](./docs/units.md), [coordinate frames](./docs/frames.md).
100
+ - **Where a point lies, by the rules, and a click as a place.** `zoneAt("nhl", [69, 22], { frame: "nhl-api" })` names the zone from the surface's own figures, and `clientPointToField(svg, x, y, { provider })` is a pointer's place in any of the frames, with the zone. [Zones](./docs/zones.md), [pointing](./docs/pointer.md).
101
+ - **Goals, the strike zone and the stumps, end-on.** A goal mouth for six sports with the shots laid on it, the catcher's view of the strike zone with its pitches numbered, and the wicket from the bowler's end with its zones. [Targets](./docs/targets.md).
102
+ - **Data on the surface.** Points, lines, arrows, text, heat maps, hexagons and density contours over any surface, in its own feet or a provider's frame; ready-made shot and pass charts. [Data layers](./docs/layers.md), [charts](./docs/charts.md).
103
+ - **Small multiples and backgrounds.** `drawGrid` puts many drawings in one SVG with a title, a shared key and a credit line, in a size for a card or a phone; `background` lays a quiet pattern or a photograph behind a drawing or a grid. [Layouts and backgrounds](./docs/layouts.md).
104
+ - **Tournament layouts.** Several surfaces laid out together for one large event, to scale, on one floor, as one SVG: thirteen presets, each with its rule and sources, and a stadium round it. [Tournament layouts](./docs/multi.md).
105
+ - **Judging assignments.** Who judges where. [Judging](./docs/judging.md). **Boards over a surface.** [Boards](./docs/boards.md).
106
+ - **Replay.** Tracking data played on any surface: the players, the ball and its trail, and the passes, shots and goals as they happen, with controls, the keyboard and a live region. [Replay](./docs/replay.md).
107
+ - **A 3D view.** Any surface as a floor that turns by mouse, touch, wheel or keys, with four viewpoints (overhead, broadcast, end-on, low corner), and what the rulebook stands on it at its height (nets, baskets, goals, a cage's mesh, a ring's ropes) and the venue round it (raked stands, roofs, a dojo's walls). [The 3D view](./docs/turn.md).
108
+ - **Renderers.** The same drawing as plain data (a scene), on a canvas (a browser's or a Node canvas), in a d3 selection, as a mark of an Observable Plot, as GeoJSON and as a PNG in Node, each an entry of its own. [Renderers](./docs/renderers.md).
109
+ - **Units and frames.** Each surface in its rulebook's unit and any other, and 48 coordinate frames (ten soccer providers, the NHL API, NBA stats, NFL tracking, MLBAM and more) to move a provider's points onto a surface. [Units](./docs/units.md), [coordinate frames](./docs/frames.md).
110
110
  - **A compact badge and a compact card.** One strip for a list, or the surface with that strip under it.
111
- - **Light and dark**, by the device or the page, and every colour a custom property; eight named looks, colours by feature, line widths and dashes, goal styles and mowing patterns, and arrows, axes and labels for teaching. [Theming](./docs/theming.md), [annotations](./docs/annotations.md).
112
- - **Accessible.** Each drawing is an `img` with a title and a description that say the surface and the result, in English or Japanese. [Accessibility](./docs/accessibility.md).
113
- - **Four ways in.** A function that returns SVG text; a helper that draws into a container; a standard custom element; a frame for pages that run no script. A React helper that does not import React.
111
+ - **Light and dark**, by the device or the page; every colour a custom property; eight named looks, colours by feature, line widths and dashes, and arrows, axes and labels for teaching. [Theming](./docs/theming.md), [annotations](./docs/annotations.md).
112
+ - **Accessible.** Each drawing is an `img` with a title and a description of the surface and the result, in English or Japanese. [Accessibility](./docs/accessibility.md).
113
+ - **Four ways in.** A function that returns SVG text; a helper that draws into a container; a custom element; a frame for pages with no script; a React helper that imports no React.
114
114
  - **No dependencies**, no network requests, nothing stored. Text, colours and logo addresses that come from outside are made safe before they are drawn.
115
- - **A docs site.** Guides, a search over every page, a gallery that draws every picture from the code beside it, and [how it compares](./docs/compare.md) with the other packages: [the documentation](./docs/README.md).
115
+ - **A docs site.** Guides, a search, a gallery that draws every picture from the code beside it, and [how it compares](./docs/compare.md): [the documentation](./docs/README.md).
116
116
 
117
117
  ### What's in it
118
118
 
119
119
  | Part | What it is |
120
120
  | --- | --- |
121
121
  | `drawKyogijo`, `drawSurface`, `drawScore`, `drawBadge` | The drawing, as a string of SVG. |
122
- | `SPORTS`, `PARKS`, `PARK_IDS`, `COURT_THEMES` | The forty-two sports, the 94 ballparks, the court looks. |
122
+ | `SPORTS`, `PARKS`, `PARK_IDS`, `COURT_THEMES` | The forty-three sports, the 94 ballparks, the court looks. |
123
123
  | `SOCCER_PITCHES`, `SOCCER_PROVIDERS`, `rescale`, `soccerSpec` | The soccer pitches, the data providers' coordinate systems and the map between them. |
124
124
  | `GROUNDS`, `groundById` | The 64 soccer grounds, each pitch at its own size. |
125
- | `EVENTS`, `eventOptions` | The 18 special games: a rink in a ballpark, a court on a carrier's deck, with `host` and `placement` in the options. |
125
+ | `EVENTS`, `eventOptions` | The 18 special games: a rink in a ballpark, a court on a carrier's deck. |
126
126
  | `./zones`, `./pointer`, `./target` | Where a point lies by a sport's own rules, and the yes-or-no questions; a click on a drawing as a place in a provider's numbers; a goal, the strike zone or the stumps seen end-on. |
127
127
  | `./geometry`, `./frames`, `./layers`, `./charts`, `./replay` | The dimensions in any unit; the providers' frames; data layers; ready-made charts; tracking data played on a surface. |
128
- | `./athletics` | The athletics stadium: the plan, the track's geometry (the stagger of any lane), the races and field events, and the lane draw, results, race replay and field marks charts. |
129
- | `./budo` | The budō: the judo and karate areas, the kendo shiai-jo, the sumo dohyō, the kyūdōjō and the dojo builder (`dojo`, `drawDojo`), the plans, the tatami layout, the 82 kimarite, the looks and the five halls. |
130
- | `./skating` | The skating rinks: the plan, the long track's geometry (a skater's way round it, the start of a race), the races, and the pairs, starting positions, results, race replay and programme elements charts. |
128
+ | `./athletics` | The athletics stadium: the plan, the track's geometry, the races and field events, and the lane draw, results, race replay and field marks charts. |
129
+ | `./budo` | The budō: the judo and karate areas, the kendo shiai-jo, the sumo dohyō, the kyūdōjō, the dojo builder (`dojo`, `drawDojo`), the 82 kimarite and the five halls. |
130
+ | `./skating` | The skating rinks: the plan, the long track's geometry, the races, and the pairs, starting positions, results, race replay and programme elements charts. |
131
131
  | `./parks`, `./grounds`, `./arenas`, `./atlas`, `./eras`, `./leagues`, `./events` | The ballparks, the grounds, the arenas, every place, the markings of a season, each league's rulebook, the special games. |
132
132
  | `./turn` | A surface as a 3D view that turns, with the net, basket, goal or posts standing on it. |
133
133
  | `./scene`, `./canvas`, `./d3`, `./plot`, `./geojson`, `./png` | The drawing as data; on a canvas; in a d3 selection; as an Observable Plot mark; as GeoJSON; as a PNG (the optional peer `@resvg/resvg-js`). |
@@ -233,7 +233,7 @@ console.log(box(wide), box(tall));
233
233
  <br><em>The same game tall: the teams top and bottom, every word upright.</em>
234
234
  </p>
235
235
 
236
- [The surfaces](./docs/surfaces.md) lists the forty-two, with their sizes and what is drawn; [score and layout](./docs/score.md) has the options of a score, a strip and a compact card.
236
+ [The surfaces](./docs/surfaces.md) lists the forty-three, with their sizes and what is drawn; [score and layout](./docs/score.md) has the options of a score, a strip and a compact card.
237
237
 
238
238
  ### A league's rulebook
239
239
 
@@ -543,6 +543,34 @@ console.log(layout.needs.length, layout.needs.width);
543
543
 
544
544
  The [demo](https://johnmorrisdotca.github.io/kyogijo-stadiums/halls.html) turns it in 3D.
545
545
 
546
+ ### Boards over a surface
547
+
548
+ `board` lays a results board, a bout presentation or a medal table, any SVG, over a surface in 2D and 3D, off its middle and never stretched ([boards](./docs/boards.md)).
549
+
550
+ <p align="center">
551
+ <picture>
552
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/boards-swimming-desk-dark.webp">
553
+ <img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/boards-swimming-desk-light.webp" alt="A results board over the top of a swimming pool: eight swimmers, their times and a record badge." width="640">
554
+ </picture>
555
+ <br><em>A final over the pool.</em>
556
+ </p>
557
+
558
+ <p align="center">
559
+ <picture>
560
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/boards-judo-3d-desk-dark.webp">
561
+ <img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/boards-judo-3d-desk-light.webp" alt="A bout presentation board over a judo mat seen in 3D, steady while the mat turns." width="640">
562
+ </picture>
563
+ <br><em>A bout over the mat, in 3D.</em>
564
+ </p>
565
+
566
+ <p align="center">
567
+ <picture>
568
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/boards-medals-desk-dark.webp">
569
+ <img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/boards-medals-desk-light.webp" alt="A medal table in the top right corner of an athletics stadium, off the middle of the field." width="640">
570
+ </picture>
571
+ <br><em>A medal table in a corner.</em>
572
+ </p>
573
+
546
574
  ### Who judges where
547
575
 
548
576
  `drawJudging` puts each judo mat's officials by seat in the picture and in a chart ([judging](./docs/judging.md)).
@@ -615,7 +643,7 @@ A table in the ITTF's playing area, 14 m by 7 m, with surrounds and chairs ([cou
615
643
 
616
644
  ### The combat sports
617
645
 
618
- An MMA cage, a boxing ring and wrestling mats ([the combat sports page](./docs/combat.md)).
646
+ An MMA cage, rings and wrestling mats ([the combat sports page](./docs/combat.md)).
619
647
 
620
648
  <p align="center">
621
649
  <picture>
@@ -649,6 +677,14 @@ An MMA cage, a boxing ring and wrestling mats ([the combat sports page](./docs/c
649
677
  <br><em>The UWW's mat in 3D.</em>
650
678
  </p>
651
679
 
680
+ <p align="center">
681
+ <picture>
682
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/prowrestling-ring-3d-desk-dark.webp">
683
+ <img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/prowrestling-ring-3d-desk-light.webp" alt="A professional wrestling ring in 3D with three ropes" width="660">
684
+ </picture>
685
+ <br><em>A wrestling ring in 3D.</em>
686
+ </p>
687
+
652
688
  ### The element in a page
653
689
 
654
690
  ```html
@@ -722,7 +758,7 @@ Nothing is branded. The drawing is coloured by custom properties on its `svg`, w
722
758
 
723
759
  ## Limits
724
760
 
725
- Each is held by a test: forty-two sports, ten soccer pitches and ten providers, 94 ballparks, 64 grounds, six units, forty-eight frames, a drawing of under 22 kB. The table, made from the code, is [limits](./docs/limits.md).
761
+ Each is held by a test: forty-three sports, ten soccer pitches and ten providers, 94 ballparks, 64 grounds, six units, forty-eight frames, a drawing of under 22 kB. The table, made from the code, is [limits](./docs/limits.md).
726
762
 
727
763
  ## Accessibility
728
764
 
@@ -742,7 +778,7 @@ English and Japanese: the title, the description and the standard statuses of a
742
778
 
743
779
  ## Roadmap
744
780
 
745
- Not here yet, and each welcome as an [issue](https://github.com/johnmorrisdotca/kyogijo-stadiums/issues):
781
+ Not here yet, each welcome as an [issue](https://github.com/johnmorrisdotca/kyogijo-stadiums/issues):
746
782
 
747
783
  - **More surfaces**: the FIBA and college courts, the international rink, rugby pitches, a stadium's seating, soccer's beach and street formats.
748
784
  - **More parks of the past**: the 19th-century grounds, and the parks whose articles give no distances yet (the Kingdome, Joe Robbie Stadium).
@@ -840,12 +876,12 @@ Kyogijo Stadiums is one of thirty-two packages, each made for the same site, eac
840
876
  ```sh
841
877
  pnpm install
842
878
  pnpm check # lint, types, every test, the build and the packed package
843
- pnpm test:package # pack, install and import it as somebody who installed it would
844
- pnpm test:demo # build the demo and the docs and play them in a real browser, at a phone's width and a desk's
879
+ pnpm test:package # pack, install and import it, as a user would
880
+ pnpm test:demo # build the site and play it in a real browser, at a phone's width and a desk's
845
881
  pnpm site # build the demo and the docs site into site/, as the Pages workflow publishes it
846
- pnpm screenshots:readme # remake every README picture from the built demo, in light and dark, each on one of the family's backgrounds
882
+ pnpm screenshots:readme # remake every README picture from the built demo, in light and dark
847
883
  pnpm test:readme # run every example in the README and the docs against the built package
848
- pnpm docs:make # rewrite what the docs make from the source: the Japanese words, the leagues, the frames and units tables
884
+ pnpm docs:make # rewrite what the docs make from the source: the Japanese words and the tables
849
885
  ```
850
886
 
851
887
  ## Contributing
@@ -45,6 +45,11 @@ export function budoAbout(o, language, plan = budoPlan(o)) {
45
45
  const platform = L.height > 0.0005 ? fill(words.boxingPlatform, { height: cm(L.height) }) : words.boxingFloor;
46
46
  return fill(words.boxing, { size: trim(L.size), feet: trim(L.size / 0.3048), apron: cm(L.apron), platform });
47
47
  }
48
+ if (plan.prowrestling !== undefined) {
49
+ const L = plan.prowrestling;
50
+ const platform = L.height > 0.0005 ? fill(words.boxingPlatform, { height: cm(L.height) }) : words.boxingFloor;
51
+ return fill(words.prowrestling, { size: trim(L.size), feet: trim(L.size / 0.3048), apron: cm(L.apron), platform });
52
+ }
48
53
  if (plan.wrestling !== undefined) {
49
54
  const L = plan.wrestling;
50
55
  const fig = plan.figures;
@@ -91,6 +96,11 @@ export function budoSentences(o, language, plan = budoPlan(o)) {
91
96
  if (plan.mma.steps.length > 0)
92
97
  out.push(words.mmaSteps);
93
98
  }
99
+ if (plan.prowrestling !== undefined) {
100
+ out.push(words.prowrestlingRopes);
101
+ if (plan.prowrestling.steps.length > 0)
102
+ out.push(words.prowrestlingSteps);
103
+ }
94
104
  if (plan.wrestling !== undefined) {
95
105
  const fig = plan.figures;
96
106
  if (fig.centre !== null && o.budo?.circle !== false)
@@ -32,6 +32,12 @@ const DOJO_ONLY = {
32
32
  "yellow-green": pair({ ...COMMON, surface: "#e8d98e", alt: "#5f9a52", red: "#c8462a" }),
33
33
  "green-orange": pair({ ...COMMON, surface: "#6fa352", alt: "#69a04f", red: "#d4572a" }),
34
34
  };
35
+ /** The ring's canvas over the dark skirt of its platform: a pale canvas with dark red ropes (the default), a blue one and a black one with white ropes. Ours: the rules do not paint a ring. */
36
+ const RING_LOOKS = {
37
+ white: lifted(pair({ ...COMMON, surface: "#e6e3da", alt: "#d4d0c4", red: "#b32a2f", floor: "#2d3a56", rope: "#b32a2f" }), "#3b4a6e"),
38
+ blue: lifted(pair({ ...COMMON, surface: "#3a68ad", alt: "#2b528d", red: "#b32a2f", floor: "#1f3358", rope: "#f4f1e8" }), "#324a78"),
39
+ black: lifted(pair({ ...COMMON, surface: "#2b2e33", alt: "#1f2226", red: "#b32a2f", floor: "#17191c", rope: "#f4f1e8" }), "#3b3f45"),
40
+ };
35
41
  /** The looks of each sport: the names, the default first, and the colours. */
36
42
  export const BUDO_LOOKS = Object.freeze({
37
43
  judo: MATS,
@@ -53,11 +59,8 @@ export const BUDO_LOOKS = Object.freeze({
53
59
  blue: lifted(pair({ ...COMMON, surface: "#3a68ad", alt: "#2b528d", red: "#b32a2f", floor: "#2c3440" }), "#3a4452"),
54
60
  },
55
61
  // The ring's canvas over the dark skirt of its platform: a pale canvas with dark red ropes (the default), a blue one and a black one with white ropes. Ours: the rules do not paint a ring.
56
- boxing: {
57
- white: lifted(pair({ ...COMMON, surface: "#e6e3da", alt: "#d4d0c4", red: "#b32a2f", floor: "#2d3a56", rope: "#b32a2f" }), "#3b4a6e"),
58
- blue: lifted(pair({ ...COMMON, surface: "#3a68ad", alt: "#2b528d", red: "#b32a2f", floor: "#1f3358", rope: "#f4f1e8" }), "#324a78"),
59
- black: lifted(pair({ ...COMMON, surface: "#2b2e33", alt: "#1f2226", red: "#b32a2f", floor: "#17191c", rope: "#f4f1e8" }), "#3b3f45"),
60
- },
62
+ boxing: RING_LOOKS,
63
+ prowrestling: RING_LOOKS,
61
64
  // The wrestling mat's colours: the circle over the border (a UWW mat's protection area is a different colour from the mat, as its rules say), with the passivity band orange in every look. Ours.
62
65
  wrestling: {
63
66
  "blue-red": lifted(pair({ ...COMMON, surface: "#2f6db0", alt: "#c0392b", red: "#f07a1a", floor: "#2e3138" }), "#3b3f48"),
@@ -54,6 +54,7 @@ export interface BudoPlan {
54
54
  mma?: CageLayout;
55
55
  boxing?: RingLayout;
56
56
  wrestling?: MatLayout;
57
+ prowrestling?: RingLayout;
57
58
  }
58
59
  /** The sports of the budō family. */
59
60
  export declare const BUDO_SPORTS: readonly BudoKind[];
package/dist/budo/plan.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { chooseLeague } from "../leagues.js";
2
2
  import { BUDO_LEAGUES, DOJO_LEAGUES, JUDO_LEAGUES, KARATE_LEAGUES, KENDO_LEAGUES, KYUDO_LEAGUES, SUMO_LEAGUES } from "../leagues/budo.js";
3
- import { BOXING_LEAGUES, MMA_LEAGUES, WRESTLING_LEAGUES } from "../leagues/combat.js";
3
+ import { BOXING_LEAGUES, MMA_LEAGUES, PRO_WRESTLING_LEAGUES, WRESTLING_LEAGUES } from "../leagues/combat.js";
4
4
  import { dojoLayout, dojoLeague, dojoSpecOf } from "./dojo.js";
5
5
  import { contestOf, gridOf, judoParts, matOf, safetyOf, snapTo } from "./judo.js";
6
6
  import { karateParts } from "./karate.js";
@@ -21,12 +21,12 @@ export const BUDO_SPORTS = Object.freeze(["judo", "karate", "kendo", "sumo", "ky
21
21
  /** True for a sport of the budō family. */
22
22
  export const isBudoSport = (sport) => BUDO_SPORTS.includes(sport);
23
23
  /** The combat sports the engine of the budō also draws: the MMA cage and the boxing ring. */
24
- export const COMBAT_SPORTS = Object.freeze(["mma", "boxing", "wrestling"]);
24
+ export const COMBAT_SPORTS = Object.freeze(["mma", "boxing", "wrestling", "prowrestling"]);
25
25
  /** True for a combat sport (the MMA cage). */
26
26
  export const isCombatSport = (sport) => COMBAT_SPORTS.includes(sport);
27
27
  /** True for a sport this engine draws: a sport of the budō or a combat sport. */
28
28
  export const isMatSport = (sport) => isBudoSport(sport) || isCombatSport(sport);
29
- const OWN = { judo: JUDO_LEAGUES, karate: KARATE_LEAGUES, kendo: KENDO_LEAGUES, sumo: SUMO_LEAGUES, kyudo: KYUDO_LEAGUES, dojo: DOJO_LEAGUES, mma: MMA_LEAGUES, boxing: BOXING_LEAGUES, wrestling: WRESTLING_LEAGUES };
29
+ const OWN = { judo: JUDO_LEAGUES, karate: KARATE_LEAGUES, kendo: KENDO_LEAGUES, sumo: SUMO_LEAGUES, kyudo: KYUDO_LEAGUES, dojo: DOJO_LEAGUES, mma: MMA_LEAGUES, boxing: BOXING_LEAGUES, wrestling: WRESTLING_LEAGUES, prowrestling: PRO_WRESTLING_LEAGUES };
30
30
  /** What `budo.style` asks of a judo area: true for a kata area, false for a contest area, undefined for neither said. @throws TypeError for a value that is not `shiai` or `kata`. */
31
31
  function kataOf(style) {
32
32
  if (style === undefined)
@@ -141,6 +141,13 @@ export function budoPlan(o) {
141
141
  const ranges = { ...L.ranges, half: halves(L.platform) };
142
142
  return finish({ box: L.platform, extent: L.extent, areas: L.parts.areas, shapes: L.parts.shapes, lineWidth: f.ropes.diameter.drawn, ranges, marks: L.marks, centre: { x: L.centre[0], y: L.centre[1], r: L.size * 0.2 }, boxing: L });
143
143
  }
144
+ case "prowrestling": {
145
+ const f = fig;
146
+ const rule = "what rings are typically made as";
147
+ const L = ringParts(f, { size: ringSize(style.size, f, rule), height: ringHeight(style.height, f, rule), steps: flag(style.steps, true, "budo.steps"), corners: flag(style.corners, true, "budo.corners") });
148
+ const ranges = { ropes: L.ranges.ropes, half: halves(L.platform) };
149
+ return finish({ box: L.platform, extent: L.extent, areas: L.parts.areas, shapes: L.parts.shapes, lineWidth: f.ropes.diameter.drawn, ranges, marks: L.marks, centre: { x: L.centre[0], y: L.centre[1], r: L.size * 0.2 }, prowrestling: L });
150
+ }
144
151
  case "wrestling": {
145
152
  const f = fig;
146
153
  const rule = `the rules of ${league.id === "uww" ? "the UWW" : league.id === "ncaa-wrestling" ? "the NCAA" : "the NFHS"}`;
package/dist/budo/ring.js CHANGED
@@ -45,8 +45,8 @@ export function ringParts(fig, o) {
45
45
  parts.areas.push(rectArea(`step-${corner}-${t + 1}`, "steps", "ky-bud-step", { x0: b.x0, y0, x1: b.x1, y1: y0 + s.tread }));
46
46
  }
47
47
  };
48
- // The red corner (bottom left), the blue corner (top right) and the neutral corner nearest the table (bottom right).
49
- for (const corner of [3, 1, 2])
48
+ // The red corner (bottom left), the blue corner (top right) and the neutral corner nearest the table (bottom right); a ring with fewer sets has the first of them.
49
+ for (const corner of [3, 1, 2].slice(0, s.sets))
50
50
  at(corner);
51
51
  }
52
52
  // The ropes seen from above are one line each side; each turns to its post by the extension.
@@ -68,10 +68,13 @@ export function ringParts(fig, o) {
68
68
  { id: "ring-canvas", x: mid - o.size * 0.2, y: mid + o.size * 0.15, side: "bottom" },
69
69
  { id: "ring-ropes", x: ring.x1, y: mid - o.size * 0.2, side: "bottom" },
70
70
  { id: "ring-post", x: corners[0].post[0], y: corners[0].post[1], side: "top" },
71
- { id: "ring-red-corner", x: red.post[0], y: red.post[1], side: "bottom" },
72
- { id: "ring-blue-corner", x: blue.post[0], y: blue.post[1], side: "top" },
73
71
  { id: "ring-apron", x: mid, y: apron / 2, side: "top" },
74
72
  ];
73
+ // A boxing ring's corners are the two boxers' and two neutral ones; a wrestling ring's are not assigned, and its platform is named instead.
74
+ if (fig.boxerCorners)
75
+ marks.push({ id: "ring-red-corner", x: red.post[0], y: red.post[1], side: "bottom" }, { id: "ring-blue-corner", x: blue.post[0], y: blue.post[1], side: "top" });
76
+ else if (o.height > 0)
77
+ marks.push({ id: "ring-platform", x: platform.x1 - 0.2, y: mid + o.size * 0.3, side: "bottom" });
75
78
  if (steps.length > 0) {
76
79
  const last = steps[steps.length - 1];
77
80
  marks.push({ id: "ring-steps", x: (last.box.x0 + last.box.x1) / 2, y: side + (last.box.y1 - last.box.y0) / 2, side: "bottom" });
@@ -1,7 +1,7 @@
1
1
  /** The sports of the budō family. */
2
2
  export type BudoKind = "judo" | "karate" | "kendo" | "sumo" | "kyudo" | "dojo" | CombatKind;
3
3
  /** The combat sports the engine of the budō also draws: the MMA cage. */
4
- export type CombatKind = "mma" | "boxing" | "wrestling";
4
+ export type CombatKind = "mma" | "boxing" | "wrestling" | "prowrestling";
5
5
  /** The sides of a hall, as a plan has them: north is the top of the drawing. `top`, `bottom`, `left` and `right` say the same. */
6
6
  export type Compass = "north" | "south" | "east" | "west";
7
7
  export type Side4 = Compass | "top" | "bottom" | "left" | "right";
@@ -47,8 +47,8 @@ const RING_CLASSES = `
47
47
  .kyogijo .ky-bud-corner-red{fill:var(--ky-red)}
48
48
  .kyogijo .ky-bud-corner-blue{fill:var(--ky-blue,#2a5db0)}
49
49
  .kyogijo .ky-bud-corner-white{fill:#f4f1e8;stroke:var(--ky-ink);stroke-opacity:.45;stroke-width:.03}`.trim();
50
- const COMBAT = ["mma", "boxing"];
51
- const RING = ["boxing"];
50
+ const COMBAT = ["mma", "boxing", "prowrestling"];
51
+ const RING = ["boxing", "prowrestling"];
52
52
  /** The rules of a wrestling mat's own class: the green neutral line of a folkstyle mat's starting lines. */
53
53
  const WRESTLING_CLASSES = `.kyogijo .ky-bud-green-fill{fill:#2f9e63}`;
54
54
  const WRESTLING = ["wrestling"];
package/dist/crowd.js CHANGED
@@ -106,6 +106,8 @@ const PROFILES = {
106
106
  boxing: { shape: "bowl", side: 40, end: 40, bench: 0, corner: 56, tiers: [lower(60, 3, 24), upper(67, 120, 32, 60)], away: "corner" },
107
107
  // A wrestling mat stands in the middle of a hall in the same way.
108
108
  wrestling: { shape: "bowl", side: 36, end: 36, bench: 6, corner: 50, tiers: [lower(60, 3, 24), upper(67, 120, 32, 60)], away: "corner" },
109
+ // A wrestling ring stands in the middle of an arena as a boxing ring does.
110
+ prowrestling: { shape: "bowl", side: 40, end: 40, bench: 0, corner: 56, tiers: [lower(60, 3, 24), upper(67, 120, 32, 60)], away: "corner" },
109
111
  };
110
112
  /** The grounds of the package that are the home of an NFL or a CFL club, where a soccer pitch stands inside a gridiron's stands. From each ground's article. */
111
113
  export const GRIDIRON_GROUNDS = Object.freeze({
package/dist/draw.js CHANGED
@@ -55,6 +55,7 @@ import { KYOGIJO_STRINGS, fill } from "./strings.js";
55
55
  import { courtStyle } from "./courts.style.js";
56
56
  import { annotate, annotated, wideView } from "./annotate.js";
57
57
  import { KYOGIJO_BACKGROUND_STYLE, laidOn } from "./background.js";
58
+ import { overlayMarkup, placeBoard, resolveBoard } from "./overlay.js";
58
59
  import { KYOGIJO_HARDWOOD_STYLE, resolveHardwood } from "./hardwood.js";
59
60
  import { WALL_SEATS, densityOf, layoutOf as crowdLayout, resolveCrowd } from "./crowd.js";
60
61
  import { drawCrowd, KYOGIJO_CROWD_STYLE } from "./crowd.draw.js";
@@ -91,7 +92,7 @@ import { abbreviate, capitals } from "./text.js";
91
92
  import { VERSION } from "./version.js";
92
93
  export { isPortrait };
93
94
  /** The sports that can be drawn, in the order a menu lists them. */
94
- export const SPORTS = ["nfl", "cfl", "ifaf", "nhl", "nba", "mlb", "soccer", "curling", "tennis", "volleyball", "badminton", "pickleball", "tabletennis", "padel", "squash", "racquetball", "sepaktakraw", "teqball", "roundnet", "netball", "swimming", "waterpolo", "diving", "artisticswimming", "athletics", "skating", "judo", "karate", "kendo", "sumo", "kyudo", "dojo", "mma", "boxing", "wrestling", "lacrosse", "rugby", "afl", "gaelic", "cricket", "fieldhockey", "handball"];
95
+ export const SPORTS = ["nfl", "cfl", "ifaf", "nhl", "nba", "mlb", "soccer", "curling", "tennis", "volleyball", "badminton", "pickleball", "tabletennis", "padel", "squash", "racquetball", "sepaktakraw", "teqball", "roundnet", "netball", "swimming", "waterpolo", "diving", "artisticswimming", "athletics", "skating", "judo", "karate", "kendo", "sumo", "kyudo", "dojo", "mma", "boxing", "wrestling", "prowrestling", "lacrosse", "rugby", "afl", "gaelic", "cricket", "fieldhockey", "handball"];
95
96
  /** The CSS custom property each colour of `Colors` sets. */
96
97
  export const COLOR_PROPERTIES = {
97
98
  apron: "--ky-apron",
@@ -265,7 +266,7 @@ function buildSkating(o, common) {
265
266
  /** The budō surface: its plan, drawn as it lies. A hall, a kyūdōjō and a range of mats have little ground round them. */
266
267
  function buildBudo(o, common) {
267
268
  const plan = budoPlan({ ...o, detail: common.detail });
268
- return budoSurface(common, plan, common.margin ?? (o.range === undefined ? (plan.mma === undefined && plan.boxing === undefined && plan.wrestling === undefined ? 12 : 5) : 4));
269
+ return budoSurface(common, plan, common.margin ?? (o.range === undefined ? (plan.mma === undefined && plan.boxing === undefined && plan.wrestling === undefined && plan.prowrestling === undefined ? 12 : 5) : 4));
269
270
  }
270
271
  /** One text for both ends or sides, or a pair of them. */
271
272
  const pair = (text) => (text === undefined ? undefined : typeof text === "string" ? [text, text] : text);
@@ -376,6 +377,7 @@ function buildWhole(o, portrait, id, score, scored, extra) {
376
377
  case "mma":
377
378
  case "boxing":
378
379
  case "wrestling":
380
+ case "prowrestling":
379
381
  return buildBudo({ ...o, sport }, common);
380
382
  default:
381
383
  throw new Error(`Unknown sport "${String(o.sport)}": use one of ${SPORTS.join(", ")}`);
@@ -611,7 +613,7 @@ function leagueAbout(league, year, language, sheet) {
611
613
  const words = KYOGIJO_STRINGS[language].league;
612
614
  if (league.family === "skating")
613
615
  return skatingAbout({ sport: "skating", league: league.id }, language);
614
- if (league.family === "judo" || league.family === "karate" || league.family === "kendo" || league.family === "sumo" || league.family === "kyudo" || league.family === "dojo" || league.family === "mma" || league.family === "boxing" || league.family === "wrestling")
616
+ if (league.family === "judo" || league.family === "karate" || league.family === "kendo" || league.family === "sumo" || league.family === "kyudo" || league.family === "dojo" || league.family === "mma" || league.family === "boxing" || league.family === "wrestling" || league.family === "prowrestling")
615
617
  return budoAbout({ sport: league.family, league: league.id }, language);
616
618
  if (league.family === "athletics")
617
619
  return athleticsAbout({ sport: "athletics", league: league.id, athletics: sheet === undefined ? undefined : undefined }, language);
@@ -900,6 +902,8 @@ function drawnKyogijo(o) {
900
902
  let defs = "";
901
903
  let grounded = false;
902
904
  let foldedSheet = false;
905
+ let boarded;
906
+ const board = sized === "badge" ? undefined : resolveBoard(o.board);
903
907
  let pg;
904
908
  if (isScore(o) && left !== undefined && right !== undefined && sized === "badge") {
905
909
  const badge = badgeMarkup(left, right, { sport, status, parts, id, situation: situation === undefined ? undefined : badgeSituation(situation, language) });
@@ -1064,6 +1068,14 @@ function drawnKyogijo(o) {
1064
1068
  body = group;
1065
1069
  viewBox = `${num(v.x)} ${num(v.y)} ${num(v.w)} ${num(v.h)}`;
1066
1070
  }
1071
+ // A board over the surface, in the drawing's own units, over everything else (a strip's score stays clear of it, under the surface).
1072
+ if (board !== undefined) {
1073
+ const laid = overlayMarkup(board, placeBoard(board, v));
1074
+ if (laid !== "") {
1075
+ body += laid;
1076
+ boarded = typeof board.position === "object" ? "custom" : board.position;
1077
+ }
1078
+ }
1067
1079
  }
1068
1080
  const root = el("svg", {
1069
1081
  xmlns: "http://www.w3.org/2000/svg",
@@ -1083,6 +1095,7 @@ function drawnKyogijo(o) {
1083
1095
  "data-track": sport === "athletics" ? o.athletics?.track : undefined,
1084
1096
  "data-winner": isScore(o) ? winner : undefined,
1085
1097
  "data-pageant": pg === undefined ? undefined : pageant?.style,
1098
+ "data-board": boarded,
1086
1099
  "data-version": VERSION,
1087
1100
  width: safeLength(o.width),
1088
1101
  height: safeLength(o.height),
package/dist/features.js CHANGED
@@ -154,6 +154,13 @@ const WRESTLING = [
154
154
  f("centre-circle", "--ky-line", "The circle in the middle of the mat."),
155
155
  f("starting-lines", "--ky-line", "The two starting lines of a folkstyle mat with their green and red ends."),
156
156
  ];
157
+ const PROWRESTLING = [
158
+ f("apron", "--ky-apron", "The floor of the hall round the platform."),
159
+ f("canvas", "--ky-surface", "The canvas of the platform, ring and apron."),
160
+ f("ropes", "--ky-bud-rope", "The three ropes, and their extensions to the posts."),
161
+ f("steps", "--ky-bud-floor", "The steps beside the platform."),
162
+ f("corners", "--ky-ink", "The four corner posts with their pads."),
163
+ ];
157
164
  const KYUDO = [
158
165
  f("apron", "--ky-apron", "The ground round the range."),
159
166
  f("shajo", "--ky-bud-floor", "The floor of the shajō."),
@@ -464,6 +471,7 @@ export const FEATURE_INFO = Object.freeze({
464
471
  mma: MMA,
465
472
  boxing: BOXING,
466
473
  wrestling: WRESTLING,
474
+ prowrestling: PROWRESTLING,
467
475
  });
468
476
  /**
469
477
  * The names of the features of each sport: the keys `featureColors` takes. Football's three fields have the same, and so have the five net sports.
@@ -37,7 +37,7 @@ export const ZONE_SETS = Object.freeze({
37
37
  "pool-lanes": { sports: ["swimming"], title: "Lanes: each lane of the pool, the whole length of it", source: "docs/sources.md#zone-sets" },
38
38
  "water-polo-areas": { sports: ["waterpolo"], title: "The goal area, the ground from 2 to 6 m, and the rest of the field, at each end", source: "docs/sources.md#zone-sets" },
39
39
  "pool-thirds": { sports: ["diving", "artisticswimming"], title: "Thirds along the pool, from the wall the boards or the judges stand at", source: "docs/sources.md#zone-sets" },
40
- "budo-areas": { sports: ["judo", "karate", "kendo", "sumo", "kyudo", "dojo", "mma", "boxing", "wrestling"], title: "The surface in its areas: the contest and the safety areas, the boundary band, the clay and the ring of a dohyō, the shajō, the yamichi and the azuchi, a dojo's floor", source: "docs/sources.md#zone-sets" },
40
+ "budo-areas": { sports: ["judo", "karate", "kendo", "sumo", "kyudo", "dojo", "mma", "boxing", "wrestling", "prowrestling"], title: "The surface in its areas: the contest and the safety areas, the boundary band, the clay and the ring of a dohyō, the shajō, the yamichi and the azuchi, a dojo's floor", source: "docs/sources.md#zone-sets" },
41
41
  "field-thirds": { sports: ["lacrosse", "rugby", "afl", "gaelic", "fieldhockey", "handball", "netball"], title: "Thirds: defensive, middle and attacking", source: "docs/sources.md#zone-sets" },
42
42
  "skating-track": { sports: ["skating"], title: "The rink in parts: the finish straight, the first curve, the crossing straight, the second curve and the infield (a figure skating rink in thirds)", source: "docs/sources.md#zone-sets" },
43
43
  "athletics-track": { sports: ["athletics"], title: "The track in parts: the finish straight, the first bend, the back straight, the second bend, and the infield", source: "docs/sources.md#zone-sets" },
package/dist/homeside.js CHANGED
@@ -55,6 +55,8 @@ export const HOME_FIRST = Object.freeze({
55
55
  boxing: false,
56
56
  // A bout is between a red wrestler and a blue one (the UWW) or a green and a red one (folkstyle): no home side.
57
57
  wrestling: false,
58
+ // A match has no home side.
59
+ prowrestling: false,
58
60
  });
59
61
  /** The leagues whose convention is not their sport's: the international federation's lacrosse lists the home team first. */
60
62
  export const HOME_FIRST_LEAGUES = Object.freeze({