@primestyleai/tryon 5.10.141 → 5.10.142
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 +178 -178
- package/dist/react/index.js.map +1 -1
- package/dist/storefront/primestyle-tryon.js +8 -8
- package/package.json +1 -1
|
@@ -19263,8 +19263,8 @@ function MobileScanningView({
|
|
|
19263
19263
|
const img = e.currentTarget;
|
|
19264
19264
|
setDims({ w: img.naturalWidth || img.offsetWidth, h: img.naturalHeight || img.offsetHeight });
|
|
19265
19265
|
};
|
|
19266
|
-
const TOTAL_MS =
|
|
19267
|
-
const LAST_HOLD_MS =
|
|
19266
|
+
const TOTAL_MS = 2e3;
|
|
19267
|
+
const LAST_HOLD_MS = 400;
|
|
19268
19268
|
const startRef = reactExports.useRef(Date.now());
|
|
19269
19269
|
const [stageIdx, setStageIdx] = reactExports.useState(0);
|
|
19270
19270
|
reactExports.useEffect(() => {
|
|
@@ -19894,7 +19894,7 @@ function MeasurementOverlay({ lines, fitRows, show, imgWidth, imgHeight }) {
|
|
|
19894
19894
|
const curvePath = `M ${x1} ${cy} Q ${midX} ${cy + curveDepth} ${x2} ${cy}`;
|
|
19895
19895
|
const lineLen = width * 1.05;
|
|
19896
19896
|
const labelText = fitRow ? fitRow.fit === "good" ? "✓ Fit" : fitRow.isLength ? fitRow.fit.includes("short") || fitRow.fit.includes("tight") ? "Short" : "Long" : fitRow.fit.includes("tight") ? "Tight" : "Loose" : label;
|
|
19897
|
-
const labelFont = Math.
|
|
19897
|
+
const labelFont = Math.max(14, Math.round(22 * scale));
|
|
19898
19898
|
const labelWidthEst = labelText.length * labelFont * 0.62;
|
|
19899
19899
|
const rightSpace = W2 - x2 - 12 * scale;
|
|
19900
19900
|
const flipLeft = rightSpace < labelWidthEst;
|
|
@@ -29114,7 +29114,7 @@ function PrimeStyleTryonInner({
|
|
|
29114
29114
|
const jointCount = lmObj ? Object.keys(lmObj).filter((k2) => k2 !== "imageWidth" && k2 !== "imageHeight" && lmObj[k2]).length : 0;
|
|
29115
29115
|
console.log(`[ps-sdk:debug] payload → bodyLandmarks=${!!lmObj}(${jointCount} joints)`);
|
|
29116
29116
|
}
|
|
29117
|
-
const minVisible = new Promise((r2) => setTimeout(r2,
|
|
29117
|
+
const minVisible = new Promise((r2) => setTimeout(r2, 2e3));
|
|
29118
29118
|
try {
|
|
29119
29119
|
const tReq = Date.now();
|
|
29120
29120
|
const payloadBytes = JSON.stringify(payload).length;
|
|
@@ -29349,18 +29349,18 @@ function PrimeStyleTryonInner({
|
|
|
29349
29349
|
}
|
|
29350
29350
|
}, [selectedFile, productImage, productTitle, sizingResult, onProcessing, onError, handleVtoUpdate]);
|
|
29351
29351
|
reactExports.useEffect(() => {
|
|
29352
|
-
if (
|
|
29352
|
+
if (view !== "size-result") {
|
|
29353
29353
|
autoTryOnFiredRef.current = false;
|
|
29354
29354
|
return;
|
|
29355
29355
|
}
|
|
29356
|
-
if (sizingResult.found === false) return;
|
|
29357
29356
|
if (noFitFoundRef.current) return;
|
|
29358
29357
|
if (autoTryOnFiredRef.current) return;
|
|
29359
29358
|
if (tryOnProcessing || resultImageUrl) return;
|
|
29360
|
-
|
|
29359
|
+
const file = selectedFile || selectedFileRef.current;
|
|
29360
|
+
if (!file) return;
|
|
29361
29361
|
autoTryOnFiredRef.current = true;
|
|
29362
29362
|
handleTryOnSubmit();
|
|
29363
|
-
}, [
|
|
29363
|
+
}, [view, selectedFile, tryOnProcessing, resultImageUrl, handleTryOnSubmit]);
|
|
29364
29364
|
const handleDownload = reactExports.useCallback(() => {
|
|
29365
29365
|
if (!resultImageUrl) return;
|
|
29366
29366
|
if (resultImageUrl.startsWith("data:")) {
|