@primestyleai/tryon 5.10.192 → 5.10.193
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 +1656 -1602
- package/dist/react/index.js.map +1 -1
- package/dist/react/styles.d.ts +1 -1
- package/dist/storefront/primestyle-tryon.js +102 -43
- package/package.json +1 -1
|
@@ -9836,23 +9836,34 @@ async function loadMediaPipe() {
|
|
|
9836
9836
|
if (poseLandmarker) return;
|
|
9837
9837
|
if (loadingPromise$1) return loadingPromise$1;
|
|
9838
9838
|
loadingPromise$1 = (async () => {
|
|
9839
|
-
|
|
9840
|
-
|
|
9841
|
-
|
|
9842
|
-
|
|
9843
|
-
|
|
9844
|
-
|
|
9845
|
-
|
|
9846
|
-
|
|
9847
|
-
|
|
9848
|
-
|
|
9849
|
-
|
|
9850
|
-
|
|
9851
|
-
|
|
9852
|
-
|
|
9853
|
-
|
|
9854
|
-
|
|
9855
|
-
|
|
9839
|
+
try {
|
|
9840
|
+
const vision = await import(
|
|
9841
|
+
/* webpackIgnore: true */
|
|
9842
|
+
// @ts-ignore dynamic CDN import
|
|
9843
|
+
"https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.33/vision_bundle.mjs"
|
|
9844
|
+
);
|
|
9845
|
+
const { FilesetResolver, PoseLandmarker } = vision;
|
|
9846
|
+
const filesetResolver = await FilesetResolver.forVisionTasks(
|
|
9847
|
+
"https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.33/wasm"
|
|
9848
|
+
);
|
|
9849
|
+
const createPoseLandmarker = async (delegate) => PoseLandmarker.createFromOptions(filesetResolver, {
|
|
9850
|
+
baseOptions: {
|
|
9851
|
+
modelAssetPath: "https://storage.googleapis.com/mediapipe-models/pose_landmarker/pose_landmarker_lite/float16/1/pose_landmarker_lite.task",
|
|
9852
|
+
delegate
|
|
9853
|
+
},
|
|
9854
|
+
runningMode: "IMAGE",
|
|
9855
|
+
numPoses: 1
|
|
9856
|
+
});
|
|
9857
|
+
try {
|
|
9858
|
+
poseLandmarker = await createPoseLandmarker("GPU");
|
|
9859
|
+
} catch (gpuErr) {
|
|
9860
|
+
console.warn("[PS-SDK:MediaPipe] GPU delegate failed, retrying with CPU delegate:", gpuErr);
|
|
9861
|
+
poseLandmarker = await createPoseLandmarker("CPU");
|
|
9862
|
+
}
|
|
9863
|
+
} catch (err) {
|
|
9864
|
+
loadingPromise$1 = null;
|
|
9865
|
+
throw err;
|
|
9866
|
+
}
|
|
9856
9867
|
})();
|
|
9857
9868
|
return loadingPromise$1;
|
|
9858
9869
|
}
|
|
@@ -10047,19 +10058,28 @@ async function loadFaceLandmarker() {
|
|
|
10047
10058
|
"https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.33/wasm"
|
|
10048
10059
|
);
|
|
10049
10060
|
console.log(`[PS-SDK:FaceDetect] WASM resolver ready in ${Math.round(performance.now() - t1)}ms`);
|
|
10050
|
-
|
|
10051
|
-
|
|
10052
|
-
|
|
10053
|
-
|
|
10054
|
-
|
|
10055
|
-
|
|
10056
|
-
|
|
10057
|
-
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
|
|
10061
|
+
const createFaceLandmarker = async (delegate) => {
|
|
10062
|
+
console.log(`[PS-SDK:FaceDetect] creating FaceLandmarker (${delegate} delegate, model=latest)…`);
|
|
10063
|
+
const t2 = performance.now();
|
|
10064
|
+
const instance = await FaceLandmarker.createFromOptions(filesetResolver, {
|
|
10065
|
+
baseOptions: {
|
|
10066
|
+
modelAssetPath: "https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/latest/face_landmarker.task",
|
|
10067
|
+
delegate
|
|
10068
|
+
},
|
|
10069
|
+
runningMode: "IMAGE",
|
|
10070
|
+
numFaces: 1,
|
|
10071
|
+
outputFaceBlendshapes: false,
|
|
10072
|
+
outputFacialTransformationMatrixes: false
|
|
10073
|
+
});
|
|
10074
|
+
console.log(`[PS-SDK:FaceDetect] FaceLandmarker ready with ${delegate} delegate in ${Math.round(performance.now() - t2)}ms`);
|
|
10075
|
+
return instance;
|
|
10076
|
+
};
|
|
10077
|
+
try {
|
|
10078
|
+
faceLandmarker = await createFaceLandmarker("GPU");
|
|
10079
|
+
} catch (gpuErr) {
|
|
10080
|
+
console.warn("[PS-SDK:FaceDetect] GPU delegate failed, retrying with CPU delegate:", gpuErr);
|
|
10081
|
+
faceLandmarker = await createFaceLandmarker("CPU");
|
|
10082
|
+
}
|
|
10063
10083
|
} catch (err) {
|
|
10064
10084
|
console.error("[PS-SDK:FaceDetect] loadFaceLandmarker FAILED:", err);
|
|
10065
10085
|
loadingPromise = null;
|
|
@@ -22918,14 +22938,33 @@ const STYLES = `
|
|
|
22918
22938
|
.ps-msd-actions {
|
|
22919
22939
|
padding-top: 9px !important;
|
|
22920
22940
|
padding-bottom: calc(9px + env(safe-area-inset-bottom)) !important;
|
|
22941
|
+
height: auto !important;
|
|
22942
|
+
min-height: 0 !important;
|
|
22943
|
+
}
|
|
22944
|
+
.ps-tryon-v2-result-actions {
|
|
22945
|
+
display: grid !important;
|
|
22946
|
+
grid-template-columns: auto minmax(0, 1fr) !important;
|
|
22947
|
+
align-items: end !important;
|
|
22948
|
+
gap: 10px !important;
|
|
22949
|
+
min-height: 0 !important;
|
|
22950
|
+
padding-top: 10px !important;
|
|
22951
|
+
padding-bottom: calc(10px + env(safe-area-inset-bottom)) !important;
|
|
22952
|
+
}
|
|
22953
|
+
.ps-tryon-v2-result-actions > .ps-tryon-v2-action-group,
|
|
22954
|
+
.ps-tryon-v2-result-actions > .ps-tryon-v2-cta {
|
|
22955
|
+
width: 100% !important;
|
|
22956
|
+
max-width: none !important;
|
|
22957
|
+
flex: 1 1 auto !important;
|
|
22958
|
+
margin-left: 0 !important;
|
|
22921
22959
|
}
|
|
22922
22960
|
.ps-msr-bottom-row,
|
|
22923
22961
|
.ps-tryon-v2-action-group,
|
|
22924
22962
|
.ps-msd-result-action-group {
|
|
22925
22963
|
display: grid !important;
|
|
22926
|
-
grid-template-columns: minmax(0, 1fr)
|
|
22964
|
+
grid-template-columns: minmax(0, 1fr) !important;
|
|
22927
22965
|
gap: 9px !important;
|
|
22928
22966
|
align-items: stretch !important;
|
|
22967
|
+
width: 100% !important;
|
|
22929
22968
|
}
|
|
22930
22969
|
.ps-tryon-v2-action-group-history {
|
|
22931
22970
|
display: flex !important;
|
|
@@ -22934,19 +22973,38 @@ const STYLES = `
|
|
|
22934
22973
|
.ps-tryon-v2-action-group > .ps-tryon-v2-cta,
|
|
22935
22974
|
.ps-msr-commerce-row .ps-tryon-v2-cta,
|
|
22936
22975
|
.ps-msd-result-action-group .ps-tryon-v2-cta {
|
|
22937
|
-
min-height:
|
|
22938
|
-
padding: 0
|
|
22939
|
-
border-radius:
|
|
22940
|
-
font-size:
|
|
22941
|
-
|
|
22942
|
-
|
|
22943
|
-
|
|
22944
|
-
|
|
22976
|
+
min-height: 48px !important;
|
|
22977
|
+
padding: 0 14px !important;
|
|
22978
|
+
border-radius: 11px !important;
|
|
22979
|
+
font-size: 13px !important;
|
|
22980
|
+
line-height: 1.15 !important;
|
|
22981
|
+
letter-spacing: 0.045em !important;
|
|
22982
|
+
gap: 8px !important;
|
|
22983
|
+
overflow: visible !important;
|
|
22984
|
+
text-overflow: clip !important;
|
|
22985
|
+
white-space: normal !important;
|
|
22986
|
+
}
|
|
22987
|
+
.ps-tryon-v2-action-group > .ps-tryon-v2-cta span,
|
|
22988
|
+
.ps-msr-commerce-row .ps-tryon-v2-cta span,
|
|
22989
|
+
.ps-msd-result-action-group .ps-tryon-v2-cta span {
|
|
22990
|
+
min-width: 0 !important;
|
|
22991
|
+
overflow: visible !important;
|
|
22992
|
+
text-overflow: clip !important;
|
|
22993
|
+
white-space: normal !important;
|
|
22994
|
+
overflow-wrap: normal !important;
|
|
22945
22995
|
}
|
|
22946
22996
|
.ps-tryon-v2-add-bag-cta svg,
|
|
22947
22997
|
.ps-tryon-v2-history-product-cta svg {
|
|
22948
|
-
width:
|
|
22949
|
-
height:
|
|
22998
|
+
width: 20px !important;
|
|
22999
|
+
height: 20px !important;
|
|
23000
|
+
flex: 0 0 auto !important;
|
|
23001
|
+
}
|
|
23002
|
+
.ps-tryon-v2-history-product-cta {
|
|
23003
|
+
width: auto !important;
|
|
23004
|
+
min-height: 42px !important;
|
|
23005
|
+
padding: 0 13px !important;
|
|
23006
|
+
font-size: 12px !important;
|
|
23007
|
+
white-space: nowrap !important;
|
|
22950
23008
|
}
|
|
22951
23009
|
@media (max-width: 374px) {
|
|
22952
23010
|
.ps-msr-bottom-row,
|
|
@@ -22957,7 +23015,8 @@ const STYLES = `
|
|
|
22957
23015
|
.ps-tryon-v2-action-group > .ps-tryon-v2-cta,
|
|
22958
23016
|
.ps-msr-commerce-row .ps-tryon-v2-cta,
|
|
22959
23017
|
.ps-msd-result-action-group .ps-tryon-v2-cta {
|
|
22960
|
-
min-height:
|
|
23018
|
+
min-height: 46px !important;
|
|
23019
|
+
font-size: 12px !important;
|
|
22961
23020
|
}
|
|
22962
23021
|
}
|
|
22963
23022
|
|
|
@@ -26527,7 +26586,7 @@ function SizeResultView({
|
|
|
26527
26586
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { style: { color: "var(--ps-text-muted)", fontSize: "0.8vw" }, children: t2("Generating your size recommendation...") })
|
|
26528
26587
|
] })
|
|
26529
26588
|
] }),
|
|
26530
|
-
isMobile && isSnapProcessing &&
|
|
26589
|
+
isMobile && isSnapProcessing && previewUrl && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
26531
26590
|
MobileScanningView,
|
|
26532
26591
|
{
|
|
26533
26592
|
previewUrl,
|