@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.
@@ -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
- if (!selectedFile || !apiRef.current || !sseRef.current) return;
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(selectedFile);
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primestyleai/tryon",
3
- "version": "5.10.47",
3
+ "version": "5.10.48",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",