@primestyleai/tryon 5.10.1 → 5.10.3

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.
@@ -7627,7 +7627,7 @@ function MscTryOnProgress({ t }) {
7627
7627
  if (ringRef.current) ringRef.current.style.strokeDashoffset = String(MSC_RING_CIRC * (1 - pct / 100));
7628
7628
  if (etaRef.current) {
7629
7629
  const remaining = Math.max(0, MSC_TRYON_TARGET_SECONDS - Math.floor(elapsed));
7630
- etaRef.current.textContent = elapsed >= MSC_TRYON_TARGET_SECONDS ? t("Finalizing...") : `~${remaining}s`;
7630
+ etaRef.current.textContent = elapsed >= MSC_TRYON_TARGET_SECONDS ? "•••" : `~${remaining}s`;
7631
7631
  }
7632
7632
  }, 200);
7633
7633
  return () => clearInterval(id);
@@ -7887,30 +7887,22 @@ function MultiSectionMobile({
7887
7887
  children: t("Continue Shopping")
7888
7888
  }
7889
7889
  )
7890
- ] }) : sizingResult?.found === false ? (
7891
- // Backend couldn't find a size that fits Try-On is meaningless
7892
- // without a recommendation, so surface a clear terminal action.
7893
- /* @__PURE__ */ jsx(
7890
+ ] }) : (
7891
+ // Try-On stays enabled even when the backend couldn't find a size —
7892
+ // it's a visual preview, independent of the recommendation.
7893
+ /* @__PURE__ */ jsxs(
7894
7894
  "button",
7895
7895
  {
7896
7896
  type: "button",
7897
7897
  className: "ps-msr-tryon-cta",
7898
- onClick: onClose,
7899
- children: t("Continue Shopping")
7898
+ onClick: onTryOn,
7899
+ disabled: tryOnProcessing,
7900
+ children: [
7901
+ /* @__PURE__ */ jsx(CameraIcon, {}),
7902
+ tryOnProcessing ? t("Processing...") : t("See how it looks on yourself")
7903
+ ]
7900
7904
  }
7901
7905
  )
7902
- ) : /* @__PURE__ */ jsxs(
7903
- "button",
7904
- {
7905
- type: "button",
7906
- className: "ps-msr-tryon-cta",
7907
- onClick: onTryOn,
7908
- disabled: tryOnProcessing,
7909
- children: [
7910
- /* @__PURE__ */ jsx(CameraIcon, {}),
7911
- tryOnProcessing ? t("Processing...") : t("See how it looks on yourself")
7912
- ]
7913
- }
7914
7906
  ) }),
7915
7907
  sizeGuide ? null : null
7916
7908
  ] });
@@ -7958,7 +7950,7 @@ function TryOnProgress({ t, isActive }) {
7958
7950
  }
7959
7951
  if (etaRef.current) {
7960
7952
  const remaining = Math.max(0, TRYON_TARGET_SECONDS - Math.floor(elapsed));
7961
- etaRef.current.textContent = elapsed >= TRYON_TARGET_SECONDS ? t("Finalizing...") : `~${remaining}s`;
7953
+ etaRef.current.textContent = elapsed >= TRYON_TARGET_SECONDS ? "•••" : `~${remaining}s`;
7962
7954
  }
7963
7955
  }, 200);
7964
7956
  return () => clearInterval(id);
@@ -8422,8 +8414,7 @@ function SectionDetailView({
8422
8414
  const hasBadFit = details.some((d) => BAD_FIT.test(d.fit || ""));
8423
8415
  return hasBadFit ? t("Not Recommended") : t("Your Selection");
8424
8416
  }, [isRecommended, sectionResult, t]);
8425
- const noFitMessage = t("We couldn't find a size that fits for this product");
8426
- const displaySizeLabel = sectionFound === false ? noFitMessage : selectedCountry && isRecommended && internationalSizes && internationalSizes[selectedCountry] ? internationalSizes[selectedCountry] : displaySize;
8417
+ const displaySizeLabel = selectedCountry && isRecommended && internationalSizes && internationalSizes[selectedCountry] ? internationalSizes[selectedCountry] : displaySize;
8427
8418
  const columnUnits = useMemo(() => {
8428
8419
  const units = [];
8429
8420
  for (let i = 0; i < section.headers.length; i++) {
@@ -8592,7 +8583,11 @@ function SectionDetailView({
8592
8583
  const showMatchPercent = !renderRaw;
8593
8584
  const secAny = sectionResult;
8594
8585
  const backendSize = secAny?.size || recSize;
8595
- const backendLength = secAny?.length || recLength;
8586
+ const lengthFromDetails = (sectionResult?.matchDetails || []).find(
8587
+ (m) => /inseam|length/i.test(m.measurement) && !/neck|arm|sleeve|back|shoulder/i.test(m.measurement)
8588
+ );
8589
+ const inseamFallback = lengthFromDetails ? (lengthFromDetails.chartRange || "").replace(/\s*(cm|in|inches)\s*/i, "").trim() : "";
8590
+ const backendLength = secAny?.length || recLength || inseamFallback;
8596
8591
  const backendAvailableSizes = secAny?.availableSizes || [];
8597
8592
  const backendAvailableLengths = secAny?.availableLengths || [];
8598
8593
  const finalDisplayLength = selectedLength || backendLength;
@@ -8679,7 +8674,12 @@ function SectionDetailView({
8679
8674
  }
8680
8675
  )
8681
8676
  ] }),
8682
- /* @__PURE__ */ jsxs("div", { className: "ps-msd-card", children: [
8677
+ sectionFound === false && /* @__PURE__ */ jsxs("div", { className: "ps-msd-card", style: { textAlign: "center" }, children: [
8678
+ /* @__PURE__ */ jsx("span", { className: "ps-msd-card-eyebrow", children: t("NO MATCHING SIZE") }),
8679
+ /* @__PURE__ */ jsx("p", { style: { fontSize: "15px", fontWeight: 600, color: "var(--ps-text-primary)", margin: "10px 0 4px" }, children: t("We couldn't find a size that fits for this product.") }),
8680
+ /* @__PURE__ */ jsx("p", { className: "ps-msd-card-note", children: t("Your measurements are outside this product's size range — the chart doesn't include a close match. You can still try it on visually below.") })
8681
+ ] }),
8682
+ sectionFound !== false && /* @__PURE__ */ jsxs("div", { className: "ps-msd-card", children: [
8683
8683
  /* @__PURE__ */ jsx("span", { className: "ps-msd-card-eyebrow", children: displaySize === backendSize ? t("RECOMMENDED SIZE") : t("TRYING SIZE") }),
8684
8684
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "10px", marginTop: "6px", marginBottom: "4px" }, children: [
8685
8685
  countryOptions.length > 1 && /* @__PURE__ */ jsxs(
@@ -8739,7 +8739,7 @@ function SectionDetailView({
8739
8739
  ] }),
8740
8740
  /* @__PURE__ */ jsx("p", { className: "ps-msd-card-note", children: t("Based on your measurements and the garment's tailoring chart.") })
8741
8741
  ] }),
8742
- fitRows.length > 0 && /* @__PURE__ */ jsxs("div", { className: "ps-msd-blueprint", children: [
8742
+ sectionFound !== false && fitRows.length > 0 && /* @__PURE__ */ jsxs("div", { className: "ps-msd-blueprint", children: [
8743
8743
  /* @__PURE__ */ jsx("span", { className: "ps-msd-blueprint-title", children: t("MEASUREMENT BLUEPRINT") }),
8744
8744
  /* @__PURE__ */ jsx("div", { className: "ps-msd-blueprint-underline" }),
8745
8745
  /* @__PURE__ */ jsx("div", { className: "ps-msd-rows", children: fitRows.map((row, i) => {
@@ -8774,7 +8774,7 @@ function SectionDetailView({
8774
8774
  ] }, i);
8775
8775
  }) })
8776
8776
  ] }),
8777
- visibleSizes.length > 1 && /* @__PURE__ */ jsxs("div", { className: "ps-msd-sizes", children: [
8777
+ sectionFound !== false && visibleSizes.length > 1 && /* @__PURE__ */ jsxs("div", { className: "ps-msd-sizes", children: [
8778
8778
  /* @__PURE__ */ jsx("span", { className: "ps-msd-sizes-label", children: t("TRY ANOTHER SIZE") }),
8779
8779
  /* @__PURE__ */ jsx("div", { className: "ps-msd-sizes-pills", children: visibleSizes.map((s) => {
8780
8780
  const isActive = s === displaySize;
@@ -8790,7 +8790,7 @@ function SectionDetailView({
8790
8790
  );
8791
8791
  }) })
8792
8792
  ] }),
8793
- visibleLengths.length > 0 && /* @__PURE__ */ jsxs("div", { className: "ps-msd-sizes", children: [
8793
+ sectionFound !== false && visibleLengths.length > 0 && /* @__PURE__ */ jsxs("div", { className: "ps-msd-sizes", children: [
8794
8794
  /* @__PURE__ */ jsx("span", { className: "ps-msd-sizes-label", children: t("LENGTH ADJUSTMENT") }),
8795
8795
  /* @__PURE__ */ jsx("div", { className: "ps-msd-sizes-pills", children: visibleLengths.map((s) => {
8796
8796
  const isActive = finalDisplayLength === s;
@@ -8806,7 +8806,7 @@ function SectionDetailView({
8806
8806
  );
8807
8807
  }) })
8808
8808
  ] }),
8809
- /* @__PURE__ */ jsxs("p", { className: "ps-msd-footer-note", children: [
8809
+ sectionFound !== false && /* @__PURE__ */ jsxs("p", { className: "ps-msd-footer-note", children: [
8810
8810
  t("*Our sizing engine recommends"),
8811
8811
  " ",
8812
8812
  backendSize,
@@ -8817,7 +8817,19 @@ function SectionDetailView({
8817
8817
  ] }) });
8818
8818
  }
8819
8819
  return /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sec-detail", style: { padding: "1.5vw", display: "flex", flexDirection: "column", height: "100%", background: "#F8F9FA" }, children: [
8820
- /* @__PURE__ */ jsxs("div", { style: { flex: 1, minHeight: 0, overflowY: "auto", scrollbarWidth: "thin", scrollbarColor: "rgba(0,0,0,0.04) transparent" }, children: [
8820
+ /* @__PURE__ */ jsx("div", { style: { flex: 1, minHeight: 0, overflowY: "auto", scrollbarWidth: "thin", scrollbarColor: "rgba(0,0,0,0.04) transparent" }, children: sectionFound === false ? /* @__PURE__ */ jsxs("div", { style: {
8821
+ background: "white",
8822
+ borderRadius: "0.7vw",
8823
+ border: "1px solid rgba(0,0,0,0.06)",
8824
+ padding: "1.4vw 1.6vw",
8825
+ textAlign: "center",
8826
+ marginTop: "0.4vw",
8827
+ marginBottom: "1vw"
8828
+ }, children: [
8829
+ /* @__PURE__ */ jsx("span", { style: { fontSize: "0.7vw", fontWeight: 700, color: "var(--ps-accent)", textTransform: "uppercase", letterSpacing: "0.12em" }, children: t("No matching size") }),
8830
+ /* @__PURE__ */ jsx("p", { style: { fontSize: "1vw", fontWeight: 600, color: "var(--ps-text-primary)", margin: "0.6vw 0 0.4vw" }, children: t("We couldn't find a size that fits for this product.") }),
8831
+ /* @__PURE__ */ jsx("p", { style: { fontSize: "0.7vw", color: "var(--ps-text-secondary)", lineHeight: 1.55, margin: 0, maxWidth: "26vw", marginLeft: "auto", marginRight: "auto" }, children: t("Your measurements are outside this product's size range. You can still try it on visually below.") })
8832
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
8821
8833
  /* @__PURE__ */ jsx("span", { style: { fontSize: "0.75vw", fontWeight: 700, color: "var(--ps-accent)", textTransform: "uppercase", letterSpacing: "0.12em" }, children: isRecommended ? t("Recommended Size") : altSizeLabel ?? t("Your Selection") }),
8822
8834
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.5vw", marginTop: "0.35vw", marginBottom: "0.4vw" }, children: [
8823
8835
  countryOptions.length > 1 && /* @__PURE__ */ jsxs(
@@ -8952,7 +8964,7 @@ function SectionDetailView({
8952
8964
  );
8953
8965
  }) })
8954
8966
  ] })
8955
- ] }),
8967
+ ] }) }),
8956
8968
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", paddingTop: "0.6vw", borderTop: "1px solid rgba(0,0,0,0.06)", flexShrink: 0 }, children: [
8957
8969
  /* @__PURE__ */ jsxs("button", { className: "ps-bp-back-btn", onClick: onBack, type: "button", style: { fontSize: "0.7vw" }, children: [
8958
8970
  /* @__PURE__ */ jsx("span", { className: "ps-bp-back-arrow", children: "←" }),
@@ -9277,7 +9289,7 @@ function SizeResultView({
9277
9289
  const allDone = hasPhoto ? sizingDone && tryOnDone : sizingDone;
9278
9290
  const isMobile = useIsMobile();
9279
9291
  const isAccessory = measurementType === "face" || measurementType === "head";
9280
- const noFit = sizingResult?.found === false;
9292
+ sizingResult?.found === false;
9281
9293
  const vtoExcluded = measurementType === "foot";
9282
9294
  console.log("[PS-SDK] SizeResultView render:", {
9283
9295
  hasPhoto,
@@ -9558,7 +9570,7 @@ function SizeResultView({
9558
9570
  " →"
9559
9571
  ]
9560
9572
  }
9561
- ) : vtoExcluded || noFit ? /* @__PURE__ */ jsxs(
9573
+ ) : vtoExcluded ? /* @__PURE__ */ jsxs(
9562
9574
  "button",
9563
9575
  {
9564
9576
  className: "ps-tryon-v2-cta",
@@ -9619,7 +9631,7 @@ function SizeResultView({
9619
9631
  onBack: resultImageUrl ? onClose || (() => setView("body-profile")) : () => setView("body-profile"),
9620
9632
  backLabel: t("Back"),
9621
9633
  internationalSizes: sizingResult?.internationalSizes,
9622
- onTryOn: resultImageUrl || vtoExcluded || noFit ? void 0 : handleSingleTryOn,
9634
+ onTryOn: resultImageUrl || vtoExcluded ? void 0 : handleSingleTryOn,
9623
9635
  continueLabel: resultImageUrl ? t("Continue Shopping") : void 0,
9624
9636
  tryOnProcessing,
9625
9637
  productImage: resultImageUrl || productImage,
@@ -9667,7 +9679,7 @@ function SizeResultView({
9667
9679
  onBack: resultImageUrl ? onClose || (() => setView("body-profile")) : () => setView("body-profile"),
9668
9680
  backLabel: t("Back"),
9669
9681
  internationalSizes: sizingResult?.internationalSizes,
9670
- onTryOn: resultImageUrl || vtoExcluded || noFit ? void 0 : handleSingleTryOn,
9682
+ onTryOn: resultImageUrl || vtoExcluded ? void 0 : handleSingleTryOn,
9671
9683
  continueLabel: resultImageUrl ? t("Continue Shopping") : void 0,
9672
9684
  tryOnProcessing,
9673
9685
  t,
@@ -13781,7 +13793,7 @@ function PrimeStyleTryonInner({
13781
13793
  }
13782
13794
  if (progressEtaRef.current) {
13783
13795
  const remaining = Math.max(0, TARGET_SECONDS - Math.floor(elapsed));
13784
- progressEtaRef.current.textContent = elapsed >= TARGET_SECONDS ? t("Finalizing...") : `~${remaining}s`;
13796
+ progressEtaRef.current.textContent = elapsed >= TARGET_SECONDS ? "•••" : `~${remaining}s`;
13785
13797
  }
13786
13798
  if (progressStatusRef.current) {
13787
13799
  const status = [...statuses].reverse().find((s) => val >= s.at);
@@ -17052,7 +17052,7 @@ function MscTryOnProgress({ t: t2 }) {
17052
17052
  if (ringRef.current) ringRef.current.style.strokeDashoffset = String(MSC_RING_CIRC * (1 - pct / 100));
17053
17053
  if (etaRef.current) {
17054
17054
  const remaining = Math.max(0, MSC_TRYON_TARGET_SECONDS - Math.floor(elapsed));
17055
- etaRef.current.textContent = elapsed >= MSC_TRYON_TARGET_SECONDS ? t2("Finalizing...") : `~${remaining}s`;
17055
+ etaRef.current.textContent = elapsed >= MSC_TRYON_TARGET_SECONDS ? "•••" : `~${remaining}s`;
17056
17056
  }
17057
17057
  }, 200);
17058
17058
  return () => clearInterval(id2);
@@ -17312,30 +17312,22 @@ function MultiSectionMobile({
17312
17312
  children: t2("Continue Shopping")
17313
17313
  }
17314
17314
  )
17315
- ] }) : sizingResult?.found === false ? (
17316
- // Backend couldn't find a size that fits Try-On is meaningless
17317
- // without a recommendation, so surface a clear terminal action.
17318
- /* @__PURE__ */ jsxRuntimeExports.jsx(
17315
+ ] }) : (
17316
+ // Try-On stays enabled even when the backend couldn't find a size —
17317
+ // it's a visual preview, independent of the recommendation.
17318
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
17319
17319
  "button",
17320
17320
  {
17321
17321
  type: "button",
17322
17322
  className: "ps-msr-tryon-cta",
17323
- onClick: onClose,
17324
- children: t2("Continue Shopping")
17323
+ onClick: onTryOn,
17324
+ disabled: tryOnProcessing,
17325
+ children: [
17326
+ /* @__PURE__ */ jsxRuntimeExports.jsx(CameraIcon, {}),
17327
+ tryOnProcessing ? t2("Processing...") : t2("See how it looks on yourself")
17328
+ ]
17325
17329
  }
17326
17330
  )
17327
- ) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
17328
- "button",
17329
- {
17330
- type: "button",
17331
- className: "ps-msr-tryon-cta",
17332
- onClick: onTryOn,
17333
- disabled: tryOnProcessing,
17334
- children: [
17335
- /* @__PURE__ */ jsxRuntimeExports.jsx(CameraIcon, {}),
17336
- tryOnProcessing ? t2("Processing...") : t2("See how it looks on yourself")
17337
- ]
17338
- }
17339
17331
  ) }),
17340
17332
  sizeGuide ? null : null
17341
17333
  ] });
@@ -17383,7 +17375,7 @@ function TryOnProgress({ t: t2, isActive }) {
17383
17375
  }
17384
17376
  if (etaRef.current) {
17385
17377
  const remaining = Math.max(0, TRYON_TARGET_SECONDS - Math.floor(elapsed));
17386
- etaRef.current.textContent = elapsed >= TRYON_TARGET_SECONDS ? t2("Finalizing...") : `~${remaining}s`;
17378
+ etaRef.current.textContent = elapsed >= TRYON_TARGET_SECONDS ? "•••" : `~${remaining}s`;
17387
17379
  }
17388
17380
  }, 200);
17389
17381
  return () => clearInterval(id2);
@@ -17847,8 +17839,7 @@ function SectionDetailView({
17847
17839
  const hasBadFit = details.some((d) => BAD_FIT.test(d.fit || ""));
17848
17840
  return hasBadFit ? t2("Not Recommended") : t2("Your Selection");
17849
17841
  }, [isRecommended, sectionResult, t2]);
17850
- const noFitMessage = t2("We couldn't find a size that fits for this product");
17851
- const displaySizeLabel = sectionFound === false ? noFitMessage : selectedCountry && isRecommended && internationalSizes && internationalSizes[selectedCountry] ? internationalSizes[selectedCountry] : displaySize;
17842
+ const displaySizeLabel = selectedCountry && isRecommended && internationalSizes && internationalSizes[selectedCountry] ? internationalSizes[selectedCountry] : displaySize;
17852
17843
  const columnUnits = reactExports.useMemo(() => {
17853
17844
  const units = [];
17854
17845
  for (let i = 0; i < section.headers.length; i++) {
@@ -18017,7 +18008,11 @@ function SectionDetailView({
18017
18008
  const showMatchPercent = !renderRaw;
18018
18009
  const secAny = sectionResult;
18019
18010
  const backendSize = secAny?.size || recSize;
18020
- const backendLength = secAny?.length || recLength;
18011
+ const lengthFromDetails = (sectionResult?.matchDetails || []).find(
18012
+ (m2) => /inseam|length/i.test(m2.measurement) && !/neck|arm|sleeve|back|shoulder/i.test(m2.measurement)
18013
+ );
18014
+ const inseamFallback = lengthFromDetails ? (lengthFromDetails.chartRange || "").replace(/\s*(cm|in|inches)\s*/i, "").trim() : "";
18015
+ const backendLength = secAny?.length || recLength || inseamFallback;
18021
18016
  const backendAvailableSizes = secAny?.availableSizes || [];
18022
18017
  const backendAvailableLengths = secAny?.availableLengths || [];
18023
18018
  const finalDisplayLength = selectedLength || backendLength;
@@ -18104,7 +18099,12 @@ function SectionDetailView({
18104
18099
  }
18105
18100
  )
18106
18101
  ] }),
18107
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-msd-card", children: [
18102
+ sectionFound === false && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-msd-card", style: { textAlign: "center" }, children: [
18103
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-msd-card-eyebrow", children: t2("NO MATCHING SIZE") }),
18104
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { style: { fontSize: "15px", fontWeight: 600, color: "var(--ps-text-primary)", margin: "10px 0 4px" }, children: t2("We couldn't find a size that fits for this product.") }),
18105
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "ps-msd-card-note", children: t2("Your measurements are outside this product's size range — the chart doesn't include a close match. You can still try it on visually below.") })
18106
+ ] }),
18107
+ sectionFound !== false && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-msd-card", children: [
18108
18108
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-msd-card-eyebrow", children: displaySize === backendSize ? t2("RECOMMENDED SIZE") : t2("TRYING SIZE") }),
18109
18109
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "10px", marginTop: "6px", marginBottom: "4px" }, children: [
18110
18110
  countryOptions.length > 1 && /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -18164,7 +18164,7 @@ function SectionDetailView({
18164
18164
  ] }),
18165
18165
  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "ps-msd-card-note", children: t2("Based on your measurements and the garment's tailoring chart.") })
18166
18166
  ] }),
18167
- fitRows.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-msd-blueprint", children: [
18167
+ sectionFound !== false && fitRows.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-msd-blueprint", children: [
18168
18168
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-msd-blueprint-title", children: t2("MEASUREMENT BLUEPRINT") }),
18169
18169
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-msd-blueprint-underline" }),
18170
18170
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-msd-rows", children: fitRows.map((row, i) => {
@@ -18199,7 +18199,7 @@ function SectionDetailView({
18199
18199
  ] }, i);
18200
18200
  }) })
18201
18201
  ] }),
18202
- visibleSizes.length > 1 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-msd-sizes", children: [
18202
+ sectionFound !== false && visibleSizes.length > 1 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-msd-sizes", children: [
18203
18203
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-msd-sizes-label", children: t2("TRY ANOTHER SIZE") }),
18204
18204
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-msd-sizes-pills", children: visibleSizes.map((s) => {
18205
18205
  const isActive = s === displaySize;
@@ -18215,7 +18215,7 @@ function SectionDetailView({
18215
18215
  );
18216
18216
  }) })
18217
18217
  ] }),
18218
- visibleLengths.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-msd-sizes", children: [
18218
+ sectionFound !== false && visibleLengths.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-msd-sizes", children: [
18219
18219
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-msd-sizes-label", children: t2("LENGTH ADJUSTMENT") }),
18220
18220
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-msd-sizes-pills", children: visibleLengths.map((s) => {
18221
18221
  const isActive = finalDisplayLength === s;
@@ -18231,7 +18231,7 @@ function SectionDetailView({
18231
18231
  );
18232
18232
  }) })
18233
18233
  ] }),
18234
- /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "ps-msd-footer-note", children: [
18234
+ sectionFound !== false && /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "ps-msd-footer-note", children: [
18235
18235
  t2("*Our sizing engine recommends"),
18236
18236
  " ",
18237
18237
  backendSize,
@@ -18242,7 +18242,19 @@ function SectionDetailView({
18242
18242
  ] }) });
18243
18243
  }
18244
18244
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-tryon-sec-detail", style: { padding: "1.5vw", display: "flex", flexDirection: "column", height: "100%", background: "#F8F9FA" }, children: [
18245
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { flex: 1, minHeight: 0, overflowY: "auto", scrollbarWidth: "thin", scrollbarColor: "rgba(0,0,0,0.04) transparent" }, children: [
18245
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { flex: 1, minHeight: 0, overflowY: "auto", scrollbarWidth: "thin", scrollbarColor: "rgba(0,0,0,0.04) transparent" }, children: sectionFound === false ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: {
18246
+ background: "white",
18247
+ borderRadius: "0.7vw",
18248
+ border: "1px solid rgba(0,0,0,0.06)",
18249
+ padding: "1.4vw 1.6vw",
18250
+ textAlign: "center",
18251
+ marginTop: "0.4vw",
18252
+ marginBottom: "1vw"
18253
+ }, children: [
18254
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { fontSize: "0.7vw", fontWeight: 700, color: "var(--ps-accent)", textTransform: "uppercase", letterSpacing: "0.12em" }, children: t2("No matching size") }),
18255
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { style: { fontSize: "1vw", fontWeight: 600, color: "var(--ps-text-primary)", margin: "0.6vw 0 0.4vw" }, children: t2("We couldn't find a size that fits for this product.") }),
18256
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { style: { fontSize: "0.7vw", color: "var(--ps-text-secondary)", lineHeight: 1.55, margin: 0, maxWidth: "26vw", marginLeft: "auto", marginRight: "auto" }, children: t2("Your measurements are outside this product's size range. You can still try it on visually below.") })
18257
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
18246
18258
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { fontSize: "0.75vw", fontWeight: 700, color: "var(--ps-accent)", textTransform: "uppercase", letterSpacing: "0.12em" }, children: isRecommended ? t2("Recommended Size") : altSizeLabel ?? t2("Your Selection") }),
18247
18259
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.5vw", marginTop: "0.35vw", marginBottom: "0.4vw" }, children: [
18248
18260
  countryOptions.length > 1 && /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -18377,7 +18389,7 @@ function SectionDetailView({
18377
18389
  );
18378
18390
  }) })
18379
18391
  ] })
18380
- ] }),
18392
+ ] }) }),
18381
18393
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", paddingTop: "0.6vw", borderTop: "1px solid rgba(0,0,0,0.06)", flexShrink: 0 }, children: [
18382
18394
  /* @__PURE__ */ jsxRuntimeExports.jsxs("button", { className: "ps-bp-back-btn", onClick: onBack, type: "button", style: { fontSize: "0.7vw" }, children: [
18383
18395
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-bp-back-arrow", children: "←" }),
@@ -18702,7 +18714,7 @@ function SizeResultView({
18702
18714
  const allDone = hasPhoto ? sizingDone && tryOnDone : sizingDone;
18703
18715
  const isMobile = useIsMobile();
18704
18716
  const isAccessory = measurementType === "face" || measurementType === "head";
18705
- const noFit = sizingResult?.found === false;
18717
+ sizingResult?.found === false;
18706
18718
  const vtoExcluded = measurementType === "foot";
18707
18719
  console.log("[PS-SDK] SizeResultView render:", {
18708
18720
  hasPhoto,
@@ -18983,7 +18995,7 @@ function SizeResultView({
18983
18995
  " →"
18984
18996
  ]
18985
18997
  }
18986
- ) : vtoExcluded || noFit ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
18998
+ ) : vtoExcluded ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
18987
18999
  "button",
18988
19000
  {
18989
19001
  className: "ps-tryon-v2-cta",
@@ -19044,7 +19056,7 @@ function SizeResultView({
19044
19056
  onBack: resultImageUrl ? onClose || (() => setView("body-profile")) : () => setView("body-profile"),
19045
19057
  backLabel: t2("Back"),
19046
19058
  internationalSizes: sizingResult?.internationalSizes,
19047
- onTryOn: resultImageUrl || vtoExcluded || noFit ? void 0 : handleSingleTryOn,
19059
+ onTryOn: resultImageUrl || vtoExcluded ? void 0 : handleSingleTryOn,
19048
19060
  continueLabel: resultImageUrl ? t2("Continue Shopping") : void 0,
19049
19061
  tryOnProcessing,
19050
19062
  productImage: resultImageUrl || productImage,
@@ -19092,7 +19104,7 @@ function SizeResultView({
19092
19104
  onBack: resultImageUrl ? onClose || (() => setView("body-profile")) : () => setView("body-profile"),
19093
19105
  backLabel: t2("Back"),
19094
19106
  internationalSizes: sizingResult?.internationalSizes,
19095
- onTryOn: resultImageUrl || vtoExcluded || noFit ? void 0 : handleSingleTryOn,
19107
+ onTryOn: resultImageUrl || vtoExcluded ? void 0 : handleSingleTryOn,
19096
19108
  continueLabel: resultImageUrl ? t2("Continue Shopping") : void 0,
19097
19109
  tryOnProcessing,
19098
19110
  t: t2,
@@ -23206,7 +23218,7 @@ function PrimeStyleTryonInner({
23206
23218
  }
23207
23219
  if (progressEtaRef.current) {
23208
23220
  const remaining = Math.max(0, TARGET_SECONDS - Math.floor(elapsed));
23209
- progressEtaRef.current.textContent = elapsed >= TARGET_SECONDS ? t2("Finalizing...") : `~${remaining}s`;
23221
+ progressEtaRef.current.textContent = elapsed >= TARGET_SECONDS ? "•••" : `~${remaining}s`;
23210
23222
  }
23211
23223
  if (progressStatusRef.current) {
23212
23224
  const status = [...statuses].reverse().find((s) => val >= s.at);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primestyleai/tryon",
3
- "version": "5.10.1",
3
+ "version": "5.10.3",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",