@car-cutter/wc-webplayer 0.5.0 → 0.6.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
@@ -20,7 +20,7 @@ export declare type Composition = {
20
20
  categories: Category[];
21
21
  };
22
22
 
23
- export declare const DEFAULT_EVENT_PREFIX = "cc-webplayer:";
23
+ export declare const DEFAULT_EVENT_PREFIX: string = "cc-webplayer:";
24
24
 
25
25
  /**
26
26
  * Defines WebPlayer's custom elements in the DOM.
@@ -51,6 +51,20 @@ export declare const EVENT_HOTSPOTS_OFF = "hotspots-off";
51
51
 
52
52
  export declare const EVENT_HOTSPOTS_ON = "hotspots-on";
53
53
 
54
+ /**
55
+ * Generates a URL for fetching the composition JSON for a given customer and vehicle.
56
+ *
57
+ * @param {string} customerId - The ID of the customer.
58
+ * @param {string} vin - The Vehicle Identification Number.
59
+ * @returns {string} The URL to fetch the composition JSON.
60
+ */
61
+ export declare function generateCompositionUrl(
62
+ customerId: string,
63
+ vin: string
64
+ ): string {
65
+ return `https://cdn.car-cutter.com/gallery/${customerId}/${vin}/composition_v3.json`;
66
+ }
67
+
54
68
  declare type Hotspot = {
55
69
  title: string;
56
70
  icon?: string;
@@ -113,7 +127,7 @@ export declare const webPlayerIconPropsToAttributes: (props: WebPlayerIconProps_
113
127
 
114
128
  export declare type WebPlayerProps = {
115
129
  compositionUrl: string;
116
- flatten?: boolean;
130
+ hideCategories?: boolean;
117
131
  infiniteCarrousel?: boolean;
118
132
  permanentGallery?: boolean;
119
133
  imageLoadStrategy?: ImageLoadStrategy;
@@ -126,7 +140,7 @@ export declare type WebPlayerProps = {
126
140
 
127
141
  declare type WebPlayerProps_2 = {
128
142
  compositionUrl: string;
129
- flatten?: boolean;
143
+ hideCategories?: boolean;
130
144
  infiniteCarrousel?: boolean;
131
145
  permanentGallery?: boolean;
132
146
  imageLoadStrategy?: ImageLoadStrategy_2;