@primestyleai/tryon 5.6.13 → 5.6.14
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 +106 -1
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -7551,7 +7551,112 @@ function SizeResultView({
|
|
|
7551
7551
|
] })
|
|
7552
7552
|
] })
|
|
7553
7553
|
),
|
|
7554
|
-
showPhotoGuide && /* @__PURE__ */ jsx("div", { className: "ps-tryon-sr-chart-overlay", children:
|
|
7554
|
+
showPhotoGuide && /* @__PURE__ */ jsx("div", { className: "ps-tryon-sr-chart-overlay", children: isMobile ? (
|
|
7555
|
+
/* ── Mobile: same layout as the AI-sizing photo step
|
|
7556
|
+
(PhotoStepMobile) — title + subtitle, large preview,
|
|
7557
|
+
checklist card, primary CTA + RETAKE secondary. ── */
|
|
7558
|
+
/* @__PURE__ */ jsx("div", { className: "ps-bp-wrapper", style: { padding: "16px 16px 0", background: "var(--ps-bg-primary)" }, children: /* @__PURE__ */ jsxs("div", { className: "ps-pm-root", children: [
|
|
7559
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-pm-header", children: [
|
|
7560
|
+
/* @__PURE__ */ jsx("h2", { className: "ps-pm-title", children: t("Review your photo") }),
|
|
7561
|
+
/* @__PURE__ */ jsx("p", { className: "ps-pm-subtitle", children: t("Ensure your full body is visible for the most accurate virtual try-on.") })
|
|
7562
|
+
] }),
|
|
7563
|
+
/* @__PURE__ */ jsx(
|
|
7564
|
+
"input",
|
|
7565
|
+
{
|
|
7566
|
+
ref: guideInputRef,
|
|
7567
|
+
type: "file",
|
|
7568
|
+
accept: "image/jpeg,image/png,image/webp",
|
|
7569
|
+
style: { display: "none" },
|
|
7570
|
+
onChange: (e) => {
|
|
7571
|
+
const f = e.target.files?.[0];
|
|
7572
|
+
if (f) setGuideFile(f);
|
|
7573
|
+
}
|
|
7574
|
+
}
|
|
7575
|
+
),
|
|
7576
|
+
/* @__PURE__ */ jsx("div", { className: "ps-pm-preview", children: guideFile && guidePreviewUrl ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7577
|
+
/* @__PURE__ */ jsx("img", { src: guidePreviewUrl, alt: t("Your photo"), className: "ps-pm-preview-img" }),
|
|
7578
|
+
/* @__PURE__ */ jsx(
|
|
7579
|
+
"button",
|
|
7580
|
+
{
|
|
7581
|
+
type: "button",
|
|
7582
|
+
className: "ps-pm-preview-remove",
|
|
7583
|
+
onClick: () => setGuideFile(null),
|
|
7584
|
+
"aria-label": t("Remove photo"),
|
|
7585
|
+
children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", width: "14", height: "14", children: [
|
|
7586
|
+
/* @__PURE__ */ jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
7587
|
+
/* @__PURE__ */ jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
7588
|
+
] })
|
|
7589
|
+
}
|
|
7590
|
+
)
|
|
7591
|
+
] }) : /* @__PURE__ */ jsxs(
|
|
7592
|
+
"button",
|
|
7593
|
+
{
|
|
7594
|
+
type: "button",
|
|
7595
|
+
className: "ps-pm-preview-empty",
|
|
7596
|
+
onClick: () => guideInputRef.current?.click(),
|
|
7597
|
+
children: [
|
|
7598
|
+
/* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", width: "32", height: "32", children: [
|
|
7599
|
+
/* @__PURE__ */ jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
7600
|
+
/* @__PURE__ */ jsx("polyline", { points: "17 8 12 3 7 8" }),
|
|
7601
|
+
/* @__PURE__ */ jsx("line", { x1: "12", y1: "3", x2: "12", y2: "15" })
|
|
7602
|
+
] }),
|
|
7603
|
+
/* @__PURE__ */ jsx("span", { className: "ps-pm-preview-empty-title", children: t("Tap to upload") }),
|
|
7604
|
+
/* @__PURE__ */ jsx("span", { className: "ps-pm-preview-empty-hint", children: t("JPEG, PNG up to 10MB") })
|
|
7605
|
+
]
|
|
7606
|
+
}
|
|
7607
|
+
) }),
|
|
7608
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-pm-checklist", children: [
|
|
7609
|
+
/* @__PURE__ */ jsx("div", { className: "ps-pm-checklist-icon", children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "14", height: "14", children: /* @__PURE__ */ jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" }) }) }),
|
|
7610
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-pm-checklist-body", children: [
|
|
7611
|
+
/* @__PURE__ */ jsx("div", { className: "ps-pm-checklist-title", children: t("Checklist for accuracy") }),
|
|
7612
|
+
/* @__PURE__ */ jsxs("ul", { className: "ps-pm-checklist-items", children: [
|
|
7613
|
+
/* @__PURE__ */ jsx("li", { children: t("Form-fitting clothing is recommended") }),
|
|
7614
|
+
/* @__PURE__ */ jsx("li", { children: t("Standing 2-3 meters from camera") }),
|
|
7615
|
+
/* @__PURE__ */ jsx("li", { children: t("Neutral background with good lighting") })
|
|
7616
|
+
] })
|
|
7617
|
+
] })
|
|
7618
|
+
] }),
|
|
7619
|
+
/* @__PURE__ */ jsx("div", { className: "ps-bpm-spacer" }),
|
|
7620
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-bottom", children: [
|
|
7621
|
+
/* @__PURE__ */ jsx(
|
|
7622
|
+
"button",
|
|
7623
|
+
{
|
|
7624
|
+
type: "button",
|
|
7625
|
+
className: "ps-pm-primary-btn",
|
|
7626
|
+
disabled: !guideFile,
|
|
7627
|
+
onClick: () => {
|
|
7628
|
+
if (!guideFile) return;
|
|
7629
|
+
handleFileSelect(guideFile);
|
|
7630
|
+
handleTryOnSubmit();
|
|
7631
|
+
setShowPhotoGuide(false);
|
|
7632
|
+
setGuideFile(null);
|
|
7633
|
+
},
|
|
7634
|
+
children: t("START TRY-ON")
|
|
7635
|
+
}
|
|
7636
|
+
),
|
|
7637
|
+
guideFile ? /* @__PURE__ */ jsx(
|
|
7638
|
+
"button",
|
|
7639
|
+
{
|
|
7640
|
+
type: "button",
|
|
7641
|
+
className: "ps-pm-secondary-btn",
|
|
7642
|
+
onClick: () => guideInputRef.current?.click(),
|
|
7643
|
+
children: t("RETAKE PHOTO")
|
|
7644
|
+
}
|
|
7645
|
+
) : /* @__PURE__ */ jsx(
|
|
7646
|
+
"button",
|
|
7647
|
+
{
|
|
7648
|
+
type: "button",
|
|
7649
|
+
className: "ps-pm-secondary-btn",
|
|
7650
|
+
onClick: () => {
|
|
7651
|
+
setShowPhotoGuide(false);
|
|
7652
|
+
setGuideFile(null);
|
|
7653
|
+
},
|
|
7654
|
+
children: t("BACK")
|
|
7655
|
+
}
|
|
7656
|
+
)
|
|
7657
|
+
] })
|
|
7658
|
+
] }) })
|
|
7659
|
+
) : /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", padding: "1.5vw", width: "100%", height: "100%", background: "var(--ps-bg-primary)", borderRadius: "0.8vw", overflow: "hidden" }, children: [
|
|
7555
7660
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "1.2vw", flex: 1, alignItems: "stretch", minHeight: 0, overflow: "hidden" }, children: [
|
|
7556
7661
|
/* @__PURE__ */ jsxs(
|
|
7557
7662
|
"div",
|