@johnmorrisdotca/kyogijo-stadiums 0.6.2 → 0.8.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.
Files changed (57) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +2 -2
  3. package/dist/budo/looks.js +1 -1
  4. package/dist/budo/room.d.ts +34 -2
  5. package/dist/budo/room.js +39 -7
  6. package/dist/budo/types.d.ts +6 -1
  7. package/dist/budo.style.d.ts +1 -1
  8. package/dist/budo.style.js +6 -3
  9. package/dist/charts-entry.d.ts +0 -3
  10. package/dist/charts-entry.js +1 -3
  11. package/dist/crowd.d.ts +4 -0
  12. package/dist/crowd.draw.d.ts +5 -0
  13. package/dist/crowd.draw.js +34 -5
  14. package/dist/crowd.js +6 -1
  15. package/dist/draw.js +6 -3
  16. package/dist/element.d.ts +3 -3
  17. package/dist/element.js +16 -2
  18. package/dist/halls.js +4 -3
  19. package/dist/layout.js +1 -2
  20. package/dist/mark.d.ts +1 -1
  21. package/dist/mark.js +1 -1
  22. package/dist/strings.d.ts +7 -29
  23. package/dist/strings.js +6 -24
  24. package/dist/style.js +1 -2
  25. package/dist/surfaces/budo.js +22 -2
  26. package/dist/turn-entry.d.ts +2 -0
  27. package/dist/turn-entry.js +1 -0
  28. package/dist/turn.dom.d.ts +8 -0
  29. package/dist/turn.dom.js +147 -8
  30. package/dist/turn.kit.d.ts +5 -3
  31. package/dist/turn.kit.js +1 -1
  32. package/dist/turn.markup.d.ts +8 -1
  33. package/dist/turn.markup.js +18 -4
  34. package/dist/turn.model.d.ts +26 -0
  35. package/dist/turn.model.js +34 -3
  36. package/dist/turn.style.js +58 -4
  37. package/dist/uprights.d.ts +7 -0
  38. package/dist/uprights.js +15 -1
  39. package/dist/venue.d.ts +31 -0
  40. package/dist/venue.geom.d.ts +53 -0
  41. package/dist/venue.geom.js +225 -0
  42. package/dist/venue.js +172 -0
  43. package/dist/venue.room.d.ts +9 -0
  44. package/dist/venue.room.js +240 -0
  45. package/dist/version.d.ts +1 -1
  46. package/dist/version.js +1 -1
  47. package/package.json +1 -1
  48. package/dist/road.d.ts +0 -26
  49. package/dist/road.draw.d.ts +0 -6
  50. package/dist/road.draw.js +0 -270
  51. package/dist/road.js +0 -60
  52. package/dist/road.model.d.ts +0 -63
  53. package/dist/road.model.js +0 -215
  54. package/dist/road.style.d.ts +0 -7
  55. package/dist/road.style.js +0 -26
  56. package/dist/road.types.d.ts +0 -125
  57. package/dist/road.types.js +0 -1
@@ -1,125 +0,0 @@
1
- import type { EmblemRenderer } from "./emblems-source.ts";
2
- import type { Language, Team } from "./types.ts";
3
- /** A match's score from the finalist's side: `[for, against]` (numbers, or text such as a series' `4`), or one text, `"4-2"`, that is split at its dash. */
4
- export type RoadScore = readonly [number | string, number | string] | string;
5
- /** How a match was decided: `ft` (full time, the default), `aet` (after extra time) or `pens` (a shoot-out after extra time). */
6
- export type RoadDecided = "ft" | "aet" | "pens";
7
- /** One match on a finalist's way. */
8
- export interface RoadMatch {
9
- /** The round, as a key. `round-of-32`, `round-of-16`, `quarter-final` and `semi-final` have words in English and Japanese; any other key is written as it is, or as `options.labels` names it. */
10
- round: string;
11
- /** The team it played: its name, abbreviation, `logo` (the flag or the crest) and `color`. */
12
- opponent: Team;
13
- /** The score, the finalist's first: `[2, 1]` is a 2-1 win. */
14
- score: RoadScore;
15
- /** How it was decided: `ft` by default, or `pens` when `pens` is given. Written under the score: FT, AET, or the shoot-out. */
16
- decidedBy?: RoadDecided;
17
- /** The shoot-out, the finalist's first: `[4, 3]`. */
18
- pens?: readonly [number | string, number | string];
19
- /** The order of the pair, left to right: `true` the finalist first, `false` its opponent first. By default the finalist is at the outer edge of its side, so that the two paths mirror each other. */
20
- homeFirst?: boolean;
21
- /** Words to write under the score in place of FT, AET or the shoot-out (`Game 6`, `OT`). An empty text writes nothing. */
22
- note?: string;
23
- }
24
- /** One match of the group stage: as a knockout match, without a round. */
25
- export type RoadGroupMatch = Omit<RoadMatch, "round"> & {
26
- round?: string;
27
- };
28
- /** A finalist: a team and the matches it played on the way, the earliest first. */
29
- export interface RoadFinalist extends Team {
30
- /** The knockout matches before the final, the earliest first. */
31
- path: readonly RoadMatch[];
32
- /** The group stage, in the order played. A row of small marks, codes and scores at the foot. */
33
- group?: readonly RoadGroupMatch[];
34
- }
35
- /** The final, when it has been played. */
36
- export interface RoadFinal {
37
- /** The score, the first finalist's first. */
38
- score: RoadScore;
39
- decidedBy?: RoadDecided;
40
- /** The shoot-out, the first finalist's first. */
41
- pens?: readonly [number | string, number | string];
42
- note?: string;
43
- }
44
- /** The sizes of the chart: `card` 1080 by 1350 (a tall post), `square` 1080 by 1080, `wide` 1200 by 675 (the finalists at the two ends) and `phone` 390 wide and as tall as it needs. */
45
- export type RoadSize = "card" | "square" | "wide" | "phone";
46
- /** What `roadToFinal` takes besides the finalists. */
47
- export interface RoadOptions {
48
- /** The words of the chart: its title, the rounds' names, how a match was decided and the table. English by default. */
49
- language?: Language;
50
- /** A prefix for the ids inside the drawing. Made from the chart when missing, so that two charts on a page do not share ids. */
51
- id?: string;
52
- /** A renderer of ready-made emblems for this chart alone, so that a finalist's `logo` may be an emblem's id. Over the one the page plugged in with `useEmblems`. */
53
- emblems?: EmblemRenderer;
54
- /** The tournament, set large at the top. "Road to the final" when missing. */
55
- title?: string;
56
- /** The line under it. "Road to the final" when a `title` is given. */
57
- subtitle?: string;
58
- /** The final, if it has been played: its score is written between the two big marks, the winner is brighter, and the table has a row for it. */
59
- final?: RoadFinal;
60
- /** The names of the rounds, by key, over the package's own words. Any key a match uses may be named here: `{ "first-round": "First round" }`. */
61
- labels?: Readonly<Record<string, string>>;
62
- /** The group stage's name, over the package's own. */
63
- groupLabel?: string;
64
- /** `card` (the default), `square`, `wide` or `phone`. */
65
- size?: RoadSize;
66
- /** `light` or `dark` to force one; `auto` (the default) follows the device and the page. */
67
- theme?: "auto" | "light" | "dark";
68
- /** Who is brighter: `auto` (the default) the side that won each match, `none` nobody. */
69
- winner?: "auto" | "none";
70
- /** Write the opponent's three-letter code under its mark. On by default. */
71
- codes?: boolean;
72
- /** A line at the foot: a source, a credit, "Made-up results". */
73
- endnote?: string;
74
- /** A class for the root. */
75
- className?: string;
76
- /** `none` leaves the stylesheet to the page (`KYOGIJO_STYLE` has every rule). */
77
- style?: "embed" | "none";
78
- }
79
- /** One finalist's record on the way. */
80
- export interface RoadRecord {
81
- name: string;
82
- /** Matches played in the group and the knockout rounds (not the final), and how many it won, drew and lost. */
83
- matches: number;
84
- won: number;
85
- drawn: number;
86
- lost: number;
87
- /** The goals it scored and let in over the matches whose score is a pair of numbers. */
88
- scored: number;
89
- conceded: number;
90
- }
91
- /** The numbers behind a road chart. */
92
- export interface RoadTotals {
93
- finalists: [RoadRecord, RoadRecord];
94
- /** The rounds of the chart, the earliest first, as keys. */
95
- rounds: string[];
96
- /** The final has a score. */
97
- played: boolean;
98
- /** The winner of the final, or null when it has not been played or is level. */
99
- champion: string | null;
100
- }
101
- /** The size in pixels a size draws at, and what it is for. */
102
- export interface RoadSizeInfo {
103
- readonly width: number;
104
- /** `undefined` for a size that is as tall as the rounds need. */
105
- readonly height: number | undefined;
106
- readonly about: string;
107
- }
108
- /** What `roadToFinal` gives back. */
109
- export interface RoadChart {
110
- /** The options the chart was made with, with the finalists: pass changes to `draw`. */
111
- options: RoadOptions;
112
- /** The chart's accessible name, in the chart's language. */
113
- title: string;
114
- /** What the chart shows, in a sentence or two, for a caption. */
115
- summary: string;
116
- /** The numbers behind it. */
117
- totals: RoadTotals;
118
- /** The drawing as an SVG string. `extra` is laid over the options (`size`, `theme`, `language`, `labels`, `final`...). */
119
- draw(extra?: Partial<RoadOptions>): string;
120
- /** One HTML table with a row for every match: the table that stands for the drawing for a screen reader. */
121
- table(options?: {
122
- className?: string;
123
- language?: Language;
124
- }): string;
125
- }
@@ -1 +0,0 @@
1
- export {};