@car-cutter/vue-webplayer 0.13.0 → 3.0.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/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 customisation, take a look at the **[Online Documentation](https://carcutter.github.io/cars-webplayer-js/)**
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))}}),M=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=M;
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
@@ -252,6 +252,10 @@ export declare type WebPlayerProps = WebPlayerProps_2 & {
252
252
  declare type WebPlayerProps_2 = {
253
253
  compositionUrl: string;
254
254
 
255
+ // Integration mode
256
+ integration?: boolean;
257
+ maxItemsShown?: number;
258
+
255
259
  // Layout
256
260
  hideCategoriesNav?: boolean;
257
261
  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 v, a as I, 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";
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: c, ...u } = s, f = { display: "block", ...c ?? {} }, y = F(u), o = i, P = s.eventPrefix ?? A, T = (e) => `${P}${e}`, L = {
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
- [I]: () => o("galleryOpen"),
39
- [v]: () => o("galleryClose")
40
- }, p = /* @__PURE__ */ new Map();
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
- p.set(N, b);
47
+ c.set(N, b);
46
48
  }), M(() => {
47
- p.forEach((e, t) => {
49
+ c.forEach((e, t) => {
48
50
  document.addEventListener(t, e);
49
51
  });
50
52
  }), h(() => {
51
- p.forEach((e, t) => {
53
+ c.forEach((e, t) => {
52
54
  document.removeEventListener(t, e);
53
55
  });
54
- }), (e, t) => (_(), E("cc-webplayer", g(r(y), {
56
+ }), (e, t) => (_(), E("cc-webplayer", g(r(f), {
55
57
  class: r(a),
56
- style: f
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, c) => (_(), E("cc-webplayer-custom-media", d(O(r(s))), [
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, c) => (_(), E("cc-webplayer-icon", d(O(r(s))), [
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
- v as EVENT_GALLERY_CLOSE,
93
- I as EVENT_GALLERY_OPEN,
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
@@ -241,6 +241,10 @@ export declare type WebPlayerIconProps = {
241
241
  export declare type WebPlayerProps = {
242
242
  compositionUrl: string;
243
243
 
244
+ // Integration mode
245
+ integration?: boolean;
246
+ maxItemsShown?: number;
247
+
244
248
  // Layout
245
249
  hideCategoriesNav?: boolean;
246
250
  infiniteCarrousel?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@car-cutter/vue-webplayer",
3
- "version": "0.13.0",
3
+ "version": "3.0.0",
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.13.0"
44
+ "@car-cutter/wc-webplayer": "3.0.0"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "vue": ">=2"