@wral/hsot-data 0.1.5 → 0.1.7

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 CHANGED
@@ -9,13 +9,19 @@ exactly one of these elements.
9
9
 
10
10
  | Component | Page | Key attributes |
11
11
  |---|---|---|
12
- | `<hsot-scores>` | Scores/Schedules (the scoreboard; future dates are schedules) | `sport`, `date` (YYYY-MM-DD, default today, deep-linkable via `?date=`), `season`, `refresh-interval` |
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
13
  | `<hsot-standings>` | Standings, every conference for a sport | `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
15
  | `<hsot-school>` | School hub: hero, team tabs, schedule, roster, honors | `school-id`, `sport` (initial tab, deep link `?sport=`), `season` |
16
16
  | `<hsot-boxscore>` | Game detail: line score, coverage, season context | `game-id`, `refresh-interval` |
17
+ | `<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` |
17
18
 
18
- Shared attributes on every component:
19
+ `hsot-scores` lists live games first, then matchups featuring ranked teams
20
+ (#1 at the top, using the poll in effect on the game date), then the rest in
21
+ schedule order.
22
+
23
+ Shared attributes on every data component (`hsot-school-search` takes only
24
+ `api` and `school-href`):
19
25
 
20
26
  - `api` — base URL of the api-hsot **public read surface** (tokenless):
21
27
  `https://api.highschoolot.com/hsot/v1/public`.
@@ -28,6 +34,9 @@ Shared attributes on every component:
28
34
  `/{sport}/{view}/`. The site's URL space belongs to Studio publications, so
29
35
  these are overridable per mount.
30
36
  - `refresh-interval` — milliseconds between reloads (live surfaces). 0 = off.
37
+ - `promo-image`, `promo-href`, `promo-alt` — a sponsor banner across the top
38
+ of the view content. The image is required; without an href it renders
39
+ unlinked. Links open in a new tab with `rel="sponsored noopener"`.
31
40
 
32
41
  ## The section band
33
42
 
@@ -56,6 +65,25 @@ takes; `aria-current="page"` is kept in sync from the URL either way:
56
65
  </hsot-scores>
57
66
  ```
58
67
 
68
+ ## The right rail
69
+
70
+ Every data component accepts light-DOM children with `slot="rail"`. When any
71
+ are present the view content and the rail share a divided two-column layout
72
+ (300px rail at 1200px and up; stacked beneath the content below that). The
73
+ data-page template supplies the rail units — promo, school search, ad slots —
74
+ so the components never know what lives there:
75
+
76
+ ```html
77
+ <hsot-standings sport="football" api="…"
78
+ promo-image="https://…/sponsor.png" promo-href="https://sponsor.example" promo-alt="Presented by …">
79
+ <div slot="rail">
80
+ <hsot-school-search api="…" school-href="/school/{id}/"></hsot-school-search>
81
+ </div>
82
+ </hsot-standings>
83
+ ```
84
+
85
+ Without slotted rail content the view renders full width, unchanged.
86
+
59
87
  ## Derivation lives here, for now
60
88
 
61
89
  Standings, records, streaks and rank badges are **derived client-side** from
@@ -111,7 +139,7 @@ alias (`/hsot-data/v0/`) rather than `latest`.
111
139
  From an app:
112
140
 
113
141
  ```js
114
- import '@wral/hsot-data/define'; // defines all five elements
142
+ import '@wral/hsot-data/define'; // defines all six elements
115
143
  // or
116
144
  import { HsotStandings } from '@wral/hsot-data';
117
145
  ```
package/dist/define.mjs CHANGED
@@ -1,18 +1,19 @@
1
- import { H as e, b as n, a as c, d as i, c as a } from "./hsot-boxscore-B_yZEV8T.js";
1
+ import { c as e, H as n, b as c, a, e as i, d as h } from "./hsot-school-search-31NEMjUb.js";
2
2
  const r = {
3
- "hsot-scores": a,
3
+ "hsot-scores": h,
4
4
  "hsot-standings": i,
5
- "hsot-rankings": c,
6
- "hsot-school": n,
7
- "hsot-boxscore": e
5
+ "hsot-rankings": a,
6
+ "hsot-school": c,
7
+ "hsot-boxscore": n,
8
+ "hsot-school-search": e
8
9
  };
9
- function f() {
10
+ function l() {
10
11
  const s = globalThis?.customElements;
11
12
  if (s)
12
13
  for (const [o, t] of Object.entries(r))
13
14
  s.get(o) || s.define(o, t);
14
15
  }
15
- typeof window < "u" && globalThis.customElements && f();
16
+ typeof window < "u" && globalThis.customElements && l();
16
17
  export {
17
- f as defineAll
18
+ l as defineAll
18
19
  };