@primestyleai/tryon 5.10.9 → 5.10.10
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.
- package/dist/react/index.js +1505 -1495
- package/dist/react/index.js.map +1 -1
- package/dist/storefront/primestyle-tryon.js +23 -6
- package/package.json +1 -1
|
@@ -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.fit.includes("tight") ? "Tight" : "Loose" : label;
|
|
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;
|
|
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;
|
|
@@ -17858,7 +17858,15 @@ const cellValFn = (row, colIdx, header) => {
|
|
|
17858
17858
|
return "";
|
|
17859
17859
|
};
|
|
17860
17860
|
const fitLabelFn = (fit, t2) => fit === "good" ? t2("perfect fit") : fit === "too-tight" ? t2("too tight") : fit === "tight" ? t2("tight") : fit === "a-bit-tight" ? t2("a bit tight") : fit === "too-loose" ? t2("too loose") : fit === "loose" ? t2("loose") : t2("a bit loose");
|
|
17861
|
-
const lengthFitLabelFn = (fit, t2) =>
|
|
17861
|
+
const lengthFitLabelFn = (fit, t2) => {
|
|
17862
|
+
if (fit === "good") return t2("perfect fit");
|
|
17863
|
+
if (fit === "too-short" || fit === "too-tight") return t2("too short");
|
|
17864
|
+
if (fit === "short" || fit === "tight") return t2("short");
|
|
17865
|
+
if (fit === "a-bit-short" || fit === "a-bit-tight") return t2("a bit short");
|
|
17866
|
+
if (fit === "too-long" || fit === "too-loose") return t2("too long");
|
|
17867
|
+
if (fit === "long" || fit === "loose") return t2("long");
|
|
17868
|
+
return t2("a bit long");
|
|
17869
|
+
};
|
|
17862
17870
|
function convertNum(n2, from, to) {
|
|
17863
17871
|
if (from === to || !n2 || isNaN(n2)) return n2;
|
|
17864
17872
|
if (from === "mm" || to === "mm") return n2;
|
|
@@ -18341,7 +18349,7 @@ function SectionDetailView({
|
|
|
18341
18349
|
sectionFound !== false && visibleLengths.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-msd-sizes", children: [
|
|
18342
18350
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-msd-sizes-label", children: t2("LENGTH ADJUSTMENT") }),
|
|
18343
18351
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-msd-sizes-pills", children: visibleLengths.map((s) => {
|
|
18344
|
-
const isActive = finalDisplayLength === s;
|
|
18352
|
+
const isActive = String(finalDisplayLength ?? "").trim() === String(s ?? "").trim();
|
|
18345
18353
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18346
18354
|
"button",
|
|
18347
18355
|
{
|
|
@@ -18487,7 +18495,16 @@ function SectionDetailView({
|
|
|
18487
18495
|
padding: "0.2vw 0.7vw"
|
|
18488
18496
|
}, children: [
|
|
18489
18497
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { fontSize: "3.5vw", fontWeight: 300, color: "var(--ps-text-primary)", lineHeight: 1, letterSpacing: "-0.02em" }, children: displaySizeLabel }),
|
|
18490
|
-
finalDisplayLength &&
|
|
18498
|
+
finalDisplayLength && (() => {
|
|
18499
|
+
const isNumericLen = /^\d+(\.\d+)?$/.test(String(finalDisplayLength).trim());
|
|
18500
|
+
const sectionNameLower = (sectionName || "").toLowerCase();
|
|
18501
|
+
const lengthLabel = isNumericLen ? /pant|trouser|inseam/.test(sectionNameLower) ? t2("Inseam") : t2("Length") : null;
|
|
18502
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { style: { fontSize: "1.4vw", fontWeight: 400, color: "var(--ps-text-secondary)", display: "inline-flex", alignItems: "baseline", gap: "0.25vw" }, children: [
|
|
18503
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { fontSize: "0.9vw", fontWeight: 600, color: "var(--ps-text-muted)", letterSpacing: "0.02em" }, children: "/" }),
|
|
18504
|
+
lengthLabel && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { fontSize: "0.7vw", fontWeight: 600, color: "var(--ps-text-muted)", textTransform: "uppercase", letterSpacing: "0.08em" }, children: lengthLabel }),
|
|
18505
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: finalDisplayLength })
|
|
18506
|
+
] });
|
|
18507
|
+
})(),
|
|
18491
18508
|
selectedCountry && isRecommended && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { style: { fontSize: "0.7vw", color: "var(--ps-text-muted)", marginLeft: "0.2vw" }, children: [
|
|
18492
18509
|
"(",
|
|
18493
18510
|
selectedCountry,
|
|
@@ -18514,8 +18531,8 @@ function SectionDetailView({
|
|
|
18514
18531
|
/* @__PURE__ */ jsxRuntimeExports.jsx("th", { style: { textAlign: "right", padding: "0.5vw 0.6vw", fontSize: "0.6vw", fontWeight: 600, color: "var(--ps-text-secondary)", textTransform: "uppercase", letterSpacing: "0.08em", borderBottom: "1px solid rgba(0,0,0,0.06)" }, children: t2("Fit Result") })
|
|
18515
18532
|
] }) }),
|
|
18516
18533
|
/* @__PURE__ */ jsxRuntimeExports.jsx("tbody", { children: fitRows.map((row, i) => {
|
|
18517
|
-
const fitColor = row.fit === "good" ? "#2154EF" : row.fit.includes("tight") ? "#dc2626" : "#d97706";
|
|
18518
|
-
const fitBg = row.fit === "good" ? "rgba(33,84,239,0.08)" : row.fit.includes("tight") ? "rgba(220,38,38,0.08)" : "rgba(217,119,6,0.08)";
|
|
18534
|
+
const fitColor = row.fit === "good" ? "#2154EF" : row.isLength ? row.fit.includes("short") || row.fit.includes("tight") ? "#dc2626" : "#d97706" : row.fit.includes("tight") ? "#dc2626" : "#d97706";
|
|
18535
|
+
const fitBg = row.fit === "good" ? "rgba(33,84,239,0.08)" : row.isLength ? row.fit.includes("short") || row.fit.includes("tight") ? "rgba(220,38,38,0.08)" : "rgba(217,119,6,0.08)" : row.fit.includes("tight") ? "rgba(220,38,38,0.08)" : "rgba(217,119,6,0.08)";
|
|
18519
18536
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { style: { borderBottom: i < fitRows.length - 1 ? "1px solid rgba(0,0,0,0.04)" : "none" }, children: [
|
|
18520
18537
|
/* @__PURE__ */ jsxRuntimeExports.jsx("td", { style: { padding: "0.55vw 0.6vw", fontSize: "0.75vw", fontWeight: 500, color: "var(--ps-text-primary)" }, children: row.area }),
|
|
18521
18538
|
/* @__PURE__ */ jsxRuntimeExports.jsx("td", { style: { padding: "0.55vw 0.6vw", fontSize: "0.75vw", color: "var(--ps-text-secondary)" }, children: renderRaw ? row.rawUserValue || "—" : isNaN(row.userNum) || row.userNum === 0 ? "—" : `${dNum(row.userNum)} ${unitLbl}` }),
|