@wral/hsot-data 0.3.0 → 0.4.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/README.md +29 -2
- package/dist/define.mjs +1 -1
- package/dist/define.standalone.js +1165 -1116
- package/dist/{hsot-brackets-Cc0zj07F.js → hsot-brackets-Bqk0gI3J.js} +524 -475
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,9 +10,9 @@ exactly one of these elements.
|
|
|
10
10
|
| Component | Page | Key attributes |
|
|
11
11
|
|---|---|---|
|
|
12
12
|
| `<hsot-scores>` | Scores/Schedules (the scoreboard; future dates are schedules) | `sport`, `date` (YYYY-MM-DD, deep-linkable via `?date=`; defaults to the closest matchday: today when games are on, otherwise the previous one), `season`, `refresh-interval` |
|
|
13
|
-
| `<hsot-standings>` | Standings, every conference for a sport | `sport`, `season` |
|
|
13
|
+
| `<hsot-standings>` | Standings, every conference for a sport | `sport`, `gender` (one side of a gendered sport), `season` |
|
|
14
14
|
| `<hsot-rankings>` | The weekly Top 25 with movement + rank history | `sport`, `gender` (poll family), `season`, deep link `?poll=YYYY-MM-DD` |
|
|
15
|
-
| `<hsot-school>` | School hub: hero, team tabs, schedule, roster (headed by the season's roster photo when one is set; positions render as a list, "WR/CB"; a College column appears when a player carries a commitment), honors | `school-id`, `sport` (initial tab, deep
|
|
15
|
+
| `<hsot-school>` | School hub: hero, team tabs, schedule, roster (headed by the season's roster photo when one is set; positions render as a list, "WR/CB"; a College column appears when a player carries a commitment), honors | `school-id`, `sport` + `gender` (initial tab, deep links `?sport=` / `?gender=`), `season` |
|
|
16
16
|
| `<hsot-boxscore>` | Game detail: line score (stored `periodScores`, or derived from the scoring plays when nothing wrote one — `src/lib/line-score.mjs`, shown only when it reconciles with the score), the desk's scoring-play log when a game carries one (period, clock, play, running score), coverage, season context; game notes keep their line breaks | `game-id`, `refresh-interval` |
|
|
17
17
|
| `<hsot-brackets>` | Playoff brackets: a sport's tournaments for the season, rounds as columns laid out from the winner edges (seedings place round one; `GET /tournaments/{id}/edges` is the tree), group tabs for split brackets (East / West / Championship), scores and the champion once played | `sport`, `season`, `tournament-id` (pin one; otherwise `?tournament=` or the bracket in play), `refresh-interval` |
|
|
18
18
|
| `<hsot-school-search>` | "Find Your School" typeahead for the right rail (standalone: fetches `GET /schools?q=` itself, no injected client) | `api`, `school-href`, `limit`, `placeholder` |
|
|
@@ -119,6 +119,33 @@ That logic is `src/lib/records.mjs` and `src/lib/polls.mjs`, unit-tested with
|
|
|
119
119
|
`node --test`. If api-hsot ever grows derived read endpoints, those two files
|
|
120
120
|
are what they replace.
|
|
121
121
|
|
|
122
|
+
## Sport is not gender
|
|
123
|
+
|
|
124
|
+
Most sports HSOT covers are **gendered**: soccer, basketball, lacrosse, cross
|
|
125
|
+
country, swimming, track and the rest field a boys and a girls team per
|
|
126
|
+
school. Both teams carry the same `sport` — the side is a separate `gender`
|
|
127
|
+
field on Team — and a Game carries no gender at all (it inherits one from the
|
|
128
|
+
teams playing it). So **scoping a view by sport alone merges the two halves of
|
|
129
|
+
the sport**, which is exactly what shipped: the standings table listed every
|
|
130
|
+
school twice, once for each side, sorted into one order.
|
|
131
|
+
|
|
132
|
+
Any view that stands for "the teams of a sport" therefore needs a gender too:
|
|
133
|
+
|
|
134
|
+
- `src/lib/teams.mjs` holds the rule — `teamsOfGender()` for the filter,
|
|
135
|
+
`splitsByGender()` for "does this sport have two sides". The family rule
|
|
136
|
+
matches the gendered polls: a side includes coed teams, and a team with no
|
|
137
|
+
gender belongs to no side.
|
|
138
|
+
- `<hsot-standings>` takes `gender`; the section sub-nav links
|
|
139
|
+
`/{sport}/{gender}/standings/` whenever the sport fields both, and an
|
|
140
|
+
un-pinned mount offers a Boys/Girls switch instead of merging.
|
|
141
|
+
- `<hsot-school>` selects its tab by **team id**, not sport: two of a school's
|
|
142
|
+
tabs answer to "soccer", and its conference-place tile counts only the
|
|
143
|
+
team's own side.
|
|
144
|
+
|
|
145
|
+
Records themselves are safe either way — `computeRecords()` keys off team ids,
|
|
146
|
+
and a team only appears in its own side's games — so the merge shows up in the
|
|
147
|
+
team **lists** a view builds, not in the numbers on a row.
|
|
148
|
+
|
|
122
149
|
## Development
|
|
123
150
|
|
|
124
151
|
Requires Node 18+.
|
package/dist/define.mjs
CHANGED