@primestyleai/tryon 5.0.0 → 5.0.2
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 +11 -6
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -4679,12 +4679,16 @@ function SizeResultView({
|
|
|
4679
4679
|
/* @__PURE__ */ jsx("div", { className: "ps-tryon-snap-step-icon", children: bodyLandmarks ? /* @__PURE__ */ jsx("span", { className: "ps-tryon-snap-check", children: "✓" }) : /* @__PURE__ */ jsx("div", { className: "ps-tryon-size-loading-spinner", style: { width: "1vw", height: "1vw", borderWidth: "1.5px" } }) }),
|
|
4680
4680
|
/* @__PURE__ */ jsx("span", { children: t("Detecting body pose") })
|
|
4681
4681
|
] }),
|
|
4682
|
-
/* @__PURE__ */ jsxs("div", { className: `ps-tryon-snap-step${sizingDone ? " ps-
|
|
4683
|
-
/* @__PURE__ */ jsx("div", { className: "ps-tryon-snap-step-icon", children: sizingDone ? /* @__PURE__ */ jsx("span", { className: "ps-tryon-snap-check", children: "✓" }) : bodyLandmarks ? /* @__PURE__ */ jsx("div", { className: "ps-tryon-size-loading-spinner", style: { width: "1vw", height: "1vw", borderWidth: "1.5px" } }) : /* @__PURE__ */ jsx("span", { className: "ps-tryon-snap-num", children: "2" }) }),
|
|
4682
|
+
/* @__PURE__ */ jsxs("div", { className: `ps-tryon-snap-step${bodyLandmarks && !sizingDone ? " ps-active" : bodyLandmarks ? " ps-done" : ""}`, children: [
|
|
4683
|
+
/* @__PURE__ */ jsx("div", { className: "ps-tryon-snap-step-icon", children: bodyLandmarks && sizingDone ? /* @__PURE__ */ jsx("span", { className: "ps-tryon-snap-check", children: "✓" }) : bodyLandmarks ? /* @__PURE__ */ jsx("div", { className: "ps-tryon-size-loading-spinner", style: { width: "1vw", height: "1vw", borderWidth: "1.5px" } }) : /* @__PURE__ */ jsx("span", { className: "ps-tryon-snap-num", children: "2" }) }),
|
|
4684
4684
|
/* @__PURE__ */ jsx("span", { children: t("Analyzing your size") })
|
|
4685
4685
|
] }),
|
|
4686
|
+
/* @__PURE__ */ jsxs("div", { className: `ps-tryon-snap-step${sizingDone ? " ps-done" : bodyLandmarks ? " ps-active" : ""}`, children: [
|
|
4687
|
+
/* @__PURE__ */ jsx("div", { className: "ps-tryon-snap-step-icon", children: sizingDone ? /* @__PURE__ */ jsx("span", { className: "ps-tryon-snap-check", children: "✓" }) : bodyLandmarks ? /* @__PURE__ */ jsx("div", { className: "ps-tryon-size-loading-spinner", style: { width: "1vw", height: "1vw", borderWidth: "1.5px" } }) : /* @__PURE__ */ jsx("span", { className: "ps-tryon-snap-num", children: "3" }) }),
|
|
4688
|
+
/* @__PURE__ */ jsx("span", { children: t("Finding best fit for you") })
|
|
4689
|
+
] }),
|
|
4686
4690
|
tryOnProcessing && /* @__PURE__ */ jsxs("div", { className: `ps-tryon-snap-step${tryOnDone ? " ps-done" : sizingDone ? " ps-active" : ""}`, children: [
|
|
4687
|
-
/* @__PURE__ */ jsx("div", { className: "ps-tryon-snap-step-icon", children: tryOnDone ? /* @__PURE__ */ jsx("span", { className: "ps-tryon-snap-check", children: "✓" }) : sizingDone ? /* @__PURE__ */ jsx("div", { className: "ps-tryon-size-loading-spinner", style: { width: "1vw", height: "1vw", borderWidth: "1.5px" } }) : /* @__PURE__ */ jsx("span", { className: "ps-tryon-snap-num", children: "
|
|
4691
|
+
/* @__PURE__ */ jsx("div", { className: "ps-tryon-snap-step-icon", children: tryOnDone ? /* @__PURE__ */ jsx("span", { className: "ps-tryon-snap-check", children: "✓" }) : sizingDone ? /* @__PURE__ */ jsx("div", { className: "ps-tryon-size-loading-spinner", style: { width: "1vw", height: "1vw", borderWidth: "1.5px" } }) : /* @__PURE__ */ jsx("span", { className: "ps-tryon-snap-num", children: "4" }) }),
|
|
4688
4692
|
/* @__PURE__ */ jsx("span", { children: t("Generating virtual try-on") })
|
|
4689
4693
|
] })
|
|
4690
4694
|
] })
|
|
@@ -6538,21 +6542,22 @@ function PrimeStyleTryonInner({
|
|
|
6538
6542
|
for (const [k, v] of Object.entries(estData.estimates)) {
|
|
6539
6543
|
formRef.current[k] = String(v);
|
|
6540
6544
|
}
|
|
6545
|
+
const isSnap = !!data.snapMode;
|
|
6541
6546
|
const resolvedGender = estData.detectedGender || data.gender;
|
|
6542
6547
|
formRef.current.gender = resolvedGender;
|
|
6543
6548
|
formRef.current.height = String(data.height);
|
|
6544
6549
|
formRef.current.weight = String(data.weight);
|
|
6545
6550
|
formRef.current.heightUnit = data.heightUnit;
|
|
6546
6551
|
formRef.current.weightUnit = data.weightUnit;
|
|
6547
|
-
const m = { gender: resolvedGender, sizingUnit, heightUnit: data.heightUnit, weightUnit: data.weightUnit };
|
|
6552
|
+
const m = isSnap ? { gender: resolvedGender, sizingUnit: "in" } : { gender: resolvedGender, sizingUnit, heightUnit: data.heightUnit, weightUnit: data.weightUnit };
|
|
6548
6553
|
for (const [k, v] of Object.entries(estData.estimates)) {
|
|
6549
6554
|
m[k] = v;
|
|
6550
6555
|
}
|
|
6551
|
-
m.height = data.height;
|
|
6556
|
+
if (!isSnap) m.height = data.height;
|
|
6552
6557
|
const payload = {
|
|
6553
6558
|
method: "exact",
|
|
6554
6559
|
locale: sizingCountry,
|
|
6555
|
-
sizingUnit,
|
|
6560
|
+
sizingUnit: isSnap ? "in" : sizingUnit,
|
|
6556
6561
|
product: { title: productTitle, description: "", variants: [] },
|
|
6557
6562
|
measurements: m
|
|
6558
6563
|
};
|