@sensiblestats/widget-react 0.165.1 → 0.165.3

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,19 @@
1
1
  # @sensiblestats/widget-react
2
2
 
3
+ ## 0.165.3
4
+
5
+ ### Patch Changes
6
+
7
+ - d97b383: A match log row and a matchday predictor game with no result show no letter, pill or grade.
8
+ - Updated dependencies [d97b383]
9
+ - @sensiblestats/widget-sdk@0.121.1
10
+
11
+ ## 0.165.2
12
+
13
+ ### Patch Changes
14
+
15
+ - Live facts: the price button's accessible name now starts with the market, so a bare chip such as "Lazio: No" or "Yes" is no longer read without its market.
16
+
3
17
  ## 0.165.1
4
18
 
5
19
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -246,7 +246,7 @@ var BUNDLED_EN_GB = {
246
246
  "widget.v8Paused": "No priced games in this sport right now. Stats and questions still work.",
247
247
  "widget.v8NoGamesToday": "No games today",
248
248
  "widget.v8Miss": "No combo comes near that total in these games.",
249
- "widget.v8Nearest": "No combo lands on that total in these games. This is the closest.",
249
+ "widget.v8Nearest": "We found no combo with this many legs at that total in these games. This one has a different total.",
250
250
  "widget.v8UseAllGames": "Use all games",
251
251
  "widget.v8BuilderShow": "Show me",
252
252
  "widget.v8BuilderIn": "in",
@@ -1422,7 +1422,7 @@ function parseCustomTotal(text2, format2) {
1422
1422
  }
1423
1423
 
1424
1424
  // src/version.generated.ts
1425
- var WIDGET_REACT_VERSION = "0.165.1";
1425
+ var WIDGET_REACT_VERSION = "0.165.3";
1426
1426
 
1427
1427
  // src/config.ts
1428
1428
  var COLOR_KEYS = ["accent", "cta", "surface", "ink"];
@@ -7516,7 +7516,7 @@ function Lead({ fact, match, ui, slip, sport, scope }) {
7516
7516
  slip,
7517
7517
  ui,
7518
7518
  fact: { id: fact.id, factKey: fact.factKey },
7519
- price: { ariaLabel: `${chipSelectionText(m)}, ${chipPrice}`, valueClass: "ss-w-fact-price" }
7519
+ price: { ariaLabel: `${m.marketLabel} \xB7 ${chipSelectionText(m)}, ${chipPrice}`, valueClass: "ss-w-fact-price" }
7520
7520
  }
7521
7521
  ) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "ss-w-fact-state", children: fact.marketState === "held" ? ui.liveFactHeld : ui.liveFactSuspended })
7522
7522
  ] }),
@@ -17920,13 +17920,14 @@ function MatchdayPredictorGame({
17920
17920
  ] });
17921
17921
  }
17922
17922
  const r = clientState.result;
17923
+ const finalScore = r.homeScore !== void 0 && r.awayScore !== void 0 ? { h: r.homeScore, a: r.awayScore } : null;
17923
17924
  return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
17924
17925
  header,
17925
17926
  /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "ss-g-body", children: [
17926
- config && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ScoreCard, { home: config.homeTeam, away: config.awayTeam, h: r.homeScore, a: r.awayScore, t }),
17927
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ResultCard, { tone: "neutral", title: t.fullTime(r.homeScore, r.awayScore), onBack, ui }),
17927
+ config && finalScore && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ScoreCard, { home: config.homeTeam, away: config.awayTeam, h: finalScore.h, a: finalScore.a, t }),
17928
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ResultCard, { tone: "neutral", title: finalScore ? t.fullTime(finalScore.h, finalScore.a) : t.outcome, onBack, ui }),
17928
17929
  /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("ul", { className: "ss-g-mp-rows", children: [
17929
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(OutcomeRow, { label: t.exactScore, ok: clientState.exactScoreCorrect, t }),
17930
+ clientState.exactScoreCorrect !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(OutcomeRow, { label: t.exactScore, ok: clientState.exactScoreCorrect, t }),
17930
17931
  /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(OutcomeRow, { label: t.outcome, ok: clientState.outcomeCorrect, t }),
17931
17932
  !clientState.firstScorerVoid && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(OutcomeRow, { label: t.firstScorerRow, ok: clientState.firstScorerCorrect, detail: r.firstScorerName, t })
17932
17933
  ] })
@@ -20170,7 +20171,9 @@ function MatchRow({ ui, row }) {
20170
20171
  row.yellowCards > 0 ? `${row.yellowCards}${ui.statHeadYellow}` : null,
20171
20172
  row.sentOff ? ui.statHeadRed : null
20172
20173
  ].filter((x) => x !== null);
20173
- const sub = [`${ui.resultLetter[row.result]} ${row.goalsFor}\u2013${row.goalsAgainst}`, `${row.minutes}\u2032`, ...extras].join(" \xB7 ");
20174
+ const letter = row.result == null ? null : ui.resultLetter[row.result];
20175
+ const score = `${row.goalsFor}\u2013${row.goalsAgainst}`;
20176
+ const sub = [letter === null ? score : `${letter} ${score}`, `${row.minutes}\u2032`, ...extras].join(" \xB7 ");
20174
20177
  const rating = typeof row.rating === "number" && Number.isFinite(row.rating) ? Math.round(row.rating * 10) / 10 : null;
20175
20178
  const pillTone = row.result === "W" ? "pos" : row.result === "L" ? "neg" : "draw";
20176
20179
  return /* @__PURE__ */ (0, import_jsx_runtime161.jsxs)("div", { className: "ss-w-pd-match", children: [
@@ -20179,7 +20182,7 @@ function MatchRow({ ui, row }) {
20179
20182
  /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("div", { className: "ss-w-pd-match-opp", children: ui.matchLogOpponent(row.opponentName, row.isHome) }),
20180
20183
  /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("div", { className: "ss-w-pd-match-sub", children: sub })
20181
20184
  ] }),
20182
- /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("div", { className: `ss-w-pd-pill ss-w-pd-pill--${pillTone}`, children: ui.resultLetter[row.result] }),
20185
+ letter !== null && /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("div", { className: `ss-w-pd-pill ss-w-pd-pill--${pillTone}`, children: letter }),
20183
20186
  rating === null ? /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("div", { className: "ss-w-pd-chip-empty" }) : /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("div", { className: `ss-w-pd-chip ss-w-pd-chip--${ratingTone(rating)}`, children: formatFixed(rating, ui.locale, 1) })
20184
20187
  ] });
20185
20188
  }