@sensiblestats/widget-react 0.31.0 → 0.32.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 +17 -0
- package/dist/index.cjs +36 -14
- 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 +36 -14
- package/dist/index.js.map +1 -1
- package/dist/styles.css +12 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @sensiblestats/widget-react
|
|
2
2
|
|
|
3
|
+
## 0.32.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Crest images on market-odds cards and restructured Odds-tab context line with pre-match kickoff pill layout.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @sensiblestats/widget-sdk@0.28.0
|
|
13
|
+
|
|
14
|
+
## 0.31.1
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Live monitor fixes from oleycom live testing: hide the score on not-started matches (Odds-tab context line phase guard), wrap long club names to two lines on the match card instead of truncating, and keep the context-line score/badges from wrapping on narrow screens.
|
|
19
|
+
|
|
3
20
|
## 0.31.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -118,7 +118,8 @@ var STRINGS = {
|
|
|
118
118
|
graceNote: "Unpins on next open \xB7 or in 4 h",
|
|
119
119
|
suspendedLabel: "Suspended",
|
|
120
120
|
fullTimeLabel: "Full time",
|
|
121
|
-
inSlipLabel: "In slip"
|
|
121
|
+
inSlipLabel: "In slip",
|
|
122
|
+
oddsUnavailable: "Odds unavailable right now"
|
|
122
123
|
},
|
|
123
124
|
tr: {
|
|
124
125
|
launcherLabel: "SensibleStats ile sohbet et",
|
|
@@ -185,7 +186,8 @@ var STRINGS = {
|
|
|
185
186
|
graceNote: "Bir sonraki a\xE7\u0131l\u0131\u015Fta kald\u0131r\u0131l\u0131r \xB7 en ge\xE7 4 saat",
|
|
186
187
|
suspendedLabel: "Ask\u0131da",
|
|
187
188
|
fullTimeLabel: "Ma\xE7 sonu",
|
|
188
|
-
inSlipLabel: "Kuponda"
|
|
189
|
+
inSlipLabel: "Kuponda",
|
|
190
|
+
oddsUnavailable: "Oranlar \u015Fu anda kullan\u0131lam\u0131yor"
|
|
189
191
|
}
|
|
190
192
|
};
|
|
191
193
|
function resolveLocaleStrings(locale) {
|
|
@@ -265,7 +267,8 @@ function normalizeUi(cfg) {
|
|
|
265
267
|
graceNote: strings.graceNote,
|
|
266
268
|
suspendedLabel: strings.suspendedLabel,
|
|
267
269
|
fullTimeLabel: strings.fullTimeLabel,
|
|
268
|
-
inSlipLabel: strings.inSlipLabel
|
|
270
|
+
inSlipLabel: strings.inSlipLabel,
|
|
271
|
+
oddsUnavailable: strings.oddsUnavailable
|
|
269
272
|
};
|
|
270
273
|
}
|
|
271
274
|
function toClientOptions(cfg) {
|
|
@@ -448,7 +451,9 @@ function chipFromText(text) {
|
|
|
448
451
|
}
|
|
449
452
|
function toInsightVM(insight) {
|
|
450
453
|
const market = str(insight.marketLabel) ?? str(insight.marketDeveloperName) ?? "";
|
|
451
|
-
const
|
|
454
|
+
const selectionLabel = str(insight.selectionLabel);
|
|
455
|
+
const selectionLine = str(insight.line);
|
|
456
|
+
const selection = (selectionLabel && selectionLine && selectionLabel.includes(selectionLine) ? selectionLabel : [selectionLabel, selectionLine].filter(Boolean).join(" ")) || void 0;
|
|
452
457
|
const value = insight.odds?.value;
|
|
453
458
|
const odds = typeof value === "number" && Number.isFinite(value) ? value.toFixed(2) : void 0;
|
|
454
459
|
const oddsValue = insight.odds?.value;
|
|
@@ -2917,18 +2922,24 @@ function MonitorMatchCard({ match, promotedPins, monitor, ui, slip }) {
|
|
|
2917
2922
|
// src/components/MonitorTabs.tsx
|
|
2918
2923
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2919
2924
|
function ContextLine({ m, monitor, ui }) {
|
|
2925
|
+
const kick = m.kickoffUtc ? ui.bettingKickoff(m.kickoffUtc) : void 0;
|
|
2920
2926
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "ss-w-mk-ctx", children: [
|
|
2921
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.
|
|
2922
|
-
|
|
2927
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "ss-w-mk-ctx-side", children: [
|
|
2928
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Crest2, { kind: "team", url: m.homeCrestUrl ?? void 0, name: m.homeTeamName ?? void 0 }),
|
|
2929
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "ss-w-mon-name", children: m.homeTeamName })
|
|
2930
|
+
] }),
|
|
2931
|
+
m.phase === "preMatch" ? kick && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "ss-w-mon-pill", children: [
|
|
2932
|
+
kick.dayLabel,
|
|
2933
|
+
" ",
|
|
2934
|
+
kick.time
|
|
2935
|
+
] }) : typeof m.homeScore === "number" && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("b", { children: [
|
|
2923
2936
|
m.homeScore,
|
|
2924
2937
|
"\u2013",
|
|
2925
2938
|
m.awayScore
|
|
2926
2939
|
] }),
|
|
2927
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.
|
|
2928
|
-
|
|
2929
|
-
m.
|
|
2930
|
-
" v ",
|
|
2931
|
-
m.awayTeamName
|
|
2940
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "ss-w-mk-ctx-side", children: [
|
|
2941
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "ss-w-mon-name", children: m.awayTeamName }),
|
|
2942
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Crest2, { kind: "team", url: m.awayCrestUrl ?? void 0, name: m.awayTeamName ?? void 0 })
|
|
2932
2943
|
] }),
|
|
2933
2944
|
m.minuteLabel && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "ss-w-mon-min", children: m.minuteLabel }),
|
|
2934
2945
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "ss-w-mk-ctx-right", children: [
|
|
@@ -2981,7 +2992,8 @@ function OddsPanel({ monitor, ui, slip }) {
|
|
|
2981
2992
|
inSlipIds: monitor.inSlip
|
|
2982
2993
|
}
|
|
2983
2994
|
),
|
|
2984
|
-
m.history && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(OddsMovementCardList, { cards: [toOddsMovementVM(m.history)], ui })
|
|
2995
|
+
m.history && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(OddsMovementCardList, { cards: [toOddsMovementVM(m.history)], ui }),
|
|
2996
|
+
!m.card && !m.history && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "ss-w-mon-empty-card", children: ui.oddsUnavailable })
|
|
2985
2997
|
] }, m.key)) });
|
|
2986
2998
|
}
|
|
2987
2999
|
|
|
@@ -3735,7 +3747,8 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
3735
3747
|
.ss-w-mon-main { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
|
|
3736
3748
|
.ss-w-mon-side { display: flex; align-items: center; gap: 8px; min-width: 0; }
|
|
3737
3749
|
.ss-w-mon-side--away { flex-direction: row-reverse; text-align: right; }
|
|
3738
|
-
|
|
3750
|
+
/* long club names (Wolverhampton Wanderers) wrap to two lines instead of truncating mid-word */
|
|
3751
|
+
.ss-w-mon-name { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; font-size: 13px; font-weight: 700; color: var(--ss-w-ink); }
|
|
3739
3752
|
.ss-w-mon-vs { font-size: 12px; font-weight: 700; color: var(--ss-w-faint); text-transform: uppercase; }
|
|
3740
3753
|
.ss-w-mon-score { display: flex; align-items: baseline; justify-content: center; font-size: 26px; font-weight: 850; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; color: var(--ss-w-ink); }
|
|
3741
3754
|
.ss-w-mon-score i { font-style: normal; color: var(--ss-w-faint); font-weight: 500; margin: 0 4px; }
|
|
@@ -3764,9 +3777,18 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
3764
3777
|
and the per-market-pin wrapper card (struck price on settlement is a pure CSS hook off its
|
|
3765
3778
|
[data-settled] attribute -- no separate class on the price element itself). */
|
|
3766
3779
|
.ss-w-mk-ctx { display: flex; align-items: center; gap: 6px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--ss-w-line); }
|
|
3767
|
-
|
|
3780
|
+
/* the score and the trailing badges/pin never shrink or wrap -- only the fixture name truncates */
|
|
3781
|
+
.ss-w-mk-ctx b { flex: none; white-space: nowrap; }
|
|
3782
|
+
/* the context line's fixture name stays single-line (the two-line clamp is for the match card) */
|
|
3783
|
+
.ss-w-mk-ctx .ss-w-mon-name { display: block; white-space: nowrap; text-overflow: ellipsis; }
|
|
3784
|
+
.ss-w-mk-ctx-side { display: flex; align-items: center; gap: 6px; min-width: 0; }
|
|
3785
|
+
.ss-w-mk-ctx-right { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
|
|
3768
3786
|
/* flex:1 keeps the composer pinned to the panel bottom when a tab is empty */
|
|
3769
3787
|
.ss-w-mon-empty { flex: 1; padding: 24px 16px; text-align: center; font-size: 12.5px; color: var(--ss-w-faint); }
|
|
3788
|
+
/* Per-pin unavailable state: the pin's context line still rendered above (score, name, unpin), but
|
|
3789
|
+
the pin has neither a card nor history (compose-time rescue failed) -- a small inline note beats
|
|
3790
|
+
a bare context line with nothing under it. */
|
|
3791
|
+
.ss-w-mon-empty-card { padding: 8px 0 2px; font-size: 12px; color: var(--ss-w-faint); }
|
|
3770
3792
|
.ss-w-mon-inslip { display: inline-flex; flex: none; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; color: var(--ss-w-pos); }
|
|
3771
3793
|
.ss-w-mon-oddspin { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--ss-w-line); border-radius: 12px; background: var(--ss-w-panel); }
|
|
3772
3794
|
.ss-w-mon-oddspin[data-settled] .ss-w-mo-price,
|