@primestyleai/tryon 5.0.0 → 5.0.1

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.
@@ -6538,21 +6538,22 @@ function PrimeStyleTryonInner({
6538
6538
  for (const [k, v] of Object.entries(estData.estimates)) {
6539
6539
  formRef.current[k] = String(v);
6540
6540
  }
6541
+ const isSnap = !!data.snapMode;
6541
6542
  const resolvedGender = estData.detectedGender || data.gender;
6542
6543
  formRef.current.gender = resolvedGender;
6543
6544
  formRef.current.height = String(data.height);
6544
6545
  formRef.current.weight = String(data.weight);
6545
6546
  formRef.current.heightUnit = data.heightUnit;
6546
6547
  formRef.current.weightUnit = data.weightUnit;
6547
- const m = { gender: resolvedGender, sizingUnit, heightUnit: data.heightUnit, weightUnit: data.weightUnit };
6548
+ const m = isSnap ? { gender: resolvedGender, sizingUnit: "in" } : { gender: resolvedGender, sizingUnit, heightUnit: data.heightUnit, weightUnit: data.weightUnit };
6548
6549
  for (const [k, v] of Object.entries(estData.estimates)) {
6549
6550
  m[k] = v;
6550
6551
  }
6551
- m.height = data.height;
6552
+ if (!isSnap) m.height = data.height;
6552
6553
  const payload = {
6553
6554
  method: "exact",
6554
6555
  locale: sizingCountry,
6555
- sizingUnit,
6556
+ sizingUnit: isSnap ? "in" : sizingUnit,
6556
6557
  product: { title: productTitle, description: "", variants: [] },
6557
6558
  measurements: m
6558
6559
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primestyleai/tryon",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",