@car-cutter/react-webplayer 3.1.0 → 3.1.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/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./shared-Dj9ilM-O.cjs");require("react/jsx-runtime");const S=require("react"),V=require("react-dom/client");var R=Object.defineProperty,D=(e,t,r)=>t in e?R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t,r)=>D(e,typeof t!="symbol"?t+"":t,r);const v={stringify:e=>e?"true":"false",parse:e=>/^[ty1-9]/i.test(e)},w={stringify:e=>e.name,parse:(e,t,r)=>{const s=(()=>{if(typeof window<"u"&&e in window)return window[e];if(typeof global<"u"&&e in global)return global[e]})();return typeof s=="function"?s.bind(r):void 0}},M={stringify:e=>JSON.stringify(e),parse:e=>JSON.parse(e)};function Y(e){return e.replace(/([a-z0-9])([A-Z])/g,(t,r,s)=>`${r}-${s.toLowerCase()}`)}function L(e){return e.replace(/[-:]([a-z])/g,(t,r)=>`${r.toUpperCase()}`)}const G={stringify:e=>e.name,parse:(e,t,r)=>{const s=(()=>{const _=L(t);if(typeof r<"u"&&_ in r.container)return r.container[_]})();return typeof s=="function"?s.bind(r):void 0}},F={stringify:e=>`${e}`,parse:e=>parseFloat(e)},j={stringify:e=>e,parse:e=>e},N={string:j,number:F,boolean:v,function:w,method:G,json:M},f=Symbol.for("r2wc.render"),O=Symbol.for("r2wc.connected"),T=Symbol.for("r2wc.context"),a=Symbol.for("r2wc.props");function k(e,t,r){var s,_,C;t.props||(t.props=e.propTypes?Object.keys(e.propTypes):[]),t.events||(t.events=[]);const h=Array.isArray(t.props)?t.props.slice():Object.keys(t.props),g=Array.isArray(t.events)?t.events.slice():Object.keys(t.events),b={},P={},m={},d={};for(const i of h){b[i]=Array.isArray(t.props)?"string":t.props[i];const o=Y(i);m[i]=o,d[o]=i}for(const i of g)P[i]=Array.isArray(t.events)?{}:t.events[i];class I extends HTMLElement{constructor(){super(),y(this,C,!0),y(this,_),y(this,s,{}),y(this,"container"),t.shadow?this.container=this.attachShadow({mode:t.shadow}):this.container=this,this[a].container=this.container;for(const o of h){const l=m[o],E=this.getAttribute(l),c=b[o],u=c?N[c]:null;if(c==="method"){const p=L(l);Object.defineProperty(this[a].container,p,{enumerable:!0,configurable:!0,get(){return this[a][p]},set(W){this[a][p]=W,this[f]()}}),this[a][o]=u.parse(E,l,this)}u!=null&&u.parse&&E&&(this[a][o]=u.parse(E,l,this))}for(const o of g)this[a][o]=l=>{const E=o.replace(/^on/,"").toLowerCase();this.dispatchEvent(new CustomEvent(E,{detail:l,...P[o]}))}}static get observedAttributes(){return Object.keys(d)}connectedCallback(){this[O]=!0,this[f]()}disconnectedCallback(){this[O]=!1,this[T]&&r.unmount(this[T]),delete this[T]}attributeChangedCallback(o,l,E){const c=d[o],u=b[c],p=u?N[u]:null;c in b&&p!=null&&p.parse&&E&&(this[a][c]=p.parse(E,o,this),this[f]())}[(C=O,_=T,s=a,f)](){this[O]&&(this[T]?r.update(this[T],this[a]):this[T]=r.mount(this.container,e,this[a]))}}for(const i of h){const o=m[i],l=b[i];Object.defineProperty(I.prototype,i,{enumerable:!0,configurable:!0,get(){return this[a][i]},set(E){this[a][i]=E;const c=l?N[l]:null;if(c!=null&&c.stringify){const u=c.stringify(E,o,this);this.getAttribute(o)!==u&&this.setAttribute(o,u)}else this[f]()}})}return I}function x(e,t,r){const s=V.createRoot(e),_=S.createElement(t,r);return s.render(_),{root:s,ReactComponent:t}}function B({root:e,ReactComponent:t},r){const s=S.createElement(t,r);e.render(s)}function U({root:e}){setTimeout(()=>{e.unmount()},0)}function A(e,t={}){return k(e,t,{mount:x,update:B,unmount:U})}const $=A(n.WebPlayerWithInjectedStyles,{shadow:"closed",props:{compositionUrl:"string",hideCategoriesNav:"boolean",infiniteCarrousel:"boolean",permanentGallery:"boolean",integration:"boolean",maxItemsShown:"number",minMediaWidth:"number",maxMediaWidth:"number",mediaLoadStrategy:"string",preloadRange:"number",autoLoad360:"boolean",autoLoadInterior360:"boolean",categoriesFilter:"string",extendBehavior:"string",eventPrefix:"string",demoSpin:"boolean",reverse360:"boolean",analyticsEventPrefix:"string",analyticsUrl:"string",analyticsBearer:"string",analyticsSimpleRequestsOnly:"boolean",analyticsDryRun:"boolean",analyticsDebug:"boolean"}}),H=A(n.WebPlayerCustomMedia,{shadow:"closed",props:{index:"number",thumbnailSrc:"string"}}),X=A(n.WebPlayerIcon,{shadow:"closed",props:{name:"string"}});function q(){customElements.define(n.WEB_PLAYER_WC_TAG,$),customElements.define(n.WEB_PLAYER_CUSTOM_MEDIA_WC_TAG,H),customElements.define(n.WEB_PLAYER_ICON_WC_TAG,X)}function z(){n.checkCustomElementsDefinition()||q()}z();exports.ANALYTICS_EVENT_IDENTIFY=n.ANALYTICS_EVENT_IDENTIFY;exports.ANALYTICS_EVENT_PAGE=n.ANALYTICS_EVENT_PAGE;exports.ANALYTICS_EVENT_TRACK=n.ANALYTICS_EVENT_TRACK;exports.DEFAULT_EVENT_PREFIX=n.DEFAULT_EVENT_PREFIX;exports.EVENT_COMPOSITION_LOADED=n.EVENT_COMPOSITION_LOADED;exports.EVENT_COMPOSITION_LOADING=n.EVENT_COMPOSITION_LOADING;exports.EVENT_COMPOSITION_LOAD_ERROR=n.EVENT_COMPOSITION_LOAD_ERROR;exports.EVENT_EXTEND_MODE_OFF=n.EVENT_EXTEND_MODE_OFF;exports.EVENT_EXTEND_MODE_ON=n.EVENT_EXTEND_MODE_ON;exports.EVENT_GALLERY_CLOSE=n.EVENT_GALLERY_CLOSE;exports.EVENT_GALLERY_OPEN=n.EVENT_GALLERY_OPEN;exports.EVENT_HOTSPOTS_OFF=n.EVENT_HOTSPOTS_OFF;exports.EVENT_HOTSPOTS_ON=n.EVENT_HOTSPOTS_ON;exports.EVENT_ITEM_CHANGE=n.EVENT_ITEM_CHANGE;exports.WEB_PLAYER_ICON_WC_TAG=n.WEB_PLAYER_ICON_WC_TAG;exports.WEB_PLAYER_WC_TAG=n.WEB_PLAYER_WC_TAG;exports.WebPlayer=n.WebPlayer;exports.WebPlayerCustomMedia=n.WebPlayerCustomMedia$1;exports.WebPlayerIcon=n.WebPlayerIcon$1;exports.generateCompositionUrl=n.generateCompositionUrl;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./shared-BeSqCz-A.cjs");require("react/jsx-runtime");const S=require("react"),V=require("react-dom/client");var R=Object.defineProperty,D=(e,t,r)=>t in e?R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t,r)=>D(e,typeof t!="symbol"?t+"":t,r);const v={stringify:e=>e?"true":"false",parse:e=>/^[ty1-9]/i.test(e)},w={stringify:e=>e.name,parse:(e,t,r)=>{const s=(()=>{if(typeof window<"u"&&e in window)return window[e];if(typeof global<"u"&&e in global)return global[e]})();return typeof s=="function"?s.bind(r):void 0}},M={stringify:e=>JSON.stringify(e),parse:e=>JSON.parse(e)};function Y(e){return e.replace(/([a-z0-9])([A-Z])/g,(t,r,s)=>`${r}-${s.toLowerCase()}`)}function L(e){return e.replace(/[-:]([a-z])/g,(t,r)=>`${r.toUpperCase()}`)}const G={stringify:e=>e.name,parse:(e,t,r)=>{const s=(()=>{const _=L(t);if(typeof r<"u"&&_ in r.container)return r.container[_]})();return typeof s=="function"?s.bind(r):void 0}},F={stringify:e=>`${e}`,parse:e=>parseFloat(e)},j={stringify:e=>e,parse:e=>e},N={string:j,number:F,boolean:v,function:w,method:G,json:M},f=Symbol.for("r2wc.render"),O=Symbol.for("r2wc.connected"),T=Symbol.for("r2wc.context"),a=Symbol.for("r2wc.props");function k(e,t,r){var s,_,C;t.props||(t.props=e.propTypes?Object.keys(e.propTypes):[]),t.events||(t.events=[]);const h=Array.isArray(t.props)?t.props.slice():Object.keys(t.props),g=Array.isArray(t.events)?t.events.slice():Object.keys(t.events),b={},P={},m={},d={};for(const i of h){b[i]=Array.isArray(t.props)?"string":t.props[i];const o=Y(i);m[i]=o,d[o]=i}for(const i of g)P[i]=Array.isArray(t.events)?{}:t.events[i];class I extends HTMLElement{constructor(){super(),y(this,C,!0),y(this,_),y(this,s,{}),y(this,"container"),t.shadow?this.container=this.attachShadow({mode:t.shadow}):this.container=this,this[a].container=this.container;for(const o of h){const l=m[o],E=this.getAttribute(l),c=b[o],u=c?N[c]:null;if(c==="method"){const p=L(l);Object.defineProperty(this[a].container,p,{enumerable:!0,configurable:!0,get(){return this[a][p]},set(W){this[a][p]=W,this[f]()}}),this[a][o]=u.parse(E,l,this)}u!=null&&u.parse&&E&&(this[a][o]=u.parse(E,l,this))}for(const o of g)this[a][o]=l=>{const E=o.replace(/^on/,"").toLowerCase();this.dispatchEvent(new CustomEvent(E,{detail:l,...P[o]}))}}static get observedAttributes(){return Object.keys(d)}connectedCallback(){this[O]=!0,this[f]()}disconnectedCallback(){this[O]=!1,this[T]&&r.unmount(this[T]),delete this[T]}attributeChangedCallback(o,l,E){const c=d[o],u=b[c],p=u?N[u]:null;c in b&&p!=null&&p.parse&&E&&(this[a][c]=p.parse(E,o,this),this[f]())}[(C=O,_=T,s=a,f)](){this[O]&&(this[T]?r.update(this[T],this[a]):this[T]=r.mount(this.container,e,this[a]))}}for(const i of h){const o=m[i],l=b[i];Object.defineProperty(I.prototype,i,{enumerable:!0,configurable:!0,get(){return this[a][i]},set(E){this[a][i]=E;const c=l?N[l]:null;if(c!=null&&c.stringify){const u=c.stringify(E,o,this);this.getAttribute(o)!==u&&this.setAttribute(o,u)}else this[f]()}})}return I}function x(e,t,r){const s=V.createRoot(e),_=S.createElement(t,r);return s.render(_),{root:s,ReactComponent:t}}function B({root:e,ReactComponent:t},r){const s=S.createElement(t,r);e.render(s)}function U({root:e}){setTimeout(()=>{e.unmount()},0)}function A(e,t={}){return k(e,t,{mount:x,update:B,unmount:U})}const $=A(n.WebPlayerWithInjectedStyles,{shadow:"closed",props:{compositionUrl:"string",hideCategoriesNav:"boolean",infiniteCarrousel:"boolean",permanentGallery:"boolean",integration:"boolean",maxItemsShown:"number",minMediaWidth:"number",maxMediaWidth:"number",mediaLoadStrategy:"string",preloadRange:"number",autoLoad360:"boolean",autoLoadInterior360:"boolean",categoriesFilter:"string",extendBehavior:"string",eventPrefix:"string",demoSpin:"boolean",reverse360:"boolean",spinCursor:"string",analyticsEventPrefix:"string",analyticsUrl:"string",analyticsBearer:"string",analyticsSimpleRequestsOnly:"boolean",analyticsDryRun:"boolean",analyticsDebug:"boolean"}}),H=A(n.WebPlayerCustomMedia,{shadow:"closed",props:{index:"number",thumbnailSrc:"string"}}),X=A(n.WebPlayerIcon,{shadow:"closed",props:{name:"string"}});function q(){customElements.define(n.WEB_PLAYER_WC_TAG,$),customElements.define(n.WEB_PLAYER_CUSTOM_MEDIA_WC_TAG,H),customElements.define(n.WEB_PLAYER_ICON_WC_TAG,X)}function z(){n.checkCustomElementsDefinition()||q()}z();exports.ANALYTICS_EVENT_IDENTIFY=n.ANALYTICS_EVENT_IDENTIFY;exports.ANALYTICS_EVENT_PAGE=n.ANALYTICS_EVENT_PAGE;exports.ANALYTICS_EVENT_TRACK=n.ANALYTICS_EVENT_TRACK;exports.DEFAULT_EVENT_PREFIX=n.DEFAULT_EVENT_PREFIX;exports.EVENT_COMPOSITION_LOADED=n.EVENT_COMPOSITION_LOADED;exports.EVENT_COMPOSITION_LOADING=n.EVENT_COMPOSITION_LOADING;exports.EVENT_COMPOSITION_LOAD_ERROR=n.EVENT_COMPOSITION_LOAD_ERROR;exports.EVENT_EXTEND_MODE_OFF=n.EVENT_EXTEND_MODE_OFF;exports.EVENT_EXTEND_MODE_ON=n.EVENT_EXTEND_MODE_ON;exports.EVENT_GALLERY_CLOSE=n.EVENT_GALLERY_CLOSE;exports.EVENT_GALLERY_OPEN=n.EVENT_GALLERY_OPEN;exports.EVENT_HOTSPOTS_OFF=n.EVENT_HOTSPOTS_OFF;exports.EVENT_HOTSPOTS_ON=n.EVENT_HOTSPOTS_ON;exports.EVENT_ITEM_CHANGE=n.EVENT_ITEM_CHANGE;exports.WEB_PLAYER_ICON_WC_TAG=n.WEB_PLAYER_ICON_WC_TAG;exports.WEB_PLAYER_WC_TAG=n.WEB_PLAYER_WC_TAG;exports.WebPlayer=n.WebPlayer;exports.WebPlayerCustomMedia=n.WebPlayerCustomMedia$1;exports.WebPlayerIcon=n.WebPlayerIcon$1;exports.generateCompositionUrl=n.generateCompositionUrl;
package/dist/index.d.ts CHANGED
@@ -297,6 +297,7 @@ declare type WebPlayerProps_2 = {
297
297
  eventPrefix?: string;
298
298
  demoSpin?: boolean;
299
299
  reverse360?: boolean;
300
+ spinCursor?: string;
300
301
 
301
302
  // Analytics
302
303
  analyticsEventPrefix?: string;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { W as I, a as L, b as W, c as D, d as R, e as V, f as M } from "./shared-D7cc889c.js";
2
- import { A as ce, g as le, h as ue, D as pe, E as fe, i as me, j as be, k as Ee, l as he, m as ye, n as de, o as ge, p as _e, q as Te, r as Oe, s as Ae, t as Ce, u as Ne } from "./shared-D7cc889c.js";
1
+ import { W as I, a as L, b as W, c as D, d as R, e as V, f as M } from "./shared-DVyC4OMr.js";
2
+ import { A as ce, g as le, h as ue, D as pe, E as fe, i as me, j as be, k as Ee, l as he, m as ye, n as de, o as ge, p as _e, q as Te, r as Ce, s as Oe, t as Ae, u as Ne } from "./shared-DVyC4OMr.js";
3
3
  import "react/jsx-runtime";
4
4
  import P from "react";
5
5
  import { createRoot as j } from "react-dom/client";
@@ -10,13 +10,13 @@ const F = {
10
10
  }, G = {
11
11
  stringify: (e) => e.name,
12
12
  parse: (e, t, n) => {
13
- const r = (() => {
13
+ const o = (() => {
14
14
  if (typeof window < "u" && e in window)
15
15
  return window[e];
16
16
  if (typeof global < "u" && e in global)
17
17
  return global[e];
18
18
  })();
19
- return typeof r == "function" ? r.bind(n) : void 0;
19
+ return typeof o == "function" ? o.bind(n) : void 0;
20
20
  }
21
21
  }, Y = {
22
22
  stringify: (e) => JSON.stringify(e),
@@ -25,7 +25,7 @@ const F = {
25
25
  function U(e) {
26
26
  return e.replace(
27
27
  /([a-z0-9])([A-Z])/g,
28
- (t, n, r) => `${n}-${r.toLowerCase()}`
28
+ (t, n, o) => `${n}-${o.toLowerCase()}`
29
29
  );
30
30
  }
31
31
  function v(e) {
@@ -34,12 +34,12 @@ function v(e) {
34
34
  const $ = {
35
35
  stringify: (e) => e.name,
36
36
  parse: (e, t, n) => {
37
- const r = (() => {
37
+ const o = (() => {
38
38
  const p = v(t);
39
39
  if (typeof n < "u" && p in n.container)
40
40
  return n.container[p];
41
41
  })();
42
- return typeof r == "function" ? r.bind(n) : void 0;
42
+ return typeof o == "function" ? o.bind(n) : void 0;
43
43
  }
44
44
  }, B = {
45
45
  stringify: (e) => `${e}`,
@@ -56,23 +56,23 @@ const $ = {
56
56
  json: Y
57
57
  }, E = Symbol.for("r2wc.render"), y = Symbol.for("r2wc.connected"), m = Symbol.for("r2wc.context"), i = Symbol.for("r2wc.props");
58
58
  function z(e, t, n) {
59
- var r, p, A;
59
+ var o, p, O;
60
60
  t.props || (t.props = e.propTypes ? Object.keys(e.propTypes) : []), t.events || (t.events = []);
61
- const d = Array.isArray(t.props) ? t.props.slice() : Object.keys(t.props), C = Array.isArray(t.events) ? t.events.slice() : Object.keys(t.events), b = {}, N = {}, g = {}, _ = {};
61
+ const d = Array.isArray(t.props) ? t.props.slice() : Object.keys(t.props), A = Array.isArray(t.events) ? t.events.slice() : Object.keys(t.events), b = {}, N = {}, g = {}, _ = {};
62
62
  for (const s of d) {
63
63
  b[s] = Array.isArray(t.props) ? "string" : t.props[s];
64
- const o = U(s);
65
- g[s] = o, _[o] = s;
64
+ const r = U(s);
65
+ g[s] = r, _[r] = s;
66
66
  }
67
- for (const s of C)
67
+ for (const s of A)
68
68
  N[s] = Array.isArray(t.events) ? {} : t.events[s];
69
69
  class S extends HTMLElement {
70
70
  constructor() {
71
- super(), h(this, A, !0), h(this, p), h(this, r, {}), h(this, "container"), t.shadow ? this.container = this.attachShadow({
71
+ super(), h(this, O, !0), h(this, p), h(this, o, {}), h(this, "container"), t.shadow ? this.container = this.attachShadow({
72
72
  mode: t.shadow
73
73
  }) : this.container = this, this[i].container = this.container;
74
- for (const o of d) {
75
- const l = g[o], a = this.getAttribute(l), c = b[o], u = c ? T[c] : null;
74
+ for (const r of d) {
75
+ const l = g[r], a = this.getAttribute(l), c = b[r], u = c ? T[c] : null;
76
76
  if (c === "method") {
77
77
  const f = v(l);
78
78
  Object.defineProperty(this[i].container, f, {
@@ -84,15 +84,15 @@ function z(e, t, n) {
84
84
  set(w) {
85
85
  this[i][f] = w, this[E]();
86
86
  }
87
- }), this[i][o] = u.parse(a, l, this);
87
+ }), this[i][r] = u.parse(a, l, this);
88
88
  }
89
- u != null && u.parse && a && (this[i][o] = u.parse(a, l, this));
89
+ u != null && u.parse && a && (this[i][r] = u.parse(a, l, this));
90
90
  }
91
- for (const o of C)
92
- this[i][o] = (l) => {
93
- const a = o.replace(/^on/, "").toLowerCase();
91
+ for (const r of A)
92
+ this[i][r] = (l) => {
93
+ const a = r.replace(/^on/, "").toLowerCase();
94
94
  this.dispatchEvent(
95
- new CustomEvent(a, { detail: l, ...N[o] })
95
+ new CustomEvent(a, { detail: l, ...N[r] })
96
96
  );
97
97
  };
98
98
  }
@@ -105,11 +105,11 @@ function z(e, t, n) {
105
105
  disconnectedCallback() {
106
106
  this[y] = !1, this[m] && n.unmount(this[m]), delete this[m];
107
107
  }
108
- attributeChangedCallback(o, l, a) {
109
- const c = _[o], u = b[c], f = u ? T[u] : null;
110
- c in b && f != null && f.parse && a && (this[i][c] = f.parse(a, o, this), this[E]());
108
+ attributeChangedCallback(r, l, a) {
109
+ const c = _[r], u = b[c], f = u ? T[u] : null;
110
+ c in b && f != null && f.parse && a && (this[i][c] = f.parse(a, r, this), this[E]());
111
111
  }
112
- [(A = y, p = m, r = i, E)]() {
112
+ [(O = y, p = m, o = i, E)]() {
113
113
  this[y] && (this[m] ? n.update(this[m], this[i]) : this[m] = n.mount(
114
114
  this.container,
115
115
  e,
@@ -118,7 +118,7 @@ function z(e, t, n) {
118
118
  }
119
119
  }
120
120
  for (const s of d) {
121
- const o = g[s], l = b[s];
121
+ const r = g[s], l = b[s];
122
122
  Object.defineProperty(S.prototype, s, {
123
123
  enumerable: !0,
124
124
  configurable: !0,
@@ -129,8 +129,8 @@ function z(e, t, n) {
129
129
  this[i][s] = a;
130
130
  const c = l ? T[l] : null;
131
131
  if (c != null && c.stringify) {
132
- const u = c.stringify(a, o, this);
133
- this.getAttribute(o) !== u && this.setAttribute(o, u);
132
+ const u = c.stringify(a, r, this);
133
+ this.getAttribute(r) !== u && this.setAttribute(r, u);
134
134
  } else
135
135
  this[E]();
136
136
  }
@@ -139,25 +139,25 @@ function z(e, t, n) {
139
139
  return S;
140
140
  }
141
141
  function J(e, t, n) {
142
- const r = j(e), p = P.createElement(t, n);
143
- return r.render(p), {
144
- root: r,
142
+ const o = j(e), p = P.createElement(t, n);
143
+ return o.render(p), {
144
+ root: o,
145
145
  ReactComponent: t
146
146
  };
147
147
  }
148
148
  function X({ root: e, ReactComponent: t }, n) {
149
- const r = P.createElement(t, n);
150
- e.render(r);
149
+ const o = P.createElement(t, n);
150
+ e.render(o);
151
151
  }
152
152
  function q({ root: e }) {
153
153
  setTimeout(() => {
154
154
  e.unmount();
155
155
  }, 0);
156
156
  }
157
- function O(e, t = {}) {
157
+ function C(e, t = {}) {
158
158
  return z(e, t, { mount: J, update: X, unmount: q });
159
159
  }
160
- const K = O(I, {
160
+ const K = C(I, {
161
161
  shadow: "closed",
162
162
  props: {
163
163
  compositionUrl: "string",
@@ -180,6 +180,7 @@ const K = O(I, {
180
180
  eventPrefix: "string",
181
181
  demoSpin: "boolean",
182
182
  reverse360: "boolean",
183
+ spinCursor: "string",
183
184
  // Analytics
184
185
  analyticsEventPrefix: "string",
185
186
  analyticsUrl: "string",
@@ -188,13 +189,13 @@ const K = O(I, {
188
189
  analyticsDryRun: "boolean",
189
190
  analyticsDebug: "boolean"
190
191
  }
191
- }), Z = O(L, {
192
+ }), Z = C(L, {
192
193
  shadow: "closed",
193
194
  props: {
194
195
  index: "number",
195
196
  thumbnailSrc: "string"
196
197
  }
197
- }), Q = O(W, {
198
+ }), Q = C(W, {
198
199
  shadow: "closed",
199
200
  props: {
200
201
  name: "string"
@@ -227,8 +228,8 @@ export {
227
228
  Te as EVENT_ITEM_CHANGE,
228
229
  M as WEB_PLAYER_ICON_WC_TAG,
229
230
  R as WEB_PLAYER_WC_TAG,
230
- Oe as WebPlayer,
231
- Ae as WebPlayerCustomMedia,
232
- Ce as WebPlayerIcon,
231
+ Ce as WebPlayer,
232
+ Oe as WebPlayerCustomMedia,
233
+ Ae as WebPlayerIcon,
233
234
  Ne as generateCompositionUrl
234
235
  };
package/dist/legacy.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./shared-Dj9ilM-O.cjs");require("react/jsx-runtime");const S=require("react"),A=require("react-dom");var R=Object.defineProperty,D=(e,t,r)=>t in e?R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t,r)=>D(e,typeof t!="symbol"?t+"":t,r);const v={stringify:e=>e?"true":"false",parse:e=>/^[ty1-9]/i.test(e)},M={stringify:e=>e.name,parse:(e,t,r)=>{const s=(()=>{if(typeof window<"u"&&e in window)return window[e];if(typeof global<"u"&&e in global)return global[e]})();return typeof s=="function"?s.bind(r):void 0}},w={stringify:e=>JSON.stringify(e),parse:e=>JSON.parse(e)};function Y(e){return e.replace(/([a-z0-9])([A-Z])/g,(t,r,s)=>`${r}-${s.toLowerCase()}`)}function W(e){return e.replace(/[-:]([a-z])/g,(t,r)=>`${r.toUpperCase()}`)}const G={stringify:e=>e.name,parse:(e,t,r)=>{const s=(()=>{const T=W(t);if(typeof r<"u"&&T in r.container)return r.container[T]})();return typeof s=="function"?s.bind(r):void 0}},F={stringify:e=>`${e}`,parse:e=>parseFloat(e)},j={stringify:e=>e,parse:e=>e},m={string:j,number:F,boolean:v,function:M,method:G,json:w},f=Symbol.for("r2wc.render"),O=Symbol.for("r2wc.connected"),p=Symbol.for("r2wc.context"),a=Symbol.for("r2wc.props");function k(e,t,r){var s,T,g;t.props||(t.props=e.propTypes?Object.keys(e.propTypes):[]),t.events||(t.events=[]);const d=Array.isArray(t.props)?t.props.slice():Object.keys(t.props),P=Array.isArray(t.events)?t.events.slice():Object.keys(t.events),b={},I={},h={},N={};for(const i of d){b[i]=Array.isArray(t.props)?"string":t.props[i];const o=Y(i);h[i]=o,N[o]=i}for(const i of P)I[i]=Array.isArray(t.events)?{}:t.events[i];class L extends HTMLElement{constructor(){super(),y(this,g,!0),y(this,T),y(this,s,{}),y(this,"container"),t.shadow?this.container=this.attachShadow({mode:t.shadow}):this.container=this,this[a].container=this.container;for(const o of d){const l=h[o],E=this.getAttribute(l),c=b[o],u=c?m[c]:null;if(c==="method"){const _=W(l);Object.defineProperty(this[a].container,_,{enumerable:!0,configurable:!0,get(){return this[a][_]},set(V){this[a][_]=V,this[f]()}}),this[a][o]=u.parse(E,l,this)}u!=null&&u.parse&&E&&(this[a][o]=u.parse(E,l,this))}for(const o of P)this[a][o]=l=>{const E=o.replace(/^on/,"").toLowerCase();this.dispatchEvent(new CustomEvent(E,{detail:l,...I[o]}))}}static get observedAttributes(){return Object.keys(N)}connectedCallback(){this[O]=!0,this[f]()}disconnectedCallback(){this[O]=!1,this[p]&&r.unmount(this[p]),delete this[p]}attributeChangedCallback(o,l,E){const c=N[o],u=b[c],_=u?m[u]:null;c in b&&_!=null&&_.parse&&E&&(this[a][c]=_.parse(E,o,this),this[f]())}[(g=O,T=p,s=a,f)](){this[O]&&(this[p]?r.update(this[p],this[a]):this[p]=r.mount(this.container,e,this[a]))}}for(const i of d){const o=h[i],l=b[i];Object.defineProperty(L.prototype,i,{enumerable:!0,configurable:!0,get(){return this[a][i]},set(E){this[a][i]=E;const c=l?m[l]:null;if(c!=null&&c.stringify){const u=c.stringify(E,o,this);this.getAttribute(o)!==u&&this.setAttribute(o,u)}else this[f]()}})}return L}function B(e,t,r){const s=S.createElement(t,r);return A.render(s,e),{container:e,ReactComponent:t}}function $({container:e,ReactComponent:t},r){const s=S.createElement(t,r);A.render(s,e)}function x({container:e}){A.unmountComponentAtNode(e)}function C(e,t={}){return k(e,t,{mount:B,update:$,unmount:x})}const U=C(n.WebPlayerWithInjectedStyles,{shadow:"closed",props:{compositionUrl:"string",hideCategoriesNav:"boolean",infiniteCarrousel:"boolean",permanentGallery:"boolean",minMediaWidth:"number",maxMediaWidth:"number",mediaLoadStrategy:"string",preloadRange:"number",autoLoad360:"boolean",autoLoadInterior360:"boolean",categoriesFilter:"string",extendBehavior:"string",eventPrefix:"string",demoSpin:"boolean",reverse360:"boolean",analyticsEventPrefix:"string",analyticsUrl:"string",analyticsBearer:"string",analyticsSimpleRequestsOnly:"boolean",analyticsDryRun:"boolean",analyticsDebug:"boolean"}}),H=C(n.WebPlayerCustomMedia,{shadow:"closed",props:{index:"number",thumbnailSrc:"string"}}),X=C(n.WebPlayerIcon,{shadow:"closed",props:{name:"string"}});function q(){customElements.define(n.WEB_PLAYER_WC_TAG,U),customElements.define(n.WEB_PLAYER_CUSTOM_MEDIA_WC_TAG,H),customElements.define(n.WEB_PLAYER_ICON_WC_TAG,X)}function z(){n.checkCustomElementsDefinition()||q()}z();exports.ANALYTICS_EVENT_IDENTIFY=n.ANALYTICS_EVENT_IDENTIFY;exports.ANALYTICS_EVENT_PAGE=n.ANALYTICS_EVENT_PAGE;exports.ANALYTICS_EVENT_TRACK=n.ANALYTICS_EVENT_TRACK;exports.DEFAULT_EVENT_PREFIX=n.DEFAULT_EVENT_PREFIX;exports.EVENT_COMPOSITION_LOADED=n.EVENT_COMPOSITION_LOADED;exports.EVENT_COMPOSITION_LOADING=n.EVENT_COMPOSITION_LOADING;exports.EVENT_COMPOSITION_LOAD_ERROR=n.EVENT_COMPOSITION_LOAD_ERROR;exports.EVENT_EXTEND_MODE_OFF=n.EVENT_EXTEND_MODE_OFF;exports.EVENT_EXTEND_MODE_ON=n.EVENT_EXTEND_MODE_ON;exports.EVENT_GALLERY_CLOSE=n.EVENT_GALLERY_CLOSE;exports.EVENT_GALLERY_OPEN=n.EVENT_GALLERY_OPEN;exports.EVENT_HOTSPOTS_OFF=n.EVENT_HOTSPOTS_OFF;exports.EVENT_HOTSPOTS_ON=n.EVENT_HOTSPOTS_ON;exports.EVENT_ITEM_CHANGE=n.EVENT_ITEM_CHANGE;exports.WEB_PLAYER_ICON_WC_TAG=n.WEB_PLAYER_ICON_WC_TAG;exports.WEB_PLAYER_WC_TAG=n.WEB_PLAYER_WC_TAG;exports.WebPlayer=n.WebPlayer;exports.WebPlayerCustomMedia=n.WebPlayerCustomMedia$1;exports.WebPlayerIcon=n.WebPlayerIcon$1;exports.generateCompositionUrl=n.generateCompositionUrl;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./shared-BeSqCz-A.cjs");require("react/jsx-runtime");const S=require("react"),A=require("react-dom");var R=Object.defineProperty,D=(e,t,r)=>t in e?R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t,r)=>D(e,typeof t!="symbol"?t+"":t,r);const v={stringify:e=>e?"true":"false",parse:e=>/^[ty1-9]/i.test(e)},M={stringify:e=>e.name,parse:(e,t,r)=>{const i=(()=>{if(typeof window<"u"&&e in window)return window[e];if(typeof global<"u"&&e in global)return global[e]})();return typeof i=="function"?i.bind(r):void 0}},w={stringify:e=>JSON.stringify(e),parse:e=>JSON.parse(e)};function Y(e){return e.replace(/([a-z0-9])([A-Z])/g,(t,r,i)=>`${r}-${i.toLowerCase()}`)}function W(e){return e.replace(/[-:]([a-z])/g,(t,r)=>`${r.toUpperCase()}`)}const G={stringify:e=>e.name,parse:(e,t,r)=>{const i=(()=>{const T=W(t);if(typeof r<"u"&&T in r.container)return r.container[T]})();return typeof i=="function"?i.bind(r):void 0}},F={stringify:e=>`${e}`,parse:e=>parseFloat(e)},j={stringify:e=>e,parse:e=>e},m={string:j,number:F,boolean:v,function:M,method:G,json:w},f=Symbol.for("r2wc.render"),O=Symbol.for("r2wc.connected"),p=Symbol.for("r2wc.context"),a=Symbol.for("r2wc.props");function k(e,t,r){var i,T,g;t.props||(t.props=e.propTypes?Object.keys(e.propTypes):[]),t.events||(t.events=[]);const d=Array.isArray(t.props)?t.props.slice():Object.keys(t.props),P=Array.isArray(t.events)?t.events.slice():Object.keys(t.events),b={},I={},h={},N={};for(const s of d){b[s]=Array.isArray(t.props)?"string":t.props[s];const o=Y(s);h[s]=o,N[o]=s}for(const s of P)I[s]=Array.isArray(t.events)?{}:t.events[s];class L extends HTMLElement{constructor(){super(),y(this,g,!0),y(this,T),y(this,i,{}),y(this,"container"),t.shadow?this.container=this.attachShadow({mode:t.shadow}):this.container=this,this[a].container=this.container;for(const o of d){const l=h[o],E=this.getAttribute(l),c=b[o],u=c?m[c]:null;if(c==="method"){const _=W(l);Object.defineProperty(this[a].container,_,{enumerable:!0,configurable:!0,get(){return this[a][_]},set(V){this[a][_]=V,this[f]()}}),this[a][o]=u.parse(E,l,this)}u!=null&&u.parse&&E&&(this[a][o]=u.parse(E,l,this))}for(const o of P)this[a][o]=l=>{const E=o.replace(/^on/,"").toLowerCase();this.dispatchEvent(new CustomEvent(E,{detail:l,...I[o]}))}}static get observedAttributes(){return Object.keys(N)}connectedCallback(){this[O]=!0,this[f]()}disconnectedCallback(){this[O]=!1,this[p]&&r.unmount(this[p]),delete this[p]}attributeChangedCallback(o,l,E){const c=N[o],u=b[c],_=u?m[u]:null;c in b&&_!=null&&_.parse&&E&&(this[a][c]=_.parse(E,o,this),this[f]())}[(g=O,T=p,i=a,f)](){this[O]&&(this[p]?r.update(this[p],this[a]):this[p]=r.mount(this.container,e,this[a]))}}for(const s of d){const o=h[s],l=b[s];Object.defineProperty(L.prototype,s,{enumerable:!0,configurable:!0,get(){return this[a][s]},set(E){this[a][s]=E;const c=l?m[l]:null;if(c!=null&&c.stringify){const u=c.stringify(E,o,this);this.getAttribute(o)!==u&&this.setAttribute(o,u)}else this[f]()}})}return L}function B(e,t,r){const i=S.createElement(t,r);return A.render(i,e),{container:e,ReactComponent:t}}function $({container:e,ReactComponent:t},r){const i=S.createElement(t,r);A.render(i,e)}function x({container:e}){A.unmountComponentAtNode(e)}function C(e,t={}){return k(e,t,{mount:B,update:$,unmount:x})}const U=C(n.WebPlayerWithInjectedStyles,{shadow:"closed",props:{compositionUrl:"string",hideCategoriesNav:"boolean",infiniteCarrousel:"boolean",permanentGallery:"boolean",minMediaWidth:"number",maxMediaWidth:"number",mediaLoadStrategy:"string",preloadRange:"number",autoLoad360:"boolean",autoLoadInterior360:"boolean",categoriesFilter:"string",extendBehavior:"string",eventPrefix:"string",demoSpin:"boolean",reverse360:"boolean",spinCursor:"string",analyticsEventPrefix:"string",analyticsUrl:"string",analyticsBearer:"string",analyticsSimpleRequestsOnly:"boolean",analyticsDryRun:"boolean",analyticsDebug:"boolean"}}),H=C(n.WebPlayerCustomMedia,{shadow:"closed",props:{index:"number",thumbnailSrc:"string"}}),X=C(n.WebPlayerIcon,{shadow:"closed",props:{name:"string"}});function q(){customElements.define(n.WEB_PLAYER_WC_TAG,U),customElements.define(n.WEB_PLAYER_CUSTOM_MEDIA_WC_TAG,H),customElements.define(n.WEB_PLAYER_ICON_WC_TAG,X)}function z(){n.checkCustomElementsDefinition()||q()}z();exports.ANALYTICS_EVENT_IDENTIFY=n.ANALYTICS_EVENT_IDENTIFY;exports.ANALYTICS_EVENT_PAGE=n.ANALYTICS_EVENT_PAGE;exports.ANALYTICS_EVENT_TRACK=n.ANALYTICS_EVENT_TRACK;exports.DEFAULT_EVENT_PREFIX=n.DEFAULT_EVENT_PREFIX;exports.EVENT_COMPOSITION_LOADED=n.EVENT_COMPOSITION_LOADED;exports.EVENT_COMPOSITION_LOADING=n.EVENT_COMPOSITION_LOADING;exports.EVENT_COMPOSITION_LOAD_ERROR=n.EVENT_COMPOSITION_LOAD_ERROR;exports.EVENT_EXTEND_MODE_OFF=n.EVENT_EXTEND_MODE_OFF;exports.EVENT_EXTEND_MODE_ON=n.EVENT_EXTEND_MODE_ON;exports.EVENT_GALLERY_CLOSE=n.EVENT_GALLERY_CLOSE;exports.EVENT_GALLERY_OPEN=n.EVENT_GALLERY_OPEN;exports.EVENT_HOTSPOTS_OFF=n.EVENT_HOTSPOTS_OFF;exports.EVENT_HOTSPOTS_ON=n.EVENT_HOTSPOTS_ON;exports.EVENT_ITEM_CHANGE=n.EVENT_ITEM_CHANGE;exports.WEB_PLAYER_ICON_WC_TAG=n.WEB_PLAYER_ICON_WC_TAG;exports.WEB_PLAYER_WC_TAG=n.WEB_PLAYER_WC_TAG;exports.WebPlayer=n.WebPlayer;exports.WebPlayerCustomMedia=n.WebPlayerCustomMedia$1;exports.WebPlayerIcon=n.WebPlayerIcon$1;exports.generateCompositionUrl=n.generateCompositionUrl;
package/dist/legacy.d.ts CHANGED
@@ -297,6 +297,7 @@ declare type WebPlayerProps_2 = {
297
297
  eventPrefix?: string;
298
298
  demoSpin?: boolean;
299
299
  reverse360?: boolean;
300
+ spinCursor?: string;
300
301
 
301
302
  // Analytics
302
303
  analyticsEventPrefix?: string;
package/dist/legacy.js CHANGED
@@ -1,8 +1,8 @@
1
- import { W as w, a as I, b as D, c as R, d as V, e as M, f as j } from "./shared-D7cc889c.js";
2
- import { A as ce, g as le, h as ue, D as pe, E as fe, i as me, j as Ee, k as be, l as he, m as de, n as ye, o as _e, p as ge, q as Ae, r as Ce, s as Oe, t as Te, u as Ne } from "./shared-D7cc889c.js";
1
+ import { W as w, a as I, b as D, c as R, d as V, e as M, f as j } from "./shared-DVyC4OMr.js";
2
+ import { A as ce, g as le, h as ue, D as pe, E as fe, i as me, j as Ee, k as be, l as he, m as de, n as ye, o as ge, p as _e, q as Ce, r as Ae, s as Oe, t as Te, u as Ne } from "./shared-DVyC4OMr.js";
3
3
  import "react/jsx-runtime";
4
4
  import v from "react";
5
- import C from "react-dom";
5
+ import A from "react-dom";
6
6
  var k = Object.defineProperty, x = (e, t, n) => t in e ? k(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, h = (e, t, n) => x(e, typeof t != "symbol" ? t + "" : t, n);
7
7
  const F = {
8
8
  stringify: (e) => e ? "true" : "false",
@@ -47,7 +47,7 @@ const U = {
47
47
  }, H = {
48
48
  stringify: (e) => e,
49
49
  parse: (e) => e
50
- }, A = {
50
+ }, C = {
51
51
  string: H,
52
52
  number: B,
53
53
  boolean: F,
@@ -58,11 +58,11 @@ const U = {
58
58
  function z(e, t, n) {
59
59
  var s, m, T;
60
60
  t.props || (t.props = e.propTypes ? Object.keys(e.propTypes) : []), t.events || (t.events = []);
61
- const y = Array.isArray(t.props) ? t.props.slice() : Object.keys(t.props), N = Array.isArray(t.events) ? t.events.slice() : Object.keys(t.events), E = {}, P = {}, _ = {}, g = {};
61
+ const y = Array.isArray(t.props) ? t.props.slice() : Object.keys(t.props), N = Array.isArray(t.events) ? t.events.slice() : Object.keys(t.events), E = {}, P = {}, g = {}, _ = {};
62
62
  for (const o of y) {
63
63
  E[o] = Array.isArray(t.props) ? "string" : t.props[o];
64
64
  const r = $(o);
65
- _[o] = r, g[r] = o;
65
+ g[o] = r, _[r] = o;
66
66
  }
67
67
  for (const o of N)
68
68
  P[o] = Array.isArray(t.events) ? {} : t.events[o];
@@ -72,7 +72,7 @@ function z(e, t, n) {
72
72
  mode: t.shadow
73
73
  }) : this.container = this, this[i].container = this.container;
74
74
  for (const r of y) {
75
- const l = _[r], a = this.getAttribute(l), c = E[r], u = c ? A[c] : null;
75
+ const l = g[r], a = this.getAttribute(l), c = E[r], u = c ? C[c] : null;
76
76
  if (c === "method") {
77
77
  const p = L(l);
78
78
  Object.defineProperty(this[i].container, p, {
@@ -97,7 +97,7 @@ function z(e, t, n) {
97
97
  };
98
98
  }
99
99
  static get observedAttributes() {
100
- return Object.keys(g);
100
+ return Object.keys(_);
101
101
  }
102
102
  connectedCallback() {
103
103
  this[d] = !0, this[b]();
@@ -106,7 +106,7 @@ function z(e, t, n) {
106
106
  this[d] = !1, this[f] && n.unmount(this[f]), delete this[f];
107
107
  }
108
108
  attributeChangedCallback(r, l, a) {
109
- const c = g[r], u = E[c], p = u ? A[u] : null;
109
+ const c = _[r], u = E[c], p = u ? C[u] : null;
110
110
  c in E && p != null && p.parse && a && (this[i][c] = p.parse(a, r, this), this[b]());
111
111
  }
112
112
  [(T = d, m = f, s = i, b)]() {
@@ -118,7 +118,7 @@ function z(e, t, n) {
118
118
  }
119
119
  }
120
120
  for (const o of y) {
121
- const r = _[o], l = E[o];
121
+ const r = g[o], l = E[o];
122
122
  Object.defineProperty(S.prototype, o, {
123
123
  enumerable: !0,
124
124
  configurable: !0,
@@ -127,7 +127,7 @@ function z(e, t, n) {
127
127
  },
128
128
  set(a) {
129
129
  this[i][o] = a;
130
- const c = l ? A[l] : null;
130
+ const c = l ? C[l] : null;
131
131
  if (c != null && c.stringify) {
132
132
  const u = c.stringify(a, r, this);
133
133
  this.getAttribute(r) !== u && this.setAttribute(r, u);
@@ -140,17 +140,17 @@ function z(e, t, n) {
140
140
  }
141
141
  function J(e, t, n) {
142
142
  const s = v.createElement(t, n);
143
- return C.render(s, e), {
143
+ return A.render(s, e), {
144
144
  container: e,
145
145
  ReactComponent: t
146
146
  };
147
147
  }
148
148
  function X({ container: e, ReactComponent: t }, n) {
149
149
  const s = v.createElement(t, n);
150
- C.render(s, e);
150
+ A.render(s, e);
151
151
  }
152
152
  function q({ container: e }) {
153
- C.unmountComponentAtNode(e);
153
+ A.unmountComponentAtNode(e);
154
154
  }
155
155
  function O(e, t = {}) {
156
156
  return z(e, t, { mount: J, update: X, unmount: q });
@@ -176,6 +176,7 @@ const K = O(w, {
176
176
  eventPrefix: "string",
177
177
  demoSpin: "boolean",
178
178
  reverse360: "boolean",
179
+ spinCursor: "string",
179
180
  // Analytics
180
181
  analyticsEventPrefix: "string",
181
182
  analyticsUrl: "string",
@@ -218,12 +219,12 @@ export {
218
219
  he as EVENT_EXTEND_MODE_ON,
219
220
  de as EVENT_GALLERY_CLOSE,
220
221
  ye as EVENT_GALLERY_OPEN,
221
- _e as EVENT_HOTSPOTS_OFF,
222
- ge as EVENT_HOTSPOTS_ON,
223
- Ae as EVENT_ITEM_CHANGE,
222
+ ge as EVENT_HOTSPOTS_OFF,
223
+ _e as EVENT_HOTSPOTS_ON,
224
+ Ce as EVENT_ITEM_CHANGE,
224
225
  j as WEB_PLAYER_ICON_WC_TAG,
225
226
  V as WEB_PLAYER_WC_TAG,
226
- Ce as WebPlayer,
227
+ Ae as WebPlayer,
227
228
  Oe as WebPlayerCustomMedia,
228
229
  Te as WebPlayerIcon,
229
230
  Ne as generateCompositionUrl