@primestyleai/tryon 5.10.128 → 5.10.130

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.
@@ -22879,11 +22879,11 @@ function CreateProfileWizard({ onSave, onCancel, apiUrl, apiKey, onPhotoPreview,
22879
22879
  return false;
22880
22880
  }
22881
22881
  const w2 = parseFloat(weightVal);
22882
- const a = parseFloat(ageVal);
22883
22882
  if (!w2 || w2 <= 0) {
22884
22883
  setError(t2("Please enter a valid weight"));
22885
22884
  return false;
22886
22885
  }
22886
+ const a = parseFloat(ageVal);
22887
22887
  if (!a || a <= 0) {
22888
22888
  setError(t2("Please enter a valid age"));
22889
22889
  return false;
@@ -22901,6 +22901,7 @@ function CreateProfileWizard({ onSave, onCancel, apiUrl, apiKey, onPhotoPreview,
22901
22901
  };
22902
22902
  const buildManualPayload = () => {
22903
22903
  const heightRaw = unit === "in" ? (parseInt(heightFt, 10) || 0) * 12 + (parseInt(heightInch, 10) || 0) : parseFloat(heightVal);
22904
+ const a = parseFloat(ageVal);
22904
22905
  return {
22905
22906
  name: name.trim(),
22906
22907
  gender,
@@ -22911,7 +22912,7 @@ function CreateProfileWizard({ onSave, onCancel, apiUrl, apiKey, onPhotoPreview,
22911
22912
  weightKg: parseFloat(weightVal),
22912
22913
  height: heightRaw,
22913
22914
  weight: parseFloat(weightVal),
22914
- age: parseFloat(ageVal),
22915
+ ...a > 0 ? { age: a } : {},
22915
22916
  chestProfile: chestProfile || void 0,
22916
22917
  midsectionProfile: midsectionProfile || void 0,
22917
22918
  hipProfile: isWomen ? hipProfile || void 0 : seatProfile || void 0,
@@ -23257,6 +23258,26 @@ function CreateProfileWizard({ onSave, onCancel, apiUrl, apiKey, onPhotoPreview,
23257
23258
  ),
23258
23259
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-bp-inline-unit", children: unit === "in" ? "lbs" : "kg" })
23259
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
+ ] })
23260
23281
  ] })
23261
23282
  ] }),
23262
23283
  error && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-cpw-error", children: error })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primestyleai/tryon",
3
- "version": "5.10.128",
3
+ "version": "5.10.130",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",