@car-cutter/wc-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 CHANGED
@@ -15,12 +15,12 @@ export declare function checkCustomElementsDefinition(): boolean;
15
15
 
16
16
  export declare type Composition = {
17
17
  aspectRatio: AspectRatio;
18
- imageHdWidth: ImageWidth;
19
- imageSubWidths: ImageWidth[];
18
+ imageHdWidth: MediaWidth;
19
+ imageSubWidths: MediaWidth[];
20
20
  categories: Category[];
21
21
  };
22
22
 
23
- export declare const DEFAULT_EVENT_PREFIX: string = "cc-webplayer:";
23
+ export declare const DEFAULT_EVENT_PREFIX = "cc-webplayer:" satisfies string;
24
24
 
25
25
  /**
26
26
  * Defines WebPlayer's custom elements in the DOM.
@@ -51,6 +51,8 @@ export declare const EVENT_HOTSPOTS_OFF = "hotspots-off";
51
51
 
52
52
  export declare const EVENT_HOTSPOTS_ON = "hotspots-on";
53
53
 
54
+ export declare const EVENT_ITEM_CHANGE = "item-change";
55
+
54
56
  /**
55
57
  * Generates a URL for fetching the composition JSON for a given customer and vehicle.
56
58
  *
@@ -81,18 +83,24 @@ declare type Hotspot = {
81
83
 
82
84
  declare type ImageItem = { type: "image" } & ImageWithHotspots;
83
85
 
84
- declare type ImageLoadStrategy = "quality" | "speed";
85
-
86
- declare type ImageLoadStrategy_2 = "quality" | "speed";
87
-
88
- declare type ImageWidth = number;
89
-
90
86
  declare type ImageWithHotspots = {
91
87
  src: string;
92
88
  hotspots?: Hotspot[];
93
89
  };
94
90
 
95
- declare type Item = ImageItem | VideoItem | ThreeSixtyItem;
91
+ export declare type Item = ImageItem | VideoItem | ThreeSixtyItem;
92
+
93
+ export declare type MediaLoadStrategy = "quality" | "balanced" | "speed";
94
+
95
+ declare type MediaLoadStrategy_2 = "quality" | "balanced" | "speed";
96
+
97
+ declare type MediaLoadStrategy_3 = "quality" | "balanced" | "speed";
98
+
99
+ declare type MediaWidth = number;
100
+
101
+ declare type MediaWidth_2 = number;
102
+
103
+ declare type MediaWidth_3 = number;
96
104
 
97
105
  declare type ThreeSixtyItem = {
98
106
  type: "360";
@@ -130,9 +138,10 @@ export declare type WebPlayerProps = {
130
138
  hideCategories?: boolean;
131
139
  infiniteCarrousel?: boolean;
132
140
  permanentGallery?: boolean;
133
- imageLoadStrategy?: ImageLoadStrategy;
134
- minImageWidth?: number;
135
- maxImageWidth?: number;
141
+ mediaLoadStrategy?: MediaLoadStrategy_2;
142
+ minMediaWidth?: MediaWidth_2;
143
+ maxMediaWidth?: MediaWidth_2;
144
+ preloadRange?: number;
136
145
  preventFullScreen?: boolean;
137
146
  eventPrefix?: string;
138
147
  reverse360?: boolean;
@@ -143,9 +152,10 @@ declare type WebPlayerProps_2 = {
143
152
  hideCategories?: boolean;
144
153
  infiniteCarrousel?: boolean;
145
154
  permanentGallery?: boolean;
146
- imageLoadStrategy?: ImageLoadStrategy_2;
147
- minImageWidth?: number;
148
- maxImageWidth?: number;
155
+ mediaLoadStrategy?: MediaLoadStrategy_3;
156
+ minMediaWidth?: MediaWidth_3;
157
+ maxMediaWidth?: MediaWidth_3;
158
+ preloadRange?: number;
149
159
  preventFullScreen?: boolean;
150
160
  eventPrefix?: string;
151
161
  reverse360?: boolean;