@primestyleai/tryon 5.8.25 → 5.8.26
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 +63 -70
- package/dist/react/styles.d.ts +1 -1
- package/dist/storefront/primestyle-tryon.js +63 -70
- package/package.json +1 -1
|
@@ -13907,13 +13907,16 @@ const STYLES$1 = `
|
|
|
13907
13907
|
|
|
13908
13908
|
.ps-cpw-body {
|
|
13909
13909
|
display: flex; flex-direction: column;
|
|
13910
|
-
gap:
|
|
13910
|
+
gap: 14px;
|
|
13911
13911
|
flex: 1; min-height: 0;
|
|
13912
13912
|
width: 100%; max-width: 100%;
|
|
13913
13913
|
box-sizing: border-box;
|
|
13914
|
-
/*
|
|
13915
|
-
|
|
13916
|
-
|
|
13914
|
+
/* Modal height is fixed by the parent — don't grow it. If a step
|
|
13915
|
+
happens to be taller (rare), let it scroll inside the body
|
|
13916
|
+
instead of forcing the modal to expand. */
|
|
13917
|
+
overflow-y: auto; overflow-x: hidden;
|
|
13918
|
+
-webkit-overflow-scrolling: touch;
|
|
13919
|
+
padding: 14px 16px;
|
|
13917
13920
|
}
|
|
13918
13921
|
|
|
13919
13922
|
/* Step 1 — Identity form (compact) */
|
|
@@ -14197,17 +14200,18 @@ const STYLES$1 = `
|
|
|
14197
14200
|
justify-content: center;
|
|
14198
14201
|
}
|
|
14199
14202
|
.ps-cpw-method-intro { display: none; }
|
|
14203
|
+
/* Two cards side by side. Each card stacks the illustration on top
|
|
14204
|
+
and the text below — keeps the cards short and lets the picker fit
|
|
14205
|
+
inside the wizard body without changing the modal height. */
|
|
14200
14206
|
.ps-cpw-method-grid {
|
|
14201
|
-
display:
|
|
14202
|
-
|
|
14207
|
+
display: grid;
|
|
14208
|
+
grid-template-columns: 1fr 1fr;
|
|
14209
|
+
gap: 12px;
|
|
14203
14210
|
width: 100%; max-width: 100%;
|
|
14204
14211
|
box-sizing: border-box;
|
|
14205
14212
|
}
|
|
14206
|
-
/* Horizontal card: small square image on the left, text on the right.
|
|
14207
|
-
Total card height ≈ 84px so two cards + the header + footer all fit
|
|
14208
|
-
well inside the modal viewport. */
|
|
14209
14213
|
.ps-cpw-method-card {
|
|
14210
|
-
display: flex; align-items: stretch;
|
|
14214
|
+
display: flex; flex-direction: column; align-items: stretch;
|
|
14211
14215
|
gap: 0;
|
|
14212
14216
|
min-width: 0;
|
|
14213
14217
|
width: 100%; max-width: 100%;
|
|
@@ -14224,25 +14228,24 @@ const STYLES$1 = `
|
|
|
14224
14228
|
transform: translateY(-1px);
|
|
14225
14229
|
box-shadow: 0 6px 18px rgba(33, 84, 239, 0.10);
|
|
14226
14230
|
}
|
|
14227
|
-
/*
|
|
14231
|
+
/* Square-ish illustration slot at the top of each card */
|
|
14228
14232
|
.ps-cpw-method-img {
|
|
14229
|
-
width:
|
|
14233
|
+
width: 100%;
|
|
14234
|
+
aspect-ratio: 1 / 1;
|
|
14230
14235
|
flex-shrink: 0;
|
|
14231
14236
|
background: var(--ps-bg-secondary);
|
|
14232
14237
|
display: flex; align-items: center; justify-content: center;
|
|
14233
|
-
border-
|
|
14238
|
+
border-bottom: 1px solid var(--ps-border-subtle);
|
|
14234
14239
|
}
|
|
14235
14240
|
.ps-cpw-method-img img {
|
|
14236
14241
|
width: 100%; height: 100%;
|
|
14237
14242
|
object-fit: contain;
|
|
14238
14243
|
display: block;
|
|
14239
14244
|
}
|
|
14240
|
-
/* Text — to the right of the illustration */
|
|
14241
14245
|
.ps-cpw-method-text {
|
|
14242
|
-
display: flex; flex-direction: column; gap: 3px;
|
|
14243
|
-
padding: 10px
|
|
14244
|
-
|
|
14245
|
-
box-sizing: border-box;
|
|
14246
|
+
display: flex; flex-direction: column; gap: 3px;
|
|
14247
|
+
padding: 10px 12px 12px;
|
|
14248
|
+
width: 100%; box-sizing: border-box;
|
|
14246
14249
|
}
|
|
14247
14250
|
.ps-cpw-method-title {
|
|
14248
14251
|
font-size: 13px; font-weight: 700;
|
|
@@ -14258,10 +14261,14 @@ const STYLES$1 = `
|
|
|
14258
14261
|
them inside the wizard body so all rows fit without scrolling. */
|
|
14259
14262
|
.ps-cpw-inline-fields {
|
|
14260
14263
|
width: 100%;
|
|
14261
|
-
margin-top:
|
|
14264
|
+
margin-top: 4px;
|
|
14265
|
+
/* Generous breathing room between rows so the inputs don't feel
|
|
14266
|
+
cramped together — each row owns its own divider. */
|
|
14267
|
+
display: flex; flex-direction: column;
|
|
14268
|
+
gap: 6px;
|
|
14262
14269
|
}
|
|
14263
14270
|
.ps-cpw-inline-fields .ps-bp-inline-row {
|
|
14264
|
-
padding:
|
|
14271
|
+
padding: 14px 2px;
|
|
14265
14272
|
border-bottom: 1px solid var(--ps-border-subtle);
|
|
14266
14273
|
}
|
|
14267
14274
|
.ps-cpw-inline-fields .ps-bp-inline-row:last-child { border-bottom: none; }
|
|
@@ -14273,7 +14280,7 @@ const STYLES$1 = `
|
|
|
14273
14280
|
letter-spacing: 0.08em;
|
|
14274
14281
|
}
|
|
14275
14282
|
.ps-cpw-inline-fields .ps-bp-inline-input {
|
|
14276
|
-
font-size:
|
|
14283
|
+
font-size: 14px;
|
|
14277
14284
|
padding-bottom: 0;
|
|
14278
14285
|
border-bottom: none; /* parent row owns the divider */
|
|
14279
14286
|
color: var(--ps-text-primary);
|
|
@@ -18214,6 +18221,27 @@ function CreateProfileWizard({ onSave, onCancel, t: t2 }) {
|
|
|
18214
18221
|
}
|
|
18215
18222
|
setManualStep(manualStepOrder[manualStepIdx + 1]);
|
|
18216
18223
|
};
|
|
18224
|
+
const pickShape = (step, value) => {
|
|
18225
|
+
setError("");
|
|
18226
|
+
if (step === "chest") setChestProfile(value);
|
|
18227
|
+
else if (step === "stomach") setMidsectionProfile(value);
|
|
18228
|
+
else if (step === "seat") setSeatProfile(value);
|
|
18229
|
+
else if (step === "hips") setHipProfile(value);
|
|
18230
|
+
const idx = manualStepOrder.indexOf(step);
|
|
18231
|
+
const isLast = idx === manualStepCount - 1;
|
|
18232
|
+
setTimeout(() => {
|
|
18233
|
+
if (isLast) {
|
|
18234
|
+
const payload = buildManualPayload();
|
|
18235
|
+
if (step === "chest") payload.chestProfile = value;
|
|
18236
|
+
else if (step === "stomach") payload.midsectionProfile = value;
|
|
18237
|
+
else if (step === "seat") payload.hipProfile = value;
|
|
18238
|
+
else if (step === "hips") payload.hipProfile = value;
|
|
18239
|
+
onSave(payload);
|
|
18240
|
+
} else {
|
|
18241
|
+
setManualStep(manualStepOrder[idx + 1]);
|
|
18242
|
+
}
|
|
18243
|
+
}, 220);
|
|
18244
|
+
};
|
|
18217
18245
|
const goBackManual = () => {
|
|
18218
18246
|
setError("");
|
|
18219
18247
|
if (manualStep === "identity") {
|
|
@@ -18222,6 +18250,7 @@ function CreateProfileWizard({ onSave, onCancel, t: t2 }) {
|
|
|
18222
18250
|
}
|
|
18223
18251
|
setManualStep(manualStepOrder[Math.max(0, manualStepIdx - 1)]);
|
|
18224
18252
|
};
|
|
18253
|
+
const isAutoAdvanceStep = mode === "manual" && (manualStep === "chest" || manualStep === "stomach" || manualStep === "seat" || manualStep === "hips");
|
|
18225
18254
|
const advanceImage = () => {
|
|
18226
18255
|
if (!validateNameOnly()) return;
|
|
18227
18256
|
if (!photoBase64) {
|
|
@@ -18401,18 +18430,9 @@ function CreateProfileWizard({ onSave, onCancel, t: t2 }) {
|
|
|
18401
18430
|
title: t2("CHEST PROFILE"),
|
|
18402
18431
|
subtitle: t2("Select the profile that best matches your chest breadth"),
|
|
18403
18432
|
children: [
|
|
18404
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.chest?.narrow ?? null, label: t2("NARROW"), selected: chestProfile === "narrow", onSelect: () =>
|
|
18405
|
-
|
|
18406
|
-
|
|
18407
|
-
} }),
|
|
18408
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.chest?.average ?? null, label: t2("AVERAGE"), selected: chestProfile === "average", onSelect: () => {
|
|
18409
|
-
setChestProfile("average");
|
|
18410
|
-
setError("");
|
|
18411
|
-
} }),
|
|
18412
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.chest?.broad ?? null, label: t2("BROAD"), selected: chestProfile === "broad", onSelect: () => {
|
|
18413
|
-
setChestProfile("broad");
|
|
18414
|
-
setError("");
|
|
18415
|
-
} })
|
|
18433
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.chest?.narrow ?? null, label: t2("NARROW"), selected: chestProfile === "narrow", onSelect: () => pickShape("chest", "narrow") }),
|
|
18434
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.chest?.average ?? null, label: t2("AVERAGE"), selected: chestProfile === "average", onSelect: () => pickShape("chest", "average") }),
|
|
18435
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.chest?.broad ?? null, label: t2("BROAD"), selected: chestProfile === "broad", onSelect: () => pickShape("chest", "broad") })
|
|
18416
18436
|
]
|
|
18417
18437
|
}
|
|
18418
18438
|
),
|
|
@@ -18423,18 +18443,9 @@ function CreateProfileWizard({ onSave, onCancel, t: t2 }) {
|
|
|
18423
18443
|
title: t2("STOMACH PROFILE"),
|
|
18424
18444
|
subtitle: t2("Describe your mid-section silhouette"),
|
|
18425
18445
|
children: [
|
|
18426
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.stomach?.flat ?? null, label: t2("FLAT"), selected: midsectionProfile === "flat", onSelect: () =>
|
|
18427
|
-
|
|
18428
|
-
|
|
18429
|
-
} }),
|
|
18430
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.stomach?.average ?? null, label: t2("AVERAGE"), selected: midsectionProfile === "average", onSelect: () => {
|
|
18431
|
-
setMidsectionProfile("average");
|
|
18432
|
-
setError("");
|
|
18433
|
-
} }),
|
|
18434
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.stomach?.round ?? null, label: t2("ROUND"), selected: midsectionProfile === "round", onSelect: () => {
|
|
18435
|
-
setMidsectionProfile("round");
|
|
18436
|
-
setError("");
|
|
18437
|
-
} })
|
|
18446
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.stomach?.flat ?? null, label: t2("FLAT"), selected: midsectionProfile === "flat", onSelect: () => pickShape("stomach", "flat") }),
|
|
18447
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.stomach?.average ?? null, label: t2("AVERAGE"), selected: midsectionProfile === "average", onSelect: () => pickShape("stomach", "average") }),
|
|
18448
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.stomach?.round ?? null, label: t2("ROUND"), selected: midsectionProfile === "round", onSelect: () => pickShape("stomach", "round") })
|
|
18438
18449
|
]
|
|
18439
18450
|
}
|
|
18440
18451
|
),
|
|
@@ -18445,18 +18456,9 @@ function CreateProfileWizard({ onSave, onCancel, t: t2 }) {
|
|
|
18445
18456
|
title: t2("BACK & SEAT"),
|
|
18446
18457
|
subtitle: t2("The curvature of your lower spine and seat profile"),
|
|
18447
18458
|
children: [
|
|
18448
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.seat?.narrow ?? null, label: t2("STRAIGHT"), selected: seatProfile === "narrow", onSelect: () =>
|
|
18449
|
-
|
|
18450
|
-
|
|
18451
|
-
} }),
|
|
18452
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.seat?.average ?? null, label: t2("CURVED"), selected: seatProfile === "average", onSelect: () => {
|
|
18453
|
-
setSeatProfile("average");
|
|
18454
|
-
setError("");
|
|
18455
|
-
} }),
|
|
18456
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.seat?.full ?? null, label: t2("DEEP"), selected: seatProfile === "full", onSelect: () => {
|
|
18457
|
-
setSeatProfile("full");
|
|
18458
|
-
setError("");
|
|
18459
|
-
} })
|
|
18459
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.seat?.narrow ?? null, label: t2("STRAIGHT"), selected: seatProfile === "narrow", onSelect: () => pickShape("seat", "narrow") }),
|
|
18460
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.seat?.average ?? null, label: t2("CURVED"), selected: seatProfile === "average", onSelect: () => pickShape("seat", "average") }),
|
|
18461
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.seat?.full ?? null, label: t2("DEEP"), selected: seatProfile === "full", onSelect: () => pickShape("seat", "full") })
|
|
18460
18462
|
]
|
|
18461
18463
|
}
|
|
18462
18464
|
),
|
|
@@ -18467,18 +18469,9 @@ function CreateProfileWizard({ onSave, onCancel, t: t2 }) {
|
|
|
18467
18469
|
title: t2("HIP PROFILE"),
|
|
18468
18470
|
subtitle: t2("The curvature of your hips and thighs"),
|
|
18469
18471
|
children: [
|
|
18470
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.hips.narrow ?? null, label: t2("NARROW"), selected: hipProfile === "narrow", onSelect: () =>
|
|
18471
|
-
|
|
18472
|
-
|
|
18473
|
-
} }),
|
|
18474
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.hips.average ?? null, label: t2("AVERAGE"), selected: hipProfile === "average", onSelect: () => {
|
|
18475
|
-
setHipProfile("average");
|
|
18476
|
-
setError("");
|
|
18477
|
-
} }),
|
|
18478
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.hips.full ?? null, label: t2("FULL"), selected: hipProfile === "full", onSelect: () => {
|
|
18479
|
-
setHipProfile("full");
|
|
18480
|
-
setError("");
|
|
18481
|
-
} })
|
|
18472
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.hips.narrow ?? null, label: t2("NARROW"), selected: hipProfile === "narrow", onSelect: () => pickShape("hips", "narrow") }),
|
|
18473
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.hips.average ?? null, label: t2("AVERAGE"), selected: hipProfile === "average", onSelect: () => pickShape("hips", "average") }),
|
|
18474
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ShapeCard, { img: imgs.hips.full ?? null, label: t2("FULL"), selected: hipProfile === "full", onSelect: () => pickShape("hips", "full") })
|
|
18482
18475
|
]
|
|
18483
18476
|
}
|
|
18484
18477
|
),
|
|
@@ -18593,7 +18586,7 @@ function CreateProfileWizard({ onSave, onCancel, t: t2 }) {
|
|
|
18593
18586
|
] }),
|
|
18594
18587
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-cpw-footer", children: [
|
|
18595
18588
|
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", className: "ps-cpw-back-btn", onClick: handleBack, children: mode == null ? t2("Cancel") : `← ${t2("Back")}` }),
|
|
18596
|
-
mode === "manual" && /* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", className: "ps-cpw-next-btn", onClick: advanceManual, children: isLastManualStep ? t2("CALCULATE MY FIT") : t2("Continue") }),
|
|
18589
|
+
mode === "manual" && !isAutoAdvanceStep && /* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", className: "ps-cpw-next-btn", onClick: advanceManual, children: isLastManualStep ? t2("CALCULATE MY FIT") : t2("Continue") }),
|
|
18597
18590
|
mode === "image" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18598
18591
|
"button",
|
|
18599
18592
|
{
|