nostr-web-components
Version:
collection of web components that provide quick access to basic nostr things
3 lines (2 loc) • 819 B
JavaScript
var s=Object.defineProperty;var i=(e,t,o)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var r=(e,t,o)=>i(e,typeof t!="symbol"?t+"":t,o);import{r as c}from"./text.js";import"@nostr/tools/nip27";import"@nostr/tools/nip19";import"./utils.js";import"./nostr.js";import"@nostr/tools/pool";import"@nostr/gadgets/lists";import"@nostr/gadgets/global";import"@nostr/gadgets/metadata";import"@nostr/tools/nip05";class n extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.set()}attributeChangedCallback(){this.set()}async set(){const{shadowRoot:t}=this;if(!t)return;const o=this.getAttribute("content")||"";t.innerHTML="",c(t,o)}}r(n,"observedAttributes",["content"]);window.customElements.define("nostr-text",n);
//# sourceMappingURL=nostr-text.js.map