@sensiblestats/widget-react 0.47.2 → 0.48.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 +6 -0
- package/dist/index.cjs +15 -7
- 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 +15 -7
- package/dist/index.js.map +1 -1
- package/dist/styles.css +6 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @sensiblestats/widget-react
|
|
2
2
|
|
|
3
|
+
## 0.48.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Today-tab fixture rows now read like a scoreboard: the score sits between the two teams instead of after them, a finished match shows FT (MS in Turkish) in place of its kickoff time, and a finished match no longer offers a pin unless it is already pinned.
|
|
8
|
+
|
|
3
9
|
## 0.47.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -129,6 +129,7 @@ var STRINGS = {
|
|
|
129
129
|
tabToday: "Today",
|
|
130
130
|
sectionLive: "Live",
|
|
131
131
|
halfTime: "HT",
|
|
132
|
+
fullTime: "FT",
|
|
132
133
|
staleStates: "Live scores can't be updated \u2014 showing the last known state."
|
|
133
134
|
},
|
|
134
135
|
tr: {
|
|
@@ -207,6 +208,7 @@ var STRINGS = {
|
|
|
207
208
|
tabToday: "Bug\xFCn",
|
|
208
209
|
sectionLive: "Canl\u0131",
|
|
209
210
|
halfTime: "\u0130Y",
|
|
211
|
+
fullTime: "MS",
|
|
210
212
|
staleStates: "Canl\u0131 skorlar g\xFCncellenemiyor \u2014 son bilinen durum g\xF6steriliyor."
|
|
211
213
|
}
|
|
212
214
|
};
|
|
@@ -286,6 +288,7 @@ function normalizeUi(cfg) {
|
|
|
286
288
|
tabToday: strings.tabToday,
|
|
287
289
|
sectionLive: strings.sectionLive,
|
|
288
290
|
halfTime: strings.halfTime,
|
|
291
|
+
fullTime: strings.fullTime,
|
|
289
292
|
staleStates: strings.staleStates,
|
|
290
293
|
pinLabel: strings.pinLabel,
|
|
291
294
|
unpinLabel: strings.unpinLabel,
|
|
@@ -3784,16 +3787,18 @@ function FixtureRow({ match, state, stale, nowMs, ui, monitor }) {
|
|
|
3784
3787
|
const isLive = state?.phase === "live" && !stale && !readingStale;
|
|
3785
3788
|
const hasScore = (state?.phase === "live" || state?.phase === "fullTime") && typeof state.homeScore === "number" && typeof state.awayScore === "number";
|
|
3786
3789
|
const ticked = displayMinute(state, nowMs);
|
|
3787
|
-
const
|
|
3790
|
+
const isFinished = state?.phase === "fullTime";
|
|
3791
|
+
const when = state?.isHalfTime && !stale ? ui.halfTime : isLive ? ticked ?? "\u2014" : state?.phase === "live" ? "\u2014" : isFinished ? ui.fullTime : kickoffLabel(match.kickoffUnix);
|
|
3792
|
+
const pin = { kind: "match", matchId: match.matchId };
|
|
3793
|
+
const showPin = !isFinished || monitor.isPinned(pinKey(pin));
|
|
3788
3794
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: isLive || state?.isHalfTime ? "ss-w-drow ss-w-drow--live" : "ss-w-drow", children: [
|
|
3789
3795
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: isLive || state?.isHalfTime ? "ss-w-drow-when ss-w-drow-when--live" : "ss-w-drow-when", children: when }),
|
|
3790
3796
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: "ss-w-drow-fx", children: [
|
|
3791
3797
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Side, { name: match.homeTeamName, crest: match.homeTeamImagePath }),
|
|
3792
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "ss-w-drow-
|
|
3798
|
+
/* @__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" }),
|
|
3793
3799
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Side, { name: match.awayTeamName, crest: match.awayTeamImagePath })
|
|
3794
3800
|
] }),
|
|
3795
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3796
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PinToggle, { ui, monitor, pin: { kind: "match", matchId: match.matchId } })
|
|
3801
|
+
showPin ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PinToggle, { ui, monitor, pin }) : null
|
|
3797
3802
|
] });
|
|
3798
3803
|
}
|
|
3799
3804
|
|
|
@@ -4786,7 +4791,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
4786
4791
|
.ss-w-grp-count { margin-left: auto; flex: none; font-size: 10.5px; font-weight: 700; color: var(--ss-w-faint); background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 999px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
|
|
4787
4792
|
.ss-w-grp-body { display: flex; flex-direction: column; padding: 2px 11px 6px; }
|
|
4788
4793
|
|
|
4789
|
-
.ss-w-drow { display: grid; grid-template-columns: 42px minmax(0,1fr)
|
|
4794
|
+
.ss-w-drow { display: grid; grid-template-columns: 42px minmax(0,1fr) 22px; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--ss-w-line); }
|
|
4790
4795
|
.ss-w-drow:last-child { border-bottom: none; }
|
|
4791
4796
|
.ss-w-drow-when { font-size: 11px; font-weight: 700; color: var(--ss-w-faint); font-variant-numeric: tabular-nums; }
|
|
4792
4797
|
.ss-w-drow-when--live { color: var(--ss-w-neg); }
|
|
@@ -4795,8 +4800,11 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
4795
4800
|
.ss-w-drow-fx { display: flex; align-items: center; gap: 6px; min-width: 0; }
|
|
4796
4801
|
.ss-w-drow-side { display: flex; align-items: center; gap: 5px; min-width: 0; flex: 1 1 0; }
|
|
4797
4802
|
.ss-w-drow-nm { font-size: 12.5px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
4798
|
-
.ss-w-drow-
|
|
4799
|
-
|
|
4803
|
+
/* Centre slot of .ss-w-drow-fx, between the two sides: flex:none so a widening score never
|
|
4804
|
+
steals width the team names need to avoid ellipsis. min-width holds the slot at the width of a
|
|
4805
|
+
one-digit scoreline so an unscored row's bare dash does not pull the column out of line -- the
|
|
4806
|
+
scores read as a column down the list, not a jitter. */
|
|
4807
|
+
.ss-w-drow-sc { flex: none; min-width: 26px; text-align: center; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ss-w-ink); }
|
|
4800
4808
|
.ss-w-drow-sc--idle { color: var(--ss-w-faint); font-weight: 600; }
|
|
4801
4809
|
.ss-w-drow--live { background: color-mix(in srgb, var(--ss-w-neg) 5%, transparent); border-radius: 8px; padding: 7px 6px; margin: 0 -6px; border-bottom: none; }
|
|
4802
4810
|
.ss-w-drow-crest { width: 16px; height: 16px; flex: none; border-radius: 50%; object-fit: contain; background: var(--ss-w-bubble); }
|