@sensiblestats/widget-react 0.31.1 → 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 +11 -0
- package/dist/index.cjs +29 -12
- 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 +29 -12
- package/dist/index.js.map +1 -1
- package/dist/styles.css +5 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
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
|
+
|
|
3
14
|
## 0.31.1
|
|
4
15
|
|
|
5
16
|
### Patch 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
|
|
|
@@ -3769,9 +3781,14 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
3769
3781
|
.ss-w-mk-ctx b { flex: none; white-space: nowrap; }
|
|
3770
3782
|
/* the context line's fixture name stays single-line (the two-line clamp is for the match card) */
|
|
3771
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; }
|
|
3772
3785
|
.ss-w-mk-ctx-right { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
|
|
3773
3786
|
/* flex:1 keeps the composer pinned to the panel bottom when a tab is empty */
|
|
3774
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); }
|
|
3775
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); }
|
|
3776
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); }
|
|
3777
3794
|
.ss-w-mon-oddspin[data-settled] .ss-w-mo-price,
|