@primestyleai/tryon 5.10.88 → 5.10.89

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.
@@ -4,8 +4,13 @@ import type { TranslateFn } from "../../i18n";
4
4
  * product (no merchant CSV uploaded, no inline size guide). The user
5
5
  * still gets a polite path forward — skip sizing entirely and try the
6
6
  * product on visually.
7
+ *
8
+ * Desktop layout: split — product image left, message + CTAs right.
9
+ * Mobile layout: stacked — image on top, text + CTAs below.
7
10
  */
8
- export declare function NoChartView({ onTryOn, onClose, t, }: {
11
+ export declare function NoChartView({ productImage, productTitle, onTryOn, onClose, t, }: {
12
+ productImage?: string;
13
+ productTitle?: string;
9
14
  onTryOn: () => void;
10
15
  onClose: () => void;
11
16
  t: TranslateFn;
@@ -12880,46 +12880,71 @@ const STYLES$1 = `
12880
12880
  /* ──────────────────────────────────────────────
12881
12881
  NoChartView — empty state when the merchant
12882
12882
  hasn't uploaded a size chart for this product.
12883
+ Desktop: split (image left, panel right).
12884
+ Mobile: stacked (image top, panel bottom).
12883
12885
  ────────────────────────────────────────────── */
12884
12886
  .ps-tryon-no-chart {
12887
+ display: flex; align-items: stretch;
12888
+ gap: 1.2vw;
12889
+ padding: 1.5vw;
12890
+ width: 100%;
12891
+ min-height: 28vw;
12892
+ }
12893
+ .ps-tryon-no-chart-image {
12894
+ flex: 1 1 50%;
12895
+ min-width: 0;
12896
+ border-radius: 0.5vw;
12897
+ overflow: hidden;
12898
+ background: var(--ps-bg-tertiary, #f3f4f6);
12899
+ display: flex; align-items: center; justify-content: center;
12900
+ }
12901
+ .ps-tryon-no-chart-image-img {
12902
+ width: 100%; height: 100%;
12903
+ object-fit: contain;
12904
+ display: block;
12905
+ }
12906
+ .ps-tryon-no-chart-panel {
12907
+ flex: 1 1 50%;
12885
12908
  display: flex; flex-direction: column;
12886
- align-items: center; justify-content: center;
12887
- text-align: center;
12888
- padding: 32px 24px;
12889
- max-width: 460px; margin: 0 auto;
12890
- min-height: 60vh;
12891
- gap: 16px;
12909
+ align-items: flex-start; justify-content: center;
12910
+ gap: 0.8vw;
12911
+ padding: 0.6vw 1vw;
12912
+ min-width: 0;
12892
12913
  }
12893
12914
  .ps-tryon-no-chart-icon {
12894
- width: 72px; height: 72px;
12915
+ width: 3.2vw; height: 3.2vw;
12916
+ min-width: 48px; min-height: 48px;
12895
12917
  display: flex; align-items: center; justify-content: center;
12896
12918
  border-radius: 50%;
12897
12919
  background: var(--ps-bg-tertiary, #f3f4f6);
12898
12920
  color: var(--ps-text-secondary);
12899
12921
  }
12922
+ .ps-tryon-no-chart-icon svg {
12923
+ width: 60%; height: 60%;
12924
+ }
12900
12925
  .ps-tryon-no-chart-title {
12901
- font-size: 18px; font-weight: 700;
12926
+ font-size: 1.1vw; font-weight: 700;
12902
12927
  color: var(--ps-text-primary);
12903
- margin: 4px 0 0;
12928
+ margin: 0;
12929
+ line-height: 1.25;
12904
12930
  }
12905
12931
  .ps-tryon-no-chart-msg {
12906
- font-size: 13px; line-height: 1.55;
12932
+ font-size: 0.72vw; line-height: 1.55;
12907
12933
  color: var(--ps-text-secondary);
12908
12934
  margin: 0;
12909
- max-width: 380px;
12910
12935
  }
12911
12936
  .ps-tryon-no-chart-actions {
12912
12937
  display: flex; flex-direction: column;
12913
- align-items: stretch; gap: 10px;
12914
- width: 100%; max-width: 320px;
12915
- margin-top: 8px;
12938
+ align-items: stretch; gap: 0.5vw;
12939
+ width: 100%; max-width: 22vw;
12940
+ margin-top: 0.4vw;
12916
12941
  }
12917
12942
  .ps-tryon-no-chart-cta {
12918
12943
  background: var(--ps-accent); color: #FFFFFF;
12919
- border: none; border-radius: 10px;
12920
- padding: 14px 18px;
12944
+ border: none; border-radius: 0.5vw;
12945
+ padding: 0.8vw 1vw;
12921
12946
  font-family: inherit;
12922
- font-size: 13px; font-weight: 700;
12947
+ font-size: 0.78vw; font-weight: 700;
12923
12948
  letter-spacing: 0.04em;
12924
12949
  cursor: pointer;
12925
12950
  transition: opacity 0.15s, transform 0.15s;
@@ -12928,10 +12953,10 @@ const STYLES$1 = `
12928
12953
  .ps-tryon-no-chart-secondary {
12929
12954
  background: transparent; color: var(--ps-text-secondary);
12930
12955
  border: 1px solid var(--ps-border-color);
12931
- border-radius: 10px;
12932
- padding: 12px 18px;
12956
+ border-radius: 0.5vw;
12957
+ padding: 0.7vw 1vw;
12933
12958
  font-family: inherit;
12934
- font-size: 12px; font-weight: 600;
12959
+ font-size: 0.7vw; font-weight: 600;
12935
12960
  cursor: pointer;
12936
12961
  transition: background 0.15s;
12937
12962
  }
@@ -13183,6 +13208,37 @@ const STYLES$1 = `
13183
13208
  px-based sizing (vw becomes sub-pixel and unreadable on phones)
13184
13209
  ════════════════════════════════════════════════════════════════ */
13185
13210
  @media (max-width: 768px) {
13211
+ /* NoChartView mobile — stack image on top, panel below. */
13212
+ .ps-tryon-no-chart {
13213
+ flex-direction: column !important;
13214
+ gap: 16px !important;
13215
+ padding: 16px !important;
13216
+ min-height: 0 !important;
13217
+ }
13218
+ .ps-tryon-no-chart-image {
13219
+ flex: 0 0 auto !important;
13220
+ width: 100% !important;
13221
+ max-height: 38vh !important;
13222
+ border-radius: 12px !important;
13223
+ }
13224
+ .ps-tryon-no-chart-image-img {
13225
+ max-height: 38vh !important; width: auto !important; max-width: 100% !important;
13226
+ }
13227
+ .ps-tryon-no-chart-panel {
13228
+ flex: 1 1 auto !important;
13229
+ align-items: center !important; justify-content: flex-start !important;
13230
+ text-align: center !important;
13231
+ gap: 12px !important;
13232
+ padding: 4px 8px !important;
13233
+ }
13234
+ .ps-tryon-no-chart-icon { width: 56px !important; height: 56px !important; min-width: 56px !important; min-height: 56px !important; }
13235
+ .ps-tryon-no-chart-icon svg { width: 28px !important; height: 28px !important; }
13236
+ .ps-tryon-no-chart-title { font-size: 18px !important; text-align: center !important; }
13237
+ .ps-tryon-no-chart-msg { font-size: 13px !important; text-align: center !important; max-width: 360px !important; margin: 0 auto !important; }
13238
+ .ps-tryon-no-chart-actions { max-width: 320px !important; gap: 10px !important; margin-top: 4px !important; }
13239
+ .ps-tryon-no-chart-cta { padding: 14px 18px !important; font-size: 13px !important; border-radius: 10px !important; }
13240
+ .ps-tryon-no-chart-secondary { padding: 12px 18px !important; font-size: 12px !important; border-radius: 10px !important; }
13241
+
13186
13242
  /* ── Trigger button: minimum 44px touch target, readable text ── */
13187
13243
  .ps-tryon-btn {
13188
13244
  padding: max(12px, 3vw) max(20px, 5vw); font-size: max(14px, 3.6vw); gap: max(8px, 2vw);
@@ -21748,23 +21804,28 @@ function ErrorView({
21748
21804
  ] });
21749
21805
  }
21750
21806
  function NoChartView({
21807
+ productImage,
21808
+ productTitle,
21751
21809
  onTryOn,
21752
21810
  onClose,
21753
21811
  t: t2
21754
21812
  }) {
21755
21813
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-tryon-no-chart", children: [
21756
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-tryon-no-chart-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { viewBox: "0 0 24 24", width: "44", height: "44", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
21757
- /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M3 17l6 6 12-12-6-6L3 17z" }),
21758
- /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M14 4l-3 3M16 6l-2 2M18 8l-2 2M11 7l-2 2M13 9l-2 2M15 11l-2 2" })
21759
- ] }) }),
21760
- /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "ps-tryon-no-chart-title", children: t2("No size chart available") }),
21761
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "ps-tryon-no-chart-msg", children: t2("The merchant hasn't uploaded sizing data for this product yet. You can still see how it looks on you with a virtual try-on.") }),
21762
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-tryon-no-chart-actions", children: [
21763
- /* @__PURE__ */ jsxRuntimeExports.jsxs("button", { type: "button", className: "ps-tryon-no-chart-cta", onClick: onTryOn, children: [
21764
- t2("See how it looks on you"),
21765
- " "
21766
- ] }),
21767
- /* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", className: "ps-tryon-no-chart-secondary", onClick: onClose, children: t2("Continue Shopping") })
21814
+ productImage && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-tryon-no-chart-image", children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: productImage, alt: productTitle || "", className: "ps-tryon-no-chart-image-img" }) }),
21815
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-tryon-no-chart-panel", children: [
21816
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-tryon-no-chart-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { viewBox: "0 0 24 24", width: "44", height: "44", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
21817
+ /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M3 17l6 6 12-12-6-6L3 17z" }),
21818
+ /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M14 4l-3 3M16 6l-2 2M18 8l-2 2M11 7l-2 2M13 9l-2 2M15 11l-2 2" })
21819
+ ] }) }),
21820
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "ps-tryon-no-chart-title", children: t2("No size chart available") }),
21821
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "ps-tryon-no-chart-msg", children: t2("The merchant hasn't uploaded sizing data for this product yet. You can still see how it looks on you with a virtual try-on.") }),
21822
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-tryon-no-chart-actions", children: [
21823
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("button", { type: "button", className: "ps-tryon-no-chart-cta", onClick: onTryOn, children: [
21824
+ t2("See how it looks on you"),
21825
+ " "
21826
+ ] }),
21827
+ /* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", className: "ps-tryon-no-chart-secondary", onClick: onClose, children: t2("Continue Shopping") })
21828
+ ] })
21768
21829
  ] })
21769
21830
  ] });
21770
21831
  }
@@ -28844,6 +28905,8 @@ function PrimeStyleTryonInner({
28844
28905
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ps-tryon-view-enter", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
28845
28906
  NoChartView,
28846
28907
  {
28908
+ productImage,
28909
+ productTitle,
28847
28910
  onTryOn: () => setView("upload"),
28848
28911
  onClose: onClose ?? (() => {
28849
28912
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primestyleai/tryon",
3
- "version": "5.10.88",
3
+ "version": "5.10.89",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",