@snowcone-app/ui 0.10.11 → 0.10.13
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 +15 -0
- package/README.md +7 -4
- package/dist/{chunk-UJ5ZXSFD.js → chunk-4E5PVNXY.js} +18 -3
- package/dist/chunk-4E5PVNXY.js.map +1 -0
- package/dist/{dev-warnings-LI2YBKKQ.js → dev-warnings-2MCWOVV5.js} +2 -2
- package/dist/index.cjs +79 -62
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/composed/HeroProductImage.tsx +2 -1
- package/src/composed/search/CurrentRefinements.tsx +9 -2
- package/src/utils/dev-warnings.ts +4 -2
- package/dist/chunk-UJ5ZXSFD.js.map +0 -1
- /package/dist/{dev-warnings-LI2YBKKQ.js.map → dev-warnings-2MCWOVV5.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
checkTailwindConfig,
|
|
23
23
|
checkThemeTokens,
|
|
24
24
|
runConfigChecks
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-4E5PVNXY.js";
|
|
26
26
|
|
|
27
27
|
// ../brand/brand.json
|
|
28
28
|
var brand_default = {
|
|
@@ -505,7 +505,7 @@ function Shop({
|
|
|
505
505
|
useEffect2(() => {
|
|
506
506
|
if (process.env.NODE_ENV === "development" && typeof window !== "undefined") {
|
|
507
507
|
setTimeout(() => {
|
|
508
|
-
import("./dev-warnings-
|
|
508
|
+
import("./dev-warnings-2MCWOVV5.js").then(({ runConfigChecks: runConfigChecks2 }) => {
|
|
509
509
|
runConfigChecks2();
|
|
510
510
|
});
|
|
511
511
|
}, 1e3);
|
|
@@ -10470,7 +10470,8 @@ import {
|
|
|
10470
10470
|
getMockupUrl,
|
|
10471
10471
|
resolveVariantId,
|
|
10472
10472
|
resolvePreviewVariantId as resolvePreviewVariantId2,
|
|
10473
|
-
resolveMockupId
|
|
10473
|
+
resolveMockupId,
|
|
10474
|
+
SNOWCONE_HOSTS
|
|
10474
10475
|
} from "@snowcone-app/sdk";
|
|
10475
10476
|
|
|
10476
10477
|
// src/hooks/viewport/useContainerWidth.ts
|
|
@@ -11250,7 +11251,7 @@ var HeroProductImage = memo3(function HeroProductImage2({
|
|
|
11250
11251
|
signHintShownRef.current = true;
|
|
11251
11252
|
const hasSigner = typeof window !== "undefined" && !!window.snowcone?.signMockupUrl;
|
|
11252
11253
|
console.warn(
|
|
11253
|
-
hasSigner ? "[Snowcone] A mockup image failed to load and its URL is unsigned. Your `signMockupUrl` likely errored \u2014 check your /api/sign route and that its secret matches the shop's signing secret." :
|
|
11254
|
+
hasSigner ? "[Snowcone] A mockup image failed to load and its URL is unsigned. Your `signMockupUrl` likely errored \u2014 check your /api/sign route and that its secret matches the shop's signing secret." : `[Snowcone] A mockup image failed to load (likely 'Missing required signature'). If your shop requires signed URLs, pass \`signMockupUrl\` to <Shop> so the UI can sign mockup <img> URLs. Docs: ${SNOWCONE_HOSTS.docs}/design-system/signing-at-scale`
|
|
11254
11255
|
);
|
|
11255
11256
|
}
|
|
11256
11257
|
}
|
|
@@ -11972,6 +11973,8 @@ import { useCurrentRefinements } from "react-instantsearch";
|
|
|
11972
11973
|
import { X as LucideX3 } from "lucide-react";
|
|
11973
11974
|
import { jsx as jsx70, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
11974
11975
|
var XIcon3 = LucideX3;
|
|
11976
|
+
var MIN_PRICE = new RegExp("[\u2265>=]+\\s*(\\d+)");
|
|
11977
|
+
var MAX_PRICE = new RegExp("[\u2264<=]+\\s*(\\d+)");
|
|
11975
11978
|
function CurrentRefinements() {
|
|
11976
11979
|
const { items, refine } = useCurrentRefinements();
|
|
11977
11980
|
const formatPriceValue = (priceInCents) => {
|
|
@@ -11992,12 +11995,12 @@ function CurrentRefinements() {
|
|
|
11992
11995
|
const max = parseInt(rangeMatch[2]);
|
|
11993
11996
|
return `${formatPriceValue(min)} - ${formatPriceValue(max)}`;
|
|
11994
11997
|
}
|
|
11995
|
-
const minMatch = label.match(
|
|
11998
|
+
const minMatch = label.match(MIN_PRICE);
|
|
11996
11999
|
if (minMatch) {
|
|
11997
12000
|
const min = parseInt(minMatch[1]);
|
|
11998
12001
|
return `Min ${formatPriceValue(min)}`;
|
|
11999
12002
|
}
|
|
12000
|
-
const maxMatch = label.match(
|
|
12003
|
+
const maxMatch = label.match(MAX_PRICE);
|
|
12001
12004
|
if (maxMatch) {
|
|
12002
12005
|
const max = parseInt(maxMatch[1]);
|
|
12003
12006
|
return `Max ${formatPriceValue(max)}`;
|