@primestyleai/tryon 5.10.134 → 5.10.135

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.
@@ -22885,7 +22885,7 @@ function CreateProfileWizard({ onSave, onCancel, apiUrl, apiKey, onPhotoPreview,
22885
22885
  const CUP_OPTIONS_US2 = ["AA", "A", "B", "C", "D", "DD/E", "DDD/F", "G", "H", "I", "J"];
22886
22886
  const isWomen = gender === "female";
22887
22887
  const imgs = isWomen ? BODY_IMAGES.female : BODY_IMAGES.male;
22888
- const manualStepOrder = isWomen ? ["identity", "stomach", "seat", "hips", "bra"] : ["identity", "chest", "stomach", "seat"];
22888
+ const manualStepOrder = isWomen ? ["identity", "stomach", "seat", "hips"] : ["identity", "chest", "stomach", "seat"];
22889
22889
  const manualStepIdx = manualStepOrder.indexOf(manualStep);
22890
22890
  const manualStepCount = manualStepOrder.length;
22891
22891
  const isLastManualStep = manualStepIdx === manualStepCount - 1;
@@ -22937,6 +22937,10 @@ function CreateProfileWizard({ onSave, onCancel, apiUrl, apiKey, onPhotoPreview,
22937
22937
  setError(t2("Please enter a valid age"));
22938
22938
  return false;
22939
22939
  }
22940
+ if (isWomen && (!bandSize || !cupSize)) {
22941
+ setError(t2("Please select your bra band and cup size"));
22942
+ return false;
22943
+ }
22940
22944
  setError("");
22941
22945
  return true;
22942
22946
  };
@@ -23327,6 +23331,63 @@ function CreateProfileWizard({ onSave, onCancel, apiUrl, apiKey, onPhotoPreview,
23327
23331
  ),
23328
23332
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-bp-inline-unit", children: t2("years") })
23329
23333
  ] })
23334
+ ] }),
23335
+ isWomen && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: inlineBraWrapRef, children: [
23336
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bp-inline-row", children: [
23337
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-bp-inline-label", children: t2("BRA REGION") }),
23338
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-bp-inline-input-group", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
23339
+ MiniSelect$1,
23340
+ {
23341
+ value: braSizeRegion,
23342
+ options: Object.keys(BAND_SIZES$1),
23343
+ isOpen: inlineBraOpen === "region",
23344
+ onToggle: () => setInlineBraOpen(inlineBraOpen === "region" ? null : "region"),
23345
+ onSelect: (v2) => {
23346
+ setBraSizeRegion(v2);
23347
+ setBandSize(null);
23348
+ setCupSize(null);
23349
+ setInlineBraOpen(null);
23350
+ setError("");
23351
+ }
23352
+ }
23353
+ ) })
23354
+ ] }),
23355
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bp-inline-row", children: [
23356
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-bp-inline-label", children: t2("BAND") }),
23357
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-bp-inline-input-group", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
23358
+ MiniSelect$1,
23359
+ {
23360
+ value: bandSize,
23361
+ options: BAND_SIZES$1[braSizeRegion] || BAND_SIZES$1.US,
23362
+ placeholder: "—",
23363
+ isOpen: inlineBraOpen === "band",
23364
+ onToggle: () => setInlineBraOpen(inlineBraOpen === "band" ? null : "band"),
23365
+ onSelect: (v2) => {
23366
+ setBandSize(v2);
23367
+ setInlineBraOpen(null);
23368
+ setError("");
23369
+ }
23370
+ }
23371
+ ) })
23372
+ ] }),
23373
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bp-inline-row", children: [
23374
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-bp-inline-label", children: t2("CUP") }),
23375
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-bp-inline-input-group", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
23376
+ MiniSelect$1,
23377
+ {
23378
+ value: cupSize,
23379
+ options: CUP_OPTIONS_US2,
23380
+ placeholder: "—",
23381
+ isOpen: inlineBraOpen === "cup",
23382
+ onToggle: () => setInlineBraOpen(inlineBraOpen === "cup" ? null : "cup"),
23383
+ onSelect: (v2) => {
23384
+ setCupSize(v2);
23385
+ setInlineBraOpen(null);
23386
+ setError("");
23387
+ }
23388
+ }
23389
+ ) })
23390
+ ] })
23330
23391
  ] })
23331
23392
  ] }),
23332
23393
  error && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-cpw-error", children: error })
@@ -25490,7 +25551,8 @@ function BodyProfileView({
25490
25551
  setAge("");
25491
25552
  setBandSize(null);
25492
25553
  setCupSize(null);
25493
- }, [handleRemovePhoto]);
25554
+ onStartFresh?.();
25555
+ }, [handleRemovePhoto, onStartFresh]);
25494
25556
  reactExports.useEffect(() => {
25495
25557
  const profilePhoto = activeProfile?.photoBase64;
25496
25558
  const profileId = activeProfile?.id ?? null;
@@ -26313,6 +26375,15 @@ function BodyProfileView({
26313
26375
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-bp-loaded-pill-text", children: t2("Loaded from profile") }),
26314
26376
  /* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", className: "ps-bp-loaded-pill-clear", onClick: handleClearFromProfile, children: t2("Clear") })
26315
26377
  ] }) }),
26378
+ hasActiveProfileWithMeasurements && activeProfileName && /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "ps-bp-profile-hint", style: { textAlign: "center", margin: "0 0 0.5vw" }, children: [
26379
+ t2("Using"),
26380
+ " ",
26381
+ /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: activeProfileName }),
26382
+ onStartFresh && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
26383
+ " · ",
26384
+ /* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", className: "ps-bp-profile-hint-link", onClick: handleClearFromProfile, children: t2("start fresh") })
26385
+ ] })
26386
+ ] }),
26316
26387
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bp-inline-fields", children: [
26317
26388
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bp-inline-row", children: [
26318
26389
  /* @__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.134",
3
+ "version": "5.10.135",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",