@lockerverse/react 0.2.231-dev.1 → 0.2.233

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.
@@ -1,2 +1,2 @@
1
- var s=["./chunks/chunk-MSQVGTKU.js","./chunks/chunk-TAGGYALM.js","./chunks/chunk-DCANE7XH.js"];var a=/^[A-Za-z0-9_-]+$/;function l(n){let e=n.getAttribute("community")??"",t=n.getAttribute("auction")??"",o=n.getAttribute("instance")??"main",r=n.getAttribute("environment")??"production";if(!a.test(e)||t!==""&&!a.test(t)||!a.test(o)||r!=="production"&&r!=="development")throw new Error("Check the Lockerverse embed settings.");return{auction:t,instance:o,options:r==="development"?{apiBaseUrl:"https://portal-dev.lockerverse.com/api",communitySlug:e,environment:r}:{communitySlug:e,environment:r}}}function d(n){let e=new URL(window.location.href).searchParams;return{auction:n.auction||e.get(`lv-${n.instance}-auction`)||"",item:e.get(`lv-${n.instance}-item`)||""}}var m=`:host{display:block;min-width:0;color:#121416;color-scheme:light;background:#fff}:host([theme="dark"]),:host([theme="dark"])>div{color:#fff;color-scheme:dark;background:#050505}:host(:not([theme="dark"]))>div{color:#121416;color-scheme:light;background:#fff}.lv-embed-skeleton{--lv-placeholder: #e2e5e9;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:20px;padding:20px 0}:host([theme="dark"]) .lv-embed-skeleton{--lv-placeholder: #343840}.lv-embed-skeleton:before{grid-column:1 / -1;width:min(60%,420px);height:28px;content:"";background:var(--lv-placeholder);border-radius:4px}.lv-embed-skeleton>span{display:block}.lv-embed-skeleton>span:before,.lv-embed-skeleton>span:after{display:block;content:"";background:var(--lv-placeholder);border-radius:8px}.lv-embed-skeleton>span:before{aspect-ratio:4 / 3}.lv-embed-skeleton>span:after{width:70%;height:14px;margin-top:12px}
1
+ var s=["./chunks/chunk-X2H3RJL5.js","./chunks/chunk-NPBSL7JK.js","./chunks/chunk-DCANE7XH.js"];var a=/^[A-Za-z0-9_-]+$/;function l(n){let e=n.getAttribute("community")??"",t=n.getAttribute("auction")??"",o=n.getAttribute("instance")??"main",r=n.getAttribute("environment")??"production";if(!a.test(e)||t!==""&&!a.test(t)||!a.test(o)||r!=="production"&&r!=="development")throw new Error("Check the Lockerverse embed settings.");return{auction:t,instance:o,options:r==="development"?{apiBaseUrl:"https://portal-dev.lockerverse.com/api",communitySlug:e,environment:r}:{communitySlug:e,environment:r}}}function d(n){let e=new URL(window.location.href).searchParams;return{auction:n.auction||e.get(`lv-${n.instance}-auction`)||"",item:e.get(`lv-${n.instance}-item`)||""}}var m=`:host{display:block;min-width:0;color:#121416;color-scheme:light;background:#fff}:host([theme="dark"]),:host([theme="dark"])>div{color:#fff;color-scheme:dark;background:#050505}:host(:not([theme="dark"]))>div{color:#121416;color-scheme:light;background:#fff}.lv-embed-skeleton{--lv-placeholder: #e2e5e9;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:20px;padding:20px 0}:host([theme="dark"]) .lv-embed-skeleton{--lv-placeholder: #343840}.lv-embed-skeleton:before{grid-column:1 / -1;width:min(60%,420px);height:28px;content:"";background:var(--lv-placeholder);border-radius:4px}.lv-embed-skeleton>span{display:block}.lv-embed-skeleton>span:before,.lv-embed-skeleton>span:after{display:block;content:"";background:var(--lv-placeholder);border-radius:8px}.lv-embed-skeleton>span:before{aspect-ratio:4 / 3}.lv-embed-skeleton>span:after{width:70%;height:14px;margin-top:12px}
2
2
  `;function u(n,e,t){let o=document.createElement("style");o.textContent=t,n.nonce&&(o.nonce=n.nonce),e.append(o)}function p(n){let e=document.createElement("div");e.className="lv-embed-skeleton",e.setAttribute("role","status"),e.setAttribute("aria-label","Loading auction");for(let t=0;t<3;t+=1){let o=document.createElement("span");o.setAttribute("aria-hidden","true"),e.append(o)}n.replaceChildren(e)}function b(n){let{options:e}=n,o=`${e.apiBaseUrl??"https://portal.lockerverse.com/api"}/auctions/communities/slug/${encodeURIComponent(e.communitySlug)}`,{auction:r}=d(n),i=document.createElement("link");return i.rel="preload",i.as="fetch",i.crossOrigin="anonymous",i.href=r?`${o}/path/${encodeURIComponent(r)}`:o,document.head.append(i),i}var h=!1;function g(){if(!h){h=!0;for(let n of s){let e=document.createElement("link");e.rel="modulepreload",e.href=new URL(n,import.meta.url).href,e.crossOrigin="anonymous",document.head.append(e)}}}var c=class extends HTMLElement{static observedAttributes=["theme","accent"];mount;container;preload;connectedCallback(){if(this.container)return;let e=this.shadowRoot??this.attachShadow({mode:"open"});e.replaceChildren(),u(this,e,m);let t=document.createElement("div");this.container=t,e.append(t);let o;try{o=l(this)}catch{t.setAttribute("role","alert"),t.textContent="Check the Lockerverse embed settings.";return}p(t),this.preload=b(o),g(),import("./runtime.js").then(({mountAuction:r})=>{this.isConnected&&this.container===t&&(this.mount=r(this,t,o,e))}).catch(()=>{this.container===t&&(t.setAttribute("role","alert"),t.textContent="The auction interface could not load. Reload the page to try again.")})}disconnectedCallback(){queueMicrotask(()=>{this.isConnected||(this.mount?.unmount(),this.mount=void 0,this.container=void 0,this.preload?.remove(),this.preload=void 0)})}attributeChangedCallback(){this.mount?.render()}};customElements.get("lockerverse-auctions")||customElements.define("lockerverse-auctions",c);