@car-cutter/wc-webplayer 0.7.0 → 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 +25 -30
- package/dist/index.js +3897 -3727
- package/dist/index.umd.cjs +11 -11
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare type AspectRatio = `${number}:${number}`;
|
|
2
2
|
|
|
3
|
-
declare type
|
|
3
|
+
declare type CamelToDashed<S extends string> = S extends `${infer T}${infer U}` ? `${T extends Lowercase<T> ? "" : "-"}${Lowercase<T>}${CamelToDashed<U>}` : S;
|
|
4
4
|
|
|
5
5
|
declare type Category = {
|
|
6
6
|
id: string;
|
|
@@ -94,46 +94,55 @@ export declare type MediaLoadStrategy = "quality" | "balanced" | "speed";
|
|
|
94
94
|
|
|
95
95
|
declare type MediaLoadStrategy_2 = "quality" | "balanced" | "speed";
|
|
96
96
|
|
|
97
|
-
declare type MediaLoadStrategy_3 = "quality" | "balanced" | "speed";
|
|
98
|
-
|
|
99
97
|
declare type MediaWidth = number;
|
|
100
98
|
|
|
101
99
|
declare type MediaWidth_2 = number;
|
|
102
100
|
|
|
103
|
-
declare type
|
|
101
|
+
declare type PropsToAttributes<T> = {
|
|
102
|
+
[K in keyof T as CamelToDashed<string & K>]: ToStringOrOptional<T[K]>;
|
|
103
|
+
};
|
|
104
104
|
|
|
105
105
|
declare type ThreeSixtyItem = {
|
|
106
106
|
type: "360";
|
|
107
107
|
images: ImageWithHotspots[];
|
|
108
108
|
};
|
|
109
109
|
|
|
110
|
+
declare type ToStringOrOptional<T> = T extends undefined ? string | undefined : string;
|
|
111
|
+
|
|
110
112
|
declare type VideoItem = {
|
|
111
113
|
type: "video";
|
|
112
114
|
src: string;
|
|
113
|
-
poster
|
|
115
|
+
poster?: string;
|
|
114
116
|
};
|
|
115
117
|
|
|
118
|
+
export declare const WEB_PLAYER_CUSTOM_MEDIA_WC_TAG = "cc-webplayer-custom-media";
|
|
119
|
+
|
|
116
120
|
export declare const WEB_PLAYER_ICON_WC_TAG = "cc-webplayer-icon";
|
|
117
121
|
|
|
118
122
|
export declare const WEB_PLAYER_WC_TAG = "cc-webplayer";
|
|
119
123
|
|
|
120
|
-
export declare type WebPlayerAttributes =
|
|
124
|
+
export declare type WebPlayerAttributes = PropsToAttributes<WebPlayerProps>;
|
|
121
125
|
|
|
122
|
-
export declare type
|
|
126
|
+
export declare type WebPlayerCustomMediaAttributes = PropsToAttributes<WebPlayerCustomMediaProps>;
|
|
123
127
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
128
|
+
declare type WebPlayerCustomMediaProps = {
|
|
129
|
+
index: number;
|
|
130
|
+
thumbnailSrc?: string;
|
|
127
131
|
};
|
|
128
132
|
|
|
129
|
-
declare
|
|
130
|
-
|
|
131
|
-
|
|
133
|
+
export declare const webPlayerCustomMediaPropsToAttributes: (props: WebPlayerCustomMediaProps) => WebPlayerCustomMediaAttributes;
|
|
134
|
+
|
|
135
|
+
export declare type WebPlayerIconAttributes = PropsToAttributes<WebPlayerIconProps>;
|
|
136
|
+
|
|
137
|
+
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 & {});
|
|
138
|
+
|
|
139
|
+
declare type WebPlayerIconProps = {
|
|
140
|
+
name: WebPlayerIconName;
|
|
132
141
|
};
|
|
133
142
|
|
|
134
|
-
export declare const webPlayerIconPropsToAttributes: (props:
|
|
143
|
+
export declare const webPlayerIconPropsToAttributes: (props: WebPlayerIconProps) => WebPlayerIconAttributes;
|
|
135
144
|
|
|
136
|
-
|
|
145
|
+
declare type WebPlayerProps = {
|
|
137
146
|
compositionUrl: string;
|
|
138
147
|
hideCategories?: boolean;
|
|
139
148
|
infiniteCarrousel?: boolean;
|
|
@@ -147,20 +156,6 @@ export declare type WebPlayerProps = {
|
|
|
147
156
|
reverse360?: boolean;
|
|
148
157
|
};
|
|
149
158
|
|
|
150
|
-
declare
|
|
151
|
-
compositionUrl: string;
|
|
152
|
-
hideCategories?: boolean;
|
|
153
|
-
infiniteCarrousel?: boolean;
|
|
154
|
-
permanentGallery?: boolean;
|
|
155
|
-
mediaLoadStrategy?: MediaLoadStrategy_3;
|
|
156
|
-
minMediaWidth?: MediaWidth_3;
|
|
157
|
-
maxMediaWidth?: MediaWidth_3;
|
|
158
|
-
preloadRange?: number;
|
|
159
|
-
preventFullScreen?: boolean;
|
|
160
|
-
eventPrefix?: string;
|
|
161
|
-
reverse360?: boolean;
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
export declare const webPlayerPropsToAttributes: (props: WebPlayerProps_2) => WebPlayerAttributes;
|
|
159
|
+
export declare const webPlayerPropsToAttributes: (props: WebPlayerProps) => WebPlayerAttributes;
|
|
165
160
|
|
|
166
161
|
export { }
|