@primestyleai/tryon 5.10.129 → 5.10.131

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.
@@ -22883,6 +22883,11 @@ function CreateProfileWizard({ onSave, onCancel, apiUrl, apiKey, onPhotoPreview,
22883
22883
  setError(t2("Please enter a valid weight"));
22884
22884
  return false;
22885
22885
  }
22886
+ const a = parseFloat(ageVal);
22887
+ if (!a || a <= 0) {
22888
+ setError(t2("Please enter a valid age"));
22889
+ return false;
22890
+ }
22886
22891
  setError("");
22887
22892
  return true;
22888
22893
  };
@@ -23253,6 +23258,26 @@ function CreateProfileWizard({ onSave, onCancel, apiUrl, apiKey, onPhotoPreview,
23253
23258
  ),
23254
23259
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-bp-inline-unit", children: unit === "in" ? "lbs" : "kg" })
23255
23260
  ] })
23261
+ ] }),
23262
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bp-inline-row", children: [
23263
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-bp-inline-label", children: t2("AGE") }),
23264
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bp-inline-input-group", children: [
23265
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
23266
+ "input",
23267
+ {
23268
+ type: "number",
23269
+ inputMode: "numeric",
23270
+ className: "ps-bp-inline-input",
23271
+ value: ageVal,
23272
+ placeholder: t2("e.g. 30"),
23273
+ onChange: (e) => {
23274
+ setAgeVal(e.target.value);
23275
+ setError("");
23276
+ }
23277
+ }
23278
+ ),
23279
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-bp-inline-unit", children: t2("years") })
23280
+ ] })
23256
23281
  ] })
23257
23282
  ] }),
23258
23283
  error && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-cpw-error", children: error })
@@ -29633,7 +29658,7 @@ function PrimeStyleTryonInner({
29633
29658
  lastUsedAt: Date.now()
29634
29659
  };
29635
29660
  const nextProfiles = [newProfile, ...profiles];
29636
- lsSet("profiles", nextProfiles);
29661
+ saveProfiles(nextProfiles);
29637
29662
  setProfiles(nextProfiles);
29638
29663
  setActiveProfileId$1(newProfile.id);
29639
29664
  const heightVal = newProfile.heightCm || newProfile.height || 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primestyleai/tryon",
3
- "version": "5.10.129",
3
+ "version": "5.10.131",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",