@wewear/virtual-try-on 1.4.0 → 1.4.1
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/api.d.ts +7 -1
- package/dist/components/alert-overlay.d.ts +1 -1
- package/dist/components/badge.d.ts +1 -0
- package/dist/components/index.d.ts +2 -3
- package/dist/components/loading-overlay.d.ts +0 -8
- package/dist/constants.d.ts +1 -18
- package/dist/index.d.ts +2 -8
- package/dist/index.esm.js +321 -636
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +320 -636
- package/dist/index.js.map +1 -1
- package/dist/installer.d.ts +0 -1
- package/dist/widget.d.ts +12 -14
- package/package.json +1 -1
- package/dist/components/dom-alert.d.ts +0 -2
- package/dist/components/image-modal.d.ts +0 -1
package/dist/api.d.ts
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
import type { VirtualTryOnResult } from "./index.js";
|
|
2
|
-
export declare function callVirtualTryOnApi(
|
|
2
|
+
export declare function callVirtualTryOnApi(
|
|
3
|
+
baseUrl: string,
|
|
4
|
+
ww_access_token: string,
|
|
5
|
+
ww_user_id: string,
|
|
6
|
+
ww_product_image: string,
|
|
7
|
+
ww_image: Blob,
|
|
8
|
+
): Promise<VirtualTryOnResult | null>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function showAlert(container: HTMLElement, message: string, type:
|
|
1
|
+
export declare function showAlert(container: HTMLElement, message: string, type: "error" | "warning"): void;
|
|
2
2
|
export declare function removeAlert(container: HTMLElement): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createPreviewBadge(): HTMLElement;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { createButton, createButtonContainer } from "./button.js";
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export { type ReviewModalCallbacks, showReviewModal } from "./review-modal.js";
|
|
2
|
+
export { removeProductLoading, showProductLoading, } from "./loading-overlay.js";
|
|
3
|
+
export { createPreviewBadge } from "./badge.js";
|
|
@@ -2,14 +2,6 @@
|
|
|
2
2
|
* Creates a loading overlay that can be shown in different containers
|
|
3
3
|
*/
|
|
4
4
|
export declare function createLoadingOverlay(text?: string): HTMLElement;
|
|
5
|
-
/**
|
|
6
|
-
* Shows a loading overlay in a modal container
|
|
7
|
-
*/
|
|
8
|
-
export declare function showModalLoading(container: HTMLElement): void;
|
|
9
|
-
/**
|
|
10
|
-
* Removes loading overlay from modal
|
|
11
|
-
*/
|
|
12
|
-
export declare function removeModalLoading(): void;
|
|
13
5
|
/**
|
|
14
6
|
* Shows a loading overlay in the product gallery container
|
|
15
7
|
*/
|
package/dist/constants.d.ts
CHANGED
|
@@ -3,27 +3,10 @@ export declare const CSS_CLASSES: {
|
|
|
3
3
|
readonly BUTTON_CONTAINER: "wewear-vto-button-container";
|
|
4
4
|
readonly BUTTON: "wewear-vto-button";
|
|
5
5
|
readonly MODAL: "wewear-vto-modal";
|
|
6
|
+
readonly PREVIEW_BADGE: "ww-vto-preview-badge";
|
|
6
7
|
};
|
|
7
8
|
/** Z-index values for proper layering */
|
|
8
9
|
export declare const Z_INDEX: {
|
|
9
10
|
readonly BUTTON: 10;
|
|
10
11
|
readonly MODAL: 99999;
|
|
11
12
|
};
|
|
12
|
-
/** Camera constraints for optimal capture */
|
|
13
|
-
export declare const CAMERA_CONSTRAINTS: {
|
|
14
|
-
readonly video: {
|
|
15
|
-
readonly width: {
|
|
16
|
-
readonly ideal: 1280;
|
|
17
|
-
};
|
|
18
|
-
readonly height: {
|
|
19
|
-
readonly ideal: 720;
|
|
20
|
-
};
|
|
21
|
-
readonly facingMode: "user";
|
|
22
|
-
};
|
|
23
|
-
readonly audio: false;
|
|
24
|
-
};
|
|
25
|
-
/** Image capture settings */
|
|
26
|
-
export declare const IMAGE_SETTINGS: {
|
|
27
|
-
readonly FORMAT: "image/jpeg";
|
|
28
|
-
readonly QUALITY: 0.8;
|
|
29
|
-
};
|
package/dist/index.d.ts
CHANGED
|
@@ -9,14 +9,8 @@ export interface VirtualTryOnResult {
|
|
|
9
9
|
imageUrl: string | null;
|
|
10
10
|
error?: {
|
|
11
11
|
message: string;
|
|
12
|
-
type:
|
|
12
|
+
type: "error" | "warning";
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
export
|
|
16
|
-
ww_access_token: string;
|
|
17
|
-
ww_user_id: string;
|
|
18
|
-
ww_product_image: string;
|
|
19
|
-
ww_image: Blob;
|
|
20
|
-
}
|
|
21
|
-
export { destroyVirtualTryOn, getWidgetInstance, initVirtualTryOn, } from "./installer.js";
|
|
15
|
+
export { getWidgetInstance, initVirtualTryOn, } from "./installer.js";
|
|
22
16
|
export { VirtualTryOnWidget } from "./widget.js";
|