@sensiblestats/widget-react 0.95.1 → 0.96.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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @sensiblestats/widget-react
2
2
 
3
+ ## 0.96.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5cf2439: The NBA card on the Following tab shows player props while the game is live, from in-game prices only; a pre-tip bundle still held after the tip is never shown as live.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [5cf2439]
12
+ - @sensiblestats/widget-sdk@0.65.0
13
+
3
14
  ## 0.95.1
4
15
 
5
16
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1137,7 +1137,7 @@ function isEnglishLocale(locale) {
1137
1137
  }
1138
1138
 
1139
1139
  // src/version.generated.ts
1140
- var WIDGET_REACT_VERSION = "0.95.1";
1140
+ var WIDGET_REACT_VERSION = "0.96.0";
1141
1141
 
1142
1142
  // src/config.ts
1143
1143
  function normalizeUi(cfg) {
@@ -7582,18 +7582,20 @@ function Roster({ bundle, players, side, ui, slip }) {
7582
7582
  function NbaPropsSection({ match, monitor, ui, slip }) {
7583
7583
  const [side, setSide] = (0, import_react46.useState)("home");
7584
7584
  const [, setTick] = (0, import_react46.useState)(0);
7585
- const open = preTip(match);
7585
+ const pre = preTip(match);
7586
+ const live = match.phase === "live";
7587
+ const open = pre || live;
7586
7588
  (0, import_react46.useEffect)(() => {
7587
7589
  if (open) monitor.loadPlayerProps?.(match.matchId);
7588
7590
  }, [match.matchId, match.asOfUtc, open]);
7589
7591
  (0, import_react46.useEffect)(() => {
7590
- if (!open || !match.kickoffUtc) return;
7592
+ if (!pre || !match.kickoffUtc) return;
7591
7593
  const wait = Math.min(Math.max(Date.parse(match.kickoffUtc) - Date.now(), 0), MAX_TIMER_MS);
7592
7594
  const id = setTimeout(() => setTick((t) => t + 1), wait);
7593
7595
  return () => clearTimeout(id);
7594
- }, [open, match.kickoffUtc]);
7596
+ }, [pre, match.kickoffUtc]);
7595
7597
  const bundle = monitor.playerProps?.[match.matchId]?.bundle;
7596
- if (!open || !bundle || bundle.players.length === 0) return null;
7598
+ if (!open || !bundle || bundle.players.length === 0 || (bundle.live ?? false) !== live) return null;
7597
7599
  const bySide = (s) => bundle.players.filter((p) => p.side === s);
7598
7600
  const other = side === "home" ? "away" : "home";
7599
7601
  const shown = bySide(side).length > 0 ? side : other;