@car-cutter/react-webplayer 0.11.0 → 0.13.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/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./shared-DURk-_r6.cjs");require("react/jsx-runtime");const g=require("react"),W=require("react-dom/client");var S=Object.defineProperty,L=(e,t,o)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,b=(e,t,o)=>(L(e,typeof t!="symbol"?t+"":t,o),o);const I={stringify:e=>e,parse:e=>e},R={stringify:e=>`${e}`,parse:e=>parseFloat(e)},V={stringify:e=>e?"true":"false",parse:e=>/^[ty1-9]/i.test(e)},M={stringify:e=>e.name,parse:(e,t,o)=>{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(o):void 0}},D={stringify:e=>JSON.stringify(e),parse:e=>JSON.parse(e)},y={string:I,number:R,boolean:V,function:M,json:D};function w(e){return e.replace(/([a-z0-9])([A-Z])/g,(t,o,i)=>`${o}-${i.toLowerCase()}`)}const T=Symbol.for("r2wc.render"),m=Symbol.for("r2wc.connected"),u=Symbol.for("r2wc.context"),l=Symbol.for("r2wc.props");function G(e,t,o){var i,O,A;t.props||(t.props=e.propTypes?Object.keys(e.propTypes):[]);const d=Array.isArray(t.props)?t.props.slice():Object.keys(t.props),p={},f={},h={};for(const s of d){p[s]=Array.isArray(t.props)?"string":t.props[s];const r=w(s);f[s]=r,h[r]=s}class P extends HTMLElement{constructor(){super(),b(this,i,!0),b(this,O),b(this,A,{}),b(this,"container"),t.shadow?this.container=this.attachShadow({mode:t.shadow}):this.container=this,this[l].container=this.container;for(const r of d){const _=f[r],c=this.getAttribute(_),a=p[r],E=a?y[a]:null;E!=null&&E.parse&&c&&(this[l][r]=E.parse(c,_,this))}}static get observedAttributes(){return Object.keys(h)}connectedCallback(){this[m]=!0,this[T]()}disconnectedCallback(){this[m]=!1,this[u]&&o.unmount(this[u]),delete this[u]}attributeChangedCallback(r,_,c){const a=h[r],E=p[a],N=E?y[E]:null;a in p&&N!=null&&N.parse&&c&&(this[l][a]=N.parse(c,r,this),this[T]())}[(i=m,O=u,A=l,T)](){this[m]&&(this[u]?o.update(this[u],this[l]):this[u]=o.mount(this.container,e,this[l]))}}for(const s of d){const r=f[s],_=p[s];Object.defineProperty(P.prototype,s,{enumerable:!0,configurable:!0,get(){return this[l][s]},set(c){this[l][s]=c;const a=_?y[_]:null;if(a!=null&&a.stringify){const E=a.stringify(c,r,this);this.getAttribute(r)!==E&&this.setAttribute(r,E)}else this[T]()}})}return P}function F(e,t,o){const i=W.createRoot(e),O=g.createElement(t,o);return i.render(O),{root:i,ReactComponent:t}}function v({root:e,ReactComponent:t},o){const i=g.createElement(t,o);e.render(i)}function Y({root:e}){setTimeout(()=>{e.unmount()},0)}function C(e,t={}){return G(e,t,{mount:F,update:v,unmount:Y})}const j=C(n.WebPlayerWithInjectedStyles,{shadow:"open",props:{compositionUrl:"string",hideCategoriesNav:"boolean",infiniteCarrousel:"boolean",permanentGallery:"boolean",minMediaWidth:"number",maxMediaWidth:"number",mediaLoadStrategy:"string",preloadRange:"number",autoLoad360:"boolean",categoriesFilter:"string",extendBehavior:"string",eventPrefix:"string",demoSpin:"boolean",reverse360:"boolean"}}),k=C(n.WebPlayerCustomMedia,{shadow:"closed",props:{index:"number",thumbnailSrc:"string"}}),B=C(n.WebPlayerIcon,{shadow:"closed",props:{name:"string"}});function x(){customElements.define(n.WEB_PLAYER_WC_TAG,j),customElements.define(n.WEB_PLAYER_CUSTOM_MEDIA_WC_TAG,k),customElements.define(n.WEB_PLAYER_ICON_WC_TAG,B)}function H(){n.checkCustomElementsDefinition()||x()}H();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-DopQYQcS.cjs");require("react/jsx-runtime");const g=require("react"),W=require("react-dom/client");var S=Object.defineProperty,L=(e,t,o)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,b=(e,t,o)=>(L(e,typeof t!="symbol"?t+"":t,o),o);const I={stringify:e=>e,parse:e=>e},R={stringify:e=>`${e}`,parse:e=>parseFloat(e)},V={stringify:e=>e?"true":"false",parse:e=>/^[ty1-9]/i.test(e)},M={stringify:e=>e.name,parse:(e,t,o)=>{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(o):void 0}},D={stringify:e=>JSON.stringify(e),parse:e=>JSON.parse(e)},y={string:I,number:R,boolean:V,function:M,json:D};function w(e){return e.replace(/([a-z0-9])([A-Z])/g,(t,o,i)=>`${o}-${i.toLowerCase()}`)}const T=Symbol.for("r2wc.render"),d=Symbol.for("r2wc.connected"),u=Symbol.for("r2wc.context"),l=Symbol.for("r2wc.props");function G(e,t,o){var i,O,A;t.props||(t.props=e.propTypes?Object.keys(e.propTypes):[]);const m=Array.isArray(t.props)?t.props.slice():Object.keys(t.props),p={},f={},h={};for(const s of m){p[s]=Array.isArray(t.props)?"string":t.props[s];const r=w(s);f[s]=r,h[r]=s}class P extends HTMLElement{constructor(){super(),b(this,i,!0),b(this,O),b(this,A,{}),b(this,"container"),t.shadow?this.container=this.attachShadow({mode:t.shadow}):this.container=this,this[l].container=this.container;for(const r of m){const _=f[r],c=this.getAttribute(_),a=p[r],E=a?y[a]:null;E!=null&&E.parse&&c&&(this[l][r]=E.parse(c,_,this))}}static get observedAttributes(){return Object.keys(h)}connectedCallback(){this[d]=!0,this[T]()}disconnectedCallback(){this[d]=!1,this[u]&&o.unmount(this[u]),delete this[u]}attributeChangedCallback(r,_,c){const a=h[r],E=p[a],N=E?y[E]:null;a in p&&N!=null&&N.parse&&c&&(this[l][a]=N.parse(c,r,this),this[T]())}[(i=d,O=u,A=l,T)](){this[d]&&(this[u]?o.update(this[u],this[l]):this[u]=o.mount(this.container,e,this[l]))}}for(const s of m){const r=f[s],_=p[s];Object.defineProperty(P.prototype,s,{enumerable:!0,configurable:!0,get(){return this[l][s]},set(c){this[l][s]=c;const a=_?y[_]:null;if(a!=null&&a.stringify){const E=a.stringify(c,r,this);this.getAttribute(r)!==E&&this.setAttribute(r,E)}else this[T]()}})}return P}function F(e,t,o){const i=W.createRoot(e),O=g.createElement(t,o);return i.render(O),{root:i,ReactComponent:t}}function v({root:e,ReactComponent:t},o){const i=g.createElement(t,o);e.render(i)}function Y({root:e}){setTimeout(()=>{e.unmount()},0)}function C(e,t={}){return G(e,t,{mount:F,update:v,unmount:Y})}const j=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"}}),k=C(n.WebPlayerCustomMedia,{shadow:"closed",props:{index:"number",thumbnailSrc:"string"}}),B=C(n.WebPlayerIcon,{shadow:"closed",props:{name:"string"}});function x(){customElements.define(n.WEB_PLAYER_WC_TAG,j),customElements.define(n.WEB_PLAYER_CUSTOM_MEDIA_WC_TAG,k),customElements.define(n.WEB_PLAYER_ICON_WC_TAG,B)}function H(){n.checkCustomElementsDefinition()||x()}H();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
@@ -75,7 +75,16 @@ declare type ImageWithHotspots = {
75
75
  hotspots?: Hotspot[];
76
76
  };
77
77
 
78
- export declare type Item = ImageItem | VideoItem | ThreeSixtyItem;
78
+ declare type InteriorThreeSixtyItem = {
79
+ type: "interior-360";
80
+ poster?: string;
81
+ } & ImageWithHotspots;
82
+
83
+ export declare type Item =
84
+ | ImageItem
85
+ | VideoItem
86
+ | ThreeSixtyItem
87
+ | InteriorThreeSixtyItem;
79
88
 
80
89
  export declare type MediaLoadStrategy = "quality" | "balanced" | "speed";
81
90
 
@@ -121,6 +130,7 @@ declare type WebPlayerIconName =
121
130
  | "UI_PLUS" // Increase zoom
122
131
  | "UI_REDUCE" // Reducing an extended view
123
132
  | "UI_360" // 360-degree view
133
+ | "UI_INTERIOR_360" // interior 360 view
124
134
  | "UI_VOLUME" // Video volume
125
135
  | "UI_VOLUME_OFF" // Muted video
126
136
  | "CONTROLS_PREV" // Go to previous media
@@ -162,8 +172,9 @@ declare type WebPlayerProps_2 = {
162
172
  maxMediaWidth?: MediaWidth;
163
173
  preloadRange?: number;
164
174
  autoLoad360?: boolean;
175
+ autoLoadInterior360?: boolean;
165
176
 
166
- // Miscelaneous
177
+ // Miscellaneous
167
178
  categoriesFilter?: string;
168
179
  extendBehavior?: ExtendBehavior;
169
180
  eventPrefix?: string;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { W as P, a as W, b as S, c as w, d as L, e as I, f as M } from "./shared-B4kKjNn6.js";
2
- import { D as oe, j as re, E as se, k as ie, n as ae, m as ce, r as le, q as ue, p as pe, o as me, l as fe, g as be, h as Ee, i as he, s as de } from "./shared-B4kKjNn6.js";
1
+ import { W as P, a as W, b as S, c as w, d as L, e as I, f as M } from "./shared-BfUw6eC0.js";
2
+ import { D as oe, j as re, E as se, k as ie, n as ae, m as ce, r as le, q as ue, p as pe, o as me, l as fe, g as be, h as Ee, i as de, s as he } from "./shared-BfUw6eC0.js";
3
3
  import "react/jsx-runtime";
4
4
  import A from "react";
5
5
  import { createRoot as D } from "react-dom/client";
@@ -40,12 +40,12 @@ function G(e) {
40
40
  (t, n, r) => `${n}-${r.toLowerCase()}`
41
41
  );
42
42
  }
43
- const E = Symbol.for("r2wc.render"), h = Symbol.for("r2wc.connected"), u = Symbol.for("r2wc.context"), l = Symbol.for("r2wc.props");
43
+ const E = Symbol.for("r2wc.render"), d = Symbol.for("r2wc.connected"), u = Symbol.for("r2wc.context"), l = Symbol.for("r2wc.props");
44
44
  function Y(e, t, n) {
45
45
  var r, f, C;
46
46
  t.props || (t.props = e.propTypes ? Object.keys(e.propTypes) : []);
47
- const d = Array.isArray(t.props) ? t.props.slice() : Object.keys(t.props), m = {}, y = {}, _ = {};
48
- for (const s of d) {
47
+ const h = Array.isArray(t.props) ? t.props.slice() : Object.keys(t.props), m = {}, y = {}, _ = {};
48
+ for (const s of h) {
49
49
  m[s] = Array.isArray(t.props) ? "string" : t.props[s];
50
50
  const o = G(s);
51
51
  y[s] = o, _[o] = s;
@@ -55,7 +55,7 @@ function Y(e, t, n) {
55
55
  super(), b(this, r, !0), b(this, f), b(this, C, {}), b(this, "container"), t.shadow ? this.container = this.attachShadow({
56
56
  mode: t.shadow
57
57
  }) : this.container = this, this[l].container = this.container;
58
- for (const o of d) {
58
+ for (const o of h) {
59
59
  const p = y[o], c = this.getAttribute(p), i = m[o], a = i ? O[i] : null;
60
60
  a != null && a.parse && c && (this[l][o] = a.parse(c, p, this));
61
61
  }
@@ -64,24 +64,24 @@ function Y(e, t, n) {
64
64
  return Object.keys(_);
65
65
  }
66
66
  connectedCallback() {
67
- this[h] = !0, this[E]();
67
+ this[d] = !0, this[E]();
68
68
  }
69
69
  disconnectedCallback() {
70
- this[h] = !1, this[u] && n.unmount(this[u]), delete this[u];
70
+ this[d] = !1, this[u] && n.unmount(this[u]), delete this[u];
71
71
  }
72
72
  attributeChangedCallback(o, p, c) {
73
73
  const i = _[o], a = m[i], g = a ? O[a] : null;
74
74
  i in m && g != null && g.parse && c && (this[l][i] = g.parse(c, o, this), this[E]());
75
75
  }
76
- [(r = h, f = u, C = l, E)]() {
77
- this[h] && (this[u] ? n.update(this[u], this[l]) : this[u] = n.mount(
76
+ [(r = d, f = u, C = l, E)]() {
77
+ this[d] && (this[u] ? n.update(this[u], this[l]) : this[u] = n.mount(
78
78
  this.container,
79
79
  e,
80
80
  this[l]
81
81
  ));
82
82
  }
83
83
  }
84
- for (const s of d) {
84
+ for (const s of h) {
85
85
  const o = y[s], p = m[s];
86
86
  Object.defineProperty(N.prototype, s, {
87
87
  enumerable: !0,
@@ -122,7 +122,7 @@ function T(e, t = {}) {
122
122
  return Y(e, t, { mount: B, update: H, unmount: U });
123
123
  }
124
124
  const $ = T(P, {
125
- shadow: "open",
125
+ shadow: "closed",
126
126
  props: {
127
127
  compositionUrl: "string",
128
128
  // Layout
@@ -135,7 +135,8 @@ const $ = T(P, {
135
135
  mediaLoadStrategy: "string",
136
136
  preloadRange: "number",
137
137
  autoLoad360: "boolean",
138
- // Miscelaneous
138
+ autoLoadInterior360: "boolean",
139
+ // Miscellaneous
139
140
  categoriesFilter: "string",
140
141
  extendBehavior: "string",
141
142
  eventPrefix: "string",
@@ -180,6 +181,6 @@ export {
180
181
  L as WEB_PLAYER_WC_TAG,
181
182
  be as WebPlayer,
182
183
  Ee as WebPlayerCustomMedia,
183
- he as WebPlayerIcon,
184
- de as generateCompositionUrl
184
+ de as WebPlayerIcon,
185
+ he as generateCompositionUrl
185
186
  };
package/dist/legacy.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./shared-DURk-_r6.cjs");require("react/jsx-runtime");const W=require("react"),y=require("react-dom");var S=Object.defineProperty,L=(e,t,o)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,O=(e,t,o)=>(L(e,typeof t!="symbol"?t+"":t,o),o);const I={stringify:e=>e,parse:e=>e},V={stringify:e=>`${e}`,parse:e=>parseFloat(e)},M={stringify:e=>e?"true":"false",parse:e=>/^[ty1-9]/i.test(e)},R={stringify:e=>e.name,parse:(e,t,o)=>{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(o):void 0}},D={stringify:e=>JSON.stringify(e),parse:e=>JSON.parse(e)},N={string:I,number:V,boolean:M,function:R,json:D};function w(e){return e.replace(/([a-z0-9])([A-Z])/g,(t,o,s)=>`${o}-${s.toLowerCase()}`)}const b=Symbol.for("r2wc.render"),T=Symbol.for("r2wc.connected"),u=Symbol.for("r2wc.context"),l=Symbol.for("r2wc.props");function G(e,t,o){var s,A,P;t.props||(t.props=e.propTypes?Object.keys(e.propTypes):[]);const m=Array.isArray(t.props)?t.props.slice():Object.keys(t.props),p={},d={},f={};for(const i of m){p[i]=Array.isArray(t.props)?"string":t.props[i];const r=w(i);d[i]=r,f[r]=i}class g extends HTMLElement{constructor(){super(),O(this,s,!0),O(this,A),O(this,P,{}),O(this,"container"),t.shadow?this.container=this.attachShadow({mode:t.shadow}):this.container=this,this[l].container=this.container;for(const r of m){const _=d[r],c=this.getAttribute(_),a=p[r],E=a?N[a]:null;E!=null&&E.parse&&c&&(this[l][r]=E.parse(c,_,this))}}static get observedAttributes(){return Object.keys(f)}connectedCallback(){this[T]=!0,this[b]()}disconnectedCallback(){this[T]=!1,this[u]&&o.unmount(this[u]),delete this[u]}attributeChangedCallback(r,_,c){const a=f[r],E=p[a],h=E?N[E]:null;a in p&&h!=null&&h.parse&&c&&(this[l][a]=h.parse(c,r,this),this[b]())}[(s=T,A=u,P=l,b)](){this[T]&&(this[u]?o.update(this[u],this[l]):this[u]=o.mount(this.container,e,this[l]))}}for(const i of m){const r=d[i],_=p[i];Object.defineProperty(g.prototype,i,{enumerable:!0,configurable:!0,get(){return this[l][i]},set(c){this[l][i]=c;const a=_?N[_]:null;if(a!=null&&a.stringify){const E=a.stringify(c,r,this);this.getAttribute(r)!==E&&this.setAttribute(r,E)}else this[b]()}})}return g}function F(e,t,o){const s=W.createElement(t,o);return y.render(s,e),{container:e,ReactComponent:t}}function v({container:e,ReactComponent:t},o){const s=W.createElement(t,o);y.render(s,e)}function Y({container:e}){y.unmountComponentAtNode(e)}function C(e,t={}){return G(e,t,{mount:F,update:v,unmount:Y})}const j=C(n.WebPlayerWithInjectedStyles,{shadow:"open",props:{compositionUrl:"string",hideCategoriesNav:"boolean",infiniteCarrousel:"boolean",permanentGallery:"boolean",minMediaWidth:"number",maxMediaWidth:"number",mediaLoadStrategy:"string",preloadRange:"number",autoLoad360:"boolean",categoriesFilter:"string",extendBehavior:"string",eventPrefix:"string",demoSpin:"boolean",reverse360:"boolean"}}),k=C(n.WebPlayerCustomMedia,{shadow:"closed",props:{index:"number",thumbnailSrc:"string"}}),B=C(n.WebPlayerIcon,{shadow:"closed",props:{name:"string"}});function $(){customElements.define(n.WEB_PLAYER_WC_TAG,j),customElements.define(n.WEB_PLAYER_CUSTOM_MEDIA_WC_TAG,k),customElements.define(n.WEB_PLAYER_ICON_WC_TAG,B)}function x(){n.checkCustomElementsDefinition()||$()}x();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-DopQYQcS.cjs");require("react/jsx-runtime");const W=require("react"),y=require("react-dom");var S=Object.defineProperty,L=(e,t,r)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,O=(e,t,r)=>(L(e,typeof t!="symbol"?t+"":t,r),r);const I={stringify:e=>e,parse:e=>e},V={stringify:e=>`${e}`,parse:e=>parseFloat(e)},M={stringify:e=>e?"true":"false",parse:e=>/^[ty1-9]/i.test(e)},R={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}},D={stringify:e=>JSON.stringify(e),parse:e=>JSON.parse(e)},N={string:I,number:V,boolean:M,function:R,json:D};function w(e){return e.replace(/([a-z0-9])([A-Z])/g,(t,r,s)=>`${r}-${s.toLowerCase()}`)}const b=Symbol.for("r2wc.render"),d=Symbol.for("r2wc.connected"),u=Symbol.for("r2wc.context"),l=Symbol.for("r2wc.props");function G(e,t,r){var s,A,P;t.props||(t.props=e.propTypes?Object.keys(e.propTypes):[]);const T=Array.isArray(t.props)?t.props.slice():Object.keys(t.props),p={},m={},f={};for(const i of T){p[i]=Array.isArray(t.props)?"string":t.props[i];const o=w(i);m[i]=o,f[o]=i}class g extends HTMLElement{constructor(){super(),O(this,s,!0),O(this,A),O(this,P,{}),O(this,"container"),t.shadow?this.container=this.attachShadow({mode:t.shadow}):this.container=this,this[l].container=this.container;for(const o of T){const _=m[o],c=this.getAttribute(_),a=p[o],E=a?N[a]:null;E!=null&&E.parse&&c&&(this[l][o]=E.parse(c,_,this))}}static get observedAttributes(){return Object.keys(f)}connectedCallback(){this[d]=!0,this[b]()}disconnectedCallback(){this[d]=!1,this[u]&&r.unmount(this[u]),delete this[u]}attributeChangedCallback(o,_,c){const a=f[o],E=p[a],h=E?N[E]:null;a in p&&h!=null&&h.parse&&c&&(this[l][a]=h.parse(c,o,this),this[b]())}[(s=d,A=u,P=l,b)](){this[d]&&(this[u]?r.update(this[u],this[l]):this[u]=r.mount(this.container,e,this[l]))}}for(const i of T){const o=m[i],_=p[i];Object.defineProperty(g.prototype,i,{enumerable:!0,configurable:!0,get(){return this[l][i]},set(c){this[l][i]=c;const a=_?N[_]:null;if(a!=null&&a.stringify){const E=a.stringify(c,o,this);this.getAttribute(o)!==E&&this.setAttribute(o,E)}else this[b]()}})}return g}function F(e,t,r){const s=W.createElement(t,r);return y.render(s,e),{container:e,ReactComponent:t}}function v({container:e,ReactComponent:t},r){const s=W.createElement(t,r);y.render(s,e)}function Y({container:e}){y.unmountComponentAtNode(e)}function C(e,t={}){return G(e,t,{mount:F,update:v,unmount:Y})}const j=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"}}),k=C(n.WebPlayerCustomMedia,{shadow:"closed",props:{index:"number",thumbnailSrc:"string"}}),B=C(n.WebPlayerIcon,{shadow:"closed",props:{name:"string"}});function $(){customElements.define(n.WEB_PLAYER_WC_TAG,j),customElements.define(n.WEB_PLAYER_CUSTOM_MEDIA_WC_TAG,k),customElements.define(n.WEB_PLAYER_ICON_WC_TAG,B)}function x(){n.checkCustomElementsDefinition()||$()}x();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
@@ -75,7 +75,16 @@ declare type ImageWithHotspots = {
75
75
  hotspots?: Hotspot[];
76
76
  };
77
77
 
78
- export declare type Item = ImageItem | VideoItem | ThreeSixtyItem;
78
+ declare type InteriorThreeSixtyItem = {
79
+ type: "interior-360";
80
+ poster?: string;
81
+ } & ImageWithHotspots;
82
+
83
+ export declare type Item =
84
+ | ImageItem
85
+ | VideoItem
86
+ | ThreeSixtyItem
87
+ | InteriorThreeSixtyItem;
79
88
 
80
89
  export declare type MediaLoadStrategy = "quality" | "balanced" | "speed";
81
90
 
@@ -121,6 +130,7 @@ declare type WebPlayerIconName =
121
130
  | "UI_PLUS" // Increase zoom
122
131
  | "UI_REDUCE" // Reducing an extended view
123
132
  | "UI_360" // 360-degree view
133
+ | "UI_INTERIOR_360" // interior 360 view
124
134
  | "UI_VOLUME" // Video volume
125
135
  | "UI_VOLUME_OFF" // Muted video
126
136
  | "CONTROLS_PREV" // Go to previous media
@@ -162,8 +172,9 @@ declare type WebPlayerProps_2 = {
162
172
  maxMediaWidth?: MediaWidth;
163
173
  preloadRange?: number;
164
174
  autoLoad360?: boolean;
175
+ autoLoadInterior360?: boolean;
165
176
 
166
- // Miscelaneous
177
+ // Miscellaneous
167
178
  categoriesFilter?: string;
168
179
  extendBehavior?: ExtendBehavior;
169
180
  eventPrefix?: string;
package/dist/legacy.js CHANGED
@@ -1,5 +1,5 @@
1
- import { W, a as S, b as w, c as L, d as I, e as M, f as D } from "./shared-B4kKjNn6.js";
2
- import { D as oe, j as re, E as se, k as ie, n as ae, m as ce, r as le, q as pe, p as ue, o as me, l as fe, g as be, h as Ee, i as de, s as he } from "./shared-B4kKjNn6.js";
1
+ import { W, a as S, b as w, c as L, d as I, e as M, f as D } from "./shared-BfUw6eC0.js";
2
+ import { D as oe, j as re, E as se, k as ie, n as ae, m as ce, r as le, q as ue, p as pe, o as me, l as fe, g as be, h as Ee, i as de, s as he } from "./shared-BfUw6eC0.js";
3
3
  import "react/jsx-runtime";
4
4
  import P from "react";
5
5
  import O from "react-dom";
@@ -40,7 +40,7 @@ function G(e) {
40
40
  (t, n, s) => `${n}-${s.toLowerCase()}`
41
41
  );
42
42
  }
43
- const b = Symbol.for("r2wc.render"), E = Symbol.for("r2wc.connected"), p = Symbol.for("r2wc.context"), l = Symbol.for("r2wc.props");
43
+ const b = Symbol.for("r2wc.render"), E = Symbol.for("r2wc.connected"), u = Symbol.for("r2wc.context"), l = Symbol.for("r2wc.props");
44
44
  function $(e, t, n) {
45
45
  var s, T, N;
46
46
  t.props || (t.props = e.propTypes ? Object.keys(e.propTypes) : []);
@@ -56,8 +56,8 @@ function $(e, t, n) {
56
56
  mode: t.shadow
57
57
  }) : this.container = this, this[l].container = this.container;
58
58
  for (const o of d) {
59
- const u = h[o], c = this.getAttribute(u), i = m[o], a = i ? g[i] : null;
60
- a != null && a.parse && c && (this[l][o] = a.parse(c, u, this));
59
+ const p = h[o], c = this.getAttribute(p), i = m[o], a = i ? g[i] : null;
60
+ a != null && a.parse && c && (this[l][o] = a.parse(c, p, this));
61
61
  }
62
62
  }
63
63
  static get observedAttributes() {
@@ -67,14 +67,14 @@ function $(e, t, n) {
67
67
  this[E] = !0, this[b]();
68
68
  }
69
69
  disconnectedCallback() {
70
- this[E] = !1, this[p] && n.unmount(this[p]), delete this[p];
70
+ this[E] = !1, this[u] && n.unmount(this[u]), delete this[u];
71
71
  }
72
- attributeChangedCallback(o, u, c) {
72
+ attributeChangedCallback(o, p, c) {
73
73
  const i = y[o], a = m[i], _ = a ? g[a] : null;
74
74
  i in m && _ != null && _.parse && c && (this[l][i] = _.parse(c, o, this), this[b]());
75
75
  }
76
- [(s = E, T = p, N = l, b)]() {
77
- this[E] && (this[p] ? n.update(this[p], this[l]) : this[p] = n.mount(
76
+ [(s = E, T = u, N = l, b)]() {
77
+ this[E] && (this[u] ? n.update(this[u], this[l]) : this[u] = n.mount(
78
78
  this.container,
79
79
  e,
80
80
  this[l]
@@ -82,7 +82,7 @@ function $(e, t, n) {
82
82
  }
83
83
  }
84
84
  for (const r of d) {
85
- const o = h[r], u = m[r];
85
+ const o = h[r], p = m[r];
86
86
  Object.defineProperty(A.prototype, r, {
87
87
  enumerable: !0,
88
88
  configurable: !0,
@@ -91,7 +91,7 @@ function $(e, t, n) {
91
91
  },
92
92
  set(c) {
93
93
  this[l][r] = c;
94
- const i = u ? g[u] : null;
94
+ const i = p ? g[p] : null;
95
95
  if (i != null && i.stringify) {
96
96
  const a = i.stringify(c, o, this);
97
97
  this.getAttribute(o) !== a && this.setAttribute(o, a);
@@ -120,7 +120,7 @@ function C(e, t = {}) {
120
120
  return $(e, t, { mount: Y, update: B, unmount: H });
121
121
  }
122
122
  const U = C(W, {
123
- shadow: "open",
123
+ shadow: "closed",
124
124
  props: {
125
125
  compositionUrl: "string",
126
126
  // Layout
@@ -133,7 +133,8 @@ const U = C(W, {
133
133
  mediaLoadStrategy: "string",
134
134
  preloadRange: "number",
135
135
  autoLoad360: "boolean",
136
- // Miscelaneous
136
+ autoLoadInterior360: "boolean",
137
+ // Miscellaneous
137
138
  categoriesFilter: "string",
138
139
  extendBehavior: "string",
139
140
  eventPrefix: "string",
@@ -170,8 +171,8 @@ export {
170
171
  ae as EVENT_EXTEND_MODE_OFF,
171
172
  ce as EVENT_EXTEND_MODE_ON,
172
173
  le as EVENT_GALLERY_CLOSE,
173
- pe as EVENT_GALLERY_OPEN,
174
- ue as EVENT_HOTSPOTS_OFF,
174
+ ue as EVENT_GALLERY_OPEN,
175
+ pe as EVENT_HOTSPOTS_OFF,
175
176
  me as EVENT_HOTSPOTS_ON,
176
177
  fe as EVENT_ITEM_CHANGE,
177
178
  D as WEB_PLAYER_ICON_WC_TAG,