@sensiblestats/widget-sdk 0.24.0 → 0.25.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 +51 -0
- package/dist/index.d.cts +20 -0
- package/dist/index.d.ts +20 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
# @sensiblestats/widget-sdk
|
|
2
2
|
|
|
3
|
+
## 0.25.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4eed68b: Fix the post-match "Match stats" card rendering each team's stats under the opposite team. The row values are club-first, but the card was always drawing the club value on the left while the result card above renders home-left/away-right — so when the club played away (e.g. Liverpool at Ipswich) the club's stats appeared under the home team. The card now orients by venue via a new `clubIsHome` field, matching the result card.
|
|
8
|
+
|
|
9
|
+
## 0.25.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- f3f845c: Auto-transition the club fan dashboard from preMatch to live without a reload.
|
|
14
|
+
|
|
15
|
+
Widget SDK: mirror the live dashboard's server contracts — `LiveScoreData` gains
|
|
16
|
+
`minute`/`clockRunning`/crest URLs, `LiveEventLine` gains a typed `minute`/`type`/`side`
|
|
17
|
+
(plus optional `player`/`playerOff`), `LiveStatRow` gains numeric `clubNum`/`oppNum`,
|
|
18
|
+
and `LiveStatsData` gains a typed `momentum: MomentumPoint[]` series plus a
|
|
19
|
+
`clubIsHome`/`homeName`/`awayName` venue signal (mirroring the existing `ClubIsHome`
|
|
20
|
+
pattern on `RestingNextData`/`PostMatchNextData`).
|
|
21
|
+
|
|
22
|
+
Widget React: adds a `useLiveClock` hook that ticks the displayed live minute forward
|
|
23
|
+
once per real minute between 60s polls, so the clock doesn't look frozen. The tick is
|
|
24
|
+
capped at minute+15 so a stuck `clockRunning:true` (no live→postMatch transition landed)
|
|
25
|
+
holds instead of climbing past stoppage time.
|
|
26
|
+
|
|
27
|
+
Widget React: redesigns the live score card — team crests (falling back to a coloured
|
|
28
|
+
initials chip when a crest URL is missing or fails to load), a pulsing Live pill wired
|
|
29
|
+
to the ticking clock, and a scorers line derived from the timeline's goal events.
|
|
30
|
+
Introduces the shared `--ss-w-home`/`--ss-w-away`/`--ss-w-track` colour tokens the
|
|
31
|
+
timeline and stats cards will also use.
|
|
32
|
+
|
|
33
|
+
Widget React: redesigns the live events timeline into a compact two-sided view — each
|
|
34
|
+
club's events sit on their own side of a centre spine, most-recent 3 shown with a "See
|
|
35
|
+
more" toggle for the rest. Goals get a bold name and an accented minute badge, yellow/red
|
|
36
|
+
cards get a coloured card mark, substitutions show both players, and unrecognised event
|
|
37
|
+
types fall back to a neutral dot instead of breaking.
|
|
38
|
+
|
|
39
|
+
Widget React: redesigns the live stats card — every row is now a home/away split bar
|
|
40
|
+
(guarded against a 0/0 stat, which renders an even split rather than a NaN width) plus
|
|
41
|
+
a new `MomentumWave` component that plots the per-minute momentum series as a filled
|
|
42
|
+
area wave with a dashed baseline and a "now" dot, falling back to the plain-text
|
|
43
|
+
momentum label when no series is available. Both the split bars and the wave now
|
|
44
|
+
colour by VENUE (`--ss-w-home`/`--ss-w-away`, keyed off the new `clubIsHome` field) so
|
|
45
|
+
the same team reads as the same colour across the score, timeline, and stats cards —
|
|
46
|
+
club-positive momentum fills with the club's own venue colour rather than always
|
|
47
|
+
painting the club as "home". The colour legend uses the real home/away team names.
|
|
48
|
+
|
|
49
|
+
Widget React: the 60s live poll now refreshes the dashboard's greeting/lead line
|
|
50
|
+
alongside its cards, so it no longer goes stale (e.g. reading "0–0" while the score
|
|
51
|
+
card already shows "0–2"). A poll response without a greeting leaves the existing
|
|
52
|
+
one in place rather than clearing it.
|
|
53
|
+
|
|
3
54
|
## 0.24.0
|
|
4
55
|
|
|
5
56
|
### Minor Changes
|
package/dist/index.d.cts
CHANGED
|
@@ -236,6 +236,7 @@ interface PostMatchStatRow {
|
|
|
236
236
|
}
|
|
237
237
|
interface PostMatchStatsData {
|
|
238
238
|
rows: PostMatchStatRow[];
|
|
239
|
+
clubIsHome: boolean;
|
|
239
240
|
}
|
|
240
241
|
interface PostMatchTopPerformerData {
|
|
241
242
|
playerName: string;
|
|
@@ -322,11 +323,20 @@ interface LiveScoreData {
|
|
|
322
323
|
competition?: string | null;
|
|
323
324
|
minuteLabel: string;
|
|
324
325
|
statusLabel: string;
|
|
326
|
+
minute: number;
|
|
327
|
+
clockRunning: boolean;
|
|
328
|
+
homeCrestUrl?: string | null;
|
|
329
|
+
awayCrestUrl?: string | null;
|
|
325
330
|
}
|
|
326
331
|
interface LiveEventLine {
|
|
327
332
|
minuteLabel: string;
|
|
328
333
|
text: string;
|
|
329
334
|
scoredByClub: boolean;
|
|
335
|
+
minute: number;
|
|
336
|
+
type: 'goal' | 'yellow' | 'red' | 'sub' | 'other';
|
|
337
|
+
side: 'home' | 'away';
|
|
338
|
+
player?: string | null;
|
|
339
|
+
playerOff?: string | null;
|
|
330
340
|
}
|
|
331
341
|
interface LiveTimelineData {
|
|
332
342
|
events: LiveEventLine[];
|
|
@@ -335,10 +345,20 @@ interface LiveStatRow {
|
|
|
335
345
|
label: string;
|
|
336
346
|
clubValue: string;
|
|
337
347
|
oppValue: string;
|
|
348
|
+
clubNum: number;
|
|
349
|
+
oppNum: number;
|
|
350
|
+
}
|
|
351
|
+
interface MomentumPoint {
|
|
352
|
+
minute: number;
|
|
353
|
+
value: number;
|
|
338
354
|
}
|
|
339
355
|
interface LiveStatsData {
|
|
340
356
|
rows: LiveStatRow[];
|
|
341
357
|
momentumLabel?: string | null;
|
|
358
|
+
momentum: MomentumPoint[];
|
|
359
|
+
clubIsHome: boolean;
|
|
360
|
+
homeName: string;
|
|
361
|
+
awayName: string;
|
|
342
362
|
}
|
|
343
363
|
interface LiveScoreCard extends ClubFanDashboardCardBase {
|
|
344
364
|
cardType: 'liveScore';
|
package/dist/index.d.ts
CHANGED
|
@@ -236,6 +236,7 @@ interface PostMatchStatRow {
|
|
|
236
236
|
}
|
|
237
237
|
interface PostMatchStatsData {
|
|
238
238
|
rows: PostMatchStatRow[];
|
|
239
|
+
clubIsHome: boolean;
|
|
239
240
|
}
|
|
240
241
|
interface PostMatchTopPerformerData {
|
|
241
242
|
playerName: string;
|
|
@@ -322,11 +323,20 @@ interface LiveScoreData {
|
|
|
322
323
|
competition?: string | null;
|
|
323
324
|
minuteLabel: string;
|
|
324
325
|
statusLabel: string;
|
|
326
|
+
minute: number;
|
|
327
|
+
clockRunning: boolean;
|
|
328
|
+
homeCrestUrl?: string | null;
|
|
329
|
+
awayCrestUrl?: string | null;
|
|
325
330
|
}
|
|
326
331
|
interface LiveEventLine {
|
|
327
332
|
minuteLabel: string;
|
|
328
333
|
text: string;
|
|
329
334
|
scoredByClub: boolean;
|
|
335
|
+
minute: number;
|
|
336
|
+
type: 'goal' | 'yellow' | 'red' | 'sub' | 'other';
|
|
337
|
+
side: 'home' | 'away';
|
|
338
|
+
player?: string | null;
|
|
339
|
+
playerOff?: string | null;
|
|
330
340
|
}
|
|
331
341
|
interface LiveTimelineData {
|
|
332
342
|
events: LiveEventLine[];
|
|
@@ -335,10 +345,20 @@ interface LiveStatRow {
|
|
|
335
345
|
label: string;
|
|
336
346
|
clubValue: string;
|
|
337
347
|
oppValue: string;
|
|
348
|
+
clubNum: number;
|
|
349
|
+
oppNum: number;
|
|
350
|
+
}
|
|
351
|
+
interface MomentumPoint {
|
|
352
|
+
minute: number;
|
|
353
|
+
value: number;
|
|
338
354
|
}
|
|
339
355
|
interface LiveStatsData {
|
|
340
356
|
rows: LiveStatRow[];
|
|
341
357
|
momentumLabel?: string | null;
|
|
358
|
+
momentum: MomentumPoint[];
|
|
359
|
+
clubIsHome: boolean;
|
|
360
|
+
homeName: string;
|
|
361
|
+
awayName: string;
|
|
342
362
|
}
|
|
343
363
|
interface LiveScoreCard extends ClubFanDashboardCardBase {
|
|
344
364
|
cardType: 'liveScore';
|