@sensiblestats/widget-react 0.70.0 → 0.70.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.70.1
4
+
5
+ ### Patch Changes
6
+
7
+ - The round button stays hidden when the price-presets grid has no cell in any row, so a quiet day never opens a tool where every number is unavailable. The next panel open asks again.
8
+
3
9
  ## 0.70.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -9058,7 +9058,7 @@ function usePresetGrid({ getPricePresets, isOpen, locale, now = Date.now }) {
9058
9058
  if (age <= GRID_MAX_AGE_MS) return;
9059
9059
  inFlightRef.current = true;
9060
9060
  Promise.resolve().then(() => getRef.current(locale)).then((body) => {
9061
- if (body === null) {
9061
+ if (body === null || isPresetGrid(body) && !hasAnyCell(body)) {
9062
9062
  keptRef.current = null;
9063
9063
  if (mountedRef.current) setGrid(null);
9064
9064
  return;
@@ -9073,6 +9073,9 @@ function usePresetGrid({ getPricePresets, isOpen, locale, now = Date.now }) {
9073
9073
  }, [isOpen, locale]);
9074
9074
  return grid;
9075
9075
  }
9076
+ function hasAnyCell(grid) {
9077
+ return grid.singles.length > 0 || grid.singlesFrom.length > 0 || grid.combos.length > 0;
9078
+ }
9076
9079
 
9077
9080
  // src/popupTelemetry.ts
9078
9081
  var import_react53 = require("react");