@primestyleai/tryon 5.6.15 → 5.6.17
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
CHANGED
|
@@ -3080,6 +3080,27 @@ const STYLES = `
|
|
|
3080
3080
|
to { opacity: 1; }
|
|
3081
3081
|
}
|
|
3082
3082
|
|
|
3083
|
+
/* Minimal "Using <profile> · start fresh" hint above the first input */
|
|
3084
|
+
.ps-bp-profile-hint {
|
|
3085
|
+
margin: 0; padding: 0;
|
|
3086
|
+
text-align: center;
|
|
3087
|
+
font-size: 11px; font-weight: 400;
|
|
3088
|
+
color: var(--ps-text-muted);
|
|
3089
|
+
letter-spacing: 0.01em;
|
|
3090
|
+
line-height: 1.4;
|
|
3091
|
+
}
|
|
3092
|
+
.ps-bp-profile-hint strong {
|
|
3093
|
+
color: var(--ps-text-secondary); font-weight: 600;
|
|
3094
|
+
}
|
|
3095
|
+
.ps-bp-profile-hint-link {
|
|
3096
|
+
background: none; border: none;
|
|
3097
|
+
color: var(--ps-text-muted);
|
|
3098
|
+
font-family: inherit; font-size: inherit; font-weight: 400;
|
|
3099
|
+
text-decoration: underline; text-underline-offset: 2px;
|
|
3100
|
+
cursor: pointer; padding: 0;
|
|
3101
|
+
}
|
|
3102
|
+
.ps-bp-profile-hint-link:hover { color: var(--ps-text-secondary); }
|
|
3103
|
+
|
|
3083
3104
|
/* Typography */
|
|
3084
3105
|
.ps-bp-title {
|
|
3085
3106
|
font-size: 1.25vw; font-weight: 700; color: var(--ps-text-primary);
|
|
@@ -3440,10 +3461,10 @@ const STYLES = `
|
|
|
3440
3461
|
flex: 1; min-height: 0;
|
|
3441
3462
|
}
|
|
3442
3463
|
|
|
3443
|
-
/*
|
|
3464
|
+
/* Photo container — transparent, no scanner, no chrome */
|
|
3444
3465
|
.ps-msc-viewfinder {
|
|
3445
3466
|
position: relative; flex-shrink: 0;
|
|
3446
|
-
background:
|
|
3467
|
+
background: transparent; border-radius: 12px; overflow: hidden;
|
|
3447
3468
|
height: 64vh; max-height: 540px; min-height: 360px;
|
|
3448
3469
|
display: flex; align-items: center; justify-content: center;
|
|
3449
3470
|
}
|
|
@@ -3451,7 +3472,6 @@ const STYLES = `
|
|
|
3451
3472
|
max-width: 100%; max-height: 100%;
|
|
3452
3473
|
width: auto; height: 100%;
|
|
3453
3474
|
object-fit: contain; display: block;
|
|
3454
|
-
filter: brightness(0.9) contrast(1.05);
|
|
3455
3475
|
}
|
|
3456
3476
|
|
|
3457
3477
|
/* Live feed badge top-left */
|
|
@@ -6082,8 +6102,8 @@ function MobileSkeleton({ landmarks, w, h }) {
|
|
|
6082
6102
|
y1: pa.y * h,
|
|
6083
6103
|
x2: pb.x * w,
|
|
6084
6104
|
y2: pb.y * h,
|
|
6085
|
-
stroke: "rgba(
|
|
6086
|
-
strokeWidth: "
|
|
6105
|
+
stroke: "rgba(100,210,255,0.9)",
|
|
6106
|
+
strokeWidth: "4",
|
|
6087
6107
|
strokeLinecap: "round",
|
|
6088
6108
|
opacity: 0,
|
|
6089
6109
|
style: { animation: `ps-msc-fade 0.4s ease ${i * 0.05}s forwards` }
|
|
@@ -6097,8 +6117,8 @@ function MobileSkeleton({ landmarks, w, h }) {
|
|
|
6097
6117
|
{
|
|
6098
6118
|
cx: v.x * w,
|
|
6099
6119
|
cy: v.y * h,
|
|
6100
|
-
r:
|
|
6101
|
-
fill: "rgba(
|
|
6120
|
+
r: 10,
|
|
6121
|
+
fill: "rgba(100,210,255,0.25)",
|
|
6102
6122
|
opacity: 0,
|
|
6103
6123
|
style: { animation: `ps-msc-fade 0.3s ease ${i * 0.04}s forwards` }
|
|
6104
6124
|
}
|
|
@@ -6108,8 +6128,8 @@ function MobileSkeleton({ landmarks, w, h }) {
|
|
|
6108
6128
|
{
|
|
6109
6129
|
cx: v.x * w,
|
|
6110
6130
|
cy: v.y * h,
|
|
6111
|
-
r:
|
|
6112
|
-
fill: "
|
|
6131
|
+
r: 6,
|
|
6132
|
+
fill: "rgba(100,210,255,0.95)",
|
|
6113
6133
|
opacity: 0,
|
|
6114
6134
|
style: { animation: `ps-msc-fade 0.3s ease ${i * 0.04}s forwards` }
|
|
6115
6135
|
}
|
|
@@ -6167,11 +6187,6 @@ function MobileScanningView({
|
|
|
6167
6187
|
}, [sizingDone]);
|
|
6168
6188
|
return /* @__PURE__ */ jsxs("div", { className: "ps-msc-root", children: [
|
|
6169
6189
|
/* @__PURE__ */ jsxs("div", { className: "ps-msc-viewfinder", children: [
|
|
6170
|
-
/* @__PURE__ */ jsxs("div", { className: "ps-msc-feed-badge", children: [
|
|
6171
|
-
/* @__PURE__ */ jsx("span", { className: "ps-msc-feed-dot" }),
|
|
6172
|
-
"LIVE_FEED:",
|
|
6173
|
-
String(feedTick).padStart(2, "0")
|
|
6174
|
-
] }),
|
|
6175
6190
|
displayImage && /* @__PURE__ */ jsx(
|
|
6176
6191
|
"img",
|
|
6177
6192
|
{
|
|
@@ -6181,22 +6196,7 @@ function MobileScanningView({
|
|
|
6181
6196
|
onLoad: handleImgLoad
|
|
6182
6197
|
}
|
|
6183
6198
|
),
|
|
6184
|
-
/* @__PURE__ */
|
|
6185
|
-
/* @__PURE__ */ jsx("span", { className: "ps-msc-corner ps-tl" }),
|
|
6186
|
-
/* @__PURE__ */ jsx("span", { className: "ps-msc-corner ps-tr" }),
|
|
6187
|
-
/* @__PURE__ */ jsx("span", { className: "ps-msc-corner ps-bl" }),
|
|
6188
|
-
/* @__PURE__ */ jsx("span", { className: "ps-msc-corner ps-br" })
|
|
6189
|
-
] }),
|
|
6190
|
-
/* @__PURE__ */ jsx("div", { className: "ps-msc-scanline" }),
|
|
6191
|
-
isPhotoMode && bodyLandmarks && /* @__PURE__ */ jsx("div", { className: "ps-msc-pose-wrap", children: /* @__PURE__ */ jsx(MobileSkeleton, { landmarks: bodyLandmarks, w: dims.w, h: dims.h }) }),
|
|
6192
|
-
/* @__PURE__ */ jsxs("div", { className: "ps-msc-vf-bottom", children: [
|
|
6193
|
-
/* @__PURE__ */ jsxs("div", { className: "ps-msc-vf-text", children: [
|
|
6194
|
-
current.viewfinderText,
|
|
6195
|
-
"..."
|
|
6196
|
-
] }),
|
|
6197
|
-
/* @__PURE__ */ jsx("div", { className: "ps-msc-vf-bar", children: /* @__PURE__ */ jsx("div", { className: "ps-msc-vf-bar-fill" }) }),
|
|
6198
|
-
/* @__PURE__ */ jsx("div", { className: "ps-msc-vf-sub", children: t("PLEASE STAND STILL") })
|
|
6199
|
-
] })
|
|
6199
|
+
isPhotoMode && bodyLandmarks && /* @__PURE__ */ jsx("div", { className: "ps-msc-pose-wrap", children: /* @__PURE__ */ jsx(MobileSkeleton, { landmarks: bodyLandmarks, w: dims.w, h: dims.h }) })
|
|
6200
6200
|
] }),
|
|
6201
6201
|
/* @__PURE__ */ jsx("div", { className: "ps-msc-stage", children: /* @__PURE__ */ jsxs("div", { className: "ps-msc-stage-slot", children: [
|
|
6202
6202
|
/* @__PURE__ */ jsx("div", { className: "ps-msc-stage-title", children: current.title }),
|
|
@@ -7339,7 +7339,7 @@ function SizeResultView({
|
|
|
7339
7339
|
{
|
|
7340
7340
|
src: previewUrl || productImage,
|
|
7341
7341
|
alt: productTitle,
|
|
7342
|
-
className:
|
|
7342
|
+
className: "ps-tryon-sr-product-img",
|
|
7343
7343
|
onLoad: handleImgLoad
|
|
7344
7344
|
}
|
|
7345
7345
|
),
|
|
@@ -7493,12 +7493,8 @@ function SizeResultView({
|
|
|
7493
7493
|
/* ── Desktop section picker: split layout — image left, image cards right ── */
|
|
7494
7494
|
/* @__PURE__ */ jsxs("div", { className: "ps-tryon-v2", children: [
|
|
7495
7495
|
/* @__PURE__ */ jsxs("div", { className: "ps-tryon-v2-bg", style: { position: "relative" }, children: [
|
|
7496
|
-
/* @__PURE__ */ jsx("img", { src: tryOnProcessing && previewUrl ? previewUrl : resultImageUrl || productImage, alt: productTitle, className:
|
|
7496
|
+
/* @__PURE__ */ jsx("img", { src: tryOnProcessing && previewUrl ? previewUrl : resultImageUrl || productImage, alt: productTitle, className: "ps-tryon-v2-bg-img", onLoad: handleImgLoad }),
|
|
7497
7497
|
tryOnProcessing && bodyLandmarks && /* @__PURE__ */ jsx(SkeletonOverlay, { landmarks: bodyLandmarks, imgWidth: imgDims.w, imgHeight: imgDims.h }),
|
|
7498
|
-
tryOnProcessing && !bodyLandmarks && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7499
|
-
/* @__PURE__ */ jsx("div", { className: "ps-tryon-scan-overlay" }),
|
|
7500
|
-
/* @__PURE__ */ jsx("div", { className: "ps-tryon-scan-line" })
|
|
7501
|
-
] }),
|
|
7502
7498
|
tryOnProcessing && /* @__PURE__ */ jsx("div", { className: "ps-tryon-v2-processing-label", children: t("Generating try-on...") }),
|
|
7503
7499
|
resultImageUrl && !tryOnProcessing && poseReady && poseLines && /* @__PURE__ */ jsx(MeasurementOverlay, { lines: poseLines, fitRows: (() => {
|
|
7504
7500
|
const all = [...sizingResult?.matchDetails || []];
|
|
@@ -8903,6 +8899,8 @@ function BasicsStepMobile({
|
|
|
8903
8899
|
onNext,
|
|
8904
8900
|
canProceed,
|
|
8905
8901
|
fastPathLabel,
|
|
8902
|
+
activeProfileName,
|
|
8903
|
+
onStartFresh,
|
|
8906
8904
|
error,
|
|
8907
8905
|
t
|
|
8908
8906
|
}) {
|
|
@@ -8943,6 +8941,15 @@ function BasicsStepMobile({
|
|
|
8943
8941
|
/* @__PURE__ */ jsx("h2", { className: "ps-bpm-title", children: t("Let's find your best fit") }),
|
|
8944
8942
|
/* @__PURE__ */ jsx("p", { className: "ps-bpm-subtitle", children: t("Enter your details for a bespoke size recommendation") })
|
|
8945
8943
|
] }),
|
|
8944
|
+
activeProfileName && /* @__PURE__ */ jsxs("p", { className: "ps-bp-profile-hint", children: [
|
|
8945
|
+
t("Using"),
|
|
8946
|
+
" ",
|
|
8947
|
+
/* @__PURE__ */ jsx("strong", { children: activeProfileName }),
|
|
8948
|
+
onStartFresh && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8949
|
+
" · ",
|
|
8950
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "ps-bp-profile-hint-link", onClick: onStartFresh, children: t("start fresh") })
|
|
8951
|
+
] })
|
|
8952
|
+
] }),
|
|
8946
8953
|
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-toggle", children: [
|
|
8947
8954
|
/* @__PURE__ */ jsx(
|
|
8948
8955
|
"button",
|
|
@@ -9351,6 +9358,8 @@ function BodyProfileView({
|
|
|
9351
9358
|
onSnapSubmit,
|
|
9352
9359
|
hasActiveProfileWithMeasurements = false,
|
|
9353
9360
|
onUseActiveProfile,
|
|
9361
|
+
activeProfileName,
|
|
9362
|
+
onStartFresh,
|
|
9354
9363
|
onBack,
|
|
9355
9364
|
t
|
|
9356
9365
|
}) {
|
|
@@ -9765,6 +9774,8 @@ function BodyProfileView({
|
|
|
9765
9774
|
onNext: hasActiveProfileWithMeasurements && onUseActiveProfile ? onUseActiveProfile : handleNext,
|
|
9766
9775
|
canProceed: true,
|
|
9767
9776
|
fastPathLabel: hasActiveProfileWithMeasurements ? t("Find My Best Fit") : void 0,
|
|
9777
|
+
activeProfileName: hasActiveProfileWithMeasurements ? activeProfileName : null,
|
|
9778
|
+
onStartFresh,
|
|
9768
9779
|
error,
|
|
9769
9780
|
t
|
|
9770
9781
|
},
|
|
@@ -9773,6 +9784,15 @@ function BodyProfileView({
|
|
|
9773
9784
|
}
|
|
9774
9785
|
return /* @__PURE__ */ jsxs("div", { className: "ps-bp-step ps-bp-step-enter", children: [
|
|
9775
9786
|
/* @__PURE__ */ jsx("h2", { className: "ps-bp-title", children: t("Let's find your best fit") }),
|
|
9787
|
+
hasActiveProfileWithMeasurements && activeProfileName && /* @__PURE__ */ jsxs("p", { className: "ps-bp-profile-hint", children: [
|
|
9788
|
+
t("Using"),
|
|
9789
|
+
" ",
|
|
9790
|
+
/* @__PURE__ */ jsx("strong", { children: activeProfileName }),
|
|
9791
|
+
onStartFresh && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9792
|
+
" · ",
|
|
9793
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "ps-bp-profile-hint-link", onClick: onStartFresh, children: t("start fresh") })
|
|
9794
|
+
] })
|
|
9795
|
+
] }),
|
|
9776
9796
|
/* @__PURE__ */ jsxs("div", { className: "ps-bp-system-toggle", children: [
|
|
9777
9797
|
/* @__PURE__ */ jsx("button", { className: `ps-bp-system-btn${!isImperialMode ? " ps-bp-system-active" : ""}`, onClick: switchToMetric, type: "button", children: t("Metric") }),
|
|
9778
9798
|
/* @__PURE__ */ jsx("button", { className: `ps-bp-system-btn${isImperialMode ? " ps-bp-system-active" : ""}`, onClick: switchToImperial, type: "button", children: t("Imperial") })
|
|
@@ -11157,6 +11177,14 @@ function PrimeStyleTryonInner({
|
|
|
11157
11177
|
return !!(p && p.measurements && Object.keys(p.measurements).length > 0);
|
|
11158
11178
|
})(),
|
|
11159
11179
|
onUseActiveProfile: handleUseActiveProfile,
|
|
11180
|
+
activeProfileName: (() => {
|
|
11181
|
+
const p = profiles.find((x) => x.id === activeProfileId);
|
|
11182
|
+
return p?.name || null;
|
|
11183
|
+
})(),
|
|
11184
|
+
onStartFresh: () => {
|
|
11185
|
+
setActiveProfileId$1(null);
|
|
11186
|
+
formRef.current = {};
|
|
11187
|
+
},
|
|
11160
11188
|
onComplete: (data) => {
|
|
11161
11189
|
formRef.current.gender = data.gender;
|
|
11162
11190
|
if (data.bandSize) formRef.current.bandSize = data.bandSize;
|