@primestyleai/tryon 5.8.31 → 5.8.32

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.
@@ -14398,44 +14398,179 @@ const STYLES$1 = `
14398
14398
  color: var(--ps-text-muted);
14399
14399
  }
14400
14400
 
14401
- /* ── Image path — single combined screen, vw-scaled ── */
14402
- .ps-cpw-image-combined {
14403
- display: flex; flex-direction: column; align-items: stretch;
14404
- gap: clamp(8px, 0.7vw, 14px);
14401
+ /* ── Image path — split layout with dropzone + photo guide ──
14402
+ Two columns: dropzone with silhouette placeholder on the LEFT,
14403
+ gender pills + name input + photo-guide checklist on the RIGHT.
14404
+ Collapses to single column on narrow viewports via flex-wrap. */
14405
+ .ps-cpw-image-split {
14406
+ display: grid;
14407
+ grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
14408
+ gap: clamp(14px, 1.2vw, 26px);
14405
14409
  flex: 1; min-height: 0;
14406
14410
  width: 100%; box-sizing: border-box;
14407
14411
  }
14408
- .ps-cpw-photo-dropzone {
14409
- display: flex; flex-direction: column; align-items: center; justify-content: center;
14410
- gap: clamp(4px, 0.4vw, 10px);
14412
+ .ps-cpw-image-left {
14413
+ display: flex; flex-direction: column;
14414
+ min-width: 0; min-height: 0;
14415
+ }
14416
+ .ps-cpw-image-right {
14417
+ display: flex; flex-direction: column;
14418
+ gap: clamp(10px, 0.9vw, 18px);
14419
+ min-width: 0; min-height: 0;
14420
+ }
14421
+
14422
+ /* Dropzone — premium card with a faded body silhouette behind the
14423
+ upload prompt. Communicates "this is where the body photo goes". */
14424
+ .ps-cpw-dropzone {
14425
+ position: relative;
14426
+ display: flex; align-items: center; justify-content: center;
14411
14427
  flex: 1; min-height: 0;
14412
14428
  width: 100%; box-sizing: border-box;
14413
- padding: clamp(10px, 0.9vw, 18px);
14414
- border: 2px dashed var(--ps-border-color);
14415
- border-radius: clamp(8px, 0.6vw, 14px);
14416
- background: var(--ps-bg-secondary);
14429
+ padding: clamp(14px, 1.2vw, 26px);
14430
+ border: 1.5px dashed var(--ps-border-color);
14431
+ border-radius: clamp(10px, 0.75vw, 16px);
14432
+ background:
14433
+ radial-gradient(ellipse at 50% 60%, rgba(33, 84, 239, 0.05) 0%, transparent 70%),
14434
+ var(--ps-bg-secondary);
14417
14435
  color: var(--ps-text-muted);
14418
14436
  cursor: pointer; font-family: inherit;
14419
- transition: border-color 0.18s, background 0.18s;
14437
+ overflow: hidden;
14438
+ transition: border-color 0.22s, background 0.22s, transform 0.22s;
14420
14439
  }
14421
- .ps-cpw-photo-dropzone:hover { border-color: var(--ps-accent); background: rgba(33, 84, 239, 0.04); }
14422
- .ps-cpw-photo-dropzone:disabled { opacity: 0.6; cursor: default; }
14423
- .ps-cpw-photo-dropzone-title {
14440
+ .ps-cpw-dropzone:hover {
14441
+ border-color: var(--ps-accent);
14442
+ transform: translateY(-1px);
14443
+ }
14444
+ .ps-cpw-dropzone:disabled { opacity: 0.6; cursor: default; transform: none; }
14445
+ /* Faded body silhouette behind the upload prompt */
14446
+ .ps-cpw-dropzone-silhouette {
14447
+ position: absolute;
14448
+ left: 50%; top: 50%;
14449
+ transform: translate(-50%, -50%);
14450
+ width: clamp(60px, 7vw, 130px);
14451
+ height: auto;
14452
+ color: var(--ps-accent);
14453
+ opacity: 0.08;
14454
+ pointer-events: none;
14455
+ }
14456
+ .ps-cpw-dropzone-content {
14457
+ position: relative;
14458
+ z-index: 1;
14459
+ display: flex; flex-direction: column; align-items: center;
14460
+ gap: clamp(4px, 0.4vw, 10px);
14461
+ }
14462
+ .ps-cpw-dropzone-upload-icon {
14463
+ width: clamp(28px, 2vw, 40px);
14464
+ height: clamp(28px, 2vw, 40px);
14465
+ color: var(--ps-accent);
14466
+ margin-bottom: clamp(2px, 0.2vw, 6px);
14467
+ }
14468
+ .ps-cpw-dropzone-title {
14424
14469
  font-size: clamp(11px, 0.78vw, 14px);
14425
- font-weight: 600; color: var(--ps-text-primary);
14470
+ font-weight: 600;
14471
+ color: var(--ps-text-primary);
14472
+ text-align: center;
14426
14473
  }
14427
- .ps-cpw-photo-dropzone-hint {
14474
+ .ps-cpw-dropzone-hint {
14428
14475
  font-size: clamp(9px, 0.62vw, 12px);
14429
14476
  color: var(--ps-text-muted);
14477
+ letter-spacing: 0.04em;
14430
14478
  }
14431
- .ps-cpw-photo-frame {
14479
+
14480
+ /* Photo preview frame (after upload) */
14481
+ .ps-cpw-photo-preview-frame {
14432
14482
  position: relative;
14433
14483
  flex: 1; min-height: 0;
14434
14484
  width: 100%;
14435
14485
  background: var(--ps-bg-secondary);
14436
- border-radius: clamp(8px, 0.6vw, 14px);
14486
+ border-radius: clamp(10px, 0.75vw, 16px);
14437
14487
  overflow: hidden;
14438
14488
  border: 1px solid var(--ps-border-subtle);
14489
+ display: flex; align-items: center; justify-content: center;
14490
+ }
14491
+ .ps-cpw-photo-preview-img {
14492
+ width: 100%; height: 100%;
14493
+ object-fit: contain;
14494
+ display: block;
14495
+ }
14496
+ .ps-cpw-photo-retake-pill {
14497
+ position: absolute;
14498
+ bottom: clamp(8px, 0.7vw, 14px);
14499
+ left: 50%;
14500
+ transform: translateX(-50%);
14501
+ background: rgba(255,255,255,0.95);
14502
+ border: 1px solid var(--ps-border-subtle);
14503
+ color: var(--ps-text-primary);
14504
+ padding: clamp(6px, 0.55vw, 12px) clamp(12px, 1vw, 20px);
14505
+ border-radius: 999px;
14506
+ font-family: inherit;
14507
+ font-size: clamp(10px, 0.7vw, 13px);
14508
+ font-weight: 600;
14509
+ cursor: pointer;
14510
+ backdrop-filter: blur(6px);
14511
+ transition: background 0.22s, color 0.22s;
14512
+ }
14513
+ .ps-cpw-photo-retake-pill:hover {
14514
+ background: var(--ps-accent);
14515
+ color: #FFFFFF;
14516
+ border-color: var(--ps-accent);
14517
+ }
14518
+ .ps-cpw-photo-remove {
14519
+ position: absolute;
14520
+ top: clamp(8px, 0.7vw, 14px);
14521
+ right: clamp(8px, 0.7vw, 14px);
14522
+ width: clamp(24px, 1.8vw, 34px);
14523
+ height: clamp(24px, 1.8vw, 34px);
14524
+ border-radius: 50%;
14525
+ background: rgba(28, 29, 30, 0.7);
14526
+ color: #FFFFFF;
14527
+ border: none;
14528
+ cursor: pointer;
14529
+ font-size: clamp(14px, 1.1vw, 18px);
14530
+ font-weight: 600;
14531
+ display: flex; align-items: center; justify-content: center;
14532
+ backdrop-filter: blur(6px);
14533
+ transition: background 0.18s;
14534
+ }
14535
+ .ps-cpw-photo-remove:hover { background: rgba(28, 29, 30, 0.9); }
14536
+
14537
+ /* Photo guide checklist — soft tinted card on the right column */
14538
+ .ps-cpw-photo-guide {
14539
+ background: var(--ps-bg-secondary);
14540
+ border: 1px solid var(--ps-border-subtle);
14541
+ border-radius: clamp(10px, 0.75vw, 16px);
14542
+ padding: clamp(12px, 1vw, 20px) clamp(14px, 1.1vw, 22px);
14543
+ display: flex; flex-direction: column;
14544
+ gap: clamp(6px, 0.55vw, 12px);
14545
+ margin-top: auto;
14546
+ }
14547
+ .ps-cpw-photo-guide-title {
14548
+ font-size: clamp(9px, 0.62vw, 11px);
14549
+ font-weight: 700;
14550
+ letter-spacing: 0.14em;
14551
+ text-transform: uppercase;
14552
+ color: var(--ps-text-primary);
14553
+ }
14554
+ .ps-cpw-photo-guide-list {
14555
+ list-style: none;
14556
+ margin: 0;
14557
+ padding: 0;
14558
+ display: flex; flex-direction: column;
14559
+ gap: clamp(4px, 0.4vw, 10px);
14560
+ }
14561
+ .ps-cpw-photo-guide-list li {
14562
+ display: flex; align-items: flex-start;
14563
+ gap: clamp(6px, 0.55vw, 12px);
14564
+ font-size: clamp(10px, 0.72vw, 13px);
14565
+ line-height: 1.45;
14566
+ color: var(--ps-text-secondary);
14567
+ }
14568
+ .ps-cpw-photo-guide-list li svg {
14569
+ flex-shrink: 0;
14570
+ width: clamp(12px, 0.9vw, 16px);
14571
+ height: clamp(12px, 0.9vw, 16px);
14572
+ color: var(--ps-accent);
14573
+ margin-top: 0.15em;
14439
14574
  }
14440
14575
  .ps-cpw-photo-frame-img {
14441
14576
  width: 100%; height: 100%;
@@ -18637,27 +18772,7 @@ function CreateProfileWizard({ onSave, onCancel, t: t2 }) {
18637
18772
  ] })
18638
18773
  ] }, "bra"),
18639
18774
  mode === "manual" && error && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-cpw-error", children: error }),
18640
- mode === "image" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-cpw-image-combined ps-cpw-fade-in", children: [
18641
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-cpw-pill-row", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-cpw-pill-group", children: [
18642
- /* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", className: `ps-cpw-pill${gender === "male" ? " ps-active" : ""}`, onClick: () => setGender("male"), children: t2("Male") }),
18643
- /* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", className: `ps-cpw-pill${gender === "female" ? " ps-active" : ""}`, onClick: () => setGender("female"), children: t2("Female") })
18644
- ] }) }),
18645
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-bp-inline-fields ps-cpw-inline-fields", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bp-inline-row", children: [
18646
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-bp-inline-label", children: t2("NAME") }),
18647
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-bp-inline-input-group", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
18648
- "input",
18649
- {
18650
- type: "text",
18651
- className: "ps-bp-inline-input",
18652
- value: name,
18653
- placeholder: t2("e.g. My Photo Profile"),
18654
- onChange: (e) => {
18655
- setName(e.target.value);
18656
- setError("");
18657
- }
18658
- }
18659
- ) })
18660
- ] }) }),
18775
+ mode === "image" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-cpw-image-split ps-cpw-fade-in", children: [
18661
18776
  /* @__PURE__ */ jsxRuntimeExports.jsx(
18662
18777
  "input",
18663
18778
  {
@@ -18668,8 +18783,8 @@ function CreateProfileWizard({ onSave, onCancel, t: t2 }) {
18668
18783
  onChange: handlePhotoSelect
18669
18784
  }
18670
18785
  ),
18671
- photoBase64 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-cpw-photo-frame", children: [
18672
- /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: photoBase64, alt: t2("Profile photo"), className: "ps-cpw-photo-frame-img" }),
18786
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-cpw-image-left", children: photoBase64 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-cpw-photo-preview-frame", children: [
18787
+ /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: photoBase64, alt: t2("Profile photo"), className: "ps-cpw-photo-preview-img" }),
18673
18788
  /* @__PURE__ */ jsxRuntimeExports.jsx(
18674
18789
  "button",
18675
18790
  {
@@ -18679,26 +18794,84 @@ function CreateProfileWizard({ onSave, onCancel, t: t2 }) {
18679
18794
  "aria-label": t2("Remove photo"),
18680
18795
  children: "×"
18681
18796
  }
18797
+ ),
18798
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
18799
+ "button",
18800
+ {
18801
+ type: "button",
18802
+ className: "ps-cpw-photo-retake-pill",
18803
+ onClick: () => photoInputRef.current?.click(),
18804
+ children: t2("Retake")
18805
+ }
18682
18806
  )
18683
18807
  ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
18684
18808
  "button",
18685
18809
  {
18686
18810
  type: "button",
18687
- className: "ps-cpw-photo-dropzone",
18811
+ className: "ps-cpw-dropzone",
18688
18812
  onClick: () => photoInputRef.current?.click(),
18689
18813
  disabled: photoUploading,
18690
18814
  children: [
18691
- /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", width: "36", height: "36", children: [
18692
- /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
18693
- /* @__PURE__ */ jsxRuntimeExports.jsx("polyline", { points: "17 8 12 3 7 8" }),
18694
- /* @__PURE__ */ jsxRuntimeExports.jsx("line", { x1: "12", y1: "3", x2: "12", y2: "15" })
18815
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className: "ps-cpw-dropzone-silhouette", viewBox: "0 0 80 200", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
18816
+ /* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "40", cy: "20", r: "13" }),
18817
+ /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M40 35 L40 110 M22 60 L22 105 M58 60 L58 105 M22 60 Q40 50 58 60 M40 110 L25 195 M40 110 L55 195" })
18695
18818
  ] }),
18696
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-cpw-photo-dropzone-title", children: photoUploading ? t2("Processing...") : t2("Tap to upload a photo") }),
18697
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-cpw-photo-dropzone-hint", children: t2("JPEG / PNG / WebP up to 10MB") })
18819
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-cpw-dropzone-content", children: [
18820
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className: "ps-cpw-dropzone-upload-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
18821
+ /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
18822
+ /* @__PURE__ */ jsxRuntimeExports.jsx("polyline", { points: "17 8 12 3 7 8" }),
18823
+ /* @__PURE__ */ jsxRuntimeExports.jsx("line", { x1: "12", y1: "3", x2: "12", y2: "15" })
18824
+ ] }),
18825
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-cpw-dropzone-title", children: photoUploading ? t2("Processing…") : t2("Drop a photo or click to upload") }),
18826
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-cpw-dropzone-hint", children: t2("JPEG · PNG · WebP · up to 10MB") })
18827
+ ] })
18698
18828
  ]
18699
18829
  }
18700
- ),
18701
- error && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-cpw-error", children: error })
18830
+ ) }),
18831
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-cpw-image-right", children: [
18832
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-cpw-pill-row", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-cpw-pill-group", children: [
18833
+ /* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", className: `ps-cpw-pill${gender === "male" ? " ps-active" : ""}`, onClick: () => setGender("male"), children: t2("Male") }),
18834
+ /* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", className: `ps-cpw-pill${gender === "female" ? " ps-active" : ""}`, onClick: () => setGender("female"), children: t2("Female") })
18835
+ ] }) }),
18836
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-bp-inline-fields ps-cpw-inline-fields", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bp-inline-row", children: [
18837
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-bp-inline-label", children: t2("NAME") }),
18838
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-bp-inline-input-group", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
18839
+ "input",
18840
+ {
18841
+ type: "text",
18842
+ className: "ps-bp-inline-input",
18843
+ value: name,
18844
+ placeholder: t2("e.g. My Photo Profile"),
18845
+ onChange: (e) => {
18846
+ setName(e.target.value);
18847
+ setError("");
18848
+ }
18849
+ }
18850
+ ) })
18851
+ ] }) }),
18852
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-cpw-photo-guide", children: [
18853
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-cpw-photo-guide-title", children: t2("HOW TO TAKE A GOOD PHOTO") }),
18854
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("ul", { className: "ps-cpw-photo-guide-list", children: [
18855
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { children: [
18856
+ /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntimeExports.jsx("polyline", { points: "3 8 7 12 13 4" }) }),
18857
+ t2("Stand straight, arms relaxed at your sides")
18858
+ ] }),
18859
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { children: [
18860
+ /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntimeExports.jsx("polyline", { points: "3 8 7 12 13 4" }) }),
18861
+ t2("Full body in frame, head to toes")
18862
+ ] }),
18863
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { children: [
18864
+ /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntimeExports.jsx("polyline", { points: "3 8 7 12 13 4" }) }),
18865
+ t2("Form-fitting clothing, no loose layers")
18866
+ ] }),
18867
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { children: [
18868
+ /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntimeExports.jsx("polyline", { points: "3 8 7 12 13 4" }) }),
18869
+ t2("Plain background, neutral lighting")
18870
+ ] })
18871
+ ] })
18872
+ ] }),
18873
+ error && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-cpw-error", children: error })
18874
+ ] })
18702
18875
  ] }, "image-combined")
18703
18876
  ] }),
18704
18877
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-cpw-footer", children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primestyleai/tryon",
3
- "version": "5.8.31",
3
+ "version": "5.8.32",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",