@johnmorrisdotca/kyogijo-stadiums 0.11.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md 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.12.1] - 2026-10-19
11
+
12
+ The npm page shows the tournament layouts. No change to the package's code.
13
+
14
+ ### Changed
15
+
16
+ - **README: a showcase for the tournament layouts of 0.12.0.** A new example section, "Several surfaces on one floor", with a short tested example and two pictures in a light and a dark twin (three judo areas, four table tennis areas), and a Features entry; the same pictures are on [the layouts page](./docs/multi.md). Made by `pnpm screenshots:readme` (`ONLY=<subject>` takes just one subject). Several long Features entries of the README (the budō, the 3D view, the surfaces, zones, pools, athletics) are shortened to stay under the README size budget; the detail is on the page each links to.
17
+ - **`CONTRIBUTING.md` has a release-checklist line for visual features:** new visual feature? update the README images and add a showcase section if the examples do not show it well.
18
+
19
+ ## [0.12.0] - 2026-10-19
20
+
21
+ ### Added
22
+
23
+ - **Tournament layouts** (`@johnmorrisdotca/kyogijo-stadiums/multi`): `drawMulti` lays several of the package's own surfaces out together for one large event, to scale, on one floor, as one SVG, with the barriers, the officials' chairs, a scoreboard hung over the middle, the boards along the edges and empty places for the event's own words and marks (on the mats themselves for judo and karate, as those sports print them). Thirteen presets, each with its rule and sources, from table tennis (four and eight areas), pickleball (2 x 2, 2 x 4, 4 x 4), curling (four sheets), judo (three and four areas), karate (six and eight), badminton (the least spacing, and the 4 m the BWF recommends at Grade 1 and 2) and tennis; each says whether it is a rulebook's spacing or an arrangement an event used. `multiLayout` gives the floor a layout needs, `multiFit` whether it fits a hall (a rectangle, an octagon, or a floor of which only the area is known) with five halls and ice pads whose floors are published, and `venue` and `stadium` set the layout in a hall with a real stadium round it at the same scale, reusing the package's stands and crowd. `multiTable` is the text alternative; light and dark, English and Japanese. A demo page, `halls.html`, picks a preset, sets it in a hall and switches the stadium on and off (linked from the demo's gallery section), and the docs gallery has a page for every preset. See [Tournament layouts](./docs/multi.md).
24
+ - **Two more parks place a dugout or a bullpen, where their articles do:** `wrigley-field`'s home dugout (third base line) and `griffith-stadium`'s left-field bullpen (388 feet, 1956 to 1961). No generic dugout or bullpen is drawn for the others; `docs/ballparks.md` and `docs/references.md` list what was read and left out and why.
25
+
26
+ ### Changed
27
+
28
+ - **Docs only:** `docs/situation.md` says plainly what is left undrawn for want of a source (the NHL's older creases, an Olympic hybrid sheet, Buffalo Memorial Auditorium's rink) and what would be needed; `docs/team-shape.md` says the lineup's `jersey` is a flat marker of our own and where full jerseys are drawn.
29
+
10
30
  ## [0.11.0] - 2026-10-19
11
31
 
12
32
  ### Added
package/README.md CHANGED
@@ -72,17 +72,17 @@ console.log(svg.startsWith("<svg"), svg.includes("USA 3, Canada 2"));
72
72
 
73
73
  ## Features
74
74
 
75
- - **Thirty-nine surfaces, to scale.** The NFL field (360 by 160 feet with its end zones), the CFL field (450 by 195), the IFAF field, the NHL rink (200 by 85 with a 28-foot corner radius), the NBA court (94 by 50), the soccer pitch (105 by 68 metres, in ten sizes and variants), the baseball field, the curling sheet (150 by 15 feet 7 inches) and the courts of tennis, volleyball (beach and sitting), badminton, pickleball, table tennis, padel, squash, racquetball, sepak takraw, teqball, roundnet and netball, the pools of swimming, water polo, diving and artistic swimming, the athletics stadium, the skating rinks, the fields of lacrosse, rugby, Australian football, Gaelic games, cricket, field hockey and handball, and the budō: the competition areas of judo and karate, the kendo shiai-jo, the sumo dohyō, the kyūdōjō and a dojo of tatami, with the lines, circles, keys, boxes and goals of each. Every figure is cited in [sources](./docs/sources.md). [The surfaces](./docs/surfaces.md).
75
+ - **Thirty-nine 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, the courts of tennis, volleyball (beach and sitting), badminton, pickleball, table tennis, padel, squash, racquetball, sepak takraw, teqball, roundnet and netball, the pools, the athletics stadium, the skating rinks, the fields of lacrosse, rugby, Australian football, Gaelic games, cricket, field hockey and handball, and the budō, with the lines, circles, keys, boxes and goals of each. Every figure is cited in [sources](./docs/sources.md). [The surfaces](./docs/surfaces.md).
76
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
77
  - **A realistic basketball floor.** `court: { hardwood: true }` draws maple boards that run the length of the court with staggered ends, grain and tone, stained keys, circle and border, a strip behind each baseline in the team's colour, the baskets and stanchions with soft shadows from above, a coaching box and benches, and a satin sheen, in every league and every renderer, with the detail dropping at small sizes. 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, an arena's courtside rows, or a ballpark's grandstands and bleachers laid behind the park's own fence, with the people as a seeded pattern of heads and shoulders in the home colours, the visitors at an end, the empty seats showing (`density`, or `attendance` over `capacity`), a card display on request, and a soccer pitch inside a gridiron stadium's footprint, to scale. A few kB of patterns, blocks at small sizes, every renderer, and the stands' rings, heights and rake as data. [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, scored by the rules, `show: "folded"` for the whole sheet with both houses enlarged beside it in a square, and a heat map and statistics (free guards, hammer, steals, shots) for many ends. [Curling](./docs/curling.md).
80
80
  - **Net, racket and court sports, from their rulebooks.** The ITF's court, the FIVB's indoor and beach courts, World ParaVolley's sitting volleyball court, the BWF's, USA Pickleball's, the ITTF's table, the FIP's padel court, World Squash's courts (with the front wall laid flat beside the floor), the IRF's racquetball court, the ISTAF's sepak takraw court, the FITEQ's teqball court and table, the Roundnet Federation's court and World Netball's court, each in its look (hard court, clay, grass, wood, sand), with a board of sets and games and a ball beside the server. [Net, racket and court sports](./docs/courts.md).
81
- - **Swimming, water polo, diving and artistic swimming, from World Aquatics' regulations.** The competition pool of 50 or 25 m and one to ten lanes with its ropes in the rules' colours, floor markings and cross lines, blocks, touch panels, backstroke flags at 5 m and false start rope at 15 m, with a side section and a flat, "water" or tiled look; the water polo field with its ropes, lines, goals and re-entry areas; the diving well with its springboards and platforms at the distances of Appendix 2; the artistic swimming area; several pools in a natatorium. The lanes of a race carry names, flags you pass in, places with medals, times, reaction times and splits, with split pace bars, a race replay by lane (`raceTimeline`) and a `splitsChart`. [Pools](./docs/pools.md).
81
+ - **Swimming, water polo, diving and artistic swimming, from World Aquatics' regulations.** The competition pool of 50 or 25 m with its lanes, ropes, blocks, touch panels and flags; the water polo field; the diving well with its springboards and platforms; the artistic swimming area; several pools in a natatorium. The lanes of a race carry names, flags, places, times and splits, with a race replay by lane (`raceTimeline`) and a `splitsChart`. [Pools](./docs/pools.md).
82
82
  - **Lacrosse, rugby, Australian football, Gaelic games, cricket, field hockey and handball, from their rulebooks.** The fields and floors of World Lacrosse, the NCAA, the PLL and the NLL; World Rugby's union and the NRL's and IRL's league; the AFL's oval at the size of a named ground; the GAA's field for football and hurling; a cricket ground with a boundary of your own and the 30-yard circle; the FIH's pitch and the IHF's court. A score is goals and behinds (10.12 (72)), goals and points (2-14 (20)) or a board of 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, the staggers worked out from the running lines (the 200 m and 400 m to the millimetre of the Manual's table, the 800 m and 4 x 400 m from the breakline's own construction), curved and relay starts, hurdles, the steeplechase with the water jump inside or outside, every field event in its place or alone at a large scale, a close-up of each start with stencil lane numbers, the covered 200 m track, an ink-only `line-drawing` look, and lane draws, results, a race replay and the marks of throws and jumps. [The athletics stadium](./docs/athletics.md).
84
- - **The skating rinks, from the ISU's rules.** The standard 400 m speed skating track with its two lanes, warm-up lane, blocks and coaches' area, and the starting and finishing lines of every race worked out lane by lane from the track's measurements (held to the layout plan's own dimensions); the short track's oval of 111.12 m with its seven blocks in each curve, five or seven tracks and starting positions; the figure skating rink of 60 by 30 m with its judges' seats; and pairs, results, a race replay and the elements of a programme on the ice. [The skating rinks](./docs/skating.md).
85
- - **The budō, from the federations' rules.** The IJF's judo competition area (a contest area of 8 m to 10 m in a safety area of 3 m or more, with the common safe zone, the free zone, the platform, the tape and the tatami of 2 m by 1 m in the IJF's yellow and red, or other looks) and the All Japan Judo Federation's (its tatami of 182 by 91 cm, its red danger zone), the WKF's karate areas (8 m, the boundary band, the 2 m safety area, the start mats), the kendo shiai-jo (9 m to 11 m, the cross and the kaishi-sen), the sumo dohyō (the 6.7 m clay square, the ring of 20 tawara, the shikiri-sen, the four tassels), the kyūdōjō (kinteki at 28 m and enteki at 60 m, the shajō, the yamichi and the azuchi), and **a dojo builder**: a floor of tatami laid as real units (no four corners meet), in jō or metres, with the walls, doors, windows, shrine and kamiza. Five famous halls are on the atlas (the Kodokan's main dojo of 420 jō, the Nippon Budokan's octagon, the Kokugikan, the old Butokuden and the Budokwai), each with only what a source gives; the scores are judo's ippon, waza-ari and shido, karate's points, kendo's points and sumo's kimarite. [The budō](./docs/budo.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, and lane draws, results, a race replay and the marks of throws and jumps. [The athletics stadium](./docs/athletics.md).
84
+ - **The skating rinks, from the ISU's rules.** The standard 400 m speed skating track with its lanes, blocks and coaches' area and the starting and finishing lines of every race worked out lane by lane; the short track's oval of 111.12 m with its blocks and starting positions; the figure skating rink of 60 by 30 m with its judges' seats; and pairs, results, a race replay and the elements of a programme on the ice. [The skating rinks](./docs/skating.md).
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 (no four corners meet), in jō or metres, with the walls, doors, windows, shrine and kamiza. Five famous halls are on the atlas, each with only what a source gives, and the scores are judo's ippon, waza-ari and shido, karate's points, kendo's points and sumo's kimarite. [The budō](./docs/budo.md).
86
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).
87
87
  - **Every ballpark.** The 30 current MLB parks and 44 that MLB clubs have left (the Polo Grounds, Ebbets Field, the Astrodome and more), 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; a past park whose fence moved is drawn as it stood in a season. [Ballparks](./docs/ballparks.md).
88
88
  - **Soccer grounds, arenas and an atlas.** 64 soccer grounds, each pitch at its published size, and 167 NHL, NBA, WNBA and PWHL arenas (`drawKyogijo({ sport: "nhl", arena: "boston-garden" })`), a rink or a court at the arena's own size where an article gives one, and every park, ground, arena and budō hall (330 places) on a map, by sport, league, country and year, each found by any name it has in English, Japanese or its own language (`Koshien Stadium` is also `甲子園`, `San Siro` is `サン・シーロ`). [The grounds](./docs/grounds.md), [the arenas](./docs/arenas.md), [the atlas](./docs/atlas.md), [names](./docs/ballparks.md#names).
@@ -97,12 +97,13 @@ console.log(svg.startsWith("<svg"), svg.includes("USA 3, Canada 2"));
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 pageant's carpet. The same adapter serves [Taisen Brackets](https://github.com/johnmorrisdotca/taisen-brackets). Kyogijo bundles no flag and keeps zero dependencies; without the plug-in a code is ignored. [Flags](./docs/flags.md).
98
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).
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 rink's, court's, pitch's, park's or field's own figures (the offensive zone and its face-off circle, the frontcourt and the corner three, the attacking third and the six-yard box, the infield and the warning track, the red zone and between the hashes), with `isThreePointer`, `inSlot`, `inPenaltyArea`, `isFair`, `overWall` and the like, and `isHomeRun(park, point, { height })` from the park's fence and wall; `clientPointToField(svg, x, y, { provider })` is a pointer's place in any of the frames, with the zone, and `fieldPointToClient` the way back. `marks: true` writes `data-mark-id`, `data-index` and `data-zone` on every mark of a layer, for one listener to link it to a table. [Zones](./docs/zones.md), [pointing](./docs/pointer.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 and the area in it from the rink's, court's, pitch's, park's or field's own figures, with `isThreePointer`, `inSlot`, `inPenaltyArea`, `isFair`, `overWall`, `isHomeRun` and the like; `clientPointToField(svg, x, y, { provider })` is a pointer's place in any of the frames, with the zone, and `fieldPointToClient` the way back. `marks: true` writes `data-mark-id`, `data-index` and `data-zone` on every mark of a layer, for one listener to link it to a table. [Zones](./docs/zones.md), [pointing](./docs/pointer.md).
101
101
  - **Goals, the strike zone and the stumps, end-on.** A goal mouth for hockey (6 by 4 feet), soccer, handball, water polo, lacrosse (6 by 6) and field hockey with the shots laid on it and its zones (the top shelf, the five-hole, the corners), the catcher's view of the strike zone with its nine and thirteen zones and the pitches numbered, and the wicket from the bowler's end with its line and length zones. [Targets](./docs/targets.md).
102
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 (the road to a tournament's final moved to [`@johnmorrisdotca/taisen-brackets`](https://www.npmjs.com/package/@johnmorrisdotca/taisen-brackets), its `/road` entry). [Data layers](./docs/layers.md), [charts](./docs/charts.md).
103
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).
104
105
  - **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).
105
- - **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 a reset, and what the rulebook stands on it at its height: the net and antennae of volleyball, the nets of tennis, badminton, pickleball and table tennis, baskets and stanchions, rink boards and glass, goals, the posts of football, rugby, Gaelic and Australian football, stumps, a ballpark's fence, the walls of padel, squash and racquetball (cut away on the side nearest the eye), a swimming pool's blocks and flags, a diving well's boards and platforms, a water polo goal, a jump's uprights and bar, a throwing cage, the hurdles, and the padding of a skating track; and the venue round it, raised from the same data (the raked stands of a `crowd` with the people on them, a ballpark's grandstands and the seats on its wall, roofs on request, a dojo's walls, dais, banner and gallery), faded on the side nearest the eye, with an auto-turn toggle. Plain DOM and CSS over the same SVG, flat where 3D is not drawn. [The 3D view](./docs/turn.md).
106
+ - **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, antennae, baskets, rink boards and glass, goals, posts, stumps, a ballpark's fence, the walls of padel and squash, a pool's blocks, a diving well's platforms, a jump's bar, hurdles; and the venue round it (the raked stands with the people on them, roofs on request, a dojo's walls and gallery). Plain DOM and CSS over the same SVG. [The 3D view](./docs/turn.md).
106
107
  - **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).
107
108
  - **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, a curling stone's place from the button, a place from the net in each net sport (from the centre of the court in squash, racquetball, roundnet and netball), the centre of each field sport's surface, the middle of the water of each pool, the middle of the athletics stadium and of each skating rink) to move a provider's points onto a surface. [Units](./docs/units.md), [coordinate frames](./docs/frames.md).
108
109
  - **A compact badge and a compact card.** One strip for a list, or the surface with that strip under it.
@@ -129,6 +130,7 @@ console.log(svg.startsWith("<svg"), svg.includes("USA 3, Canada 2"));
129
130
  | `./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. |
130
131
  | `./turn` | A surface as a 3D view that turns, with the net, basket, goal or posts standing on it. |
131
132
  | `./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`). |
133
+ | `./multi` | `drawMulti`, `multiFit`: several surfaces laid out for one event, in a hall ([docs](./docs/multi.md), [demo](https://johnmorrisdotca.github.io/kyogijo-stadiums/halls.html)). |
132
134
  | `./layouts` | `drawGrid` and `GRID_PRESETS`: small multiples with a title, a subtitle, a key and a credit line; the grounds behind a drawing or a grid. |
133
135
  | `./mount`, `./react`, `./element`, `./element/define` | Draw into a container; React props; the `<kyogijo-field>` element and its registration. |
134
136
 
@@ -490,6 +492,39 @@ console.log(svg.includes('viewBox="0 0 1200 675"'), svg.includes("Three ballpark
490
492
  // true true
491
493
  ```
492
494
 
495
+ ### Several surfaces on one floor
496
+
497
+ For a large event that runs many contests at once: `drawMulti` lays the package's own surfaces out together, to scale, on one floor, with the officials' chairs, the boards along the edges and empty places for the event's own words and marks ([tournament layouts](./docs/multi.md)). Thirteen presets, each with its rule and sources, from table tennis to judo and karate; `multiFit` says whether a layout fits a hall, and `stadium: true` sets it inside real stands.
498
+
499
+ ```ts
500
+ import { drawMulti, multiLayout } from "@johnmorrisdotca/kyogijo-stadiums/multi";
501
+
502
+ const svg = drawMulti({ preset: "judo-1x3" });
503
+ const layout = multiLayout({ preset: "judo-1x3" });
504
+ console.log(svg.startsWith("<svg"), layout.cells.length);
505
+ // true 3
506
+ console.log(layout.needs.length, layout.needs.width);
507
+ // 47 19
508
+ ```
509
+
510
+ <p align="center">
511
+ <picture>
512
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/multi-judo-desk-dark.webp">
513
+ <img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/multi-judo-desk-light.webp" alt="Three judo contest areas in a row on one red floor of mats, each numbered, with dashed empty places for the event's name and logos and a board along each edge." width="640">
514
+ </picture>
515
+ <br><em>Three judo contest areas on one floor of mats: 47 by 19 metres.</em>
516
+ </p>
517
+
518
+ <p align="center">
519
+ <picture>
520
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/multi-tabletennis-desk-dark.webp">
521
+ <img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/multi-tabletennis-desk-light.webp" alt="Four table tennis areas in two rows of two on one blue floor, numbered Table 1 to Table 4, with a scoreboard hung over the middle and boards along the edges." width="640">
522
+ </picture>
523
+ <br><em>Four table tennis areas under one scoreboard.</em>
524
+ </p>
525
+
526
+ Each surface is the one `drawKyogijo` draws, so nothing is drawn a second way; the [demo](https://johnmorrisdotca.github.io/kyogijo-stadiums/halls.html) picks a preset, sets it in a hall and switches the stadium on and off.
527
+
493
528
  ### The element in a page
494
529
 
495
530
  ```html
@@ -0,0 +1,7 @@
1
+ export { drawMulti, multiSetting, multiTable } from "./multi.draw.ts";
2
+ export { MULTI_MAX, fitSentence, multiFit, multiLayout, needsSentence, specOf, venueOf } from "./multi.ts";
3
+ export { MULTI_PRESETS, MULTI_PRESET_IDS, MULTI_SOURCES, MULTI_VENUES, multiPreset, multiSource, multiVenueById } from "./multi.data.ts";
4
+ export { KYOGIJO_MULTI_STYLE } from "./multi.style.ts";
5
+ export { MULTI_WORDS } from "./multi.words.ts";
6
+ export type { MultiWords } from "./multi.words.ts";
7
+ export type { MultiBasis, MultiCell, MultiEvent, MultiFit, MultiFloor, MultiLayout, MultiNeeds, MultiOptions, MultiParts, MultiSize, MultiSlot, MultiSpec, MultiSurface, MultiUnit, MultiVenue, MultiWord } from "./multi.types.ts";
@@ -0,0 +1,8 @@
1
+ // Tournament layouts: several of the package's surfaces laid out together for one large event, to scale, on one floor (tables, courts, sheets, a judo floor's contest areas in a row), with the barriers, the
2
+ // officials' chairs, a scoreboard hung over the middle, the boards and the empty places for the event's own words and marks; the real configurations of events as presets, each with its rule; the halls whose
3
+ // floors are published, and whether a layout fits one; and a real stadium round the floor at the same scale. `multiTable` is the text alternative.
4
+ export { drawMulti, multiSetting, multiTable } from "./multi.draw.js";
5
+ export { MULTI_MAX, fitSentence, multiFit, multiLayout, needsSentence, specOf, venueOf } from "./multi.js";
6
+ export { MULTI_PRESETS, MULTI_PRESET_IDS, MULTI_SOURCES, MULTI_VENUES, multiPreset, multiSource, multiVenueById } from "./multi.data.js";
7
+ export { KYOGIJO_MULTI_STYLE } from "./multi.style.js";
8
+ export { MULTI_WORDS } from "./multi.words.js";
@@ -0,0 +1,42 @@
1
+ import type { MultiFit, MultiLayout, MultiNeeds, MultiOptions, MultiSpec, MultiVenue } from "./multi.types.ts";
2
+ import type { Language } from "./types.ts";
3
+ /** The most rows or columns a layout takes. */
4
+ export declare const MULTI_MAX = 12;
5
+ /** A number as a language writes it: thousands separated, two decimals at most (`3,234.5`). */
6
+ export declare const multiNumber: (value: number, language?: Language) => string;
7
+ /**
8
+ * The layout the options ask for: a preset or a layout of the caller's own, with the grid and the stagger it is given in place of its own.
9
+ * @throws Error for a preset that is not one, an option that is not a whole number or a share, or neither a preset nor a layout.
10
+ */
11
+ export declare function specOf(o: Pick<MultiOptions, "preset" | "layout" | "rows" | "columns" | "stagger">): MultiSpec;
12
+ /**
13
+ * A layout laid out: where each surface stands, the floor it needs and the empty places for the event's own words and marks, all in feet from the top left corner of the floor (and the floor's size
14
+ * and what the layout needs in metres).
15
+ * @example
16
+ * ```ts
17
+ * import { multiLayout } from "@johnmorrisdotca/kyogijo-stadiums/multi";
18
+ * const layout = multiLayout({ preset: "tabletennis-4" });
19
+ * console.log(layout.cells.length, layout.needs.length, layout.needs.width);
20
+ * // 4 28 14
21
+ * ```
22
+ */
23
+ export declare function multiLayout(options?: Pick<MultiOptions, "preset" | "layout" | "rows" | "columns" | "stagger" | "language">): MultiLayout;
24
+ /** A hall as the caller gives it, or a key of `MULTI_VENUES`. @throws Error for a key that is not one, a size that is not positive. */
25
+ export declare function venueOf(venue: MultiOptions["venue"]): MultiVenue | undefined;
26
+ /**
27
+ * Whether a layout fits a hall's floor. A floor that is a rectangle takes the layout as it is or turned a quarter; an octagon takes it if its corners are inside; a floor of which only the area is published
28
+ * can only be compared by area, and says so (`fits` is `null` when the area is enough, because the shape may still not take it).
29
+ * @example
30
+ * ```ts
31
+ * import { multiFit, multiLayout } from "@johnmorrisdotca/kyogijo-stadiums/multi";
32
+ * const four = multiFit(multiLayout({ preset: "curling-1x4" }), "nhl-ice-pad");
33
+ * const six = multiFit(multiLayout({ preset: "curling-1x4", columns: 6 }), "nhl-ice-pad");
34
+ * console.log(four.fits, four.turned, six.fits);
35
+ * // true true false
36
+ * ```
37
+ */
38
+ export declare function multiFit(layout: MultiLayout, venue: MultiOptions["venue"]): MultiFit;
39
+ /** The sentence that says how a layout sits in a hall, in a language. */
40
+ export declare function fitSentence(fit: MultiFit, language?: Language): string;
41
+ /** The size of a layout as words, in a language: `28 by 14 metres (392 square metres)`; along the layout first, then across it. */
42
+ export declare const needsSentence: (needs: MultiNeeds, language?: Language) => string;
@@ -0,0 +1,22 @@
1
+ import { type LeagueSource } from "./leagues/sources.ts";
2
+ import type { MultiSpec, MultiVenue } from "./multi.types.ts";
3
+ /** The documents a layout's figures were read from, by id, beside the rulebooks of `LEAGUE_SOURCES` (a key of either names a source). */
4
+ export declare const MULTI_SOURCES: Readonly<Record<string, Readonly<LeagueSource>>>;
5
+ /** The source a key names, from `MULTI_SOURCES` or `LEAGUE_SOURCES`. */
6
+ export declare const multiSource: (id: string) => Readonly<LeagueSource> | undefined;
7
+ /**
8
+ * The halls whose floor is published, and the two ice pads an arena lays in winter. A venue with no length and width (only an area) is compared by area. The package does not hold the floors of
9
+ * halls it could not source: a layout for such a hall is set on a floor of the caller's own size.
10
+ */
11
+ export declare const MULTI_VENUES: readonly MultiVenue[];
12
+ /** The hall with a key, or `undefined`. */
13
+ export declare const multiVenueById: (id: string | undefined) => MultiVenue | undefined;
14
+ /**
15
+ * The presets: layouts of real configurations, each with its rule and, where one is named, the event and the hall. `rulebook` means the spacing is what a rulebook or a specification asks for; `event`
16
+ * means an event used the arrangement (read from reports and photographs, with no plan seen). The list is in the order of the sports of this package's own menu.
17
+ */
18
+ export declare const MULTI_PRESETS: readonly MultiSpec[];
19
+ /** The keys of `MULTI_PRESETS`, in order. */
20
+ export declare const MULTI_PRESET_IDS: readonly string[];
21
+ /** The preset with a key, or `undefined`. */
22
+ export declare const multiPreset: (id: string | undefined) => MultiSpec | undefined;