@primestyleai/tryon 5.10.115 → 5.10.117

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.
@@ -18048,6 +18048,21 @@ const STYLES$1 = `
18048
18048
  color: var(--ps-error-color); font-size: 0.73vw; margin: 0;
18049
18049
  }
18050
18050
 
18051
+ /* Photo step → manual measurements escape hatch (desktop only — mobile
18052
+ uses MobileBottomTabs). Subtle inline link, sits just above the
18053
+ back/analyze nav row. */
18054
+ .ps-bp-photo-manual-switch {
18055
+ text-align: center; padding: 0.5vw 0 0.3vw;
18056
+ font-size: 0.78vw; color: var(--ps-text-muted);
18057
+ }
18058
+ .ps-bp-photo-manual-link {
18059
+ background: none; border: none; padding: 0;
18060
+ color: var(--ps-accent); font-weight: 600; cursor: pointer;
18061
+ font-size: inherit; font-family: inherit; text-decoration: underline;
18062
+ text-underline-offset: 2px;
18063
+ }
18064
+ .ps-bp-photo-manual-link:hover { color: var(--ps-accent-hover); }
18065
+
18051
18066
  /* Navigation — back left, next right */
18052
18067
  .ps-bp-nav {
18053
18068
  display: flex; align-items: center; margin-top: auto;
@@ -25223,7 +25238,7 @@ function BodyProfileView({
25223
25238
  t: t2
25224
25239
  }) {
25225
25240
  const steps = isWomen ? FEMALE_STEPS : MALE_STEPS;
25226
- const [step, setStep] = reactExports.useState("basics");
25241
+ const [step, setStep] = reactExports.useState("photo");
25227
25242
  step === "photo" ? 0 : steps.indexOf(step);
25228
25243
  const isMobile = useIsMobile();
25229
25244
  const imperial = isImperial(sizingCountry);
@@ -26339,23 +26354,38 @@ function BodyProfileView({
26339
26354
  }
26340
26355
  )
26341
26356
  ] })
26342
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bp-nav", children: [
26343
- /* @__PURE__ */ jsxRuntimeExports.jsxs("button", { className: "ps-bp-back-btn", onClick: handleBackStep, type: "button", children: [
26344
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-bp-back-arrow", children: "←" }),
26357
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
26358
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bp-photo-manual-switch", children: [
26359
+ t2("Prefer not to upload a photo?"),
26345
26360
  " ",
26346
- t2("Back")
26361
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
26362
+ "button",
26363
+ {
26364
+ type: "button",
26365
+ className: "ps-bp-photo-manual-link",
26366
+ onClick: () => setStep("basics"),
26367
+ children: t2("Enter measurements manually")
26368
+ }
26369
+ )
26347
26370
  ] }),
26348
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26349
- "button",
26350
- {
26351
- className: `ps-bp-next-btn${analyzeDisabled ? " ps-bp-btn-disabled" : ""}`,
26352
- onClick: handleNext,
26353
- disabled: analyzeDisabled,
26354
- type: "button",
26355
- title: analyzeDisabled ? analyzeMissing.join(" · ") : void 0,
26356
- children: analyzeLabel
26357
- }
26358
- )
26371
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bp-nav", children: [
26372
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("button", { className: "ps-bp-back-btn", onClick: handleBackStep, type: "button", children: [
26373
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-bp-back-arrow", children: "←" }),
26374
+ " ",
26375
+ t2("Back")
26376
+ ] }),
26377
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
26378
+ "button",
26379
+ {
26380
+ className: `ps-bp-next-btn${analyzeDisabled ? " ps-bp-btn-disabled" : ""}`,
26381
+ onClick: handleNext,
26382
+ disabled: analyzeDisabled,
26383
+ type: "button",
26384
+ title: analyzeDisabled ? analyzeMissing.join(" · ") : void 0,
26385
+ children: analyzeLabel
26386
+ }
26387
+ )
26388
+ ] })
26359
26389
  ] })
26360
26390
  ] });
26361
26391
  }
@@ -27816,7 +27846,7 @@ function PrimeStyleTryonInner({
27816
27846
  fetch(`${baseUrl}/api/catalog/pick-best-garment-image`, {
27817
27847
  method: "POST",
27818
27848
  headers: { "Content-Type": "application/json" },
27819
- body: JSON.stringify({ images: productImages }),
27849
+ body: JSON.stringify({ images: productImages, productTitle }),
27820
27850
  signal: ctrl.signal
27821
27851
  }).then((r2) => r2.ok ? r2.json() : null).then((j) => {
27822
27852
  if (j?.bestUrl) {
@@ -27826,7 +27856,7 @@ function PrimeStyleTryonInner({
27826
27856
  }).catch(() => {
27827
27857
  });
27828
27858
  return () => ctrl.abort();
27829
- }, [productImages, garmentReferenceImage, apiUrl]);
27859
+ }, [productImages, garmentReferenceImage, apiUrl, productTitle]);
27830
27860
  const TARGET_SECONDS2 = 22;
27831
27861
  const progressRef = reactExports.useRef(0);
27832
27862
  const progressBarRef = reactExports.useRef(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primestyleai/tryon",
3
- "version": "5.10.115",
3
+ "version": "5.10.117",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",