@sensiblestats/widget-react 0.13.0 → 0.13.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,11 @@
1
1
  # @sensiblestats/widget-react
2
2
 
3
+ ## 0.13.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Odds movement chart: drop the direction clause from the chart's `aria-label` when the price is flat. It used to read "…currently 1.44, ." — a screen reader announced the dangling punctuation on exactly the no-movement case.
8
+
3
9
  ## 0.13.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -76,7 +76,8 @@ var STRINGS = {
76
76
  chartTimeLabel: (ms) => new Intl.DateTimeFormat("en-GB", { day: "numeric", month: "short", hour: "2-digit", minute: "2-digit" }).format(new Date(ms)),
77
77
  chartAria: (opening, current, direction, hours) => {
78
78
  const span = hours % 24 === 0 ? `${hours / 24} day${hours / 24 === 1 ? "" : "s"}` : `${hours} hour${hours === 1 ? "" : "s"}`;
79
- return `Price movement over the last ${span}: opened at ${opening}, currently ${current}, ${direction}.`;
79
+ const drift = direction ? `, ${direction}` : "";
80
+ return `Price movement over the last ${span}: opened at ${opening}, currently ${current}${drift}.`;
80
81
  },
81
82
  inSlip: "In slip",
82
83
  slipAdded: (n) => n === void 0 ? "Added to slip" : `Added to slip (${n} selection${n === 1 ? "" : "s"})`,
@@ -122,7 +123,8 @@ var STRINGS = {
122
123
  chartTimeLabel: (ms) => new Intl.DateTimeFormat("tr-TR", { day: "numeric", month: "short", hour: "2-digit", minute: "2-digit" }).format(new Date(ms)),
123
124
  chartAria: (opening, current, direction, hours) => {
124
125
  const span = hours % 24 === 0 ? `${hours / 24} g\xFCn` : `${hours} saat`;
125
- return `Son ${span} i\xE7indeki oran hareketi: ${opening} ile a\xE7\u0131ld\u0131, \u015Fu anda ${current}, ${direction}.`;
126
+ const drift = direction ? `, ${direction}` : "";
127
+ return `Son ${span} i\xE7indeki oran hareketi: ${opening} ile a\xE7\u0131ld\u0131, \u015Fu anda ${current}${drift}.`;
126
128
  },
127
129
  inSlip: "Kuponda",
128
130
  slipAdded: (n) => n === void 0 ? "Kupona eklendi" : `Kupona eklendi (${n} se\xE7im)`,
@@ -1027,7 +1029,9 @@ function directionWord(vm, ui) {
1027
1029
  return "";
1028
1030
  }
1029
1031
  function OddsMovementCard({ vm, ui }) {
1030
- const aria = ui?.chartAria ? ui.chartAria(vm.opening, vm.current, directionWord(vm, ui), vm.windowHours) : `Price movement over the last ${vm.windowHours} hours: opened at ${vm.opening}, currently ${vm.current}, ${directionWord(vm, ui)}.`;
1032
+ const word = directionWord(vm, ui);
1033
+ const drift = word ? `, ${word}` : "";
1034
+ const aria = ui?.chartAria ? ui.chartAria(vm.opening, vm.current, word, vm.windowHours) : `Price movement over the last ${vm.windowHours} hours: opened at ${vm.opening}, currently ${vm.current}${drift}.`;
1031
1035
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "ss-w-omcard", children: [
1032
1036
  /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "ss-w-om-head", children: [
1033
1037
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "ss-w-om-market", children: vm.market }),