@car-cutter/vue-webplayer 0.7.0 → 0.9.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/LICENSE +201 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +139 -93
- package/dist/index.js +80 -8460
- package/dist/utils-CbTbWQZC.cjs +1 -0
- package/dist/utils-_R5huBBV.js +21 -0
- package/dist/vue2.cjs +1 -0
- package/dist/vue2.d.ts +239 -0
- package/dist/vue2.js +124 -0
- package/package.json +22 -6
- package/dist/index.umd.cjs +0 -48
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),e=require("./utils-CbTbWQZC.cjs"),O=require("@car-cutter/wc-webplayer"),C=t.defineComponent({__name:"WebPlayer",props:{compositionUrl:{},hideCategories:{type:Boolean},infiniteCarrousel:{type:Boolean},permanentGallery:{type:Boolean},mediaLoadStrategy:{},minMediaWidth:{},maxMediaWidth:{},preloadRange:{},preventFullScreen:{type:Boolean},eventPrefix:{},reverse360:{type:Boolean},class:{},style:{}},emits:["compositionLoading","compositionLoaded","compositionLoadError","itemChange","extendModeOn","extendModeOff","hotspotsOn","hotspotsOff","galleryOpen","galleryClose"],setup(_,{emit:s}){O.ensureCustomElementsDefinition();const r=_,{class:a,style:i,...c}=r,l={display:"block",...i??{}},N=O.webPlayerPropsToAttributes(c),E=s,p=r.eventPrefix??e.DEFAULT_EVENT_PREFIX,d=o=>`${p}${o}`,m={[e.EVENT_COMPOSITION_LOADING]:o=>E("compositionLoading",o),[e.EVENT_COMPOSITION_LOADED]:o=>E("compositionLoaded",o),[e.EVENT_COMPOSITION_LOAD_ERROR]:o=>E("compositionLoadError",o),[e.EVENT_ITEM_CHANGE]:o=>E("itemChange",o),[e.EVENT_EXTEND_MODE_ON]:()=>E("extendModeOn"),[e.EVENT_EXTEND_MODE_OFF]:()=>E("extendModeOff"),[e.EVENT_HOTSPOTS_ON]:()=>E("hotspotsOn"),[e.EVENT_HOTSPOTS_OFF]:()=>E("hotspotsOff"),[e.EVENT_GALLERY_OPEN]:()=>E("galleryOpen"),[e.EVENT_GALLERY_CLOSE]:()=>E("galleryClose")},T=new Map;return Object.entries(m).forEach(([o,n])=>{if(!n)return;const P=d(o),u=L=>n(L.detail);T.set(P,u)}),t.onMounted(()=>{T.forEach((o,n)=>{document.addEventListener(n,o)})}),t.onUnmounted(()=>{T.forEach((o,n)=>{document.removeEventListener(n,o)})}),(o,n)=>(t.openBlock(),t.createElementBlock("cc-webplayer",t.mergeProps(t.unref(N),{class:t.unref(a),style:l}),[t.renderSlot(o.$slots,"default")],16))}}),A=t.defineComponent({__name:"WebPlayerCustomMedia",props:{index:{},thumbnailSrc:{}},setup(_){const s=_,r=O.webPlayerCustomMediaPropsToAttributes(s);return(a,i)=>(t.openBlock(),t.createElementBlock("cc-webplayer-custom-media",t.normalizeProps(t.guardReactiveProps(t.unref(r))),[t.renderSlot(a.$slots,"default")],16))}}),M=t.defineComponent({__name:"WebPlayerIcon",props:{name:{}},setup(_){const s=_,r=O.webPlayerIconPropsToAttributes(s);return(a,i)=>(t.openBlock(),t.createElementBlock("cc-webplayer-icon",t.normalizeProps(t.guardReactiveProps(t.unref(r))),[t.renderSlot(a.$slots,"default")],16))}});exports.DEFAULT_EVENT_PREFIX=e.DEFAULT_EVENT_PREFIX;exports.EVENT_COMPOSITION_LOADED=e.EVENT_COMPOSITION_LOADED;exports.EVENT_COMPOSITION_LOADING=e.EVENT_COMPOSITION_LOADING;exports.EVENT_COMPOSITION_LOAD_ERROR=e.EVENT_COMPOSITION_LOAD_ERROR;exports.EVENT_EXTEND_MODE_OFF=e.EVENT_EXTEND_MODE_OFF;exports.EVENT_EXTEND_MODE_ON=e.EVENT_EXTEND_MODE_ON;exports.EVENT_GALLERY_CLOSE=e.EVENT_GALLERY_CLOSE;exports.EVENT_GALLERY_OPEN=e.EVENT_GALLERY_OPEN;exports.EVENT_HOTSPOTS_OFF=e.EVENT_HOTSPOTS_OFF;exports.EVENT_HOTSPOTS_ON=e.EVENT_HOTSPOTS_ON;exports.EVENT_ITEM_CHANGE=e.EVENT_ITEM_CHANGE;exports.WEB_PLAYER_CUSTOM_MEDIA_WC_TAG=e.WEB_PLAYER_CUSTOM_MEDIA_WC_TAG;exports.WEB_PLAYER_ICON_WC_TAG=e.WEB_PLAYER_ICON_WC_TAG;exports.WEB_PLAYER_WC_TAG=e.WEB_PLAYER_WC_TAG;exports.generateCompositionUrl=e.generateCompositionUrl;exports.WebPlayer=C;exports.WebPlayerCustomMedia=A;exports.WebPlayerIcon=M;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,33 +3,100 @@ import { ComponentProvideOptions } from 'vue';
|
|
|
3
3
|
import { DefineComponent } from 'vue';
|
|
4
4
|
import { PublicProps } from 'vue';
|
|
5
5
|
|
|
6
|
-
declare
|
|
6
|
+
declare const __VLS_component: DefineComponent<WebPlayerProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
7
|
+
compositionLoading: (url: string) => any;
|
|
8
|
+
compositionLoaded: (composition: Composition) => any;
|
|
9
|
+
compositionLoadError: (error: unknown) => any;
|
|
10
|
+
itemChange: (props: {
|
|
11
|
+
index: number;
|
|
12
|
+
item: Item;
|
|
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) => any) | undefined;
|
|
23
|
+
onCompositionLoadError?: ((error: unknown) => any) | undefined;
|
|
24
|
+
onItemChange?: ((props: {
|
|
25
|
+
index: number;
|
|
26
|
+
item: Item;
|
|
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>;
|
|
7
35
|
|
|
8
|
-
declare
|
|
36
|
+
declare const __VLS_component_2: DefineComponent<WebPlayerCustomMediaProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<WebPlayerCustomMediaProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
9
37
|
|
|
10
|
-
declare
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
+
};
|
|
14
80
|
};
|
|
15
81
|
|
|
16
|
-
declare type
|
|
82
|
+
declare type __VLS_WithTemplateSlots_3<T, S> = T & {
|
|
83
|
+
new (): {
|
|
84
|
+
$slots: S;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
declare type AspectRatio = `${number}:${number}`;
|
|
89
|
+
|
|
90
|
+
declare type Category = {
|
|
17
91
|
id: string;
|
|
18
92
|
title: string;
|
|
19
93
|
items: Item[];
|
|
20
94
|
};
|
|
21
95
|
|
|
22
96
|
export declare type Composition = {
|
|
23
|
-
aspectRatio: AspectRatio_2;
|
|
24
|
-
imageHdWidth: MediaWidth_3;
|
|
25
|
-
imageSubWidths: MediaWidth_3[];
|
|
26
|
-
categories: Category_2[];
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
declare type Composition_2 = {
|
|
30
97
|
aspectRatio: AspectRatio;
|
|
31
|
-
imageHdWidth:
|
|
32
|
-
imageSubWidths:
|
|
98
|
+
imageHdWidth: MediaWidth;
|
|
99
|
+
imageSubWidths: MediaWidth[];
|
|
33
100
|
categories: Category[];
|
|
34
101
|
};
|
|
35
102
|
|
|
@@ -58,15 +125,15 @@ export declare const EVENT_ITEM_CHANGE = "item-change";
|
|
|
58
125
|
/**
|
|
59
126
|
* Generates a URL for fetching the composition JSON for a given customer and vehicle.
|
|
60
127
|
*
|
|
61
|
-
* @param {string}
|
|
128
|
+
* @param {string} hashedCustomerId - The ID of the customer (hashed with SHA-256).
|
|
62
129
|
* @param {string} vin - The Vehicle Identification Number.
|
|
63
130
|
* @returns {string} The URL to fetch the composition JSON.
|
|
64
131
|
*/
|
|
65
132
|
export declare function generateCompositionUrl(
|
|
66
|
-
|
|
133
|
+
hashedCustomerId: string,
|
|
67
134
|
vin: string
|
|
68
135
|
): string {
|
|
69
|
-
return `https://cdn.car-cutter.com/gallery/${
|
|
136
|
+
return `https://cdn.car-cutter.com/gallery/${hashedCustomerId}/${vin}/composition_v3.json`;
|
|
70
137
|
}
|
|
71
138
|
|
|
72
139
|
declare type Hotspot = {
|
|
@@ -83,111 +150,52 @@ declare type Hotspot = {
|
|
|
83
150
|
};
|
|
84
151
|
};
|
|
85
152
|
|
|
86
|
-
declare type Hotspot_2 = {
|
|
87
|
-
title: string;
|
|
88
|
-
icon?: string;
|
|
89
|
-
description?: string;
|
|
90
|
-
position: {
|
|
91
|
-
x: number;
|
|
92
|
-
y: number;
|
|
93
|
-
};
|
|
94
|
-
detail?: {
|
|
95
|
-
type: "image" | "link" | "pdf";
|
|
96
|
-
src: string;
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
|
|
100
153
|
declare type ImageItem = { type: "image" } & ImageWithHotspots;
|
|
101
154
|
|
|
102
|
-
declare type ImageItem_2 = { type: "image" } & ImageWithHotspots_2;
|
|
103
|
-
|
|
104
155
|
declare type ImageWithHotspots = {
|
|
105
156
|
src: string;
|
|
106
157
|
hotspots?: Hotspot[];
|
|
107
158
|
};
|
|
108
159
|
|
|
109
|
-
declare type
|
|
110
|
-
src: string;
|
|
111
|
-
hotspots?: Hotspot_2[];
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
export declare type Item = ImageItem_2 | VideoItem_2 | ThreeSixtyItem_2;
|
|
115
|
-
|
|
116
|
-
declare type Item_2 = ImageItem | VideoItem | ThreeSixtyItem;
|
|
160
|
+
export declare type Item = ImageItem | VideoItem | ThreeSixtyItem;
|
|
117
161
|
|
|
118
162
|
export declare type MediaLoadStrategy = "quality" | "balanced" | "speed";
|
|
119
163
|
|
|
120
|
-
declare type MediaLoadStrategy_2 = "quality" | "balanced" | "speed";
|
|
121
|
-
|
|
122
164
|
declare type MediaWidth = number;
|
|
123
165
|
|
|
124
|
-
declare type MediaWidth_2 = number;
|
|
125
|
-
|
|
126
|
-
declare type MediaWidth_3 = number;
|
|
127
|
-
|
|
128
166
|
declare type ThreeSixtyItem = {
|
|
129
167
|
type: "360";
|
|
130
168
|
images: ImageWithHotspots[];
|
|
131
169
|
};
|
|
132
170
|
|
|
133
|
-
declare type ThreeSixtyItem_2 = {
|
|
134
|
-
type: "360";
|
|
135
|
-
images: ImageWithHotspots_2[];
|
|
136
|
-
};
|
|
137
|
-
|
|
138
171
|
declare type VideoItem = {
|
|
139
172
|
type: "video";
|
|
140
173
|
src: string;
|
|
141
|
-
poster
|
|
174
|
+
poster?: string;
|
|
142
175
|
};
|
|
143
176
|
|
|
144
|
-
declare
|
|
145
|
-
type: "video";
|
|
146
|
-
src: string;
|
|
147
|
-
poster: string;
|
|
148
|
-
};
|
|
177
|
+
export declare const WEB_PLAYER_CUSTOM_MEDIA_WC_TAG = "cc-webplayer-custom-media";
|
|
149
178
|
|
|
150
179
|
export declare const WEB_PLAYER_ICON_WC_TAG = "cc-webplayer-icon";
|
|
151
180
|
|
|
152
181
|
export declare const WEB_PLAYER_WC_TAG = "cc-webplayer";
|
|
153
182
|
|
|
154
|
-
export declare const WebPlayer:
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
index: number;
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
extendModeOn: () => any;
|
|
163
|
-
extendModeOff: () => any;
|
|
164
|
-
hotspotsOn: () => any;
|
|
165
|
-
hotspotsOff: () => any;
|
|
166
|
-
galleryOpen: () => any;
|
|
167
|
-
galleryClose: () => any;
|
|
168
|
-
}, string, PublicProps, Readonly<WebPlayerProps> & Readonly<{
|
|
169
|
-
onCompositionLoading?: ((url: string) => any) | undefined;
|
|
170
|
-
onCompositionLoaded?: ((composition: Composition_2) => any) | undefined;
|
|
171
|
-
onCompositionLoadError?: ((error: unknown) => any) | undefined;
|
|
172
|
-
onItemChange?: ((props: {
|
|
173
|
-
index: number;
|
|
174
|
-
item: Item_2;
|
|
175
|
-
}) => any) | undefined;
|
|
176
|
-
onExtendModeOn?: (() => any) | undefined;
|
|
177
|
-
onExtendModeOff?: (() => any) | undefined;
|
|
178
|
-
onHotspotsOn?: (() => any) | undefined;
|
|
179
|
-
onHotspotsOff?: (() => any) | undefined;
|
|
180
|
-
onGalleryOpen?: (() => any) | undefined;
|
|
181
|
-
onGalleryClose?: (() => any) | undefined;
|
|
182
|
-
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
183
|
+
export declare const WebPlayer: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
184
|
+
|
|
185
|
+
export declare const WebPlayerCustomMedia: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
|
|
186
|
+
|
|
187
|
+
export declare type WebPlayerCustomMediaProps = {
|
|
188
|
+
index: number;
|
|
189
|
+
thumbnailSrc?: string;
|
|
190
|
+
};
|
|
183
191
|
|
|
184
192
|
export declare type WebPlayerEvents = {
|
|
185
193
|
compositionLoading: [url: string];
|
|
186
|
-
compositionLoaded: [composition:
|
|
194
|
+
compositionLoaded: [composition: Composition];
|
|
187
195
|
compositionLoadError: [error: unknown];
|
|
188
196
|
itemChange: [props: {
|
|
189
197
|
index: number;
|
|
190
|
-
item:
|
|
198
|
+
item: Item;
|
|
191
199
|
}];
|
|
192
200
|
extendModeOn: [];
|
|
193
201
|
extendModeOff: [];
|
|
@@ -197,15 +205,53 @@ export declare type WebPlayerEvents = {
|
|
|
197
205
|
galleryClose: [];
|
|
198
206
|
};
|
|
199
207
|
|
|
200
|
-
export declare
|
|
208
|
+
export declare const WebPlayerIcon: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
|
|
209
|
+
|
|
210
|
+
declare type WebPlayerIconName =
|
|
211
|
+
| "UI_ARROW_RIGHT" // Right arrow navigation (is mirrored on X axis for left arrow)
|
|
212
|
+
| "UI_BURGER" // Toggle Burger menu
|
|
213
|
+
| "UI_CLOSE" // Exit zoom, details or full screen
|
|
214
|
+
| "UI_EXTEND" // Extend the view (and go full screen if possible)
|
|
215
|
+
| "UI_GALLERY" // Toggle gallery view
|
|
216
|
+
| "UI_HOTSPOTS" // Toggle Hotspots
|
|
217
|
+
| "UI_IMAGE" // Hotspot with detail image
|
|
218
|
+
| "UI_MINUS" // Reduce zoom
|
|
219
|
+
| "UI_PAUSE" // Pause video
|
|
220
|
+
| "UI_PLAY" // Play video
|
|
221
|
+
| "UI_PLUS" // Increase zoom
|
|
222
|
+
| "UI_REDUCE" // Reducing an extended view
|
|
223
|
+
| "UI_360" // 360-degree view
|
|
224
|
+
| "UI_VOLUME" // Video volume
|
|
225
|
+
| "UI_VOLUME_OFF" // Muted video
|
|
226
|
+
| "CONTROLS_PREV" // Go to previous media
|
|
227
|
+
| "CONTROLS_NEXT" // Go to next media
|
|
228
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
229
|
+
| (string & {});
|
|
230
|
+
|
|
231
|
+
export declare type WebPlayerIconProps = {
|
|
232
|
+
name: WebPlayerIconName;
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
export declare type WebPlayerProps = WebPlayerProps_2 & {
|
|
236
|
+
class?: string;
|
|
237
|
+
style?: HTMLElement["style"];
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
declare type WebPlayerProps_2 = {
|
|
201
241
|
compositionUrl: string;
|
|
242
|
+
|
|
243
|
+
// Layout
|
|
202
244
|
hideCategories?: boolean;
|
|
203
245
|
infiniteCarrousel?: boolean;
|
|
204
246
|
permanentGallery?: boolean;
|
|
205
|
-
|
|
247
|
+
|
|
248
|
+
// Medias loading
|
|
249
|
+
mediaLoadStrategy?: MediaLoadStrategy;
|
|
206
250
|
minMediaWidth?: MediaWidth;
|
|
207
251
|
maxMediaWidth?: MediaWidth;
|
|
208
252
|
preloadRange?: number;
|
|
253
|
+
|
|
254
|
+
// Miscelaneous
|
|
209
255
|
preventFullScreen?: boolean;
|
|
210
256
|
eventPrefix?: string;
|
|
211
257
|
reverse360?: boolean;
|