@car-cutter/vue-webplayer 0.5.0 → 0.6.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/index.d.ts +29 -27
- package/dist/index.js +2976 -2916
- package/dist/index.umd.cjs +11 -11
- package/package.json +13 -8
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,8 @@
|
|
|
1
1
|
import { ComponentOptionsMixin } from 'vue';
|
|
2
|
+
import { ComponentProvideOptions } from 'vue';
|
|
2
3
|
import { DefineComponent } from 'vue';
|
|
3
|
-
import { ExtractPropTypes } from 'vue';
|
|
4
|
-
import { PropType } from 'vue';
|
|
5
4
|
import { PublicProps } from 'vue';
|
|
6
5
|
|
|
7
|
-
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
8
|
-
|
|
9
|
-
declare type __VLS_TypePropsToOption<T> = {
|
|
10
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
11
|
-
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
12
|
-
} : {
|
|
13
|
-
type: PropType<T[K]>;
|
|
14
|
-
required: true;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
|
|
18
6
|
declare type AspectRatio = `${number}:${number}`;
|
|
19
7
|
|
|
20
8
|
declare type AspectRatio_2 = `${number}:${number}`;
|
|
@@ -45,7 +33,7 @@ declare type Composition_2 = {
|
|
|
45
33
|
categories: Category[];
|
|
46
34
|
};
|
|
47
35
|
|
|
48
|
-
export declare const DEFAULT_EVENT_PREFIX = "cc-webplayer:";
|
|
36
|
+
export declare const DEFAULT_EVENT_PREFIX: string = "cc-webplayer:";
|
|
49
37
|
|
|
50
38
|
export declare const EVENT_COMPOSITION_LOAD_ERROR = "composition-load-error";
|
|
51
39
|
|
|
@@ -65,6 +53,20 @@ export declare const EVENT_HOTSPOTS_OFF = "hotspots-off";
|
|
|
65
53
|
|
|
66
54
|
export declare const EVENT_HOTSPOTS_ON = "hotspots-on";
|
|
67
55
|
|
|
56
|
+
/**
|
|
57
|
+
* Generates a URL for fetching the composition JSON for a given customer and vehicle.
|
|
58
|
+
*
|
|
59
|
+
* @param {string} customerId - The ID of the customer.
|
|
60
|
+
* @param {string} vin - The Vehicle Identification Number.
|
|
61
|
+
* @returns {string} The URL to fetch the composition JSON.
|
|
62
|
+
*/
|
|
63
|
+
export declare function generateCompositionUrl(
|
|
64
|
+
customerId: string,
|
|
65
|
+
vin: string
|
|
66
|
+
): string {
|
|
67
|
+
return `https://cdn.car-cutter.com/gallery/${customerId}/${vin}/composition_v3.json`;
|
|
68
|
+
}
|
|
69
|
+
|
|
68
70
|
declare type Hotspot = {
|
|
69
71
|
title: string;
|
|
70
72
|
icon?: string;
|
|
@@ -143,17 +145,17 @@ export declare const WEB_PLAYER_ICON_WC_TAG = "cc-webplayer-icon";
|
|
|
143
145
|
|
|
144
146
|
export declare const WEB_PLAYER_WC_TAG = "cc-webplayer";
|
|
145
147
|
|
|
146
|
-
export declare const WebPlayer: DefineComponent<
|
|
147
|
-
compositionLoading: (url: string) =>
|
|
148
|
-
compositionLoaded: (composition: Composition_2) =>
|
|
149
|
-
compositionLoadError: (error: unknown) =>
|
|
150
|
-
extendModeOn: () =>
|
|
151
|
-
extendModeOff: () =>
|
|
152
|
-
hotspotsOn: () =>
|
|
153
|
-
hotspotsOff: () =>
|
|
154
|
-
galleryOpen: () =>
|
|
155
|
-
galleryClose: () =>
|
|
156
|
-
}, string, PublicProps, Readonly<
|
|
148
|
+
export declare const WebPlayer: DefineComponent<WebPlayerProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
149
|
+
compositionLoading: (url: string) => any;
|
|
150
|
+
compositionLoaded: (composition: Composition_2) => any;
|
|
151
|
+
compositionLoadError: (error: unknown) => any;
|
|
152
|
+
extendModeOn: () => any;
|
|
153
|
+
extendModeOff: () => any;
|
|
154
|
+
hotspotsOn: () => any;
|
|
155
|
+
hotspotsOff: () => any;
|
|
156
|
+
galleryOpen: () => any;
|
|
157
|
+
galleryClose: () => any;
|
|
158
|
+
}, string, PublicProps, Readonly<WebPlayerProps> & Readonly<{
|
|
157
159
|
onCompositionLoading?: ((url: string) => any) | undefined;
|
|
158
160
|
onCompositionLoaded?: ((composition: Composition_2) => any) | undefined;
|
|
159
161
|
onCompositionLoadError?: ((error: unknown) => any) | undefined;
|
|
@@ -163,7 +165,7 @@ onHotspotsOn?: (() => any) | undefined;
|
|
|
163
165
|
onHotspotsOff?: (() => any) | undefined;
|
|
164
166
|
onGalleryOpen?: (() => any) | undefined;
|
|
165
167
|
onGalleryClose?: (() => any) | undefined;
|
|
166
|
-
}, {}, {}>;
|
|
168
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
167
169
|
|
|
168
170
|
export declare type WebPlayerEvents = {
|
|
169
171
|
compositionLoading: [url: string];
|
|
@@ -179,7 +181,7 @@ export declare type WebPlayerEvents = {
|
|
|
179
181
|
|
|
180
182
|
export declare type WebPlayerProps = {
|
|
181
183
|
compositionUrl: string;
|
|
182
|
-
|
|
184
|
+
hideCategories?: boolean;
|
|
183
185
|
infiniteCarrousel?: boolean;
|
|
184
186
|
permanentGallery?: boolean;
|
|
185
187
|
imageLoadStrategy?: ImageLoadStrategy;
|