@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.
@@ -4974,44 +4974,179 @@ const STYLES = `
4974
4974
  color: var(--ps-text-muted);
4975
4975
  }
4976
4976
 
4977
- /* ── Image path — single combined screen, vw-scaled ── */
4978
- .ps-cpw-image-combined {
4979
- display: flex; flex-direction: column; align-items: stretch;
4980
- gap: clamp(8px, 0.7vw, 14px);
4977
+ /* ── Image path — split layout with dropzone + photo guide ──
4978
+ Two columns: dropzone with silhouette placeholder on the LEFT,
4979
+ gender pills + name input + photo-guide checklist on the RIGHT.
4980
+ Collapses to single column on narrow viewports via flex-wrap. */
4981
+ .ps-cpw-image-split {
4982
+ display: grid;
4983
+ grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
4984
+ gap: clamp(14px, 1.2vw, 26px);
4981
4985
  flex: 1; min-height: 0;
4982
4986
  width: 100%; box-sizing: border-box;
4983
4987
  }
4984
- .ps-cpw-photo-dropzone {
4985
- display: flex; flex-direction: column; align-items: center; justify-content: center;
4986
- gap: clamp(4px, 0.4vw, 10px);
4988
+ .ps-cpw-image-left {
4989
+ display: flex; flex-direction: column;
4990
+ min-width: 0; min-height: 0;
4991
+ }
4992
+ .ps-cpw-image-right {
4993
+ display: flex; flex-direction: column;
4994
+ gap: clamp(10px, 0.9vw, 18px);
4995
+ min-width: 0; min-height: 0;
4996
+ }
4997
+
4998
+ /* Dropzone — premium card with a faded body silhouette behind the
4999
+ upload prompt. Communicates "this is where the body photo goes". */
5000
+ .ps-cpw-dropzone {
5001
+ position: relative;
5002
+ display: flex; align-items: center; justify-content: center;
4987
5003
  flex: 1; min-height: 0;
4988
5004
  width: 100%; box-sizing: border-box;
4989
- padding: clamp(10px, 0.9vw, 18px);
4990
- border: 2px dashed var(--ps-border-color);
4991
- border-radius: clamp(8px, 0.6vw, 14px);
4992
- background: var(--ps-bg-secondary);
5005
+ padding: clamp(14px, 1.2vw, 26px);
5006
+ border: 1.5px dashed var(--ps-border-color);
5007
+ border-radius: clamp(10px, 0.75vw, 16px);
5008
+ background:
5009
+ radial-gradient(ellipse at 50% 60%, rgba(33, 84, 239, 0.05) 0%, transparent 70%),
5010
+ var(--ps-bg-secondary);
4993
5011
  color: var(--ps-text-muted);
4994
5012
  cursor: pointer; font-family: inherit;
4995
- transition: border-color 0.18s, background 0.18s;
5013
+ overflow: hidden;
5014
+ transition: border-color 0.22s, background 0.22s, transform 0.22s;
4996
5015
  }
4997
- .ps-cpw-photo-dropzone:hover { border-color: var(--ps-accent); background: rgba(33, 84, 239, 0.04); }
4998
- .ps-cpw-photo-dropzone:disabled { opacity: 0.6; cursor: default; }
4999
- .ps-cpw-photo-dropzone-title {
5016
+ .ps-cpw-dropzone:hover {
5017
+ border-color: var(--ps-accent);
5018
+ transform: translateY(-1px);
5019
+ }
5020
+ .ps-cpw-dropzone:disabled { opacity: 0.6; cursor: default; transform: none; }
5021
+ /* Faded body silhouette behind the upload prompt */
5022
+ .ps-cpw-dropzone-silhouette {
5023
+ position: absolute;
5024
+ left: 50%; top: 50%;
5025
+ transform: translate(-50%, -50%);
5026
+ width: clamp(60px, 7vw, 130px);
5027
+ height: auto;
5028
+ color: var(--ps-accent);
5029
+ opacity: 0.08;
5030
+ pointer-events: none;
5031
+ }
5032
+ .ps-cpw-dropzone-content {
5033
+ position: relative;
5034
+ z-index: 1;
5035
+ display: flex; flex-direction: column; align-items: center;
5036
+ gap: clamp(4px, 0.4vw, 10px);
5037
+ }
5038
+ .ps-cpw-dropzone-upload-icon {
5039
+ width: clamp(28px, 2vw, 40px);
5040
+ height: clamp(28px, 2vw, 40px);
5041
+ color: var(--ps-accent);
5042
+ margin-bottom: clamp(2px, 0.2vw, 6px);
5043
+ }
5044
+ .ps-cpw-dropzone-title {
5000
5045
  font-size: clamp(11px, 0.78vw, 14px);
5001
- font-weight: 600; color: var(--ps-text-primary);
5046
+ font-weight: 600;
5047
+ color: var(--ps-text-primary);
5048
+ text-align: center;
5002
5049
  }
5003
- .ps-cpw-photo-dropzone-hint {
5050
+ .ps-cpw-dropzone-hint {
5004
5051
  font-size: clamp(9px, 0.62vw, 12px);
5005
5052
  color: var(--ps-text-muted);
5053
+ letter-spacing: 0.04em;
5006
5054
  }
5007
- .ps-cpw-photo-frame {
5055
+
5056
+ /* Photo preview frame (after upload) */
5057
+ .ps-cpw-photo-preview-frame {
5008
5058
  position: relative;
5009
5059
  flex: 1; min-height: 0;
5010
5060
  width: 100%;
5011
5061
  background: var(--ps-bg-secondary);
5012
- border-radius: clamp(8px, 0.6vw, 14px);
5062
+ border-radius: clamp(10px, 0.75vw, 16px);
5013
5063
  overflow: hidden;
5014
5064
  border: 1px solid var(--ps-border-subtle);
5065
+ display: flex; align-items: center; justify-content: center;
5066
+ }
5067
+ .ps-cpw-photo-preview-img {
5068
+ width: 100%; height: 100%;
5069
+ object-fit: contain;
5070
+ display: block;
5071
+ }
5072
+ .ps-cpw-photo-retake-pill {
5073
+ position: absolute;
5074
+ bottom: clamp(8px, 0.7vw, 14px);
5075
+ left: 50%;
5076
+ transform: translateX(-50%);
5077
+ background: rgba(255,255,255,0.95);
5078
+ border: 1px solid var(--ps-border-subtle);
5079
+ color: var(--ps-text-primary);
5080
+ padding: clamp(6px, 0.55vw, 12px) clamp(12px, 1vw, 20px);
5081
+ border-radius: 999px;
5082
+ font-family: inherit;
5083
+ font-size: clamp(10px, 0.7vw, 13px);
5084
+ font-weight: 600;
5085
+ cursor: pointer;
5086
+ backdrop-filter: blur(6px);
5087
+ transition: background 0.22s, color 0.22s;
5088
+ }
5089
+ .ps-cpw-photo-retake-pill:hover {
5090
+ background: var(--ps-accent);
5091
+ color: #FFFFFF;
5092
+ border-color: var(--ps-accent);
5093
+ }
5094
+ .ps-cpw-photo-remove {
5095
+ position: absolute;
5096
+ top: clamp(8px, 0.7vw, 14px);
5097
+ right: clamp(8px, 0.7vw, 14px);
5098
+ width: clamp(24px, 1.8vw, 34px);
5099
+ height: clamp(24px, 1.8vw, 34px);
5100
+ border-radius: 50%;
5101
+ background: rgba(28, 29, 30, 0.7);
5102
+ color: #FFFFFF;
5103
+ border: none;
5104
+ cursor: pointer;
5105
+ font-size: clamp(14px, 1.1vw, 18px);
5106
+ font-weight: 600;
5107
+ display: flex; align-items: center; justify-content: center;
5108
+ backdrop-filter: blur(6px);
5109
+ transition: background 0.18s;
5110
+ }
5111
+ .ps-cpw-photo-remove:hover { background: rgba(28, 29, 30, 0.9); }
5112
+
5113
+ /* Photo guide checklist — soft tinted card on the right column */
5114
+ .ps-cpw-photo-guide {
5115
+ background: var(--ps-bg-secondary);
5116
+ border: 1px solid var(--ps-border-subtle);
5117
+ border-radius: clamp(10px, 0.75vw, 16px);
5118
+ padding: clamp(12px, 1vw, 20px) clamp(14px, 1.1vw, 22px);
5119
+ display: flex; flex-direction: column;
5120
+ gap: clamp(6px, 0.55vw, 12px);
5121
+ margin-top: auto;
5122
+ }
5123
+ .ps-cpw-photo-guide-title {
5124
+ font-size: clamp(9px, 0.62vw, 11px);
5125
+ font-weight: 700;
5126
+ letter-spacing: 0.14em;
5127
+ text-transform: uppercase;
5128
+ color: var(--ps-text-primary);
5129
+ }
5130
+ .ps-cpw-photo-guide-list {
5131
+ list-style: none;
5132
+ margin: 0;
5133
+ padding: 0;
5134
+ display: flex; flex-direction: column;
5135
+ gap: clamp(4px, 0.4vw, 10px);
5136
+ }
5137
+ .ps-cpw-photo-guide-list li {
5138
+ display: flex; align-items: flex-start;
5139
+ gap: clamp(6px, 0.55vw, 12px);
5140
+ font-size: clamp(10px, 0.72vw, 13px);
5141
+ line-height: 1.45;
5142
+ color: var(--ps-text-secondary);
5143
+ }
5144
+ .ps-cpw-photo-guide-list li svg {
5145
+ flex-shrink: 0;
5146
+ width: clamp(12px, 0.9vw, 16px);
5147
+ height: clamp(12px, 0.9vw, 16px);
5148
+ color: var(--ps-accent);
5149
+ margin-top: 0.15em;
5015
5150
  }
5016
5151
  .ps-cpw-photo-frame-img {
5017
5152
  width: 100%; height: 100%;
@@ -9213,27 +9348,7 @@ function CreateProfileWizard({ onSave, onCancel, t }) {
9213
9348
  ] })
9214
9349
  ] }, "bra"),
9215
9350
  mode === "manual" && error && /* @__PURE__ */ jsx("div", { className: "ps-cpw-error", children: error }),
9216
- mode === "image" && /* @__PURE__ */ jsxs("div", { className: "ps-cpw-image-combined ps-cpw-fade-in", children: [
9217
- /* @__PURE__ */ jsx("div", { className: "ps-cpw-pill-row", children: /* @__PURE__ */ jsxs("div", { className: "ps-cpw-pill-group", children: [
9218
- /* @__PURE__ */ jsx("button", { type: "button", className: `ps-cpw-pill${gender === "male" ? " ps-active" : ""}`, onClick: () => setGender("male"), children: t("Male") }),
9219
- /* @__PURE__ */ jsx("button", { type: "button", className: `ps-cpw-pill${gender === "female" ? " ps-active" : ""}`, onClick: () => setGender("female"), children: t("Female") })
9220
- ] }) }),
9221
- /* @__PURE__ */ jsx("div", { className: "ps-bp-inline-fields ps-cpw-inline-fields", children: /* @__PURE__ */ jsxs("div", { className: "ps-bp-inline-row", children: [
9222
- /* @__PURE__ */ jsx("span", { className: "ps-bp-inline-label", children: t("NAME") }),
9223
- /* @__PURE__ */ jsx("div", { className: "ps-bp-inline-input-group", children: /* @__PURE__ */ jsx(
9224
- "input",
9225
- {
9226
- type: "text",
9227
- className: "ps-bp-inline-input",
9228
- value: name,
9229
- placeholder: t("e.g. My Photo Profile"),
9230
- onChange: (e) => {
9231
- setName(e.target.value);
9232
- setError("");
9233
- }
9234
- }
9235
- ) })
9236
- ] }) }),
9351
+ mode === "image" && /* @__PURE__ */ jsxs("div", { className: "ps-cpw-image-split ps-cpw-fade-in", children: [
9237
9352
  /* @__PURE__ */ jsx(
9238
9353
  "input",
9239
9354
  {
@@ -9244,8 +9359,8 @@ function CreateProfileWizard({ onSave, onCancel, t }) {
9244
9359
  onChange: handlePhotoSelect
9245
9360
  }
9246
9361
  ),
9247
- photoBase64 ? /* @__PURE__ */ jsxs("div", { className: "ps-cpw-photo-frame", children: [
9248
- /* @__PURE__ */ jsx("img", { src: photoBase64, alt: t("Profile photo"), className: "ps-cpw-photo-frame-img" }),
9362
+ /* @__PURE__ */ jsx("div", { className: "ps-cpw-image-left", children: photoBase64 ? /* @__PURE__ */ jsxs("div", { className: "ps-cpw-photo-preview-frame", children: [
9363
+ /* @__PURE__ */ jsx("img", { src: photoBase64, alt: t("Profile photo"), className: "ps-cpw-photo-preview-img" }),
9249
9364
  /* @__PURE__ */ jsx(
9250
9365
  "button",
9251
9366
  {
@@ -9255,26 +9370,84 @@ function CreateProfileWizard({ onSave, onCancel, t }) {
9255
9370
  "aria-label": t("Remove photo"),
9256
9371
  children: "×"
9257
9372
  }
9373
+ ),
9374
+ /* @__PURE__ */ jsx(
9375
+ "button",
9376
+ {
9377
+ type: "button",
9378
+ className: "ps-cpw-photo-retake-pill",
9379
+ onClick: () => photoInputRef.current?.click(),
9380
+ children: t("Retake")
9381
+ }
9258
9382
  )
9259
9383
  ] }) : /* @__PURE__ */ jsxs(
9260
9384
  "button",
9261
9385
  {
9262
9386
  type: "button",
9263
- className: "ps-cpw-photo-dropzone",
9387
+ className: "ps-cpw-dropzone",
9264
9388
  onClick: () => photoInputRef.current?.click(),
9265
9389
  disabled: photoUploading,
9266
9390
  children: [
9267
- /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", width: "36", height: "36", children: [
9268
- /* @__PURE__ */ jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
9269
- /* @__PURE__ */ jsx("polyline", { points: "17 8 12 3 7 8" }),
9270
- /* @__PURE__ */ jsx("line", { x1: "12", y1: "3", x2: "12", y2: "15" })
9391
+ /* @__PURE__ */ 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: [
9392
+ /* @__PURE__ */ jsx("circle", { cx: "40", cy: "20", r: "13" }),
9393
+ /* @__PURE__ */ 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" })
9271
9394
  ] }),
9272
- /* @__PURE__ */ jsx("span", { className: "ps-cpw-photo-dropzone-title", children: photoUploading ? t("Processing...") : t("Tap to upload a photo") }),
9273
- /* @__PURE__ */ jsx("span", { className: "ps-cpw-photo-dropzone-hint", children: t("JPEG / PNG / WebP up to 10MB") })
9395
+ /* @__PURE__ */ jsxs("div", { className: "ps-cpw-dropzone-content", children: [
9396
+ /* @__PURE__ */ 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: [
9397
+ /* @__PURE__ */ jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
9398
+ /* @__PURE__ */ jsx("polyline", { points: "17 8 12 3 7 8" }),
9399
+ /* @__PURE__ */ jsx("line", { x1: "12", y1: "3", x2: "12", y2: "15" })
9400
+ ] }),
9401
+ /* @__PURE__ */ jsx("span", { className: "ps-cpw-dropzone-title", children: photoUploading ? t("Processing…") : t("Drop a photo or click to upload") }),
9402
+ /* @__PURE__ */ jsx("span", { className: "ps-cpw-dropzone-hint", children: t("JPEG · PNG · WebP · up to 10MB") })
9403
+ ] })
9274
9404
  ]
9275
9405
  }
9276
- ),
9277
- error && /* @__PURE__ */ jsx("div", { className: "ps-cpw-error", children: error })
9406
+ ) }),
9407
+ /* @__PURE__ */ jsxs("div", { className: "ps-cpw-image-right", children: [
9408
+ /* @__PURE__ */ jsx("div", { className: "ps-cpw-pill-row", children: /* @__PURE__ */ jsxs("div", { className: "ps-cpw-pill-group", children: [
9409
+ /* @__PURE__ */ jsx("button", { type: "button", className: `ps-cpw-pill${gender === "male" ? " ps-active" : ""}`, onClick: () => setGender("male"), children: t("Male") }),
9410
+ /* @__PURE__ */ jsx("button", { type: "button", className: `ps-cpw-pill${gender === "female" ? " ps-active" : ""}`, onClick: () => setGender("female"), children: t("Female") })
9411
+ ] }) }),
9412
+ /* @__PURE__ */ jsx("div", { className: "ps-bp-inline-fields ps-cpw-inline-fields", children: /* @__PURE__ */ jsxs("div", { className: "ps-bp-inline-row", children: [
9413
+ /* @__PURE__ */ jsx("span", { className: "ps-bp-inline-label", children: t("NAME") }),
9414
+ /* @__PURE__ */ jsx("div", { className: "ps-bp-inline-input-group", children: /* @__PURE__ */ jsx(
9415
+ "input",
9416
+ {
9417
+ type: "text",
9418
+ className: "ps-bp-inline-input",
9419
+ value: name,
9420
+ placeholder: t("e.g. My Photo Profile"),
9421
+ onChange: (e) => {
9422
+ setName(e.target.value);
9423
+ setError("");
9424
+ }
9425
+ }
9426
+ ) })
9427
+ ] }) }),
9428
+ /* @__PURE__ */ jsxs("div", { className: "ps-cpw-photo-guide", children: [
9429
+ /* @__PURE__ */ jsx("div", { className: "ps-cpw-photo-guide-title", children: t("HOW TO TAKE A GOOD PHOTO") }),
9430
+ /* @__PURE__ */ jsxs("ul", { className: "ps-cpw-photo-guide-list", children: [
9431
+ /* @__PURE__ */ jsxs("li", { children: [
9432
+ /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx("polyline", { points: "3 8 7 12 13 4" }) }),
9433
+ t("Stand straight, arms relaxed at your sides")
9434
+ ] }),
9435
+ /* @__PURE__ */ jsxs("li", { children: [
9436
+ /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx("polyline", { points: "3 8 7 12 13 4" }) }),
9437
+ t("Full body in frame, head to toes")
9438
+ ] }),
9439
+ /* @__PURE__ */ jsxs("li", { children: [
9440
+ /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx("polyline", { points: "3 8 7 12 13 4" }) }),
9441
+ t("Form-fitting clothing, no loose layers")
9442
+ ] }),
9443
+ /* @__PURE__ */ jsxs("li", { children: [
9444
+ /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx("polyline", { points: "3 8 7 12 13 4" }) }),
9445
+ t("Plain background, neutral lighting")
9446
+ ] })
9447
+ ] })
9448
+ ] }),
9449
+ error && /* @__PURE__ */ jsx("div", { className: "ps-cpw-error", children: error })
9450
+ ] })
9278
9451
  ] }, "image-combined")
9279
9452
  ] }),
9280
9453
  /* @__PURE__ */ jsxs("div", { className: "ps-cpw-footer", children: [