@maveio/components 0.0.147 → 0.0.148
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/{chunk-7RUFAJU7.js → chunk-6NL5KOSJ.js} +22 -22
- package/dist/{chunk-FV4JASPW.js → chunk-B6XMC3AJ.js} +1 -1
- package/dist/{chunk-XEX3IC3M.cjs → chunk-N53P7KPA.cjs} +2 -2
- package/dist/{chunk-L7VA6GE2.cjs → chunk-OOYAQ2X4.cjs} +22 -22
- package/dist/{chunk-RGS33NUE.js → chunk-U6N2SUDH.js} +1 -1
- package/dist/{chunk-JIKMLGYN.cjs → chunk-URZX7GGF.cjs} +1 -1
- package/dist/components/list.cjs +1 -1
- package/dist/components/list.js +1 -1
- package/dist/components/player.cjs +1 -1
- package/dist/components/player.js +1 -1
- package/dist/components/pop.cjs +1 -1
- package/dist/components/pop.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-6NL5KOSJ.js';import {a as a$1}from'./chunk-MS5NFI3Q.js';import {c as c$1,a}from'./chunk-HMISRRKC.js';import {h,i as i$1,c as c$2}from'./chunk-A4GZBQEB.js';import {c}from'./chunk-NDDFZTBA.js';var i=class extends i$1{get backdrop(){return this._backdropColor||"black"}set backdrop(t){this._backdropColor!=t&&(this._backdropColor=t);}get backdropFilter(){return this._backdropFilter}set backdropFilter(t){this._backdropFilter!=t&&(this._backdropFilter=t);}get styles(){let t={"--backdrop":this.backdrop,"--backdrop-filter":this.backdropFilter};return a$1(t)}open(t){if(this._player=t,t.aspect_ratio){let[o,d]=t.aspect_ratio.split("/");this.style.setProperty("--frame-ratio-w",o),this.style.setProperty("--frame-ratio-h",d);}this.style.display="block";let n=o=>{this._frame.appendChild(t),setTimeout(()=>{this._dialog.showModal();},25),this._dialog.addEventListener("close",d=>{d.preventDefault(),this.close();},{once:true}),o(this);};return new Promise(o=>{if(this._dialog)n(o);else {let d=setInterval(()=>{this._dialog&&(n(o),clearInterval(d));},100);return}})}possibleClose(t){t.target!=this._player&&this.close();}close(){this._dialog.close(),this._backdrop.addEventListener("transitionend",()=>{this._frame.innerHTML="",this.dispatchEvent(new Event("closed",{bubbles:true}));},{once:true});}render(){return c$2`
|
|
2
2
|
<dialog style=${this.styles}>
|
|
3
3
|
<div class="backdrop"></div>
|
|
4
4
|
<div class="content" @click=${this.possibleClose}>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkOOYAQ2X4_cjs=require('./chunk-OOYAQ2X4.cjs'),chunkQ22T22LT_cjs=require('./chunk-Q22T22LT.cjs'),chunkFUBUUA7Y_cjs=require('./chunk-FUBUUA7Y.cjs'),chunk5NSCV6C2_cjs=require('./chunk-5NSCV6C2.cjs'),chunkIPA5Q26W_cjs=require('./chunk-IPA5Q26W.cjs');var i=class extends chunk5NSCV6C2_cjs.i{get backdrop(){return this._backdropColor||"black"}set backdrop(t){this._backdropColor!=t&&(this._backdropColor=t);}get backdropFilter(){return this._backdropFilter}set backdropFilter(t){this._backdropFilter!=t&&(this._backdropFilter=t);}get styles(){let t={"--backdrop":this.backdrop,"--backdrop-filter":this.backdropFilter};return chunkQ22T22LT_cjs.a(t)}open(t){if(this._player=t,t.aspect_ratio){let[o,d]=t.aspect_ratio.split("/");this.style.setProperty("--frame-ratio-w",o),this.style.setProperty("--frame-ratio-h",d);}this.style.display="block";let n=o=>{this._frame.appendChild(t),setTimeout(()=>{this._dialog.showModal();},25),this._dialog.addEventListener("close",d=>{d.preventDefault(),this.close();},{once:true}),o(this);};return new Promise(o=>{if(this._dialog)n(o);else {let d=setInterval(()=>{this._dialog&&(n(o),clearInterval(d));},100);return}})}possibleClose(t){t.target!=this._player&&this.close();}close(){this._dialog.close(),this._backdrop.addEventListener("transitionend",()=>{this._frame.innerHTML="",this.dispatchEvent(new Event("closed",{bubbles:true}));},{once:true});}render(){return chunk5NSCV6C2_cjs.c`
|
|
2
2
|
<dialog style=${this.styles}>
|
|
3
3
|
<div class="backdrop"></div>
|
|
4
4
|
<div class="content" @click=${this.possibleClose}>
|
|
@@ -151,4 +151,4 @@
|
|
|
151
151
|
background-position: center center;
|
|
152
152
|
background-repeat: no-repeat;
|
|
153
153
|
}
|
|
154
|
-
`,chunkIPA5Q26W_cjs.c([chunkFUBUUA7Y_cjs.c("dialog")],i.prototype,"_dialog",2),chunkIPA5Q26W_cjs.c([chunkFUBUUA7Y_cjs.c(".content")],i.prototype,"_content",2),chunkIPA5Q26W_cjs.c([chunkFUBUUA7Y_cjs.c(".frame")],i.prototype,"_frame",2),chunkIPA5Q26W_cjs.c([chunkFUBUUA7Y_cjs.c(".backdrop")],i.prototype,"_backdrop",2),chunkIPA5Q26W_cjs.c([chunkFUBUUA7Y_cjs.a()],i.prototype,"backdrop",1),chunkIPA5Q26W_cjs.c([chunkFUBUUA7Y_cjs.a({attribute:"backdrop-filter"})],i.prototype,"backdropFilter",1);window&&window.customElements&&(window.customElements.get("mave-pop")||window.customElements.define("mave-pop",i));function k(l){let t={};if(!l)return t;for(let n=0;n<l.attributes.length;n++){let o=l.attributes[n];t[o.name]=o.value;}return t}var w=l=>{function t(s){let e,r,a=document.querySelector(`mave-pop[embed="${s}"]`);if(a)return r=k(a.querySelector("mave-player")),e=a,{pop:e,attributes:r};let p=document.querySelector("mave-pop:not([embed])");return p?(r=k(p.querySelector("mave-player")),e=p,{pop:e,attributes:r}):(e=new i,document.body.appendChild(e),{pop:e})}function n(s,e){let r=new
|
|
154
|
+
`,chunkIPA5Q26W_cjs.c([chunkFUBUUA7Y_cjs.c("dialog")],i.prototype,"_dialog",2),chunkIPA5Q26W_cjs.c([chunkFUBUUA7Y_cjs.c(".content")],i.prototype,"_content",2),chunkIPA5Q26W_cjs.c([chunkFUBUUA7Y_cjs.c(".frame")],i.prototype,"_frame",2),chunkIPA5Q26W_cjs.c([chunkFUBUUA7Y_cjs.c(".backdrop")],i.prototype,"_backdrop",2),chunkIPA5Q26W_cjs.c([chunkFUBUUA7Y_cjs.a()],i.prototype,"backdrop",1),chunkIPA5Q26W_cjs.c([chunkFUBUUA7Y_cjs.a({attribute:"backdrop-filter"})],i.prototype,"backdropFilter",1);window&&window.customElements&&(window.customElements.get("mave-pop")||window.customElements.define("mave-pop",i));function k(l){let t={};if(!l)return t;for(let n=0;n<l.attributes.length;n++){let o=l.attributes[n];t[o.name]=o.value;}return t}var w=l=>{function t(s){let e,r,a=document.querySelector(`mave-pop[embed="${s}"]`);if(a)return r=k(a.querySelector("mave-player")),e=a,{pop:e,attributes:r};let p=document.querySelector("mave-pop:not([embed])");return p?(r=k(p.querySelector("mave-player")),e=p,{pop:e,attributes:r}):(e=new i,document.body.appendChild(e),{pop:e})}function n(s,e){let r=new chunkOOYAQ2X4_cjs.a;if(e)for(let a in e)r.setAttribute(a,e[a]);return r.embed=s,r}function o(s){s.querySelectorAll("[x-mave-pop]").forEach(e=>{let r=e.getAttribute("x-mave-pop")||e.getAttribute("embed");if(!r)return;let{pop:a,attributes:p}=t(r);n(r,p),e.addEventListener("click",E=>{E.preventDefault();let _=document.querySelectorAll("mave-player");if(!Array.from(_).find(m=>m.popped)){let m=n(r,p);a.open(m).then(()=>{m.play();}),a.addEventListener("closed",()=>{m.pause();});}});});}o(l),new MutationObserver(s=>{for(let e of s)e.type==="childList"&&e.addedNodes.forEach(r=>{r instanceof HTMLElement&&o(r);});}).observe(document.body,{childList:true,subtree:true});};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{w(document);}):setTimeout(()=>w(document),500);exports.a=i;exports.b=w;
|