@car-cutter/vue-webplayer 0.6.1 → 0.8.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 +135 -42
- package/dist/index.js +3975 -3755
- package/dist/index.umd.cjs +11 -11
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,88 @@ import { ComponentProvideOptions } from 'vue';
|
|
|
3
3
|
import { DefineComponent } from 'vue';
|
|
4
4
|
import { PublicProps } from 'vue';
|
|
5
5
|
|
|
6
|
+
declare const __VLS_component: DefineComponent<WebPlayerProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
7
|
+
compositionLoading: (url: string) => any;
|
|
8
|
+
compositionLoaded: (composition: Composition_2) => any;
|
|
9
|
+
compositionLoadError: (error: unknown) => any;
|
|
10
|
+
itemChange: (props: {
|
|
11
|
+
index: number;
|
|
12
|
+
item: Item_2;
|
|
13
|
+
}) => any;
|
|
14
|
+
extendModeOn: () => any;
|
|
15
|
+
extendModeOff: () => any;
|
|
16
|
+
hotspotsOn: () => any;
|
|
17
|
+
hotspotsOff: () => any;
|
|
18
|
+
galleryOpen: () => any;
|
|
19
|
+
galleryClose: () => any;
|
|
20
|
+
}, string, PublicProps, Readonly<WebPlayerProps> & Readonly<{
|
|
21
|
+
onCompositionLoading?: ((url: string) => any) | undefined;
|
|
22
|
+
onCompositionLoaded?: ((composition: Composition_2) => any) | undefined;
|
|
23
|
+
onCompositionLoadError?: ((error: unknown) => any) | undefined;
|
|
24
|
+
onItemChange?: ((props: {
|
|
25
|
+
index: number;
|
|
26
|
+
item: Item_2;
|
|
27
|
+
}) => any) | undefined;
|
|
28
|
+
onExtendModeOn?: (() => any) | undefined;
|
|
29
|
+
onExtendModeOff?: (() => any) | undefined;
|
|
30
|
+
onHotspotsOn?: (() => any) | undefined;
|
|
31
|
+
onHotspotsOff?: (() => any) | undefined;
|
|
32
|
+
onGalleryOpen?: (() => any) | undefined;
|
|
33
|
+
onGalleryClose?: (() => any) | undefined;
|
|
34
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
|
|
36
|
+
declare const __VLS_component_2: DefineComponent<WebPlayerCustomMediaProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<WebPlayerCustomMediaProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
37
|
+
|
|
38
|
+
declare const __VLS_component_3: DefineComponent<WebPlayerIconProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<WebPlayerIconProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
39
|
+
|
|
40
|
+
declare function __VLS_template(): {
|
|
41
|
+
slots: {
|
|
42
|
+
default?(_: {}): any;
|
|
43
|
+
};
|
|
44
|
+
refs: {};
|
|
45
|
+
attrs: Partial<{}>;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
declare function __VLS_template_2(): {
|
|
49
|
+
slots: {
|
|
50
|
+
default?(_: {}): any;
|
|
51
|
+
};
|
|
52
|
+
refs: {};
|
|
53
|
+
attrs: Partial<{}>;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
declare function __VLS_template_3(): {
|
|
57
|
+
slots: {
|
|
58
|
+
default?(_: {}): any;
|
|
59
|
+
};
|
|
60
|
+
refs: {};
|
|
61
|
+
attrs: Partial<{}>;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
65
|
+
|
|
66
|
+
declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
|
|
67
|
+
|
|
68
|
+
declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
|
|
69
|
+
|
|
70
|
+
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
71
|
+
new (): {
|
|
72
|
+
$slots: S;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
77
|
+
new (): {
|
|
78
|
+
$slots: S;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
declare type __VLS_WithTemplateSlots_3<T, S> = T & {
|
|
83
|
+
new (): {
|
|
84
|
+
$slots: S;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
|
|
6
88
|
declare type AspectRatio = `${number}:${number}`;
|
|
7
89
|
|
|
8
90
|
declare type AspectRatio_2 = `${number}:${number}`;
|
|
@@ -10,30 +92,30 @@ declare type AspectRatio_2 = `${number}:${number}`;
|
|
|
10
92
|
declare type Category = {
|
|
11
93
|
id: string;
|
|
12
94
|
title: string;
|
|
13
|
-
items:
|
|
95
|
+
items: Item_2[];
|
|
14
96
|
};
|
|
15
97
|
|
|
16
98
|
declare type Category_2 = {
|
|
17
99
|
id: string;
|
|
18
100
|
title: string;
|
|
19
|
-
items:
|
|
101
|
+
items: Item[];
|
|
20
102
|
};
|
|
21
103
|
|
|
22
104
|
export declare type Composition = {
|
|
23
105
|
aspectRatio: AspectRatio_2;
|
|
24
|
-
imageHdWidth:
|
|
25
|
-
imageSubWidths:
|
|
106
|
+
imageHdWidth: MediaWidth_3;
|
|
107
|
+
imageSubWidths: MediaWidth_3[];
|
|
26
108
|
categories: Category_2[];
|
|
27
109
|
};
|
|
28
110
|
|
|
29
111
|
declare type Composition_2 = {
|
|
30
112
|
aspectRatio: AspectRatio;
|
|
31
|
-
imageHdWidth:
|
|
32
|
-
imageSubWidths:
|
|
113
|
+
imageHdWidth: MediaWidth_2;
|
|
114
|
+
imageSubWidths: MediaWidth_2[];
|
|
33
115
|
categories: Category[];
|
|
34
116
|
};
|
|
35
117
|
|
|
36
|
-
export declare const DEFAULT_EVENT_PREFIX
|
|
118
|
+
export declare const DEFAULT_EVENT_PREFIX = "cc-webplayer:" satisfies string;
|
|
37
119
|
|
|
38
120
|
export declare const EVENT_COMPOSITION_LOAD_ERROR = "composition-load-error";
|
|
39
121
|
|
|
@@ -53,6 +135,8 @@ export declare const EVENT_HOTSPOTS_OFF = "hotspots-off";
|
|
|
53
135
|
|
|
54
136
|
export declare const EVENT_HOTSPOTS_ON = "hotspots-on";
|
|
55
137
|
|
|
138
|
+
export declare const EVENT_ITEM_CHANGE = "item-change";
|
|
139
|
+
|
|
56
140
|
/**
|
|
57
141
|
* Generates a URL for fetching the composition JSON for a given customer and vehicle.
|
|
58
142
|
*
|
|
@@ -99,12 +183,6 @@ declare type ImageItem = { type: "image" } & ImageWithHotspots;
|
|
|
99
183
|
|
|
100
184
|
declare type ImageItem_2 = { type: "image" } & ImageWithHotspots_2;
|
|
101
185
|
|
|
102
|
-
declare type ImageLoadStrategy = "quality" | "speed";
|
|
103
|
-
|
|
104
|
-
declare type ImageWidth = number;
|
|
105
|
-
|
|
106
|
-
declare type ImageWidth_2 = number;
|
|
107
|
-
|
|
108
186
|
declare type ImageWithHotspots = {
|
|
109
187
|
src: string;
|
|
110
188
|
hotspots?: Hotspot[];
|
|
@@ -115,9 +193,19 @@ declare type ImageWithHotspots_2 = {
|
|
|
115
193
|
hotspots?: Hotspot_2[];
|
|
116
194
|
};
|
|
117
195
|
|
|
118
|
-
declare type Item =
|
|
196
|
+
export declare type Item = ImageItem_2 | VideoItem_2 | ThreeSixtyItem_2;
|
|
197
|
+
|
|
198
|
+
declare type Item_2 = ImageItem | VideoItem | ThreeSixtyItem;
|
|
199
|
+
|
|
200
|
+
export declare type MediaLoadStrategy = "quality" | "balanced" | "speed";
|
|
119
201
|
|
|
120
|
-
declare type
|
|
202
|
+
declare type MediaLoadStrategy_2 = "quality" | "balanced" | "speed";
|
|
203
|
+
|
|
204
|
+
declare type MediaWidth = number;
|
|
205
|
+
|
|
206
|
+
declare type MediaWidth_2 = number;
|
|
207
|
+
|
|
208
|
+
declare type MediaWidth_3 = number;
|
|
121
209
|
|
|
122
210
|
declare type ThreeSixtyItem = {
|
|
123
211
|
type: "360";
|
|
@@ -132,45 +220,36 @@ declare type ThreeSixtyItem_2 = {
|
|
|
132
220
|
declare type VideoItem = {
|
|
133
221
|
type: "video";
|
|
134
222
|
src: string;
|
|
135
|
-
poster
|
|
223
|
+
poster?: string;
|
|
136
224
|
};
|
|
137
225
|
|
|
138
226
|
declare type VideoItem_2 = {
|
|
139
227
|
type: "video";
|
|
140
228
|
src: string;
|
|
141
|
-
poster
|
|
229
|
+
poster?: string;
|
|
142
230
|
};
|
|
143
231
|
|
|
144
232
|
export declare const WEB_PLAYER_ICON_WC_TAG = "cc-webplayer-icon";
|
|
145
233
|
|
|
146
234
|
export declare const WEB_PLAYER_WC_TAG = "cc-webplayer";
|
|
147
235
|
|
|
148
|
-
export declare const WebPlayer:
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
galleryOpen: () => any;
|
|
157
|
-
galleryClose: () => any;
|
|
158
|
-
}, string, PublicProps, Readonly<WebPlayerProps> & Readonly<{
|
|
159
|
-
onCompositionLoading?: ((url: string) => any) | undefined;
|
|
160
|
-
onCompositionLoaded?: ((composition: Composition_2) => any) | undefined;
|
|
161
|
-
onCompositionLoadError?: ((error: unknown) => any) | undefined;
|
|
162
|
-
onExtendModeOn?: (() => any) | undefined;
|
|
163
|
-
onExtendModeOff?: (() => any) | undefined;
|
|
164
|
-
onHotspotsOn?: (() => any) | undefined;
|
|
165
|
-
onHotspotsOff?: (() => any) | undefined;
|
|
166
|
-
onGalleryOpen?: (() => any) | undefined;
|
|
167
|
-
onGalleryClose?: (() => any) | undefined;
|
|
168
|
-
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
236
|
+
export declare const WebPlayer: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
237
|
+
|
|
238
|
+
export declare const WebPlayerCustomMedia: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
|
|
239
|
+
|
|
240
|
+
export declare type WebPlayerCustomMediaProps = {
|
|
241
|
+
index: number;
|
|
242
|
+
thumbnailSrc?: string;
|
|
243
|
+
};
|
|
169
244
|
|
|
170
245
|
export declare type WebPlayerEvents = {
|
|
171
246
|
compositionLoading: [url: string];
|
|
172
247
|
compositionLoaded: [composition: Composition_2];
|
|
173
248
|
compositionLoadError: [error: unknown];
|
|
249
|
+
itemChange: [props: {
|
|
250
|
+
index: number;
|
|
251
|
+
item: Item_2;
|
|
252
|
+
}];
|
|
174
253
|
extendModeOn: [];
|
|
175
254
|
extendModeOff: [];
|
|
176
255
|
hotspotsOn: [];
|
|
@@ -179,14 +258,28 @@ export declare type WebPlayerEvents = {
|
|
|
179
258
|
galleryClose: [];
|
|
180
259
|
};
|
|
181
260
|
|
|
182
|
-
export declare
|
|
261
|
+
export declare const WebPlayerIcon: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
|
|
262
|
+
|
|
263
|
+
declare type WebPlayerIconName = "UI_ARROW_RIGHT" | "UI_BURGER" | "UI_CLOSE" | "UI_EXTEND" | "UI_GALLERY" | "UI_HOTSPOTS" | "UI_IMAGE" | "UI_MINUS" | "UI_PAUSE" | "UI_PLAY" | "UI_PLUS" | "UI_REDUCE" | "UI_360" | "UI_VOLUME" | "UI_VOLUME_OFF" | "CONTROLS_PREV" | "CONTROLS_NEXT" | (string & {});
|
|
264
|
+
|
|
265
|
+
export declare type WebPlayerIconProps = {
|
|
266
|
+
name: WebPlayerIconName;
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
export declare type WebPlayerProps = WebPlayerProps_2 & {
|
|
270
|
+
class?: string;
|
|
271
|
+
style?: HTMLElement["style"];
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
declare type WebPlayerProps_2 = {
|
|
183
275
|
compositionUrl: string;
|
|
184
276
|
hideCategories?: boolean;
|
|
185
277
|
infiniteCarrousel?: boolean;
|
|
186
278
|
permanentGallery?: boolean;
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
279
|
+
mediaLoadStrategy?: MediaLoadStrategy_2;
|
|
280
|
+
minMediaWidth?: MediaWidth;
|
|
281
|
+
maxMediaWidth?: MediaWidth;
|
|
282
|
+
preloadRange?: number;
|
|
190
283
|
preventFullScreen?: boolean;
|
|
191
284
|
eventPrefix?: string;
|
|
192
285
|
reverse360?: boolean;
|