@primestyleai/tryon 5.10.136 → 5.10.138

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.
@@ -19,8 +19,10 @@ interface MobileScanningViewProps {
19
19
  productDescription?: string;
20
20
  /** Optional cancel handler shown as a text link under the cards. */
21
21
  onCancelTryOn?: () => void;
22
- onSwitchToManual: () => void;
22
+ /** No longer rendered (tabs removed mid-scan), kept for backwards-compat
23
+ * with the photo-step caller that passes it down. */
24
+ onSwitchToManual?: () => void;
23
25
  t: TranslateFn;
24
26
  }
25
- export declare function MobileScanningView({ previewUrl, productImage, bodyLandmarks, sizingDone, tryOnProcessing, productMaterial, productDescription, onCancelTryOn, onSwitchToManual, t, }: MobileScanningViewProps): import("react/jsx-runtime").JSX.Element;
27
+ export declare function MobileScanningView({ previewUrl, productImage, bodyLandmarks, sizingDone, tryOnProcessing, productMaterial, productDescription, onCancelTryOn, t, }: MobileScanningViewProps): import("react/jsx-runtime").JSX.Element;
26
28
  export {};
@@ -13571,6 +13571,75 @@ const STYLES$1 = `
13571
13571
  }
13572
13572
  .ps-tryon-drawer-clear:hover { color: var(--ps-error-color); }
13573
13573
 
13574
+ /* ──────────────────────────────────────────────────────────────────
13575
+ Mobile sizing for the My Profiles / History drawer. Desktop uses vw
13576
+ units which collapse to 1–4 px on a 375 px phone. Override every
13577
+ rule with px-based values so the list is actually readable.
13578
+ ────────────────────────────────────────────────────────────────── */
13579
+ @media (max-width: 768px) {
13580
+ .ps-tryon-drawer { padding: 16px 14px; }
13581
+ .ps-tryon-drawer-header { gap: 10px; padding-bottom: 12px; margin-bottom: 12px; }
13582
+ .ps-tryon-drawer-back {
13583
+ width: 36px; height: 36px; border-radius: 8px;
13584
+ }
13585
+ .ps-tryon-drawer-back svg { width: 18px; height: 18px; }
13586
+ .ps-tryon-drawer-title { font-size: 17px; font-weight: 600; }
13587
+ .ps-tryon-drawer-add-btn {
13588
+ width: 32px; height: 32px; border-radius: 8px; font-size: 20px;
13589
+ }
13590
+ .ps-tryon-drawer-list { gap: 10px; }
13591
+ .ps-tryon-drawer-empty { padding: 32px 16px; font-size: 14px; }
13592
+
13593
+ .ps-tryon-drawer-create {
13594
+ padding: 14px;
13595
+ border-radius: 10px;
13596
+ font-size: 14px;
13597
+ gap: 6px;
13598
+ margin-bottom: 4px;
13599
+ }
13600
+ .ps-tryon-drawer-clear {
13601
+ font-size: 13px; padding: 12px 0; margin-top: 6px;
13602
+ }
13603
+
13604
+ .ps-tryon-profile-item {
13605
+ gap: 12px; padding: 14px; border-radius: 12px;
13606
+ }
13607
+ .ps-tryon-profile-avatar {
13608
+ width: 44px; height: 44px;
13609
+ }
13610
+ .ps-tryon-profile-avatar svg { width: 22px; height: 22px; }
13611
+ .ps-tryon-profile-name { font-size: 15px; }
13612
+ .ps-tryon-profile-detail { font-size: 12px; margin-top: 3px; }
13613
+ .ps-tryon-profile-item > svg:last-child { width: 18px; height: 18px; }
13614
+
13615
+ .ps-tryon-history-item {
13616
+ gap: 12px; padding: 12px; border-radius: 12px;
13617
+ }
13618
+ .ps-tryon-history-images { gap: 6px; }
13619
+ .ps-tryon-history-thumb,
13620
+ .ps-tryon-history-result-img {
13621
+ width: 64px; height: 80px; border-radius: 8px;
13622
+ }
13623
+ .ps-tryon-history-product { font-size: 14px; line-height: 1.3; }
13624
+ .ps-tryon-history-meta { font-size: 11px; margin-top: 4px; }
13625
+ .ps-tryon-history-sizing { gap: 8px; margin-top: 6px; }
13626
+ .ps-tryon-history-sizing-reason { font-size: 11px; }
13627
+ .ps-tryon-history-size-badge {
13628
+ min-width: 32px; height: 32px; padding: 0 10px; font-size: 12px;
13629
+ }
13630
+ .ps-tryon-history-sections { gap: 6px; margin-top: 6px; }
13631
+ .ps-tryon-history-section-chip {
13632
+ font-size: 11px; padding: 3px 8px; border-radius: 6px;
13633
+ }
13634
+ .ps-tryon-history-tryon-badge {
13635
+ font-size: 10px; padding: 2px 7px; border-radius: 5px; margin-top: 6px;
13636
+ }
13637
+ .ps-tryon-history-delete {
13638
+ width: 32px; height: 32px; border-radius: 6px;
13639
+ }
13640
+ .ps-tryon-history-delete svg { width: 16px; height: 16px; }
13641
+ }
13642
+
13574
13643
  /* Profile detail modal — portaled to body, sits ABOVE the main modal
13575
13644
  overlay (which has z-index 2147483647). Equal z-index + later DOM
13576
13645
  order means this stacks on top. Same trick as the language dropdown. */
@@ -17553,10 +17622,16 @@ const STYLES$1 = `
17553
17622
  letter-spacing: 0.05em;
17554
17623
  color: var(--ps-text-muted);
17555
17624
  }
17556
- /* Mobile: 56 px overflows for compound labels like
17557
- "MISSY 12 / Standard / Length 61". Cap at 36 px. */
17625
+ /* Mobile: long labels like "MISSY 12 / Standard" wrap to a second line
17626
+ at 36 px in a ~280 px card. Drop further to 28 px and let the size
17627
+ pill take the full card width so wrapping doesn't strand the meta
17628
+ value awkwardly to the side. */
17558
17629
  @media (max-width: 768px) {
17559
- .ps-msd-card-size { font-size: 36px; letter-spacing: -0.015em; }
17630
+ .ps-msd-card-size {
17631
+ font-size: 28px;
17632
+ letter-spacing: -0.015em;
17633
+ line-height: 1.1;
17634
+ }
17560
17635
  .ps-msd-card-size-meta { font-size: 11px; }
17561
17636
  }
17562
17637
  .ps-msd-card-divider {
@@ -19068,46 +19143,6 @@ function useIsMobile() {
19068
19143
  }, []);
19069
19144
  return isMobile;
19070
19145
  }
19071
- function RulerIcon() {
19072
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", width: "13", height: "13", children: [
19073
- /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M3 17l6 6 12-12-6-6z" }),
19074
- /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M9 11l2 2M11 9l2 2M13 7l2 2M7 13l2 2" })
19075
- ] });
19076
- }
19077
- function ScanIcon() {
19078
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", width: "13", height: "13", children: [
19079
- /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M3 7V5a2 2 0 0 1 2-2h2M17 3h2a2 2 0 0 1 2 2v2M21 17v2a2 2 0 0 1-2 2h-2M7 21H5a2 2 0 0 1-2-2v-2" }),
19080
- /* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "12", cy: "12", r: "3" })
19081
- ] });
19082
- }
19083
- function MobileBottomTabs({ mode, onSwitchToManual, onSwitchToScan, t: t2 }) {
19084
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bpm-bottom-tabs", children: [
19085
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
19086
- "button",
19087
- {
19088
- type: "button",
19089
- className: `ps-bpm-bottom-tab${mode === "manual" ? " ps-active" : ""}`,
19090
- onClick: onSwitchToManual,
19091
- children: [
19092
- /* @__PURE__ */ jsxRuntimeExports.jsx(RulerIcon, {}),
19093
- t2("MANUAL FIT")
19094
- ]
19095
- }
19096
- ),
19097
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
19098
- "button",
19099
- {
19100
- type: "button",
19101
- className: `ps-bpm-bottom-tab${mode === "scan" ? " ps-active" : ""}`,
19102
- onClick: onSwitchToScan,
19103
- children: [
19104
- /* @__PURE__ */ jsxRuntimeExports.jsx(ScanIcon, {}),
19105
- t2("AI SCAN")
19106
- ]
19107
- }
19108
- )
19109
- ] });
19110
- }
19111
19146
  const SKELETON_CONNECTIONS$1 = [
19112
19147
  // Head → torso. Bridges the gap between the nose dot and the shoulder
19113
19148
  // line — without these the head reads as floating above the body.
@@ -19196,7 +19231,8 @@ function MobileScanningView({
19196
19231
  productMaterial,
19197
19232
  productDescription,
19198
19233
  onCancelTryOn,
19199
- onSwitchToManual,
19234
+ // onSwitchToManual is intentionally not destructured — bottom tabs are
19235
+ // hidden during analysis and the prop is kept on the type for callers.
19200
19236
  t: t2
19201
19237
  }) {
19202
19238
  const displayImage = previewUrl || productImage || "";
@@ -19255,17 +19291,7 @@ function MobileScanningView({
19255
19291
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-msc-stage-title", children: current.title }),
19256
19292
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-msc-stage-desc", children: current.desc })
19257
19293
  ] }, stageIdx) }),
19258
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-bpm-spacer" }),
19259
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-bpm-bottom", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
19260
- MobileBottomTabs,
19261
- {
19262
- mode: "scan",
19263
- onSwitchToManual,
19264
- onSwitchToScan: () => {
19265
- },
19266
- t: t2
19267
- }
19268
- ) })
19294
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-bpm-spacer" })
19269
19295
  ] });
19270
19296
  }
19271
19297
  const TARGET_SECONDS = 22;
@@ -20516,14 +20542,14 @@ function SectionDetailView({
20516
20542
  " ",
20517
20543
  t2("based on your measurements and the garment's tailoring chart.")
20518
20544
  ] }),
20519
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "flex", gap: 10, padding: "12px 0 4px", flexShrink: 0 }, children: [
20545
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "flex", gap: 10, padding: "12px 0 4px", flexShrink: 0, alignItems: "center" }, children: [
20520
20546
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
20521
20547
  "button",
20522
20548
  {
20523
20549
  type: "button",
20524
20550
  className: "ps-bp-back-btn",
20525
20551
  onClick: onBack,
20526
- style: { fontSize: 13, padding: "10px 6px" },
20552
+ style: { fontSize: 13, padding: "10px 6px", flexShrink: 0 },
20527
20553
  children: [
20528
20554
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-bp-back-arrow", children: "←" }),
20529
20555
  " ",
@@ -20531,7 +20557,6 @@ function SectionDetailView({
20531
20557
  ]
20532
20558
  }
20533
20559
  ),
20534
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { flex: 1 } }),
20535
20560
  onTryOn ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
20536
20561
  "button",
20537
20562
  {
@@ -20539,7 +20564,8 @@ function SectionDetailView({
20539
20564
  onClick: onTryOn,
20540
20565
  disabled: tryOnProcessing,
20541
20566
  style: {
20542
- flex: 1,
20567
+ flex: "1 1 0",
20568
+ minWidth: 0,
20543
20569
  padding: "12px 16px",
20544
20570
  borderRadius: 10,
20545
20571
  background: "var(--ps-accent)",
@@ -20553,7 +20579,8 @@ function SectionDetailView({
20553
20579
  display: "flex",
20554
20580
  alignItems: "center",
20555
20581
  justifyContent: "center",
20556
- gap: 6
20582
+ gap: 6,
20583
+ whiteSpace: "nowrap"
20557
20584
  },
20558
20585
  children: [
20559
20586
  /* @__PURE__ */ jsxRuntimeExports.jsx(CameraIcon$1, { size: 14 }),
@@ -20566,7 +20593,8 @@ function SectionDetailView({
20566
20593
  type: "button",
20567
20594
  onClick: onBack,
20568
20595
  style: {
20569
- flex: 1,
20596
+ flex: "1 1 0",
20597
+ minWidth: 0,
20570
20598
  padding: "12px 16px",
20571
20599
  borderRadius: 10,
20572
20600
  background: "var(--ps-accent)",
@@ -20579,7 +20607,8 @@ function SectionDetailView({
20579
20607
  display: "flex",
20580
20608
  alignItems: "center",
20581
20609
  justifyContent: "center",
20582
- gap: 6
20610
+ gap: 6,
20611
+ whiteSpace: "nowrap"
20583
20612
  },
20584
20613
  children: [
20585
20614
  continueLabel || t2("Continue"),
@@ -24788,6 +24817,46 @@ function ResultView({ setView }) {
24788
24817
  }, []);
24789
24818
  return null;
24790
24819
  }
24820
+ function RulerIcon() {
24821
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", width: "13", height: "13", children: [
24822
+ /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M3 17l6 6 12-12-6-6z" }),
24823
+ /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M9 11l2 2M11 9l2 2M13 7l2 2M7 13l2 2" })
24824
+ ] });
24825
+ }
24826
+ function ScanIcon() {
24827
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", width: "13", height: "13", children: [
24828
+ /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M3 7V5a2 2 0 0 1 2-2h2M17 3h2a2 2 0 0 1 2 2v2M21 17v2a2 2 0 0 1-2 2h-2M7 21H5a2 2 0 0 1-2-2v-2" }),
24829
+ /* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "12", cy: "12", r: "3" })
24830
+ ] });
24831
+ }
24832
+ function MobileBottomTabs({ mode, onSwitchToManual, onSwitchToScan, t: t2 }) {
24833
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bpm-bottom-tabs", children: [
24834
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
24835
+ "button",
24836
+ {
24837
+ type: "button",
24838
+ className: `ps-bpm-bottom-tab${mode === "manual" ? " ps-active" : ""}`,
24839
+ onClick: onSwitchToManual,
24840
+ children: [
24841
+ /* @__PURE__ */ jsxRuntimeExports.jsx(RulerIcon, {}),
24842
+ t2("MANUAL FIT")
24843
+ ]
24844
+ }
24845
+ ),
24846
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
24847
+ "button",
24848
+ {
24849
+ type: "button",
24850
+ className: `ps-bpm-bottom-tab${mode === "scan" ? " ps-active" : ""}`,
24851
+ onClick: onSwitchToScan,
24852
+ children: [
24853
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ScanIcon, {}),
24854
+ t2("AI SCAN")
24855
+ ]
24856
+ }
24857
+ )
24858
+ ] });
24859
+ }
24791
24860
  function CameraSmallIcon({ size = 16 }) {
24792
24861
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", width: size, height: size, children: [
24793
24862
  /* @__PURE__ */ jsxRuntimeExports.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" }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primestyleai/tryon",
3
- "version": "5.10.136",
3
+ "version": "5.10.138",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",