@car-cutter/react-webplayer 0.5.0 → 0.6.0
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/index.d.ts +16 -2
- package/dist/index.js +1285 -1251
- package/dist/index.umd.cjs +4 -4
- package/package.json +11 -6
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare type Composition = {
|
|
|
15
15
|
categories: Category[];
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
export declare const DEFAULT_EVENT_PREFIX = "cc-webplayer:";
|
|
18
|
+
export declare const DEFAULT_EVENT_PREFIX: string = "cc-webplayer:";
|
|
19
19
|
|
|
20
20
|
export declare const EVENT_COMPOSITION_LOAD_ERROR = "composition-load-error";
|
|
21
21
|
|
|
@@ -35,6 +35,20 @@ export declare const EVENT_HOTSPOTS_OFF = "hotspots-off";
|
|
|
35
35
|
|
|
36
36
|
export declare const EVENT_HOTSPOTS_ON = "hotspots-on";
|
|
37
37
|
|
|
38
|
+
/**
|
|
39
|
+
* Generates a URL for fetching the composition JSON for a given customer and vehicle.
|
|
40
|
+
*
|
|
41
|
+
* @param {string} customerId - The ID of the customer.
|
|
42
|
+
* @param {string} vin - The Vehicle Identification Number.
|
|
43
|
+
* @returns {string} The URL to fetch the composition JSON.
|
|
44
|
+
*/
|
|
45
|
+
export declare function generateCompositionUrl(
|
|
46
|
+
customerId: string,
|
|
47
|
+
vin: string
|
|
48
|
+
): string {
|
|
49
|
+
return `https://cdn.car-cutter.com/gallery/${customerId}/${vin}/composition_v3.json`;
|
|
50
|
+
}
|
|
51
|
+
|
|
38
52
|
declare type Hotspot = {
|
|
39
53
|
title: string;
|
|
40
54
|
icon?: string;
|
|
@@ -100,7 +114,7 @@ export declare type WebPlayerProps = WebPlayerProps_2 & {
|
|
|
100
114
|
|
|
101
115
|
declare type WebPlayerProps_2 = {
|
|
102
116
|
compositionUrl: string;
|
|
103
|
-
|
|
117
|
+
hideCategories?: boolean;
|
|
104
118
|
infiniteCarrousel?: boolean;
|
|
105
119
|
permanentGallery?: boolean;
|
|
106
120
|
imageLoadStrategy?: ImageLoadStrategy;
|