@primestyleai/tryon 5.10.13 → 5.10.15

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.
@@ -17754,7 +17754,7 @@ function MeasurementOverlay({ lines, fitRows, show, imgWidth, imgHeight }) {
17754
17754
  const delay = i * 0.35;
17755
17755
  const curvePath = `M ${x1} ${cy} Q ${midX} ${cy + curveDepth} ${x2} ${cy}`;
17756
17756
  const lineLen = width * 1.05;
17757
- const labelText = fitRow ? fitRow.fit === "good" ? " Fit" : fitRow.isLength ? fitRow.fit.includes("short") || fitRow.fit.includes("tight") ? "Short" : "Long" : fitRow.fit.includes("tight") ? "Tight" : "Loose" : label;
17757
+ const labelText = fitRow ? fitRow.fit === "good" ? "Perfect Fit" : fitRow.isLength ? fitRow.fit.includes("short") || fitRow.fit.includes("tight") ? "Short" : "Long" : fitRow.fit.includes("tight") ? "Tight" : "Loose" : label;
17758
17758
  const labelFont = Math.round(14 * scale);
17759
17759
  const labelWidthEst = labelText.length * labelFont * 0.62;
17760
17760
  const rightSpace = W2 - x2 - 12 * scale;
@@ -18068,6 +18068,15 @@ function SectionDetailView({
18068
18068
  const inlineHasLengths = (sectionResult?.availableLengths?.length || 0) > 0;
18069
18069
  const effectiveRecLength = recLength || inlineLengthRec;
18070
18070
  const hasLengthSource = !!(lengthEntry || inlineHasLengths);
18071
+ if (hasLengthSource && !lengthDetails.length) {
18072
+ const userHcm = userMeasurements["height"] || 0;
18073
+ details.push({
18074
+ measurement: "Height",
18075
+ userValue: userHcm ? String(userHcm) : "",
18076
+ chartRange: effectiveRecLength || "",
18077
+ fit: "good"
18078
+ });
18079
+ }
18071
18080
  if (!details.length) return [];
18072
18081
  const isFromLength = new Set(lengthDetails.length > 0 ? lengthDetails.map((m2) => m2.measurement) : hasLengthSource ? ["Height"] : []);
18073
18082
  return details.map((m2) => {
@@ -18185,8 +18194,13 @@ function SectionDetailView({
18185
18194
  return "";
18186
18195
  };
18187
18196
  const fitBadgeLabel = (fit, isLen) => {
18188
- if (isLen && fit === "good") return t2("EDITORIAL LENGTH");
18189
- if (fit === "good") return t2("PERFECT TENSION");
18197
+ if (fit === "good") return t2("PERFECT FIT");
18198
+ if (isLen && (fit.includes("short") || fit === "tight" || fit === "too-tight" || fit === "a-bit-tight")) {
18199
+ return fit === "a-bit-tight" || fit === "a-bit-short" ? t2("A BIT SHORT") : fit.includes("too") ? t2("TOO SHORT") : t2("SHORT");
18200
+ }
18201
+ if (isLen && (fit.includes("long") || fit === "loose" || fit === "too-loose" || fit === "a-bit-loose")) {
18202
+ return fit === "a-bit-loose" || fit === "a-bit-long" ? t2("A BIT LONG") : fit.includes("too") ? t2("TOO LONG") : t2("LONG");
18203
+ }
18190
18204
  if (fit === "a-bit-tight") return t2("SLIGHTLY TIGHT");
18191
18205
  if (fit === "a-bit-loose") return t2("SLIGHT EASE");
18192
18206
  if (fit.includes("tight")) return t2("TIGHT");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primestyleai/tryon",
3
- "version": "5.10.13",
3
+ "version": "5.10.15",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",