@car-cutter/vanilla-webplayer 0.10.0 → 0.12.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 +23 -7
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -44,18 +44,20 @@ export declare const EVENT_HOTSPOTS_ON = "hotspots-on";
|
|
|
44
44
|
|
|
45
45
|
export declare const EVENT_ITEM_CHANGE = "item-change";
|
|
46
46
|
|
|
47
|
+
declare type ExtendBehavior = "full_screen" | "event" | "none";
|
|
48
|
+
|
|
47
49
|
/**
|
|
48
50
|
* Generates a URL for fetching the composition JSON for a given customer and vehicle.
|
|
49
51
|
*
|
|
50
|
-
* @param {string}
|
|
52
|
+
* @param {string} customerToken - The CarCutter Customer Token (computed by hasing the Customer ID with SHA-256).
|
|
51
53
|
* @param {string} vin - The Vehicle Identification Number.
|
|
52
54
|
* @returns {string} The URL to fetch the composition JSON.
|
|
53
55
|
*/
|
|
54
56
|
export declare function generateCompositionUrl(
|
|
55
|
-
|
|
57
|
+
customerToken: string,
|
|
56
58
|
vin: string
|
|
57
59
|
): string {
|
|
58
|
-
return `https://cdn.car-cutter.com/gallery/${
|
|
60
|
+
return `https://cdn.car-cutter.com/gallery/${customerToken}/${vin}/composition_v3.json`;
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
declare type Hotspot = {
|
|
@@ -79,7 +81,16 @@ declare type ImageWithHotspots = {
|
|
|
79
81
|
hotspots?: Hotspot[];
|
|
80
82
|
};
|
|
81
83
|
|
|
82
|
-
|
|
84
|
+
declare type InteriorThreeSixtyItem = {
|
|
85
|
+
type: "interior-360";
|
|
86
|
+
poster?: string;
|
|
87
|
+
} & ImageWithHotspots;
|
|
88
|
+
|
|
89
|
+
export declare type Item =
|
|
90
|
+
| ImageItem
|
|
91
|
+
| VideoItem
|
|
92
|
+
| ThreeSixtyItem
|
|
93
|
+
| InteriorThreeSixtyItem;
|
|
83
94
|
|
|
84
95
|
export declare type MediaLoadStrategy = "quality" | "balanced" | "speed";
|
|
85
96
|
|
|
@@ -121,6 +132,7 @@ declare type WebPlayerIconName =
|
|
|
121
132
|
| "UI_PLUS" // Increase zoom
|
|
122
133
|
| "UI_REDUCE" // Reducing an extended view
|
|
123
134
|
| "UI_360" // 360-degree view
|
|
135
|
+
| "UI_INTERIOR_360" // interior 360 view
|
|
124
136
|
| "UI_VOLUME" // Video volume
|
|
125
137
|
| "UI_VOLUME_OFF" // Muted video
|
|
126
138
|
| "CONTROLS_PREV" // Go to previous media
|
|
@@ -136,7 +148,7 @@ declare type WebPlayerProps = {
|
|
|
136
148
|
compositionUrl: string;
|
|
137
149
|
|
|
138
150
|
// Layout
|
|
139
|
-
|
|
151
|
+
hideCategoriesNav?: boolean;
|
|
140
152
|
infiniteCarrousel?: boolean;
|
|
141
153
|
permanentGallery?: boolean;
|
|
142
154
|
|
|
@@ -145,10 +157,14 @@ declare type WebPlayerProps = {
|
|
|
145
157
|
minMediaWidth?: MediaWidth;
|
|
146
158
|
maxMediaWidth?: MediaWidth;
|
|
147
159
|
preloadRange?: number;
|
|
160
|
+
autoLoad360?: boolean;
|
|
161
|
+
autoLoadInterior360?: boolean;
|
|
148
162
|
|
|
149
|
-
//
|
|
150
|
-
|
|
163
|
+
// Miscellaneous
|
|
164
|
+
categoriesFilter?: string;
|
|
165
|
+
extendBehavior?: ExtendBehavior;
|
|
151
166
|
eventPrefix?: string;
|
|
167
|
+
demoSpin?: boolean;
|
|
152
168
|
reverse360?: boolean;
|
|
153
169
|
};
|
|
154
170
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@car-cutter/vanilla-webplayer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CarCutter",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"analyze": "vite-bundle-visualizer"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@car-cutter/wc-webplayer": "0.
|
|
34
|
+
"@car-cutter/wc-webplayer": "0.12.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@car-cutter/eslint-config": "*",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"browserslist-to-esbuild": "^2.1.1",
|
|
41
41
|
"eslint": "^8.57.0",
|
|
42
42
|
"typescript": "^5.5.4",
|
|
43
|
-
"vite": "^5.4.
|
|
43
|
+
"vite": "^5.4.18",
|
|
44
44
|
"vite-bundle-visualizer": "^1.2.1",
|
|
45
45
|
"vite-plugin-dts": "^4.2.1"
|
|
46
46
|
},
|