@primestyleai/tryon 5.8.42 → 5.8.44
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 +16 -20
- package/dist/storefront/primestyle-tryon.js +16 -20
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -8858,6 +8858,7 @@ function SizeResultView({
|
|
|
8858
8858
|
const tryOnDone = !!resultImageUrl && !tryOnProcessing;
|
|
8859
8859
|
const allDone = hasPhoto ? sizingDone && tryOnDone : sizingDone;
|
|
8860
8860
|
const isMobile = useIsMobile();
|
|
8861
|
+
const isAccessory = measurementType === "face" || measurementType === "head";
|
|
8861
8862
|
console.log("[PS-SDK] SizeResultView render:", {
|
|
8862
8863
|
hasPhoto,
|
|
8863
8864
|
isSnapProcessing,
|
|
@@ -9142,6 +9143,17 @@ function SizeResultView({
|
|
|
9142
9143
|
" →"
|
|
9143
9144
|
]
|
|
9144
9145
|
}
|
|
9146
|
+
) : isAccessory ? /* @__PURE__ */ jsxs(
|
|
9147
|
+
"button",
|
|
9148
|
+
{
|
|
9149
|
+
className: "ps-tryon-v2-cta",
|
|
9150
|
+
style: { marginTop: 0 },
|
|
9151
|
+
onClick: onClose,
|
|
9152
|
+
children: [
|
|
9153
|
+
t("Continue Shopping"),
|
|
9154
|
+
" →"
|
|
9155
|
+
]
|
|
9156
|
+
}
|
|
9145
9157
|
) : /* @__PURE__ */ jsxs(
|
|
9146
9158
|
"button",
|
|
9147
9159
|
{
|
|
@@ -9191,7 +9203,7 @@ function SizeResultView({
|
|
|
9191
9203
|
onBack: resultImageUrl ? onClose || (() => setView("body-profile")) : () => setView("body-profile"),
|
|
9192
9204
|
backLabel: t("Back"),
|
|
9193
9205
|
internationalSizes: sizingResult?.internationalSizes,
|
|
9194
|
-
onTryOn: resultImageUrl ? void 0 : handleSingleTryOn,
|
|
9206
|
+
onTryOn: resultImageUrl || isAccessory ? void 0 : handleSingleTryOn,
|
|
9195
9207
|
continueLabel: resultImageUrl ? t("Continue Shopping") : void 0,
|
|
9196
9208
|
tryOnProcessing,
|
|
9197
9209
|
productImage: resultImageUrl || productImage,
|
|
@@ -9237,7 +9249,7 @@ function SizeResultView({
|
|
|
9237
9249
|
onBack: resultImageUrl ? onClose || (() => setView("body-profile")) : () => setView("body-profile"),
|
|
9238
9250
|
backLabel: t("Back"),
|
|
9239
9251
|
internationalSizes: sizingResult?.internationalSizes,
|
|
9240
|
-
onTryOn: resultImageUrl ? void 0 : handleSingleTryOn,
|
|
9252
|
+
onTryOn: resultImageUrl || isAccessory ? void 0 : handleSingleTryOn,
|
|
9241
9253
|
continueLabel: resultImageUrl ? t("Continue Shopping") : void 0,
|
|
9242
9254
|
tryOnProcessing,
|
|
9243
9255
|
t
|
|
@@ -9246,7 +9258,7 @@ function SizeResultView({
|
|
|
9246
9258
|
] });
|
|
9247
9259
|
})()
|
|
9248
9260
|
),
|
|
9249
|
-
showPhotoGuide && /* @__PURE__ */ jsx("div", { className: "ps-tryon-sr-chart-overlay", children: isMobile ? (
|
|
9261
|
+
showPhotoGuide && !isAccessory && /* @__PURE__ */ jsx("div", { className: "ps-tryon-sr-chart-overlay", children: isMobile ? (
|
|
9250
9262
|
/* ── Mobile: same layout as the AI-sizing photo step
|
|
9251
9263
|
(PhotoStepMobile) — title + subtitle, large preview,
|
|
9252
9264
|
checklist card, primary CTA + RETAKE secondary. ── */
|
|
@@ -12608,23 +12620,7 @@ function AccessorySizeView({
|
|
|
12608
12620
|
] }) });
|
|
12609
12621
|
}
|
|
12610
12622
|
return /* @__PURE__ */ jsxs("div", { className: "ps-bp-layout", children: [
|
|
12611
|
-
/* @__PURE__ */ jsx("div", { className: "ps-bp-image", style: { position: "relative",
|
|
12612
|
-
/* Photo step: show preview if uploaded, otherwise empty */
|
|
12613
|
-
photoPreview ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12614
|
-
/* @__PURE__ */ jsx("img", { src: photoPreview, alt: "preview", className: "ps-bp-image-img" }),
|
|
12615
|
-
/* @__PURE__ */ jsx(
|
|
12616
|
-
"button",
|
|
12617
|
-
{
|
|
12618
|
-
onClick: handleRemovePhoto,
|
|
12619
|
-
style: { position: "absolute", top: "0.5vw", right: "0.5vw", width: "1.6vw", height: "1.6vw", borderRadius: "50%", background: "rgba(0,0,0,0.55)", border: "none", color: "#fff", fontSize: "0.9vw", cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "center" },
|
|
12620
|
-
children: "×"
|
|
12621
|
-
}
|
|
12622
|
-
)
|
|
12623
|
-
] }) : null
|
|
12624
|
-
) : (
|
|
12625
|
-
/* Manual step: product image */
|
|
12626
|
-
/* @__PURE__ */ jsx("img", { src: productImage, alt: productTitle, className: "ps-bp-image-img" })
|
|
12627
|
-
) }),
|
|
12623
|
+
step !== "photo" && /* @__PURE__ */ jsx("div", { className: "ps-bp-image", style: { position: "relative" }, children: /* @__PURE__ */ jsx("img", { src: productImage, alt: productTitle, className: "ps-bp-image-img" }) }),
|
|
12628
12624
|
/* @__PURE__ */ jsx("div", { className: "ps-bp-root", children: step === "photo" ? (
|
|
12629
12625
|
/* ── Photo step — identical to BodyProfileView photo step ── */
|
|
12630
12626
|
/* @__PURE__ */ jsxs("div", { className: "ps-bp-wrapper", style: { display: "flex", flexDirection: "column", width: "100%", height: "100%" }, children: [
|
|
@@ -18282,6 +18282,7 @@ function SizeResultView({
|
|
|
18282
18282
|
const tryOnDone = !!resultImageUrl && !tryOnProcessing;
|
|
18283
18283
|
const allDone = hasPhoto ? sizingDone && tryOnDone : sizingDone;
|
|
18284
18284
|
const isMobile = useIsMobile();
|
|
18285
|
+
const isAccessory = measurementType === "face" || measurementType === "head";
|
|
18285
18286
|
console.log("[PS-SDK] SizeResultView render:", {
|
|
18286
18287
|
hasPhoto,
|
|
18287
18288
|
isSnapProcessing,
|
|
@@ -18566,6 +18567,17 @@ function SizeResultView({
|
|
|
18566
18567
|
" →"
|
|
18567
18568
|
]
|
|
18568
18569
|
}
|
|
18570
|
+
) : isAccessory ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
18571
|
+
"button",
|
|
18572
|
+
{
|
|
18573
|
+
className: "ps-tryon-v2-cta",
|
|
18574
|
+
style: { marginTop: 0 },
|
|
18575
|
+
onClick: onClose,
|
|
18576
|
+
children: [
|
|
18577
|
+
t2("Continue Shopping"),
|
|
18578
|
+
" →"
|
|
18579
|
+
]
|
|
18580
|
+
}
|
|
18569
18581
|
) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
18570
18582
|
"button",
|
|
18571
18583
|
{
|
|
@@ -18615,7 +18627,7 @@ function SizeResultView({
|
|
|
18615
18627
|
onBack: resultImageUrl ? onClose || (() => setView("body-profile")) : () => setView("body-profile"),
|
|
18616
18628
|
backLabel: t2("Back"),
|
|
18617
18629
|
internationalSizes: sizingResult?.internationalSizes,
|
|
18618
|
-
onTryOn: resultImageUrl ? void 0 : handleSingleTryOn,
|
|
18630
|
+
onTryOn: resultImageUrl || isAccessory ? void 0 : handleSingleTryOn,
|
|
18619
18631
|
continueLabel: resultImageUrl ? t2("Continue Shopping") : void 0,
|
|
18620
18632
|
tryOnProcessing,
|
|
18621
18633
|
productImage: resultImageUrl || productImage,
|
|
@@ -18661,7 +18673,7 @@ function SizeResultView({
|
|
|
18661
18673
|
onBack: resultImageUrl ? onClose || (() => setView("body-profile")) : () => setView("body-profile"),
|
|
18662
18674
|
backLabel: t2("Back"),
|
|
18663
18675
|
internationalSizes: sizingResult?.internationalSizes,
|
|
18664
|
-
onTryOn: resultImageUrl ? void 0 : handleSingleTryOn,
|
|
18676
|
+
onTryOn: resultImageUrl || isAccessory ? void 0 : handleSingleTryOn,
|
|
18665
18677
|
continueLabel: resultImageUrl ? t2("Continue Shopping") : void 0,
|
|
18666
18678
|
tryOnProcessing,
|
|
18667
18679
|
t: t2
|
|
@@ -18670,7 +18682,7 @@ function SizeResultView({
|
|
|
18670
18682
|
] });
|
|
18671
18683
|
})()
|
|
18672
18684
|
),
|
|
18673
|
-
showPhotoGuide && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-tryon-sr-chart-overlay", children: isMobile ? (
|
|
18685
|
+
showPhotoGuide && !isAccessory && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-tryon-sr-chart-overlay", children: isMobile ? (
|
|
18674
18686
|
/* ── Mobile: same layout as the AI-sizing photo step
|
|
18675
18687
|
(PhotoStepMobile) — title + subtitle, large preview,
|
|
18676
18688
|
checklist card, primary CTA + RETAKE secondary. ── */
|
|
@@ -22032,23 +22044,7 @@ function AccessorySizeView({
|
|
|
22032
22044
|
] }) });
|
|
22033
22045
|
}
|
|
22034
22046
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bp-layout", children: [
|
|
22035
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-bp-image", style: { position: "relative",
|
|
22036
|
-
/* Photo step: show preview if uploaded, otherwise empty */
|
|
22037
|
-
photoPreview ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
22038
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: photoPreview, alt: "preview", className: "ps-bp-image-img" }),
|
|
22039
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
22040
|
-
"button",
|
|
22041
|
-
{
|
|
22042
|
-
onClick: handleRemovePhoto,
|
|
22043
|
-
style: { position: "absolute", top: "0.5vw", right: "0.5vw", width: "1.6vw", height: "1.6vw", borderRadius: "50%", background: "rgba(0,0,0,0.55)", border: "none", color: "#fff", fontSize: "0.9vw", cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "center" },
|
|
22044
|
-
children: "×"
|
|
22045
|
-
}
|
|
22046
|
-
)
|
|
22047
|
-
] }) : null
|
|
22048
|
-
) : (
|
|
22049
|
-
/* Manual step: product image */
|
|
22050
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: productImage, alt: productTitle, className: "ps-bp-image-img" })
|
|
22051
|
-
) }),
|
|
22047
|
+
step !== "photo" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-bp-image", style: { position: "relative" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: productImage, alt: productTitle, className: "ps-bp-image-img" }) }),
|
|
22052
22048
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-bp-root", children: step === "photo" ? (
|
|
22053
22049
|
/* ── Photo step — identical to BodyProfileView photo step ── */
|
|
22054
22050
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bp-wrapper", style: { display: "flex", flexDirection: "column", width: "100%", height: "100%" }, children: [
|