@car-cutter/vue-webplayer 0.6.1 → 0.7.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 +37 -18
- package/dist/index.js +2646 -2637
- package/dist/index.umd.cjs +10 -10
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -10,30 +10,30 @@ declare type AspectRatio_2 = `${number}:${number}`;
|
|
|
10
10
|
declare type Category = {
|
|
11
11
|
id: string;
|
|
12
12
|
title: string;
|
|
13
|
-
items:
|
|
13
|
+
items: Item_2[];
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
declare type Category_2 = {
|
|
17
17
|
id: string;
|
|
18
18
|
title: string;
|
|
19
|
-
items:
|
|
19
|
+
items: Item[];
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export declare type Composition = {
|
|
23
23
|
aspectRatio: AspectRatio_2;
|
|
24
|
-
imageHdWidth:
|
|
25
|
-
imageSubWidths:
|
|
24
|
+
imageHdWidth: MediaWidth_3;
|
|
25
|
+
imageSubWidths: MediaWidth_3[];
|
|
26
26
|
categories: Category_2[];
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
declare type Composition_2 = {
|
|
30
30
|
aspectRatio: AspectRatio;
|
|
31
|
-
imageHdWidth:
|
|
32
|
-
imageSubWidths:
|
|
31
|
+
imageHdWidth: MediaWidth_2;
|
|
32
|
+
imageSubWidths: MediaWidth_2[];
|
|
33
33
|
categories: Category[];
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
export declare const DEFAULT_EVENT_PREFIX
|
|
36
|
+
export declare const DEFAULT_EVENT_PREFIX = "cc-webplayer:" satisfies string;
|
|
37
37
|
|
|
38
38
|
export declare const EVENT_COMPOSITION_LOAD_ERROR = "composition-load-error";
|
|
39
39
|
|
|
@@ -53,6 +53,8 @@ export declare const EVENT_HOTSPOTS_OFF = "hotspots-off";
|
|
|
53
53
|
|
|
54
54
|
export declare const EVENT_HOTSPOTS_ON = "hotspots-on";
|
|
55
55
|
|
|
56
|
+
export declare const EVENT_ITEM_CHANGE = "item-change";
|
|
57
|
+
|
|
56
58
|
/**
|
|
57
59
|
* Generates a URL for fetching the composition JSON for a given customer and vehicle.
|
|
58
60
|
*
|
|
@@ -99,12 +101,6 @@ declare type ImageItem = { type: "image" } & ImageWithHotspots;
|
|
|
99
101
|
|
|
100
102
|
declare type ImageItem_2 = { type: "image" } & ImageWithHotspots_2;
|
|
101
103
|
|
|
102
|
-
declare type ImageLoadStrategy = "quality" | "speed";
|
|
103
|
-
|
|
104
|
-
declare type ImageWidth = number;
|
|
105
|
-
|
|
106
|
-
declare type ImageWidth_2 = number;
|
|
107
|
-
|
|
108
104
|
declare type ImageWithHotspots = {
|
|
109
105
|
src: string;
|
|
110
106
|
hotspots?: Hotspot[];
|
|
@@ -115,9 +111,19 @@ declare type ImageWithHotspots_2 = {
|
|
|
115
111
|
hotspots?: Hotspot_2[];
|
|
116
112
|
};
|
|
117
113
|
|
|
118
|
-
declare type Item =
|
|
114
|
+
export declare type Item = ImageItem_2 | VideoItem_2 | ThreeSixtyItem_2;
|
|
115
|
+
|
|
116
|
+
declare type Item_2 = ImageItem | VideoItem | ThreeSixtyItem;
|
|
117
|
+
|
|
118
|
+
export declare type MediaLoadStrategy = "quality" | "balanced" | "speed";
|
|
119
|
+
|
|
120
|
+
declare type MediaLoadStrategy_2 = "quality" | "balanced" | "speed";
|
|
121
|
+
|
|
122
|
+
declare type MediaWidth = number;
|
|
123
|
+
|
|
124
|
+
declare type MediaWidth_2 = number;
|
|
119
125
|
|
|
120
|
-
declare type
|
|
126
|
+
declare type MediaWidth_3 = number;
|
|
121
127
|
|
|
122
128
|
declare type ThreeSixtyItem = {
|
|
123
129
|
type: "360";
|
|
@@ -149,6 +155,10 @@ export declare const WebPlayer: DefineComponent<WebPlayerProps, {}, {}, {}, {},
|
|
|
149
155
|
compositionLoading: (url: string) => any;
|
|
150
156
|
compositionLoaded: (composition: Composition_2) => any;
|
|
151
157
|
compositionLoadError: (error: unknown) => any;
|
|
158
|
+
itemChange: (props: {
|
|
159
|
+
index: number;
|
|
160
|
+
item: Item_2;
|
|
161
|
+
}) => any;
|
|
152
162
|
extendModeOn: () => any;
|
|
153
163
|
extendModeOff: () => any;
|
|
154
164
|
hotspotsOn: () => any;
|
|
@@ -159,6 +169,10 @@ galleryClose: () => any;
|
|
|
159
169
|
onCompositionLoading?: ((url: string) => any) | undefined;
|
|
160
170
|
onCompositionLoaded?: ((composition: Composition_2) => any) | undefined;
|
|
161
171
|
onCompositionLoadError?: ((error: unknown) => any) | undefined;
|
|
172
|
+
onItemChange?: ((props: {
|
|
173
|
+
index: number;
|
|
174
|
+
item: Item_2;
|
|
175
|
+
}) => any) | undefined;
|
|
162
176
|
onExtendModeOn?: (() => any) | undefined;
|
|
163
177
|
onExtendModeOff?: (() => any) | undefined;
|
|
164
178
|
onHotspotsOn?: (() => any) | undefined;
|
|
@@ -171,6 +185,10 @@ export declare type WebPlayerEvents = {
|
|
|
171
185
|
compositionLoading: [url: string];
|
|
172
186
|
compositionLoaded: [composition: Composition_2];
|
|
173
187
|
compositionLoadError: [error: unknown];
|
|
188
|
+
itemChange: [props: {
|
|
189
|
+
index: number;
|
|
190
|
+
item: Item_2;
|
|
191
|
+
}];
|
|
174
192
|
extendModeOn: [];
|
|
175
193
|
extendModeOff: [];
|
|
176
194
|
hotspotsOn: [];
|
|
@@ -184,9 +202,10 @@ export declare type WebPlayerProps = {
|
|
|
184
202
|
hideCategories?: boolean;
|
|
185
203
|
infiniteCarrousel?: boolean;
|
|
186
204
|
permanentGallery?: boolean;
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
205
|
+
mediaLoadStrategy?: MediaLoadStrategy_2;
|
|
206
|
+
minMediaWidth?: MediaWidth;
|
|
207
|
+
maxMediaWidth?: MediaWidth;
|
|
208
|
+
preloadRange?: number;
|
|
190
209
|
preventFullScreen?: boolean;
|
|
191
210
|
eventPrefix?: string;
|
|
192
211
|
reverse360?: boolean;
|