@primestyleai/tryon 5.10.132 → 5.10.133

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.
@@ -25472,6 +25472,7 @@ function BodyProfileView({
25472
25472
  setPhotoStatus("");
25473
25473
  }
25474
25474
  }, [t2, ageConfirmed]);
25475
+ const seededProfileIdRef = reactExports.useRef(null);
25475
25476
  const handleRemovePhoto = reactExports.useCallback(() => {
25476
25477
  if (photoPreview && !photoFromProfile) URL.revokeObjectURL(photoPreview);
25477
25478
  setPhotoFile(null);
@@ -25482,12 +25483,15 @@ function BodyProfileView({
25482
25483
  }, [photoPreview, photoFromProfile]);
25483
25484
  reactExports.useEffect(() => {
25484
25485
  const profilePhoto = activeProfile?.photoBase64;
25485
- if (!profilePhoto || photoBase64 || photoPreview) return;
25486
+ const profileId = activeProfile?.id ?? null;
25487
+ if (!profilePhoto || !profileId) return;
25488
+ if (seededProfileIdRef.current === profileId) return;
25489
+ seededProfileIdRef.current = profileId;
25486
25490
  setPhotoBase64(profilePhoto);
25487
25491
  setPhotoPreview(profilePhoto);
25488
25492
  setPhotoFromProfile(true);
25489
25493
  setAgeConfirmed(true);
25490
- }, [activeProfile, photoBase64, photoPreview]);
25494
+ }, [activeProfile]);
25491
25495
  const validateBasics = reactExports.useCallback(() => {
25492
25496
  if (hUnit === "in") {
25493
25497
  const ft = parseFloat(heightFeet);
@@ -26288,11 +26292,11 @@ function BodyProfileView({
26288
26292
  /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: `ps-bp-system-btn${isImperialMode ? " ps-bp-system-active" : ""}`, onClick: photoSwitchToImperial, type: "button", children: t2("Imperial") })
26289
26293
  ] }),
26290
26294
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { marginTop: "auto", marginBottom: "auto" }, children: [
26291
- photoFromProfile && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bp-loaded-pill", role: "status", children: [
26295
+ photoFromProfile && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { display: "flex", justifyContent: "center", marginBottom: "0.7vw" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bp-loaded-pill", role: "status", children: [
26292
26296
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-bp-loaded-pill-dot", "aria-hidden": "true", children: "✓" }),
26293
26297
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-bp-loaded-pill-text", children: t2("Loaded from profile") }),
26294
26298
  /* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", className: "ps-bp-loaded-pill-clear", onClick: handleRemovePhoto, children: t2("Clear") })
26295
- ] }),
26299
+ ] }) }),
26296
26300
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bp-inline-fields", children: [
26297
26301
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bp-inline-row", children: [
26298
26302
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-bp-inline-label", children: t2("HEIGHT") }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primestyleai/tryon",
3
- "version": "5.10.132",
3
+ "version": "5.10.133",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",