@primestyleai/tryon 5.10.47 → 5.10.48
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 +719 -711
- package/dist/react/index.js.map +1 -1
- package/dist/storefront/primestyle-tryon.js +10 -2
- package/package.json +1 -1
|
@@ -25619,7 +25619,15 @@ function PrimeStyleTryonInner({
|
|
|
25619
25619
|
}
|
|
25620
25620
|
}, [selectedFile, productImage, productTitle, sizingResult, onProcessing, onError, handleVtoUpdate]);
|
|
25621
25621
|
const handleRetryWithFit = reactExports.useCallback(async (fitInfo, selectedSizeOverride) => {
|
|
25622
|
-
|
|
25622
|
+
const file = selectedFile || selectedFileRef.current;
|
|
25623
|
+
if (!file || !apiRef.current || !sseRef.current) {
|
|
25624
|
+
console.warn("[ps-sdk:retry] skipping — no file/api/sse", {
|
|
25625
|
+
hasFile: !!file,
|
|
25626
|
+
hasApi: !!apiRef.current,
|
|
25627
|
+
hasSse: !!sseRef.current
|
|
25628
|
+
});
|
|
25629
|
+
return;
|
|
25630
|
+
}
|
|
25623
25631
|
setRetryLoading(true);
|
|
25624
25632
|
const vtoCategory = measurementTypeToVtoCategory(detectMeasurementType(productTitle));
|
|
25625
25633
|
const isApparel = vtoCategory === "apparel";
|
|
@@ -25648,7 +25656,7 @@ function PrimeStyleTryonInner({
|
|
|
25648
25656
|
clearInterval(pollingRef.current);
|
|
25649
25657
|
pollingRef.current = null;
|
|
25650
25658
|
}
|
|
25651
|
-
const modelImage = await compressImage(
|
|
25659
|
+
const modelImage = await compressImage(file);
|
|
25652
25660
|
const outboundFitInfo = isApparel ? fitInfo : void 0;
|
|
25653
25661
|
const response = await apiRef.current.submitTryOn(
|
|
25654
25662
|
modelImage,
|