@primestyleai/tryon 5.10.0 → 5.10.1
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.
|
@@ -10265,12 +10265,15 @@ const STYLES$1 = `
|
|
|
10265
10265
|
.ps-tryon-logo-img { height: var(--ps-logo-height); width: auto; }
|
|
10266
10266
|
.ps-tryon-header-actions { display: flex; align-items: center; gap: 0.42vw; }
|
|
10267
10267
|
.ps-tryon-header-icon {
|
|
10268
|
-
|
|
10269
|
-
|
|
10268
|
+
/* Pure vw sizing collapsed to ~8 px on 375 px mobile. Clamp so the icon
|
|
10269
|
+
stays finger-tappable (min 30 px) while scaling up on large screens. */
|
|
10270
|
+
width: clamp(30px, 2.2vw, 34px); height: clamp(30px, 2.2vw, 34px);
|
|
10271
|
+
display: flex; align-items: center; justify-content: center;
|
|
10272
|
+
border: 1.5px solid var(--ps-border-color); border-radius: clamp(6px, 0.52vw, 10px); background: transparent;
|
|
10270
10273
|
cursor: pointer; color: var(--ps-text-secondary); transition: all 0.2s;
|
|
10271
10274
|
}
|
|
10272
10275
|
.ps-tryon-header-icon:hover { border-color: var(--ps-accent); color: var(--ps-accent); }
|
|
10273
|
-
.ps-tryon-header-icon svg { stroke: currentColor; fill: none; width: 0.9vw; height: 0.9vw; }
|
|
10276
|
+
.ps-tryon-header-icon svg { stroke: currentColor; fill: none; width: clamp(14px, 0.9vw, 16px); height: clamp(14px, 0.9vw, 16px); }
|
|
10274
10277
|
.ps-tryon-close {
|
|
10275
10278
|
width: 2.2vw; height: 2.2vw; display: flex; align-items: center; justify-content: center;
|
|
10276
10279
|
background: none; border: none; color: var(--ps-modal-close-color, #999);
|
|
@@ -10318,7 +10321,10 @@ const STYLES$1 = `
|
|
|
10318
10321
|
}
|
|
10319
10322
|
|
|
10320
10323
|
.ps-tryon-lang-list {
|
|
10321
|
-
max
|
|
10324
|
+
/* max(...) picks the larger of the two values so the dropdown is tall
|
|
10325
|
+
enough to scroll through a handful of languages on any viewport.
|
|
10326
|
+
Pure min(18vw, 280px) collapsed to ~67 px on 375 px mobile. */
|
|
10327
|
+
max-height: max(260px, min(18vw, 280px)); overflow-y: auto; padding: clamp(3px, 0.31vw, 5px);
|
|
10322
10328
|
scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.15) transparent;
|
|
10323
10329
|
}
|
|
10324
10330
|
.ps-tryon-lang-item {
|
|
@@ -12711,6 +12717,33 @@ const STYLES$1 = `
|
|
|
12711
12717
|
|
|
12712
12718
|
/* ── Preserve existing previews and modal-wide overrides ── */
|
|
12713
12719
|
.ps-tryon-preview { height: 320px; }
|
|
12720
|
+
|
|
12721
|
+
/* ── Drawer list (history / profiles / settings) ── */
|
|
12722
|
+
/* Pure vw gap (0.52vw = ~2 px on mobile) crushed list rows together. */
|
|
12723
|
+
.ps-tryon-drawer-list { gap: 12px !important; padding: 0 !important; }
|
|
12724
|
+
.ps-tryon-drawer { padding: 16px !important; }
|
|
12725
|
+
|
|
12726
|
+
/* ── Profile cards inside the sizing-profiles drawer ── */
|
|
12727
|
+
.ps-msp-card {
|
|
12728
|
+
padding: 16px !important;
|
|
12729
|
+
border-radius: 14px !important;
|
|
12730
|
+
}
|
|
12731
|
+
.ps-msp-card-tag { font-size: 11px !important; padding: 4px 8px !important; border-radius: 999px !important; }
|
|
12732
|
+
.ps-msp-card-circle { width: 72px !important; height: 72px !important; margin: 8px auto 12px !important; }
|
|
12733
|
+
.ps-msp-card-name { font-size: 16px !important; margin-bottom: 6px !important; }
|
|
12734
|
+
.ps-msp-meta-row { padding: 6px 0 !important; gap: 8px !important; }
|
|
12735
|
+
.ps-msp-card-meta { font-size: 12px !important; }
|
|
12736
|
+
.ps-msp-card-actions { gap: 8px !important; margin-top: 10px !important; }
|
|
12737
|
+
.ps-msp-card-select { font-size: 13px !important; padding: 10px 12px !important; border-radius: 8px !important; }
|
|
12738
|
+
.ps-msp-card-edit, .ps-msp-card-delete { width: 36px !important; height: 36px !important; border-radius: 8px !important; }
|
|
12739
|
+
.ps-msp-card-create { min-height: 120px !important; font-size: 14px !important; }
|
|
12740
|
+
|
|
12741
|
+
/* ── Language switcher dropdown ── */
|
|
12742
|
+
/* Default min(18vw, 280px) collapsed to ~67 px on mobile — unusable. */
|
|
12743
|
+
.ps-tryon-lang-list { max-height: 320px !important; }
|
|
12744
|
+
.ps-tryon-lang-item { padding: 10px 14px !important; gap: 10px !important; }
|
|
12745
|
+
.ps-tryon-lang-name { font-size: 14px !important; }
|
|
12746
|
+
.ps-tryon-lang-code { font-size: 11px !important; }
|
|
12714
12747
|
}
|
|
12715
12748
|
|
|
12716
12749
|
@keyframes ps-mobile-slide-up {
|
|
@@ -23755,7 +23788,14 @@ function PrimeStyleTryonInner({
|
|
|
23755
23788
|
}
|
|
23756
23789
|
}, [apiUrl, sizingMethod, sizingCountry, heightUnit, weightUnit, sizingUnit, sizeGuide, productTitle, dynamicFields, persistResultToProfile]);
|
|
23757
23790
|
const handleQuickEstimate = reactExports.useCallback(async (height, weight, heightUnit2, weightUnit2, gender, age, bodyType, chestProfile, midsectionProfile, hipProfile, bodyImage) => {
|
|
23758
|
-
if (!apiRef.current)
|
|
23791
|
+
if (!apiRef.current) {
|
|
23792
|
+
const msg = t2("SDK not configured. Please refresh and try again.");
|
|
23793
|
+
console.warn("[ps-sdk] handleQuickEstimate BAILED — apiRef is null. API key not loaded.");
|
|
23794
|
+
setErrorMessage(msg);
|
|
23795
|
+
setView("error");
|
|
23796
|
+
onError?.({ message: msg, code: "SDK_NOT_CONFIGURED" });
|
|
23797
|
+
return;
|
|
23798
|
+
}
|
|
23759
23799
|
getApiUrl(apiUrl);
|
|
23760
23800
|
getApiKey();
|
|
23761
23801
|
const SKIP_ESTIMATE_KEYS = /* @__PURE__ */ new Set(["weight", "weightKg", "height", "heightCm"]);
|
|
@@ -23812,7 +23852,11 @@ function PrimeStyleTryonInner({
|
|
|
23812
23852
|
apiUrl
|
|
23813
23853
|
});
|
|
23814
23854
|
if (!apiRef.current || !sseRef.current) {
|
|
23855
|
+
const msg = t2("SDK not configured. Please refresh and try again.");
|
|
23815
23856
|
console.warn("[ps-sdk] handleSnapSubmit BAILED — apiRef or sseRef is null. Check api init.");
|
|
23857
|
+
setErrorMessage(msg);
|
|
23858
|
+
setView("error");
|
|
23859
|
+
onError?.({ message: msg, code: "SDK_NOT_CONFIGURED" });
|
|
23816
23860
|
return;
|
|
23817
23861
|
}
|
|
23818
23862
|
const baseUrl = getApiUrl(apiUrl);
|