@snowcone-app/ui 0.10.10 → 0.10.12

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
  # Changelog
2
2
 
3
+ ## 0.10.12
4
+
5
+ ### Patch Changes
6
+
7
+ - [#4744](https://github.com/snowcone-app/snowcone-monorepo/pull/4744) [`1e0daeb`](https://github.com/snowcone-app/snowcone-monorepo/commit/1e0daeb635b8ee4a53b052a4a07a4a64d56c310d) Thanks [@kevinsproles](https://github.com/kevinsproles)! - CurrentRefinements builds its "≥ / ≤" price-label patterns from strings instead of regex literals. A raw non-Latin-1 character in a regex literal survives into server bundles, and one is enough to make V8 hold the whole script at two bytes per character.
8
+
9
+ ## 0.10.11
10
+
11
+ ### Patch Changes
12
+
13
+ - [#4675](https://github.com/snowcone-app/snowcone-monorepo/pull/4675) [`8dc0954`](https://github.com/snowcone-app/snowcone-monorepo/commit/8dc09546922eb941f23473e23d63f6a504e5db42) Thanks [@kevinsproles](https://github.com/kevinsproles)! - `HeroProductImage` stamps `data-mockup-id` on its root: which picture this is, for tests and monitors that name pictures by id instead of DOM order.
14
+
3
15
  ## 0.10.10
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -11512,6 +11512,7 @@ var HeroProductImage = (0, import_react46.memo)(function HeroProductImage2({
11512
11512
  className: `relative overflow-hidden ${className || ""}`,
11513
11513
  style,
11514
11514
  "data-hero-image": "true",
11515
+ "data-mockup-id": actualMockupId || void 0,
11515
11516
  "data-fit": fit,
11516
11517
  "data-picture-failed": imgFailed ? "E_PICTURE_UNDISPLAYED" : void 0,
11517
11518
  "data-picture-failed-src": failedSrc,
@@ -12286,6 +12287,8 @@ var import_react_instantsearch5 = require("react-instantsearch");
12286
12287
  var import_lucide_react6 = require("lucide-react");
12287
12288
  var import_jsx_runtime70 = require("react/jsx-runtime");
12288
12289
  var XIcon3 = import_lucide_react6.X;
12290
+ var MIN_PRICE = new RegExp("[\u2265>=]+\\s*(\\d+)");
12291
+ var MAX_PRICE = new RegExp("[\u2264<=]+\\s*(\\d+)");
12289
12292
  function CurrentRefinements() {
12290
12293
  const { items, refine } = (0, import_react_instantsearch5.useCurrentRefinements)();
12291
12294
  const formatPriceValue = (priceInCents) => {
@@ -12306,12 +12309,12 @@ function CurrentRefinements() {
12306
12309
  const max = parseInt(rangeMatch[2]);
12307
12310
  return `${formatPriceValue(min)} - ${formatPriceValue(max)}`;
12308
12311
  }
12309
- const minMatch = label.match(/[≥>=]+\s*(\d+)/);
12312
+ const minMatch = label.match(MIN_PRICE);
12310
12313
  if (minMatch) {
12311
12314
  const min = parseInt(minMatch[1]);
12312
12315
  return `Min ${formatPriceValue(min)}`;
12313
12316
  }
12314
- const maxMatch = label.match(/[≤<=]+\s*(\d+)/);
12317
+ const maxMatch = label.match(MAX_PRICE);
12315
12318
  if (maxMatch) {
12316
12319
  const max = parseInt(maxMatch[1]);
12317
12320
  return `Max ${formatPriceValue(max)}`;