@primestyleai/tryon 5.10.136 → 5.10.137

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 {};
@@ -17553,10 +17553,16 @@ const STYLES$1 = `
17553
17553
  letter-spacing: 0.05em;
17554
17554
  color: var(--ps-text-muted);
17555
17555
  }
17556
- /* Mobile: 56 px overflows for compound labels like
17557
- "MISSY 12 / Standard / Length 61". Cap at 36 px. */
17556
+ /* Mobile: long labels like "MISSY 12 / Standard" wrap to a second line
17557
+ at 36 px in a ~280 px card. Drop further to 28 px and let the size
17558
+ pill take the full card width so wrapping doesn't strand the meta
17559
+ value awkwardly to the side. */
17558
17560
  @media (max-width: 768px) {
17559
- .ps-msd-card-size { font-size: 36px; letter-spacing: -0.015em; }
17561
+ .ps-msd-card-size {
17562
+ font-size: 28px;
17563
+ letter-spacing: -0.015em;
17564
+ line-height: 1.1;
17565
+ }
17560
17566
  .ps-msd-card-size-meta { font-size: 11px; }
17561
17567
  }
17562
17568
  .ps-msd-card-divider {
@@ -19068,46 +19074,6 @@ function useIsMobile() {
19068
19074
  }, []);
19069
19075
  return isMobile;
19070
19076
  }
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
19077
  const SKELETON_CONNECTIONS$1 = [
19112
19078
  // Head → torso. Bridges the gap between the nose dot and the shoulder
19113
19079
  // line — without these the head reads as floating above the body.
@@ -19196,7 +19162,8 @@ function MobileScanningView({
19196
19162
  productMaterial,
19197
19163
  productDescription,
19198
19164
  onCancelTryOn,
19199
- onSwitchToManual,
19165
+ // onSwitchToManual is intentionally not destructured — bottom tabs are
19166
+ // hidden during analysis and the prop is kept on the type for callers.
19200
19167
  t: t2
19201
19168
  }) {
19202
19169
  const displayImage = previewUrl || productImage || "";
@@ -19255,17 +19222,7 @@ function MobileScanningView({
19255
19222
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-msc-stage-title", children: current.title }),
19256
19223
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-msc-stage-desc", children: current.desc })
19257
19224
  ] }, 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
- ) })
19225
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-bpm-spacer" })
19269
19226
  ] });
19270
19227
  }
19271
19228
  const TARGET_SECONDS = 22;
@@ -20516,14 +20473,14 @@ function SectionDetailView({
20516
20473
  " ",
20517
20474
  t2("based on your measurements and the garment's tailoring chart.")
20518
20475
  ] }),
20519
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "flex", gap: 10, padding: "12px 0 4px", flexShrink: 0 }, children: [
20476
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "flex", gap: 10, padding: "12px 0 4px", flexShrink: 0, alignItems: "center" }, children: [
20520
20477
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
20521
20478
  "button",
20522
20479
  {
20523
20480
  type: "button",
20524
20481
  className: "ps-bp-back-btn",
20525
20482
  onClick: onBack,
20526
- style: { fontSize: 13, padding: "10px 6px" },
20483
+ style: { fontSize: 13, padding: "10px 6px", flexShrink: 0 },
20527
20484
  children: [
20528
20485
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-bp-back-arrow", children: "←" }),
20529
20486
  " ",
@@ -20531,7 +20488,6 @@ function SectionDetailView({
20531
20488
  ]
20532
20489
  }
20533
20490
  ),
20534
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { flex: 1 } }),
20535
20491
  onTryOn ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
20536
20492
  "button",
20537
20493
  {
@@ -20539,7 +20495,8 @@ function SectionDetailView({
20539
20495
  onClick: onTryOn,
20540
20496
  disabled: tryOnProcessing,
20541
20497
  style: {
20542
- flex: 1,
20498
+ flex: "1 1 0",
20499
+ minWidth: 0,
20543
20500
  padding: "12px 16px",
20544
20501
  borderRadius: 10,
20545
20502
  background: "var(--ps-accent)",
@@ -20553,7 +20510,8 @@ function SectionDetailView({
20553
20510
  display: "flex",
20554
20511
  alignItems: "center",
20555
20512
  justifyContent: "center",
20556
- gap: 6
20513
+ gap: 6,
20514
+ whiteSpace: "nowrap"
20557
20515
  },
20558
20516
  children: [
20559
20517
  /* @__PURE__ */ jsxRuntimeExports.jsx(CameraIcon$1, { size: 14 }),
@@ -20566,7 +20524,8 @@ function SectionDetailView({
20566
20524
  type: "button",
20567
20525
  onClick: onBack,
20568
20526
  style: {
20569
- flex: 1,
20527
+ flex: "1 1 0",
20528
+ minWidth: 0,
20570
20529
  padding: "12px 16px",
20571
20530
  borderRadius: 10,
20572
20531
  background: "var(--ps-accent)",
@@ -20579,7 +20538,8 @@ function SectionDetailView({
20579
20538
  display: "flex",
20580
20539
  alignItems: "center",
20581
20540
  justifyContent: "center",
20582
- gap: 6
20541
+ gap: 6,
20542
+ whiteSpace: "nowrap"
20583
20543
  },
20584
20544
  children: [
20585
20545
  continueLabel || t2("Continue"),
@@ -24788,6 +24748,46 @@ function ResultView({ setView }) {
24788
24748
  }, []);
24789
24749
  return null;
24790
24750
  }
24751
+ function RulerIcon() {
24752
+ 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: [
24753
+ /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M3 17l6 6 12-12-6-6z" }),
24754
+ /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M9 11l2 2M11 9l2 2M13 7l2 2M7 13l2 2" })
24755
+ ] });
24756
+ }
24757
+ function ScanIcon() {
24758
+ 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: [
24759
+ /* @__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" }),
24760
+ /* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "12", cy: "12", r: "3" })
24761
+ ] });
24762
+ }
24763
+ function MobileBottomTabs({ mode, onSwitchToManual, onSwitchToScan, t: t2 }) {
24764
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bpm-bottom-tabs", children: [
24765
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
24766
+ "button",
24767
+ {
24768
+ type: "button",
24769
+ className: `ps-bpm-bottom-tab${mode === "manual" ? " ps-active" : ""}`,
24770
+ onClick: onSwitchToManual,
24771
+ children: [
24772
+ /* @__PURE__ */ jsxRuntimeExports.jsx(RulerIcon, {}),
24773
+ t2("MANUAL FIT")
24774
+ ]
24775
+ }
24776
+ ),
24777
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
24778
+ "button",
24779
+ {
24780
+ type: "button",
24781
+ className: `ps-bpm-bottom-tab${mode === "scan" ? " ps-active" : ""}`,
24782
+ onClick: onSwitchToScan,
24783
+ children: [
24784
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ScanIcon, {}),
24785
+ t2("AI SCAN")
24786
+ ]
24787
+ }
24788
+ )
24789
+ ] });
24790
+ }
24791
24791
  function CameraSmallIcon({ size = 16 }) {
24792
24792
  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
24793
  /* @__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.137",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",