@johnmorrisdotca/kyogijo-stadiums 0.48.2 → 0.49.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,37 @@ All notable changes to this project are written here. The format follows
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.49.1] - 2026-11-02
11
+
12
+ ### Fixed
13
+
14
+ - **A judo tournament layout of the IJF's kata area or the AJJF's contest area now lies where its surface is drawn (KYOGIJO-STADIUMS-21)** ([tournament layouts](./docs/multi.md)): `multiLayout` sized every judo floor by the IJF contest area's figures (4 m of safety and common area), whatever the surface's `league`, while the drawing used the league's own, so a layout of `league: "ijf-kata"` (2 m) or `"ajjf"` (sizes made whole numbers of its 91 cm mats) drew its mats smaller than the floor, its labels and the places for the event's words and marks off the areas, and said it needed more floor than it does (two kata areas need 27 by 15 m, not 33 by 19). The floor is now laid from the judo drawing's own plan (`budoPlan`), and karate's from its league's figures. The presets are unchanged (judo 1 x 3 is 47 by 19 m, 1 x 4 is 61 by 19, karate 2 x 3 is 32 by 22, 2 x 4 is 42 by 22). Test: `src/multi.test.ts` lays the IJF's, the kata and the AJJF's floors at one to three areas and checks the layout's tatami is the drawn outline and the last area ends one safety area short of its edge. No new words.
15
+
16
+ ### Changed
17
+
18
+ - Tests (KYOGIJO-STADIUMS-2): the fingerprint tests no longer break at every version bump. A drawing carries `data-version`, and a drawing with no `id` of its own gets one made from its options and the version, so the hash of the raw text changed with each release and the snapshots, the 90 park hashes and the names fixture were regenerated by hand each time. `src/fingerprint.fixture.ts` hashes the drawing without the version and without those default ids (a page's own id is left alone); twelve test files use it, and the recorded hashes were rewritten once. `src/fingerprint.test.ts` draws the same drawing as version 999.0.0 and checks the fingerprint is the same, the raw hash is not, and a drawing that really changed still changes it. The suite (4,780 tests) also passes with `VERSION` and `package.json` at 0.49.1. The package and its drawings are unchanged.
19
+
20
+ - The demo (not the package): no more folds one under another, and none in every card (KYOGIJO-STADIUMS-18). On the stadiums, district and judging pages the facts, the floors, the choices, the print and the table were open folds in a stack; they are now tabs under the drawing (`demo/tabs.js`, with the arrow keys), the choices first, so the pane and its options share one screen. On the home page the Data and Charts sets each had a "Show the data as a table" fold in every card (thirteen); one switch above each set now swaps its drawings for the tables that stand for them. Tests in `e2e/stadiums.demo.mjs`, `e2e/district.demo.mjs`, `e2e/judging.demo.mjs`, `e2e/data.demo.mjs` and `e2e/charts.demo.mjs`. No new words, so no new Japanese.
21
+
22
+ ## [0.49.0] - 2026-10-30
23
+
24
+ ### Added
25
+
26
+ - **The controls of every 3D demo are on the view (SPX-651).** The stadiums, the halls, the judging, the boards, the district and the fly-through pages, and the home page's playground, have the bar the venues page and the featured arena already had, over the view: the walls, the roof and its opening, the boards, the lights, the names, the area round, the gates, the Kodokan's building and floor, the seat names and side judges, where the board goes, the roof and map of the fly-through, flat or 3D and light or dark, each only on the page where it means something. The view's own buttons (viewpoints, turn, tilt, zoom, Auto-turn, Reverse) are under it, and the bar, the view and the buttons are all in the first screen on a desk (1280 by 900) and on a phone (390 by 844), every control 44 pixels or more; the rest of the options stay in the panel (at the side of the view on a desk, under it on a phone, where the text of the page and the district's presets also go). The home page's playground has Flat, 3D, Crowd, Roof and Dark over its view, pressing the panel's own buttons. The choices were already in the address and still are. On a phone the bar is one row that scrolls along.
27
+ - **A press on the bar never stops or sends back the turn.** The stadiums' walls, roof and opening, the halls' roof, the district's walls, roofs, area round, gates, building and floor, and the playground's roof now change the scene in place (`update(options, { venue })`) where they mounted the view again; the scene is the same one afterwards, with the same DOM as a fresh page with that choice (checked for each). The fly-through goes on from the same moment, playing if it played.
28
+ - Demo only: `demo/view-bar.js` (`moveToBar` puts the labels of a page's existing controls in the bar, `fitView` gives the view the shape that leaves room for the bar and the buttons in the screen, never taller than the package's own shape (16:10, 5:4 on a phone), so that no layer is bigger than it was: the stage's `--rv-ratio` over the package's own `--ky-turn-ratio`, or a narrower box for the boards, whose pictures are made for the package's shape) is shared by every page and by `real-view.js`.
29
+ - Tests: `e2e/viewbar.demo.mjs` (the bar, the view and the buttons in the first screen, 44 pixels or more, nothing wider than the screen, on each page; each toggle and list pressed while the view turns, 6 degrees a second, leaves it turning without a jump, and leaves the same scene; the flight's time and play; the home page's two bars), in the three browsers' projects.
30
+
31
+ ### Changed
32
+
33
+ - The home page's featured arena has its box sized in the stylesheet to leave its buttons in the first screen of a desk (1280 by 900), and the playground's bar is in the page before the script fills it, so that nothing moves when the script runs.
34
+
35
+ ### Cost
36
+
37
+ - The package is unchanged (no change to `src/` but its version): `dist/` and the device and quality budgets are as in 0.48.2. The demo pages grow by `view-bar.js` and their own lines: 8.2 KB of script on each page (3.2 KB gzipped): the venues page 3,074.7 KB against 3,066.5, the districts 2,435.8 against 2,427.6 (alone), the stadiums 3,062.5 against 3,054.2, the halls 3,158.8 against 3,150.5, the boards 3,170.3 against 3,162.0, the judging 3,063.3 against 3,055.1, the fly-through 3,488.3 against 3,480.0, the home page 5,277.3 against 5,267.3; every page stays inside its budget, none is raised.
38
+ - Japanese: one new string, the name of the home page's bar (`stageBar`, `表示の切り替え:平面と3D、観客、屋根、ダークモード`, "Switching the display: flat and 3D, crowd, roof, dark mode"), checked by the Japanese reviewer.
39
+ - Known gap: on a phone the home page's header (the family's navigation and the name) fills the first screen, so there the featured arena's bar and the top of its view are in the first screen and its buttons under the view are one scroll down. The senshu and dougu turn demos are not part of this release.
40
+
10
41
  ## [0.48.2] - 2026-10-30
11
42
 
12
43
  ### Fixed
package/dist/multi.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // A tournament layout laid out: several of the package's own surfaces on one floor, to scale, where each stands and what it leaves free; the floor the layout needs; and whether it fits a hall's floor. The
2
2
  // figures are in multi.data.ts (a rulebook's, with its source); this file only adds them up. Nothing here draws SVG (multi.draw.ts does), and every function returns new values.
3
- import { inOctagon } from "./budo/plan.js";
3
+ import { budoLeague, budoPlan, inOctagon } from "./budo/plan.js";
4
4
  import { fill } from "./strings.core.js";
5
5
  import { FEET_PER_METRE } from "./geometry.js";
6
6
  import { IJF_CONTEST, WKF_KUMITE } from "./leagues/budo.js";
@@ -136,13 +136,23 @@ export function multiLayout(options = {}) {
136
136
  let floor;
137
137
  let tatami;
138
138
  if (spec.kind === "budo") {
139
- // The contest area, the safety area, the common safe zone between areas and the free zone, in metres: judo's from the IJF's figures (or the options'), karate's from the WKF's kumite area.
139
+ // The contest area, the safety area, the common safe zone between areas and the free zone, in metres. Judo's are the drawing's own (`budoPlan`), so that the floor is laid where the surface is
140
+ // drawn for every league: the IJF's contest area, its kata area (2 m of safety and common area, not 4) and the AJJF's (sizes made whole numbers of its 91 cm mats). Karate's are its league's.
140
141
  const karate = spec.sport === "karate";
141
- const opts = spec.surface.budo ?? {};
142
- const c = karate ? WKF_KUMITE.area : opts.size ?? IJF_CONTEST.contest.drawn;
143
- const s = karate ? WKF_KUMITE.safety : opts.safety ?? IJF_CONTEST.safety.drawn;
144
- const gap = karate ? WKF_KUMITE.between : Math.max(IJF_CONTEST.common, s);
145
- const free = karate ? 0 : IJF_CONTEST.freeZone;
142
+ let c, s, gap, free;
143
+ if (karate) {
144
+ const dims = budoLeague(spec.surface).dimensions;
145
+ const k = dims.kind === "karate" ? dims : WKF_KUMITE;
146
+ [c, s, gap, free] = [k.area, k.safety, k.between, 0];
147
+ }
148
+ else {
149
+ const plan = budoPlan(spec.surface);
150
+ const first = plan.judo?.contests[0];
151
+ const fig = plan.figures.kind === "judo" ? plan.figures : IJF_CONTEST;
152
+ if (plan.judo === undefined || first === undefined)
153
+ throw new Error(`The layout "${spec.id}" is not a judo floor of contest areas`);
154
+ [c, s, gap, free] = [first.x1 - first.x0, first.x0, plan.judo.gap, fig.freeZone];
155
+ }
146
156
  const across = spec.columns;
147
157
  const down = spec.rows;
148
158
  const tw = across * c + (across - 1) * gap + 2 * s;
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  /** The package's version: the same as package.json's, and a test holds them to each other. */
2
- export declare const VERSION = "0.48.2";
2
+ export declare const VERSION = "0.49.1";
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /** The package's version: the same as package.json's, and a test holds them to each other. */
2
- export const VERSION = "0.48.2";
2
+ export const VERSION = "0.49.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@johnmorrisdotca/kyogijo-stadiums",
3
- "version": "0.48.2",
3
+ "version": "0.49.1",
4
4
  "description": "Kyogijo Stadiums 競技場, 40 sports' surfaces as SVG, drawn to scale from the rulebooks: NFL, CFL and IFAF football fields, an NHL rink, an NBA court, MLB ballparks, soccer pitches, curling sheets, athletics stadiums, speed skating, short track and figure skating rinks, swimming pools, water polo fields, diving wells, artistic swimming areas, and the courts and fields of tennis, volleyball (indoor, beach and sitting), badminton, pickleball, table tennis, padel, squash, racquetball, sepak takraw, teqball, roundnet, netball, lacrosse, rugby, Australian football, Gaelic games, cricket, field hockey and handball, and the budo of judo, karate, kendo, sumo and kyudo with a dojo of tatami laid as real units, the MMA cage, with each team's name and logo on its side and the score in the middle, stands and a crowd, a pageant of flags, and a 3D view. Light and dark, accessible, a compact badge for lists, a helper for React and a custom element. Zero dependencies.",
5
5
  "keywords": [
6
6
  "sports",