clawbuttons
Advanced tools
+13
-13
@@ -1,2 +0,2 @@ | ||
| 'use strict';var hermesbuttons=require('hermesbuttons');var k="agentpreferences";function _(){return typeof document<"u"}function Z(){if(!_())return null;let t=document.cookie.split(";").map(e=>e.trim()).find(e=>e.startsWith(`${k}=`));if(!t)return null;let r=t.slice(k.length+1);if(!r)return null;try{let e=decodeURIComponent(r),o=JSON.parse(e);return !o||typeof o!="object"||!Array.isArray(o.order)?null:{order:o.order.filter(l=>typeof l=="string"&&l.length>0)}}catch{return null}}function J(t){if(!_())return;let r=t.order.slice(0,24),e=JSON.stringify({order:r}),o=new Date;o.setFullYear(o.getFullYear()+1),document.cookie=`${k}=${encodeURIComponent(e)}; Path=/; SameSite=Lax; Expires=${o.toUTCString()}`;}function E(t){if(!t||typeof t!="string")return;let e=Z()?.order.filter(o=>o!==t)??[];J({order:[t,...e]});}var B=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| 'use strict';var hermesbuttons=require('hermesbuttons');var k="agentpreferences";function _(){return typeof document<"u"}function X(){if(!_())return null;let t=document.cookie.split(";").map(e=>e.trim()).find(e=>e.startsWith(`${k}=`));if(!t)return null;let r=t.slice(k.length+1);if(!r)return null;try{let e=decodeURIComponent(r),o=JSON.parse(e);return !o||typeof o!="object"||!Array.isArray(o.order)?null:{order:o.order.filter(l=>typeof l=="string"&&l.length>0)}}catch{return null}}function Q(t){if(!_())return;let r=t.order.slice(0,24),e=JSON.stringify({order:r}),o=new Date;o.setFullYear(o.getFullYear()+1),document.cookie=`${k}=${encodeURIComponent(e)}; Path=/; SameSite=Lax; Expires=${o.toUTCString()}`;}function E(t){if(!t||typeof t!="string")return;let e=X()?.order.filter(o=>o!==t)??[];Q({order:[t,...e]});}var B=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <path d="M7 3C7 3 4 6 4 10c0 2 1 3.5 2.5 4.5L5 19c0 1 .5 2 2 2h1l1.5-4" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" fill="none"/> | ||
@@ -42,3 +42,3 @@ <path d="M17 3c0 0 3 3 3 7 0 2-1 3.5-2.5 4.5L19 19c0 1-.5 2-2 2h-1l-1.5-4" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" fill="none"/> | ||
| <rect x="13.5" y="18.5" width="4" height="3.5" rx="1.5" fill="currentColor"/> | ||
| </svg>`,X={openclaw:B,hermes:H,ironclaw:N,nanoclaw:O,zeroclaw:M,openharness:$,claudeclaw:R};function m(t){return X[t]}var A=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon-sm"> | ||
| </svg>`,tt={openclaw:B,hermes:H,ironclaw:N,nanoclaw:O,zeroclaw:M,openharness:$,claudeclaw:R};function m(t){return tt[t]}var A=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon-sm"> | ||
| <rect x="5" y="5" width="8" height="8" rx="1.5" stroke="currentColor" stroke-width="1.5" fill="none"/> | ||
@@ -48,5 +48,5 @@ <path d="M3 10V3.5A1.5 1.5 0 014.5 2H10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/> | ||
| <path d="M3 8.5l3.5 3.5L13 4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | ||
| </svg>`,I=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon-sm"> | ||
| </svg>`,P=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon-sm"> | ||
| <path d="M4 4l8 8m0-8l-8 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/> | ||
| </svg>`;var d={openclaw:{id:"openclaw",name:"OpenClaw",tagName:"openclaw-button",brandColor:"#E74C3C",brandColorHover:"#CF4436",brandColorActive:"#B83C30",cliPrefix:"openclaw -p",urlBase:"https://openclaw.ai/run",description:"The dominant open-source AI agent platform with 200k+ stars, multi-channel support, and ClawMart skill marketplace."},hermes:{id:"hermes",name:"Hermes",tagName:"hermes-button",brandColor:"#2B8CFF",brandColorHover:"#1E7AEB",brandColorActive:"#186BD4",cliPrefix:"hermes -p",urlBase:"https://hermes.ai/run",description:"Persistent personal agent optimized for long-term memory, self-created reusable skills, and research-heavy workflows."},ironclaw:{id:"ironclaw",name:"IronClaw",tagName:"ironclaw-button",brandColor:"#5D6D7E",brandColorHover:"#516070",brandColorActive:"#475564",cliPrefix:"ironclaw agent",urlBase:"https://ironclaw.dev/run",description:"Rust-based privacy-first AI assistant with WASM sandboxes, encrypted credentials, and MCP protocol support."},nanoclaw:{id:"nanoclaw",name:"NanoClaw",tagName:"nanoclaw-button",brandColor:"#1ABC9C",brandColorHover:"#17A78A",brandColorActive:"#14947A",cliPrefix:"claw",urlBase:"https://nanoclaw.dev/run",description:"Minimalist container-based agent (~500 lines of TypeScript) with OS-enforced isolation and Docker sandboxing."},zeroclaw:{id:"zeroclaw",name:"ZeroClaw",tagName:"zeroclaw-button",brandColor:"#E67E22",brandColorHover:"#CF711E",brandColorActive:"#BA651B",cliPrefix:"zeroclaw agent",urlBase:"https://zeroclaw.io/run",description:"Rust-based with WASM sandbox, 14x faster than OpenClaw, 38MB memory footprint, and encrypted credential storage."},openharness:{id:"openharness",name:"OpenHarness",tagName:"openharness-button",brandColor:"#27AE60",brandColorHover:"#229A54",brandColorActive:"#1E8A4B",cliPrefix:"oh",urlBase:"https://openharness.dev/run",description:"Lightweight Python agent harness (44x lighter than Claude Code) with 43 tools, streaming tool-calls, and subagent spawning."},claudeclaw:{id:"claudeclaw",name:"ClaudeClaw",tagName:"claudeclaw-button",brandColor:"#D4795C",brandColorHover:"#C06A4E",brandColorActive:"#B35E43",cliPrefix:"claudeclaw",urlBase:"https://claudeclaw.dev/run",description:"Lightweight open-source wrapper around Claude Code with daemon mode, Telegram/Discord support, and web dashboard."}},g=Object.keys(d);function Q(t){return d[t]}var tt="#E74C3C";function P(t){return d[t].brandColor}function z(t){let r=P(t);return {branded:{bg:r,text:"#FFFFFF",border:"transparent",surface:"#FFFFFF",surfaceText:"#1C1917",muted:"#78716C",primary:r,primaryText:"#FFFFFF",codeBg:"#1C1917",codeText:"#F5F0EB"},"branded-alt":{bg:"#6B5CE7",text:"#FFFFFF",border:"transparent",surface:"#FFFFFF",surfaceText:"#1C1917",muted:"#78716C",primary:"#6B5CE7",primaryText:"#FFFFFF",codeBg:"#1C1917",codeText:"#F5F0EB"},dark:{bg:"#1C1917",text:"#F5F0EB",border:"#3D3530",surface:"#292524",surfaceText:"#F5F0EB",muted:"#A8A29E",primary:r,primaryText:"#FFFFFF",codeBg:"#0C0A09",codeText:"#F5F0EB"},light:{bg:"#FFFFFF",text:"#1C1917",border:"#E7E5E4",surface:"#FAFAF9",surfaceText:"#1C1917",muted:"#78716C",primary:r,primaryText:"#FFFFFF",codeBg:"#1C1917",codeText:"#F5F0EB"}}}function h(t,r){let e=z(r);return t!=="system"?e[t]:typeof window>"u"?e.light:window.matchMedia("(prefers-color-scheme: dark)").matches?e.dark:e.light}function v(t){return ` | ||
| </svg>`;var d={openclaw:{id:"openclaw",name:"OpenClaw",tagName:"openclaw-button",brandColor:"#E74C3C",brandColorHover:"#CF4436",brandColorActive:"#B83C30",cliPrefix:"openclaw -p",urlBase:"https://openclaw.ai/run",description:"The dominant open-source AI agent platform with 200k+ stars, multi-channel support, and ClawMart skill marketplace."},hermes:{id:"hermes",name:"Hermes",tagName:"hermes-button",brandColor:"#2B8CFF",brandColorHover:"#1E7AEB",brandColorActive:"#186BD4",cliPrefix:"hermes -p",urlBase:"https://hermes.ai/run",description:"Persistent personal agent optimized for long-term memory, self-created reusable skills, and research-heavy workflows."},ironclaw:{id:"ironclaw",name:"IronClaw",tagName:"ironclaw-button",brandColor:"#5D6D7E",brandColorHover:"#516070",brandColorActive:"#475564",cliPrefix:"ironclaw agent",urlBase:"https://ironclaw.dev/run",description:"Rust-based privacy-first AI assistant with WASM sandboxes, encrypted credentials, and MCP protocol support."},nanoclaw:{id:"nanoclaw",name:"NanoClaw",tagName:"nanoclaw-button",brandColor:"#1ABC9C",brandColorHover:"#17A78A",brandColorActive:"#14947A",cliPrefix:"claw",urlBase:"https://nanoclaw.dev/run",description:"Minimalist container-based agent (~500 lines of TypeScript) with OS-enforced isolation and Docker sandboxing."},zeroclaw:{id:"zeroclaw",name:"ZeroClaw",tagName:"zeroclaw-button",brandColor:"#E67E22",brandColorHover:"#CF711E",brandColorActive:"#BA651B",cliPrefix:"zeroclaw agent",urlBase:"https://zeroclaw.io/run",description:"Rust-based with WASM sandbox, 14x faster than OpenClaw, 38MB memory footprint, and encrypted credential storage."},openharness:{id:"openharness",name:"OpenHarness",tagName:"openharness-button",brandColor:"#27AE60",brandColorHover:"#229A54",brandColorActive:"#1E8A4B",cliPrefix:"oh",urlBase:"https://openharness.dev/run",description:"Lightweight Python agent harness (44x lighter than Claude Code) with 43 tools, streaming tool-calls, and subagent spawning."},claudeclaw:{id:"claudeclaw",name:"ClaudeClaw",tagName:"claudeclaw-button",brandColor:"#D4795C",brandColorHover:"#C06A4E",brandColorActive:"#B35E43",cliPrefix:"claudeclaw",urlBase:"https://claudeclaw.dev/run",description:"Lightweight open-source wrapper around Claude Code with daemon mode, Telegram/Discord support, and web dashboard."}},g=Object.keys(d);function et(t){return d[t]}var ot="#E74C3C";function I(t){return d[t].brandColor}function z(t){let r=I(t);return {branded:{bg:r,text:"#FFFFFF",border:"transparent",surface:"#FFFFFF",surfaceText:"#1C1917",muted:"#78716C",primary:r,primaryText:"#FFFFFF",codeBg:"#1C1917",codeText:"#F5F0EB"},"branded-alt":{bg:"#6B5CE7",text:"#FFFFFF",border:"transparent",surface:"#FFFFFF",surfaceText:"#1C1917",muted:"#78716C",primary:"#6B5CE7",primaryText:"#FFFFFF",codeBg:"#1C1917",codeText:"#F5F0EB"},dark:{bg:"#1C1917",text:"#F5F0EB",border:"#3D3530",surface:"#292524",surfaceText:"#F5F0EB",muted:"#A8A29E",primary:r,primaryText:"#FFFFFF",codeBg:"#0C0A09",codeText:"#F5F0EB"},light:{bg:"#FFFFFF",text:"#1C1917",border:"#E7E5E4",surface:"#FAFAF9",surfaceText:"#1C1917",muted:"#78716C",primary:r,primaryText:"#FFFFFF",codeBg:"#1C1917",codeText:"#F5F0EB"}}}function h(t,r){let e=z(r);return t!=="system"?e[t]:typeof window>"u"?e.light:window.matchMedia("(prefers-color-scheme: dark)").matches?e.dark:e.light}function v(t){return ` | ||
| --cb-bg: ${t.bg}; | ||
@@ -62,3 +62,3 @@ --cb-text: ${t.text}; | ||
| --cb-code-text: ${t.codeText}; | ||
| `}var D={rounded:{sm:"0.375rem",md:"0.5rem",lg:"0.625rem"},pill:{sm:"999px",md:"999px",lg:"999px"},square:{sm:"0",md:"0",lg:"0"}},j={sm:{height:"2rem",fontSize:"0.75rem",iconSize:"0.875rem",padding:"0 0.75rem",gap:"0.375rem",radius:"0.375rem"},md:{height:"2.5rem",fontSize:"0.875rem",iconSize:"1.125rem",padding:"0 1rem",gap:"0.5rem",radius:"0.5rem"},lg:{height:"3rem",fontSize:"1rem",iconSize:"1.375rem",padding:"0 1.25rem",gap:"0.625rem",radius:"0.625rem"}};var et=` | ||
| `}var D={rounded:{sm:"0.375rem",md:"0.5rem",lg:"0.625rem"},pill:{sm:"999px",md:"999px",lg:"999px"},square:{sm:"0",md:"0",lg:"0"}},j={sm:{height:"2rem",fontSize:"0.75rem",iconSize:"0.875rem",padding:"0 0.75rem",gap:"0.375rem",radius:"0.375rem"},md:{height:"2.5rem",fontSize:"0.875rem",iconSize:"1.125rem",padding:"0 1rem",gap:"0.5rem",radius:"0.5rem"},lg:{height:"3rem",fontSize:"1rem",iconSize:"1.375rem",padding:"0 1.25rem",gap:"0.625rem",radius:"0.625rem"}};var rt=` | ||
| :host { | ||
@@ -318,3 +318,3 @@ position: fixed; | ||
| `,w=class extends HTMLElement{constructor(){super();this._mqCleanup=null;this.attachShadow({mode:"open"});}set options(e){this._options=e,this.render();}get options(){return this._options}disconnectedCallback(){this._mqCleanup?.(),this._mqCleanup=null;}resolvePopupTokens(){let{theme:e,harnessId:o}=this._options;if(e==="dark"||e==="light")return h(e,o);let n=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;if(e==="system")return n?h("dark",o):h("light",o);let l=n?h("dark",o):h("light",o),a=h(e,o);return {...l,primary:a.primary,primaryText:a.primaryText}}render(){if(!this.shadowRoot||!this._options)return;let {harnessId:e,title:o,description:n,command:l,fullCommand:a}=this._options,s=this.resolvePopupTokens(),i=m(e);d[e].name;let p=a||l;this.shadowRoot.innerHTML=` | ||
| <style>${et}</style> | ||
| <style>${rt}</style> | ||
| <div style="${v(s)}"> | ||
@@ -329,3 +329,3 @@ <div class="cb-backdrop" data-action="close"></div> | ||
| </div> | ||
| <button class="cb-dialog-close" data-action="close" aria-label="Close">${I}</button> | ||
| <button class="cb-dialog-close" data-action="close" aria-label="Close">${P}</button> | ||
| </div> | ||
@@ -357,3 +357,3 @@ <div class="cb-dialog-body"> | ||
| </div> | ||
| `}setupListeners(){this.shadowRoot&&(this.shadowRoot.addEventListener("click",e=>{let o=e.target.closest("[data-action]");if(!o)return;let n=o.dataset.action;if(n==="close")this.close();else if(n==="copy"){let l=o.dataset.command||"";this.copyToClipboard(l,o);}}),this.shadowRoot.addEventListener("keydown",e=>{e.key==="Escape"&&this.close();}));}setupSystemThemeWatch(){this._mqCleanup?.(),this._mqCleanup=null;let e=this._options.theme;if(!(e==="system"||e==="branded"||e==="branded-alt")||typeof window>"u")return;let n=window.matchMedia("(prefers-color-scheme: dark)"),l=()=>this.render();n.addEventListener("change",l),this._mqCleanup=()=>n.removeEventListener("change",l);}async copyToClipboard(e,o){try{await navigator.clipboard.writeText(e);let n=o;o.setAttribute("data-copied","true"),n.innerHTML=`${L}<span>Copied!</span>`,this._options.onCopy?.(e),setTimeout(()=>{o.setAttribute("data-copied","false"),n.innerHTML=`${A}<span>Copy</span>`;},2e3);}catch{let n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.opacity="0",document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n),this._options.onCopy?.(e);}}close(){let e=this.shadowRoot?.querySelector(".cb-dialog"),o=this.shadowRoot?.querySelector(".cb-backdrop");e&&(e.style.animation="cb-scale-in 0.15s ease-in reverse"),o&&(o.style.animation="cb-fade-in 0.15s ease-in reverse"),setTimeout(()=>{this._options.onClose?.(),this.remove();},140);}escapeHtml(e){let o=document.createElement("div");return o.textContent=e,o.innerHTML}escapeAttr(e){return e.replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}};typeof customElements<"u"&&!customElements.get("claw-popup-dialog")&&customElements.define("claw-popup-dialog",w);function F(t){let r=document.createElement("claw-popup-dialog");return r.options=t,document.body.appendChild(r),r}function ot(t,r,e){return ` | ||
| `}setupListeners(){this.shadowRoot&&(this.shadowRoot.addEventListener("click",e=>{let o=e.target.closest("[data-action]");if(!o)return;let n=o.dataset.action;if(n==="close")this.close();else if(n==="copy"){let l=o.dataset.command||"";this.copyToClipboard(l,o);}}),this.shadowRoot.addEventListener("keydown",e=>{e.key==="Escape"&&this.close();}));}setupSystemThemeWatch(){this._mqCleanup?.(),this._mqCleanup=null;let e=this._options.theme;if(!(e==="system"||e==="branded"||e==="branded-alt")||typeof window>"u")return;let n=window.matchMedia("(prefers-color-scheme: dark)"),l=()=>this.render();n.addEventListener("change",l),this._mqCleanup=()=>n.removeEventListener("change",l);}async copyToClipboard(e,o){try{await navigator.clipboard.writeText(e);let n=o;o.setAttribute("data-copied","true"),n.innerHTML=`${L}<span>Copied!</span>`,this._options.onCopy?.(e),setTimeout(()=>{o.setAttribute("data-copied","false"),n.innerHTML=`${A}<span>Copy</span>`;},2e3);}catch{let n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.opacity="0",document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n),this._options.onCopy?.(e);}}close(){let e=this.shadowRoot?.querySelector(".cb-dialog"),o=this.shadowRoot?.querySelector(".cb-backdrop");e&&(e.style.animation="cb-scale-in 0.15s ease-in reverse"),o&&(o.style.animation="cb-fade-in 0.15s ease-in reverse"),setTimeout(()=>{this._options.onClose?.(),this.remove();},140);}escapeHtml(e){let o=document.createElement("div");return o.textContent=e,o.innerHTML}escapeAttr(e){return e.replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}};typeof customElements<"u"&&!customElements.get("claw-popup-dialog")&&customElements.define("claw-popup-dialog",w);function S(t){let r=document.createElement("claw-popup-dialog");return r.options=t,document.body.appendChild(r),r}function nt(t,r,e){return ` | ||
| :host { | ||
@@ -585,3 +585,3 @@ display: inline-block; | ||
| } | ||
| `}function q(t){let r=ot(t.brandColor,t.brandColorHover,t.brandColorActive),e=m(t.id);class o extends HTMLElement{constructor(){super();this._options={command:"",theme:"branded",size:"md",variant:"filled",popup:true,promptFlag:true};this._mqCleanup=null;this._rendered=false;this.attachShadow({mode:"open"});}connectedCallback(){this.syncFromAttributes(),this.render(),this.updateLightDOM();}disconnectedCallback(){this._mqCleanup?.(),this._mqCleanup=null;}attributeChangedCallback(){this._rendered&&(this.syncFromAttributes(),this.render(),this.updateLightDOM());}set options(a){this._options={...this._options,...a},this.render(),this.updateLightDOM();}get options(){return this._options}get harnessId(){return t.id}syncFromAttributes(){let a=this.getAttribute("command"),s=this.getAttribute("theme"),i=this.getAttribute("size"),c=this.getAttribute("variant"),p=this.getAttribute("shape"),b=this.getAttribute("popup"),u=this.getAttribute("prompt-flag"),f=this.getAttribute("popup-title"),x=this.getAttribute("popup-description");a!==null&&(this._options.command=a),s&&(this._options.theme=s),i&&(this._options.size=i),c&&(this._options.variant=c),p&&(this._options.shape=p),b!==null&&(this._options.popup=b!=="false"),u!==null&&(this._options.promptFlag=u!=="false"),f!==null&&(this._options.popupTitle=f),x!==null&&(this._options.popupDescription=x);}updateLightDOM(){let{command:a}=this._options,s=this.getFullCommand();this.setAttribute("role","button"),this.setAttribute("tabindex","0"),this.setAttribute("aria-label",`Run on ${t.name}: ${a}`),this._options.popup!==false?this.setAttribute("aria-haspopup","dialog"):this.removeAttribute("aria-haspopup");let i=this.querySelector("a[data-cb-crawl]");i||(i=document.createElement("a"),i.setAttribute("data-cb-crawl",""),i.setAttribute("aria-hidden","true"),i.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;",this.appendChild(i)),i.textContent=`Run on ${t.name}: ${a}`,i.setAttribute("data-platform",t.id),i.setAttribute("data-command",a),i.setAttribute("data-full-command",s),i.href=`${t.urlBase}?command=${encodeURIComponent(s)}`;}getResolvedTheme(){return this._options.theme||"branded"}getFullCommand(){let{command:a,promptFlag:s}=this._options;return s===false?a:`${t.cliPrefix} "${a}"`}render(){if(!this.shadowRoot)return;let a=this.getResolvedTheme(),s=a==="system"?typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a,i=this._options.variant||"filled",c=h(a,t.id),p=this._options.size||"md",b=this._options.shape||"rounded",u=j[p],f=D[b][p];this.setAttribute("data-theme",s),this.setAttribute("data-variant",i);let x=i!=="filled"?"transparent":c.bg,Y=i==="ghost"?"transparent":i==="outline"?c.primary:c.border,G=i!=="filled"?c.primary:c.text;this.shadowRoot.innerHTML=` | ||
| `}function q(t){let r=nt(t.brandColor,t.brandColorHover,t.brandColorActive),e=m(t.id);class o extends HTMLElement{constructor(){super();this._options={command:"",theme:"branded",size:"md",variant:"filled",popup:true,promptFlag:true};this._mqCleanup=null;this._rendered=false;this.attachShadow({mode:"open"});}connectedCallback(){this.syncFromAttributes(),this.render(),this.updateLightDOM();}disconnectedCallback(){this._mqCleanup?.(),this._mqCleanup=null;}attributeChangedCallback(){this._rendered&&(this.syncFromAttributes(),this.render(),this.updateLightDOM());}set options(a){this._options={...this._options,...a},this.render(),this.updateLightDOM();}get options(){return this._options}get harnessId(){return t.id}syncFromAttributes(){let a=this.getAttribute("command"),s=this.getAttribute("theme"),i=this.getAttribute("size"),c=this.getAttribute("variant"),p=this.getAttribute("shape"),b=this.getAttribute("popup"),u=this.getAttribute("prompt-flag"),f=this.getAttribute("popup-title"),x=this.getAttribute("popup-description");a!==null&&(this._options.command=a),s&&(this._options.theme=s),i&&(this._options.size=i),c&&(this._options.variant=c),p&&(this._options.shape=p),b!==null&&(this._options.popup=b!=="false"),u!==null&&(this._options.promptFlag=u!=="false"),f!==null&&(this._options.popupTitle=f),x!==null&&(this._options.popupDescription=x);}updateLightDOM(){let{command:a}=this._options,s=this.getFullCommand();this.setAttribute("role","button"),this.setAttribute("tabindex","0"),this.setAttribute("aria-label",`Run on ${t.name}: ${a}`),this._options.popup!==false?this.setAttribute("aria-haspopup","dialog"):this.removeAttribute("aria-haspopup");let i=this.querySelector("a[data-cb-crawl]");i||(i=document.createElement("a"),i.setAttribute("data-cb-crawl",""),i.setAttribute("aria-hidden","true"),i.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;",this.appendChild(i)),i.textContent=`Run on ${t.name}: ${a}`,i.setAttribute("data-platform",t.id),i.setAttribute("data-command",a),i.setAttribute("data-full-command",s),i.href=`${t.urlBase}?command=${encodeURIComponent(s)}`;}getResolvedTheme(){return this._options.theme||"branded"}getFullCommand(){let{command:a,promptFlag:s}=this._options;return s===false?a:`${t.cliPrefix} "${a}"`}render(){if(!this.shadowRoot)return;let a=this.getResolvedTheme(),s=a==="system"?typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a,i=this._options.variant||"filled",c=h(a,t.id),p=this._options.size||"md",b=this._options.shape||"rounded",u=j[p],f=D[b][p];this.setAttribute("data-theme",s),this.setAttribute("data-variant",i);let x=i!=="filled"?"transparent":c.bg,Z=i==="ghost"?"transparent":i==="outline"?c.primary:c.border,J=i!=="filled"?c.primary:c.text;this.shadowRoot.innerHTML=` | ||
| <style>${r}</style> | ||
@@ -594,4 +594,4 @@ <button | ||
| --cb-bg: ${x}; | ||
| --cb-border: ${Y}; | ||
| --cb-text: ${G}; | ||
| --cb-border: ${Z}; | ||
| --cb-text: ${J}; | ||
| --cb-accent-color: ${c.primary}; | ||
@@ -611,4 +611,4 @@ --cb-focus-color: ${c.primary}; | ||
| </button> | ||
| `;let T=this.shadowRoot.querySelector(".cb-btn");T.addEventListener("click",()=>this.handleClick()),T.addEventListener("keydown",y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),this.handleClick());}),this._rendered=true,this.setupSystemThemeWatch();}handleClick(){let{popup:a,command:s,popupTitle:i,popupDescription:c}=this._options,p=this.getFullCommand();if(this.dispatchEvent(new CustomEvent("cb-open",{bubbles:true,composed:true,detail:{command:s,fullCommand:p,harness:t.id}})),a===false){navigator.clipboard.writeText(p).then(()=>{this._options.onCopy?.(p),E(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:true,composed:true,detail:{command:p,harness:t.id}}));});return}F({harnessId:t.id,theme:this.getResolvedTheme(),title:i||`Run on ${t.name}`,description:c||`Execute this command in your terminal to get started with ${t.name}.`,command:s,fullCommand:p,onCopy:b=>{this._options.onCopy?.(b),E(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:true,composed:true,detail:{command:b,harness:t.id}}));},onClose:()=>{this.dispatchEvent(new CustomEvent("cb-close",{bubbles:true,composed:true,detail:{harness:t.id}}));}});}setupSystemThemeWatch(){if(this._mqCleanup?.(),this._mqCleanup=null,this.getResolvedTheme()!=="system"||typeof window>"u")return;let a=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>this.render();a.addEventListener("change",s),this._mqCleanup=()=>a.removeEventListener("change",s);}}return o.observedAttributes=["command","theme","size","variant","shape","popup","prompt-flag","popup-title","popup-description"],o}var S={};function W(t){return S[t]||(S[t]=q(d[t])),S[t]}function U(t,r){if(typeof customElements>"u")return;let e=r||d[t].tagName;customElements.get(e)||customElements.define(e,W(t));}function C(){g.forEach(t=>U(t));}function rt(t,r){let e=d[t].tagName,o=document.createElement(e);return o.options=r,o}C();function V(){if(typeof document>"u")return [];let t=[];return g.forEach(r=>{let e=d[r];document.querySelectorAll(e.tagName).forEach(o=>{let n=o.getAttribute("command")||"",s=o.getAttribute("prompt-flag")!=="false"?`${e.cliPrefix} "${n}"`:n;t.push({platform:r,command:n,fullCommand:s});});}),t}function K(){let t=V();return t.length===0?{}:{"@context":"https://schema.org","@type":"WebPage",potentialAction:t.map(e=>{let o=d[e.platform],n={"@type":"EntryPoint",actionPlatform:o.urlBase,urlTemplate:`${o.urlBase}?command=${encodeURIComponent(e.fullCommand||e.command)}`};return {"@type":"Action",name:`Run on ${o.name}: ${e.command}`,description:e.command,target:n,object:{"@type":"SoftwareSourceCode",runtimePlatform:o.name,text:e.fullCommand||e.command}}})}}function nt(){if(typeof document>"u")return;let t=document.querySelector("script[data-clawbuttons-jsonld]");t&&t.remove();let r=K();if(!r||!("potentialAction"in r))return;let e=document.createElement("script");e.type="application/ld+json",e.setAttribute("data-clawbuttons-jsonld",""),e.textContent=JSON.stringify(r,null,2),document.head.appendChild(e);}function St(){C();} | ||
| Object.defineProperty(exports,"HERMES_AGENT_ICON",{enumerable:true,get:function(){return hermesbuttons.HERMES_ICON}});Object.defineProperty(exports,"HERMES_AGENT_SKILL_ICON",{enumerable:true,get:function(){return hermesbuttons.HERMES_SKILL_ICON}});Object.defineProperty(exports,"HERMES_ALT_BRAND_COLOR",{enumerable:true,get:function(){return hermesbuttons.ALT_BRAND_COLOR}});Object.defineProperty(exports,"HERMES_BRAND_COLOR",{enumerable:true,get:function(){return hermesbuttons.BRAND_COLOR}});Object.defineProperty(exports,"HermesAgentButton",{enumerable:true,get:function(){return hermesbuttons.HermesButton}});Object.defineProperty(exports,"HermesAgentSkillButton",{enumerable:true,get:function(){return hermesbuttons.HermesSkillButton}});Object.defineProperty(exports,"HermesPopupDialog",{enumerable:true,get:function(){return hermesbuttons.HermesPopupDialog}});Object.defineProperty(exports,"createHermesButton",{enumerable:true,get:function(){return hermesbuttons.createHermesButton}});Object.defineProperty(exports,"createHermesSkillButton",{enumerable:true,get:function(){return hermesbuttons.createHermesSkillButton}});Object.defineProperty(exports,"hermesThemes",{enumerable:true,get:function(){return hermesbuttons.themes}});Object.defineProperty(exports,"registerHermes",{enumerable:true,get:function(){return hermesbuttons.register}});Object.defineProperty(exports,"registerHermesButton",{enumerable:true,get:function(){return hermesbuttons.registerHermesButton}});Object.defineProperty(exports,"registerHermesSkillButton",{enumerable:true,get:function(){return hermesbuttons.registerHermesSkillButton}});Object.defineProperty(exports,"resolveHermesTheme",{enumerable:true,get:function(){return hermesbuttons.resolveTheme}});Object.defineProperty(exports,"showHermesPopup",{enumerable:true,get:function(){return hermesbuttons.showPopup}});exports.CLAUDECLAW_ICON=R;exports.ClawPopupDialog=w;exports.DEFAULT_BRAND_COLOR=tt;exports.HARNESSES=d;exports.HARNESS_IDS=g;exports.HERMES_ICON=H;exports.IRONCLAW_ICON=N;exports.NANOCLAW_ICON=O;exports.OPENCLAW_ICON=B;exports.OPENHARNESS_ICON=$;exports.ZEROCLAW_ICON=M;exports.createButton=rt;exports.createClawButtonClass=q;exports.discoverButtons=V;exports.generateStructuredData=K;exports.getBrandColor=P;exports.getButtonClass=W;exports.getHarness=Q;exports.getIcon=m;exports.getThemes=z;exports.injectStructuredData=nt;exports.register=St;exports.registerAllButtons=C;exports.registerHarnessButton=U;exports.resolveTheme=h;exports.showPopup=F;//# sourceMappingURL=index.js.map | ||
| `;let T=this.shadowRoot.querySelector(".cb-btn");T.addEventListener("click",()=>this.handleClick()),T.addEventListener("keydown",y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),this.handleClick());}),this._rendered=true,this.setupSystemThemeWatch();}handleClick(){let{popup:a,command:s,popupTitle:i,popupDescription:c}=this._options,p=this.getFullCommand();if(this.dispatchEvent(new CustomEvent("cb-open",{bubbles:true,composed:true,detail:{command:s,fullCommand:p,harness:t.id}})),a===false){navigator.clipboard.writeText(p).then(()=>{this._options.onCopy?.(p),E(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:true,composed:true,detail:{command:p,harness:t.id}}));});return}S({harnessId:t.id,theme:this.getResolvedTheme(),title:i||`Run on ${t.name}`,description:c||`Execute this command in your terminal to get started with ${t.name}.`,command:s,fullCommand:p,onCopy:b=>{this._options.onCopy?.(b),E(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:true,composed:true,detail:{command:b,harness:t.id}}));},onClose:()=>{this.dispatchEvent(new CustomEvent("cb-close",{bubbles:true,composed:true,detail:{harness:t.id}}));}});}setupSystemThemeWatch(){if(this._mqCleanup?.(),this._mqCleanup=null,this.getResolvedTheme()!=="system"||typeof window>"u")return;let a=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>this.render();a.addEventListener("change",s),this._mqCleanup=()=>a.removeEventListener("change",s);}}return o.observedAttributes=["command","theme","size","variant","shape","popup","prompt-flag","popup-title","popup-description"],o}var F={};function W(t){return F[t]||(F[t]=q(d[t])),F[t]}function U(t,r){if(typeof customElements>"u")return;let e=r||d[t].tagName;customElements.get(e)||customElements.define(e,W(t));}function C(){g.forEach(t=>U(t));}function at(t,r){let e=d[t].tagName,o=document.createElement(e);return o.options=r,o}C();function V(){if(typeof document>"u")return [];let t=[];return g.forEach(r=>{let e=d[r];document.querySelectorAll(e.tagName).forEach(o=>{let n=o.getAttribute("command")||"",s=o.getAttribute("prompt-flag")!=="false"?`${e.cliPrefix} "${n}"`:n;t.push({platform:r,command:n,fullCommand:s});});}),t}function K(){let t=V();return t.length===0?{}:{"@context":"https://schema.org","@type":"WebPage",potentialAction:t.map(e=>{let o=d[e.platform],n={"@type":"EntryPoint",actionPlatform:o.urlBase,urlTemplate:`${o.urlBase}?command=${encodeURIComponent(e.fullCommand||e.command)}`};return {"@type":"Action",name:`Run on ${o.name}: ${e.command}`,description:e.command,target:n,object:{"@type":"SoftwareSourceCode",runtimePlatform:o.name,text:e.fullCommand||e.command}}})}}function it(){if(typeof document>"u")return;let t=document.querySelector("script[data-clawbuttons-jsonld]");t&&t.remove();let r=K();if(!r||!("potentialAction"in r))return;let e=document.createElement("script");e.type="application/ld+json",e.setAttribute("data-clawbuttons-jsonld",""),e.textContent=JSON.stringify(r,null,2),document.head.appendChild(e);}var Y="https://clawbuttons.vercel.app/api/ping",G=false;function st(){if(G||typeof window>"u"||typeof navigator>"u")return;let t=window.location?.origin;if(!(!t||t==="null"||t.startsWith("file:"))){G=true;try{let r=JSON.stringify({origin:t}),e=new Blob([r],{type:"text/plain"});typeof navigator.sendBeacon=="function"?navigator.sendBeacon(Y,e):fetch(Y,{method:"POST",body:r,keepalive:!0}).catch(()=>{});}catch{}}}if(typeof window<"u")try{st();}catch{}function Ht(){C();} | ||
| Object.defineProperty(exports,"HERMES_AGENT_ICON",{enumerable:true,get:function(){return hermesbuttons.HERMES_ICON}});Object.defineProperty(exports,"HERMES_AGENT_SKILL_ICON",{enumerable:true,get:function(){return hermesbuttons.HERMES_SKILL_ICON}});Object.defineProperty(exports,"HERMES_ALT_BRAND_COLOR",{enumerable:true,get:function(){return hermesbuttons.ALT_BRAND_COLOR}});Object.defineProperty(exports,"HERMES_BRAND_COLOR",{enumerable:true,get:function(){return hermesbuttons.BRAND_COLOR}});Object.defineProperty(exports,"HermesAgentButton",{enumerable:true,get:function(){return hermesbuttons.HermesButton}});Object.defineProperty(exports,"HermesAgentSkillButton",{enumerable:true,get:function(){return hermesbuttons.HermesSkillButton}});Object.defineProperty(exports,"HermesPopupDialog",{enumerable:true,get:function(){return hermesbuttons.HermesPopupDialog}});Object.defineProperty(exports,"createHermesButton",{enumerable:true,get:function(){return hermesbuttons.createHermesButton}});Object.defineProperty(exports,"createHermesSkillButton",{enumerable:true,get:function(){return hermesbuttons.createHermesSkillButton}});Object.defineProperty(exports,"hermesThemes",{enumerable:true,get:function(){return hermesbuttons.themes}});Object.defineProperty(exports,"registerHermes",{enumerable:true,get:function(){return hermesbuttons.register}});Object.defineProperty(exports,"registerHermesButton",{enumerable:true,get:function(){return hermesbuttons.registerHermesButton}});Object.defineProperty(exports,"registerHermesSkillButton",{enumerable:true,get:function(){return hermesbuttons.registerHermesSkillButton}});Object.defineProperty(exports,"resolveHermesTheme",{enumerable:true,get:function(){return hermesbuttons.resolveTheme}});Object.defineProperty(exports,"showHermesPopup",{enumerable:true,get:function(){return hermesbuttons.showPopup}});exports.CLAUDECLAW_ICON=R;exports.ClawPopupDialog=w;exports.DEFAULT_BRAND_COLOR=ot;exports.HARNESSES=d;exports.HARNESS_IDS=g;exports.HERMES_ICON=H;exports.IRONCLAW_ICON=N;exports.NANOCLAW_ICON=O;exports.OPENCLAW_ICON=B;exports.OPENHARNESS_ICON=$;exports.ZEROCLAW_ICON=M;exports.createButton=at;exports.createClawButtonClass=q;exports.discoverButtons=V;exports.generateStructuredData=K;exports.getBrandColor=I;exports.getButtonClass=W;exports.getHarness=et;exports.getIcon=m;exports.getThemes=z;exports.injectStructuredData=it;exports.register=Ht;exports.registerAllButtons=C;exports.registerHarnessButton=U;exports.resolveTheme=h;exports.showPopup=S;//# sourceMappingURL=index.js.map | ||
| //# sourceMappingURL=index.js.map |
+13
-13
@@ -1,2 +0,2 @@ | ||
| export{HERMES_ICON as HERMES_AGENT_ICON,HERMES_SKILL_ICON as HERMES_AGENT_SKILL_ICON,ALT_BRAND_COLOR as HERMES_ALT_BRAND_COLOR,BRAND_COLOR as HERMES_BRAND_COLOR,HermesButton as HermesAgentButton,HermesSkillButton as HermesAgentSkillButton,HermesPopupDialog,createHermesButton,createHermesSkillButton,themes as hermesThemes,register as registerHermes,registerHermesButton,registerHermesSkillButton,resolveTheme as resolveHermesTheme,showPopup as showHermesPopup}from'hermesbuttons';var k="agentpreferences";function _(){return typeof document<"u"}function Z(){if(!_())return null;let t=document.cookie.split(";").map(e=>e.trim()).find(e=>e.startsWith(`${k}=`));if(!t)return null;let r=t.slice(k.length+1);if(!r)return null;try{let e=decodeURIComponent(r),o=JSON.parse(e);return !o||typeof o!="object"||!Array.isArray(o.order)?null:{order:o.order.filter(l=>typeof l=="string"&&l.length>0)}}catch{return null}}function J(t){if(!_())return;let r=t.order.slice(0,24),e=JSON.stringify({order:r}),o=new Date;o.setFullYear(o.getFullYear()+1),document.cookie=`${k}=${encodeURIComponent(e)}; Path=/; SameSite=Lax; Expires=${o.toUTCString()}`;}function E(t){if(!t||typeof t!="string")return;let e=Z()?.order.filter(o=>o!==t)??[];J({order:[t,...e]});}var B=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| export{HERMES_ICON as HERMES_AGENT_ICON,HERMES_SKILL_ICON as HERMES_AGENT_SKILL_ICON,ALT_BRAND_COLOR as HERMES_ALT_BRAND_COLOR,BRAND_COLOR as HERMES_BRAND_COLOR,HermesButton as HermesAgentButton,HermesSkillButton as HermesAgentSkillButton,HermesPopupDialog,createHermesButton,createHermesSkillButton,themes as hermesThemes,register as registerHermes,registerHermesButton,registerHermesSkillButton,resolveTheme as resolveHermesTheme,showPopup as showHermesPopup}from'hermesbuttons';var k="agentpreferences";function _(){return typeof document<"u"}function X(){if(!_())return null;let t=document.cookie.split(";").map(e=>e.trim()).find(e=>e.startsWith(`${k}=`));if(!t)return null;let r=t.slice(k.length+1);if(!r)return null;try{let e=decodeURIComponent(r),o=JSON.parse(e);return !o||typeof o!="object"||!Array.isArray(o.order)?null:{order:o.order.filter(l=>typeof l=="string"&&l.length>0)}}catch{return null}}function Q(t){if(!_())return;let r=t.order.slice(0,24),e=JSON.stringify({order:r}),o=new Date;o.setFullYear(o.getFullYear()+1),document.cookie=`${k}=${encodeURIComponent(e)}; Path=/; SameSite=Lax; Expires=${o.toUTCString()}`;}function E(t){if(!t||typeof t!="string")return;let e=X()?.order.filter(o=>o!==t)??[];Q({order:[t,...e]});}var B=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <path d="M7 3C7 3 4 6 4 10c0 2 1 3.5 2.5 4.5L5 19c0 1 .5 2 2 2h1l1.5-4" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" fill="none"/> | ||
@@ -42,3 +42,3 @@ <path d="M17 3c0 0 3 3 3 7 0 2-1 3.5-2.5 4.5L19 19c0 1-.5 2-2 2h-1l-1.5-4" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" fill="none"/> | ||
| <rect x="13.5" y="18.5" width="4" height="3.5" rx="1.5" fill="currentColor"/> | ||
| </svg>`,X={openclaw:B,hermes:H,ironclaw:N,nanoclaw:O,zeroclaw:M,openharness:$,claudeclaw:R};function m(t){return X[t]}var A=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon-sm"> | ||
| </svg>`,tt={openclaw:B,hermes:H,ironclaw:N,nanoclaw:O,zeroclaw:M,openharness:$,claudeclaw:R};function m(t){return tt[t]}var A=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon-sm"> | ||
| <rect x="5" y="5" width="8" height="8" rx="1.5" stroke="currentColor" stroke-width="1.5" fill="none"/> | ||
@@ -48,5 +48,5 @@ <path d="M3 10V3.5A1.5 1.5 0 014.5 2H10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/> | ||
| <path d="M3 8.5l3.5 3.5L13 4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | ||
| </svg>`,I=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon-sm"> | ||
| </svg>`,P=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon-sm"> | ||
| <path d="M4 4l8 8m0-8l-8 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/> | ||
| </svg>`;var d={openclaw:{id:"openclaw",name:"OpenClaw",tagName:"openclaw-button",brandColor:"#E74C3C",brandColorHover:"#CF4436",brandColorActive:"#B83C30",cliPrefix:"openclaw -p",urlBase:"https://openclaw.ai/run",description:"The dominant open-source AI agent platform with 200k+ stars, multi-channel support, and ClawMart skill marketplace."},hermes:{id:"hermes",name:"Hermes",tagName:"hermes-button",brandColor:"#2B8CFF",brandColorHover:"#1E7AEB",brandColorActive:"#186BD4",cliPrefix:"hermes -p",urlBase:"https://hermes.ai/run",description:"Persistent personal agent optimized for long-term memory, self-created reusable skills, and research-heavy workflows."},ironclaw:{id:"ironclaw",name:"IronClaw",tagName:"ironclaw-button",brandColor:"#5D6D7E",brandColorHover:"#516070",brandColorActive:"#475564",cliPrefix:"ironclaw agent",urlBase:"https://ironclaw.dev/run",description:"Rust-based privacy-first AI assistant with WASM sandboxes, encrypted credentials, and MCP protocol support."},nanoclaw:{id:"nanoclaw",name:"NanoClaw",tagName:"nanoclaw-button",brandColor:"#1ABC9C",brandColorHover:"#17A78A",brandColorActive:"#14947A",cliPrefix:"claw",urlBase:"https://nanoclaw.dev/run",description:"Minimalist container-based agent (~500 lines of TypeScript) with OS-enforced isolation and Docker sandboxing."},zeroclaw:{id:"zeroclaw",name:"ZeroClaw",tagName:"zeroclaw-button",brandColor:"#E67E22",brandColorHover:"#CF711E",brandColorActive:"#BA651B",cliPrefix:"zeroclaw agent",urlBase:"https://zeroclaw.io/run",description:"Rust-based with WASM sandbox, 14x faster than OpenClaw, 38MB memory footprint, and encrypted credential storage."},openharness:{id:"openharness",name:"OpenHarness",tagName:"openharness-button",brandColor:"#27AE60",brandColorHover:"#229A54",brandColorActive:"#1E8A4B",cliPrefix:"oh",urlBase:"https://openharness.dev/run",description:"Lightweight Python agent harness (44x lighter than Claude Code) with 43 tools, streaming tool-calls, and subagent spawning."},claudeclaw:{id:"claudeclaw",name:"ClaudeClaw",tagName:"claudeclaw-button",brandColor:"#D4795C",brandColorHover:"#C06A4E",brandColorActive:"#B35E43",cliPrefix:"claudeclaw",urlBase:"https://claudeclaw.dev/run",description:"Lightweight open-source wrapper around Claude Code with daemon mode, Telegram/Discord support, and web dashboard."}},g=Object.keys(d);function Q(t){return d[t]}var tt="#E74C3C";function P(t){return d[t].brandColor}function z(t){let r=P(t);return {branded:{bg:r,text:"#FFFFFF",border:"transparent",surface:"#FFFFFF",surfaceText:"#1C1917",muted:"#78716C",primary:r,primaryText:"#FFFFFF",codeBg:"#1C1917",codeText:"#F5F0EB"},"branded-alt":{bg:"#6B5CE7",text:"#FFFFFF",border:"transparent",surface:"#FFFFFF",surfaceText:"#1C1917",muted:"#78716C",primary:"#6B5CE7",primaryText:"#FFFFFF",codeBg:"#1C1917",codeText:"#F5F0EB"},dark:{bg:"#1C1917",text:"#F5F0EB",border:"#3D3530",surface:"#292524",surfaceText:"#F5F0EB",muted:"#A8A29E",primary:r,primaryText:"#FFFFFF",codeBg:"#0C0A09",codeText:"#F5F0EB"},light:{bg:"#FFFFFF",text:"#1C1917",border:"#E7E5E4",surface:"#FAFAF9",surfaceText:"#1C1917",muted:"#78716C",primary:r,primaryText:"#FFFFFF",codeBg:"#1C1917",codeText:"#F5F0EB"}}}function h(t,r){let e=z(r);return t!=="system"?e[t]:typeof window>"u"?e.light:window.matchMedia("(prefers-color-scheme: dark)").matches?e.dark:e.light}function v(t){return ` | ||
| </svg>`;var d={openclaw:{id:"openclaw",name:"OpenClaw",tagName:"openclaw-button",brandColor:"#E74C3C",brandColorHover:"#CF4436",brandColorActive:"#B83C30",cliPrefix:"openclaw -p",urlBase:"https://openclaw.ai/run",description:"The dominant open-source AI agent platform with 200k+ stars, multi-channel support, and ClawMart skill marketplace."},hermes:{id:"hermes",name:"Hermes",tagName:"hermes-button",brandColor:"#2B8CFF",brandColorHover:"#1E7AEB",brandColorActive:"#186BD4",cliPrefix:"hermes -p",urlBase:"https://hermes.ai/run",description:"Persistent personal agent optimized for long-term memory, self-created reusable skills, and research-heavy workflows."},ironclaw:{id:"ironclaw",name:"IronClaw",tagName:"ironclaw-button",brandColor:"#5D6D7E",brandColorHover:"#516070",brandColorActive:"#475564",cliPrefix:"ironclaw agent",urlBase:"https://ironclaw.dev/run",description:"Rust-based privacy-first AI assistant with WASM sandboxes, encrypted credentials, and MCP protocol support."},nanoclaw:{id:"nanoclaw",name:"NanoClaw",tagName:"nanoclaw-button",brandColor:"#1ABC9C",brandColorHover:"#17A78A",brandColorActive:"#14947A",cliPrefix:"claw",urlBase:"https://nanoclaw.dev/run",description:"Minimalist container-based agent (~500 lines of TypeScript) with OS-enforced isolation and Docker sandboxing."},zeroclaw:{id:"zeroclaw",name:"ZeroClaw",tagName:"zeroclaw-button",brandColor:"#E67E22",brandColorHover:"#CF711E",brandColorActive:"#BA651B",cliPrefix:"zeroclaw agent",urlBase:"https://zeroclaw.io/run",description:"Rust-based with WASM sandbox, 14x faster than OpenClaw, 38MB memory footprint, and encrypted credential storage."},openharness:{id:"openharness",name:"OpenHarness",tagName:"openharness-button",brandColor:"#27AE60",brandColorHover:"#229A54",brandColorActive:"#1E8A4B",cliPrefix:"oh",urlBase:"https://openharness.dev/run",description:"Lightweight Python agent harness (44x lighter than Claude Code) with 43 tools, streaming tool-calls, and subagent spawning."},claudeclaw:{id:"claudeclaw",name:"ClaudeClaw",tagName:"claudeclaw-button",brandColor:"#D4795C",brandColorHover:"#C06A4E",brandColorActive:"#B35E43",cliPrefix:"claudeclaw",urlBase:"https://claudeclaw.dev/run",description:"Lightweight open-source wrapper around Claude Code with daemon mode, Telegram/Discord support, and web dashboard."}},g=Object.keys(d);function et(t){return d[t]}var ot="#E74C3C";function I(t){return d[t].brandColor}function z(t){let r=I(t);return {branded:{bg:r,text:"#FFFFFF",border:"transparent",surface:"#FFFFFF",surfaceText:"#1C1917",muted:"#78716C",primary:r,primaryText:"#FFFFFF",codeBg:"#1C1917",codeText:"#F5F0EB"},"branded-alt":{bg:"#6B5CE7",text:"#FFFFFF",border:"transparent",surface:"#FFFFFF",surfaceText:"#1C1917",muted:"#78716C",primary:"#6B5CE7",primaryText:"#FFFFFF",codeBg:"#1C1917",codeText:"#F5F0EB"},dark:{bg:"#1C1917",text:"#F5F0EB",border:"#3D3530",surface:"#292524",surfaceText:"#F5F0EB",muted:"#A8A29E",primary:r,primaryText:"#FFFFFF",codeBg:"#0C0A09",codeText:"#F5F0EB"},light:{bg:"#FFFFFF",text:"#1C1917",border:"#E7E5E4",surface:"#FAFAF9",surfaceText:"#1C1917",muted:"#78716C",primary:r,primaryText:"#FFFFFF",codeBg:"#1C1917",codeText:"#F5F0EB"}}}function h(t,r){let e=z(r);return t!=="system"?e[t]:typeof window>"u"?e.light:window.matchMedia("(prefers-color-scheme: dark)").matches?e.dark:e.light}function v(t){return ` | ||
| --cb-bg: ${t.bg}; | ||
@@ -62,3 +62,3 @@ --cb-text: ${t.text}; | ||
| --cb-code-text: ${t.codeText}; | ||
| `}var D={rounded:{sm:"0.375rem",md:"0.5rem",lg:"0.625rem"},pill:{sm:"999px",md:"999px",lg:"999px"},square:{sm:"0",md:"0",lg:"0"}},j={sm:{height:"2rem",fontSize:"0.75rem",iconSize:"0.875rem",padding:"0 0.75rem",gap:"0.375rem",radius:"0.375rem"},md:{height:"2.5rem",fontSize:"0.875rem",iconSize:"1.125rem",padding:"0 1rem",gap:"0.5rem",radius:"0.5rem"},lg:{height:"3rem",fontSize:"1rem",iconSize:"1.375rem",padding:"0 1.25rem",gap:"0.625rem",radius:"0.625rem"}};var et=` | ||
| `}var D={rounded:{sm:"0.375rem",md:"0.5rem",lg:"0.625rem"},pill:{sm:"999px",md:"999px",lg:"999px"},square:{sm:"0",md:"0",lg:"0"}},j={sm:{height:"2rem",fontSize:"0.75rem",iconSize:"0.875rem",padding:"0 0.75rem",gap:"0.375rem",radius:"0.375rem"},md:{height:"2.5rem",fontSize:"0.875rem",iconSize:"1.125rem",padding:"0 1rem",gap:"0.5rem",radius:"0.5rem"},lg:{height:"3rem",fontSize:"1rem",iconSize:"1.375rem",padding:"0 1.25rem",gap:"0.625rem",radius:"0.625rem"}};var rt=` | ||
| :host { | ||
@@ -318,3 +318,3 @@ position: fixed; | ||
| `,w=class extends HTMLElement{constructor(){super();this._mqCleanup=null;this.attachShadow({mode:"open"});}set options(e){this._options=e,this.render();}get options(){return this._options}disconnectedCallback(){this._mqCleanup?.(),this._mqCleanup=null;}resolvePopupTokens(){let{theme:e,harnessId:o}=this._options;if(e==="dark"||e==="light")return h(e,o);let n=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;if(e==="system")return n?h("dark",o):h("light",o);let l=n?h("dark",o):h("light",o),a=h(e,o);return {...l,primary:a.primary,primaryText:a.primaryText}}render(){if(!this.shadowRoot||!this._options)return;let {harnessId:e,title:o,description:n,command:l,fullCommand:a}=this._options,s=this.resolvePopupTokens(),i=m(e);d[e].name;let p=a||l;this.shadowRoot.innerHTML=` | ||
| <style>${et}</style> | ||
| <style>${rt}</style> | ||
| <div style="${v(s)}"> | ||
@@ -329,3 +329,3 @@ <div class="cb-backdrop" data-action="close"></div> | ||
| </div> | ||
| <button class="cb-dialog-close" data-action="close" aria-label="Close">${I}</button> | ||
| <button class="cb-dialog-close" data-action="close" aria-label="Close">${P}</button> | ||
| </div> | ||
@@ -357,3 +357,3 @@ <div class="cb-dialog-body"> | ||
| </div> | ||
| `}setupListeners(){this.shadowRoot&&(this.shadowRoot.addEventListener("click",e=>{let o=e.target.closest("[data-action]");if(!o)return;let n=o.dataset.action;if(n==="close")this.close();else if(n==="copy"){let l=o.dataset.command||"";this.copyToClipboard(l,o);}}),this.shadowRoot.addEventListener("keydown",e=>{e.key==="Escape"&&this.close();}));}setupSystemThemeWatch(){this._mqCleanup?.(),this._mqCleanup=null;let e=this._options.theme;if(!(e==="system"||e==="branded"||e==="branded-alt")||typeof window>"u")return;let n=window.matchMedia("(prefers-color-scheme: dark)"),l=()=>this.render();n.addEventListener("change",l),this._mqCleanup=()=>n.removeEventListener("change",l);}async copyToClipboard(e,o){try{await navigator.clipboard.writeText(e);let n=o;o.setAttribute("data-copied","true"),n.innerHTML=`${L}<span>Copied!</span>`,this._options.onCopy?.(e),setTimeout(()=>{o.setAttribute("data-copied","false"),n.innerHTML=`${A}<span>Copy</span>`;},2e3);}catch{let n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.opacity="0",document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n),this._options.onCopy?.(e);}}close(){let e=this.shadowRoot?.querySelector(".cb-dialog"),o=this.shadowRoot?.querySelector(".cb-backdrop");e&&(e.style.animation="cb-scale-in 0.15s ease-in reverse"),o&&(o.style.animation="cb-fade-in 0.15s ease-in reverse"),setTimeout(()=>{this._options.onClose?.(),this.remove();},140);}escapeHtml(e){let o=document.createElement("div");return o.textContent=e,o.innerHTML}escapeAttr(e){return e.replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}};typeof customElements<"u"&&!customElements.get("claw-popup-dialog")&&customElements.define("claw-popup-dialog",w);function F(t){let r=document.createElement("claw-popup-dialog");return r.options=t,document.body.appendChild(r),r}function ot(t,r,e){return ` | ||
| `}setupListeners(){this.shadowRoot&&(this.shadowRoot.addEventListener("click",e=>{let o=e.target.closest("[data-action]");if(!o)return;let n=o.dataset.action;if(n==="close")this.close();else if(n==="copy"){let l=o.dataset.command||"";this.copyToClipboard(l,o);}}),this.shadowRoot.addEventListener("keydown",e=>{e.key==="Escape"&&this.close();}));}setupSystemThemeWatch(){this._mqCleanup?.(),this._mqCleanup=null;let e=this._options.theme;if(!(e==="system"||e==="branded"||e==="branded-alt")||typeof window>"u")return;let n=window.matchMedia("(prefers-color-scheme: dark)"),l=()=>this.render();n.addEventListener("change",l),this._mqCleanup=()=>n.removeEventListener("change",l);}async copyToClipboard(e,o){try{await navigator.clipboard.writeText(e);let n=o;o.setAttribute("data-copied","true"),n.innerHTML=`${L}<span>Copied!</span>`,this._options.onCopy?.(e),setTimeout(()=>{o.setAttribute("data-copied","false"),n.innerHTML=`${A}<span>Copy</span>`;},2e3);}catch{let n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.opacity="0",document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n),this._options.onCopy?.(e);}}close(){let e=this.shadowRoot?.querySelector(".cb-dialog"),o=this.shadowRoot?.querySelector(".cb-backdrop");e&&(e.style.animation="cb-scale-in 0.15s ease-in reverse"),o&&(o.style.animation="cb-fade-in 0.15s ease-in reverse"),setTimeout(()=>{this._options.onClose?.(),this.remove();},140);}escapeHtml(e){let o=document.createElement("div");return o.textContent=e,o.innerHTML}escapeAttr(e){return e.replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}};typeof customElements<"u"&&!customElements.get("claw-popup-dialog")&&customElements.define("claw-popup-dialog",w);function S(t){let r=document.createElement("claw-popup-dialog");return r.options=t,document.body.appendChild(r),r}function nt(t,r,e){return ` | ||
| :host { | ||
@@ -585,3 +585,3 @@ display: inline-block; | ||
| } | ||
| `}function q(t){let r=ot(t.brandColor,t.brandColorHover,t.brandColorActive),e=m(t.id);class o extends HTMLElement{constructor(){super();this._options={command:"",theme:"branded",size:"md",variant:"filled",popup:true,promptFlag:true};this._mqCleanup=null;this._rendered=false;this.attachShadow({mode:"open"});}connectedCallback(){this.syncFromAttributes(),this.render(),this.updateLightDOM();}disconnectedCallback(){this._mqCleanup?.(),this._mqCleanup=null;}attributeChangedCallback(){this._rendered&&(this.syncFromAttributes(),this.render(),this.updateLightDOM());}set options(a){this._options={...this._options,...a},this.render(),this.updateLightDOM();}get options(){return this._options}get harnessId(){return t.id}syncFromAttributes(){let a=this.getAttribute("command"),s=this.getAttribute("theme"),i=this.getAttribute("size"),c=this.getAttribute("variant"),p=this.getAttribute("shape"),b=this.getAttribute("popup"),u=this.getAttribute("prompt-flag"),f=this.getAttribute("popup-title"),x=this.getAttribute("popup-description");a!==null&&(this._options.command=a),s&&(this._options.theme=s),i&&(this._options.size=i),c&&(this._options.variant=c),p&&(this._options.shape=p),b!==null&&(this._options.popup=b!=="false"),u!==null&&(this._options.promptFlag=u!=="false"),f!==null&&(this._options.popupTitle=f),x!==null&&(this._options.popupDescription=x);}updateLightDOM(){let{command:a}=this._options,s=this.getFullCommand();this.setAttribute("role","button"),this.setAttribute("tabindex","0"),this.setAttribute("aria-label",`Run on ${t.name}: ${a}`),this._options.popup!==false?this.setAttribute("aria-haspopup","dialog"):this.removeAttribute("aria-haspopup");let i=this.querySelector("a[data-cb-crawl]");i||(i=document.createElement("a"),i.setAttribute("data-cb-crawl",""),i.setAttribute("aria-hidden","true"),i.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;",this.appendChild(i)),i.textContent=`Run on ${t.name}: ${a}`,i.setAttribute("data-platform",t.id),i.setAttribute("data-command",a),i.setAttribute("data-full-command",s),i.href=`${t.urlBase}?command=${encodeURIComponent(s)}`;}getResolvedTheme(){return this._options.theme||"branded"}getFullCommand(){let{command:a,promptFlag:s}=this._options;return s===false?a:`${t.cliPrefix} "${a}"`}render(){if(!this.shadowRoot)return;let a=this.getResolvedTheme(),s=a==="system"?typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a,i=this._options.variant||"filled",c=h(a,t.id),p=this._options.size||"md",b=this._options.shape||"rounded",u=j[p],f=D[b][p];this.setAttribute("data-theme",s),this.setAttribute("data-variant",i);let x=i!=="filled"?"transparent":c.bg,Y=i==="ghost"?"transparent":i==="outline"?c.primary:c.border,G=i!=="filled"?c.primary:c.text;this.shadowRoot.innerHTML=` | ||
| `}function q(t){let r=nt(t.brandColor,t.brandColorHover,t.brandColorActive),e=m(t.id);class o extends HTMLElement{constructor(){super();this._options={command:"",theme:"branded",size:"md",variant:"filled",popup:true,promptFlag:true};this._mqCleanup=null;this._rendered=false;this.attachShadow({mode:"open"});}connectedCallback(){this.syncFromAttributes(),this.render(),this.updateLightDOM();}disconnectedCallback(){this._mqCleanup?.(),this._mqCleanup=null;}attributeChangedCallback(){this._rendered&&(this.syncFromAttributes(),this.render(),this.updateLightDOM());}set options(a){this._options={...this._options,...a},this.render(),this.updateLightDOM();}get options(){return this._options}get harnessId(){return t.id}syncFromAttributes(){let a=this.getAttribute("command"),s=this.getAttribute("theme"),i=this.getAttribute("size"),c=this.getAttribute("variant"),p=this.getAttribute("shape"),b=this.getAttribute("popup"),u=this.getAttribute("prompt-flag"),f=this.getAttribute("popup-title"),x=this.getAttribute("popup-description");a!==null&&(this._options.command=a),s&&(this._options.theme=s),i&&(this._options.size=i),c&&(this._options.variant=c),p&&(this._options.shape=p),b!==null&&(this._options.popup=b!=="false"),u!==null&&(this._options.promptFlag=u!=="false"),f!==null&&(this._options.popupTitle=f),x!==null&&(this._options.popupDescription=x);}updateLightDOM(){let{command:a}=this._options,s=this.getFullCommand();this.setAttribute("role","button"),this.setAttribute("tabindex","0"),this.setAttribute("aria-label",`Run on ${t.name}: ${a}`),this._options.popup!==false?this.setAttribute("aria-haspopup","dialog"):this.removeAttribute("aria-haspopup");let i=this.querySelector("a[data-cb-crawl]");i||(i=document.createElement("a"),i.setAttribute("data-cb-crawl",""),i.setAttribute("aria-hidden","true"),i.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;",this.appendChild(i)),i.textContent=`Run on ${t.name}: ${a}`,i.setAttribute("data-platform",t.id),i.setAttribute("data-command",a),i.setAttribute("data-full-command",s),i.href=`${t.urlBase}?command=${encodeURIComponent(s)}`;}getResolvedTheme(){return this._options.theme||"branded"}getFullCommand(){let{command:a,promptFlag:s}=this._options;return s===false?a:`${t.cliPrefix} "${a}"`}render(){if(!this.shadowRoot)return;let a=this.getResolvedTheme(),s=a==="system"?typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a,i=this._options.variant||"filled",c=h(a,t.id),p=this._options.size||"md",b=this._options.shape||"rounded",u=j[p],f=D[b][p];this.setAttribute("data-theme",s),this.setAttribute("data-variant",i);let x=i!=="filled"?"transparent":c.bg,Z=i==="ghost"?"transparent":i==="outline"?c.primary:c.border,J=i!=="filled"?c.primary:c.text;this.shadowRoot.innerHTML=` | ||
| <style>${r}</style> | ||
@@ -594,4 +594,4 @@ <button | ||
| --cb-bg: ${x}; | ||
| --cb-border: ${Y}; | ||
| --cb-text: ${G}; | ||
| --cb-border: ${Z}; | ||
| --cb-text: ${J}; | ||
| --cb-accent-color: ${c.primary}; | ||
@@ -611,4 +611,4 @@ --cb-focus-color: ${c.primary}; | ||
| </button> | ||
| `;let T=this.shadowRoot.querySelector(".cb-btn");T.addEventListener("click",()=>this.handleClick()),T.addEventListener("keydown",y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),this.handleClick());}),this._rendered=true,this.setupSystemThemeWatch();}handleClick(){let{popup:a,command:s,popupTitle:i,popupDescription:c}=this._options,p=this.getFullCommand();if(this.dispatchEvent(new CustomEvent("cb-open",{bubbles:true,composed:true,detail:{command:s,fullCommand:p,harness:t.id}})),a===false){navigator.clipboard.writeText(p).then(()=>{this._options.onCopy?.(p),E(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:true,composed:true,detail:{command:p,harness:t.id}}));});return}F({harnessId:t.id,theme:this.getResolvedTheme(),title:i||`Run on ${t.name}`,description:c||`Execute this command in your terminal to get started with ${t.name}.`,command:s,fullCommand:p,onCopy:b=>{this._options.onCopy?.(b),E(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:true,composed:true,detail:{command:b,harness:t.id}}));},onClose:()=>{this.dispatchEvent(new CustomEvent("cb-close",{bubbles:true,composed:true,detail:{harness:t.id}}));}});}setupSystemThemeWatch(){if(this._mqCleanup?.(),this._mqCleanup=null,this.getResolvedTheme()!=="system"||typeof window>"u")return;let a=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>this.render();a.addEventListener("change",s),this._mqCleanup=()=>a.removeEventListener("change",s);}}return o.observedAttributes=["command","theme","size","variant","shape","popup","prompt-flag","popup-title","popup-description"],o}var S={};function W(t){return S[t]||(S[t]=q(d[t])),S[t]}function U(t,r){if(typeof customElements>"u")return;let e=r||d[t].tagName;customElements.get(e)||customElements.define(e,W(t));}function C(){g.forEach(t=>U(t));}function rt(t,r){let e=d[t].tagName,o=document.createElement(e);return o.options=r,o}C();function V(){if(typeof document>"u")return [];let t=[];return g.forEach(r=>{let e=d[r];document.querySelectorAll(e.tagName).forEach(o=>{let n=o.getAttribute("command")||"",s=o.getAttribute("prompt-flag")!=="false"?`${e.cliPrefix} "${n}"`:n;t.push({platform:r,command:n,fullCommand:s});});}),t}function K(){let t=V();return t.length===0?{}:{"@context":"https://schema.org","@type":"WebPage",potentialAction:t.map(e=>{let o=d[e.platform],n={"@type":"EntryPoint",actionPlatform:o.urlBase,urlTemplate:`${o.urlBase}?command=${encodeURIComponent(e.fullCommand||e.command)}`};return {"@type":"Action",name:`Run on ${o.name}: ${e.command}`,description:e.command,target:n,object:{"@type":"SoftwareSourceCode",runtimePlatform:o.name,text:e.fullCommand||e.command}}})}}function nt(){if(typeof document>"u")return;let t=document.querySelector("script[data-clawbuttons-jsonld]");t&&t.remove();let r=K();if(!r||!("potentialAction"in r))return;let e=document.createElement("script");e.type="application/ld+json",e.setAttribute("data-clawbuttons-jsonld",""),e.textContent=JSON.stringify(r,null,2),document.head.appendChild(e);}function St(){C();} | ||
| export{R as CLAUDECLAW_ICON,w as ClawPopupDialog,tt as DEFAULT_BRAND_COLOR,d as HARNESSES,g as HARNESS_IDS,H as HERMES_ICON,N as IRONCLAW_ICON,O as NANOCLAW_ICON,B as OPENCLAW_ICON,$ as OPENHARNESS_ICON,M as ZEROCLAW_ICON,rt as createButton,q as createClawButtonClass,V as discoverButtons,K as generateStructuredData,P as getBrandColor,W as getButtonClass,Q as getHarness,m as getIcon,z as getThemes,nt as injectStructuredData,St as register,C as registerAllButtons,U as registerHarnessButton,h as resolveTheme,F as showPopup};//# sourceMappingURL=index.mjs.map | ||
| `;let T=this.shadowRoot.querySelector(".cb-btn");T.addEventListener("click",()=>this.handleClick()),T.addEventListener("keydown",y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),this.handleClick());}),this._rendered=true,this.setupSystemThemeWatch();}handleClick(){let{popup:a,command:s,popupTitle:i,popupDescription:c}=this._options,p=this.getFullCommand();if(this.dispatchEvent(new CustomEvent("cb-open",{bubbles:true,composed:true,detail:{command:s,fullCommand:p,harness:t.id}})),a===false){navigator.clipboard.writeText(p).then(()=>{this._options.onCopy?.(p),E(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:true,composed:true,detail:{command:p,harness:t.id}}));});return}S({harnessId:t.id,theme:this.getResolvedTheme(),title:i||`Run on ${t.name}`,description:c||`Execute this command in your terminal to get started with ${t.name}.`,command:s,fullCommand:p,onCopy:b=>{this._options.onCopy?.(b),E(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:true,composed:true,detail:{command:b,harness:t.id}}));},onClose:()=>{this.dispatchEvent(new CustomEvent("cb-close",{bubbles:true,composed:true,detail:{harness:t.id}}));}});}setupSystemThemeWatch(){if(this._mqCleanup?.(),this._mqCleanup=null,this.getResolvedTheme()!=="system"||typeof window>"u")return;let a=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>this.render();a.addEventListener("change",s),this._mqCleanup=()=>a.removeEventListener("change",s);}}return o.observedAttributes=["command","theme","size","variant","shape","popup","prompt-flag","popup-title","popup-description"],o}var F={};function W(t){return F[t]||(F[t]=q(d[t])),F[t]}function U(t,r){if(typeof customElements>"u")return;let e=r||d[t].tagName;customElements.get(e)||customElements.define(e,W(t));}function C(){g.forEach(t=>U(t));}function at(t,r){let e=d[t].tagName,o=document.createElement(e);return o.options=r,o}C();function V(){if(typeof document>"u")return [];let t=[];return g.forEach(r=>{let e=d[r];document.querySelectorAll(e.tagName).forEach(o=>{let n=o.getAttribute("command")||"",s=o.getAttribute("prompt-flag")!=="false"?`${e.cliPrefix} "${n}"`:n;t.push({platform:r,command:n,fullCommand:s});});}),t}function K(){let t=V();return t.length===0?{}:{"@context":"https://schema.org","@type":"WebPage",potentialAction:t.map(e=>{let o=d[e.platform],n={"@type":"EntryPoint",actionPlatform:o.urlBase,urlTemplate:`${o.urlBase}?command=${encodeURIComponent(e.fullCommand||e.command)}`};return {"@type":"Action",name:`Run on ${o.name}: ${e.command}`,description:e.command,target:n,object:{"@type":"SoftwareSourceCode",runtimePlatform:o.name,text:e.fullCommand||e.command}}})}}function it(){if(typeof document>"u")return;let t=document.querySelector("script[data-clawbuttons-jsonld]");t&&t.remove();let r=K();if(!r||!("potentialAction"in r))return;let e=document.createElement("script");e.type="application/ld+json",e.setAttribute("data-clawbuttons-jsonld",""),e.textContent=JSON.stringify(r,null,2),document.head.appendChild(e);}var Y="https://clawbuttons.vercel.app/api/ping",G=false;function st(){if(G||typeof window>"u"||typeof navigator>"u")return;let t=window.location?.origin;if(!(!t||t==="null"||t.startsWith("file:"))){G=true;try{let r=JSON.stringify({origin:t}),e=new Blob([r],{type:"text/plain"});typeof navigator.sendBeacon=="function"?navigator.sendBeacon(Y,e):fetch(Y,{method:"POST",body:r,keepalive:!0}).catch(()=>{});}catch{}}}if(typeof window<"u")try{st();}catch{}function Ht(){C();} | ||
| export{R as CLAUDECLAW_ICON,w as ClawPopupDialog,ot as DEFAULT_BRAND_COLOR,d as HARNESSES,g as HARNESS_IDS,H as HERMES_ICON,N as IRONCLAW_ICON,O as NANOCLAW_ICON,B as OPENCLAW_ICON,$ as OPENHARNESS_ICON,M as ZEROCLAW_ICON,at as createButton,q as createClawButtonClass,V as discoverButtons,K as generateStructuredData,I as getBrandColor,W as getButtonClass,et as getHarness,m as getIcon,z as getThemes,it as injectStructuredData,Ht as register,C as registerAllButtons,U as registerHarnessButton,h as resolveTheme,S as showPopup};//# sourceMappingURL=index.mjs.map | ||
| //# sourceMappingURL=index.mjs.map |
+2
-1
| { | ||
| "name": "clawbuttons", | ||
| "version": "1.0.5", | ||
| "version": "1.0.6", | ||
| "description": "Drop-in \"Run on OpenClaw\", \"Run on Hermes\", \"Run on IronClaw\" and more buttons for any website or framework — covering the full OpenClaw-style harness ecosystem", | ||
@@ -61,2 +61,3 @@ "main": "./dist/index.js", | ||
| "@types/react": "^19.2.14", | ||
| "@upstash/redis": "^1.37.0", | ||
| "tsup": "^8.4.0", | ||
@@ -63,0 +64,0 @@ "typescript": "^5.7.0" |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 2 instances
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
940379
0.62%5734
0.1%4
33.33%39
5.41%3
Infinity%