@primestyleai/tryon 5.10.191 → 5.10.193

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.
@@ -9836,23 +9836,34 @@ async function loadMediaPipe() {
9836
9836
  if (poseLandmarker) return;
9837
9837
  if (loadingPromise$1) return loadingPromise$1;
9838
9838
  loadingPromise$1 = (async () => {
9839
- const vision = await import(
9840
- /* webpackIgnore: true */
9841
- // @ts-ignore dynamic CDN import
9842
- "https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.33/vision_bundle.mjs"
9843
- );
9844
- const { FilesetResolver, PoseLandmarker } = vision;
9845
- const filesetResolver = await FilesetResolver.forVisionTasks(
9846
- "https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.33/wasm"
9847
- );
9848
- poseLandmarker = await PoseLandmarker.createFromOptions(filesetResolver, {
9849
- baseOptions: {
9850
- modelAssetPath: "https://storage.googleapis.com/mediapipe-models/pose_landmarker/pose_landmarker_lite/float16/1/pose_landmarker_lite.task",
9851
- delegate: "GPU"
9852
- },
9853
- runningMode: "IMAGE",
9854
- numPoses: 1
9855
- });
9839
+ try {
9840
+ const vision = await import(
9841
+ /* webpackIgnore: true */
9842
+ // @ts-ignore dynamic CDN import
9843
+ "https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.33/vision_bundle.mjs"
9844
+ );
9845
+ const { FilesetResolver, PoseLandmarker } = vision;
9846
+ const filesetResolver = await FilesetResolver.forVisionTasks(
9847
+ "https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.33/wasm"
9848
+ );
9849
+ const createPoseLandmarker = async (delegate) => PoseLandmarker.createFromOptions(filesetResolver, {
9850
+ baseOptions: {
9851
+ modelAssetPath: "https://storage.googleapis.com/mediapipe-models/pose_landmarker/pose_landmarker_lite/float16/1/pose_landmarker_lite.task",
9852
+ delegate
9853
+ },
9854
+ runningMode: "IMAGE",
9855
+ numPoses: 1
9856
+ });
9857
+ try {
9858
+ poseLandmarker = await createPoseLandmarker("GPU");
9859
+ } catch (gpuErr) {
9860
+ console.warn("[PS-SDK:MediaPipe] GPU delegate failed, retrying with CPU delegate:", gpuErr);
9861
+ poseLandmarker = await createPoseLandmarker("CPU");
9862
+ }
9863
+ } catch (err) {
9864
+ loadingPromise$1 = null;
9865
+ throw err;
9866
+ }
9856
9867
  })();
9857
9868
  return loadingPromise$1;
9858
9869
  }
@@ -10047,19 +10058,28 @@ async function loadFaceLandmarker() {
10047
10058
  "https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.33/wasm"
10048
10059
  );
10049
10060
  console.log(`[PS-SDK:FaceDetect] WASM resolver ready in ${Math.round(performance.now() - t1)}ms`);
10050
- console.log("[PS-SDK:FaceDetect] creating FaceLandmarker (GPU delegate, model=latest)…");
10051
- const t2 = performance.now();
10052
- faceLandmarker = await FaceLandmarker.createFromOptions(filesetResolver, {
10053
- baseOptions: {
10054
- modelAssetPath: "https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/latest/face_landmarker.task",
10055
- delegate: "GPU"
10056
- },
10057
- runningMode: "IMAGE",
10058
- numFaces: 1,
10059
- outputFaceBlendshapes: false,
10060
- outputFacialTransformationMatrixes: false
10061
- });
10062
- console.log(`[PS-SDK:FaceDetect] FaceLandmarker ready in ${Math.round(performance.now() - t2)}ms`);
10061
+ const createFaceLandmarker = async (delegate) => {
10062
+ console.log(`[PS-SDK:FaceDetect] creating FaceLandmarker (${delegate} delegate, model=latest)…`);
10063
+ const t2 = performance.now();
10064
+ const instance = await FaceLandmarker.createFromOptions(filesetResolver, {
10065
+ baseOptions: {
10066
+ modelAssetPath: "https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/latest/face_landmarker.task",
10067
+ delegate
10068
+ },
10069
+ runningMode: "IMAGE",
10070
+ numFaces: 1,
10071
+ outputFaceBlendshapes: false,
10072
+ outputFacialTransformationMatrixes: false
10073
+ });
10074
+ console.log(`[PS-SDK:FaceDetect] FaceLandmarker ready with ${delegate} delegate in ${Math.round(performance.now() - t2)}ms`);
10075
+ return instance;
10076
+ };
10077
+ try {
10078
+ faceLandmarker = await createFaceLandmarker("GPU");
10079
+ } catch (gpuErr) {
10080
+ console.warn("[PS-SDK:FaceDetect] GPU delegate failed, retrying with CPU delegate:", gpuErr);
10081
+ faceLandmarker = await createFaceLandmarker("CPU");
10082
+ }
10063
10083
  } catch (err) {
10064
10084
  console.error("[PS-SDK:FaceDetect] loadFaceLandmarker FAILED:", err);
10065
10085
  loadingPromise = null;
@@ -22844,6 +22864,240 @@ const STYLES = `
22844
22864
  padding: 6px !important;
22845
22865
  }
22846
22866
  }
22867
+
22868
+ /* Final mobile ergonomics patch: keep body-detail inputs readable, keep
22869
+ commerce CTAs from crowding, and give feedback a real mobile sheet. */
22870
+ @media (max-width: 768px) {
22871
+ .ps-bp-scan-details-title {
22872
+ margin: 4px 0 0 !important;
22873
+ }
22874
+ .ps-bp-scan-details-sub {
22875
+ margin: 4px 0 0 !important;
22876
+ }
22877
+ .ps-bp-scan-details-center:not(.ps-shoe-scan-details) .ps-bp-system-toggle,
22878
+ .ps-bp-photo-details-head .ps-bp-system-toggle,
22879
+ .ps-bp-system-toggle.ps-bp-system-toggle-compact {
22880
+ margin: 6px auto 8px !important;
22881
+ gap: 14px !important;
22882
+ }
22883
+ .ps-bp-photo-details-head {
22884
+ align-items: flex-start !important;
22885
+ gap: 8px !important;
22886
+ padding-bottom: 8px !important;
22887
+ }
22888
+ .ps-bp-photo-details-head h3 {
22889
+ font-size: 16px !important;
22890
+ line-height: 1.2 !important;
22891
+ padding-top: 3px !important;
22892
+ }
22893
+ .ps-bp-inline-fields {
22894
+ padding-top: 4px !important;
22895
+ padding-bottom: 14px !important;
22896
+ }
22897
+ .ps-bp-inline-row {
22898
+ display: grid !important;
22899
+ grid-template-columns: minmax(72px, 0.34fr) minmax(0, 1fr) !important;
22900
+ align-items: center !important;
22901
+ gap: 14px !important;
22902
+ padding: 16px 0 !important;
22903
+ min-height: 66px !important;
22904
+ }
22905
+ .ps-bp-inline-label {
22906
+ flex-basis: auto !important;
22907
+ min-width: 0 !important;
22908
+ font-size: 11px !important;
22909
+ letter-spacing: 0.13em !important;
22910
+ }
22911
+ .ps-bp-inline-input-group {
22912
+ display: grid !important;
22913
+ grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto !important;
22914
+ align-items: end !important;
22915
+ gap: 8px !important;
22916
+ min-width: 0 !important;
22917
+ width: 100% !important;
22918
+ }
22919
+ .ps-bp-inline-row:not(:first-child) .ps-bp-inline-input-group,
22920
+ .ps-bp-inline-row .ps-bp-inline-input-group:has(input:only-child) {
22921
+ grid-template-columns: minmax(0, 1fr) auto !important;
22922
+ }
22923
+ .ps-bp-inline-input {
22924
+ min-height: 34px !important;
22925
+ font-size: 20px !important;
22926
+ line-height: 1.2 !important;
22927
+ padding-bottom: 7px !important;
22928
+ text-align: left !important;
22929
+ }
22930
+ .ps-bp-inline-unit {
22931
+ align-self: center !important;
22932
+ font-size: 12px !important;
22933
+ line-height: 1 !important;
22934
+ padding-bottom: 8px !important;
22935
+ }
22936
+
22937
+ .ps-msr-bottom,
22938
+ .ps-msd-actions {
22939
+ padding-top: 9px !important;
22940
+ padding-bottom: calc(9px + env(safe-area-inset-bottom)) !important;
22941
+ height: auto !important;
22942
+ min-height: 0 !important;
22943
+ }
22944
+ .ps-tryon-v2-result-actions {
22945
+ display: grid !important;
22946
+ grid-template-columns: auto minmax(0, 1fr) !important;
22947
+ align-items: end !important;
22948
+ gap: 10px !important;
22949
+ min-height: 0 !important;
22950
+ padding-top: 10px !important;
22951
+ padding-bottom: calc(10px + env(safe-area-inset-bottom)) !important;
22952
+ }
22953
+ .ps-tryon-v2-result-actions > .ps-tryon-v2-action-group,
22954
+ .ps-tryon-v2-result-actions > .ps-tryon-v2-cta {
22955
+ width: 100% !important;
22956
+ max-width: none !important;
22957
+ flex: 1 1 auto !important;
22958
+ margin-left: 0 !important;
22959
+ }
22960
+ .ps-msr-bottom-row,
22961
+ .ps-tryon-v2-action-group,
22962
+ .ps-msd-result-action-group {
22963
+ display: grid !important;
22964
+ grid-template-columns: minmax(0, 1fr) !important;
22965
+ gap: 9px !important;
22966
+ align-items: stretch !important;
22967
+ width: 100% !important;
22968
+ }
22969
+ .ps-tryon-v2-action-group-history {
22970
+ display: flex !important;
22971
+ justify-content: flex-end !important;
22972
+ }
22973
+ .ps-tryon-v2-action-group > .ps-tryon-v2-cta,
22974
+ .ps-msr-commerce-row .ps-tryon-v2-cta,
22975
+ .ps-msd-result-action-group .ps-tryon-v2-cta {
22976
+ min-height: 48px !important;
22977
+ padding: 0 14px !important;
22978
+ border-radius: 11px !important;
22979
+ font-size: 13px !important;
22980
+ line-height: 1.15 !important;
22981
+ letter-spacing: 0.045em !important;
22982
+ gap: 8px !important;
22983
+ overflow: visible !important;
22984
+ text-overflow: clip !important;
22985
+ white-space: normal !important;
22986
+ }
22987
+ .ps-tryon-v2-action-group > .ps-tryon-v2-cta span,
22988
+ .ps-msr-commerce-row .ps-tryon-v2-cta span,
22989
+ .ps-msd-result-action-group .ps-tryon-v2-cta span {
22990
+ min-width: 0 !important;
22991
+ overflow: visible !important;
22992
+ text-overflow: clip !important;
22993
+ white-space: normal !important;
22994
+ overflow-wrap: normal !important;
22995
+ }
22996
+ .ps-tryon-v2-add-bag-cta svg,
22997
+ .ps-tryon-v2-history-product-cta svg {
22998
+ width: 20px !important;
22999
+ height: 20px !important;
23000
+ flex: 0 0 auto !important;
23001
+ }
23002
+ .ps-tryon-v2-history-product-cta {
23003
+ width: auto !important;
23004
+ min-height: 42px !important;
23005
+ padding: 0 13px !important;
23006
+ font-size: 12px !important;
23007
+ white-space: nowrap !important;
23008
+ }
23009
+ @media (max-width: 374px) {
23010
+ .ps-msr-bottom-row,
23011
+ .ps-tryon-v2-action-group,
23012
+ .ps-msd-result-action-group {
23013
+ grid-template-columns: 1fr !important;
23014
+ }
23015
+ .ps-tryon-v2-action-group > .ps-tryon-v2-cta,
23016
+ .ps-msr-commerce-row .ps-tryon-v2-cta,
23017
+ .ps-msd-result-action-group .ps-tryon-v2-cta {
23018
+ min-height: 46px !important;
23019
+ font-size: 12px !important;
23020
+ }
23021
+ }
23022
+
23023
+ .ps-tryon-feedback-toggle.ps-mobile {
23024
+ min-height: 36px !important;
23025
+ padding: 0 13px !important;
23026
+ border-radius: 10px !important;
23027
+ font-size: 12px !important;
23028
+ gap: 7px !important;
23029
+ }
23030
+ .ps-tryon-feedback-toggle.ps-mobile svg {
23031
+ width: 16px !important;
23032
+ height: 16px !important;
23033
+ }
23034
+ .ps-tryon-feedback-backdrop.ps-mobile {
23035
+ position: fixed !important;
23036
+ inset: 0 !important;
23037
+ z-index: 2147483000 !important;
23038
+ border: 0 !important;
23039
+ padding: 0 !important;
23040
+ margin: 0 !important;
23041
+ background: rgba(15, 23, 42, 0.24) !important;
23042
+ backdrop-filter: blur(3px) !important;
23043
+ -webkit-backdrop-filter: blur(3px) !important;
23044
+ cursor: pointer !important;
23045
+ }
23046
+ .ps-tryon-feedback.ps-mobile {
23047
+ position: fixed !important;
23048
+ left: 12px !important;
23049
+ right: 12px !important;
23050
+ bottom: calc(12px + env(safe-area-inset-bottom)) !important;
23051
+ width: auto !important;
23052
+ max-width: 520px !important;
23053
+ margin: 0 auto !important;
23054
+ z-index: 2147483001 !important;
23055
+ padding: 16px !important;
23056
+ border-radius: 18px !important;
23057
+ gap: 13px !important;
23058
+ background: #FFFFFF !important;
23059
+ box-shadow: 0 22px 60px rgba(15, 23, 42, 0.28) !important;
23060
+ backdrop-filter: none !important;
23061
+ -webkit-backdrop-filter: none !important;
23062
+ }
23063
+ .ps-tryon-feedback.ps-mobile .ps-tryon-feedback-top {
23064
+ gap: 10px !important;
23065
+ }
23066
+ .ps-tryon-feedback.ps-mobile .ps-tryon-feedback-title {
23067
+ font-size: 16px !important;
23068
+ line-height: 1.2 !important;
23069
+ }
23070
+ .ps-tryon-feedback.ps-mobile .ps-tryon-feedback-close {
23071
+ width: 34px !important;
23072
+ height: 34px !important;
23073
+ }
23074
+ .ps-tryon-feedback.ps-mobile .ps-tryon-feedback-stars {
23075
+ gap: 7px !important;
23076
+ padding-top: 2px !important;
23077
+ }
23078
+ .ps-tryon-feedback.ps-mobile .ps-tryon-feedback-star {
23079
+ width: 32px !important;
23080
+ height: 32px !important;
23081
+ }
23082
+ .ps-tryon-feedback.ps-mobile .ps-tryon-feedback-form {
23083
+ grid-template-columns: 1fr auto !important;
23084
+ gap: 9px !important;
23085
+ align-items: end !important;
23086
+ }
23087
+ .ps-tryon-feedback.ps-mobile .ps-tryon-feedback-note {
23088
+ min-height: 48px !important;
23089
+ max-height: 120px !important;
23090
+ border-radius: 12px !important;
23091
+ font-size: 14px !important;
23092
+ padding: 12px !important;
23093
+ }
23094
+ .ps-tryon-feedback.ps-mobile .ps-tryon-feedback-submit {
23095
+ min-height: 48px !important;
23096
+ padding: 0 16px !important;
23097
+ border-radius: 12px !important;
23098
+ font-size: 13px !important;
23099
+ }
23100
+ }
22847
23101
  `;
22848
23102
  function CameraIcon$1({ size = 18 }) {
22849
23103
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
@@ -24205,7 +24459,7 @@ function TryOnExperienceFeedback({
24205
24459
  }
24206
24460
  );
24207
24461
  }
24208
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `ps-tryon-feedback${isMobile ? " ps-mobile" : ""}`, "aria-label": t2("Rate your try-on"), children: [
24462
+ const feedbackPanel = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `ps-tryon-feedback${isMobile ? " ps-mobile" : ""}`, "aria-label": t2("Rate your try-on"), children: [
24209
24463
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ps-tryon-feedback-top", children: [
24210
24464
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-tryon-feedback-title", children: t2("Rate your try-on") }),
24211
24465
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -24270,6 +24524,21 @@ function TryOnExperienceFeedback({
24270
24524
  ] }),
24271
24525
  status === "error" && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ps-tryon-feedback-status", children: t2("Couldn't send. Try again.") })
24272
24526
  ] });
24527
+ if (isMobile) {
24528
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
24529
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
24530
+ "button",
24531
+ {
24532
+ type: "button",
24533
+ className: "ps-tryon-feedback-backdrop ps-mobile",
24534
+ onClick: () => setExpanded(false),
24535
+ "aria-label": t2("Close")
24536
+ }
24537
+ ),
24538
+ feedbackPanel
24539
+ ] });
24540
+ }
24541
+ return feedbackPanel;
24273
24542
  }
24274
24543
  function ResultImageActionBar({
24275
24544
  showLines,
@@ -26317,7 +26586,7 @@ function SizeResultView({
26317
26586
  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { style: { color: "var(--ps-text-muted)", fontSize: "0.8vw" }, children: t2("Generating your size recommendation...") })
26318
26587
  ] })
26319
26588
  ] }),
26320
- isMobile && isSnapProcessing && !allDone && previewUrl && /* @__PURE__ */ jsxRuntimeExports.jsx(
26589
+ isMobile && isSnapProcessing && previewUrl && /* @__PURE__ */ jsxRuntimeExports.jsx(
26321
26590
  MobileScanningView,
26322
26591
  {
26323
26592
  previewUrl,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primestyleai/tryon",
3
- "version": "5.10.191",
3
+ "version": "5.10.193",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",