@primestyleai/tryon 5.10.142 → 5.10.144
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 +988 -990
- package/dist/react/index.js.map +1 -1
- package/dist/storefront/primestyle-tryon.js +6 -13
- package/package.json +1 -1
|
@@ -19263,20 +19263,13 @@ 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
|
|
19267
|
-
const LAST_HOLD_MS = 400;
|
|
19268
|
-
const startRef = reactExports.useRef(Date.now());
|
|
19266
|
+
const STAGE_DWELL_MS = 1800;
|
|
19269
19267
|
const [stageIdx, setStageIdx] = reactExports.useState(0);
|
|
19270
19268
|
reactExports.useEffect(() => {
|
|
19271
|
-
|
|
19272
|
-
const id2 =
|
|
19273
|
-
|
|
19274
|
-
|
|
19275
|
-
setStageIdx((prev) => prev === idx ? prev : idx);
|
|
19276
|
-
if (idx >= stages.length - 1) clearInterval(id2);
|
|
19277
|
-
}, 100);
|
|
19278
|
-
return () => clearInterval(id2);
|
|
19279
|
-
}, [stages.length]);
|
|
19269
|
+
if (stageIdx >= stages.length - 1) return;
|
|
19270
|
+
const id2 = setTimeout(() => setStageIdx((i) => Math.min(stages.length - 1, i + 1)), STAGE_DWELL_MS);
|
|
19271
|
+
return () => clearTimeout(id2);
|
|
19272
|
+
}, [stageIdx, stages.length]);
|
|
19280
19273
|
reactExports.useEffect(() => {
|
|
19281
19274
|
if (isPhotoMode && bodyLandmarks && stageIdx === 0) {
|
|
19282
19275
|
setStageIdx(1);
|
|
@@ -29114,7 +29107,7 @@ function PrimeStyleTryonInner({
|
|
|
29114
29107
|
const jointCount = lmObj ? Object.keys(lmObj).filter((k2) => k2 !== "imageWidth" && k2 !== "imageHeight" && lmObj[k2]).length : 0;
|
|
29115
29108
|
console.log(`[ps-sdk:debug] payload → bodyLandmarks=${!!lmObj}(${jointCount} joints)`);
|
|
29116
29109
|
}
|
|
29117
|
-
const minVisible = new Promise((r2) => setTimeout(r2,
|
|
29110
|
+
const minVisible = new Promise((r2) => setTimeout(r2, 6e3));
|
|
29118
29111
|
try {
|
|
29119
29112
|
const tReq = Date.now();
|
|
29120
29113
|
const payloadBytes = JSON.stringify(payload).length;
|