@primestyleai/tryon 4.9.8 → 4.9.9

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.
@@ -5622,8 +5622,8 @@ function BodyProfileView({
5622
5622
  photoBase64,
5623
5623
  height: 0,
5624
5624
  weight: 0,
5625
- heightUnit: "ft",
5626
- weightUnit: "lbs",
5625
+ heightUnit: "cm",
5626
+ weightUnit: "kg",
5627
5627
  gender: "male",
5628
5628
  snapMode: true
5629
5629
  });
@@ -6480,15 +6480,19 @@ function PrimeStyleTryonInner({
6480
6480
  const estRes = await fetch(`${baseUrl}/api/v1/sizing/estimate`, {
6481
6481
  method: "POST",
6482
6482
  headers: { "Content-Type": "application/json", Authorization: `Bearer ${key}` },
6483
- body: JSON.stringify({
6484
- ...data.snapMode ? {} : { height: data.height, weight: data.weight },
6483
+ body: JSON.stringify(data.snapMode ? {
6484
+ snapMode: true,
6485
+ bodyImage: data.photoBase64,
6486
+ requiredFields: requiredFieldKeys.length > 0 ? requiredFieldKeys : void 0
6487
+ } : {
6488
+ height: data.height,
6489
+ weight: data.weight,
6485
6490
  heightUnit: data.heightUnit,
6486
6491
  weightUnit: data.weightUnit,
6487
6492
  gender: data.gender,
6488
6493
  requiredFields: requiredFieldKeys,
6489
6494
  bodyImage: data.photoBase64,
6490
- ...data.age && { age: data.age },
6491
- ...data.snapMode && { snapMode: true }
6495
+ ...data.age && { age: data.age }
6492
6496
  })
6493
6497
  });
6494
6498
  if (estRes.ok) estData = await estRes.json();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primestyleai/tryon",
3
- "version": "4.9.8",
3
+ "version": "4.9.9",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",