@primestyleai/tryon 5.10.114 → 5.10.116
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/dist/react/index.js +755 -754
- package/dist/react/index.js.map +1 -1
- package/dist/storefront/primestyle-tryon.js +6 -8
- package/package.json +1 -1
|
@@ -27816,7 +27816,7 @@ function PrimeStyleTryonInner({
|
|
|
27816
27816
|
fetch(`${baseUrl}/api/catalog/pick-best-garment-image`, {
|
|
27817
27817
|
method: "POST",
|
|
27818
27818
|
headers: { "Content-Type": "application/json" },
|
|
27819
|
-
body: JSON.stringify({ images: productImages }),
|
|
27819
|
+
body: JSON.stringify({ images: productImages, productTitle }),
|
|
27820
27820
|
signal: ctrl.signal
|
|
27821
27821
|
}).then((r2) => r2.ok ? r2.json() : null).then((j) => {
|
|
27822
27822
|
if (j?.bestUrl) {
|
|
@@ -27826,7 +27826,7 @@ function PrimeStyleTryonInner({
|
|
|
27826
27826
|
}).catch(() => {
|
|
27827
27827
|
});
|
|
27828
27828
|
return () => ctrl.abort();
|
|
27829
|
-
}, [productImages, garmentReferenceImage, apiUrl]);
|
|
27829
|
+
}, [productImages, garmentReferenceImage, apiUrl, productTitle]);
|
|
27830
27830
|
const TARGET_SECONDS2 = 22;
|
|
27831
27831
|
const progressRef = reactExports.useRef(0);
|
|
27832
27832
|
const progressBarRef = reactExports.useRef(null);
|
|
@@ -28874,10 +28874,9 @@ function PrimeStyleTryonInner({
|
|
|
28874
28874
|
sizeGuide,
|
|
28875
28875
|
override?.displayLabel,
|
|
28876
28876
|
(() => {
|
|
28877
|
-
const
|
|
28878
|
-
const h = p2?.height ?? p2?.heightCm;
|
|
28879
|
-
const u2 = p2?.heightUnit || "cm";
|
|
28877
|
+
const h = parseFloat(formRef.current.height || "0");
|
|
28880
28878
|
if (!h || h <= 0) return void 0;
|
|
28879
|
+
const u2 = formRef.current.heightUnit || heightUnit || "cm";
|
|
28881
28880
|
if (u2 === "ft") {
|
|
28882
28881
|
const ft = Math.floor(h);
|
|
28883
28882
|
const inches = Math.round((h - ft) * 12);
|
|
@@ -28886,10 +28885,9 @@ function PrimeStyleTryonInner({
|
|
|
28886
28885
|
return u2 === "in" ? `${h}"` : `${h} cm`;
|
|
28887
28886
|
})(),
|
|
28888
28887
|
(() => {
|
|
28889
|
-
const
|
|
28890
|
-
const w2 = p2?.weight ?? p2?.weightKg;
|
|
28891
|
-
const u2 = p2?.weightUnit || "kg";
|
|
28888
|
+
const w2 = parseFloat(formRef.current.weight || "0");
|
|
28892
28889
|
if (!w2 || w2 <= 0) return void 0;
|
|
28890
|
+
const u2 = formRef.current.weightUnit || weightUnit || "kg";
|
|
28893
28891
|
return `${w2} ${u2}`;
|
|
28894
28892
|
})()
|
|
28895
28893
|
),
|