@primestyleai/tryon 5.6.8 → 5.6.9

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.
@@ -3732,6 +3732,155 @@ const STYLES = `
3732
3732
  .ps-msr-tryon-cta:disabled { opacity: 0.4; cursor: not-allowed; }
3733
3733
  .ps-msr-tryon-cta svg { flex-shrink: 0; }
3734
3734
 
3735
+ /* ════════════════════════════════════════════════════════════════
3736
+ BodyShapeStepMobile (.ps-bsm-*) — vertical stacked option cards
3737
+ for body shape questions on mobile (chest / midsection / seat /
3738
+ hips). Matches the THE DIGITAL TAILOR reference design themed
3739
+ with the user's accent color.
3740
+ ════════════════════════════════════════════════════════════════ */
3741
+ .ps-bsm-root {
3742
+ display: flex; flex-direction: column;
3743
+ gap: 18px; padding: 8px 4px 24px;
3744
+ flex: 1; min-height: 0;
3745
+ }
3746
+ .ps-bsm-step {
3747
+ font-size: 11px; font-weight: 700;
3748
+ letter-spacing: 0.16em; text-transform: uppercase;
3749
+ color: var(--ps-text-muted);
3750
+ margin-bottom: -4px;
3751
+ }
3752
+ .ps-bsm-question {
3753
+ font-size: 26px; font-weight: 800;
3754
+ color: var(--ps-text-primary);
3755
+ line-height: 1.15;
3756
+ letter-spacing: -0.01em;
3757
+ margin: 0 0 6px;
3758
+ }
3759
+ .ps-bsm-options {
3760
+ display: flex; flex-direction: column; gap: 12px;
3761
+ }
3762
+ .ps-bsm-card {
3763
+ display: flex; align-items: center; justify-content: space-between;
3764
+ width: 100%;
3765
+ padding: 16px 18px;
3766
+ background: var(--ps-bg-secondary);
3767
+ border: 2px solid transparent;
3768
+ border-radius: 14px;
3769
+ cursor: pointer; font-family: inherit;
3770
+ text-align: left;
3771
+ transition: background 0.18s, border-color 0.18s, transform 0.15s;
3772
+ }
3773
+ .ps-bsm-card:active { transform: scale(0.985); }
3774
+ .ps-bsm-card.ps-active {
3775
+ background: var(--ps-accent);
3776
+ border-color: var(--ps-accent);
3777
+ box-shadow: 0 8px 24px rgba(33, 84, 239, 0.22);
3778
+ }
3779
+ .ps-bsm-card-content {
3780
+ display: flex; flex-direction: column; gap: 6px;
3781
+ min-width: 0;
3782
+ }
3783
+ .ps-bsm-card-eyebrow {
3784
+ font-size: 10px; font-weight: 700;
3785
+ letter-spacing: 0.14em; text-transform: uppercase;
3786
+ color: var(--ps-text-muted);
3787
+ }
3788
+ .ps-bsm-card.ps-active .ps-bsm-card-eyebrow {
3789
+ color: rgba(255, 255, 255, 0.7);
3790
+ }
3791
+ .ps-bsm-card-label {
3792
+ font-size: 22px; font-weight: 800;
3793
+ color: var(--ps-text-primary);
3794
+ letter-spacing: 0.02em;
3795
+ }
3796
+ .ps-bsm-card.ps-active .ps-bsm-card-label { color: #FFFFFF; }
3797
+ .ps-bsm-card-thumb {
3798
+ flex-shrink: 0;
3799
+ width: 64px; height: 64px;
3800
+ border-radius: 10px;
3801
+ background: rgba(255, 255, 255, 0.6);
3802
+ display: flex; align-items: center; justify-content: center;
3803
+ overflow: hidden;
3804
+ margin-left: 14px;
3805
+ }
3806
+ .ps-bsm-card.ps-active .ps-bsm-card-thumb {
3807
+ background: rgba(255, 255, 255, 0.18);
3808
+ }
3809
+ .ps-bsm-card-thumb img {
3810
+ max-width: 100%; max-height: 100%;
3811
+ width: auto; height: 100%;
3812
+ object-fit: contain;
3813
+ }
3814
+
3815
+ /* Mobile bra step fixes — give grid items breathing room and keep
3816
+ the dropdown visible. The desktop layout uses .ps-bp-bra-* but
3817
+ it's tight on phones. */
3818
+ @media (max-width: 768px) {
3819
+ .ps-bp-bra-step { padding: 4px 4px 24px; }
3820
+ .ps-bp-bra-step .ps-bp-title {
3821
+ font-size: 22px; font-weight: 800;
3822
+ text-align: left; margin-bottom: 18px;
3823
+ letter-spacing: -0.01em;
3824
+ }
3825
+ .ps-bp-bra-section { margin-bottom: 22px; }
3826
+ .ps-bp-bra-header {
3827
+ display: flex; align-items: center; justify-content: space-between;
3828
+ margin-bottom: 12px;
3829
+ }
3830
+ .ps-bp-bra-label {
3831
+ font-size: 11px !important; font-weight: 700;
3832
+ letter-spacing: 0.14em; text-transform: uppercase;
3833
+ color: var(--ps-text-muted);
3834
+ }
3835
+ .ps-bp-bra-region-trigger {
3836
+ padding: 6px 12px !important; font-size: 12px !important;
3837
+ border: 1px solid var(--ps-border-color); border-radius: 999px;
3838
+ background: var(--ps-bg-secondary);
3839
+ color: var(--ps-text-secondary);
3840
+ }
3841
+ .ps-bp-bra-region-dropdown {
3842
+ position: absolute; right: 0; top: 100%;
3843
+ margin-top: 6px;
3844
+ background: var(--ps-bg-primary);
3845
+ border: 1px solid var(--ps-border-color);
3846
+ border-radius: 10px;
3847
+ box-shadow: 0 8px 24px rgba(0,0,0,0.12);
3848
+ padding: 6px;
3849
+ z-index: 5;
3850
+ display: flex; flex-direction: column; gap: 2px;
3851
+ min-width: 80px;
3852
+ }
3853
+ .ps-bp-bra-region-item {
3854
+ padding: 8px 12px !important; font-size: 12px !important;
3855
+ border-radius: 6px; background: none; border: none;
3856
+ cursor: pointer; text-align: left;
3857
+ color: var(--ps-text-secondary);
3858
+ }
3859
+ .ps-bp-bra-region-item.ps-selected {
3860
+ background: var(--ps-accent); color: #FFFFFF;
3861
+ }
3862
+ .ps-bp-bra-grid {
3863
+ display: grid !important;
3864
+ grid-template-columns: repeat(4, 1fr);
3865
+ gap: 8px;
3866
+ }
3867
+ .ps-bp-bra-btn {
3868
+ padding: 12px 4px !important; font-size: 13px !important;
3869
+ border-radius: 8px;
3870
+ border: 1.5px solid var(--ps-border-color);
3871
+ background: var(--ps-bg-primary);
3872
+ color: var(--ps-text-primary);
3873
+ font-weight: 600;
3874
+ cursor: pointer;
3875
+ min-height: 44px;
3876
+ }
3877
+ .ps-bp-bra-btn-selected {
3878
+ background: var(--ps-accent) !important;
3879
+ border-color: var(--ps-accent) !important;
3880
+ color: #FFFFFF !important;
3881
+ }
3882
+ }
3883
+
3735
3884
  /* ════════════════════════════════════════════════════════════════
3736
3885
  MobileSectionDetail (.ps-msd-*) — section detail view on mobile.
3737
3886
  Layout: scroll container with rich blueprint rows matching the
@@ -8721,6 +8870,50 @@ function PhotoStepMobile({
8721
8870
  ] })
8722
8871
  ] });
8723
8872
  }
8873
+ function BodyShapeStepMobile({
8874
+ stepNumber,
8875
+ totalSteps,
8876
+ title,
8877
+ options,
8878
+ selected,
8879
+ onSelect,
8880
+ t
8881
+ }) {
8882
+ return /* @__PURE__ */ jsxs("div", { className: "ps-bsm-root", children: [
8883
+ /* @__PURE__ */ jsxs("div", { className: "ps-bsm-step", children: [
8884
+ t("STEP"),
8885
+ " ",
8886
+ String(stepNumber).padStart(2, "0"),
8887
+ " / ",
8888
+ String(totalSteps).padStart(2, "0")
8889
+ ] }),
8890
+ /* @__PURE__ */ jsx("h2", { className: "ps-bsm-question", children: title }),
8891
+ /* @__PURE__ */ jsx("div", { className: "ps-bsm-options", children: options.map((opt, idx) => {
8892
+ const isActive = selected === opt.value;
8893
+ const profileLetter = String.fromCharCode(65 + idx);
8894
+ return /* @__PURE__ */ jsxs(
8895
+ "button",
8896
+ {
8897
+ type: "button",
8898
+ className: `ps-bsm-card${isActive ? " ps-active" : ""}`,
8899
+ onClick: () => onSelect(opt.value),
8900
+ children: [
8901
+ /* @__PURE__ */ jsxs("div", { className: "ps-bsm-card-content", children: [
8902
+ /* @__PURE__ */ jsxs("span", { className: "ps-bsm-card-eyebrow", children: [
8903
+ t("PROFILE"),
8904
+ " ",
8905
+ profileLetter
8906
+ ] }),
8907
+ /* @__PURE__ */ jsx("span", { className: "ps-bsm-card-label", children: opt.label.toUpperCase() })
8908
+ ] }),
8909
+ opt.img && /* @__PURE__ */ jsx("div", { className: "ps-bsm-card-thumb", children: /* @__PURE__ */ jsx("img", { src: opt.img, alt: opt.label }) })
8910
+ ]
8911
+ },
8912
+ opt.value
8913
+ );
8914
+ }) })
8915
+ ] });
8916
+ }
8724
8917
  function CameraUploadIcon() {
8725
8918
  return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", width: "24", height: "24", children: [
8726
8919
  /* @__PURE__ */ jsx("path", { d: "M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z" }),
@@ -9280,7 +9473,23 @@ function BodyProfileView({
9280
9473
  error && /* @__PURE__ */ jsx("p", { className: "ps-bp-error", children: error })
9281
9474
  ] }, "step-basics");
9282
9475
  })(),
9283
- step === "chest" && !isWomen && /* @__PURE__ */ jsxs("div", { className: "ps-bp-step ps-bp-step-enter ps-bp-single-q", children: [
9476
+ step === "chest" && !isWomen && (isMobile ? /* @__PURE__ */ jsx(
9477
+ BodyShapeStepMobile,
9478
+ {
9479
+ stepNumber: steps.indexOf("chest") + 1,
9480
+ totalSteps: steps.length,
9481
+ title: t("WHICH BEST DESCRIBES YOUR CHEST?"),
9482
+ options: [
9483
+ { value: "narrow", label: t("Narrow"), img: BODY_IMAGES.male.chest.narrow },
9484
+ { value: "average", label: t("Average"), img: BODY_IMAGES.male.chest.average },
9485
+ { value: "broad", label: t("Broad"), img: BODY_IMAGES.male.chest.broad }
9486
+ ],
9487
+ selected: chestProfile,
9488
+ onSelect: (v) => setChestProfile(v),
9489
+ t
9490
+ },
9491
+ "step-chest-mobile"
9492
+ ) : /* @__PURE__ */ jsxs("div", { className: "ps-bp-step ps-bp-step-enter ps-bp-single-q", children: [
9284
9493
  /* @__PURE__ */ jsx("h2", { className: "ps-bp-title", children: t("Which best describes your chest?") }),
9285
9494
  /* @__PURE__ */ jsxs("div", { className: "ps-bp-shape-row ps-bp-shape-row-full", children: [
9286
9495
  /* @__PURE__ */ jsx(ImageOptionCard, { img: BODY_IMAGES.male.chest.narrow, label: t("Narrow"), selected: chestProfile === "narrow", onSelect: () => setChestProfile("narrow"), onHover: () => setHoverDesc(t("A slimmer, narrower chest build")), onLeave: () => setHoverDesc("") }),
@@ -9288,8 +9497,28 @@ function BodyProfileView({
9288
9497
  /* @__PURE__ */ jsx(ImageOptionCard, { img: BODY_IMAGES.male.chest.broad, label: t("Broad"), selected: chestProfile === "broad", onSelect: () => setChestProfile("broad"), onHover: () => setHoverDesc(t("A wider, more muscular chest")), onLeave: () => setHoverDesc("") })
9289
9498
  ] }),
9290
9499
  /* @__PURE__ */ jsx("p", { className: "ps-bp-hover-hint", children: hoverDesc || " " })
9291
- ] }, "step-chest"),
9292
- step === "midsection" && /* @__PURE__ */ jsxs("div", { className: "ps-bp-step ps-bp-step-enter ps-bp-single-q", children: [
9500
+ ] }, "step-chest")),
9501
+ step === "midsection" && (isMobile ? /* @__PURE__ */ jsx(
9502
+ BodyShapeStepMobile,
9503
+ {
9504
+ stepNumber: steps.indexOf("midsection") + 1,
9505
+ totalSteps: steps.length,
9506
+ title: t("WHICH BEST DESCRIBES YOUR MIDSECTION?"),
9507
+ options: isWomen ? [
9508
+ { value: "flat", label: t("Flat"), img: BODY_IMAGES.female.stomach.flat },
9509
+ { value: "average", label: t("Average"), img: BODY_IMAGES.female.stomach.average },
9510
+ { value: "round", label: t("Full"), img: BODY_IMAGES.female.stomach.round }
9511
+ ] : [
9512
+ { value: "flat", label: t("Flat"), img: BODY_IMAGES.male.stomach.flat },
9513
+ { value: "average", label: t("Average"), img: BODY_IMAGES.male.stomach.average },
9514
+ { value: "round", label: t("Full"), img: BODY_IMAGES.male.stomach.round }
9515
+ ],
9516
+ selected: midsectionProfile,
9517
+ onSelect: (v) => setMidsectionProfile(v),
9518
+ t
9519
+ },
9520
+ "step-midsection-mobile"
9521
+ ) : /* @__PURE__ */ jsxs("div", { className: "ps-bp-step ps-bp-step-enter ps-bp-single-q", children: [
9293
9522
  /* @__PURE__ */ jsx("h2", { className: "ps-bp-title", children: t("Which best describes your midsection?") }),
9294
9523
  /* @__PURE__ */ jsx("div", { className: "ps-bp-shape-row ps-bp-shape-row-full", children: isWomen ? /* @__PURE__ */ jsxs(Fragment, { children: [
9295
9524
  /* @__PURE__ */ jsx(ImageOptionCard, { img: BODY_IMAGES.female.stomach.flat, label: t("Flat"), selected: midsectionProfile === "flat", onSelect: () => setMidsectionProfile("flat"), onHover: () => setHoverDesc(t("A flatter midsection with minimal protrusion")), onLeave: () => setHoverDesc("") }),
@@ -9301,8 +9530,28 @@ function BodyProfileView({
9301
9530
  /* @__PURE__ */ jsx(ImageOptionCard, { img: BODY_IMAGES.male.stomach.round, label: t("Full"), selected: midsectionProfile === "round", onSelect: () => setMidsectionProfile("round"), onHover: () => setHoverDesc(t("A fuller, more rounded midsection")), onLeave: () => setHoverDesc("") })
9302
9531
  ] }) }),
9303
9532
  /* @__PURE__ */ jsx("p", { className: "ps-bp-hover-hint", children: hoverDesc || " " })
9304
- ] }, "step-midsection"),
9305
- step === "seat" && /* @__PURE__ */ jsxs("div", { className: "ps-bp-step ps-bp-step-enter ps-bp-single-q", children: [
9533
+ ] }, "step-midsection")),
9534
+ step === "seat" && (isMobile ? /* @__PURE__ */ jsx(
9535
+ BodyShapeStepMobile,
9536
+ {
9537
+ stepNumber: steps.indexOf("seat") + 1,
9538
+ totalSteps: steps.length,
9539
+ title: t("WHICH BEST DESCRIBES YOUR SEAT?"),
9540
+ options: isWomen ? [
9541
+ { value: "narrow", label: t("Flat"), img: BODY_IMAGES.female.seat.narrow },
9542
+ { value: "average", label: t("Average"), img: BODY_IMAGES.female.seat.average },
9543
+ { value: "full", label: t("Full"), img: BODY_IMAGES.female.seat.full }
9544
+ ] : [
9545
+ { value: "narrow", label: t("Flat"), img: BODY_IMAGES.male.seat.narrow },
9546
+ { value: "average", label: t("Average"), img: BODY_IMAGES.male.seat.average },
9547
+ { value: "full", label: t("Full"), img: BODY_IMAGES.male.seat.full }
9548
+ ],
9549
+ selected: seatProfile,
9550
+ onSelect: (v) => setSeatProfile(v),
9551
+ t
9552
+ },
9553
+ "step-seat-mobile"
9554
+ ) : /* @__PURE__ */ jsxs("div", { className: "ps-bp-step ps-bp-step-enter ps-bp-single-q", children: [
9306
9555
  /* @__PURE__ */ jsx("h2", { className: "ps-bp-title", children: t("Which best describes your seat?") }),
9307
9556
  /* @__PURE__ */ jsx("div", { className: "ps-bp-shape-row ps-bp-shape-row-full", children: isWomen ? /* @__PURE__ */ jsxs(Fragment, { children: [
9308
9557
  /* @__PURE__ */ jsx(ImageOptionCard, { img: BODY_IMAGES.female.seat.narrow, label: t("Flat"), selected: seatProfile === "narrow", onSelect: () => setSeatProfile("narrow"), onHover: () => setHoverDesc(t("A flatter backside with less projection")), onLeave: () => setHoverDesc("") }),
@@ -9314,8 +9563,24 @@ function BodyProfileView({
9314
9563
  /* @__PURE__ */ jsx(ImageOptionCard, { img: BODY_IMAGES.male.seat.full, label: t("Full"), selected: seatProfile === "full", onSelect: () => setSeatProfile("full"), onHover: () => setHoverDesc(t("A fuller, more rounded backside")), onLeave: () => setHoverDesc("") })
9315
9564
  ] }) }),
9316
9565
  /* @__PURE__ */ jsx("p", { className: "ps-bp-hover-hint", children: hoverDesc || " " })
9317
- ] }, "step-seat"),
9318
- step === "hips" && isWomen && /* @__PURE__ */ jsxs("div", { className: "ps-bp-step ps-bp-step-enter ps-bp-single-q", children: [
9566
+ ] }, "step-seat")),
9567
+ step === "hips" && isWomen && (isMobile ? /* @__PURE__ */ jsx(
9568
+ BodyShapeStepMobile,
9569
+ {
9570
+ stepNumber: steps.indexOf("hips") + 1,
9571
+ totalSteps: steps.length,
9572
+ title: t("WHICH BEST DESCRIBES YOUR HIPS?"),
9573
+ options: [
9574
+ { value: "narrow", label: t("Narrow"), img: BODY_IMAGES.female.hips.narrow },
9575
+ { value: "average", label: t("Average"), img: BODY_IMAGES.female.hips.average },
9576
+ { value: "full", label: t("Curvy"), img: BODY_IMAGES.female.hips.full }
9577
+ ],
9578
+ selected: hipProfile,
9579
+ onSelect: (v) => setHipProfile(v),
9580
+ t
9581
+ },
9582
+ "step-hips-mobile"
9583
+ ) : /* @__PURE__ */ jsxs("div", { className: "ps-bp-step ps-bp-step-enter ps-bp-single-q", children: [
9319
9584
  /* @__PURE__ */ jsx("h2", { className: "ps-bp-title", children: t("Which best describes your hips?") }),
9320
9585
  /* @__PURE__ */ jsxs("div", { className: "ps-bp-shape-row ps-bp-shape-row-full", children: [
9321
9586
  /* @__PURE__ */ jsx(ImageOptionCard, { img: BODY_IMAGES.female.hips.narrow, label: t("Narrow"), selected: hipProfile === "narrow", onSelect: () => setHipProfile("narrow"), onHover: () => setHoverDesc(t("Hips closer to shoulder width")), onLeave: () => setHoverDesc("") }),
@@ -9323,7 +9588,7 @@ function BodyProfileView({
9323
9588
  /* @__PURE__ */ jsx(ImageOptionCard, { img: BODY_IMAGES.female.hips.full, label: t("Curvy"), selected: hipProfile === "full", onSelect: () => setHipProfile("full"), onHover: () => setHoverDesc(t("Hips wider than shoulders")), onLeave: () => setHoverDesc("") })
9324
9589
  ] }),
9325
9590
  /* @__PURE__ */ jsx("p", { className: "ps-bp-hover-hint", children: hoverDesc || " " })
9326
- ] }, "step-hips"),
9591
+ ] }, "step-hips")),
9327
9592
  step === "bra" && isWomen && /* @__PURE__ */ jsxs("div", { className: "ps-bp-step ps-bp-step-enter ps-bp-bra-step", children: [
9328
9593
  /* @__PURE__ */ jsx("h2", { className: "ps-bp-title", children: t("Select your bra size") }),
9329
9594
  /* @__PURE__ */ jsxs("div", { className: "ps-bp-bra-section", children: [