@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.
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +11 -3
- package/package.json +1 -1
package/dist/react/index.d.ts
CHANGED
|
@@ -24,4 +24,4 @@ export interface PrimeStyleTryonProps {
|
|
|
24
24
|
code?: string;
|
|
25
25
|
}) => void;
|
|
26
26
|
}
|
|
27
|
-
export declare function PrimeStyleTryon(
|
|
27
|
+
export declare function PrimeStyleTryon(props: PrimeStyleTryonProps): import("react/jsx-runtime").JSX.Element | null;
|
package/dist/react/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { useState,
|
|
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",
|