@primestyleai/tryon 5.10.180 → 5.10.182

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.
@@ -12738,7 +12738,7 @@ const STYLES = `
12738
12738
  }
12739
12739
 
12740
12740
  /* ── Product photo strip (single-garment, below the size card) ──
12741
- Three thumbnails per slide, evenly spaced, auto-advances. Lives at
12741
+ Two thumbnails per row, evenly spaced, auto-advances. Lives at
12742
12742
  the bottom of the right panel as decoration / entertainment. */
12743
12743
  .ps-tryon-photo-strip {
12744
12744
  margin-top: 0.65vw;
@@ -12757,12 +12757,13 @@ const STYLES = `
12757
12757
  }
12758
12758
  .ps-tryon-photo-strip-row {
12759
12759
  display: grid;
12760
- grid-template-columns: repeat(3, 1fr);
12760
+ grid-template-columns: repeat(2, minmax(0, 1fr));
12761
12761
  gap: 0.45vw;
12762
12762
  animation: ps-tryon-photo-strip-fade 0.5s ease;
12763
12763
  }
12764
- .ps-tryon-photo-strip-row.ps-count-1 .ps-tryon-photo-strip-cell {
12765
- grid-column: 2;
12764
+ .ps-tryon-photo-strip-row.ps-count-1 {
12765
+ grid-template-columns: minmax(0, calc((100% - 0.45vw) / 2));
12766
+ justify-content: center;
12766
12767
  }
12767
12768
  .ps-tryon-photo-strip-cell {
12768
12769
  position: relative;
@@ -12822,6 +12823,9 @@ const STYLES = `
12822
12823
  .ps-tryon-photo-strip-row {
12823
12824
  gap: 8px;
12824
12825
  }
12826
+ .ps-tryon-photo-strip-row.ps-count-1 {
12827
+ grid-template-columns: minmax(0, calc((100% - 8px) / 2));
12828
+ }
12825
12829
  .ps-tryon-photo-strip-cell {
12826
12830
  aspect-ratio: 1 / 1; border-radius: 12px;
12827
12831
  }
@@ -22435,7 +22439,7 @@ function MultiSectionMobile({
22435
22439
  sizeGuide ? null : null
22436
22440
  ] });
22437
22441
  }
22438
- const PER_SLIDE = 3;
22442
+ const PER_SLIDE = 2;
22439
22443
  const CYCLE_MS = 4e3;
22440
22444
  function ProductPhotoCarouselCard({
22441
22445
  photos,
@@ -28186,9 +28190,18 @@ function MySizingProfilesView({
28186
28190
  t: t2,
28187
28191
  onRegisterBackInterceptor
28188
28192
  }) {
28189
- const [creating, setCreating] = reactExports.useState(false);
28193
+ const [creating, setCreating] = reactExports.useState(() => !!initialCreateDraft);
28190
28194
  const [viewingId, setViewingId] = reactExports.useState(null);
28195
+ const handledDraftKeyRef = reactExports.useRef(initialCreateDraft?.createdAt ?? null);
28191
28196
  const viewingProfile = viewingId ? profiles.find((p2) => p2.id === viewingId) || null : null;
28197
+ reactExports.useEffect(() => {
28198
+ if (!initialCreateDraft) return;
28199
+ const draftKey = initialCreateDraft.createdAt ?? "draft";
28200
+ if (handledDraftKeyRef.current === draftKey && creating) return;
28201
+ handledDraftKeyRef.current = draftKey;
28202
+ setViewingId(null);
28203
+ setCreating(true);
28204
+ }, [creating, initialCreateDraft]);
28192
28205
  reactExports.useEffect(() => {
28193
28206
  if (viewingId && !profiles.find((p2) => p2.id === viewingId)) {
28194
28207
  setViewingId(null);
@@ -30005,7 +30018,7 @@ function BodyProfileView({
30005
30018
  ] }) }),
30006
30019
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bpm-bottom", children: [
30007
30020
  /* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", className: "ps-bpm-next-btn", onClick: handleNext, children: isShoeReferenceMode ? t2(!shoeBrandId ? "Choose brand" : !shoeSizeValue ? "Choose size" : "Analyze My Size") : t2("Analyze My Size") }),
30008
- !simplePhotoOnly && /* @__PURE__ */ jsxRuntimeExports.jsx(
30021
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
30009
30022
  MobileBottomTabs,
30010
30023
  {
30011
30024
  mode: "scan",
@@ -30072,9 +30085,7 @@ function BodyProfileView({
30072
30085
  handlePhotoSelect,
30073
30086
  handleRemovePhoto,
30074
30087
  onAnalyze: handleNext,
30075
- onSwitchToManual: () => {
30076
- if (!simplePhotoOnly) setStep("basics");
30077
- },
30088
+ onSwitchToManual: () => setStep("basics"),
30078
30089
  error,
30079
30090
  photoStepHeight,
30080
30091
  onPhotoStepHeightChange: setPhotoStepHeight,
@@ -30089,7 +30100,7 @@ function BodyProfileView({
30089
30100
  photoStatus,
30090
30101
  photoRejection,
30091
30102
  onClearRejection: () => setPhotoRejection(null),
30092
- hideTabs: simplePhotoOnly,
30103
+ hideTabs: false,
30093
30104
  t: t2
30094
30105
  }
30095
30106
  ),
@@ -30681,7 +30692,7 @@ function BodyProfileView({
30681
30692
  )
30682
30693
  ] })
30683
30694
  ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
30684
- !simplePhotoOnly && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bp-photo-manual-switch", children: [
30695
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-bp-photo-manual-switch", children: [
30685
30696
  t2("Prefer not to upload a photo?"),
30686
30697
  " ",
30687
30698
  /* @__PURE__ */ jsxRuntimeExports.jsx(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primestyleai/tryon",
3
- "version": "5.10.180",
3
+ "version": "5.10.182",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",