@primestyleai/tryon 5.8.41 → 5.8.43
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
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. ── */
|
|
@@ -10365,7 +10377,7 @@ function CreateProfileWizard({ onSave, onCancel, onPhotoPreview, onEstimate, t }
|
|
|
10365
10377
|
setAgeConfirmed(true);
|
|
10366
10378
|
setError("");
|
|
10367
10379
|
},
|
|
10368
|
-
children: t("Yes
|
|
10380
|
+
children: t("Yes")
|
|
10369
10381
|
}
|
|
10370
10382
|
),
|
|
10371
10383
|
/* @__PURE__ */ jsx(
|
|
@@ -10374,7 +10386,7 @@ function CreateProfileWizard({ onSave, onCancel, onPhotoPreview, onEstimate, t }
|
|
|
10374
10386
|
type: "button",
|
|
10375
10387
|
className: "ps-cpw-age-gate-btn ps-cpw-age-gate-btn-secondary",
|
|
10376
10388
|
onClick: () => setAgeConfirmed(false),
|
|
10377
|
-
children: t("No
|
|
10389
|
+
children: t("No")
|
|
10378
10390
|
}
|
|
10379
10391
|
)
|
|
10380
10392
|
] })
|
|
@@ -11324,8 +11336,8 @@ function PhotoStepMobile({
|
|
|
11324
11336
|
/* @__PURE__ */ jsx("div", { className: "ps-pm-age-gate-eyebrow", children: t("AGE VERIFICATION") }),
|
|
11325
11337
|
/* @__PURE__ */ jsx("div", { className: "ps-pm-age-gate-question", children: t("Is the person in this photo 18 years or older?") }),
|
|
11326
11338
|
/* @__PURE__ */ jsxs("div", { className: "ps-pm-age-gate-actions", children: [
|
|
11327
|
-
/* @__PURE__ */ jsx("button", { type: "button", className: "ps-pm-age-gate-btn ps-pm-age-gate-btn-primary", onClick: () => setAgeConfirmed(true), children: t("Yes
|
|
11328
|
-
/* @__PURE__ */ jsx("button", { type: "button", className: "ps-pm-age-gate-btn ps-pm-age-gate-btn-secondary", onClick: () => setAgeConfirmed(false), children: t("No
|
|
11339
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "ps-pm-age-gate-btn ps-pm-age-gate-btn-primary", onClick: () => setAgeConfirmed(true), children: t("Yes") }),
|
|
11340
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "ps-pm-age-gate-btn ps-pm-age-gate-btn-secondary", onClick: () => setAgeConfirmed(false), children: t("No") })
|
|
11329
11341
|
] })
|
|
11330
11342
|
] }) }),
|
|
11331
11343
|
ageConfirmed === false && /* @__PURE__ */ jsx("div", { className: "ps-pm-age-gate", role: "alert", children: /* @__PURE__ */ jsxs("div", { className: "ps-pm-age-gate-card", children: [
|
|
@@ -11901,7 +11913,7 @@ function BodyProfileView({
|
|
|
11901
11913
|
cursor: "pointer",
|
|
11902
11914
|
transition: "transform 0.18s, background 0.18s"
|
|
11903
11915
|
},
|
|
11904
|
-
children: t("Yes
|
|
11916
|
+
children: t("Yes")
|
|
11905
11917
|
}
|
|
11906
11918
|
),
|
|
11907
11919
|
/* @__PURE__ */ jsx(
|
|
@@ -11922,7 +11934,7 @@ function BodyProfileView({
|
|
|
11922
11934
|
cursor: "pointer",
|
|
11923
11935
|
transition: "background 0.18s, border-color 0.18s"
|
|
11924
11936
|
},
|
|
11925
|
-
children: t("No
|
|
11937
|
+
children: t("No")
|
|
11926
11938
|
}
|
|
11927
11939
|
)
|
|
11928
11940
|
] })
|
|
@@ -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. ── */
|
|
@@ -19789,7 +19801,7 @@ function CreateProfileWizard({ onSave, onCancel, onPhotoPreview, onEstimate, t:
|
|
|
19789
19801
|
setAgeConfirmed(true);
|
|
19790
19802
|
setError("");
|
|
19791
19803
|
},
|
|
19792
|
-
children: t2("Yes
|
|
19804
|
+
children: t2("Yes")
|
|
19793
19805
|
}
|
|
19794
19806
|
),
|
|
19795
19807
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -19798,7 +19810,7 @@ function CreateProfileWizard({ onSave, onCancel, onPhotoPreview, onEstimate, t:
|
|
|
19798
19810
|
type: "button",
|
|
19799
19811
|
className: "ps-cpw-age-gate-btn ps-cpw-age-gate-btn-secondary",
|
|
19800
19812
|
onClick: () => setAgeConfirmed(false),
|
|
19801
|
-
children: t2("No
|
|
19813
|
+
children: t2("No")
|
|
19802
19814
|
}
|
|
19803
19815
|
)
|
|
19804
19816
|
] })
|
|
@@ -20748,8 +20760,8 @@ function PhotoStepMobile({
|
|
|
20748
20760
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-pm-age-gate-eyebrow", children: t2("AGE VERIFICATION") }),
|
|
20749
20761
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-pm-age-gate-question", children: t2("Is the person in this photo 18 years or older?") }),
|
|
20750
20762
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-pm-age-gate-actions", children: [
|
|
20751
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", className: "ps-pm-age-gate-btn ps-pm-age-gate-btn-primary", onClick: () => setAgeConfirmed(true), children: t2("Yes
|
|
20752
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", className: "ps-pm-age-gate-btn ps-pm-age-gate-btn-secondary", onClick: () => setAgeConfirmed(false), children: t2("No
|
|
20763
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", className: "ps-pm-age-gate-btn ps-pm-age-gate-btn-primary", onClick: () => setAgeConfirmed(true), children: t2("Yes") }),
|
|
20764
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", className: "ps-pm-age-gate-btn ps-pm-age-gate-btn-secondary", onClick: () => setAgeConfirmed(false), children: t2("No") })
|
|
20753
20765
|
] })
|
|
20754
20766
|
] }) }),
|
|
20755
20767
|
ageConfirmed === false && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-pm-age-gate", role: "alert", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-pm-age-gate-card", children: [
|
|
@@ -21325,7 +21337,7 @@ function BodyProfileView({
|
|
|
21325
21337
|
cursor: "pointer",
|
|
21326
21338
|
transition: "transform 0.18s, background 0.18s"
|
|
21327
21339
|
},
|
|
21328
|
-
children: t2("Yes
|
|
21340
|
+
children: t2("Yes")
|
|
21329
21341
|
}
|
|
21330
21342
|
),
|
|
21331
21343
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -21346,7 +21358,7 @@ function BodyProfileView({
|
|
|
21346
21358
|
cursor: "pointer",
|
|
21347
21359
|
transition: "background 0.18s, border-color 0.18s"
|
|
21348
21360
|
},
|
|
21349
|
-
children: t2("No
|
|
21361
|
+
children: t2("No")
|
|
21350
21362
|
}
|
|
21351
21363
|
)
|
|
21352
21364
|
] })
|