@car-cutter/react-webplayer 3.2.3 → 3.2.4
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-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./shared-BUcu6Hvu.cjs");require("react/jsx-runtime");const S=require("react"),W=require("react-dom/client");var V=Object.defineProperty,D=(e,t,r)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f=(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 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}},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,i)=>`${r}-${i.toLowerCase()}`)}function P(e){return e.replace(/[-:]([a-z])/g,(t,r)=>`${r.toUpperCase()}`)}const G={stringify:e=>e.name,parse:(e,t,r)=>{const i=(()=>{const _=P(t);if(typeof r<"u"&&_ in r.container)return r.container[_]})();return typeof i=="function"?i.bind(r):void 0}},F={stringify:e=>`${e}`,parse:e=>parseFloat(e)},j={stringify:e=>e,parse:e=>e},A={string:j,number:F,boolean:v,function:w,method:G,json:M},O=Symbol.for("r2wc.render"),N=Symbol.for("r2wc.connected"),p=Symbol.for("r2wc.context"),a=Symbol.for("r2wc.props");function k(e,t,r){var i,_,C;t.props||(t.props=e.propTypes?Object.keys(e.propTypes):[]),t.events||(t.events=[]);const m=Array.isArray(t.props)?t.props.slice():Object.keys(t.props),g=Array.isArray(t.events)?t.events.slice():Object.keys(t.events),b={},L={},h={},y={};for(const s of m){b[s]=Array.isArray(t.props)?"string":t.props[s];const o=Y(s);h[s]=o,y[o]=s}for(const s of g)L[s]=Array.isArray(t.events)?{}:t.events[s];class I extends HTMLElement{constructor(){super(),f(this,C,!0),f(this,_),f(this,i,{}),f(this,"container"),t.shadow?this.container=this.attachShadow({mode:t.shadow}):this.container=this,this[a].container=this.container;for(const o of m){const l=h[o],E=this.getAttribute(l),c=b[o],u=c?A[c]:null;if(c==="method"){const T=P(l);Object.defineProperty(this[a].container,T,{enumerable:!0,configurable:!0,get(){return this[a][T]},set(R){this[a][T]=R,this[O]()}}),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,...L[o]}))}}static get observedAttributes(){return Object.keys(y)}connectedCallback(){this[N]=!0,this[O]()}disconnectedCallback(){this[N]=!1,this[p]&&r.unmount(this[p]),delete this[p]}attributeChangedCallback(o,l,E){const c=y[o],u=b[c],T=u?A[u]:null;c in b&&T!=null&&T.parse&&E&&(this[a][c]=T.parse(E,o,this),this[O]())}[(C=N,_=p,i=a,O)](){this[N]&&(this[p]?r.update(this[p],this[a]):this[p]=r.mount(this.container,e,this[a]))}}for(const s of m){const o=h[s],l=b[s];Object.defineProperty(I.prototype,s,{enumerable:!0,configurable:!0,get(){return this[a][s]},set(E){this[a][s]=E;const c=l?A[l]:null;if(c!=null&&c.stringify){const u=c.stringify(E,o,this);this.getAttribute(o)!==u&&this.setAttribute(o,u)}else this[O]()}})}return I}function x(e,t,r){const i=W.createRoot(e),_=S.createElement(t,r);return i.render(_),{root:i,ReactComponent:t}}function B({root:e,ReactComponent:t},r){const i=S.createElement(t,r);e.render(i)}function U({root:e}){setTimeout(()=>{e.unmount()},0)}function d(e,t={}){return k(e,t,{mount:x,update:B,unmount:U})}const $=d(n.WebPlayerWithInjectedStyles,{shadow:"closed",props:{compositionUrl:"string",hideCategoriesNav:"boolean",infiniteCarrousel:"boolean",permanentGallery:"boolean",integration:"boolean",maxItemsShown:"number",themeConfig:"string",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",monitoring:"boolean"}}),H=d(n.WebPlayerCustomMedia,{shadow:"closed",props:{index:"number",thumbnailSrc:"string"}}),X=d(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_DISPLAY=n.ANALYTICS_EVENT_DISPLAY;exports.ANALYTICS_EVENT_ERROR=n.ANALYTICS_EVENT_ERROR;exports.ANALYTICS_EVENT_INTERACTION=n.ANALYTICS_EVENT_INTERACTION;exports.ANALYTICS_EVENT_LOAD=n.ANALYTICS_EVENT_LOAD;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.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as I, a as w, b as W, c as R, d as D, e as V, f as M } from "./shared-
|
|
2
|
-
import { A as ce, g as le, h as ue, i as pe, D as fe, E as me, j as Ee, k as be, l as he, m as ye, n as de, o as ge, p as _e, q as Oe, r as Te, s as Ae, t as Ce, u as Ne, v as Se } from "./shared-
|
|
1
|
+
import { W as I, a as w, b as W, c as R, d as D, e as V, f as M } from "./shared-4nfP-R6L.js";
|
|
2
|
+
import { A as ce, g as le, h as ue, i as pe, D as fe, E as me, j as Ee, k as be, l as he, m as ye, n as de, o as ge, p as _e, q as Oe, r as Te, s as Ae, t as Ce, u as Ne, v as Se } from "./shared-4nfP-R6L.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import L from "react";
|
|
5
5
|
import { createRoot as j } from "react-dom/client";
|
package/dist/legacy.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./shared-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./shared-BUcu6Hvu.cjs");require("react/jsx-runtime");const P=require("react"),m=require("react-dom");var V=Object.defineProperty,D=(e,t,r)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f=(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 R(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=R(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},d={string:j,number:F,boolean:v,function:M,method:G,json:w},b=Symbol.for("r2wc.render"),N=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 y=Array.isArray(t.props)?t.props.slice():Object.keys(t.props),L=Array.isArray(t.events)?t.events.slice():Object.keys(t.events),O={},I={},A={},h={};for(const i of y){O[i]=Array.isArray(t.props)?"string":t.props[i];const o=Y(i);A[i]=o,h[o]=i}for(const i of L)I[i]=Array.isArray(t.events)?{}:t.events[i];class S extends HTMLElement{constructor(){super(),f(this,g,!0),f(this,T),f(this,s,{}),f(this,"container"),t.shadow?this.container=this.attachShadow({mode:t.shadow}):this.container=this,this[a].container=this.container;for(const o of y){const l=A[o],E=this.getAttribute(l),c=O[o],u=c?d[c]:null;if(c==="method"){const _=R(l);Object.defineProperty(this[a].container,_,{enumerable:!0,configurable:!0,get(){return this[a][_]},set(W){this[a][_]=W,this[b]()}}),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 L)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(h)}connectedCallback(){this[N]=!0,this[b]()}disconnectedCallback(){this[N]=!1,this[p]&&r.unmount(this[p]),delete this[p]}attributeChangedCallback(o,l,E){const c=h[o],u=O[c],_=u?d[u]:null;c in O&&_!=null&&_.parse&&E&&(this[a][c]=_.parse(E,o,this),this[b]())}[(g=N,T=p,s=a,b)](){this[N]&&(this[p]?r.update(this[p],this[a]):this[p]=r.mount(this.container,e,this[a]))}}for(const i of y){const o=A[i],l=O[i];Object.defineProperty(S.prototype,i,{enumerable:!0,configurable:!0,get(){return this[a][i]},set(E){this[a][i]=E;const c=l?d[l]:null;if(c!=null&&c.stringify){const u=c.stringify(E,o,this);this.getAttribute(o)!==u&&this.setAttribute(o,u)}else this[b]()}})}return S}function B(e,t,r){const s=P.createElement(t,r);return m.render(s,e),{container:e,ReactComponent:t}}function $({container:e,ReactComponent:t},r){const s=P.createElement(t,r);m.render(s,e)}function x({container:e}){m.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",themeConfig:"string",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",monitoring:"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_DISPLAY=n.ANALYTICS_EVENT_DISPLAY;exports.ANALYTICS_EVENT_ERROR=n.ANALYTICS_EVENT_ERROR;exports.ANALYTICS_EVENT_INTERACTION=n.ANALYTICS_EVENT_INTERACTION;exports.ANALYTICS_EVENT_LOAD=n.ANALYTICS_EVENT_LOAD;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.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W, a as w, b as R, c as D, d as V, e as M, f as j } from "./shared-
|
|
2
|
-
import { A as ce, g as le, h as ue, i as pe, D as fe, E 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 Ae, r as Ce, s as Oe, t as Te, u as Ne, v as Se } from "./shared-
|
|
1
|
+
import { W, a as w, b as R, c as D, d as V, e as M, f as j } from "./shared-4nfP-R6L.js";
|
|
2
|
+
import { A as ce, g as le, h as ue, i as pe, D as fe, E 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 Ae, r as Ce, s as Oe, t as Te, u as Ne, v as Se } from "./shared-4nfP-R6L.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import P from "react";
|
|
5
5
|
import C from "react-dom";
|