@wewear/virtual-try-on 1.4.1 → 1.4.3

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/camera.d.ts CHANGED
@@ -1,3 +1,10 @@
1
- export declare function startCamera(video: HTMLVideoElement, loadingIndicator: HTMLElement, captureButton: HTMLButtonElement): Promise<void>;
1
+ export declare function startCamera(
2
+ video: HTMLVideoElement,
3
+ loadingIndicator: HTMLElement,
4
+ captureButton: HTMLButtonElement,
5
+ ): Promise<void>;
2
6
  export declare function stopCamera(video: HTMLVideoElement): void;
3
- export declare function captureImageFromVideo(video: HTMLVideoElement, canvas: HTMLCanvasElement): Promise<Blob>;
7
+ export declare function captureImageFromVideo(
8
+ video: HTMLVideoElement,
9
+ canvas: HTMLCanvasElement,
10
+ ): Promise<Blob>;
@@ -1,4 +1,7 @@
1
1
  export interface CameraModalCallbacks {
2
- onCapture: (video: HTMLVideoElement, canvas: HTMLCanvasElement) => Promise<void>;
2
+ onCapture: (
3
+ video: HTMLVideoElement,
4
+ canvas: HTMLCanvasElement,
5
+ ) => Promise<void>;
3
6
  }
4
7
  export declare function showCameraModal(callbacks: CameraModalCallbacks): void;
@@ -1,3 +1,3 @@
1
+ export { createPreviewBadge } from "./badge.js";
1
2
  export { createButton, createButtonContainer } from "./button.js";
2
3
  export { removeProductLoading, showProductLoading, } from "./loading-overlay.js";
3
- export { createPreviewBadge } from "./badge.js";
@@ -1,5 +1,8 @@
1
1
  export interface ReviewModalCallbacks {
2
- onRetake: () => void;
3
- onAccept: (imageBlob: Blob) => Promise<void>;
2
+ onRetake: () => void;
3
+ onAccept: (imageBlob: Blob) => Promise<void>;
4
4
  }
5
- export declare function showReviewModal(imageBlob: Blob, callbacks: ReviewModalCallbacks): void;
5
+ export declare function showReviewModal(
6
+ imageBlob: Blob,
7
+ callbacks: ReviewModalCallbacks,
8
+ ): void;
package/dist/index.d.ts CHANGED
@@ -1,10 +1,20 @@
1
+ /**
2
+ * Button position options for the VTO widget
3
+ */
4
+ export type ButtonPosition = "bottom-right" | "bottom-left" | "top-right" | "top-left";
5
+ /**
6
+ * Configuration interface for the Virtual Try-On widget
7
+ */
1
8
  export interface VirtualTryOnConfig {
2
9
  baseUrl: string;
3
10
  productPageSelector: string;
4
11
  gallerySelector: string;
5
12
  productImageSelector: string;
6
- buttonPosition: "bottom-right" | "bottom-left" | "top-right" | "top-left";
13
+ buttonPosition: ButtonPosition;
7
14
  }
15
+ /**
16
+ * Result interface for virtual try-on operations
17
+ */
8
18
  export interface VirtualTryOnResult {
9
19
  imageUrl: string | null;
10
20
  error?: {