@sensiblestats/widget-react 0.48.4 → 0.48.6
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 +14 -0
- package/dist/index.cjs +9 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/styles.css +2 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @sensiblestats/widget-react
|
|
2
2
|
|
|
3
|
+
## 0.48.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Today tab: mirror the away team around the score — crest on the outer (right) edge, name right-aligned — so each fixture row reads symmetrically like a scoreboard. Applies to both the live band and the competition accordions.
|
|
8
|
+
|
|
9
|
+
## 0.48.5
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- A suspended selection no longer appears in the market-odds ladder. The wire row now carries isSuspended, so the client can drop prices the bookmaker is not taking instead of offering an Add to slip button that always fails.
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
- @sensiblestats/widget-sdk@0.35.1
|
|
16
|
+
|
|
3
17
|
## 0.48.4
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -609,11 +609,14 @@ function toMarketOddsVM(card) {
|
|
|
609
609
|
matchOddsId: typeof r.matchOddsId === "number" ? r.matchOddsId : void 0,
|
|
610
610
|
quotedAtUtc: str(r.quotedAtUtc),
|
|
611
611
|
isMain: r.isMainLine !== false,
|
|
612
|
+
// === true, not !== false: a server that has not shipped the field yet leaves it undefined,
|
|
613
|
+
// and undefined must read as open rather than hiding every price on the card.
|
|
614
|
+
isSuspended: r.isSuspended === true,
|
|
612
615
|
previousOdds: previous !== void 0 && direction !== void 0 ? previous.toFixed(2) : void 0,
|
|
613
616
|
movementDirection: previous !== void 0 && direction !== void 0 ? direction : void 0
|
|
614
617
|
};
|
|
615
618
|
};
|
|
616
|
-
const vms = rows.map(toRow).filter((r) => r.selection && r.odds);
|
|
619
|
+
const vms = rows.map(toRow).filter((r) => r.selection && r.odds && !r.isSuspended);
|
|
617
620
|
const home = str(card.homeTeamName);
|
|
618
621
|
const away = str(card.awayTeamName);
|
|
619
622
|
const updated = rows.map((r) => str(r.quotedAtUtc)).filter((v) => !!v).sort();
|
|
@@ -3733,8 +3736,8 @@ function kickoffLabel(kickoffUnix) {
|
|
|
3733
3736
|
const d = new Date(kickoffUnix * 1e3);
|
|
3734
3737
|
return `${`${d.getHours()}`.padStart(2, "0")}:${`${d.getMinutes()}`.padStart(2, "0")}`;
|
|
3735
3738
|
}
|
|
3736
|
-
function Side({ name, crest }) {
|
|
3737
|
-
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: "ss-w-drow-side", children: [
|
|
3739
|
+
function Side({ name, crest, away = false }) {
|
|
3740
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: away ? "ss-w-drow-side ss-w-drow-side--away" : "ss-w-drow-side", children: [
|
|
3738
3741
|
crest ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("img", { className: "ss-w-drow-crest", src: crest, alt: "" }) : null,
|
|
3739
3742
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "ss-w-drow-nm", children: name })
|
|
3740
3743
|
] });
|
|
@@ -3749,7 +3752,7 @@ function FixtureRow({ match, state, stale, ui, monitor }) {
|
|
|
3749
3752
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: "ss-w-drow-fx", children: [
|
|
3750
3753
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Side, { name: match.homeTeamName, crest: match.homeTeamImagePath }),
|
|
3751
3754
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: hasScore ? "ss-w-drow-sc" : "ss-w-drow-sc ss-w-drow-sc--idle", children: hasScore ? `${state.homeScore}\u2013${state.awayScore}` : "\u2013" }),
|
|
3752
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Side, { name: match.awayTeamName, crest: match.awayTeamImagePath })
|
|
3755
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Side, { name: match.awayTeamName, crest: match.awayTeamImagePath, away: true })
|
|
3753
3756
|
] }),
|
|
3754
3757
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PinToggle, { ui, monitor, pin: { kind: "match", matchId: match.matchId } })
|
|
3755
3758
|
] });
|
|
@@ -4759,6 +4762,8 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
4759
4762
|
which is the u350 betting-card truncation one layer down. */
|
|
4760
4763
|
.ss-w-drow-fx { display: flex; align-items: center; gap: 6px; min-width: 0; }
|
|
4761
4764
|
.ss-w-drow-side { display: flex; align-items: center; gap: 5px; min-width: 0; flex: 1 1 0; }
|
|
4765
|
+
/* Away side mirrors home around the score: crest to the far edge, name aligned inward. */
|
|
4766
|
+
.ss-w-drow-side--away { flex-direction: row-reverse; text-align: right; }
|
|
4762
4767
|
.ss-w-drow-nm { font-size: 12.5px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
4763
4768
|
/* Centre slot of .ss-w-drow-fx, between the two sides: flex:none so a widening score never
|
|
4764
4769
|
steals width the team names need to avoid ellipsis. min-width holds the slot at the width of a
|