@car-cutter/vue-webplayer 0.13.0 → 3.0.1
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/README.md +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.js +16 -14
- package/dist/vue2.d.ts +8 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -10,4 +10,4 @@ Use CarCutter WebPlayer in your Vue.js app
|
|
|
10
10
|
|
|
11
11
|
### Next Steps
|
|
12
12
|
|
|
13
|
-
For more
|
|
13
|
+
For more customization, take a look at the **[Online Documentation](https://carcutter.github.io/cars-webplayer-js/)**
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),e=require("./utils-CbTbWQZC.cjs"),O=require("@car-cutter/wc-webplayer"),C=o.defineComponent({__name:"WebPlayer",props:{compositionUrl:{},hideCategoriesNav:{type:Boolean},infiniteCarrousel:{type:Boolean},permanentGallery:{type:Boolean},mediaLoadStrategy:{},minMediaWidth:{},maxMediaWidth:{},preloadRange:{},autoLoad360:{type:Boolean},autoLoadInterior360:{type:Boolean},categoriesFilter:{},extendBehavior:{},eventPrefix:{},demoSpin:{type:Boolean},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=t=>`${p}${t}`,m={[e.EVENT_COMPOSITION_LOADING]:t=>E("compositionLoading",t),[e.EVENT_COMPOSITION_LOADED]:t=>E("compositionLoaded",t),[e.EVENT_COMPOSITION_LOAD_ERROR]:t=>E("compositionLoadError",t),[e.EVENT_ITEM_CHANGE]:t=>E("itemChange",t),[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(([t,n])=>{if(!n)return;const P=d(t),u=L=>n(L.detail);T.set(P,u)}),o.onMounted(()=>{T.forEach((t,n)=>{document.addEventListener(n,t)})}),o.onUnmounted(()=>{T.forEach((t,n)=>{document.removeEventListener(n,t)})}),(t,n)=>(o.openBlock(),o.createElementBlock("cc-webplayer",o.mergeProps(o.unref(N),{class:o.unref(a),style:l}),[o.renderSlot(t.$slots,"default")],16))}}),A=o.defineComponent({__name:"WebPlayerCustomMedia",props:{index:{},thumbnailSrc:{}},setup(_){const s=_,r=O.webPlayerCustomMediaPropsToAttributes(s);return(a,i)=>(o.openBlock(),o.createElementBlock("cc-webplayer-custom-media",o.normalizeProps(o.guardReactiveProps(o.unref(r))),[o.renderSlot(a.$slots,"default")],16))}}),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),e=require("./utils-CbTbWQZC.cjs"),O=require("@car-cutter/wc-webplayer"),C=o.defineComponent({__name:"WebPlayer",props:{compositionUrl:{},integration:{type:Boolean},maxItemsShown:{},hideCategoriesNav:{type:Boolean},infiniteCarrousel:{type:Boolean},permanentGallery:{type:Boolean},mediaLoadStrategy:{},minMediaWidth:{},maxMediaWidth:{},preloadRange:{},autoLoad360:{type:Boolean},autoLoadInterior360:{type:Boolean},categoriesFilter:{},extendBehavior:{},eventPrefix:{},demoSpin:{type:Boolean},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=t=>`${p}${t}`,m={[e.EVENT_COMPOSITION_LOADING]:t=>E("compositionLoading",t),[e.EVENT_COMPOSITION_LOADED]:t=>E("compositionLoaded",t),[e.EVENT_COMPOSITION_LOAD_ERROR]:t=>E("compositionLoadError",t),[e.EVENT_ITEM_CHANGE]:t=>E("itemChange",t),[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(([t,n])=>{if(!n)return;const P=d(t),u=L=>n(L.detail);T.set(P,u)}),o.onMounted(()=>{T.forEach((t,n)=>{document.addEventListener(n,t)})}),o.onUnmounted(()=>{T.forEach((t,n)=>{document.removeEventListener(n,t)})}),(t,n)=>(o.openBlock(),o.createElementBlock("cc-webplayer",o.mergeProps(o.unref(N),{class:o.unref(a),style:l}),[o.renderSlot(t.$slots,"default")],16))}}),A=o.defineComponent({__name:"WebPlayerCustomMedia",props:{index:{},thumbnailSrc:{}},setup(_){const s=_,r=O.webPlayerCustomMediaPropsToAttributes(s);return(a,i)=>(o.openBlock(),o.createElementBlock("cc-webplayer-custom-media",o.normalizeProps(o.guardReactiveProps(o.unref(r))),[o.renderSlot(a.$slots,"default")],16))}}),I=o.defineComponent({__name:"WebPlayerIcon",props:{name:{}},setup(_){const s=_,r=O.webPlayerIconPropsToAttributes(s);return(a,i)=>(o.openBlock(),o.createElementBlock("cc-webplayer-icon",o.normalizeProps(o.guardReactiveProps(o.unref(r))),[o.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=I;
|
package/dist/index.d.ts
CHANGED
|
@@ -231,8 +231,10 @@ declare type WebPlayerIconName =
|
|
|
231
231
|
| "UI_PLAY" // Play video
|
|
232
232
|
| "UI_PLUS" // Increase zoom
|
|
233
233
|
| "UI_REDUCE" // Reducing an extended view
|
|
234
|
-
| "UI_360" // 360
|
|
235
|
-
| "
|
|
234
|
+
| "UI_360" // Exterior 360 view
|
|
235
|
+
| "UI_360_PLAY" // Play exterior 360
|
|
236
|
+
| "UI_INTERIOR_360" // Interior 360 view
|
|
237
|
+
| "UI_INTERIOR_360_PLAY" // Play interior 360 view
|
|
236
238
|
| "UI_VOLUME" // Video volume
|
|
237
239
|
| "UI_VOLUME_OFF" // Muted video
|
|
238
240
|
| "CONTROLS_PREV" // Go to previous media
|
|
@@ -252,6 +254,10 @@ export declare type WebPlayerProps = WebPlayerProps_2 & {
|
|
|
252
254
|
declare type WebPlayerProps_2 = {
|
|
253
255
|
compositionUrl: string;
|
|
254
256
|
|
|
257
|
+
// Integration mode
|
|
258
|
+
integration?: boolean;
|
|
259
|
+
maxItemsShown?: number;
|
|
260
|
+
|
|
255
261
|
// Layout
|
|
256
262
|
hideCategoriesNav?: boolean;
|
|
257
263
|
infiniteCarrousel?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { defineComponent as l, onMounted as M, onUnmounted as h, createElementBlock as E, openBlock as _, mergeProps as g, unref as r, renderSlot as m, normalizeProps as d, guardReactiveProps as O } from "vue";
|
|
2
|
-
import { D as A, E as
|
|
2
|
+
import { D as A, E as I, a as v, b as W, c as B, d as S, e as x, f as D, g as R, h as V, i as w } from "./utils-TWVtfImY.js";
|
|
3
3
|
import { j as K, k as Q, W as Z, l as ee } from "./utils-TWVtfImY.js";
|
|
4
4
|
import { ensureCustomElementsDefinition as G, webPlayerPropsToAttributes as F, webPlayerCustomMediaPropsToAttributes as $, webPlayerIconPropsToAttributes as U } from "@car-cutter/wc-webplayer";
|
|
5
5
|
const X = /* @__PURE__ */ l({
|
|
6
6
|
__name: "WebPlayer",
|
|
7
7
|
props: {
|
|
8
8
|
compositionUrl: {},
|
|
9
|
+
integration: { type: Boolean },
|
|
10
|
+
maxItemsShown: {},
|
|
9
11
|
hideCategoriesNav: { type: Boolean },
|
|
10
12
|
infiniteCarrousel: { type: Boolean },
|
|
11
13
|
permanentGallery: { type: Boolean },
|
|
@@ -26,7 +28,7 @@ const X = /* @__PURE__ */ l({
|
|
|
26
28
|
emits: ["compositionLoading", "compositionLoaded", "compositionLoadError", "itemChange", "extendModeOn", "extendModeOff", "hotspotsOn", "hotspotsOff", "galleryOpen", "galleryClose"],
|
|
27
29
|
setup(n, { emit: i }) {
|
|
28
30
|
G();
|
|
29
|
-
const s = n, { class: a, style:
|
|
31
|
+
const s = n, { class: a, style: p, ...u } = s, y = { display: "block", ...p ?? {} }, f = F(u), o = i, P = s.eventPrefix ?? A, T = (e) => `${P}${e}`, L = {
|
|
30
32
|
[w]: (e) => o("compositionLoading", e),
|
|
31
33
|
[V]: (e) => o("compositionLoaded", e),
|
|
32
34
|
[R]: (e) => o("compositionLoadError", e),
|
|
@@ -35,25 +37,25 @@ const X = /* @__PURE__ */ l({
|
|
|
35
37
|
[S]: () => o("extendModeOff"),
|
|
36
38
|
[B]: () => o("hotspotsOn"),
|
|
37
39
|
[W]: () => o("hotspotsOff"),
|
|
38
|
-
[
|
|
39
|
-
[
|
|
40
|
-
},
|
|
40
|
+
[v]: () => o("galleryOpen"),
|
|
41
|
+
[I]: () => o("galleryClose")
|
|
42
|
+
}, c = /* @__PURE__ */ new Map();
|
|
41
43
|
return Object.entries(L).forEach(([e, t]) => {
|
|
42
44
|
if (!t)
|
|
43
45
|
return;
|
|
44
46
|
const N = T(e), b = (C) => t(C.detail);
|
|
45
|
-
|
|
47
|
+
c.set(N, b);
|
|
46
48
|
}), M(() => {
|
|
47
|
-
|
|
49
|
+
c.forEach((e, t) => {
|
|
48
50
|
document.addEventListener(t, e);
|
|
49
51
|
});
|
|
50
52
|
}), h(() => {
|
|
51
|
-
|
|
53
|
+
c.forEach((e, t) => {
|
|
52
54
|
document.removeEventListener(t, e);
|
|
53
55
|
});
|
|
54
|
-
}), (e, t) => (_(), E("cc-webplayer", g(r(
|
|
56
|
+
}), (e, t) => (_(), E("cc-webplayer", g(r(f), {
|
|
55
57
|
class: r(a),
|
|
56
|
-
style:
|
|
58
|
+
style: y
|
|
57
59
|
}), [
|
|
58
60
|
m(e.$slots, "default")
|
|
59
61
|
], 16));
|
|
@@ -66,7 +68,7 @@ const X = /* @__PURE__ */ l({
|
|
|
66
68
|
},
|
|
67
69
|
setup(n) {
|
|
68
70
|
const s = $(n);
|
|
69
|
-
return (a,
|
|
71
|
+
return (a, p) => (_(), E("cc-webplayer-custom-media", d(O(r(s))), [
|
|
70
72
|
m(a.$slots, "default")
|
|
71
73
|
], 16));
|
|
72
74
|
}
|
|
@@ -77,7 +79,7 @@ const X = /* @__PURE__ */ l({
|
|
|
77
79
|
},
|
|
78
80
|
setup(n) {
|
|
79
81
|
const s = U(n);
|
|
80
|
-
return (a,
|
|
82
|
+
return (a, p) => (_(), E("cc-webplayer-icon", d(O(r(s))), [
|
|
81
83
|
m(a.$slots, "default")
|
|
82
84
|
], 16));
|
|
83
85
|
}
|
|
@@ -89,8 +91,8 @@ export {
|
|
|
89
91
|
R as EVENT_COMPOSITION_LOAD_ERROR,
|
|
90
92
|
S as EVENT_EXTEND_MODE_OFF,
|
|
91
93
|
x as EVENT_EXTEND_MODE_ON,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
I as EVENT_GALLERY_CLOSE,
|
|
95
|
+
v as EVENT_GALLERY_OPEN,
|
|
94
96
|
W as EVENT_HOTSPOTS_OFF,
|
|
95
97
|
B as EVENT_HOTSPOTS_ON,
|
|
96
98
|
D as EVENT_ITEM_CHANGE,
|
package/dist/vue2.d.ts
CHANGED
|
@@ -225,8 +225,10 @@ declare type WebPlayerIconName =
|
|
|
225
225
|
| "UI_PLAY" // Play video
|
|
226
226
|
| "UI_PLUS" // Increase zoom
|
|
227
227
|
| "UI_REDUCE" // Reducing an extended view
|
|
228
|
-
| "UI_360" // 360
|
|
229
|
-
| "
|
|
228
|
+
| "UI_360" // Exterior 360 view
|
|
229
|
+
| "UI_360_PLAY" // Play exterior 360
|
|
230
|
+
| "UI_INTERIOR_360" // Interior 360 view
|
|
231
|
+
| "UI_INTERIOR_360_PLAY" // Play interior 360 view
|
|
230
232
|
| "UI_VOLUME" // Video volume
|
|
231
233
|
| "UI_VOLUME_OFF" // Muted video
|
|
232
234
|
| "CONTROLS_PREV" // Go to previous media
|
|
@@ -241,6 +243,10 @@ export declare type WebPlayerIconProps = {
|
|
|
241
243
|
export declare type WebPlayerProps = {
|
|
242
244
|
compositionUrl: string;
|
|
243
245
|
|
|
246
|
+
// Integration mode
|
|
247
|
+
integration?: boolean;
|
|
248
|
+
maxItemsShown?: number;
|
|
249
|
+
|
|
244
250
|
// Layout
|
|
245
251
|
hideCategoriesNav?: boolean;
|
|
246
252
|
infiniteCarrousel?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@car-cutter/vue-webplayer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CarCutter",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"analyze": "vite-bundle-visualizer"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@car-cutter/wc-webplayer": "0.
|
|
44
|
+
"@car-cutter/wc-webplayer": "3.0.1"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"vue": ">=2"
|