feazy-neo-chat-component 0.1.30 → 0.1.31
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.
|
@@ -216,5 +216,5 @@ var Bz=Object.defineProperty;var Wz=(O,Ye,Mt)=>Ye in O?Bz(O,Ye,{enumerable:!0,co
|
|
|
216
216
|
font-weight: 100 900;
|
|
217
217
|
font-style: italic;
|
|
218
218
|
font-display: swap;
|
|
219
|
-
}`:"";class Lz extends HTMLElement{constructor(){super(...arguments);la(this,"root");la(this,"container")}static get observedAttributes(){return["prompt-id","api-key","base-url","theme","high-contrast"]}connectedCallback(){const n=this.attachShadow({mode:"open"});try{if(!document.querySelector("link[data-inter-rsms]")){const
|
|
219
|
+
}`:"";class Lz extends HTMLElement{constructor(){super(...arguments);la(this,"root");la(this,"container")}static get observedAttributes(){return["prompt-id","api-key","base-url","theme","high-contrast"]}connectedCallback(){const n=this.attachShadow({mode:"open"});try{if(!document.querySelector("link[data-inter-rsms]")){const s=document.createElement("link");s.rel="stylesheet",s.href="https://rsms.me/inter/inter.css",s.crossOrigin="anonymous",s.setAttribute("data-inter-rsms",""),document.head.appendChild(s)}}catch{}const r=document.createElement("style");let o=String(Cz).replace(/:root/g,":host");const a=16;o=o.replace(/(-?\d*\.?\d+)rem\b/g,(i,s)=>`${Math.round(parseFloat(s)*a*1e3)/1e3}px`),r.textContent=`${Fz}
|
|
220
220
|
${o}`,n.appendChild(r),this.container=document.createElement("div"),this.container.className="widget-root",n.appendChild(this.container),this.render()}attributeChangedCallback(){this.root&&this.render()}render(){if(!this.container)return;const n=this.getAttribute("prompt-id")||void 0,r=this.getAttribute("api-key")||void 0,o=this.getAttribute("base-url")||void 0,a=this.getAttribute("theme")||"dark",i=this.getAttribute("high-contrast")==="true";a==="light"?this.classList.add("light"):this.classList.remove("light"),i?this.classList.add("high-contrast"):this.classList.remove("high-contrast"),this.root||(this.root=pa(this.container)),this.root.render(m.jsx(O.StrictMode,{children:m.jsx(Sz,{promptId:n,apiKey:r,baseUrl:o,theme:a,highContrast:i})}))}}customElements.get("chat-component")||customElements.define("chat-component",Lz)})(React,ReactDOM);
|