@primestyleai/tryon 5.10.142 → 5.10.143
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 +987 -989
- package/dist/react/index.js.map +1 -1
- package/dist/storefront/primestyle-tryon.js +5 -12
- 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);
|