@sensiblestats/widget-react 0.37.1 → 0.37.2

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @sensiblestats/widget-react
2
2
 
3
+ ## 0.37.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Match odds accordion: add a per-row market pin. Each accordion market row now shows the PinToggle on the right of its header (visible collapsed or expanded); tapping pins that market ({kind:'market', matchId, marketDeveloperName}) to the Odds tab, mirroring the pin on chat betting cards. The row header splits into an expand button + the pin button so the two actions stay independent.
8
+
3
9
  ## 0.37.1
4
10
 
5
11
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -2980,20 +2980,31 @@ function MarketAccordion({ match, monitor, ui, slip }) {
2980
2980
  const key = `${match.matchId}:${m.marketDeveloperName}`;
2981
2981
  const entry = monitor.marketOdds[key];
2982
2982
  return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: isOpen ? "ss-w-acc-row ss-w-acc-row-open" : "ss-w-acc-row", children: [
2983
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
2984
- "button",
2985
- {
2986
- type: "button",
2987
- className: "ss-w-acc-head",
2988
- onClick: () => monitor.toggleMarket(match.matchId, m.marketDeveloperName),
2989
- children: [
2990
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "ss-w-acc-chevron", children: isOpen ? "\u25BE" : "\u25B8" }),
2991
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "ss-w-acc-label", children: m.marketLabel }),
2992
- m.hasInsight && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "ss-w-acc-badge", children: "\u2605" }),
2993
- m.suspended && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "ss-w-acc-susp", children: ui.accordionSuspended })
2994
- ]
2995
- }
2996
- ),
2983
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "ss-w-acc-head", children: [
2984
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
2985
+ "button",
2986
+ {
2987
+ type: "button",
2988
+ className: "ss-w-acc-toggle",
2989
+ "aria-expanded": isOpen,
2990
+ onClick: () => monitor.toggleMarket(match.matchId, m.marketDeveloperName),
2991
+ children: [
2992
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "ss-w-acc-chevron", children: isOpen ? "\u25BE" : "\u25B8" }),
2993
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "ss-w-acc-label", children: m.marketLabel }),
2994
+ m.hasInsight && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "ss-w-acc-badge", children: "\u2605" }),
2995
+ m.suspended && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "ss-w-acc-susp", children: ui.accordionSuspended })
2996
+ ]
2997
+ }
2998
+ ),
2999
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3000
+ PinToggle,
3001
+ {
3002
+ ui,
3003
+ monitor,
3004
+ pin: { kind: "market", matchId: match.matchId, marketDeveloperName: m.marketDeveloperName }
3005
+ }
3006
+ )
3007
+ ] }),
2997
3008
  isOpen && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "ss-w-acc-panel", children: [
2998
3009
  entry?.error && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
2999
3010
  "div",
@@ -4058,11 +4069,13 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
4058
4069
  .ss-w-mon-item { display: flex; flex-direction: column; gap: 10px; }
4059
4070
  .ss-w-acc { display: flex; flex-direction: column; gap: 6px; }
4060
4071
  .ss-w-acc-row { background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 12px; border-left: 3px solid var(--ss-w-accent); overflow: hidden; }
4061
- .ss-w-acc-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 11px; background: none; border: none; cursor: pointer; text-align: left; font: inherit; color: var(--ss-w-ink); }
4062
- .ss-w-acc-chevron { color: var(--ss-w-faint); font-size: 11px; }
4063
- .ss-w-acc-label { font-size: 12.5px; font-weight: 600; }
4064
- .ss-w-acc-badge { font-size: 10.5px; font-weight: 700; color: var(--ss-w-accent); }
4065
- .ss-w-acc-susp { margin-left: auto; font-size: 10.5px; color: var(--ss-w-faint); }
4072
+ /* Row header: expand toggle (flex:1) + the market PinToggle as a sibling (no nested buttons). */
4073
+ .ss-w-acc-head { display: flex; align-items: center; gap: 8px; padding: 6px 9px 6px 11px; }
4074
+ .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; }
4075
+ .ss-w-acc-chevron { color: var(--ss-w-faint); font-size: 11px; flex: none; }
4076
+ .ss-w-acc-label { font-size: 12.5px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
4077
+ .ss-w-acc-badge { font-size: 10.5px; font-weight: 700; color: var(--ss-w-accent); flex: none; }
4078
+ .ss-w-acc-susp { margin-left: auto; font-size: 10.5px; color: var(--ss-w-faint); flex: none; }
4066
4079
  .ss-w-acc-panel { padding: 0 11px 10px; display: flex; flex-direction: column; gap: 8px; }
4067
4080
  .ss-w-acc-insight { font-size: 12px; color: var(--ss-w-ink); background: color-mix(in srgb, var(--ss-w-accent) 9%, var(--ss-w-panel)); border-radius: 8px; padding: 7px 9px; }
4068
4081
  .ss-w-acc-retry { font-size: 12px; color: var(--ss-w-neg); cursor: pointer; padding: 6px 0; }