@primestyleai/tryon 5.9.0 → 5.9.1
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.
|
@@ -9,8 +9,11 @@ interface MobileScanningViewProps {
|
|
|
9
9
|
productImage?: string;
|
|
10
10
|
bodyLandmarks: BodyLandmarks | null | undefined;
|
|
11
11
|
sizingDone: boolean;
|
|
12
|
+
/** True while VTO is running — swaps to try-on stage copy and shows the
|
|
13
|
+
* wall-clock progress ring. */
|
|
14
|
+
tryOnProcessing?: boolean;
|
|
12
15
|
onSwitchToManual: () => void;
|
|
13
16
|
t: TranslateFn;
|
|
14
17
|
}
|
|
15
|
-
export declare function MobileScanningView({ previewUrl, productImage, bodyLandmarks, sizingDone, onSwitchToManual, t, }: MobileScanningViewProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function MobileScanningView({ previewUrl, productImage, bodyLandmarks, sizingDone, tryOnProcessing, onSwitchToManual, t, }: MobileScanningViewProps): import("react/jsx-runtime").JSX.Element;
|
|
16
19
|
export {};
|
|
@@ -10913,12 +10913,22 @@ const STYLES$1 = `
|
|
|
10913
10913
|
}
|
|
10914
10914
|
.ps-tryon-v2-processing-label {
|
|
10915
10915
|
position: absolute; bottom: 1vw; left: 50%; transform: translateX(-50%);
|
|
10916
|
-
z-index: 5; font-size: 0.
|
|
10917
|
-
color:
|
|
10918
|
-
background: rgba(0,0,0,0.
|
|
10919
|
-
padding: 0.
|
|
10916
|
+
z-index: 5; font-size: 0.7vw; font-weight: 600;
|
|
10917
|
+
color: #fff; letter-spacing: 0.05em;
|
|
10918
|
+
background: rgba(0,0,0,0.72); backdrop-filter: blur(10px);
|
|
10919
|
+
padding: 0.6vw 0.9vw; border-radius: 0.6vw;
|
|
10920
|
+
display: flex; flex-direction: column; align-items: center; gap: 0.5vw;
|
|
10921
|
+
min-width: 14vw;
|
|
10922
|
+
box-shadow: 0 0.4vw 1.5vw rgba(0,0,0,0.35);
|
|
10923
|
+
}
|
|
10924
|
+
.ps-tryon-v2-processing-label > span:first-child {
|
|
10920
10925
|
animation: ps-loading-pulse 2s ease-in-out infinite;
|
|
10921
10926
|
}
|
|
10927
|
+
.ps-tryon-v2-processing-label .ps-tryon-progress-ring-track { stroke: rgba(255,255,255,0.18); }
|
|
10928
|
+
.ps-tryon-v2-processing-label .ps-tryon-progress-ring-fill { stroke: var(--ps-accent-light); }
|
|
10929
|
+
.ps-tryon-v2-processing-label .ps-tryon-progress-eta { color: #fff; }
|
|
10930
|
+
.ps-tryon-v2-processing-label .ps-tryon-progress-bar-wrap { background: rgba(255,255,255,0.18); }
|
|
10931
|
+
.ps-tryon-v2-processing-label .ps-tryon-progress-pct { color: var(--ps-accent-light); }
|
|
10922
10932
|
|
|
10923
10933
|
/* "I don't know" link */
|
|
10924
10934
|
.ps-tryon-v2-dontknow {
|
|
@@ -11511,6 +11521,26 @@ const STYLES$1 = `
|
|
|
11511
11521
|
.ps-tryon-progress-section {
|
|
11512
11522
|
display: flex; align-items: center; gap: 0.63vw; width: 100%; max-width: 18vw; margin-bottom: 0.83vw;
|
|
11513
11523
|
}
|
|
11524
|
+
/* Shared progress layout used inside StageCycler (desktop) and
|
|
11525
|
+
MobileScanningView — row of ring + bar + percent, same tokens. */
|
|
11526
|
+
.ps-tryon-progress-wrap {
|
|
11527
|
+
display: flex; align-items: center; gap: 10px;
|
|
11528
|
+
width: 100%; max-width: 320px; margin-top: 16px;
|
|
11529
|
+
}
|
|
11530
|
+
.ps-tryon-progress-wrap .ps-tryon-progress-bar-wrap {
|
|
11531
|
+
flex: 1; height: 4px; border-radius: 3px; overflow: hidden;
|
|
11532
|
+
position: relative; background: var(--ps-border-color);
|
|
11533
|
+
}
|
|
11534
|
+
.ps-tryon-progress-wrap .ps-tryon-progress-bar-fill {
|
|
11535
|
+
height: 100%; width: 0%;
|
|
11536
|
+
background: linear-gradient(90deg, var(--ps-accent), var(--ps-accent-light));
|
|
11537
|
+
border-radius: 3px; transition: width 0.3s ease;
|
|
11538
|
+
}
|
|
11539
|
+
.ps-tryon-progress-wrap .ps-tryon-progress-pct {
|
|
11540
|
+
font-size: 11px; font-weight: 700; color: var(--ps-accent);
|
|
11541
|
+
min-width: 30px; text-align: right;
|
|
11542
|
+
font-variant-numeric: tabular-nums;
|
|
11543
|
+
}
|
|
11514
11544
|
.ps-tryon-progress-bar-wrap {
|
|
11515
11545
|
flex: 1; height: 0.31vw; background: var(--ps-border-color); border-radius: 3px; overflow: hidden;
|
|
11516
11546
|
position: relative;
|
|
@@ -16876,17 +16906,71 @@ function MobileSkeleton({ landmarks, w: w2, h }) {
|
|
|
16876
16906
|
}
|
|
16877
16907
|
);
|
|
16878
16908
|
}
|
|
16909
|
+
const MSC_TRYON_TARGET_SECONDS = 22;
|
|
16910
|
+
const MSC_RING_RADIUS = 20;
|
|
16911
|
+
const MSC_RING_CIRC = 2 * Math.PI * MSC_RING_RADIUS;
|
|
16912
|
+
function MscTryOnProgress({ t: t2 }) {
|
|
16913
|
+
const startRef = reactExports.useRef(Date.now());
|
|
16914
|
+
const ringRef = reactExports.useRef(null);
|
|
16915
|
+
const barRef = reactExports.useRef(null);
|
|
16916
|
+
const etaRef = reactExports.useRef(null);
|
|
16917
|
+
const pctRef = reactExports.useRef(null);
|
|
16918
|
+
reactExports.useEffect(() => {
|
|
16919
|
+
startRef.current = Date.now();
|
|
16920
|
+
const id2 = setInterval(() => {
|
|
16921
|
+
const elapsed = (Date.now() - startRef.current) / 1e3;
|
|
16922
|
+
const pct = Math.min(95, elapsed / MSC_TRYON_TARGET_SECONDS * 100);
|
|
16923
|
+
const val = Math.round(pct);
|
|
16924
|
+
if (barRef.current) barRef.current.style.width = `${val}%`;
|
|
16925
|
+
if (pctRef.current) pctRef.current.textContent = `${val}%`;
|
|
16926
|
+
if (ringRef.current) ringRef.current.style.strokeDashoffset = String(MSC_RING_CIRC * (1 - pct / 100));
|
|
16927
|
+
if (etaRef.current) {
|
|
16928
|
+
const remaining = Math.max(0, MSC_TRYON_TARGET_SECONDS - Math.floor(elapsed));
|
|
16929
|
+
etaRef.current.textContent = elapsed >= MSC_TRYON_TARGET_SECONDS ? t2("Finalizing...") : `~${remaining}s`;
|
|
16930
|
+
}
|
|
16931
|
+
}, 200);
|
|
16932
|
+
return () => clearInterval(id2);
|
|
16933
|
+
}, [t2]);
|
|
16934
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-tryon-progress-wrap", children: [
|
|
16935
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-tryon-progress-ring", children: [
|
|
16936
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { width: "48", height: "48", viewBox: "0 0 48 48", "aria-hidden": "true", children: [
|
|
16937
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "24", cy: "24", r: MSC_RING_RADIUS, className: "ps-tryon-progress-ring-track" }),
|
|
16938
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
16939
|
+
"circle",
|
|
16940
|
+
{
|
|
16941
|
+
ref: ringRef,
|
|
16942
|
+
cx: "24",
|
|
16943
|
+
cy: "24",
|
|
16944
|
+
r: MSC_RING_RADIUS,
|
|
16945
|
+
className: "ps-tryon-progress-ring-fill",
|
|
16946
|
+
strokeDasharray: MSC_RING_CIRC,
|
|
16947
|
+
strokeDashoffset: MSC_RING_CIRC
|
|
16948
|
+
}
|
|
16949
|
+
)
|
|
16950
|
+
] }),
|
|
16951
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { ref: etaRef, className: "ps-tryon-progress-eta", children: `~${MSC_TRYON_TARGET_SECONDS}s` })
|
|
16952
|
+
] }),
|
|
16953
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-tryon-progress-bar-wrap", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: barRef, className: "ps-tryon-progress-bar-fill" }) }),
|
|
16954
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { ref: pctRef, className: "ps-tryon-progress-pct", children: "0%" })
|
|
16955
|
+
] });
|
|
16956
|
+
}
|
|
16879
16957
|
function MobileScanningView({
|
|
16880
16958
|
previewUrl,
|
|
16881
16959
|
productImage,
|
|
16882
16960
|
bodyLandmarks,
|
|
16883
16961
|
sizingDone,
|
|
16962
|
+
tryOnProcessing,
|
|
16884
16963
|
onSwitchToManual,
|
|
16885
16964
|
t: t2
|
|
16886
16965
|
}) {
|
|
16887
16966
|
const displayImage = previewUrl || productImage || "";
|
|
16888
16967
|
const isPhotoMode = !!previewUrl;
|
|
16889
|
-
const stages =
|
|
16968
|
+
const stages = tryOnProcessing ? [
|
|
16969
|
+
{ title: t2("GENERATING TRY-ON"), desc: t2("Rendering the garment on your photo."), viewfinderText: t2("GENERATING") },
|
|
16970
|
+
{ title: t2("REFINING DETAILS"), desc: t2("Fine-tuning fit, drape and shadows."), viewfinderText: t2("REFINING") },
|
|
16971
|
+
{ title: t2("ALMOST THERE"), desc: t2("Final compositing in progress."), viewfinderText: t2("COMPOSITING") },
|
|
16972
|
+
{ title: t2("FINISHING TOUCHES"), desc: t2("Polishing the result."), viewfinderText: t2("FINISHING") }
|
|
16973
|
+
] : isPhotoMode ? [
|
|
16890
16974
|
{ title: t2("DETECTING POSE"), desc: t2("Identifying body landmarks from your photo."), viewfinderText: t2("DETECTING POSE") },
|
|
16891
16975
|
{ title: t2("SCANNING FRAME"), desc: t2("Our AI is mapping your proportions to calculate the perfect fit."), viewfinderText: t2("SCANNING FRAME") },
|
|
16892
16976
|
{ title: t2("ANALYZING BODY"), desc: t2("Measuring shoulders, chest, waist and hips."), viewfinderText: t2("ANALYZING") },
|
|
@@ -16929,10 +17013,13 @@ function MobileScanningView({
|
|
|
16929
17013
|
),
|
|
16930
17014
|
isPhotoMode && bodyLandmarks && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-msc-pose-wrap", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MobileSkeleton, { landmarks: bodyLandmarks, w: dims.w, h: dims.h }) })
|
|
16931
17015
|
] }),
|
|
16932
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
16933
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
16934
|
-
|
|
16935
|
-
|
|
17016
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-msc-stage", children: [
|
|
17017
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-msc-stage-slot", children: [
|
|
17018
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-msc-stage-title", children: current.title }),
|
|
17019
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-msc-stage-desc", children: current.desc })
|
|
17020
|
+
] }, stageIdx),
|
|
17021
|
+
tryOnProcessing && /* @__PURE__ */ jsxRuntimeExports.jsx(MscTryOnProgress, { t: t2 })
|
|
17022
|
+
] }),
|
|
16936
17023
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-bpm-spacer" }),
|
|
16937
17024
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-bpm-bottom", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
16938
17025
|
MobileBottomTabs,
|
|
@@ -17130,6 +17217,62 @@ const SKELETON_CONNECTIONS = [
|
|
|
17130
17217
|
["rightHip", "rightKnee"],
|
|
17131
17218
|
["rightKnee", "rightAnkle"]
|
|
17132
17219
|
];
|
|
17220
|
+
const TRYON_TARGET_SECONDS = 22;
|
|
17221
|
+
const TRYON_RING_RADIUS = 20;
|
|
17222
|
+
const TRYON_RING_CIRC = 2 * Math.PI * TRYON_RING_RADIUS;
|
|
17223
|
+
function TryOnProgress({ t: t2, isActive }) {
|
|
17224
|
+
const startRef = reactExports.useRef(null);
|
|
17225
|
+
const ringRef = reactExports.useRef(null);
|
|
17226
|
+
const barRef = reactExports.useRef(null);
|
|
17227
|
+
const etaRef = reactExports.useRef(null);
|
|
17228
|
+
const pctRef = reactExports.useRef(null);
|
|
17229
|
+
reactExports.useEffect(() => {
|
|
17230
|
+
if (!isActive) {
|
|
17231
|
+
startRef.current = null;
|
|
17232
|
+
return;
|
|
17233
|
+
}
|
|
17234
|
+
startRef.current = Date.now();
|
|
17235
|
+
const id2 = setInterval(() => {
|
|
17236
|
+
const start = startRef.current || Date.now();
|
|
17237
|
+
const elapsed = (Date.now() - start) / 1e3;
|
|
17238
|
+
const pct = Math.min(95, elapsed / TRYON_TARGET_SECONDS * 100);
|
|
17239
|
+
const val = Math.round(pct);
|
|
17240
|
+
if (barRef.current) barRef.current.style.width = `${val}%`;
|
|
17241
|
+
if (pctRef.current) pctRef.current.textContent = `${val}%`;
|
|
17242
|
+
if (ringRef.current) {
|
|
17243
|
+
ringRef.current.style.strokeDashoffset = String(TRYON_RING_CIRC * (1 - pct / 100));
|
|
17244
|
+
}
|
|
17245
|
+
if (etaRef.current) {
|
|
17246
|
+
const remaining = Math.max(0, TRYON_TARGET_SECONDS - Math.floor(elapsed));
|
|
17247
|
+
etaRef.current.textContent = elapsed >= TRYON_TARGET_SECONDS ? t2("Finalizing...") : `~${remaining}s`;
|
|
17248
|
+
}
|
|
17249
|
+
}, 200);
|
|
17250
|
+
return () => clearInterval(id2);
|
|
17251
|
+
}, [isActive, t2]);
|
|
17252
|
+
if (!isActive) return null;
|
|
17253
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-tryon-progress-wrap", children: [
|
|
17254
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-tryon-progress-ring", children: [
|
|
17255
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { width: "48", height: "48", viewBox: "0 0 48 48", "aria-hidden": "true", children: [
|
|
17256
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "24", cy: "24", r: TRYON_RING_RADIUS, className: "ps-tryon-progress-ring-track" }),
|
|
17257
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17258
|
+
"circle",
|
|
17259
|
+
{
|
|
17260
|
+
ref: ringRef,
|
|
17261
|
+
cx: "24",
|
|
17262
|
+
cy: "24",
|
|
17263
|
+
r: TRYON_RING_RADIUS,
|
|
17264
|
+
className: "ps-tryon-progress-ring-fill",
|
|
17265
|
+
strokeDasharray: TRYON_RING_CIRC,
|
|
17266
|
+
strokeDashoffset: TRYON_RING_CIRC
|
|
17267
|
+
}
|
|
17268
|
+
)
|
|
17269
|
+
] }),
|
|
17270
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { ref: etaRef, className: "ps-tryon-progress-eta", children: `~${TRYON_TARGET_SECONDS}s` })
|
|
17271
|
+
] }),
|
|
17272
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-tryon-progress-bar-wrap", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: barRef, className: "ps-tryon-progress-bar-fill" }) }),
|
|
17273
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { ref: pctRef, className: "ps-tryon-progress-pct", children: "0%" })
|
|
17274
|
+
] });
|
|
17275
|
+
}
|
|
17133
17276
|
function FaceOverlay({
|
|
17134
17277
|
landmarks,
|
|
17135
17278
|
imgWidth,
|
|
@@ -17273,10 +17416,13 @@ function StageCycler({
|
|
|
17273
17416
|
return () => clearInterval(id2);
|
|
17274
17417
|
}, [isDone, active.length]);
|
|
17275
17418
|
const current = active[idx] ?? active[0];
|
|
17276
|
-
return /* @__PURE__ */ jsxRuntimeExports.
|
|
17277
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
17278
|
-
|
|
17279
|
-
|
|
17419
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-msc-stage", style: { alignSelf: "center", marginTop: "auto", marginBottom: "auto" }, children: [
|
|
17420
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-msc-stage-slot", children: [
|
|
17421
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-msc-stage-title", children: current.title }),
|
|
17422
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-msc-stage-desc", children: current.desc })
|
|
17423
|
+
] }, `${tryOnProcessing ? "t" : "s"}-${idx}`),
|
|
17424
|
+
tryOnProcessing && /* @__PURE__ */ jsxRuntimeExports.jsx(TryOnProgress, { t: t2, isActive: !!tryOnProcessing })
|
|
17425
|
+
] });
|
|
17280
17426
|
}
|
|
17281
17427
|
function SkeletonOverlay({ landmarks, imgWidth, imgHeight }) {
|
|
17282
17428
|
const W2 = imgWidth;
|
|
@@ -18452,6 +18598,7 @@ function SizeResultView({
|
|
|
18452
18598
|
previewUrl,
|
|
18453
18599
|
bodyLandmarks: bodyLandmarks ?? null,
|
|
18454
18600
|
sizingDone,
|
|
18601
|
+
tryOnProcessing,
|
|
18455
18602
|
onSwitchToManual: () => setView("body-profile"),
|
|
18456
18603
|
t: t2
|
|
18457
18604
|
}
|
|
@@ -18508,7 +18655,7 @@ function SizeResultView({
|
|
|
18508
18655
|
isMobile: true,
|
|
18509
18656
|
isTryOnImage: !!resultImageUrl,
|
|
18510
18657
|
showLines,
|
|
18511
|
-
onToggleLines: () => setShowLines(!showLines),
|
|
18658
|
+
onToggleLines: isAccessory ? void 0 : () => setShowLines(!showLines),
|
|
18512
18659
|
onImageLoad: handleImgLoad,
|
|
18513
18660
|
overlayNode: resultImageUrl && poseReady && poseLines ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18514
18661
|
MeasurementOverlay,
|
|
@@ -18582,7 +18729,7 @@ function SizeResultView({
|
|
|
18582
18729
|
},
|
|
18583
18730
|
onClose,
|
|
18584
18731
|
showLines,
|
|
18585
|
-
onToggleLines: () => setShowLines(!showLines),
|
|
18732
|
+
onToggleLines: isAccessory ? void 0 : () => setShowLines(!showLines),
|
|
18586
18733
|
onImageLoad: handleImgLoad,
|
|
18587
18734
|
overlayNode: resultImageUrl && poseReady && poseLines ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18588
18735
|
MeasurementOverlay,
|
|
@@ -18617,7 +18764,10 @@ function SizeResultView({
|
|
|
18617
18764
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-tryon-v2-bg", style: { position: "relative" }, children: [
|
|
18618
18765
|
/* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: tryOnProcessing && previewUrl ? previewUrl : resultImageUrl || productImage, alt: productTitle, className: "ps-tryon-v2-bg-img", onLoad: handleImgLoad }),
|
|
18619
18766
|
tryOnProcessing && bodyLandmarks && /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonOverlay, { landmarks: bodyLandmarks, imgWidth: imgDims.w, imgHeight: imgDims.h }),
|
|
18620
|
-
tryOnProcessing && /* @__PURE__ */ jsxRuntimeExports.
|
|
18767
|
+
tryOnProcessing && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-tryon-v2-processing-label", children: [
|
|
18768
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: t2("Generating try-on...") }),
|
|
18769
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TryOnProgress, { t: t2, isActive: true })
|
|
18770
|
+
] }),
|
|
18621
18771
|
resultImageUrl && !tryOnProcessing && poseReady && poseLines && /* @__PURE__ */ jsxRuntimeExports.jsx(MeasurementOverlay, { lines: poseLines, fitRows: (() => {
|
|
18622
18772
|
const all = [...sizingResult?.matchDetails || []];
|
|
18623
18773
|
if (sizingResult?.sections) {
|
|
@@ -18634,7 +18784,7 @@ function SizeResultView({
|
|
|
18634
18784
|
}).map((m2) => ({ area: m2.measurement, userNum: parseFloat(m2.userValue) || 0, chartLabel: m2.chartRange || "", fit: m2.fit }));
|
|
18635
18785
|
})(), show: showLines, imgWidth: imgDims.w, imgHeight: imgDims.h }),
|
|
18636
18786
|
resultImageUrl && !tryOnProcessing && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { position: "absolute", bottom: "0.5vw", left: "0.5vw", zIndex: 3, display: "flex", flexDirection: "column", gap: "0.3vw" }, children: [
|
|
18637
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("button", { className: "ps-tryon-sr-glass-btn", onClick: () => setShowLines(!showLines), children: [
|
|
18787
|
+
!isAccessory && /* @__PURE__ */ jsxRuntimeExports.jsxs("button", { className: "ps-tryon-sr-glass-btn", onClick: () => setShowLines(!showLines), children: [
|
|
18638
18788
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", style: { marginRight: "0.3vw" }, children: [
|
|
18639
18789
|
/* @__PURE__ */ jsxRuntimeExports.jsx("line", { x1: "4", y1: "9", x2: "20", y2: "9" }),
|
|
18640
18790
|
/* @__PURE__ */ jsxRuntimeExports.jsx("line", { x1: "4", y1: "15", x2: "20", y2: "15" }),
|
|
@@ -18757,7 +18907,7 @@ function SizeResultView({
|
|
|
18757
18907
|
renderRaw: isAccessory,
|
|
18758
18908
|
isTryOnImage: !!resultImageUrl,
|
|
18759
18909
|
showLines,
|
|
18760
|
-
onToggleLines: () => setShowLines(!showLines),
|
|
18910
|
+
onToggleLines: isAccessory ? void 0 : () => setShowLines(!showLines),
|
|
18761
18911
|
onImageLoad: handleImgLoad,
|
|
18762
18912
|
overlayNode: resultImageUrl && poseReady && poseLines ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18763
18913
|
MeasurementOverlay,
|
|
@@ -18778,7 +18928,7 @@ function SizeResultView({
|
|
|
18778
18928
|
/* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: resultImageUrl || productImage, alt: productTitle, className: "ps-tryon-v2-bg-img", onLoad: handleImgLoad }),
|
|
18779
18929
|
resultImageUrl && poseReady && poseLines && /* @__PURE__ */ jsxRuntimeExports.jsx(MeasurementOverlay, { lines: poseLines, fitRows: (sizingResult?.matchDetails || []).map((m2) => ({ area: m2.measurement, userNum: parseFloat(m2.userValue) || 0, chartLabel: m2.chartRange || "", fit: m2.fit })), show: showLines, imgWidth: imgDims.w, imgHeight: imgDims.h }),
|
|
18780
18930
|
resultImageUrl && !tryOnProcessing && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { position: "absolute", bottom: "0.5vw", left: "0.5vw", zIndex: 3, display: "flex", flexDirection: "column", gap: "0.3vw" }, children: [
|
|
18781
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "ps-tryon-sr-glass-btn", onClick: () => setShowLines(!showLines), children: showLines ? t2("Hide Fit") : t2("Show Fit") }),
|
|
18931
|
+
!isAccessory && /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "ps-tryon-sr-glass-btn", onClick: () => setShowLines(!showLines), children: showLines ? t2("Hide Fit") : t2("Show Fit") }),
|
|
18782
18932
|
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "ps-tryon-sr-glass-btn", onClick: handleDownload, children: t2("Download") })
|
|
18783
18933
|
] })
|
|
18784
18934
|
] }),
|