@primestyleai/tryon 5.5.25 → 5.5.26

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.
@@ -5791,6 +5791,15 @@ function SizeResultView({
5791
5791
  const [poseLines, setPoseLines] = useState(null);
5792
5792
  const [poseReady, setPoseReady] = useState(false);
5793
5793
  const [imgDims, setImgDims] = useState({ w: 800, h: 1200 });
5794
+ const [analyzingDone, setAnalyzingDone] = useState(false);
5795
+ useEffect(() => {
5796
+ if (!bodyLandmarks) {
5797
+ setAnalyzingDone(false);
5798
+ return;
5799
+ }
5800
+ const id = setTimeout(() => setAnalyzingDone(true), 1800);
5801
+ return () => clearTimeout(id);
5802
+ }, [bodyLandmarks]);
5794
5803
  const handleImgLoad = useCallback((e) => {
5795
5804
  const el = e.currentTarget;
5796
5805
  if (el.naturalWidth && el.naturalHeight) {
@@ -5960,12 +5969,12 @@ function SizeResultView({
5960
5969
  /* @__PURE__ */ jsx("span", { children: t("Detecting body pose") })
5961
5970
  ] }),
5962
5971
  !sizingDone && /* @__PURE__ */ jsxs(Fragment, { children: [
5963
- /* @__PURE__ */ jsxs("div", { className: `ps-tryon-snap-step${bodyLandmarks ? " ps-active" : ""}`, children: [
5964
- /* @__PURE__ */ jsx("div", { className: "ps-tryon-snap-step-icon", children: bodyLandmarks ? /* @__PURE__ */ jsx("div", { className: "ps-tryon-size-loading-spinner", style: { width: "1vw", height: "1vw", borderWidth: "1.5px" } }) : /* @__PURE__ */ jsx("span", { className: "ps-tryon-snap-num", children: "2" }) }),
5972
+ /* @__PURE__ */ jsxs("div", { className: `ps-tryon-snap-step${analyzingDone ? " ps-done" : bodyLandmarks ? " ps-active" : ""}`, children: [
5973
+ /* @__PURE__ */ jsx("div", { className: "ps-tryon-snap-step-icon", children: !bodyLandmarks ? /* @__PURE__ */ jsx("span", { className: "ps-tryon-snap-num", children: "2" }) : !analyzingDone ? /* @__PURE__ */ jsx("div", { className: "ps-tryon-size-loading-spinner", style: { width: "1vw", height: "1vw", borderWidth: "1.5px" } }) : /* @__PURE__ */ jsx("span", { className: "ps-tryon-snap-check", children: "" }) }),
5965
5974
  /* @__PURE__ */ jsx("span", { children: t("Analyzing your size") })
5966
5975
  ] }),
5967
- /* @__PURE__ */ jsxs("div", { className: `ps-tryon-snap-step`, children: [
5968
- /* @__PURE__ */ jsx("div", { className: "ps-tryon-snap-step-icon", children: /* @__PURE__ */ jsx("span", { className: "ps-tryon-snap-num", children: "3" }) }),
5976
+ /* @__PURE__ */ jsxs("div", { className: `ps-tryon-snap-step${analyzingDone ? " ps-active" : ""}`, children: [
5977
+ /* @__PURE__ */ jsx("div", { className: "ps-tryon-snap-step-icon", children: !analyzingDone ? /* @__PURE__ */ jsx("span", { className: "ps-tryon-snap-num", children: "3" }) : /* @__PURE__ */ jsx("div", { className: "ps-tryon-size-loading-spinner", style: { width: "1vw", height: "1vw", borderWidth: "1.5px" } }) }),
5969
5978
  /* @__PURE__ */ jsx("span", { children: t("Finding best fit for you") })
5970
5979
  ] })
5971
5980
  ] }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primestyleai/tryon",
3
- "version": "5.5.25",
3
+ "version": "5.5.26",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",