@sensiblestats/widget-react 0.95.1 → 0.97.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,22 @@
1
1
  # @sensiblestats/widget-react
2
2
 
3
+ ## 0.97.0
4
+
5
+ ### Minor Changes
6
+
7
+ - NBA greeting tiles draw a 🏀 glyph. The widget declares the `basketball_icon` capability, so the server sends `basketball` only to widgets that can draw it.
8
+
9
+ ## 0.96.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 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.
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [5cf2439]
18
+ - @sensiblestats/widget-sdk@0.65.0
19
+
3
20
  ## 0.95.1
4
21
 
5
22
  ### 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.97.0";
1141
1141
 
1142
1142
  // src/config.ts
1143
1143
  function normalizeUi(cfg) {
@@ -2719,7 +2719,7 @@ function clearConversation(storageKey) {
2719
2719
  }
2720
2720
 
2721
2721
  // src/presets.ts
2722
- var CLIENT_CAPABILITIES = ["price_presets", "price_presets_open", "limit_notice", "nba_insight", "nba_insight_v2"];
2722
+ var CLIENT_CAPABILITIES = ["price_presets", "price_presets_open", "limit_notice", "nba_insight", "nba_insight_v2", "basketball_icon"];
2723
2723
  var PRICE_TILE_PREFIX = "goal-preset-";
2724
2724
  function isPriceTile(tile) {
2725
2725
  const id = tile.signal?.entityId;
@@ -4324,7 +4324,8 @@ var DASHBOARD_EMOJI = {
4324
4324
  "chart-bar": "\u{1F4CA}",
4325
4325
  chat: "\u{1F4AC}",
4326
4326
  fire: "\u{1F525}",
4327
- sparkle: "\u2728"
4327
+ sparkle: "\u2728",
4328
+ basketball: "\u{1F3C0}"
4328
4329
  };
4329
4330
  function DashboardIcon({ name }) {
4330
4331
  const glyph = Object.prototype.hasOwnProperty.call(DASHBOARD_EMOJI, name) ? DASHBOARD_EMOJI[name] : DASHBOARD_EMOJI.target;
@@ -7582,18 +7583,20 @@ function Roster({ bundle, players, side, ui, slip }) {
7582
7583
  function NbaPropsSection({ match, monitor, ui, slip }) {
7583
7584
  const [side, setSide] = (0, import_react46.useState)("home");
7584
7585
  const [, setTick] = (0, import_react46.useState)(0);
7585
- const open = preTip(match);
7586
+ const pre = preTip(match);
7587
+ const live = match.phase === "live";
7588
+ const open = pre || live;
7586
7589
  (0, import_react46.useEffect)(() => {
7587
7590
  if (open) monitor.loadPlayerProps?.(match.matchId);
7588
7591
  }, [match.matchId, match.asOfUtc, open]);
7589
7592
  (0, import_react46.useEffect)(() => {
7590
- if (!open || !match.kickoffUtc) return;
7593
+ if (!pre || !match.kickoffUtc) return;
7591
7594
  const wait = Math.min(Math.max(Date.parse(match.kickoffUtc) - Date.now(), 0), MAX_TIMER_MS);
7592
7595
  const id = setTimeout(() => setTick((t) => t + 1), wait);
7593
7596
  return () => clearTimeout(id);
7594
- }, [open, match.kickoffUtc]);
7597
+ }, [pre, match.kickoffUtc]);
7595
7598
  const bundle = monitor.playerProps?.[match.matchId]?.bundle;
7596
- if (!open || !bundle || bundle.players.length === 0) return null;
7599
+ if (!open || !bundle || bundle.players.length === 0 || (bundle.live ?? false) !== live) return null;
7597
7600
  const bySide = (s) => bundle.players.filter((p) => p.side === s);
7598
7601
  const other = side === "home" ? "away" : "home";
7599
7602
  const shown = bySide(side).length > 0 ? side : other;