@gamention/pulse-elements 0.1.3 → 0.1.4
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/pulse-elements.cjs +3 -3
- package/dist/pulse-elements.js +46 -90
- package/package.json +3 -3
package/dist/pulse-elements.cjs
CHANGED
|
@@ -1299,7 +1299,7 @@
|
|
|
1299
1299
|
</div>
|
|
1300
1300
|
</div>
|
|
1301
1301
|
<div class="pin-attachments-preview" style="margin-top:6px;"></div>
|
|
1302
|
-
`;const a=this.form.querySelector("textarea"),c=this.form.querySelector(".pulse-close-btn"),h=this.form.querySelector(".pin-cancel"),p=this.form.querySelector(".pin-submit");c.addEventListener("click",()=>this.exitPinMode()),h.addEventListener("click",()=>this.exitPinMode()),this.pendingAttachmentIds=[],this.upload||(this.upload=new ge(this.client));const m=this.form.querySelector(".pin-attachments-preview");this.form.querySelector(".attach-img").addEventListener("click",async()=>{const f=await this.upload.pickFile("image/*");if(f){this.pendingAttachmentIds.push(f.id);const b=document.createElement("img");b.src=f.thumbnailUrl||f.url,Object.assign(b.style,{width:"48px",height:"48px",borderRadius:"6px",objectFit:"cover",border:"1px solid #e2e8f0"}),m.appendChild(b)}}),this.form.querySelector(".attach-mic").addEventListener("click",async()=>{this.audioRecorder||(this.audioRecorder=new _e);const f=await this.audioRecorder.startRecording(m);if(f){const b=await this.upload.uploadBlob(f,"audio.webm");if(b){this.pendingAttachmentIds.push(b.id);const y=document.createElement("span");Object.assign(y.style,{display:"inline-block",padding:"4px 10px",borderRadius:"6px",background:"#f1f5f9",fontSize:"11px",color:"#64748b"}),y.textContent="🎤 Audio attached",m.appendChild(y)}}}),this.form.querySelector(".attach-video").addEventListener("click",async()=>{this.videoRecorder||(this.videoRecorder=new Ni);const f=await this.videoRecorder.startRecording(m);if(f){const b=await this.upload.uploadBlob(f.blob,"video.webm");if(b){this.pendingAttachmentIds.push(b.id);const y=document.createElement("span");Object.assign(y.style,{display:"inline-block",padding:"4px 10px",borderRadius:"6px",background:"#f1f5f9",fontSize:"11px",color:"#64748b"}),y.textContent="🎥 Video attached",m.appendChild(y)}}}),p.addEventListener("click",()=>{const f=a.value.trim();if(!f&&this.pendingAttachmentIds.length===0)return;const b=[...(f||"").matchAll(/@(\w+)/g)].map(y=>y[1]);this.client.
|
|
1302
|
+
`;const a=this.form.querySelector("textarea"),c=this.form.querySelector(".pulse-close-btn"),h=this.form.querySelector(".pin-cancel"),p=this.form.querySelector(".pin-submit");c.addEventListener("click",()=>this.exitPinMode()),h.addEventListener("click",()=>this.exitPinMode()),this.pendingAttachmentIds=[],this.upload||(this.upload=new ge(this.client));const m=this.form.querySelector(".pin-attachments-preview");this.form.querySelector(".attach-img").addEventListener("click",async()=>{const f=await this.upload.pickFile("image/*");if(f){this.pendingAttachmentIds.push(f.id);const b=document.createElement("img");b.src=f.thumbnailUrl||f.url,Object.assign(b.style,{width:"48px",height:"48px",borderRadius:"6px",objectFit:"cover",border:"1px solid #e2e8f0"}),m.appendChild(b)}}),this.form.querySelector(".attach-mic").addEventListener("click",async()=>{this.audioRecorder||(this.audioRecorder=new _e);const f=await this.audioRecorder.startRecording(m);if(f){const b=await this.upload.uploadBlob(f,"audio.webm");if(b){this.pendingAttachmentIds.push(b.id);const y=document.createElement("span");Object.assign(y.style,{display:"inline-block",padding:"4px 10px",borderRadius:"6px",background:"#f1f5f9",fontSize:"11px",color:"#64748b"}),y.textContent="🎤 Audio attached",m.appendChild(y)}}}),this.form.querySelector(".attach-video").addEventListener("click",async()=>{this.videoRecorder||(this.videoRecorder=new Ni);const f=await this.videoRecorder.startRecording(m);if(f){const b=await this.upload.uploadBlob(f.blob,"video.webm");if(b){this.pendingAttachmentIds.push(b.id);const y=document.createElement("span");Object.assign(y.style,{display:"inline-block",padding:"4px 10px",borderRadius:"6px",background:"#f1f5f9",fontSize:"11px",color:"#64748b"}),y.textContent="🎥 Video attached",m.appendChild(y)}}}),p.addEventListener("click",()=>{const f=a.value.trim();if(!f&&this.pendingAttachmentIds.length===0)return;const b=[...(f||"").matchAll(/@(\w+)/g)].map(y=>y[1]);this.client.createThread(f||"(attachment)",{position:i,mentions:b}),this.pendingAttachmentIds=[],this.exitPinMode()}),a.addEventListener("keydown",f=>{f.key==="Escape"&&this.exitPinMode(),f.stopPropagation()}),document.body.appendChild(this.form),requestAnimationFrame(()=>a.focus())}showThreadPopover(e,t){this.closePopover(),this.popover=document.createElement("div"),this.popover.dataset.threadId=e.id;const i=window.innerWidth<=480,s=i?window.innerWidth:300,r=t.getBoundingClientRect();let o,l;i?(o=0,l=window.innerHeight*.4):(o=r.right+10,l=r.top-8,o+s>window.innerWidth-16&&(o=r.left-s-10),l<16&&(l=16)),Object.assign(this.popover.style,{position:"fixed",left:`${o}px`,top:`${l}px`,width:i?"100vw":`${s}px`,maxHeight:i?"60vh":"360px",zIndex:"10001",background:"#fff",borderRadius:i?"16px 16px 0 0":"12px",boxShadow:"0 8px 40px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08)",border:"1px solid #e2e8f0",fontFamily:ce,display:"flex",flexDirection:"column",overflow:"hidden",pointerEvents:"auto",...i?{bottom:"0",top:"auto"}:{}});const a=document.createElement("div");Object.assign(a.style,{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 14px",borderBottom:"1px solid #f1f5f9",flexShrink:"0"}),a.innerHTML=`
|
|
1303
1303
|
<span style="font-size:13px;font-weight:700;color:#0f172a;">Thread</span>
|
|
1304
1304
|
${ot}
|
|
1305
1305
|
`,a.querySelector(".pulse-close-btn").addEventListener("click",()=>{this.closePopover()}),this.popover.appendChild(a),this.refreshPopoverComments(e),this.addPopoverReplyForm(e),document.body.appendChild(this.popover);const c=this.popover.getBoundingClientRect();c.bottom>window.innerHeight-16&&(this.popover.style.top=`${Math.max(16,window.innerHeight-c.height-16)}px`),requestAnimationFrame(()=>{document.addEventListener("pointerdown",this.handlePopoverOutsideClick),document.addEventListener("keydown",this.handlePopoverEscape)})}refreshPopoverComments(e){var l;if(!this.popover)return;this.removePickerEl(),this.editingPopoverCommentId&&!e.comments.find(a=>a.id===this.editingPopoverCommentId)&&(this.editingPopoverCommentId=null);let t=this.popover.querySelector(".popover-comments");if(!t){t=document.createElement("div"),t.className="popover-comments",Object.assign(t.style,{flex:"1",overflowY:"auto",padding:"12px 14px",minHeight:"0"});const a=this.popover.firstElementChild;a&&a.nextSibling?this.popover.insertBefore(t,a.nextSibling):this.popover.appendChild(t)}const i=(l=this.client.state.user)==null?void 0:l.id;t.innerHTML=e.comments.map(a=>{const c=this.client.state.getUser(a.userId),h=c?c.name.split(" ").map(x=>x[0]).join("").toUpperCase().slice(0,2):"?",p=(c==null?void 0:c.color)??"#94a3b8",m=this.escapeHtml((c==null?void 0:c.name)??"Unknown"),f=this.formatTime(a.createdAt),b=i===a.userId,y=a.editedAt?'<span style="font-size:10px;color:#94a3b8;font-style:italic;">(edited)</span>':"";if(this.editingPopoverCommentId===a.id)return`
|
|
@@ -1352,9 +1352,9 @@
|
|
|
1352
1352
|
</div>
|
|
1353
1353
|
<button class="reply-send" style="padding:7px 14px;background:#6366f1;color:#fff;border:none;border-radius:8px;font-size:12px;font-weight:600;cursor:pointer;font-family:inherit;white-space:nowrap;flex-shrink:0;">Send</button>
|
|
1354
1354
|
</div>
|
|
1355
|
-
`;const i=t.querySelector("input"),s=t.querySelector(".reply-send");this.upload||(this.upload=new ge(this.client)),t.querySelector(".reply-attach-img").addEventListener("click",async()=>{
|
|
1355
|
+
`;const i=t.querySelector("input"),s=t.querySelector(".reply-send");this.upload||(this.upload=new ge(this.client)),t.querySelector(".reply-attach-img").addEventListener("click",async()=>{await this.upload.pickFile("image/*")&&this.client.reply(e.id,"(image)")}),t.querySelector(".reply-attach-mic").addEventListener("click",async()=>{this.audioRecorder||(this.audioRecorder=new _e);const o=await this.audioRecorder.startRecording(t);o&&await this.upload.uploadBlob(o,"audio.webm")&&this.client.reply(e.id,"(audio note)")});const r=()=>{const o=i.value.trim();if(!o)return;const l=[...o.matchAll(/@(\w+)/g)].map(a=>a[1]);this.client.reply(e.id,o,l),i.value=""};s.addEventListener("click",r),i.addEventListener("input",()=>{const o=Date.now(),l=this.lastTypingSendPins.get(e.id)??0;o-l>=2e3&&(this.client.sendTyping(e.id),this.lastTypingSendPins.set(e.id,o))}),i.addEventListener("keydown",o=>{o.key==="Enter"&&(o.preventDefault(),r()),o.key==="Escape"&&this.closePopover(),o.stopPropagation()}),this.popover.appendChild(t)}removePickerEl(){var e;(e=this.pickerEl)==null||e.remove(),this.pickerEl=null}showPickerForButton(e,t){this.removePickerEl();const i=e.getBoundingClientRect();this.pickerEl=document.createElement("div"),Object.assign(this.pickerEl.style,{position:"fixed",left:`${i.left}px`,top:`${i.top-4}px`,transform:"translateY(-100%)",display:"flex",gap:"2px",padding:"4px 6px",background:"#fff",border:"1px solid #e2e8f0",borderRadius:"8px",boxShadow:"0 4px 24px rgba(0,0,0,0.12)",zIndex:"10002",fontFamily:ce});for(const s of Hi){const r=document.createElement("button");Object.assign(r.style,{border:"none",background:"none",cursor:"pointer",fontSize:"16px",padding:"4px",borderRadius:"4px",lineHeight:"1"}),r.textContent=s,r.addEventListener("click",o=>{o.stopPropagation();const a=this.client.state.getReactions(t).find(c=>{var h;return c.emoji===s&&c.userId===((h=this.client.state.user)==null?void 0:h.id)});a?this.client.removeReaction(a.id):this.client.addReaction(t,"comment",s),this.popoverPickerOpen=null,this.removePickerEl()}),this.pickerEl.appendChild(r)}document.body.appendChild(this.pickerEl)}buildReactionPillsHtml(e){var a;const t=this.client.state.getReactions(e),i=(a=this.client.state.user)==null?void 0:a.id,s=new Map;for(const c of t){const h=s.get(c.emoji)??{count:0,ownId:null};h.count++,c.userId===i&&(h.ownId=c.id),s.set(c.emoji,h)}const r="display:inline-flex;align-items:center;gap:3px;padding:2px 8px;border-radius:12px;border:1px solid #e2e8f0;background:#fff;font-size:12px;cursor:pointer;transition:all 0.15s;line-height:1.4;",o=r+"background:#eef2ff;border-color:#6366f1;";let l='<div style="margin-left:29px;display:flex;gap:4px;flex-wrap:wrap;margin-top:4px;">';for(const[c,{count:h,ownId:p}]of s){const m=p?o:r;l+=`<button data-reaction-emoji="${c}" data-reaction-target="${e}" ${p?`data-reaction-id="${p}"`:""} style="${m}">
|
|
1356
1356
|
<span>${c}</span><span style="font-size:11px;font-weight:600;color:#64748b;">${h}</span>
|
|
1357
|
-
</button>`}return l+=`<button class="popover-reaction-add" data-comment-id="${e}" style="display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;border:1px dashed #e2e8f0;background:none;cursor:pointer;color:#94a3b8;font-size:14px;">+</button>`,l+="</div>",l}updatePopoverTyping(e){if(!this.popover)return;let t=this.popover.querySelector(".popover-typing");if(!t){t=document.createElement("div"),t.className="popover-typing",Object.assign(t.style,{padding:"0 14px 4px",fontSize:"11px",color:"#94a3b8",fontStyle:"italic",minHeight:"16px"});const s=this.popover.lastElementChild;s&&this.popover.insertBefore(t,s)}const i=this.client.state.getTypingUsers(e).filter(s=>{var r;return s!==((r=this.client.state.user)==null?void 0:r.id)}).map(s=>{const r=this.client.state.presence.find(o=>o.user.id===s);return(r==null?void 0:r.user.name)??"Someone"});i.length===0?t.textContent="":i.length===1?t.textContent=`${i[0]} is typing...`:t.textContent=`${i.join(", ")} are typing...`}formatTime(e){const t=new Date(e),s=new Date().getTime()-t.getTime(),r=Math.floor(s/6e4);if(r<1)return"now";if(r<60)return`${r}m`;const o=Math.floor(r/60);return o<24?`${o}h`:t.toLocaleDateString()}resolvePosition(e){if(e.selector&&e.elementOffsetX!=null&&e.elementOffsetY!=null)try{const t=document.querySelector(e.selector);if(t){const i=t.getBoundingClientRect();return{x:i.left+e.elementOffsetX*i.width,y:i.top+e.elementOffsetY*i.height}}}catch{}return{x:e.x*window.innerWidth,y:e.y*window.innerHeight}}renderPins(){if(!this.container)return;const e=this.threads.filter(i=>i.position&&!i.resolved),t=new Set(e.map(i=>i.id));for(const[i,s]of this.pinEls)t.has(i)||(s.remove(),this.pinEls.delete(i));e.forEach((i,s)=>{const r=i.position;let o=this.pinEls.get(i.id);o||(o=document.createElement("div"),Object.assign(o.style,{position:"fixed",width:"24px",height:"24px",borderRadius:"50%",background:"#6366f1",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"11px",fontWeight:"700",fontFamily:ce,cursor:"pointer",pointerEvents:"auto",boxShadow:"0 2px 8px rgba(99,102,241,0.4)",border:"2px solid #fff",transition:"left 0.15s ease, top 0.15s ease, transform 0.15s ease",zIndex:"9997",transform:"translate(-50%, -50%)"}),o.addEventListener("mouseenter",()=>{o.style.transform="translate(-50%, -50%) scale(1.15)"}),o.addEventListener("mouseleave",()=>{o.style.transform="translate(-50%, -50%)"}),o.addEventListener("click",()=>{if(this.popover&&this.popover.dataset.threadId===i.id){this.closePopover();return}const a=this.threads.find(c=>c.id===i.id);a&&this.showThreadPopover(a,o)}),this.container.appendChild(o),this.pinEls.set(i.id,o)),o.textContent=`${s+1}`;const l=this.resolvePosition(r);o.style.left=`${l.x}px`,o.style.top=`${l.y}px`})}}var qi=Object.defineProperty,Vi=Object.getOwnPropertyDescriptor,L=(n,e,t,i)=>{for(var s=i>1?void 0:i?Vi(e,t):e,r=n.length-1,o;r>=0;r--)(o=n[r])&&(s=(i?o(e,t,s):o(s))||s);return i&&s&&qi(e,t,s),s};const Xi=["👍","👎","❤️","🎉","👀","🚀"];let I=class extends _{constructor(){super(...arguments),this.highlightThreadId=null,this.threads=[],this.replyingTo=null,this.editingCommentId=null,this.editBody="",this.pickerOpenForComment=null,this.typingByThread=new Map,this.reactionsVersion=0,this.typingTimers=new Map,this.lastTypingSend=new Map}connectedCallback(){super.connectedCallback(),this.setupListener()}disconnectedCallback(){var n,e,t;super.disconnectedCallback(),(n=this.unsub)==null||n.call(this),(e=this.reactionUnsub)==null||e.call(this),(t=this.typingUnsub)==null||t.call(this);for(const i of this.typingTimers.values())clearTimeout(i);this.typingTimers.clear()}updated(n){var e,t,i,s,r;n.has("client")&&this.client&&((e=this.unsub)==null||e.call(this),(t=this.reactionUnsub)==null||t.call(this),(i=this.typingUnsub)==null||i.call(this),this.setupListener()),(s=this.shadowRoot)==null||s.querySelectorAll(".audio-player-host").forEach(o=>{if(o.children.length>0)return;const l=o.dataset.url;if(l){const a=o.dataset.duration?parseInt(o.dataset.duration):void 0;o.appendChild(Pe.render(l,a))}}),(r=this.shadowRoot)==null||r.querySelectorAll(".video-player-host").forEach(o=>{if(o.children.length>0)return;const l=o.dataset.url;l&&o.appendChild(xt.render(l,o.dataset.poster||void 0))})}setupListener(){this.client&&(this.threads=this.client.state.threads,this.unsub=this.client.state.on("threads",n=>{this.threads=[...n]}),this.reactionUnsub=this.client.state.on("reactions",()=>{this.reactionsVersion++}),this.typingUnsub=this.client.state.on("typing",({threadId:n})=>{this.refreshTyping(n)}))}refreshTyping(n){const t=this.client.state.getTypingUsers(n).filter(s=>{var r;return s!==((r=this.client.state.user)==null?void 0:r.id)}).map(s=>{const r=this.client.state.presence.find(o=>o.user.id===s);return(r==null?void 0:r.user.name)??"Someone"}),i=new Map(this.typingByThread);i.set(n,t),this.typingByThread=i,this.typingTimers.has(n)&&clearTimeout(this.typingTimers.get(n)),this.typingTimers.set(n,setTimeout(()=>{this.refreshTyping(n)},3500))}handleTypingInput(n){const e=Date.now(),t=this.lastTypingSend.get(n)??0;e-t>=2e3&&(this.client.sendTyping(n),this.lastTypingSend.set(n,e))}toggleReaction(n,e){var r;const t=this.client.state.getReactions(n),i=(r=this.client.state.user)==null?void 0:r.id,s=t.find(o=>o.emoji===e&&o.userId===i);s?this.client.removeReaction(s.id):this.client.addReaction(n,"comment",e),this.pickerOpenForComment=null}fireClose(){this.dispatchEvent(new CustomEvent("panel-close",{bubbles:!0,composed:!0}))}scrollToThread(n){this.updateComplete.then(()=>{var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector(`[data-thread-id="${n}"]`);e==null||e.scrollIntoView({behavior:"smooth",block:"center"})})}parseMentions(n){return n.split(/(@\w+)/g).map(t=>t.startsWith("@")?d`<span class="mention">${t}</span>`:t)}getInitials(n){return n.split(" ").map(e=>e[0]).join("").toUpperCase().slice(0,2)}getUserForComment(n){return this.client.state.getUser(n)}formatTime(n){const e=new Date(n),i=new Date().getTime()-e.getTime(),s=Math.floor(i/6e4);if(s<1)return"now";if(s<60)return`${s}m`;const r=Math.floor(s/60);return r<24?`${r}h`:e.toLocaleDateString()}async handleAttachImage(n){this.upload||(this.upload=new ge(this.client))
|
|
1357
|
+
</button>`}return l+=`<button class="popover-reaction-add" data-comment-id="${e}" style="display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;border:1px dashed #e2e8f0;background:none;cursor:pointer;color:#94a3b8;font-size:14px;">+</button>`,l+="</div>",l}updatePopoverTyping(e){if(!this.popover)return;let t=this.popover.querySelector(".popover-typing");if(!t){t=document.createElement("div"),t.className="popover-typing",Object.assign(t.style,{padding:"0 14px 4px",fontSize:"11px",color:"#94a3b8",fontStyle:"italic",minHeight:"16px"});const s=this.popover.lastElementChild;s&&this.popover.insertBefore(t,s)}const i=this.client.state.getTypingUsers(e).filter(s=>{var r;return s!==((r=this.client.state.user)==null?void 0:r.id)}).map(s=>{const r=this.client.state.presence.find(o=>o.user.id===s);return(r==null?void 0:r.user.name)??"Someone"});i.length===0?t.textContent="":i.length===1?t.textContent=`${i[0]} is typing...`:t.textContent=`${i.join(", ")} are typing...`}formatTime(e){const t=new Date(e),s=new Date().getTime()-t.getTime(),r=Math.floor(s/6e4);if(r<1)return"now";if(r<60)return`${r}m`;const o=Math.floor(r/60);return o<24?`${o}h`:t.toLocaleDateString()}resolvePosition(e){if(e.selector&&e.elementOffsetX!=null&&e.elementOffsetY!=null)try{const t=document.querySelector(e.selector);if(t){const i=t.getBoundingClientRect();return{x:i.left+e.elementOffsetX*i.width,y:i.top+e.elementOffsetY*i.height}}}catch{}return{x:e.x*window.innerWidth,y:e.y*window.innerHeight}}renderPins(){if(!this.container)return;const e=this.threads.filter(i=>i.position&&!i.resolved),t=new Set(e.map(i=>i.id));for(const[i,s]of this.pinEls)t.has(i)||(s.remove(),this.pinEls.delete(i));e.forEach((i,s)=>{const r=i.position;let o=this.pinEls.get(i.id);o||(o=document.createElement("div"),Object.assign(o.style,{position:"fixed",width:"24px",height:"24px",borderRadius:"50%",background:"#6366f1",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"11px",fontWeight:"700",fontFamily:ce,cursor:"pointer",pointerEvents:"auto",boxShadow:"0 2px 8px rgba(99,102,241,0.4)",border:"2px solid #fff",transition:"left 0.15s ease, top 0.15s ease, transform 0.15s ease",zIndex:"9997",transform:"translate(-50%, -50%)"}),o.addEventListener("mouseenter",()=>{o.style.transform="translate(-50%, -50%) scale(1.15)"}),o.addEventListener("mouseleave",()=>{o.style.transform="translate(-50%, -50%)"}),o.addEventListener("click",()=>{if(this.popover&&this.popover.dataset.threadId===i.id){this.closePopover();return}const a=this.threads.find(c=>c.id===i.id);a&&this.showThreadPopover(a,o)}),this.container.appendChild(o),this.pinEls.set(i.id,o)),o.textContent=`${s+1}`;const l=this.resolvePosition(r);o.style.left=`${l.x}px`,o.style.top=`${l.y}px`})}}var qi=Object.defineProperty,Vi=Object.getOwnPropertyDescriptor,L=(n,e,t,i)=>{for(var s=i>1?void 0:i?Vi(e,t):e,r=n.length-1,o;r>=0;r--)(o=n[r])&&(s=(i?o(e,t,s):o(s))||s);return i&&s&&qi(e,t,s),s};const Xi=["👍","👎","❤️","🎉","👀","🚀"];let I=class extends _{constructor(){super(...arguments),this.highlightThreadId=null,this.threads=[],this.replyingTo=null,this.editingCommentId=null,this.editBody="",this.pickerOpenForComment=null,this.typingByThread=new Map,this.reactionsVersion=0,this.typingTimers=new Map,this.lastTypingSend=new Map}connectedCallback(){super.connectedCallback(),this.setupListener()}disconnectedCallback(){var n,e,t;super.disconnectedCallback(),(n=this.unsub)==null||n.call(this),(e=this.reactionUnsub)==null||e.call(this),(t=this.typingUnsub)==null||t.call(this);for(const i of this.typingTimers.values())clearTimeout(i);this.typingTimers.clear()}updated(n){var e,t,i,s,r;n.has("client")&&this.client&&((e=this.unsub)==null||e.call(this),(t=this.reactionUnsub)==null||t.call(this),(i=this.typingUnsub)==null||i.call(this),this.setupListener()),(s=this.shadowRoot)==null||s.querySelectorAll(".audio-player-host").forEach(o=>{if(o.children.length>0)return;const l=o.dataset.url;if(l){const a=o.dataset.duration?parseInt(o.dataset.duration):void 0;o.appendChild(Pe.render(l,a))}}),(r=this.shadowRoot)==null||r.querySelectorAll(".video-player-host").forEach(o=>{if(o.children.length>0)return;const l=o.dataset.url;l&&o.appendChild(xt.render(l,o.dataset.poster||void 0))})}setupListener(){this.client&&(this.threads=this.client.state.threads,this.unsub=this.client.state.on("threads",n=>{this.threads=[...n]}),this.reactionUnsub=this.client.state.on("reactions",()=>{this.reactionsVersion++}),this.typingUnsub=this.client.state.on("typing",({threadId:n})=>{this.refreshTyping(n)}))}refreshTyping(n){const t=this.client.state.getTypingUsers(n).filter(s=>{var r;return s!==((r=this.client.state.user)==null?void 0:r.id)}).map(s=>{const r=this.client.state.presence.find(o=>o.user.id===s);return(r==null?void 0:r.user.name)??"Someone"}),i=new Map(this.typingByThread);i.set(n,t),this.typingByThread=i,this.typingTimers.has(n)&&clearTimeout(this.typingTimers.get(n)),this.typingTimers.set(n,setTimeout(()=>{this.refreshTyping(n)},3500))}handleTypingInput(n){const e=Date.now(),t=this.lastTypingSend.get(n)??0;e-t>=2e3&&(this.client.sendTyping(n),this.lastTypingSend.set(n,e))}toggleReaction(n,e){var r;const t=this.client.state.getReactions(n),i=(r=this.client.state.user)==null?void 0:r.id,s=t.find(o=>o.emoji===e&&o.userId===i);s?this.client.removeReaction(s.id):this.client.addReaction(n,"comment",e),this.pickerOpenForComment=null}fireClose(){this.dispatchEvent(new CustomEvent("panel-close",{bubbles:!0,composed:!0}))}scrollToThread(n){this.updateComplete.then(()=>{var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector(`[data-thread-id="${n}"]`);e==null||e.scrollIntoView({behavior:"smooth",block:"center"})})}parseMentions(n){return n.split(/(@\w+)/g).map(t=>t.startsWith("@")?d`<span class="mention">${t}</span>`:t)}getInitials(n){return n.split(" ").map(e=>e[0]).join("").toUpperCase().slice(0,2)}getUserForComment(n){return this.client.state.getUser(n)}formatTime(n){const e=new Date(n),i=new Date().getTime()-e.getTime(),s=Math.floor(i/6e4);if(s<1)return"now";if(s<60)return`${s}m`;const r=Math.floor(s/60);return r<24?`${r}h`:e.toLocaleDateString()}async handleAttachImage(n){this.upload||(this.upload=new ge(this.client)),await this.upload.pickFile("image/*")&&this.client.reply(n,"(image)")}async handleRecordAudio(n){var i;this.upload||(this.upload=new ge(this.client)),this.audioRecorder||(this.audioRecorder=new _e);const e=(i=this.shadowRoot)==null?void 0:i.querySelector(`[data-thread-id="${n}"]`),t=await this.audioRecorder.startRecording(e??document.body);t&&await this.upload.uploadBlob(t,"audio.webm")&&this.client.reply(n,"(audio note)")}handleReply(n,e){e.preventDefault();const i=e.target.querySelector("input"),s=i.value.trim();if(!s)return;const r=[...s.matchAll(/@(\w+)/g)].map(o=>o[1]);this.client.reply(n,s,r),i.value="",this.replyingTo=null}isOwnComment(n){var e,t;return((t=(e=this.client)==null?void 0:e.state.user)==null?void 0:t.id)===n.userId}startEdit(n){this.editingCommentId=n.id,this.editBody=n.body}cancelEdit(){this.editingCommentId=null,this.editBody=""}saveEdit(n){const e=this.editBody.trim();if(!e)return;const t=[...e.matchAll(/@(\w+)/g)].map(i=>i[1]);this.client.editComment(n,e,t),this.editingCommentId=null,this.editBody=""}deleteComment(n){this.client.deleteComment(n)}renderEditForm(n){return d`
|
|
1358
1358
|
<div class="edit-form">
|
|
1359
1359
|
<textarea
|
|
1360
1360
|
.value=${this.editBody}
|
package/dist/pulse-elements.js
CHANGED
|
@@ -106,7 +106,7 @@ let At = class extends Event {
|
|
|
106
106
|
* Copyright 2017 Google LLC
|
|
107
107
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
108
108
|
*/
|
|
109
|
-
function
|
|
109
|
+
function Mt({ context: s }) {
|
|
110
110
|
return (e, t) => {
|
|
111
111
|
const i = /* @__PURE__ */ new WeakMap();
|
|
112
112
|
if (typeof t == "object") return { get() {
|
|
@@ -157,7 +157,7 @@ function he({ context: s, subscribe: e }) {
|
|
|
157
157
|
}));
|
|
158
158
|
};
|
|
159
159
|
}
|
|
160
|
-
var
|
|
160
|
+
var It = Object.defineProperty, Ot = (s, e, t) => e in s ? It(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, y = (s, e, t) => Ot(s, typeof e != "symbol" ? e + "" : e, t);
|
|
161
161
|
const Rt = "ws://localhost:4567";
|
|
162
162
|
let Le = class {
|
|
163
163
|
constructor() {
|
|
@@ -561,7 +561,7 @@ let xt = class {
|
|
|
561
561
|
return this.cssText;
|
|
562
562
|
}
|
|
563
563
|
};
|
|
564
|
-
const zt = (s) => new xt(typeof s == "string" ? s : s + "", void 0, ze),
|
|
564
|
+
const zt = (s) => new xt(typeof s == "string" ? s : s + "", void 0, ze), M = (s, ...e) => {
|
|
565
565
|
const t = s.length === 1 ? s[0] : e.reduce((i, n, r) => i + ((o) => {
|
|
566
566
|
if (o._$cssResult$ === !0) return o.cssText;
|
|
567
567
|
if (typeof o == "number") return o;
|
|
@@ -1181,7 +1181,7 @@ Z([
|
|
|
1181
1181
|
g()
|
|
1182
1182
|
], W.prototype, "endpoint", 2);
|
|
1183
1183
|
Z([
|
|
1184
|
-
|
|
1184
|
+
Mt({ context: J })
|
|
1185
1185
|
], W.prototype, "client", 2);
|
|
1186
1186
|
W = Z([
|
|
1187
1187
|
R("pulse-provider")
|
|
@@ -1235,7 +1235,7 @@ let G = class extends S {
|
|
|
1235
1235
|
`;
|
|
1236
1236
|
}
|
|
1237
1237
|
};
|
|
1238
|
-
G.styles =
|
|
1238
|
+
G.styles = M`
|
|
1239
1239
|
:host {
|
|
1240
1240
|
display: inline-flex;
|
|
1241
1241
|
align-items: center;
|
|
@@ -1434,7 +1434,7 @@ let ae = class extends S {
|
|
|
1434
1434
|
`;
|
|
1435
1435
|
}
|
|
1436
1436
|
};
|
|
1437
|
-
ae.styles =
|
|
1437
|
+
ae.styles = M`
|
|
1438
1438
|
:host {
|
|
1439
1439
|
position: fixed;
|
|
1440
1440
|
top: 0;
|
|
@@ -1604,7 +1604,7 @@ let V = class extends S {
|
|
|
1604
1604
|
return r < 24 ? `${r}h ago` : e.toLocaleDateString();
|
|
1605
1605
|
}
|
|
1606
1606
|
};
|
|
1607
|
-
V.styles =
|
|
1607
|
+
V.styles = M`
|
|
1608
1608
|
:host {
|
|
1609
1609
|
display: block;
|
|
1610
1610
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
@@ -1933,7 +1933,7 @@ let le = class extends S {
|
|
|
1933
1933
|
`;
|
|
1934
1934
|
}
|
|
1935
1935
|
};
|
|
1936
|
-
le.styles =
|
|
1936
|
+
le.styles = M`
|
|
1937
1937
|
:host {
|
|
1938
1938
|
display: block;
|
|
1939
1939
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
@@ -2164,7 +2164,7 @@ let D = class extends S {
|
|
|
2164
2164
|
`;
|
|
2165
2165
|
}
|
|
2166
2166
|
};
|
|
2167
|
-
D.styles =
|
|
2167
|
+
D.styles = M`
|
|
2168
2168
|
:host {
|
|
2169
2169
|
display: inline-flex;
|
|
2170
2170
|
align-items: center;
|
|
@@ -2322,7 +2322,7 @@ class wi {
|
|
|
2322
2322
|
* Copyright 2017 Google LLC
|
|
2323
2323
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2324
2324
|
*/
|
|
2325
|
-
class
|
|
2325
|
+
class Me extends wi {
|
|
2326
2326
|
constructor(e) {
|
|
2327
2327
|
if (super(e), this.it = u, e.type !== xi.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
2328
2328
|
}
|
|
@@ -2336,16 +2336,16 @@ class Ie extends wi {
|
|
|
2336
2336
|
return t.raw = t, this._t = { _$litType$: this.constructor.resultType, strings: t, values: [] };
|
|
2337
2337
|
}
|
|
2338
2338
|
}
|
|
2339
|
-
|
|
2339
|
+
Me.directiveName = "unsafeHTML", Me.resultType = 1;
|
|
2340
2340
|
/**
|
|
2341
2341
|
* @license
|
|
2342
2342
|
* Copyright 2017 Google LLC
|
|
2343
2343
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2344
2344
|
*/
|
|
2345
|
-
class
|
|
2345
|
+
class Ie extends Me {
|
|
2346
2346
|
}
|
|
2347
|
-
|
|
2348
|
-
const $i = yi(
|
|
2347
|
+
Ie.directiveName = "unsafeSVG", Ie.resultType = 2;
|
|
2348
|
+
const $i = yi(Ie);
|
|
2349
2349
|
/**
|
|
2350
2350
|
* @license lucide v0.577.0 - ISC
|
|
2351
2351
|
*
|
|
@@ -2483,7 +2483,7 @@ const Ai = [
|
|
|
2483
2483
|
* This source code is licensed under the ISC license.
|
|
2484
2484
|
* See the LICENSE file in the root directory of this source tree.
|
|
2485
2485
|
*/
|
|
2486
|
-
const
|
|
2486
|
+
const Mi = [
|
|
2487
2487
|
["path", { d: "M10 11v6" }],
|
|
2488
2488
|
["path", { d: "M14 11v6" }],
|
|
2489
2489
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }],
|
|
@@ -2506,7 +2506,7 @@ const fe = [
|
|
|
2506
2506
|
* This source code is licensed under the ISC license.
|
|
2507
2507
|
* See the LICENSE file in the root directory of this source tree.
|
|
2508
2508
|
*/
|
|
2509
|
-
const
|
|
2509
|
+
const Ii = [
|
|
2510
2510
|
[
|
|
2511
2511
|
"path",
|
|
2512
2512
|
{
|
|
@@ -2533,7 +2533,7 @@ function C(s, e = 18) {
|
|
|
2533
2533
|
stroke-linejoin="round"
|
|
2534
2534
|
>${$i(Oi(s))}</svg>`;
|
|
2535
2535
|
}
|
|
2536
|
-
const ee =
|
|
2536
|
+
const ee = M`
|
|
2537
2537
|
* {
|
|
2538
2538
|
box-sizing: border-box;
|
|
2539
2539
|
margin: 0;
|
|
@@ -2576,7 +2576,7 @@ const ee = I`
|
|
|
2576
2576
|
--pw-shadow: var(--pulse-shadow);
|
|
2577
2577
|
--pw-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
2578
2578
|
}
|
|
2579
|
-
`, me =
|
|
2579
|
+
`, me = M`
|
|
2580
2580
|
.pw-btn {
|
|
2581
2581
|
display: inline-flex;
|
|
2582
2582
|
align-items: center;
|
|
@@ -2620,7 +2620,7 @@ const ee = I`
|
|
|
2620
2620
|
width: 18px;
|
|
2621
2621
|
height: 18px;
|
|
2622
2622
|
}
|
|
2623
|
-
`, _e =
|
|
2623
|
+
`, _e = M`
|
|
2624
2624
|
.pw-scrollable::-webkit-scrollbar {
|
|
2625
2625
|
width: 4px;
|
|
2626
2626
|
}
|
|
@@ -2723,7 +2723,7 @@ X.styles = [
|
|
|
2723
2723
|
ee,
|
|
2724
2724
|
me,
|
|
2725
2725
|
_e,
|
|
2726
|
-
|
|
2726
|
+
M`
|
|
2727
2727
|
:host {
|
|
2728
2728
|
display: block;
|
|
2729
2729
|
}
|
|
@@ -3828,14 +3828,7 @@ class Ji {
|
|
|
3828
3828
|
const f = a.value.trim();
|
|
3829
3829
|
if (!f && this.pendingAttachmentIds.length === 0) return;
|
|
3830
3830
|
const b = [...(f || "").matchAll(/@(\w+)/g)].map((x) => x[1]);
|
|
3831
|
-
this.client.
|
|
3832
|
-
type: "thread:create",
|
|
3833
|
-
id: crypto.randomUUID(),
|
|
3834
|
-
body: f || "(attachment)",
|
|
3835
|
-
mentions: b,
|
|
3836
|
-
position: i,
|
|
3837
|
-
attachmentIds: this.pendingAttachmentIds.length > 0 ? [...this.pendingAttachmentIds] : void 0
|
|
3838
|
-
}), this.pendingAttachmentIds = [], this.exitPinMode();
|
|
3831
|
+
this.client.createThread(f || "(attachment)", { position: i, mentions: b }), this.pendingAttachmentIds = [], this.exitPinMode();
|
|
3839
3832
|
}), a.addEventListener("keydown", (f) => {
|
|
3840
3833
|
f.key === "Escape" && this.exitPinMode(), f.stopPropagation();
|
|
3841
3834
|
}), document.body.appendChild(this.form), requestAnimationFrame(() => a.focus());
|
|
@@ -4030,29 +4023,11 @@ class Ji {
|
|
|
4030
4023
|
`;
|
|
4031
4024
|
const i = t.querySelector("input"), n = t.querySelector(".reply-send");
|
|
4032
4025
|
this.upload || (this.upload = new ke(this.client)), t.querySelector(".reply-attach-img").addEventListener("click", async () => {
|
|
4033
|
-
|
|
4034
|
-
o && this.client.send({
|
|
4035
|
-
type: "comment:create",
|
|
4036
|
-
threadId: e.id,
|
|
4037
|
-
id: crypto.randomUUID(),
|
|
4038
|
-
body: "(image)",
|
|
4039
|
-
mentions: [],
|
|
4040
|
-
attachmentIds: [o.id]
|
|
4041
|
-
});
|
|
4026
|
+
await this.upload.pickFile("image/*") && this.client.reply(e.id, "(image)");
|
|
4042
4027
|
}), t.querySelector(".reply-attach-mic").addEventListener("click", async () => {
|
|
4043
4028
|
this.audioRecorder || (this.audioRecorder = new Re());
|
|
4044
4029
|
const o = await this.audioRecorder.startRecording(t);
|
|
4045
|
-
|
|
4046
|
-
const l = await this.upload.uploadBlob(o, "audio.webm");
|
|
4047
|
-
l && this.client.send({
|
|
4048
|
-
type: "comment:create",
|
|
4049
|
-
threadId: e.id,
|
|
4050
|
-
id: crypto.randomUUID(),
|
|
4051
|
-
body: "(audio note)",
|
|
4052
|
-
mentions: [],
|
|
4053
|
-
attachmentIds: [l.id]
|
|
4054
|
-
});
|
|
4055
|
-
}
|
|
4030
|
+
o && await this.upload.uploadBlob(o, "audio.webm") && this.client.reply(e.id, "(audio note)");
|
|
4056
4031
|
});
|
|
4057
4032
|
const r = () => {
|
|
4058
4033
|
const o = i.value.trim();
|
|
@@ -4329,32 +4304,13 @@ let O = class extends S {
|
|
|
4329
4304
|
return r < 24 ? `${r}h` : e.toLocaleDateString();
|
|
4330
4305
|
}
|
|
4331
4306
|
async handleAttachImage(s) {
|
|
4332
|
-
this.upload || (this.upload = new ke(this.client));
|
|
4333
|
-
const e = await this.upload.pickFile("image/*");
|
|
4334
|
-
e && this.client.send({
|
|
4335
|
-
type: "comment:create",
|
|
4336
|
-
threadId: s,
|
|
4337
|
-
id: crypto.randomUUID(),
|
|
4338
|
-
body: "(image)",
|
|
4339
|
-
mentions: [],
|
|
4340
|
-
attachmentIds: [e.id]
|
|
4341
|
-
});
|
|
4307
|
+
this.upload || (this.upload = new ke(this.client)), await this.upload.pickFile("image/*") && this.client.reply(s, "(image)");
|
|
4342
4308
|
}
|
|
4343
4309
|
async handleRecordAudio(s) {
|
|
4344
4310
|
var i;
|
|
4345
4311
|
this.upload || (this.upload = new ke(this.client)), this.audioRecorder || (this.audioRecorder = new Re());
|
|
4346
4312
|
const e = (i = this.shadowRoot) == null ? void 0 : i.querySelector(`[data-thread-id="${s}"]`), t = await this.audioRecorder.startRecording(e ?? document.body);
|
|
4347
|
-
|
|
4348
|
-
const n = await this.upload.uploadBlob(t, "audio.webm");
|
|
4349
|
-
n && this.client.send({
|
|
4350
|
-
type: "comment:create",
|
|
4351
|
-
threadId: s,
|
|
4352
|
-
id: crypto.randomUUID(),
|
|
4353
|
-
body: "(audio note)",
|
|
4354
|
-
mentions: [],
|
|
4355
|
-
attachmentIds: [n.id]
|
|
4356
|
-
});
|
|
4357
|
-
}
|
|
4313
|
+
t && await this.upload.uploadBlob(t, "audio.webm") && this.client.reply(s, "(audio note)");
|
|
4358
4314
|
}
|
|
4359
4315
|
handleReply(s, e) {
|
|
4360
4316
|
e.preventDefault();
|
|
@@ -4551,7 +4507,7 @@ let O = class extends S {
|
|
|
4551
4507
|
`}
|
|
4552
4508
|
${r && !o ? d`<div class="comment-actions">
|
|
4553
4509
|
<button @click=${() => this.startEdit(t)} title="Edit">${C(Pi, 14)}</button>
|
|
4554
|
-
<button class="danger" @click=${() => this.deleteComment(t.id)} title="Delete">${C(
|
|
4510
|
+
<button class="danger" @click=${() => this.deleteComment(t.id)} title="Delete">${C(Mi, 14)}</button>
|
|
4555
4511
|
</div>` : u}
|
|
4556
4512
|
${this.renderReactions(t)}
|
|
4557
4513
|
</div>
|
|
@@ -4608,7 +4564,7 @@ O.styles = [
|
|
|
4608
4564
|
ee,
|
|
4609
4565
|
me,
|
|
4610
4566
|
_e,
|
|
4611
|
-
|
|
4567
|
+
M`
|
|
4612
4568
|
:host {
|
|
4613
4569
|
display: block;
|
|
4614
4570
|
}
|
|
@@ -5207,7 +5163,7 @@ ce.styles = [
|
|
|
5207
5163
|
ee,
|
|
5208
5164
|
me,
|
|
5209
5165
|
_e,
|
|
5210
|
-
|
|
5166
|
+
M`
|
|
5211
5167
|
:host {
|
|
5212
5168
|
display: block;
|
|
5213
5169
|
}
|
|
@@ -5894,7 +5850,7 @@ de.styles = [
|
|
|
5894
5850
|
ee,
|
|
5895
5851
|
me,
|
|
5896
5852
|
_e,
|
|
5897
|
-
|
|
5853
|
+
M`
|
|
5898
5854
|
:host {
|
|
5899
5855
|
display: block;
|
|
5900
5856
|
}
|
|
@@ -6102,7 +6058,7 @@ var ms = Object.defineProperty, gs = Object.getOwnPropertyDescriptor, L = (s, e,
|
|
|
6102
6058
|
(o = s[r]) && (n = (i ? o(e, t, n) : o(n)) || n);
|
|
6103
6059
|
return i && n && ms(e, t, n), n;
|
|
6104
6060
|
};
|
|
6105
|
-
let
|
|
6061
|
+
let I = class extends S {
|
|
6106
6062
|
constructor() {
|
|
6107
6063
|
super(...arguments), this.collapsed = !1, this.activePanel = null, this.pinModeActive = !1, this.featuresDisabled = !1, this.drawModeActive = !1, this.followingUserId = null, this.display = "floating", this.users = [], this.unreadCount = 0;
|
|
6108
6064
|
}
|
|
@@ -6155,7 +6111,7 @@ let M = class extends S {
|
|
|
6155
6111
|
if (this.collapsed)
|
|
6156
6112
|
return d`
|
|
6157
6113
|
<div class="toolbar collapsed ${s ? "inline" : ""}" @click=${this.fireToggle}>
|
|
6158
|
-
<span class="fab-icon">${C(
|
|
6114
|
+
<span class="fab-icon">${C(Ii, s ? 18 : 24)}</span>
|
|
6159
6115
|
</div>
|
|
6160
6116
|
`;
|
|
6161
6117
|
const e = this.users.slice(0, 3), t = this.users.length - 3;
|
|
@@ -6262,10 +6218,10 @@ let M = class extends S {
|
|
|
6262
6218
|
`;
|
|
6263
6219
|
}
|
|
6264
6220
|
};
|
|
6265
|
-
|
|
6221
|
+
I.styles = [
|
|
6266
6222
|
ee,
|
|
6267
6223
|
me,
|
|
6268
|
-
|
|
6224
|
+
M`
|
|
6269
6225
|
:host {
|
|
6270
6226
|
display: block;
|
|
6271
6227
|
}
|
|
@@ -6479,37 +6435,37 @@ M.styles = [
|
|
|
6479
6435
|
];
|
|
6480
6436
|
L([
|
|
6481
6437
|
g({ attribute: !1 })
|
|
6482
|
-
],
|
|
6438
|
+
], I.prototype, "client", 2);
|
|
6483
6439
|
L([
|
|
6484
6440
|
g({ type: Boolean })
|
|
6485
|
-
],
|
|
6441
|
+
], I.prototype, "collapsed", 2);
|
|
6486
6442
|
L([
|
|
6487
6443
|
g()
|
|
6488
|
-
],
|
|
6444
|
+
], I.prototype, "activePanel", 2);
|
|
6489
6445
|
L([
|
|
6490
6446
|
g({ type: Boolean })
|
|
6491
|
-
],
|
|
6447
|
+
], I.prototype, "pinModeActive", 2);
|
|
6492
6448
|
L([
|
|
6493
6449
|
g({ type: Boolean })
|
|
6494
|
-
],
|
|
6450
|
+
], I.prototype, "featuresDisabled", 2);
|
|
6495
6451
|
L([
|
|
6496
6452
|
g({ type: Boolean })
|
|
6497
|
-
],
|
|
6453
|
+
], I.prototype, "drawModeActive", 2);
|
|
6498
6454
|
L([
|
|
6499
6455
|
g()
|
|
6500
|
-
],
|
|
6456
|
+
], I.prototype, "followingUserId", 2);
|
|
6501
6457
|
L([
|
|
6502
6458
|
g()
|
|
6503
|
-
],
|
|
6459
|
+
], I.prototype, "display", 2);
|
|
6504
6460
|
L([
|
|
6505
6461
|
v()
|
|
6506
|
-
],
|
|
6462
|
+
], I.prototype, "users", 2);
|
|
6507
6463
|
L([
|
|
6508
6464
|
v()
|
|
6509
|
-
],
|
|
6510
|
-
|
|
6465
|
+
], I.prototype, "unreadCount", 2);
|
|
6466
|
+
I = L([
|
|
6511
6467
|
R("pulse-widget-toolbar")
|
|
6512
|
-
],
|
|
6468
|
+
], I);
|
|
6513
6469
|
class bs {
|
|
6514
6470
|
constructor(e) {
|
|
6515
6471
|
this.container = null, this.unsubs = [], this.enabled = !1, this.pillEls = /* @__PURE__ */ new Map(), this.client = e;
|
|
@@ -6868,7 +6824,7 @@ let E = class extends S {
|
|
|
6868
6824
|
};
|
|
6869
6825
|
E.styles = [
|
|
6870
6826
|
ee,
|
|
6871
|
-
|
|
6827
|
+
M`
|
|
6872
6828
|
:host {
|
|
6873
6829
|
display: block;
|
|
6874
6830
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gamention/pulse-elements",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Drop-in web components for real-time collaboration — comments, cursors, presence, drawing, and more",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/pulse-elements.cjs",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@lit/context": "^1.1.0",
|
|
37
|
-
"@gamention/pulse-core": "^0.1.
|
|
38
|
-
"@gamention/pulse-shared": "^0.1.
|
|
37
|
+
"@gamention/pulse-core": "^0.1.4",
|
|
38
|
+
"@gamention/pulse-shared": "^0.1.4",
|
|
39
39
|
"lit": "^3.2.0",
|
|
40
40
|
"lucide": "^0.577.0"
|
|
41
41
|
},
|