@primestyleai/tryon 5.8.28 → 5.8.30

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.
@@ -965,10 +965,11 @@ const STYLES = `
965
965
  height: 100%; overflow: hidden;
966
966
  }
967
967
 
968
- /* Left image column — proper contained display */
968
+ /* Left image column — proper contained display.
969
+ No background — the product/try-on image sits directly on the modal
970
+ surface without a gray placeholder box behind it. */
969
971
  .ps-tryon-v2-bg {
970
972
  flex: 0 0 43%; position: relative; min-width: 0;
971
- background: var(--ps-bg-secondary);
972
973
  border-radius: 0.9vw; overflow: hidden;
973
974
  display: flex; align-items: center; justify-content: center;
974
975
  }
@@ -4516,10 +4517,11 @@ const STYLES = `
4516
4517
  }
4517
4518
  .ps-cpw-field {
4518
4519
  display: flex; flex-direction: column;
4519
- gap: 6px;
4520
+ gap: clamp(4px, 0.4vw, 10px);
4520
4521
  }
4521
4522
  .ps-cpw-field-label {
4522
- font-size: 10px; font-weight: 700;
4523
+ font-size: clamp(9px, 0.62vw, 12px);
4524
+ font-weight: 700;
4523
4525
  letter-spacing: 0.14em; text-transform: uppercase;
4524
4526
  color: var(--ps-text-muted);
4525
4527
  }
@@ -4527,8 +4529,10 @@ const STYLES = `
4527
4529
  background: transparent; border: none;
4528
4530
  border-bottom: 1px solid var(--ps-border-color);
4529
4531
  color: var(--ps-text-primary);
4530
- font-family: inherit; font-size: 18px; font-weight: 500;
4531
- padding: 6px 0 8px;
4532
+ font-family: inherit;
4533
+ font-size: clamp(13px, 0.95vw, 18px);
4534
+ font-weight: 500;
4535
+ padding: clamp(4px, 0.4vw, 10px) 0 clamp(6px, 0.55vw, 12px);
4532
4536
  outline: none;
4533
4537
  transition: border-color 0.15s;
4534
4538
  }
@@ -4566,29 +4570,31 @@ const STYLES = `
4566
4570
 
4567
4571
  .ps-cpw-field-grid {
4568
4572
  display: grid;
4569
- grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
4570
- gap: 24px;
4573
+ grid-template-columns: repeat(auto-fit, minmax(clamp(140px, 11vw, 220px), 1fr));
4574
+ gap: clamp(14px, 1.2vw, 28px);
4571
4575
  }
4572
4576
 
4573
4577
  /* Two-column split: inputs stacked left, photo right */
4574
4578
  .ps-cpw-split {
4575
4579
  display: grid;
4576
- grid-template-columns: 1fr 280px;
4577
- gap: 28px;
4580
+ grid-template-columns: 1fr clamp(180px, 14vw, 320px);
4581
+ gap: clamp(16px, 1.4vw, 32px);
4578
4582
  align-items: start;
4579
4583
  }
4580
4584
  .ps-cpw-split-left {
4581
- display: flex; flex-direction: column; gap: 22px;
4585
+ display: flex; flex-direction: column;
4586
+ gap: clamp(14px, 1.2vw, 24px);
4582
4587
  min-width: 0;
4583
4588
  }
4584
4589
  .ps-cpw-split-right {
4585
- display: flex; flex-direction: column; gap: 8px;
4590
+ display: flex; flex-direction: column;
4591
+ gap: clamp(6px, 0.55vw, 12px);
4586
4592
  min-width: 0;
4587
4593
  }
4588
4594
  .ps-cpw-error {
4589
- font-size: 12px;
4595
+ font-size: clamp(10px, 0.72vw, 13px);
4590
4596
  color: var(--ps-error-color);
4591
- margin-top: -6px;
4597
+ margin-top: calc(clamp(4px, 0.4vw, 10px) * -1);
4592
4598
  }
4593
4599
 
4594
4600
  /* Optional photo upload (step 1) */
@@ -4644,67 +4650,84 @@ const STYLES = `
4644
4650
  display: flex; align-items: center; justify-content: center;
4645
4651
  }
4646
4652
 
4647
- /* Step 2 — Silhouette */
4653
+ /* Step 2 — Silhouette (vw-scaled) */
4648
4654
  .ps-cpw-silhouette {
4649
- display: flex; flex-direction: column; gap: 28px;
4655
+ display: flex; flex-direction: column;
4656
+ gap: clamp(16px, 1.4vw, 32px);
4650
4657
  }
4651
4658
  .ps-cpw-section {
4652
- display: flex; flex-direction: column; gap: 14px;
4659
+ display: flex; flex-direction: column;
4660
+ gap: clamp(8px, 0.7vw, 16px);
4653
4661
  }
4654
4662
  .ps-cpw-section-head {
4655
- display: flex; flex-direction: column; gap: 4px;
4663
+ display: flex; flex-direction: column;
4664
+ gap: clamp(2px, 0.2vw, 6px);
4656
4665
  }
4657
4666
  .ps-cpw-section-title {
4658
- font-size: 11px; font-weight: 700;
4667
+ font-size: clamp(10px, 0.72vw, 14px);
4668
+ font-weight: 700;
4659
4669
  letter-spacing: 0.14em; text-transform: uppercase;
4660
4670
  color: var(--ps-text-primary);
4661
4671
  }
4662
4672
  .ps-cpw-section-sub {
4663
- font-size: 12px; font-weight: 400;
4673
+ font-size: clamp(10px, 0.7vw, 13px);
4674
+ font-weight: 400;
4664
4675
  color: var(--ps-text-muted);
4665
4676
  }
4666
4677
  .ps-cpw-card-row {
4667
4678
  display: grid;
4668
4679
  grid-template-columns: repeat(3, 1fr);
4669
- gap: 12px;
4680
+ gap: clamp(8px, 0.75vw, 16px);
4681
+ /* Inside a flex parent (ProgressiveStep with flex:1), let the row
4682
+ claim leftover vertical space so the cards stretch to fill it. */
4683
+ flex: 1; min-height: 0;
4670
4684
  }
4671
4685
  .ps-cpw-bra-row {
4672
4686
  display: grid;
4673
4687
  grid-template-columns: 1fr 1fr;
4674
- gap: 12px;
4688
+ gap: clamp(8px, 0.75vw, 16px);
4675
4689
  }
4676
4690
  .ps-cpw-bra-field {
4677
- display: flex; flex-direction: column; gap: 6px;
4691
+ display: flex; flex-direction: column;
4692
+ gap: clamp(4px, 0.4vw, 10px);
4678
4693
  }
4679
4694
  .ps-cpw-card {
4680
4695
  display: flex; flex-direction: column; align-items: center;
4681
4696
  background: var(--ps-bg-primary);
4682
4697
  border: 2px solid var(--ps-border-subtle);
4683
- border-radius: 10px;
4684
- padding: 14px 8px 10px;
4698
+ border-radius: clamp(8px, 0.6vw, 14px);
4699
+ padding: clamp(10px, 0.85vw, 18px) clamp(6px, 0.5vw, 12px) clamp(8px, 0.65vw, 14px);
4685
4700
  cursor: pointer; font-family: inherit;
4686
4701
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
4702
+ /* Stretch inside the grid track so all 3 cards in the row fill
4703
+ the available height equally. */
4704
+ min-width: 0; min-height: 0;
4687
4705
  }
4688
4706
  .ps-cpw-card:hover {
4689
4707
  border-color: rgba(33, 84, 239, 0.35);
4690
4708
  }
4691
4709
  .ps-cpw-card.ps-active {
4692
4710
  border-color: var(--ps-accent);
4693
- box-shadow: 0 6px 16px rgba(33, 84, 239, 0.12);
4711
+ box-shadow: 0 0.4vw 1.1vw rgba(33, 84, 239, 0.16);
4694
4712
  transform: translateY(-1px);
4695
4713
  }
4696
4714
  .ps-cpw-card-thumb {
4697
- width: 100%; height: 110px;
4715
+ width: 100%;
4716
+ /* Fills whatever space the card has — combined with the card's
4717
+ min-height: 0, this lets the thumb image grow with viewport size
4718
+ and stretch to fill the wizard body. */
4719
+ flex: 1; min-height: 0;
4698
4720
  display: flex; align-items: center; justify-content: center;
4699
4721
  overflow: hidden;
4700
- margin-bottom: 8px;
4722
+ margin-bottom: clamp(4px, 0.4vw, 10px);
4701
4723
  }
4702
4724
  .ps-cpw-card-thumb img {
4703
4725
  max-width: 100%; max-height: 100%;
4704
4726
  object-fit: contain;
4705
4727
  }
4706
4728
  .ps-cpw-card-label {
4707
- font-size: 10px; font-weight: 700;
4729
+ font-size: clamp(9px, 0.65vw, 12px);
4730
+ font-weight: 700;
4708
4731
  letter-spacing: 0.12em; text-transform: uppercase;
4709
4732
  color: var(--ps-text-muted);
4710
4733
  }
@@ -4753,34 +4776,18 @@ const STYLES = `
4753
4776
  .ps-cpw-next-btn:hover { opacity: 0.92; }
4754
4777
  .ps-cpw-next-btn:active { transform: scale(0.98); }
4755
4778
 
4756
- @media (max-width: 768px) {
4757
- .ps-cpw-root { gap: 14px; }
4758
- .ps-cpw-step-head {
4759
- flex-direction: column; gap: 10px;
4760
- padding-bottom: 12px;
4761
- }
4762
- .ps-cpw-progress { min-width: 0; width: 100%; align-items: flex-start; margin-top: 0; }
4763
- .ps-cpw-step-title { font-size: 22px; }
4764
- .ps-cpw-field-grid { grid-template-columns: 1fr; gap: 18px; }
4765
- .ps-cpw-split { grid-template-columns: 1fr; gap: 18px; }
4766
- .ps-cpw-photo-preview { max-width: 220px; }
4767
- .ps-cpw-card-row { gap: 8px; }
4768
- .ps-cpw-card { padding: 10px 6px 8px; }
4769
- .ps-cpw-card-thumb { height: 80px; }
4770
- .ps-cpw-card-label { font-size: 9px; }
4771
- .ps-cpw-footer { flex-direction: column-reverse; gap: 10px; align-items: stretch; }
4772
- .ps-cpw-next-btn { width: 100%; padding: 14px; }
4773
- .ps-cpw-back-btn { text-align: center; }
4774
- .ps-cpw-method-grid { grid-template-columns: 1fr; }
4775
- .ps-cpw-method-card { padding: 22px 18px; }
4776
- .ps-cpw-photo-frame { max-width: 100%; height: 320px; }
4777
- }
4779
+ /* No wizard-specific @media (max-width: 768px) overrides anymore.
4780
+ Every ps-cpw-* rule is clamp/vw-driven, so the layout shrinks
4781
+ gracefully from 320px → 5000px without a hard breakpoint. */
4778
4782
 
4779
4783
  /* ── Progressive (one-question-at-a-time) flow ── */
4780
4784
  .ps-cpw-progressive {
4781
4785
  display: flex; flex-direction: column;
4782
4786
  gap: clamp(12px, 1vw, 22px);
4783
4787
  padding: clamp(6px, 0.5vw, 12px) 0;
4788
+ /* Fills the wizard body so the card row can stretch vertically */
4789
+ flex: 1; min-height: 0;
4790
+ width: 100%; box-sizing: border-box;
4784
4791
  }
4785
4792
  .ps-cpw-fade-in {
4786
4793
  animation: ps-cpw-fade-up 0.35s cubic-bezier(0.16, 1, 0.3, 1);
@@ -4790,74 +4797,158 @@ const STYLES = `
4790
4797
  to { opacity: 1; transform: translateY(0); }
4791
4798
  }
4792
4799
 
4793
- /* ── Method picker (initial step) — vw-scaled compact cards ── */
4800
+ /* ── Method picker (initial step) — cards stretch to fill body ── */
4794
4801
  .ps-cpw-method-picker {
4795
4802
  display: flex; flex-direction: column;
4796
4803
  gap: clamp(8px, 0.7vw, 14px);
4797
4804
  padding: clamp(4px, 0.4vw, 10px) 0;
4798
4805
  flex: 1; min-height: 0;
4799
4806
  width: 100%; box-sizing: border-box;
4800
- justify-content: center;
4801
4807
  }
4802
4808
  .ps-cpw-method-intro { display: none; }
4809
+ /* Grid claims the picker's leftover height so the cards inside
4810
+ stretch vertically to fill it. */
4803
4811
  .ps-cpw-method-grid {
4804
4812
  display: grid;
4805
4813
  grid-template-columns: 1fr 1fr;
4806
4814
  gap: clamp(8px, 0.75vw, 16px);
4807
4815
  width: 100%; max-width: 100%;
4808
4816
  box-sizing: border-box;
4817
+ flex: 1; min-height: 0;
4809
4818
  }
4819
+ /* ── Editorial method card ──
4820
+ Layered composition: tinted illustration zone on top, content block
4821
+ on bottom with eyebrow / title / description / arrow. A large
4822
+ corner number watermark gives each card a unique editorial feel. */
4810
4823
  .ps-cpw-method-card {
4824
+ position: relative;
4811
4825
  display: flex; flex-direction: column; align-items: stretch;
4812
4826
  gap: 0;
4813
- min-width: 0;
4827
+ min-width: 0; min-height: 0;
4814
4828
  width: 100%; max-width: 100%;
4815
4829
  box-sizing: border-box;
4816
4830
  background: var(--ps-bg-primary);
4817
- border: 1.5px solid var(--ps-border-subtle);
4818
- border-radius: clamp(8px, 0.6vw, 14px);
4831
+ border: 1px solid var(--ps-border-subtle);
4832
+ border-radius: clamp(10px, 0.75vw, 16px);
4819
4833
  overflow: hidden;
4820
4834
  cursor: pointer; font-family: inherit; text-align: left;
4821
- transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
4835
+ transition: border-color 0.22s, transform 0.22s, box-shadow 0.22s;
4836
+ box-shadow: 0 0.1vw 0.4vw rgba(20, 30, 60, 0.04);
4837
+ }
4838
+ .ps-cpw-method-card::before {
4839
+ /* Thin top accent bar that lights up on hover */
4840
+ content: ""; position: absolute; top: 0; left: 0; right: 0;
4841
+ height: clamp(2px, 0.15vw, 4px);
4842
+ background: var(--ps-accent);
4843
+ transform: scaleX(0); transform-origin: left center;
4844
+ transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
4845
+ z-index: 3;
4822
4846
  }
4823
4847
  .ps-cpw-method-card:hover {
4824
4848
  border-color: var(--ps-accent);
4825
- transform: translateY(-1px);
4826
- box-shadow: 0 0.4vw 1.2vw rgba(33, 84, 239, 0.10);
4849
+ transform: translateY(-2px);
4850
+ box-shadow: 0 0.6vw 1.6vw rgba(33, 84, 239, 0.14);
4827
4851
  }
4828
- /* Wide short illustration strip at the top — keeps cards compact
4829
- and scales proportionally with viewport width. */
4852
+ .ps-cpw-method-card:hover::before { transform: scaleX(1); }
4853
+
4854
+ /* Big editorial number watermark in the top-right corner */
4855
+ .ps-cpw-method-num {
4856
+ position: absolute;
4857
+ top: clamp(8px, 0.7vw, 14px);
4858
+ right: clamp(10px, 0.85vw, 18px);
4859
+ z-index: 2;
4860
+ font-family: inherit;
4861
+ font-size: clamp(20px, 1.7vw, 32px);
4862
+ font-weight: 800;
4863
+ line-height: 1;
4864
+ letter-spacing: -0.04em;
4865
+ color: var(--ps-text-primary);
4866
+ opacity: 0.10;
4867
+ pointer-events: none;
4868
+ transition: color 0.22s, opacity 0.22s;
4869
+ }
4870
+ .ps-cpw-method-card:hover .ps-cpw-method-num {
4871
+ color: var(--ps-accent);
4872
+ opacity: 0.30;
4873
+ }
4874
+
4875
+ /* Illustration zone — tinted background, image fills it */
4830
4876
  .ps-cpw-method-img {
4877
+ position: relative;
4831
4878
  width: 100%;
4832
- height: clamp(56px, 4.5vw, 100px);
4833
- flex-shrink: 0;
4834
- background: var(--ps-bg-secondary);
4879
+ flex: 1; min-height: 0;
4880
+ background:
4881
+ radial-gradient(ellipse at 50% 60%, rgba(33, 84, 239, 0.06) 0%, transparent 70%),
4882
+ var(--ps-bg-secondary);
4835
4883
  display: flex; align-items: center; justify-content: center;
4836
- border-bottom: 1px solid var(--ps-border-subtle);
4837
- padding: clamp(4px, 0.4vw, 10px);
4884
+ padding: clamp(10px, 0.85vw, 18px);
4838
4885
  box-sizing: border-box;
4839
4886
  }
4840
4887
  .ps-cpw-method-img img {
4841
- width: auto; height: 100%;
4842
- max-width: 100%;
4888
+ width: 100%; height: 100%;
4889
+ max-width: 100%; max-height: 100%;
4843
4890
  object-fit: contain;
4844
4891
  display: block;
4892
+ transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
4893
+ }
4894
+ .ps-cpw-method-card:hover .ps-cpw-method-img img {
4895
+ transform: scale(1.04);
4845
4896
  }
4897
+
4898
+ /* Content block — eyebrow, title, description, arrow */
4846
4899
  .ps-cpw-method-text {
4847
- display: flex; flex-direction: column; gap: clamp(2px, 0.15vw, 4px);
4848
- padding: clamp(6px, 0.55vw, 12px) clamp(8px, 0.7vw, 14px) clamp(8px, 0.7vw, 14px);
4900
+ position: relative;
4901
+ display: flex; flex-direction: column;
4902
+ gap: clamp(3px, 0.25vw, 6px);
4903
+ padding: clamp(10px, 0.85vw, 18px) clamp(12px, 1vw, 20px) clamp(12px, 1vw, 20px);
4849
4904
  width: 100%; box-sizing: border-box;
4905
+ border-top: 1px solid var(--ps-border-subtle);
4906
+ background: var(--ps-bg-primary);
4907
+ }
4908
+ .ps-cpw-method-eyebrow {
4909
+ font-size: clamp(8px, 0.55vw, 11px);
4910
+ font-weight: 700;
4911
+ letter-spacing: 0.14em;
4912
+ text-transform: uppercase;
4913
+ color: var(--ps-accent);
4850
4914
  }
4851
4915
  .ps-cpw-method-title {
4852
- font-size: clamp(11px, 0.78vw, 15px);
4916
+ font-size: clamp(13px, 0.92vw, 18px);
4853
4917
  font-weight: 700;
4854
4918
  color: var(--ps-text-primary);
4855
- letter-spacing: -0.005em;
4919
+ letter-spacing: -0.012em;
4920
+ line-height: 1.25;
4856
4921
  }
4857
4922
  .ps-cpw-method-desc {
4858
- font-size: clamp(9px, 0.65vw, 12px);
4859
- line-height: 1.4;
4923
+ font-size: clamp(10px, 0.7vw, 13px);
4924
+ line-height: 1.45;
4860
4925
  color: var(--ps-text-muted);
4926
+ /* Cap at 2 lines so cards stay symmetric */
4927
+ display: -webkit-box;
4928
+ -webkit-line-clamp: 2;
4929
+ -webkit-box-orient: vertical;
4930
+ overflow: hidden;
4931
+ }
4932
+ /* Arrow indicator — bottom right of the content block */
4933
+ .ps-cpw-method-arrow {
4934
+ position: absolute;
4935
+ right: clamp(12px, 1vw, 20px);
4936
+ bottom: clamp(12px, 1vw, 20px);
4937
+ width: clamp(22px, 1.6vw, 32px);
4938
+ height: clamp(22px, 1.6vw, 32px);
4939
+ border-radius: 50%;
4940
+ display: flex; align-items: center; justify-content: center;
4941
+ background: var(--ps-bg-secondary);
4942
+ color: var(--ps-text-secondary);
4943
+ transition: background 0.22s, color 0.22s, transform 0.22s;
4944
+ }
4945
+ .ps-cpw-method-arrow svg {
4946
+ width: 55%; height: 55%;
4947
+ }
4948
+ .ps-cpw-method-card:hover .ps-cpw-method-arrow {
4949
+ background: var(--ps-accent);
4950
+ color: #FFFFFF;
4951
+ transform: translateX(0.2vw);
4861
4952
  }
4862
4953
  /* Wizard reuses the SDK basics screen's .ps-bp-inline-* row styles for
4863
4954
  parity. This wrapper just gives them a consistent gap and centers
@@ -8908,10 +8999,16 @@ function CreateProfileWizard({ onSave, onCancel, t }) {
8908
8999
  setManualStep("identity");
8909
9000
  },
8910
9001
  children: [
9002
+ /* @__PURE__ */ jsx("span", { className: "ps-cpw-method-num", children: "01" }),
8911
9003
  /* @__PURE__ */ jsx("div", { className: "ps-cpw-method-img", children: /* @__PURE__ */ jsx("img", { src: methodManualImg, alt: t("Manual measurement illustration") }) }),
8912
9004
  /* @__PURE__ */ jsxs("div", { className: "ps-cpw-method-text", children: [
9005
+ /* @__PURE__ */ jsx("div", { className: "ps-cpw-method-eyebrow", children: t("Quick Setup") }),
8913
9006
  /* @__PURE__ */ jsx("div", { className: "ps-cpw-method-title", children: t("Measure manually") }),
8914
- /* @__PURE__ */ jsx("div", { className: "ps-cpw-method-desc", children: t("Enter height, weight and answer quick body shape questions.") })
9007
+ /* @__PURE__ */ jsx("div", { className: "ps-cpw-method-desc", children: t("Enter height, weight and answer quick body shape questions.") }),
9008
+ /* @__PURE__ */ jsx("div", { className: "ps-cpw-method-arrow", "aria-hidden": "true", children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
9009
+ /* @__PURE__ */ jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
9010
+ /* @__PURE__ */ jsx("polyline", { points: "12 5 19 12 12 19" })
9011
+ ] }) })
8915
9012
  ] })
8916
9013
  ]
8917
9014
  }
@@ -8925,10 +9022,16 @@ function CreateProfileWizard({ onSave, onCancel, t }) {
8925
9022
  setMode("image");
8926
9023
  },
8927
9024
  children: [
9025
+ /* @__PURE__ */ jsx("span", { className: "ps-cpw-method-num", children: "02" }),
8928
9026
  /* @__PURE__ */ jsx("div", { className: "ps-cpw-method-img", children: /* @__PURE__ */ jsx("img", { src: methodPhotoImg, alt: t("Photo analysis illustration") }) }),
8929
9027
  /* @__PURE__ */ jsxs("div", { className: "ps-cpw-method-text", children: [
9028
+ /* @__PURE__ */ jsx("div", { className: "ps-cpw-method-eyebrow", children: t("AI Powered") }),
8930
9029
  /* @__PURE__ */ jsx("div", { className: "ps-cpw-method-title", children: t("Analyze by photo") }),
8931
- /* @__PURE__ */ jsx("div", { className: "ps-cpw-method-desc", children: t("Upload a full-body photo. Our AI computes every measurement.") })
9030
+ /* @__PURE__ */ jsx("div", { className: "ps-cpw-method-desc", children: t("Upload a full-body photo. Our AI computes every measurement.") }),
9031
+ /* @__PURE__ */ jsx("div", { className: "ps-cpw-method-arrow", "aria-hidden": "true", children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
9032
+ /* @__PURE__ */ jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
9033
+ /* @__PURE__ */ jsx("polyline", { points: "12 5 19 12 12 19" })
9034
+ ] }) })
8932
9035
  ] })
8933
9036
  ]
8934
9037
  }