@sensiblestats/widget-react 0.113.0 → 0.114.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @sensiblestats/widget-react
2
2
 
3
+ ## 0.114.1
4
+
5
+ ### Patch Changes
6
+
7
+ - The market-floor card pill now reads "Market price" ("Piyasa oranı" in Turkish), dropping the negative "not a value pick" half.
8
+
9
+ ## 0.114.0
10
+
11
+ ### Minor Changes
12
+
13
+ - Smart Acca: the market select gains an "All markets" option (last, under the usual market) that builds a mixed-market acca.
14
+
3
15
  ## 0.113.0
4
16
 
5
17
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -100,7 +100,7 @@ var STRINGS = {
100
100
  fullTime: "Full time"
101
101
  },
102
102
  yourMarketTag: "Your market",
103
- marketFloorLabel: "Market price \xB7 not a value pick",
103
+ marketFloorLabel: "Market price",
104
104
  addToSlip: "Add to slip",
105
105
  marketPrices: "Market prices",
106
106
  moreLines: "More lines",
@@ -361,6 +361,7 @@ var STRINGS = {
361
361
  v8Draws: (n) => n === 1 ? "draw" : "draws",
362
362
  v8MarketAria: "Market",
363
363
  v8GamesAria: "Games",
364
+ v8AllMarkets: "All markets",
364
365
  v8UsualPrefix: "\u2605 Your usual: ",
365
366
  v8LeaguesGroup: "Leagues",
366
367
  v8GamesGroup: "Games",
@@ -780,7 +781,7 @@ var STRINGS = {
780
781
  fullTime: "Ma\xE7 bitti"
781
782
  },
782
783
  yourMarketTag: "\u0130lgilendi\u011Fin bahis",
783
- marketFloorLabel: "Piyasa oran\u0131 \xB7 de\u011Fer bahsi de\u011Fil",
784
+ marketFloorLabel: "Piyasa oran\u0131",
784
785
  addToSlip: "Kupona ekle",
785
786
  marketPrices: "Piyasa oranlar\u0131",
786
787
  moreLines: "Di\u011Fer \xE7izgiler",
@@ -1041,6 +1042,7 @@ var STRINGS = {
1041
1042
  v8Draws: () => "beraberlik",
1042
1043
  v8MarketAria: "Market",
1043
1044
  v8GamesAria: "Ma\xE7lar",
1045
+ v8AllMarkets: "T\xFCm marketler",
1044
1046
  v8UsualPrefix: "\u2605 Her zamanki: ",
1045
1047
  v8LeaguesGroup: "Ligler",
1046
1048
  v8GamesGroup: "Ma\xE7lar",
@@ -1477,7 +1479,7 @@ function parseOddsFormat(value) {
1477
1479
  }
1478
1480
 
1479
1481
  // src/version.generated.ts
1480
- var WIDGET_REACT_VERSION = "0.113.0";
1482
+ var WIDGET_REACT_VERSION = "0.114.1";
1481
1483
 
1482
1484
  // src/config.ts
1483
1485
  function normalizeUi(cfg) {
@@ -1764,6 +1766,7 @@ function normalizeUi(cfg) {
1764
1766
  v8Meetings: strings.v8Meetings,
1765
1767
  v8Draws: strings.v8Draws,
1766
1768
  v8MarketAria: strings.v8MarketAria,
1769
+ v8AllMarkets: strings.v8AllMarkets,
1767
1770
  v8GamesAria: strings.v8GamesAria,
1768
1771
  v8UsualPrefix: strings.v8UsualPrefix,
1769
1772
  v8LeaguesGroup: strings.v8LeaguesGroup,
@@ -7502,7 +7505,7 @@ function InsightCard({ it, ui, slip, monitor }) {
7502
7505
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(AddToSlipButton, { it, slip, ui })
7503
7506
  ] })
7504
7507
  ] }),
7505
- it.isMarketFloor ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "ss-w-bi-floor", children: ui?.marketFloorLabel ?? "Market price \xB7 not a value pick" }) : null,
7508
+ it.isMarketFloor ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "ss-w-bi-floor", children: ui?.marketFloorLabel ?? "Market price" }) : null,
7506
7509
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ReasonStrip, { it }),
7507
7510
  it.disclaimer ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "ss-w-bi-disc", children: it.disclaimer }) : null
7508
7511
  ] });
@@ -14933,6 +14936,7 @@ function openingGames(preset) {
14933
14936
  const option = options.find((o) => o.id === preset.gamesOptionId) ?? options.find((o) => sameIds(o.matchIds, preset.matchIds)) ?? null;
14934
14937
  return option ? { options, option } : { options: null, option: null };
14935
14938
  }
14939
+ var ALL_MARKETS = "*";
14936
14940
  var usableMarkets = (preset) => preset.marketOptions && preset.marketOptions.some((m) => m.key === preset.marketKey) ? preset.marketOptions : null;
14937
14941
  function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, sport, operatorUserId, anonymousUserId, onCoolOff }) {
14938
14942
  const { oddsFormat } = useOddsSettings();
@@ -14959,7 +14963,7 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
14959
14963
  const [widenedNote, setWidenedNote] = (0, import_react87.useState)(saved?.widenedNote ?? false);
14960
14964
  const requestFor = (v) => ({
14961
14965
  sport,
14962
- marketKey: v.marketKey,
14966
+ ...v.marketKey !== null ? { marketKey: v.marketKey } : {},
14963
14967
  matchIds: v.widen ? [] : v.matchIds,
14964
14968
  legs: v.legs,
14965
14969
  // The total row is hidden for Singles, so a total picked earlier must not narrow them; the pick stays in state for the way back.
@@ -15014,7 +15018,7 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
15014
15018
  (0, import_react87.useEffect)(() => {
15015
15019
  if (market) setSeen(market);
15016
15020
  }, [market]);
15017
- const marketName = marketOptions?.find((m) => m.key === view.marketKey)?.label ?? market ?? seen;
15021
+ const marketName = view.marketKey === null ? null : marketOptions?.find((m) => m.key === view.marketKey)?.label ?? market ?? seen;
15018
15022
  const paused = ready && grid.status === "paused";
15019
15023
  const coolOff = status === "ready" && grid === null;
15020
15024
  const empty2 = ready && (grid.status === "miss" || grid.status === "ok" && (rows === null || rows.length === 0));
@@ -15046,9 +15050,22 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
15046
15050
  ] }) }) : conversation ? /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_jsx_runtime124.Fragment, { children: [
15047
15051
  marketOptions ? /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { className: "ss-w-v8-builder-ln", children: [
15048
15052
  /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderShow }),
15049
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { className: "ss-w-v8-slot", "data-mine": marketOptions.find((m) => m.key === view.marketKey)?.usual || void 0, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("select", { className: "ss-w-v8-select", "aria-label": ui.v8MarketAria, value: view.marketKey, onChange: (e) => {
15050
- if (e.target.value !== view.marketKey) ask({ ...view, marketKey: e.target.value });
15051
- }, children: marketOptions.map((m) => /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("option", { value: m.key, children: m.usual ? `${ui.v8UsualPrefix}${m.label}` : m.label }, m.key)) }) })
15053
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { className: "ss-w-v8-slot", "data-mine": marketOptions.find((m) => m.key === view.marketKey)?.usual || void 0, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
15054
+ "select",
15055
+ {
15056
+ className: "ss-w-v8-select",
15057
+ "aria-label": ui.v8MarketAria,
15058
+ value: view.marketKey ?? ALL_MARKETS,
15059
+ onChange: (e) => {
15060
+ const picked = e.target.value === ALL_MARKETS ? null : e.target.value;
15061
+ if (picked !== view.marketKey) ask({ ...view, marketKey: picked });
15062
+ },
15063
+ children: [
15064
+ marketOptions.map((m) => /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("option", { value: m.key, children: m.usual ? `${ui.v8UsualPrefix}${m.label}` : m.label }, m.key)),
15065
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("option", { value: ALL_MARKETS, children: ui.v8AllMarkets })
15066
+ ]
15067
+ }
15068
+ ) })
15052
15069
  ] }) : marketName ? /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { className: "ss-w-v8-builder-ln", children: [
15053
15070
  /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderShow }),
15054
15071
  /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("span", { className: "ss-w-v8-builder-market", children: marketName })