@primestyleai/tryon 2.0.5 → 2.0.6

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.
@@ -24,4 +24,4 @@ export interface PrimeStyleTryonProps {
24
24
  code?: string;
25
25
  }) => void;
26
26
  }
27
- export declare function PrimeStyleTryon({ productImage, productTitle, buttonText, apiUrl, showPoweredBy, buttonStyles: btnS, modalStyles: mdlS, classNames: cn, className, style, onOpen, onClose, onUpload, onProcessing, onComplete, onError, }: PrimeStyleTryonProps): import("react/jsx-runtime").JSX.Element;
27
+ export declare function PrimeStyleTryon(props: PrimeStyleTryonProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { jsxs, jsx, Fragment } from "react/jsx-runtime";
3
- import { useState, useRef, useEffect, useMemo, useCallback } from "react";
2
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
3
+ import { useState, useEffect, useRef, useMemo, useCallback } from "react";
4
4
  import { A as ApiClient, S as SseClient, i as isValidImageFile, c as compressImage, P as PrimeStyleError } from "../image-utils-C9bJ1zKO.js";
5
5
  function cx(base, override) {
6
6
  return override ? `${base} ${override}` : base;
@@ -154,7 +154,15 @@ function getApiKey() {
154
154
  function getApiUrl(override) {
155
155
  return override || process.env.NEXT_PUBLIC_PRIMESTYLE_API_URL || "https://myaifitting.com";
156
156
  }
157
- function PrimeStyleTryon({
157
+ function PrimeStyleTryon(props) {
158
+ const [mounted, setMounted] = useState(false);
159
+ useEffect(() => {
160
+ setMounted(true);
161
+ }, []);
162
+ if (!mounted) return null;
163
+ return /* @__PURE__ */ jsx(PrimeStyleTryonInner, { ...props });
164
+ }
165
+ function PrimeStyleTryonInner({
158
166
  productImage,
159
167
  productTitle = "Product",
160
168
  buttonText = "Virtual Try-On",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primestyleai/tryon",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",