@sensiblestats/widget-react 0.43.0 → 0.43.1
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 +7 -3
- 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 +7 -3
- package/dist/index.js.map +1 -1
- package/dist/styles.css +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @sensiblestats/widget-react
|
|
2
2
|
|
|
3
|
+
## 0.43.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Don't offer a tap on a suspended accordion market. Its card is unservable — the odds lookup drops every suspended/stopped row, so the detail request answers 404 and the panel lands on a tap-to-retry that can never succeed. The row stays listed and labelled; it just isn't expandable, and a market that suspends while open now collapses instead of leaving stale rows up.
|
|
8
|
+
|
|
3
9
|
## 0.43.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -3204,7 +3204,7 @@ function MarketAccordion({ match, monitor, ui, slip }) {
|
|
|
3204
3204
|
if (markets.length === 0) return null;
|
|
3205
3205
|
const open = monitor.openMarket[match.matchId] ?? null;
|
|
3206
3206
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "ss-w-acc", children: markets.map((m) => {
|
|
3207
|
-
const isOpen = open === m.marketDeveloperName;
|
|
3207
|
+
const isOpen = open === m.marketDeveloperName && !m.suspended;
|
|
3208
3208
|
const key = `${match.matchId}:${m.marketDeveloperName}`;
|
|
3209
3209
|
const entry = monitor.marketOdds[key];
|
|
3210
3210
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: isOpen ? "ss-w-acc-row ss-w-acc-row-open" : "ss-w-acc-row", children: [
|
|
@@ -3213,11 +3213,12 @@ function MarketAccordion({ match, monitor, ui, slip }) {
|
|
|
3213
3213
|
"button",
|
|
3214
3214
|
{
|
|
3215
3215
|
type: "button",
|
|
3216
|
-
className: "ss-w-acc-toggle",
|
|
3216
|
+
className: m.suspended ? "ss-w-acc-toggle ss-w-acc-toggle--susp" : "ss-w-acc-toggle",
|
|
3217
3217
|
"aria-expanded": isOpen,
|
|
3218
|
+
disabled: m.suspended,
|
|
3218
3219
|
onClick: () => monitor.toggleMarket(match.matchId, m.marketDeveloperName),
|
|
3219
3220
|
children: [
|
|
3220
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "ss-w-acc-chevron", children: isOpen ? "\u25BE" : "\u25B8" }),
|
|
3221
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "ss-w-acc-chevron", children: m.suspended ? "" : isOpen ? "\u25BE" : "\u25B8" }),
|
|
3221
3222
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "ss-w-acc-label", children: m.marketLabel }),
|
|
3222
3223
|
m.hasInsight && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "ss-w-acc-badge", children: "\u2605" }),
|
|
3223
3224
|
m.suspended && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "ss-w-acc-susp", children: ui.accordionSuspended })
|
|
@@ -4324,6 +4325,9 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
4324
4325
|
/* Row header: expand toggle (flex:1) + the market PinToggle as a sibling (no nested buttons). */
|
|
4325
4326
|
.ss-w-acc-head { display: flex; align-items: center; gap: 8px; padding: 6px 9px 6px 11px; }
|
|
4326
4327
|
.ss-w-acc-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; background: none; border: none; cursor: pointer; text-align: left; font: inherit; color: var(--ss-w-ink); padding: 5px 0; }
|
|
4328
|
+
/* Suspended: the row stays listed (knowing a market is off is useful) but is not tappable --
|
|
4329
|
+
its card is unservable, so a pointer cursor would promise something that cannot load. */
|
|
4330
|
+
.ss-w-acc-toggle--susp { cursor: default; color: var(--ss-w-faint); }
|
|
4327
4331
|
.ss-w-acc-chevron { color: var(--ss-w-faint); font-size: 11px; flex: none; }
|
|
4328
4332
|
.ss-w-acc-label { font-size: 12.5px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
4329
4333
|
.ss-w-acc-badge { font-size: 10.5px; font-weight: 700; color: var(--ss-w-accent); flex: none; }
|