clawbuttons
Advanced tools
| var w="agentpreferences";function A(){return typeof document<"u"}function N(){if(!A())return null;let t=document.cookie.split(";").map(e=>e.trim()).find(e=>e.startsWith(`${w}=`));if(!t)return null;let r=t.slice(w.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 P(t){if(!A())return;let r=t.order.slice(0,24),e=JSON.stringify({order:r}),o=new Date;o.setFullYear(o.getFullYear()+1),document.cookie=`${w}=${encodeURIComponent(e)}; Path=/; SameSite=Lax; Expires=${o.toUTCString()}`}function C(t){if(!t||typeof t!="string")return;let e=N()?.order.filter(o=>o!==t)??[];P({order:[t,...e]})}var z=`<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"/> | ||
| <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"/> | ||
| <path d="M12 2v4M9.5 7.5L12 6l2.5 1.5" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/> | ||
| <circle cx="12" cy="12" r="4" fill="currentColor" opacity="0.2"/> | ||
| <circle cx="12" cy="12" r="2" fill="currentColor"/> | ||
| </svg>`,I=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <path d="M12 2L4 6v6c0 5.25 3.4 10.2 8 12 4.6-1.8 8-6.75 8-12V6l-8-4z" fill="currentColor" opacity="0.15"/> | ||
| <path d="M12 2L4 6v6c0 5.25 3.4 10.2 8 12 4.6-1.8 8-6.75 8-12V6l-8-4z" stroke="currentColor" stroke-width="1.6" fill="none"/> | ||
| <path d="M8 11h8M12 8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round"/> | ||
| <circle cx="12" cy="7" r="1.2" fill="currentColor"/> | ||
| </svg>`,O=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <rect x="4" y="4" width="16" height="16" rx="3" fill="currentColor" opacity="0.15"/> | ||
| <rect x="4" y="4" width="16" height="16" rx="3" stroke="currentColor" stroke-width="1.6" fill="none"/> | ||
| <path d="M8 9v6M12 8v8M16 10v4" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"/> | ||
| <path d="M4 13h16" stroke="currentColor" stroke-width="1.2" opacity="0.4"/> | ||
| </svg>`,R=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <circle cx="12" cy="12" r="9" fill="currentColor" opacity="0.12"/> | ||
| <circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="1.6" fill="none"/> | ||
| <circle cx="12" cy="12" r="3.5" fill="currentColor" opacity="0.3"/> | ||
| <circle cx="12" cy="12" r="1.5" fill="currentColor"/> | ||
| <path d="M12 3v3M12 18v3M3 12h3M18 12h3" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/> | ||
| </svg>`,D=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <path d="M13 2L4.5 13.5h5L8 22l10.5-12h-5.5L15 2h-2z" fill="currentColor" opacity="0.2"/> | ||
| <path d="M13 2L4.5 13.5h5L8 22l10.5-12h-5.5L15 2h-2z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"/> | ||
| <path d="M11.5 9l-1 4h3l-1 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> | ||
| </svg>`,q=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <path d="M12 3L3 8v8l9 5 9-5V8l-9-5z" fill="currentColor" opacity="0.12"/> | ||
| <path d="M12 3L3 8v8l9 5 9-5V8l-9-5z" stroke="currentColor" stroke-width="1.6" fill="none" stroke-linejoin="round"/> | ||
| <path d="M12 13V8M9 10.5l3 2.5 3-2.5" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/> | ||
| <circle cx="12" cy="16" r="1.3" fill="currentColor"/> | ||
| </svg>`,j=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <rect x="3.5" y="1.5" width="5" height="5" rx="1.5" fill="currentColor"/> | ||
| <rect x="15.5" y="1.5" width="5" height="5" rx="1.5" fill="currentColor"/> | ||
| <rect x="2.5" y="5.5" width="19" height="13" rx="3" fill="currentColor"/> | ||
| <ellipse cx="9" cy="11.5" rx="2" ry="2.5" fill="white" opacity="0.95"/> | ||
| <ellipse cx="15" cy="11.5" rx="2" ry="2.5" fill="white" opacity="0.95"/> | ||
| <ellipse cx="9.6" cy="12" rx="1" ry="1.2" fill="#1C1917"/> | ||
| <ellipse cx="15.6" cy="12" rx="1" ry="1.2" fill="#1C1917"/> | ||
| <rect x="6.5" y="18.5" width="4" height="3.5" rx="1.5" fill="currentColor"/> | ||
| <rect x="13.5" y="18.5" width="4" height="3.5" rx="1.5" fill="currentColor"/> | ||
| </svg>`,W={openclaw:z,hermes:I,ironclaw:O,nanoclaw:R,zeroclaw:D,openharness:q,claudeclaw:j};function f(t){return W[t]}var y=`<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"/> | ||
| <path d="M3 10V3.5A1.5 1.5 0 014.5 2H10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/> | ||
| </svg>`,T=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon-sm"> | ||
| <path d="M3 8.5l3.5 3.5L13 4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | ||
| </svg>`,_=`<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 p={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."}},S=Object.keys(p);function U(t){return p[t].brandColor}function V(t){let r=U(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=V(r);return t!=="system"?e[t]:typeof window>"u"?e.light:window.matchMedia("(prefers-color-scheme: dark)").matches?e.dark:e.light}function x(t){return` | ||
| --cb-bg: ${t.bg}; | ||
| --cb-text: ${t.text}; | ||
| --cb-border: ${t.border}; | ||
| --cb-surface: ${t.surface}; | ||
| --cb-surface-text: ${t.surfaceText}; | ||
| --cb-muted: ${t.muted}; | ||
| --cb-primary: ${t.primary}; | ||
| --cb-primary-text: ${t.primaryText}; | ||
| --cb-code-bg: ${t.codeBg}; | ||
| --cb-code-text: ${t.codeText}; | ||
| `}var B={rounded:{sm:"0.375rem",md:"0.5rem",lg:"0.625rem"},pill:{sm:"999px",md:"999px",lg:"999px"},square:{sm:"0",md:"0",lg:"0"}},$={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 Y=` | ||
| :host { | ||
| position: fixed; | ||
| inset: 0; | ||
| z-index: 999999; | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; | ||
| } | ||
| * { box-sizing: border-box; margin: 0; padding: 0; } | ||
| .cb-backdrop { | ||
| position: absolute; | ||
| inset: 0; | ||
| background: rgba(0, 0, 0, 0.5); | ||
| backdrop-filter: blur(4px); | ||
| -webkit-backdrop-filter: blur(4px); | ||
| animation: cb-fade-in 0.15s ease-out; | ||
| } | ||
| .cb-dialog { | ||
| position: relative; | ||
| width: 90%; | ||
| max-width: 460px; | ||
| background: var(--cb-surface); | ||
| color: var(--cb-surface-text); | ||
| border-radius: 16px; | ||
| box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px var(--cb-border); | ||
| overflow: hidden; | ||
| animation: cb-scale-in 0.2s ease-out; | ||
| } | ||
| .cb-dialog-header { | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 12px; | ||
| padding: 20px 24px 16px; | ||
| border-bottom: 1px solid var(--cb-border); | ||
| } | ||
| .cb-dialog-header-icon { | ||
| width: 36px; | ||
| height: 36px; | ||
| color: var(--cb-primary); | ||
| flex-shrink: 0; | ||
| } | ||
| .cb-dialog-header-text { | ||
| flex: 1; | ||
| min-width: 0; | ||
| } | ||
| .cb-dialog-title { | ||
| font-size: 16px; | ||
| font-weight: 600; | ||
| line-height: 1.3; | ||
| color: var(--cb-surface-text); | ||
| } | ||
| .cb-dialog-description { | ||
| font-size: 13px; | ||
| color: var(--cb-muted); | ||
| margin-top: 2px; | ||
| line-height: 1.4; | ||
| } | ||
| .cb-dialog-close { | ||
| width: 32px; | ||
| height: 32px; | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| border: none; | ||
| background: transparent; | ||
| color: var(--cb-muted); | ||
| cursor: pointer; | ||
| border-radius: 8px; | ||
| flex-shrink: 0; | ||
| transition: background 0.15s, color 0.15s; | ||
| } | ||
| .cb-dialog-close:hover { | ||
| background: var(--cb-border); | ||
| color: var(--cb-surface-text); | ||
| } | ||
| .cb-dialog-close svg { width: 14px; height: 14px; } | ||
| .cb-dialog-body { padding: 20px 24px; } | ||
| .cb-step { | ||
| display: flex; | ||
| gap: 12px; | ||
| margin-bottom: 16px; | ||
| } | ||
| .cb-step:last-child { margin-bottom: 0; } | ||
| .cb-step-num { | ||
| width: 24px; | ||
| height: 24px; | ||
| border-radius: 50%; | ||
| background: var(--cb-primary); | ||
| color: var(--cb-primary-text); | ||
| font-size: 12px; | ||
| font-weight: 600; | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| flex-shrink: 0; | ||
| margin-top: 1px; | ||
| } | ||
| .cb-step-content { | ||
| flex: 1; | ||
| min-width: 0; | ||
| } | ||
| .cb-step-label { | ||
| font-size: 13px; | ||
| font-weight: 500; | ||
| color: var(--cb-surface-text); | ||
| margin-bottom: 8px; | ||
| line-height: 1.4; | ||
| } | ||
| .cb-code-block { | ||
| display: flex; | ||
| align-items: center; | ||
| background: var(--cb-code-bg); | ||
| color: var(--cb-code-text); | ||
| border-radius: 10px; | ||
| padding: 2px 2px 2px 14px; | ||
| font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, 'Liberation Mono', Menlo, monospace; | ||
| font-size: 13px; | ||
| line-height: 1.5; | ||
| gap: 8px; | ||
| overflow: hidden; | ||
| } | ||
| .cb-code-text { | ||
| flex: 1; | ||
| overflow-x: auto; | ||
| white-space: nowrap; | ||
| padding: 10px 0; | ||
| scrollbar-width: none; | ||
| } | ||
| .cb-code-text::-webkit-scrollbar { display: none; } | ||
| .cb-code-prefix { | ||
| color: var(--cb-muted); | ||
| user-select: none; | ||
| margin-right: 6px; | ||
| } | ||
| .cb-copy-btn { | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| gap: 6px; | ||
| height: 36px; | ||
| min-width: 36px; | ||
| padding: 0 12px; | ||
| border: none; | ||
| background: var(--cb-primary); | ||
| color: var(--cb-primary-text); | ||
| cursor: pointer; | ||
| border-radius: 8px; | ||
| font-family: inherit; | ||
| font-size: 12px; | ||
| font-weight: 500; | ||
| flex-shrink: 0; | ||
| transition: background 0.15s, transform 0.1s; | ||
| white-space: nowrap; | ||
| } | ||
| .cb-copy-btn:hover { filter: brightness(0.9); } | ||
| .cb-copy-btn:active { transform: scale(0.96); } | ||
| .cb-copy-btn svg { width: 14px; height: 14px; } | ||
| .cb-copy-btn[data-copied="true"] { | ||
| background: #16a34a; | ||
| } | ||
| .cb-dialog-footer { | ||
| padding: 16px 24px 20px; | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 10px; | ||
| } | ||
| .cb-hint { | ||
| font-size: 12px; | ||
| color: var(--cb-muted); | ||
| text-align: center; | ||
| line-height: 1.4; | ||
| } | ||
| .cb-hint kbd { | ||
| display: inline-block; | ||
| padding: 1px 5px; | ||
| font-family: inherit; | ||
| font-size: 11px; | ||
| background: var(--cb-border); | ||
| border-radius: 4px; | ||
| border: 1px solid var(--cb-border); | ||
| } | ||
| @keyframes cb-fade-in { | ||
| from { opacity: 0; } | ||
| to { opacity: 1; } | ||
| } | ||
| @keyframes cb-scale-in { | ||
| from { opacity: 0; transform: scale(0.95) translateY(8px); } | ||
| to { opacity: 1; transform: scale(1) translateY(0); } | ||
| } | ||
| @media (max-width: 480px) { | ||
| .cb-dialog { | ||
| width: 96%; | ||
| max-width: none; | ||
| border-radius: 14px; | ||
| max-height: 90dvh; | ||
| overflow-y: auto; | ||
| overscroll-behavior: contain; | ||
| } | ||
| .cb-dialog-header { padding: 16px 16px 12px; gap: 10px; } | ||
| .cb-dialog-header-icon { width: 28px; height: 28px; } | ||
| .cb-dialog-body { padding: 16px; } | ||
| .cb-dialog-footer { padding: 12px 16px 16px; } | ||
| .cb-step { gap: 10px; margin-bottom: 14px; } | ||
| .cb-step-num { width: 22px; height: 22px; font-size: 11px; } | ||
| .cb-step-label { font-size: 12px; margin-bottom: 6px; } | ||
| .cb-code-block { font-size: 12px; padding: 2px 2px 2px 10px; border-radius: 8px; } | ||
| .cb-copy-btn { height: 32px; padding: 0 10px; font-size: 11px; border-radius: 6px; } | ||
| .cb-hint { font-size: 11px; } | ||
| } | ||
| @media (max-width: 360px) { | ||
| .cb-dialog { width: 100%; border-radius: 12px 12px 0 0; align-self: flex-end; } | ||
| .cb-copy-btn span { display: none; } | ||
| .cb-copy-btn { min-width: 32px; padding: 0 8px; } | ||
| } | ||
| @supports (padding: env(safe-area-inset-bottom)) { | ||
| .cb-dialog-footer { padding-bottom: calc(20px + env(safe-area-inset-bottom)); } | ||
| } | ||
| `,k=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 i=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;if(e==="system")return i?h("dark",o):h("light",o);let l=i?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:i,command:l,fullCommand:a}=this._options,s=this.resolvePopupTokens(),n=f(e),c=p[e].name,d=a||l;this.shadowRoot.innerHTML=` | ||
| <style>${Y}</style> | ||
| <div style="${x(s)}"> | ||
| <div class="cb-backdrop" data-action="close"></div> | ||
| <div class="cb-dialog" role="dialog" aria-modal="true" aria-labelledby="cb-dialog-title"> | ||
| <div class="cb-dialog-header"> | ||
| <div class="cb-dialog-header-icon">${n}</div> | ||
| <div class="cb-dialog-header-text"> | ||
| <div class="cb-dialog-title" id="cb-dialog-title">${o}</div> | ||
| ${i?`<div class="cb-dialog-description">${i}</div>`:""} | ||
| </div> | ||
| <button class="cb-dialog-close" data-action="close" aria-label="Close">${_}</button> | ||
| </div> | ||
| <div class="cb-dialog-body"> | ||
| ${this.renderCommandBody(d)} | ||
| </div> | ||
| <div class="cb-dialog-footer"> | ||
| <div class="cb-hint">Press <kbd>\u2318</kbd>+<kbd>V</kbd> or <kbd>Ctrl</kbd>+<kbd>V</kbd> in your terminal to run</div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| `,this.setupListeners(),this.setupSystemThemeWatch()}renderCommandBody(e){return` | ||
| <div class="cb-step"> | ||
| <div class="cb-step-num">1</div> | ||
| <div class="cb-step-content"> | ||
| <div class="cb-step-label">Copy this command to your clipboard</div> | ||
| <div class="cb-code-block"> | ||
| <div class="cb-code-text"><span class="cb-code-prefix">$</span>${this.escapeHtml(e)}</div> | ||
| <button class="cb-copy-btn" data-action="copy" data-command="${this.escapeAttr(e)}">${y}<span>Copy</span></button> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div class="cb-step"> | ||
| <div class="cb-step-num">2</div> | ||
| <div class="cb-step-content"> | ||
| <div class="cb-step-label">Paste and run in your terminal</div> | ||
| </div> | ||
| </div> | ||
| `}setupListeners(){this.shadowRoot&&(this.shadowRoot.addEventListener("click",e=>{let o=e.target.closest("[data-action]");if(!o)return;let i=o.dataset.action;if(i==="close")this.close();else if(i==="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 i=window.matchMedia("(prefers-color-scheme: dark)"),l=()=>this.render();i.addEventListener("change",l),this._mqCleanup=()=>i.removeEventListener("change",l)}async copyToClipboard(e,o){try{await navigator.clipboard.writeText(e);let i=o;o.setAttribute("data-copied","true"),i.innerHTML=`${T}<span>Copied!</span>`,this._options.onCopy?.(e),setTimeout(()=>{o.setAttribute("data-copied","false"),i.innerHTML=`${y}<span>Copy</span>`},2e3)}catch{let i=document.createElement("textarea");i.value=e,i.style.position="fixed",i.style.opacity="0",document.body.appendChild(i),i.select(),document.execCommand("copy"),document.body.removeChild(i),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",k);function M(t){let r=document.createElement("claw-popup-dialog");return r.options=t,document.body.appendChild(r),r}function K(t,r,e){return` | ||
| :host { | ||
| display: inline-block; | ||
| vertical-align: middle; | ||
| font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; | ||
| -webkit-tap-highlight-color: transparent; | ||
| } | ||
| * { box-sizing: border-box; margin: 0; padding: 0; } | ||
| .cb-btn { | ||
| display: inline-flex; | ||
| align-items: center; | ||
| gap: var(--cb-gap); | ||
| height: var(--cb-height); | ||
| min-height: 44px; | ||
| padding: var(--cb-padding); | ||
| border: 1.5px solid var(--cb-border); | ||
| background: var(--cb-bg); | ||
| color: var(--cb-text); | ||
| font-family: inherit; | ||
| font-size: var(--cb-font-size); | ||
| font-weight: 600; | ||
| line-height: 1; | ||
| border-radius: var(--cb-radius); | ||
| cursor: pointer; | ||
| user-select: none; | ||
| white-space: nowrap; | ||
| touch-action: manipulation; | ||
| transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease, color 0.15s ease; | ||
| text-decoration: none; | ||
| -webkit-font-smoothing: antialiased; | ||
| } | ||
| @media (pointer: fine) { | ||
| .cb-btn { min-height: unset; } | ||
| } | ||
| :host([data-variant="filled"][data-theme="branded"]) .cb-btn, | ||
| :host([data-variant="filled"][data-theme="branded-alt"]) .cb-btn { | ||
| box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); | ||
| } | ||
| :host([data-variant="filled"][data-theme="branded"]) .cb-btn:hover { | ||
| background: ${r}; | ||
| box-shadow: 0 2px 8px ${t}59; | ||
| } | ||
| :host([data-variant="filled"][data-theme="branded"]) .cb-btn:active { | ||
| background: ${e}; | ||
| transform: scale(0.98); | ||
| } | ||
| :host([data-variant="filled"][data-theme="branded-alt"]) .cb-btn:hover { | ||
| background: #5A4BD6; | ||
| box-shadow: 0 2px 8px rgba(107, 92, 231, 0.35); | ||
| } | ||
| :host([data-variant="filled"][data-theme="branded-alt"]) .cb-btn:active { | ||
| background: #4F41C8; | ||
| transform: scale(0.98); | ||
| } | ||
| :host([data-variant="filled"][data-theme="dark"]) .cb-btn { | ||
| box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); | ||
| } | ||
| :host([data-variant="filled"][data-theme="dark"]) .cb-btn:hover { | ||
| background: #292524; | ||
| border-color: #57534E; | ||
| box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); | ||
| } | ||
| :host([data-variant="filled"][data-theme="dark"]) .cb-btn:active { | ||
| background: #1C1917; | ||
| transform: scale(0.98); | ||
| } | ||
| :host([data-variant="filled"][data-theme="light"]) .cb-btn { | ||
| box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04); | ||
| } | ||
| :host([data-variant="filled"][data-theme="light"]) .cb-btn:hover { | ||
| border-color: #D6D3D1; | ||
| box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); | ||
| } | ||
| :host([data-variant="filled"][data-theme="light"]) .cb-btn:active { | ||
| background: #FAFAF9; | ||
| transform: scale(0.98); | ||
| } | ||
| :host([data-variant="outline"][data-theme="branded"]) .cb-btn { | ||
| background: transparent; | ||
| border-color: ${t}; | ||
| color: ${t}; | ||
| } | ||
| :host([data-variant="outline"][data-theme="branded"]) .cb-btn:hover { | ||
| background: ${t}14; | ||
| box-shadow: 0 2px 8px ${t}26; | ||
| } | ||
| :host([data-variant="outline"][data-theme="branded"]) .cb-btn:active { | ||
| background: ${t}24; | ||
| transform: scale(0.98); | ||
| } | ||
| :host([data-variant="outline"][data-theme="branded-alt"]) .cb-btn { | ||
| background: transparent; | ||
| border-color: #6B5CE7; | ||
| color: #6B5CE7; | ||
| } | ||
| :host([data-variant="outline"][data-theme="branded-alt"]) .cb-btn:hover { | ||
| background: rgba(107, 92, 231, 0.08); | ||
| box-shadow: 0 2px 8px rgba(107, 92, 231, 0.15); | ||
| } | ||
| :host([data-variant="outline"][data-theme="branded-alt"]) .cb-btn:active { | ||
| background: rgba(107, 92, 231, 0.14); | ||
| transform: scale(0.98); | ||
| } | ||
| :host([data-variant="outline"][data-theme="dark"]) .cb-btn { | ||
| background: transparent; | ||
| border-color: #57534E; | ||
| color: #F5F0EB; | ||
| } | ||
| :host([data-variant="outline"][data-theme="dark"]) .cb-btn:hover { | ||
| border-color: ${t}; | ||
| background: ${t}14; | ||
| } | ||
| :host([data-variant="outline"][data-theme="dark"]) .cb-btn:active { | ||
| background: ${t}24; | ||
| transform: scale(0.98); | ||
| } | ||
| :host([data-variant="outline"][data-theme="light"]) .cb-btn { | ||
| background: transparent; | ||
| border-color: #D6D3D1; | ||
| color: #1C1917; | ||
| } | ||
| :host([data-variant="outline"][data-theme="light"]) .cb-btn:hover { | ||
| border-color: ${t}; | ||
| background: ${t}0D; | ||
| } | ||
| :host([data-variant="outline"][data-theme="light"]) .cb-btn:active { | ||
| background: ${t}1A; | ||
| transform: scale(0.98); | ||
| } | ||
| :host([data-variant="ghost"]) .cb-btn { | ||
| background: transparent; | ||
| border-color: transparent; | ||
| } | ||
| :host([data-variant="ghost"][data-theme="branded"]) .cb-btn { | ||
| color: ${t}; | ||
| } | ||
| :host([data-variant="ghost"][data-theme="branded"]) .cb-btn:hover { | ||
| background: ${t}1A; | ||
| } | ||
| :host([data-variant="ghost"][data-theme="branded"]) .cb-btn:active { | ||
| background: ${t}29; | ||
| transform: scale(0.98); | ||
| } | ||
| :host([data-variant="ghost"][data-theme="branded-alt"]) .cb-btn { | ||
| color: #6B5CE7; | ||
| } | ||
| :host([data-variant="ghost"][data-theme="branded-alt"]) .cb-btn:hover { | ||
| background: rgba(107, 92, 231, 0.1); | ||
| } | ||
| :host([data-variant="ghost"][data-theme="branded-alt"]) .cb-btn:active { | ||
| background: rgba(107, 92, 231, 0.16); | ||
| transform: scale(0.98); | ||
| } | ||
| :host([data-variant="ghost"][data-theme="dark"]) .cb-btn { | ||
| color: #F5F0EB; | ||
| } | ||
| :host([data-variant="ghost"][data-theme="dark"]) .cb-btn:hover { | ||
| background: rgba(255, 255, 255, 0.06); | ||
| } | ||
| :host([data-variant="ghost"][data-theme="dark"]) .cb-btn:active { | ||
| background: rgba(255, 255, 255, 0.1); | ||
| transform: scale(0.98); | ||
| } | ||
| :host([data-variant="ghost"][data-theme="light"]) .cb-btn { | ||
| color: #1C1917; | ||
| } | ||
| :host([data-variant="ghost"][data-theme="light"]) .cb-btn:hover { | ||
| background: rgba(0, 0, 0, 0.04); | ||
| } | ||
| :host([data-variant="ghost"][data-theme="light"]) .cb-btn:active { | ||
| background: rgba(0, 0, 0, 0.08); | ||
| transform: scale(0.98); | ||
| } | ||
| .cb-btn:focus-visible { | ||
| outline: 2px solid var(--cb-focus-color, ${t}); | ||
| outline-offset: 2px; | ||
| } | ||
| .cb-btn-icon { | ||
| width: var(--cb-icon-size); | ||
| height: var(--cb-icon-size); | ||
| flex-shrink: 0; | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| } | ||
| .cb-btn-icon svg { width: 100%; height: 100%; } | ||
| :host([data-variant="filled"][data-theme="branded"]) .cb-btn-icon, | ||
| :host([data-variant="filled"][data-theme="branded-alt"]) .cb-btn-icon { | ||
| color: #FFFFFF; | ||
| --cb-icon-accent: rgba(255,255,255,0.2); | ||
| } | ||
| :host([data-variant="filled"][data-theme="dark"]) .cb-btn-icon { | ||
| color: var(--cb-accent-color, ${t}); | ||
| --cb-icon-accent: #1C1917; | ||
| } | ||
| :host([data-variant="filled"][data-theme="light"]) .cb-btn-icon { | ||
| color: var(--cb-accent-color, ${t}); | ||
| --cb-icon-accent: #FFFFFF; | ||
| } | ||
| :host([data-variant="outline"]) .cb-btn-icon, | ||
| :host([data-variant="ghost"]) .cb-btn-icon { | ||
| color: var(--cb-accent-color, ${t}); | ||
| } | ||
| .cb-btn-label { | ||
| letter-spacing: -0.01em; | ||
| } | ||
| `}function Z(t){let r=K(t.brandColor,t.brandColorHover,t.brandColorActive),e=f(t.id);class o extends HTMLElement{constructor(){super();this._options={command:"",theme:"branded",size:"md",variant:"filled",popup:!0,promptFlag:!0};this._mqCleanup=null;this._rendered=!1;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"),n=this.getAttribute("size"),c=this.getAttribute("variant"),d=this.getAttribute("shape"),u=this.getAttribute("popup"),b=this.getAttribute("prompt-flag"),m=this.getAttribute("popup-title"),g=this.getAttribute("popup-description");a!==null&&(this._options.command=a),s&&(this._options.theme=s),n&&(this._options.size=n),c&&(this._options.variant=c),d&&(this._options.shape=d),u!==null&&(this._options.popup=u!=="false"),b!==null&&(this._options.promptFlag=b!=="false"),m!==null&&(this._options.popupTitle=m),g!==null&&(this._options.popupDescription=g)}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!==!1?this.setAttribute("aria-haspopup","dialog"):this.removeAttribute("aria-haspopup");let n=this.querySelector("a[data-cb-crawl]");n||(n=document.createElement("a"),n.setAttribute("data-cb-crawl",""),n.setAttribute("aria-hidden","true"),n.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;",this.appendChild(n)),n.textContent=`Run on ${t.name}: ${a}`,n.setAttribute("data-platform",t.id),n.setAttribute("data-command",a),n.setAttribute("data-full-command",s),n.href=`${t.urlBase}?command=${encodeURIComponent(s)}`}getResolvedTheme(){return this._options.theme||"branded"}getFullCommand(){let{command:a,promptFlag:s}=this._options;return s===!1?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,n=this._options.variant||"filled",c=h(a,t.id),d=this._options.size||"md",u=this._options.shape||"rounded",b=$[d],m=B[u][d];this.setAttribute("data-theme",s),this.setAttribute("data-variant",n);let g=n!=="filled"?"transparent":c.bg,H=n==="ghost"?"transparent":n==="outline"?c.primary:c.border,L=n!=="filled"?c.primary:c.text;this.shadowRoot.innerHTML=` | ||
| <style>${r}</style> | ||
| <button | ||
| class="cb-btn" | ||
| type="button" | ||
| style=" | ||
| ${x(c)} | ||
| --cb-bg: ${g}; | ||
| --cb-border: ${H}; | ||
| --cb-text: ${L}; | ||
| --cb-accent-color: ${c.primary}; | ||
| --cb-focus-color: ${c.primary}; | ||
| --cb-height: ${b.height}; | ||
| --cb-font-size: ${b.fontSize}; | ||
| --cb-icon-size: ${b.iconSize}; | ||
| --cb-padding: ${b.padding}; | ||
| --cb-gap: ${b.gap}; | ||
| --cb-radius: ${m}; | ||
| " | ||
| aria-label="Run on ${t.name}: ${this._options.command.replace(/"/g,""")}" | ||
| > | ||
| <span class="cb-btn-icon" aria-hidden="true">${e}</span> | ||
| <span class="cb-btn-label">Run on ${t.name}</span> | ||
| </button> | ||
| `;let F=this.shadowRoot.querySelector(".cb-btn");F.addEventListener("click",()=>this.handleClick()),F.addEventListener("keydown",v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),this.handleClick())}),this._rendered=!0,this.setupSystemThemeWatch()}handleClick(){let{popup:a,command:s,popupTitle:n,popupDescription:c}=this._options,d=this.getFullCommand();if(this.dispatchEvent(new CustomEvent("cb-open",{bubbles:!0,composed:!0,detail:{command:s,fullCommand:d,harness:t.id}})),a===!1){navigator.clipboard.writeText(d).then(()=>{this._options.onCopy?.(d),C(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:!0,composed:!0,detail:{command:d,harness:t.id}}))});return}M({harnessId:t.id,theme:this.getResolvedTheme(),title:n||`Run on ${t.name}`,description:c||`Execute this command in your terminal to get started with ${t.name}.`,command:s,fullCommand:d,onCopy:u=>{this._options.onCopy?.(u),C(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:!0,composed:!0,detail:{command:u,harness:t.id}}))},onClose:()=>{this.dispatchEvent(new CustomEvent("cb-close",{bubbles:!0,composed:!0,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 E={};function G(t){return E[t]||(E[t]=Z(p[t])),E[t]}function J(t,r){if(typeof customElements>"u")return;let e=r||p[t].tagName;customElements.get(e)||customElements.define(e,G(t))}function X(){S.forEach(t=>J(t))}function ft(t,r){let e=p[t].tagName,o=document.createElement(e);return o.options=r,o}X();export{ft as createButton,Z as createClawButtonClass,G as getButtonClass,X as registerAllButtons,J as registerHarnessButton}; | ||
| //# sourceMappingURL=claw-button-TUCU7DC6.mjs.map |
| {"version":3,"sources":["../src/agent-preferences.ts","../src/icons.ts","../src/harness-config.ts","../src/themes.ts","../src/popup-dialog.ts","../src/claw-button.ts"],"sourcesContent":["/**\n * Cross-site preference cookie for the agentbuttons family (same origin).\n * Name and JSON shape must match claudebuttons, hermesbuttons, and agentbuttons.\n */\nexport const AGENT_PREFERENCES_COOKIE_NAME = 'agentpreferences';\n\nexport const MAX_AGENT_PREFERENCE_ENTRIES = 24;\n\nexport interface AgentPreferencesPayload {\n /** Most recently used agent ids first. */\n order: string[];\n}\n\nfunction isBrowser(): boolean {\n return typeof document !== 'undefined';\n}\n\nexport function readAgentPreferences(): AgentPreferencesPayload | null {\n if (!isBrowser()) return null;\n const match = document.cookie\n .split(';')\n .map((p) => p.trim())\n .find((p) => p.startsWith(`${AGENT_PREFERENCES_COOKIE_NAME}=`));\n if (!match) return null;\n const value = match.slice(AGENT_PREFERENCES_COOKIE_NAME.length + 1);\n if (!value) return null;\n try {\n const decoded = decodeURIComponent(value);\n const data = JSON.parse(decoded) as unknown;\n if (!data || typeof data !== 'object' || !Array.isArray((data as AgentPreferencesPayload).order)) {\n return null;\n }\n const order = (data as AgentPreferencesPayload).order.filter(\n (x): x is string => typeof x === 'string' && x.length > 0,\n );\n return { order };\n } catch {\n return null;\n }\n}\n\nexport function writeAgentPreferences(payload: AgentPreferencesPayload): void {\n if (!isBrowser()) return;\n const order = payload.order.slice(0, MAX_AGENT_PREFERENCE_ENTRIES);\n const json = JSON.stringify({ order });\n const expires = new Date();\n expires.setFullYear(expires.getFullYear() + 1);\n document.cookie = `${AGENT_PREFERENCES_COOKIE_NAME}=${encodeURIComponent(json)}; Path=/; SameSite=Lax; Expires=${expires.toUTCString()}`;\n}\n\n/** Move agentId to the front of the MRU list (call after a successful copy / engagement). */\nexport function recordAgentPreference(agentId: string): void {\n if (!agentId || typeof agentId !== 'string') return;\n const prev = readAgentPreferences();\n const base = prev?.order.filter((id) => id !== agentId) ?? [];\n writeAgentPreferences({ order: [agentId, ...base] });\n}\n","import type { HarnessId } from './types';\n\nexport const OPENCLAW_ICON = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"cb-icon\">\n <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\"/>\n <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\"/>\n <path d=\"M12 2v4M9.5 7.5L12 6l2.5 1.5\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <circle cx=\"12\" cy=\"12\" r=\"4\" fill=\"currentColor\" opacity=\"0.2\"/>\n <circle cx=\"12\" cy=\"12\" r=\"2\" fill=\"currentColor\"/>\n</svg>`;\n\nexport const HERMES_ICON = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"cb-icon\">\n <path d=\"M12 2L4 6v6c0 5.25 3.4 10.2 8 12 4.6-1.8 8-6.75 8-12V6l-8-4z\" fill=\"currentColor\" opacity=\"0.15\"/>\n <path d=\"M12 2L4 6v6c0 5.25 3.4 10.2 8 12 4.6-1.8 8-6.75 8-12V6l-8-4z\" stroke=\"currentColor\" stroke-width=\"1.6\" fill=\"none\"/>\n <path d=\"M8 11h8M12 8v8\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n <circle cx=\"12\" cy=\"7\" r=\"1.2\" fill=\"currentColor\"/>\n</svg>`;\n\nexport const IRONCLAW_ICON = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"cb-icon\">\n <rect x=\"4\" y=\"4\" width=\"16\" height=\"16\" rx=\"3\" fill=\"currentColor\" opacity=\"0.15\"/>\n <rect x=\"4\" y=\"4\" width=\"16\" height=\"16\" rx=\"3\" stroke=\"currentColor\" stroke-width=\"1.6\" fill=\"none\"/>\n <path d=\"M8 9v6M12 8v8M16 10v4\" stroke=\"currentColor\" stroke-width=\"2.2\" stroke-linecap=\"round\"/>\n <path d=\"M4 13h16\" stroke=\"currentColor\" stroke-width=\"1.2\" opacity=\"0.4\"/>\n</svg>`;\n\nexport const NANOCLAW_ICON = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"cb-icon\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" fill=\"currentColor\" opacity=\"0.12\"/>\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.6\" fill=\"none\"/>\n <circle cx=\"12\" cy=\"12\" r=\"3.5\" fill=\"currentColor\" opacity=\"0.3\"/>\n <circle cx=\"12\" cy=\"12\" r=\"1.5\" fill=\"currentColor\"/>\n <path d=\"M12 3v3M12 18v3M3 12h3M18 12h3\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\"/>\n</svg>`;\n\nexport const ZEROCLAW_ICON = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"cb-icon\">\n <path d=\"M13 2L4.5 13.5h5L8 22l10.5-12h-5.5L15 2h-2z\" fill=\"currentColor\" opacity=\"0.2\"/>\n <path d=\"M13 2L4.5 13.5h5L8 22l10.5-12h-5.5L15 2h-2z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"/>\n <path d=\"M11.5 9l-1 4h3l-1 4\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>`;\n\nexport const OPENHARNESS_ICON = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"cb-icon\">\n <path d=\"M12 3L3 8v8l9 5 9-5V8l-9-5z\" fill=\"currentColor\" opacity=\"0.12\"/>\n <path d=\"M12 3L3 8v8l9 5 9-5V8l-9-5z\" stroke=\"currentColor\" stroke-width=\"1.6\" fill=\"none\" stroke-linejoin=\"round\"/>\n <path d=\"M12 13V8M9 10.5l3 2.5 3-2.5\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <circle cx=\"12\" cy=\"16\" r=\"1.3\" fill=\"currentColor\"/>\n</svg>`;\n\nexport const CLAUDECLAW_ICON = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"cb-icon\">\n <rect x=\"3.5\" y=\"1.5\" width=\"5\" height=\"5\" rx=\"1.5\" fill=\"currentColor\"/>\n <rect x=\"15.5\" y=\"1.5\" width=\"5\" height=\"5\" rx=\"1.5\" fill=\"currentColor\"/>\n <rect x=\"2.5\" y=\"5.5\" width=\"19\" height=\"13\" rx=\"3\" fill=\"currentColor\"/>\n <ellipse cx=\"9\" cy=\"11.5\" rx=\"2\" ry=\"2.5\" fill=\"white\" opacity=\"0.95\"/>\n <ellipse cx=\"15\" cy=\"11.5\" rx=\"2\" ry=\"2.5\" fill=\"white\" opacity=\"0.95\"/>\n <ellipse cx=\"9.6\" cy=\"12\" rx=\"1\" ry=\"1.2\" fill=\"#1C1917\"/>\n <ellipse cx=\"15.6\" cy=\"12\" rx=\"1\" ry=\"1.2\" fill=\"#1C1917\"/>\n <rect x=\"6.5\" y=\"18.5\" width=\"4\" height=\"3.5\" rx=\"1.5\" fill=\"currentColor\"/>\n <rect x=\"13.5\" y=\"18.5\" width=\"4\" height=\"3.5\" rx=\"1.5\" fill=\"currentColor\"/>\n</svg>`;\n\nconst ICON_MAP: Record<HarnessId, string> = {\n openclaw: OPENCLAW_ICON,\n hermes: HERMES_ICON,\n ironclaw: IRONCLAW_ICON,\n nanoclaw: NANOCLAW_ICON,\n zeroclaw: ZEROCLAW_ICON,\n openharness: OPENHARNESS_ICON,\n claudeclaw: CLAUDECLAW_ICON,\n};\n\nexport function getIcon(harnessId: HarnessId): string {\n return ICON_MAP[harnessId];\n}\n\nexport const COPY_ICON = `<svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"cb-icon-sm\">\n <rect x=\"5\" y=\"5\" width=\"8\" height=\"8\" rx=\"1.5\" stroke=\"currentColor\" stroke-width=\"1.5\" fill=\"none\"/>\n <path d=\"M3 10V3.5A1.5 1.5 0 014.5 2H10\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"/>\n</svg>`;\n\nexport const CHECK_ICON = `<svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"cb-icon-sm\">\n <path d=\"M3 8.5l3.5 3.5L13 4\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>`;\n\nexport const CLOSE_ICON = `<svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"cb-icon-sm\">\n <path d=\"M4 4l8 8m0-8l-8 8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"/>\n</svg>`;\n\nexport const TERMINAL_ICON = `<svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"cb-icon-sm\">\n <rect x=\"1\" y=\"2\" width=\"14\" height=\"12\" rx=\"2\" stroke=\"currentColor\" stroke-width=\"1.5\" fill=\"none\"/>\n <path d=\"M4 6l3 2.5L4 11\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M9 11h3\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"/>\n</svg>`;\n","import type { HarnessConfig, HarnessId } from './types';\n\nexport const HARNESSES: Record<HarnessId, HarnessConfig> = {\n openclaw: {\n id: 'openclaw',\n name: 'OpenClaw',\n tagName: 'openclaw-button',\n brandColor: '#E74C3C',\n brandColorHover: '#CF4436',\n brandColorActive: '#B83C30',\n cliPrefix: 'openclaw -p',\n urlBase: 'https://openclaw.ai/run',\n description: 'The dominant open-source AI agent platform with 200k+ stars, multi-channel support, and ClawMart skill marketplace.',\n },\n hermes: {\n id: 'hermes',\n name: 'Hermes',\n tagName: 'hermes-button',\n /** Aligned with hermesbuttons / Hermes Agent (Nous) marketing — electric blue */\n brandColor: '#2B8CFF',\n brandColorHover: '#1E7AEB',\n brandColorActive: '#186BD4',\n cliPrefix: 'hermes -p',\n urlBase: 'https://hermes.ai/run',\n description: 'Persistent personal agent optimized for long-term memory, self-created reusable skills, and research-heavy workflows.',\n },\n ironclaw: {\n id: 'ironclaw',\n name: 'IronClaw',\n tagName: 'ironclaw-button',\n brandColor: '#5D6D7E',\n brandColorHover: '#516070',\n brandColorActive: '#475564',\n cliPrefix: 'ironclaw agent',\n urlBase: 'https://ironclaw.dev/run',\n description: 'Rust-based privacy-first AI assistant with WASM sandboxes, encrypted credentials, and MCP protocol support.',\n },\n nanoclaw: {\n id: 'nanoclaw',\n name: 'NanoClaw',\n tagName: 'nanoclaw-button',\n brandColor: '#1ABC9C',\n brandColorHover: '#17A78A',\n brandColorActive: '#14947A',\n cliPrefix: 'claw',\n urlBase: 'https://nanoclaw.dev/run',\n description: 'Minimalist container-based agent (~500 lines of TypeScript) with OS-enforced isolation and Docker sandboxing.',\n },\n zeroclaw: {\n id: 'zeroclaw',\n name: 'ZeroClaw',\n tagName: 'zeroclaw-button',\n brandColor: '#E67E22',\n brandColorHover: '#CF711E',\n brandColorActive: '#BA651B',\n cliPrefix: 'zeroclaw agent',\n urlBase: 'https://zeroclaw.io/run',\n description: 'Rust-based with WASM sandbox, 14x faster than OpenClaw, 38MB memory footprint, and encrypted credential storage.',\n },\n openharness: {\n id: 'openharness',\n name: 'OpenHarness',\n tagName: 'openharness-button',\n brandColor: '#27AE60',\n brandColorHover: '#229A54',\n brandColorActive: '#1E8A4B',\n cliPrefix: 'oh',\n urlBase: 'https://openharness.dev/run',\n description: 'Lightweight Python agent harness (44x lighter than Claude Code) with 43 tools, streaming tool-calls, and subagent spawning.',\n },\n claudeclaw: {\n id: 'claudeclaw',\n name: 'ClaudeClaw',\n tagName: 'claudeclaw-button',\n brandColor: '#D4795C',\n brandColorHover: '#C06A4E',\n brandColorActive: '#B35E43',\n cliPrefix: 'claudeclaw',\n urlBase: 'https://claudeclaw.dev/run',\n description: 'Lightweight open-source wrapper around Claude Code with daemon mode, Telegram/Discord support, and web dashboard.',\n },\n};\n\nexport const HARNESS_IDS = Object.keys(HARNESSES) as HarnessId[];\n\nexport function getHarness(id: HarnessId): HarnessConfig {\n return HARNESSES[id];\n}\n","import type { ThemeTokens, Theme, HarnessId } from './types';\nimport { HARNESSES } from './harness-config';\n\nexport const DEFAULT_BRAND_COLOR = '#E74C3C';\n\nexport function getBrandColor(harnessId: HarnessId): string {\n return HARNESSES[harnessId].brandColor;\n}\n\nexport function getBrandColorHover(harnessId: HarnessId): string {\n return HARNESSES[harnessId].brandColorHover;\n}\n\nexport function getBrandColorActive(harnessId: HarnessId): string {\n return HARNESSES[harnessId].brandColorActive;\n}\n\nexport function getThemes(harnessId: HarnessId): Record<Exclude<Theme, 'system'>, ThemeTokens> {\n const brand = getBrandColor(harnessId);\n return {\n branded: {\n bg: brand,\n text: '#FFFFFF',\n border: 'transparent',\n surface: '#FFFFFF',\n surfaceText: '#1C1917',\n muted: '#78716C',\n primary: brand,\n primaryText: '#FFFFFF',\n codeBg: '#1C1917',\n codeText: '#F5F0EB',\n },\n 'branded-alt': {\n bg: '#6B5CE7',\n text: '#FFFFFF',\n border: 'transparent',\n surface: '#FFFFFF',\n surfaceText: '#1C1917',\n muted: '#78716C',\n primary: '#6B5CE7',\n primaryText: '#FFFFFF',\n codeBg: '#1C1917',\n codeText: '#F5F0EB',\n },\n dark: {\n bg: '#1C1917',\n text: '#F5F0EB',\n border: '#3D3530',\n surface: '#292524',\n surfaceText: '#F5F0EB',\n muted: '#A8A29E',\n primary: brand,\n primaryText: '#FFFFFF',\n codeBg: '#0C0A09',\n codeText: '#F5F0EB',\n },\n light: {\n bg: '#FFFFFF',\n text: '#1C1917',\n border: '#E7E5E4',\n surface: '#FAFAF9',\n surfaceText: '#1C1917',\n muted: '#78716C',\n primary: brand,\n primaryText: '#FFFFFF',\n codeBg: '#1C1917',\n codeText: '#F5F0EB',\n },\n };\n}\n\nexport function resolveTheme(theme: Theme, harnessId: HarnessId): ThemeTokens {\n const themes = getThemes(harnessId);\n if (theme !== 'system') return themes[theme];\n if (typeof window === 'undefined') return themes.light;\n return window.matchMedia('(prefers-color-scheme: dark)').matches\n ? themes.dark\n : themes.light;\n}\n\nexport function themeToCSS(tokens: ThemeTokens): string {\n return `\n --cb-bg: ${tokens.bg};\n --cb-text: ${tokens.text};\n --cb-border: ${tokens.border};\n --cb-surface: ${tokens.surface};\n --cb-surface-text: ${tokens.surfaceText};\n --cb-muted: ${tokens.muted};\n --cb-primary: ${tokens.primary};\n --cb-primary-text: ${tokens.primaryText};\n --cb-code-bg: ${tokens.codeBg};\n --cb-code-text: ${tokens.codeText};\n `;\n}\n\nexport const SHAPE_MAP = {\n rounded: { sm: '0.375rem', md: '0.5rem', lg: '0.625rem' },\n pill: { sm: '999px', md: '999px', lg: '999px' },\n square: { sm: '0', md: '0', lg: '0' },\n} as const;\n\nexport const SIZE_MAP = {\n sm: { height: '2rem', fontSize: '0.75rem', iconSize: '0.875rem', padding: '0 0.75rem', gap: '0.375rem', radius: '0.375rem' },\n md: { height: '2.5rem', fontSize: '0.875rem', iconSize: '1.125rem', padding: '0 1rem', gap: '0.5rem', radius: '0.5rem' },\n lg: { height: '3rem', fontSize: '1rem', iconSize: '1.375rem', padding: '0 1.25rem', gap: '0.625rem', radius: '0.625rem' },\n};\n","import type { PopupOptions, ThemeTokens, HarnessId } from './types';\nimport { getIcon, COPY_ICON, CHECK_ICON, CLOSE_ICON } from './icons';\nimport { resolveTheme, themeToCSS, getBrandColorHover } from './themes';\nimport { HARNESSES } from './harness-config';\n\nconst POPUP_STYLES = `\n :host {\n position: fixed;\n inset: 0;\n z-index: 999999;\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n }\n\n * { box-sizing: border-box; margin: 0; padding: 0; }\n\n .cb-backdrop {\n position: absolute;\n inset: 0;\n background: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(4px);\n -webkit-backdrop-filter: blur(4px);\n animation: cb-fade-in 0.15s ease-out;\n }\n\n .cb-dialog {\n position: relative;\n width: 90%;\n max-width: 460px;\n background: var(--cb-surface);\n color: var(--cb-surface-text);\n border-radius: 16px;\n box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px var(--cb-border);\n overflow: hidden;\n animation: cb-scale-in 0.2s ease-out;\n }\n\n .cb-dialog-header {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 20px 24px 16px;\n border-bottom: 1px solid var(--cb-border);\n }\n\n .cb-dialog-header-icon {\n width: 36px;\n height: 36px;\n color: var(--cb-primary);\n flex-shrink: 0;\n }\n\n .cb-dialog-header-text {\n flex: 1;\n min-width: 0;\n }\n\n .cb-dialog-title {\n font-size: 16px;\n font-weight: 600;\n line-height: 1.3;\n color: var(--cb-surface-text);\n }\n\n .cb-dialog-description {\n font-size: 13px;\n color: var(--cb-muted);\n margin-top: 2px;\n line-height: 1.4;\n }\n\n .cb-dialog-close {\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n background: transparent;\n color: var(--cb-muted);\n cursor: pointer;\n border-radius: 8px;\n flex-shrink: 0;\n transition: background 0.15s, color 0.15s;\n }\n\n .cb-dialog-close:hover {\n background: var(--cb-border);\n color: var(--cb-surface-text);\n }\n\n .cb-dialog-close svg { width: 14px; height: 14px; }\n\n .cb-dialog-body { padding: 20px 24px; }\n\n .cb-step {\n display: flex;\n gap: 12px;\n margin-bottom: 16px;\n }\n\n .cb-step:last-child { margin-bottom: 0; }\n\n .cb-step-num {\n width: 24px;\n height: 24px;\n border-radius: 50%;\n background: var(--cb-primary);\n color: var(--cb-primary-text);\n font-size: 12px;\n font-weight: 600;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n margin-top: 1px;\n }\n\n .cb-step-content {\n flex: 1;\n min-width: 0;\n }\n\n .cb-step-label {\n font-size: 13px;\n font-weight: 500;\n color: var(--cb-surface-text);\n margin-bottom: 8px;\n line-height: 1.4;\n }\n\n .cb-code-block {\n display: flex;\n align-items: center;\n background: var(--cb-code-bg);\n color: var(--cb-code-text);\n border-radius: 10px;\n padding: 2px 2px 2px 14px;\n font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, 'Liberation Mono', Menlo, monospace;\n font-size: 13px;\n line-height: 1.5;\n gap: 8px;\n overflow: hidden;\n }\n\n .cb-code-text {\n flex: 1;\n overflow-x: auto;\n white-space: nowrap;\n padding: 10px 0;\n scrollbar-width: none;\n }\n\n .cb-code-text::-webkit-scrollbar { display: none; }\n\n .cb-code-prefix {\n color: var(--cb-muted);\n user-select: none;\n margin-right: 6px;\n }\n\n .cb-copy-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n height: 36px;\n min-width: 36px;\n padding: 0 12px;\n border: none;\n background: var(--cb-primary);\n color: var(--cb-primary-text);\n cursor: pointer;\n border-radius: 8px;\n font-family: inherit;\n font-size: 12px;\n font-weight: 500;\n flex-shrink: 0;\n transition: background 0.15s, transform 0.1s;\n white-space: nowrap;\n }\n\n .cb-copy-btn:hover { filter: brightness(0.9); }\n .cb-copy-btn:active { transform: scale(0.96); }\n .cb-copy-btn svg { width: 14px; height: 14px; }\n\n .cb-copy-btn[data-copied=\"true\"] {\n background: #16a34a;\n }\n\n .cb-dialog-footer {\n padding: 16px 24px 20px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n }\n\n .cb-hint {\n font-size: 12px;\n color: var(--cb-muted);\n text-align: center;\n line-height: 1.4;\n }\n\n .cb-hint kbd {\n display: inline-block;\n padding: 1px 5px;\n font-family: inherit;\n font-size: 11px;\n background: var(--cb-border);\n border-radius: 4px;\n border: 1px solid var(--cb-border);\n }\n\n @keyframes cb-fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n\n @keyframes cb-scale-in {\n from { opacity: 0; transform: scale(0.95) translateY(8px); }\n to { opacity: 1; transform: scale(1) translateY(0); }\n }\n\n @media (max-width: 480px) {\n .cb-dialog {\n width: 96%;\n max-width: none;\n border-radius: 14px;\n max-height: 90dvh;\n overflow-y: auto;\n overscroll-behavior: contain;\n }\n\n .cb-dialog-header { padding: 16px 16px 12px; gap: 10px; }\n .cb-dialog-header-icon { width: 28px; height: 28px; }\n .cb-dialog-body { padding: 16px; }\n .cb-dialog-footer { padding: 12px 16px 16px; }\n\n .cb-step { gap: 10px; margin-bottom: 14px; }\n .cb-step-num { width: 22px; height: 22px; font-size: 11px; }\n .cb-step-label { font-size: 12px; margin-bottom: 6px; }\n\n .cb-code-block { font-size: 12px; padding: 2px 2px 2px 10px; border-radius: 8px; }\n .cb-copy-btn { height: 32px; padding: 0 10px; font-size: 11px; border-radius: 6px; }\n .cb-hint { font-size: 11px; }\n }\n\n @media (max-width: 360px) {\n .cb-dialog { width: 100%; border-radius: 12px 12px 0 0; align-self: flex-end; }\n .cb-copy-btn span { display: none; }\n .cb-copy-btn { min-width: 32px; padding: 0 8px; }\n }\n\n @supports (padding: env(safe-area-inset-bottom)) {\n .cb-dialog-footer { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }\n }\n`;\n\nexport class ClawPopupDialog extends HTMLElement {\n private _options!: PopupOptions;\n private _mqCleanup: (() => void) | null = null;\n\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n\n set options(opts: PopupOptions) {\n this._options = opts;\n this.render();\n }\n\n get options() {\n return this._options;\n }\n\n disconnectedCallback() {\n this._mqCleanup?.();\n this._mqCleanup = null;\n }\n\n private resolvePopupTokens(): ThemeTokens {\n const { theme, harnessId } = this._options;\n\n if (theme === 'dark' || theme === 'light') return resolveTheme(theme, harnessId);\n\n const prefersDark = typeof window !== 'undefined'\n && window.matchMedia('(prefers-color-scheme: dark)').matches;\n\n if (theme === 'system') {\n return prefersDark ? resolveTheme('dark', harnessId) : resolveTheme('light', harnessId);\n }\n\n const base = prefersDark ? resolveTheme('dark', harnessId) : resolveTheme('light', harnessId);\n const brand = resolveTheme(theme, harnessId);\n return {\n ...base,\n primary: brand.primary,\n primaryText: brand.primaryText,\n };\n }\n\n private render() {\n if (!this.shadowRoot || !this._options) return;\n\n const { harnessId, title, description, command, fullCommand } = this._options;\n const tokens = this.resolvePopupTokens();\n const icon = getIcon(harnessId);\n const harnessName = HARNESSES[harnessId].name;\n\n const displayCommand = fullCommand || command;\n\n this.shadowRoot.innerHTML = `\n <style>${POPUP_STYLES}</style>\n <div style=\"${themeToCSS(tokens)}\">\n <div class=\"cb-backdrop\" data-action=\"close\"></div>\n <div class=\"cb-dialog\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"cb-dialog-title\">\n <div class=\"cb-dialog-header\">\n <div class=\"cb-dialog-header-icon\">${icon}</div>\n <div class=\"cb-dialog-header-text\">\n <div class=\"cb-dialog-title\" id=\"cb-dialog-title\">${title}</div>\n ${description ? `<div class=\"cb-dialog-description\">${description}</div>` : ''}\n </div>\n <button class=\"cb-dialog-close\" data-action=\"close\" aria-label=\"Close\">${CLOSE_ICON}</button>\n </div>\n <div class=\"cb-dialog-body\">\n ${this.renderCommandBody(displayCommand)}\n </div>\n <div class=\"cb-dialog-footer\">\n <div class=\"cb-hint\">Press <kbd>⌘</kbd>+<kbd>V</kbd> or <kbd>Ctrl</kbd>+<kbd>V</kbd> in your terminal to run</div>\n </div>\n </div>\n </div>\n `;\n\n this.setupListeners();\n this.setupSystemThemeWatch();\n }\n\n private renderCommandBody(command: string): string {\n return `\n <div class=\"cb-step\">\n <div class=\"cb-step-num\">1</div>\n <div class=\"cb-step-content\">\n <div class=\"cb-step-label\">Copy this command to your clipboard</div>\n <div class=\"cb-code-block\">\n <div class=\"cb-code-text\"><span class=\"cb-code-prefix\">$</span>${this.escapeHtml(command)}</div>\n <button class=\"cb-copy-btn\" data-action=\"copy\" data-command=\"${this.escapeAttr(command)}\">${COPY_ICON}<span>Copy</span></button>\n </div>\n </div>\n </div>\n <div class=\"cb-step\">\n <div class=\"cb-step-num\">2</div>\n <div class=\"cb-step-content\">\n <div class=\"cb-step-label\">Paste and run in your terminal</div>\n </div>\n </div>\n `;\n }\n\n private setupListeners() {\n if (!this.shadowRoot) return;\n\n this.shadowRoot.addEventListener('click', (e) => {\n const target = (e.target as HTMLElement).closest('[data-action]') as HTMLElement | null;\n if (!target) return;\n\n const action = target.dataset.action;\n\n if (action === 'close') {\n this.close();\n } else if (action === 'copy') {\n const cmd = target.dataset.command || '';\n this.copyToClipboard(cmd, target);\n }\n });\n\n this.shadowRoot.addEventListener('keydown', (e) => {\n if ((e as KeyboardEvent).key === 'Escape') this.close();\n });\n }\n\n private setupSystemThemeWatch() {\n this._mqCleanup?.();\n this._mqCleanup = null;\n\n const theme = this._options.theme;\n const needsWatch = theme === 'system' || theme === 'branded' || theme === 'branded-alt';\n if (!needsWatch || typeof window === 'undefined') return;\n\n const mq = window.matchMedia('(prefers-color-scheme: dark)');\n const handler = () => this.render();\n mq.addEventListener('change', handler);\n this._mqCleanup = () => mq.removeEventListener('change', handler);\n }\n\n private async copyToClipboard(command: string, button: HTMLElement) {\n try {\n await navigator.clipboard.writeText(command);\n const iconContainer = button;\n\n button.setAttribute('data-copied', 'true');\n iconContainer.innerHTML = `${CHECK_ICON}<span>Copied!</span>`;\n\n this._options.onCopy?.(command);\n\n setTimeout(() => {\n button.setAttribute('data-copied', 'false');\n iconContainer.innerHTML = `${COPY_ICON}<span>Copy</span>`;\n }, 2000);\n } catch {\n const textarea = document.createElement('textarea');\n textarea.value = command;\n textarea.style.position = 'fixed';\n textarea.style.opacity = '0';\n document.body.appendChild(textarea);\n textarea.select();\n document.execCommand('copy');\n document.body.removeChild(textarea);\n\n this._options.onCopy?.(command);\n }\n }\n\n close() {\n const dialog = this.shadowRoot?.querySelector('.cb-dialog') as HTMLElement;\n const backdrop = this.shadowRoot?.querySelector('.cb-backdrop') as HTMLElement;\n\n if (dialog) {\n dialog.style.animation = 'cb-scale-in 0.15s ease-in reverse';\n }\n if (backdrop) {\n backdrop.style.animation = 'cb-fade-in 0.15s ease-in reverse';\n }\n\n setTimeout(() => {\n this._options.onClose?.();\n this.remove();\n }, 140);\n }\n\n private escapeHtml(str: string): string {\n const div = document.createElement('div');\n div.textContent = str;\n return div.innerHTML;\n }\n\n private escapeAttr(str: string): string {\n return str.replace(/\"/g, '"').replace(/'/g, ''').replace(/</g, '<').replace(/>/g, '>');\n }\n}\n\nif (typeof customElements !== 'undefined' && !customElements.get('claw-popup-dialog')) {\n customElements.define('claw-popup-dialog', ClawPopupDialog);\n}\n\nexport function showPopup(options: PopupOptions): ClawPopupDialog {\n const popup = document.createElement('claw-popup-dialog') as ClawPopupDialog;\n popup.options = options;\n document.body.appendChild(popup);\n return popup;\n}\n","import type { ClawButtonOptions, Theme, Size, Variant, Shape, HarnessId, HarnessConfig } from './types';\nimport { recordAgentPreference } from './agent-preferences';\nimport { getIcon } from './icons';\nimport { resolveTheme, themeToCSS, SIZE_MAP, SHAPE_MAP, getBrandColor, getBrandColorHover, getBrandColorActive } from './themes';\nimport { showPopup } from './popup-dialog';\nimport { HARNESSES, HARNESS_IDS } from './harness-config';\n\nfunction buildButtonStyles(brandColor: string, brandColorHover: string, brandColorActive: string): string {\n return `\n :host {\n display: inline-block;\n vertical-align: middle;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n -webkit-tap-highlight-color: transparent;\n }\n\n * { box-sizing: border-box; margin: 0; padding: 0; }\n\n .cb-btn {\n display: inline-flex;\n align-items: center;\n gap: var(--cb-gap);\n height: var(--cb-height);\n min-height: 44px;\n padding: var(--cb-padding);\n border: 1.5px solid var(--cb-border);\n background: var(--cb-bg);\n color: var(--cb-text);\n font-family: inherit;\n font-size: var(--cb-font-size);\n font-weight: 600;\n line-height: 1;\n border-radius: var(--cb-radius);\n cursor: pointer;\n user-select: none;\n white-space: nowrap;\n touch-action: manipulation;\n transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease, color 0.15s ease;\n text-decoration: none;\n -webkit-font-smoothing: antialiased;\n }\n\n @media (pointer: fine) {\n .cb-btn { min-height: unset; }\n }\n\n :host([data-variant=\"filled\"][data-theme=\"branded\"]) .cb-btn,\n :host([data-variant=\"filled\"][data-theme=\"branded-alt\"]) .cb-btn {\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);\n }\n :host([data-variant=\"filled\"][data-theme=\"branded\"]) .cb-btn:hover {\n background: ${brandColorHover};\n box-shadow: 0 2px 8px ${brandColor}59;\n }\n :host([data-variant=\"filled\"][data-theme=\"branded\"]) .cb-btn:active {\n background: ${brandColorActive};\n transform: scale(0.98);\n }\n :host([data-variant=\"filled\"][data-theme=\"branded-alt\"]) .cb-btn:hover {\n background: #5A4BD6;\n box-shadow: 0 2px 8px rgba(107, 92, 231, 0.35);\n }\n :host([data-variant=\"filled\"][data-theme=\"branded-alt\"]) .cb-btn:active {\n background: #4F41C8;\n transform: scale(0.98);\n }\n\n :host([data-variant=\"filled\"][data-theme=\"dark\"]) .cb-btn {\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);\n }\n :host([data-variant=\"filled\"][data-theme=\"dark\"]) .cb-btn:hover {\n background: #292524;\n border-color: #57534E;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);\n }\n :host([data-variant=\"filled\"][data-theme=\"dark\"]) .cb-btn:active {\n background: #1C1917;\n transform: scale(0.98);\n }\n\n :host([data-variant=\"filled\"][data-theme=\"light\"]) .cb-btn {\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);\n }\n :host([data-variant=\"filled\"][data-theme=\"light\"]) .cb-btn:hover {\n border-color: #D6D3D1;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);\n }\n :host([data-variant=\"filled\"][data-theme=\"light\"]) .cb-btn:active {\n background: #FAFAF9;\n transform: scale(0.98);\n }\n\n :host([data-variant=\"outline\"][data-theme=\"branded\"]) .cb-btn {\n background: transparent;\n border-color: ${brandColor};\n color: ${brandColor};\n }\n :host([data-variant=\"outline\"][data-theme=\"branded\"]) .cb-btn:hover {\n background: ${brandColor}14;\n box-shadow: 0 2px 8px ${brandColor}26;\n }\n :host([data-variant=\"outline\"][data-theme=\"branded\"]) .cb-btn:active {\n background: ${brandColor}24;\n transform: scale(0.98);\n }\n\n :host([data-variant=\"outline\"][data-theme=\"branded-alt\"]) .cb-btn {\n background: transparent;\n border-color: #6B5CE7;\n color: #6B5CE7;\n }\n :host([data-variant=\"outline\"][data-theme=\"branded-alt\"]) .cb-btn:hover {\n background: rgba(107, 92, 231, 0.08);\n box-shadow: 0 2px 8px rgba(107, 92, 231, 0.15);\n }\n :host([data-variant=\"outline\"][data-theme=\"branded-alt\"]) .cb-btn:active {\n background: rgba(107, 92, 231, 0.14);\n transform: scale(0.98);\n }\n\n :host([data-variant=\"outline\"][data-theme=\"dark\"]) .cb-btn {\n background: transparent;\n border-color: #57534E;\n color: #F5F0EB;\n }\n :host([data-variant=\"outline\"][data-theme=\"dark\"]) .cb-btn:hover {\n border-color: ${brandColor};\n background: ${brandColor}14;\n }\n :host([data-variant=\"outline\"][data-theme=\"dark\"]) .cb-btn:active {\n background: ${brandColor}24;\n transform: scale(0.98);\n }\n\n :host([data-variant=\"outline\"][data-theme=\"light\"]) .cb-btn {\n background: transparent;\n border-color: #D6D3D1;\n color: #1C1917;\n }\n :host([data-variant=\"outline\"][data-theme=\"light\"]) .cb-btn:hover {\n border-color: ${brandColor};\n background: ${brandColor}0D;\n }\n :host([data-variant=\"outline\"][data-theme=\"light\"]) .cb-btn:active {\n background: ${brandColor}1A;\n transform: scale(0.98);\n }\n\n :host([data-variant=\"ghost\"]) .cb-btn {\n background: transparent;\n border-color: transparent;\n }\n\n :host([data-variant=\"ghost\"][data-theme=\"branded\"]) .cb-btn {\n color: ${brandColor};\n }\n :host([data-variant=\"ghost\"][data-theme=\"branded\"]) .cb-btn:hover {\n background: ${brandColor}1A;\n }\n :host([data-variant=\"ghost\"][data-theme=\"branded\"]) .cb-btn:active {\n background: ${brandColor}29;\n transform: scale(0.98);\n }\n\n :host([data-variant=\"ghost\"][data-theme=\"branded-alt\"]) .cb-btn {\n color: #6B5CE7;\n }\n :host([data-variant=\"ghost\"][data-theme=\"branded-alt\"]) .cb-btn:hover {\n background: rgba(107, 92, 231, 0.1);\n }\n :host([data-variant=\"ghost\"][data-theme=\"branded-alt\"]) .cb-btn:active {\n background: rgba(107, 92, 231, 0.16);\n transform: scale(0.98);\n }\n\n :host([data-variant=\"ghost\"][data-theme=\"dark\"]) .cb-btn {\n color: #F5F0EB;\n }\n :host([data-variant=\"ghost\"][data-theme=\"dark\"]) .cb-btn:hover {\n background: rgba(255, 255, 255, 0.06);\n }\n :host([data-variant=\"ghost\"][data-theme=\"dark\"]) .cb-btn:active {\n background: rgba(255, 255, 255, 0.1);\n transform: scale(0.98);\n }\n\n :host([data-variant=\"ghost\"][data-theme=\"light\"]) .cb-btn {\n color: #1C1917;\n }\n :host([data-variant=\"ghost\"][data-theme=\"light\"]) .cb-btn:hover {\n background: rgba(0, 0, 0, 0.04);\n }\n :host([data-variant=\"ghost\"][data-theme=\"light\"]) .cb-btn:active {\n background: rgba(0, 0, 0, 0.08);\n transform: scale(0.98);\n }\n\n .cb-btn:focus-visible {\n outline: 2px solid var(--cb-focus-color, ${brandColor});\n outline-offset: 2px;\n }\n\n .cb-btn-icon {\n width: var(--cb-icon-size);\n height: var(--cb-icon-size);\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .cb-btn-icon svg { width: 100%; height: 100%; }\n\n :host([data-variant=\"filled\"][data-theme=\"branded\"]) .cb-btn-icon,\n :host([data-variant=\"filled\"][data-theme=\"branded-alt\"]) .cb-btn-icon {\n color: #FFFFFF;\n --cb-icon-accent: rgba(255,255,255,0.2);\n }\n :host([data-variant=\"filled\"][data-theme=\"dark\"]) .cb-btn-icon {\n color: var(--cb-accent-color, ${brandColor});\n --cb-icon-accent: #1C1917;\n }\n :host([data-variant=\"filled\"][data-theme=\"light\"]) .cb-btn-icon {\n color: var(--cb-accent-color, ${brandColor});\n --cb-icon-accent: #FFFFFF;\n }\n\n :host([data-variant=\"outline\"]) .cb-btn-icon,\n :host([data-variant=\"ghost\"]) .cb-btn-icon {\n color: var(--cb-accent-color, ${brandColor});\n }\n\n .cb-btn-label {\n letter-spacing: -0.01em;\n }\n`;\n}\n\nexport function createClawButtonClass(harness: HarnessConfig) {\n const BUTTON_STYLES = buildButtonStyles(harness.brandColor, harness.brandColorHover, harness.brandColorActive);\n const ICON = getIcon(harness.id);\n\n class ClawButton extends HTMLElement {\n static observedAttributes = ['command', 'theme', 'size', 'variant', 'shape', 'popup', 'prompt-flag', 'popup-title', 'popup-description'];\n\n /** @internal */ _options: ClawButtonOptions = {\n command: '',\n theme: 'branded',\n size: 'md',\n variant: 'filled',\n popup: true,\n promptFlag: true,\n };\n\n /** @internal */ _mqCleanup: (() => void) | null = null;\n /** @internal */ _rendered = false;\n\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n\n connectedCallback() {\n this.syncFromAttributes();\n this.render();\n this.updateLightDOM();\n }\n\n disconnectedCallback() {\n this._mqCleanup?.();\n this._mqCleanup = null;\n }\n\n attributeChangedCallback() {\n if (!this._rendered) return;\n this.syncFromAttributes();\n this.render();\n this.updateLightDOM();\n }\n\n set options(opts: Partial<ClawButtonOptions>) {\n this._options = { ...this._options, ...opts };\n this.render();\n this.updateLightDOM();\n }\n\n get options() {\n return this._options;\n }\n\n get harnessId(): HarnessId {\n return harness.id;\n }\n\n /** @internal */ syncFromAttributes() {\n const command = this.getAttribute('command');\n const theme = this.getAttribute('theme') as Theme | null;\n const size = this.getAttribute('size') as Size | null;\n const variant = this.getAttribute('variant') as Variant | null;\n const shape = this.getAttribute('shape') as Shape | null;\n const popup = this.getAttribute('popup');\n const promptFlag = this.getAttribute('prompt-flag');\n const popupTitle = this.getAttribute('popup-title');\n const popupDescription = this.getAttribute('popup-description');\n\n if (command !== null) this._options.command = command;\n if (theme) this._options.theme = theme;\n if (size) this._options.size = size;\n if (variant) this._options.variant = variant;\n if (shape) this._options.shape = shape;\n if (popup !== null) this._options.popup = popup !== 'false';\n if (promptFlag !== null) this._options.promptFlag = promptFlag !== 'false';\n if (popupTitle !== null) this._options.popupTitle = popupTitle;\n if (popupDescription !== null) this._options.popupDescription = popupDescription;\n }\n\n /** @internal */ updateLightDOM() {\n const { command } = this._options;\n const fullCommand = this.getFullCommand();\n\n this.setAttribute('role', 'button');\n this.setAttribute('tabindex', '0');\n this.setAttribute('aria-label', `Run on ${harness.name}: ${command}`);\n if (this._options.popup !== false) {\n this.setAttribute('aria-haspopup', 'dialog');\n } else {\n this.removeAttribute('aria-haspopup');\n }\n\n let link = this.querySelector('a[data-cb-crawl]') as HTMLAnchorElement | null;\n if (!link) {\n link = document.createElement('a');\n link.setAttribute('data-cb-crawl', '');\n link.setAttribute('aria-hidden', 'true');\n link.style.cssText = 'position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;';\n this.appendChild(link);\n }\n link.textContent = `Run on ${harness.name}: ${command}`;\n link.setAttribute('data-platform', harness.id);\n link.setAttribute('data-command', command);\n link.setAttribute('data-full-command', fullCommand);\n link.href = `${harness.urlBase}?command=${encodeURIComponent(fullCommand)}`;\n }\n\n /** @internal */ getResolvedTheme(): Theme {\n return this._options.theme || 'branded';\n }\n\n /** @internal */ getFullCommand(): string {\n const { command, promptFlag } = this._options;\n if (promptFlag === false) return command;\n return `${harness.cliPrefix} \"${command}\"`;\n }\n\n /** @internal */ render() {\n if (!this.shadowRoot) return;\n\n const theme = this.getResolvedTheme();\n const resolvedTheme = theme === 'system' ? (\n typeof window !== 'undefined' && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'\n ) : theme;\n const variant = this._options.variant || 'filled';\n\n const tokens = resolveTheme(theme, harness.id);\n const size = this._options.size || 'md';\n const shape = this._options.shape || 'rounded';\n const sizeTokens = SIZE_MAP[size];\n const radius = SHAPE_MAP[shape][size];\n\n this.setAttribute('data-theme', resolvedTheme);\n this.setAttribute('data-variant', variant);\n\n const bgOverride = variant !== 'filled' ? 'transparent' : tokens.bg;\n const borderOverride = variant === 'ghost' ? 'transparent' :\n variant === 'outline' ? tokens.primary : tokens.border;\n const textOverride = variant !== 'filled' ? tokens.primary : tokens.text;\n\n this.shadowRoot.innerHTML = `\n <style>${BUTTON_STYLES}</style>\n <button\n class=\"cb-btn\"\n type=\"button\"\n style=\"\n ${themeToCSS(tokens)}\n --cb-bg: ${bgOverride};\n --cb-border: ${borderOverride};\n --cb-text: ${textOverride};\n --cb-accent-color: ${tokens.primary};\n --cb-focus-color: ${tokens.primary};\n --cb-height: ${sizeTokens.height};\n --cb-font-size: ${sizeTokens.fontSize};\n --cb-icon-size: ${sizeTokens.iconSize};\n --cb-padding: ${sizeTokens.padding};\n --cb-gap: ${sizeTokens.gap};\n --cb-radius: ${radius};\n \"\n aria-label=\"Run on ${harness.name}: ${this._options.command.replace(/\"/g, '"')}\"\n >\n <span class=\"cb-btn-icon\" aria-hidden=\"true\">${ICON}</span>\n <span class=\"cb-btn-label\">Run on ${harness.name}</span>\n </button>\n `;\n\n const btn = this.shadowRoot.querySelector('.cb-btn')!;\n btn.addEventListener('click', () => this.handleClick());\n btn.addEventListener('keydown', (e) => {\n if ((e as KeyboardEvent).key === 'Enter' || (e as KeyboardEvent).key === ' ') {\n e.preventDefault();\n this.handleClick();\n }\n });\n this._rendered = true;\n this.setupSystemThemeWatch();\n }\n\n /** @internal */ handleClick() {\n const { popup, command, popupTitle, popupDescription } = this._options;\n const fullCommand = this.getFullCommand();\n\n this.dispatchEvent(new CustomEvent('cb-open', {\n bubbles: true,\n composed: true,\n detail: { command, fullCommand, harness: harness.id },\n }));\n\n if (popup === false) {\n navigator.clipboard.writeText(fullCommand).then(() => {\n this._options.onCopy?.(fullCommand);\n recordAgentPreference(harness.id);\n this.dispatchEvent(new CustomEvent('cb-copy', {\n bubbles: true,\n composed: true,\n detail: { command: fullCommand, harness: harness.id },\n }));\n });\n return;\n }\n\n showPopup({\n harnessId: harness.id,\n theme: this.getResolvedTheme(),\n title: popupTitle || `Run on ${harness.name}`,\n description: popupDescription || `Execute this command in your terminal to get started with ${harness.name}.`,\n command,\n fullCommand,\n onCopy: (cmd) => {\n this._options.onCopy?.(cmd);\n recordAgentPreference(harness.id);\n this.dispatchEvent(new CustomEvent('cb-copy', {\n bubbles: true,\n composed: true,\n detail: { command: cmd, harness: harness.id },\n }));\n },\n onClose: () => {\n this.dispatchEvent(new CustomEvent('cb-close', {\n bubbles: true,\n composed: true,\n detail: { harness: harness.id },\n }));\n },\n });\n }\n\n /** @internal */ setupSystemThemeWatch() {\n this._mqCleanup?.();\n this._mqCleanup = null;\n\n if (this.getResolvedTheme() !== 'system' || typeof window === 'undefined') return;\n\n const mq = window.matchMedia('(prefers-color-scheme: dark)');\n const handler = () => this.render();\n mq.addEventListener('change', handler);\n this._mqCleanup = () => mq.removeEventListener('change', handler);\n }\n }\n\n return ClawButton;\n}\n\ntype ButtonClassMap = Record<HarnessId, ReturnType<typeof createClawButtonClass>>;\nconst buttonClasses: Partial<ButtonClassMap> = {};\n\nexport function getButtonClass(harnessId: HarnessId): ReturnType<typeof createClawButtonClass> {\n if (!buttonClasses[harnessId]) {\n buttonClasses[harnessId] = createClawButtonClass(HARNESSES[harnessId]);\n }\n return buttonClasses[harnessId]!;\n}\n\nexport function registerHarnessButton(harnessId: HarnessId, customTagName?: string) {\n if (typeof customElements === 'undefined') return;\n const tagName = customTagName || HARNESSES[harnessId].tagName;\n if (!customElements.get(tagName)) {\n customElements.define(tagName, getButtonClass(harnessId));\n }\n}\n\nexport function registerAllButtons() {\n HARNESS_IDS.forEach((id) => registerHarnessButton(id));\n}\n\nexport function createButton(harnessId: HarnessId, options: ClawButtonOptions): HTMLElement {\n const tagName = HARNESSES[harnessId].tagName;\n const el = document.createElement(tagName) as any;\n el.options = options;\n return el;\n}\n\nregisterAllButtons();\n"],"mappings":"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","names":["AGENT_PREFERENCES_COOKIE_NAME","isBrowser","readAgentPreferences","match","p","AGENT_PREFERENCES_COOKIE_NAME","value","decoded","data","x","writeAgentPreferences","payload","order","json","expires","recordAgentPreference","agentId","base","id","OPENCLAW_ICON","HERMES_ICON","IRONCLAW_ICON","NANOCLAW_ICON","ZEROCLAW_ICON","OPENHARNESS_ICON","CLAUDECLAW_ICON","ICON_MAP","getIcon","harnessId","COPY_ICON","CHECK_ICON","CLOSE_ICON","HARNESSES","HARNESS_IDS","getBrandColor","harnessId","HARNESSES","getThemes","harnessId","brand","getBrandColor","resolveTheme","theme","themes","themeToCSS","tokens","SHAPE_MAP","SIZE_MAP","POPUP_STYLES","ClawPopupDialog","opts","theme","harnessId","resolveTheme","prefersDark","base","brand","title","description","command","fullCommand","tokens","icon","getIcon","harnessName","HARNESSES","displayCommand","themeToCSS","CLOSE_ICON","COPY_ICON","target","action","cmd","mq","handler","button","iconContainer","CHECK_ICON","textarea","dialog","backdrop","str","div","showPopup","options","popup","buildButtonStyles","brandColor","brandColorHover","brandColorActive","createClawButtonClass","harness","BUTTON_STYLES","ICON","getIcon","ClawButton","opts","command","theme","size","variant","shape","popup","promptFlag","popupTitle","popupDescription","fullCommand","link","resolvedTheme","tokens","resolveTheme","sizeTokens","SIZE_MAP","radius","SHAPE_MAP","bgOverride","borderOverride","textOverride","themeToCSS","btn","e","recordAgentPreference","showPopup","cmd","mq","handler","buttonClasses","getButtonClass","harnessId","HARNESSES","registerHarnessButton","customTagName","tagName","registerAllButtons","HARNESS_IDS","id","createButton","options","el"]} |
+0
-8
@@ -22,4 +22,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, HermesButtonOptions, HermesPopupDialog, PopupOptions as HermesPopupOptions, HermesSkillButtonOptions, ThemeTokens as HermesThemeTokens, createHermesButton, createHermesSkillButton, themes as hermesThemes, register as registerHermes, registerHermesButton, registerHermesSkillButton, resolveTheme as resolveHermesTheme, showPopup as showHermesPopup } from 'hermesbuttons'; | ||
| command: string; | ||
| /** URL to a downloadable skill package (.zip, SKILL.md, or plugin.json) */ | ||
| skillUrl?: string; | ||
| /** Theme variant. Default: 'branded' */ | ||
@@ -39,4 +37,2 @@ theme?: Theme; | ||
| onCopy?: (command: string) => void; | ||
| /** Callback fired when the skill package is downloaded */ | ||
| onDownload?: (url: string) => void; | ||
| /** Custom popup title */ | ||
@@ -54,3 +50,2 @@ popupTitle?: string; | ||
| fullCommand?: string; | ||
| skillUrl?: string; | ||
| onCopy?: (command: string) => void; | ||
@@ -458,3 +453,2 @@ onClose?: () => void; | ||
| private renderCommandBody; | ||
| private renderSkillBody; | ||
| private setupListeners; | ||
@@ -491,3 +485,2 @@ private setupSystemThemeWatch; | ||
| fullCommand?: string; | ||
| skillUrl?: string; | ||
| } | ||
@@ -500,3 +493,2 @@ declare function discoverButtons(): ButtonMetadata[]; | ||
| command?: string; | ||
| 'skill-url'?: string; | ||
| theme?: Theme; | ||
@@ -503,0 +495,0 @@ size?: Size; |
+0
-8
@@ -22,4 +22,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, HermesButtonOptions, HermesPopupDialog, PopupOptions as HermesPopupOptions, HermesSkillButtonOptions, ThemeTokens as HermesThemeTokens, createHermesButton, createHermesSkillButton, themes as hermesThemes, register as registerHermes, registerHermesButton, registerHermesSkillButton, resolveTheme as resolveHermesTheme, showPopup as showHermesPopup } from 'hermesbuttons'; | ||
| command: string; | ||
| /** URL to a downloadable skill package (.zip, SKILL.md, or plugin.json) */ | ||
| skillUrl?: string; | ||
| /** Theme variant. Default: 'branded' */ | ||
@@ -39,4 +37,2 @@ theme?: Theme; | ||
| onCopy?: (command: string) => void; | ||
| /** Callback fired when the skill package is downloaded */ | ||
| onDownload?: (url: string) => void; | ||
| /** Custom popup title */ | ||
@@ -54,3 +50,2 @@ popupTitle?: string; | ||
| fullCommand?: string; | ||
| skillUrl?: string; | ||
| onCopy?: (command: string) => void; | ||
@@ -458,3 +453,2 @@ onClose?: () => void; | ||
| private renderCommandBody; | ||
| private renderSkillBody; | ||
| private setupListeners; | ||
@@ -491,3 +485,2 @@ private setupSystemThemeWatch; | ||
| fullCommand?: string; | ||
| skillUrl?: string; | ||
| } | ||
@@ -500,3 +493,2 @@ declare function discoverButtons(): ButtonMetadata[]; | ||
| command?: string; | ||
| 'skill-url'?: string; | ||
| theme?: Theme; | ||
@@ -503,0 +495,0 @@ size?: Size; |
+29
-46
@@ -1,2 +0,2 @@ | ||
| 'use strict';var hermesbuttons=require('hermesbuttons');var A="agentpreferences";function B(){return typeof document<"u"}function Z(){if(!B())return null;let t=document.cookie.split(";").map(e=>e.trim()).find(e=>e.startsWith(`${A}=`));if(!t)return null;let r=t.slice(A.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(s=>typeof s=="string"&&s.length>0)}}catch{return null}}function J(t){if(!B())return;let r=t.order.slice(0,24),e=JSON.stringify({order:r}),o=new Date;o.setFullYear(o.getFullYear()+1),document.cookie=`${A}=${encodeURIComponent(e)}; Path=/; SameSite=Lax; Expires=${o.toUTCString()}`;}function S(t){if(!t||typeof t!="string")return;let e=Z()?.order.filter(o=>o!==t)??[];J({order:[t,...e]});}var H=`<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 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"> | ||
| <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"/> | ||
@@ -7,3 +7,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"/> | ||
| <circle cx="12" cy="12" r="2" fill="currentColor"/> | ||
| </svg>`,$=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| </svg>`,H=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <path d="M12 2L4 6v6c0 5.25 3.4 10.2 8 12 4.6-1.8 8-6.75 8-12V6l-8-4z" fill="currentColor" opacity="0.15"/> | ||
@@ -28,3 +28,3 @@ <path d="M12 2L4 6v6c0 5.25 3.4 10.2 8 12 4.6-1.8 8-6.75 8-12V6l-8-4z" stroke="currentColor" stroke-width="1.6" fill="none"/> | ||
| <path d="M11.5 9l-1 4h3l-1 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> | ||
| </svg>`,R=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| </svg>`,$=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <path d="M12 3L3 8v8l9 5 9-5V8l-9-5z" fill="currentColor" opacity="0.12"/> | ||
@@ -34,3 +34,3 @@ <path d="M12 3L3 8v8l9 5 9-5V8l-9-5z" stroke="currentColor" stroke-width="1.6" fill="none" stroke-linejoin="round"/> | ||
| <circle cx="12" cy="16" r="1.3" fill="currentColor"/> | ||
| </svg>`,L=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| </svg>`,R=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <rect x="3.5" y="1.5" width="5" height="5" rx="1.5" fill="currentColor"/> | ||
@@ -45,10 +45,10 @@ <rect x="15.5" y="1.5" width="5" height="5" rx="1.5" fill="currentColor"/> | ||
| <rect x="13.5" y="18.5" width="4" height="3.5" rx="1.5" fill="currentColor"/> | ||
| </svg>`,X={openclaw:H,hermes:$,ironclaw:N,nanoclaw:O,zeroclaw:M,openharness:R,claudeclaw:L};function m(t){return X[t]}var w=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon-sm"> | ||
| </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"> | ||
| <rect x="5" y="5" width="8" height="8" rx="1.5" stroke="currentColor" stroke-width="1.5" fill="none"/> | ||
| <path d="M3 10V3.5A1.5 1.5 0 014.5 2H10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/> | ||
| </svg>`,L=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon-sm"> | ||
| <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"> | ||
| <path d="M3 8.5l3.5 3.5L13 4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | ||
| </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 z(t){return d[t].brandColor}function D(t){let r=z(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 u(t,r){let e=D(r);return t!=="system"?e[t]:typeof window>"u"?e.light:window.matchMedia("(prefers-color-scheme: dark)").matches?e.dark:e.light}function C(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 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 ` | ||
| --cb-bg: ${t.bg}; | ||
@@ -64,3 +64,3 @@ --cb-text: ${t.text}; | ||
| --cb-code-text: ${t.codeText}; | ||
| `}var j={rounded:{sm:"0.375rem",md:"0.5rem",lg:"0.625rem"},pill:{sm:"999px",md:"999px",lg:"999px"},square:{sm:"0",md:"0",lg:"0"}},U={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 et=` | ||
| :host { | ||
@@ -319,17 +319,17 @@ position: fixed; | ||
| } | ||
| `,y=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 u(e,o);let a=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;if(e==="system")return a?u("dark",o):u("light",o);let s=a?u("dark",o):u("light",o),i=u(e,o);return {...s,primary:i.primary,primaryText:i.primaryText}}render(){if(!this.shadowRoot||!this._options)return;let{harnessId:e,title:o,description:a,command:s,fullCommand:i,skillUrl:c}=this._options,l=this.resolvePopupTokens(),n=m(e),b=d[e].name,p=i||s;this.shadowRoot.innerHTML=` | ||
| `,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> | ||
| <div style="${C(l)}"> | ||
| <div style="${v(s)}"> | ||
| <div class="cb-backdrop" data-action="close"></div> | ||
| <div class="cb-dialog" role="dialog" aria-modal="true" aria-labelledby="cb-dialog-title"> | ||
| <div class="cb-dialog-header"> | ||
| <div class="cb-dialog-header-icon">${n}</div> | ||
| <div class="cb-dialog-header-icon">${i}</div> | ||
| <div class="cb-dialog-header-text"> | ||
| <div class="cb-dialog-title" id="cb-dialog-title">${o}</div> | ||
| ${a?`<div class="cb-dialog-description">${a}</div>`:""} | ||
| ${n?`<div class="cb-dialog-description">${n}</div>`:""} | ||
| </div> | ||
| <button class="cb-dialog-close" data-action="close" aria-label="Close">${P}</button> | ||
| <button class="cb-dialog-close" data-action="close" aria-label="Close">${I}</button> | ||
| </div> | ||
| <div class="cb-dialog-body"> | ||
| ${c?this.renderSkillBody(s,c,b):this.renderCommandBody(p)} | ||
| ${this.renderCommandBody(p)} | ||
| </div> | ||
@@ -348,3 +348,3 @@ <div class="cb-dialog-footer"> | ||
| <div class="cb-code-text"><span class="cb-code-prefix">$</span>${this.escapeHtml(e)}</div> | ||
| <button class="cb-copy-btn" data-action="copy" data-command="${this.escapeAttr(e)}">${w}<span>Copy</span></button> | ||
| <button class="cb-copy-btn" data-action="copy" data-command="${this.escapeAttr(e)}">${A}<span>Copy</span></button> | ||
| </div> | ||
@@ -359,20 +359,3 @@ </div> | ||
| </div> | ||
| `}renderSkillBody(e,o,a){let s=`Install the skill from ${o} and run ${e}`;return ` | ||
| <div class="cb-step"> | ||
| <div class="cb-step-num">1</div> | ||
| <div class="cb-step-content"> | ||
| <div class="cb-step-label">Copy this prompt to your clipboard</div> | ||
| <div class="cb-code-block"> | ||
| <div class="cb-code-text">${this.escapeHtml(s)}</div> | ||
| <button class="cb-copy-btn" data-action="copy" data-command="${this.escapeAttr(s)}">${w}<span>Copy</span></button> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div class="cb-step"> | ||
| <div class="cb-step-num">2</div> | ||
| <div class="cb-step-content"> | ||
| <div class="cb-step-label">Paste into a ${a} session \u2014 the agent will fetch the skill and set it up for you</div> | ||
| </div> | ||
| </div> | ||
| `}setupListeners(){this.shadowRoot&&(this.shadowRoot.addEventListener("click",e=>{let o=e.target.closest("[data-action]");if(!o)return;let a=o.dataset.action;if(a==="close")this.close();else if(a==="copy"){let s=o.dataset.command||"";this.copyToClipboard(s,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 a=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>this.render();a.addEventListener("change",s),this._mqCleanup=()=>a.removeEventListener("change",s);}async copyToClipboard(e,o){try{await navigator.clipboard.writeText(e);let a=o;o.setAttribute("data-copied","true"),a.innerHTML=`${I}<span>Copied!</span>`,this._options.onCopy?.(e),setTimeout(()=>{o.setAttribute("data-copied","false"),a.innerHTML=`${w}<span>Copy</span>`;},2e3);}catch{let a=document.createElement("textarea");a.value=e,a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a),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",y);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 F(t){let r=document.createElement("claw-popup-dialog");return r.options=t,document.body.appendChild(r),r}function ot(t,r,e){return ` | ||
| :host { | ||
@@ -604,3 +587,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(i){this._options={...this._options,...i},this.render(),this.updateLightDOM();}get options(){return this._options}get harnessId(){return t.id}syncFromAttributes(){let i=this.getAttribute("command"),c=this.getAttribute("skill-url"),l=this.getAttribute("theme"),n=this.getAttribute("size"),b=this.getAttribute("variant"),p=this.getAttribute("shape"),h=this.getAttribute("popup"),f=this.getAttribute("prompt-flag"),x=this.getAttribute("popup-title"),v=this.getAttribute("popup-description");i!==null&&(this._options.command=i),c!==null&&(this._options.skillUrl=c),l&&(this._options.theme=l),n&&(this._options.size=n),b&&(this._options.variant=b),p&&(this._options.shape=p),h!==null&&(this._options.popup=h!=="false"),f!==null&&(this._options.promptFlag=f!=="false"),x!==null&&(this._options.popupTitle=x),v!==null&&(this._options.popupDescription=v);}updateLightDOM(){let{command:i,skillUrl:c}=this._options,l=this.getFullCommand();this.setAttribute("role","button"),this.setAttribute("tabindex","0"),this.setAttribute("aria-label",`Run on ${t.name}: ${i}`),this._options.popup!==false?this.setAttribute("aria-haspopup","dialog"):this.removeAttribute("aria-haspopup");let n=this.querySelector("a[data-cb-crawl]");n||(n=document.createElement("a"),n.setAttribute("data-cb-crawl",""),n.setAttribute("aria-hidden","true"),n.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;",this.appendChild(n)),n.textContent=`Run on ${t.name}: ${i}`,n.setAttribute("data-platform",t.id),n.setAttribute("data-command",i),n.setAttribute("data-full-command",l),c?(n.href=c,n.setAttribute("data-skill-url",c)):(n.href=`${t.urlBase}?command=${encodeURIComponent(l)}`,n.removeAttribute("data-skill-url"));}getResolvedTheme(){return this._options.theme||"branded"}getFullCommand(){let{command:i,promptFlag:c}=this._options;return c===false?i:`${t.cliPrefix} "${i}"`}render(){if(!this.shadowRoot)return;let i=this.getResolvedTheme(),c=i==="system"?typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":i,l=this._options.variant||"filled",n=u(i,t.id),b=this._options.size||"md",p=this._options.shape||"rounded",h=U[b],f=j[p][b];this.setAttribute("data-theme",c),this.setAttribute("data-variant",l);let x=l!=="filled"?"transparent":n.bg,v=l==="ghost"?"transparent":l==="outline"?n.primary:n.border,G=l!=="filled"?n.primary:n.text;this.shadowRoot.innerHTML=` | ||
| `}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=` | ||
| <style>${r}</style> | ||
@@ -611,13 +594,13 @@ <button | ||
| style=" | ||
| ${C(n)} | ||
| ${v(c)} | ||
| --cb-bg: ${x}; | ||
| --cb-border: ${v}; | ||
| --cb-border: ${Y}; | ||
| --cb-text: ${G}; | ||
| --cb-accent-color: ${n.primary}; | ||
| --cb-focus-color: ${n.primary}; | ||
| --cb-height: ${h.height}; | ||
| --cb-font-size: ${h.fontSize}; | ||
| --cb-icon-size: ${h.iconSize}; | ||
| --cb-padding: ${h.padding}; | ||
| --cb-gap: ${h.gap}; | ||
| --cb-accent-color: ${c.primary}; | ||
| --cb-focus-color: ${c.primary}; | ||
| --cb-height: ${u.height}; | ||
| --cb-font-size: ${u.fontSize}; | ||
| --cb-icon-size: ${u.iconSize}; | ||
| --cb-padding: ${u.padding}; | ||
| --cb-gap: ${u.gap}; | ||
| --cb-radius: ${f}; | ||
@@ -630,4 +613,4 @@ " | ||
| </button> | ||
| `;let _=this.shadowRoot.querySelector(".cb-btn");_.addEventListener("click",()=>this.handleClick()),_.addEventListener("keydown",E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),this.handleClick());}),this._rendered=true,this.setupSystemThemeWatch();}handleClick(){let{popup:i,command:c,skillUrl:l,popupTitle:n,popupDescription:b}=this._options,p=this.getFullCommand();if(this.dispatchEvent(new CustomEvent("cb-open",{bubbles:true,composed:true,detail:{command:c,fullCommand:p,harness:t.id}})),i===false){navigator.clipboard.writeText(p).then(()=>{this._options.onCopy?.(p),S(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:n||`Run on ${t.name}`,description:b||(l?`Install the skill and run the command in ${t.name}.`:`Execute this command in your terminal to get started with ${t.name}.`),command:c,fullCommand:p,skillUrl:l,onCopy:h=>{this._options.onCopy?.(h),S(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:true,composed:true,detail:{command:h,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 i=window.matchMedia("(prefers-color-scheme: dark)"),c=()=>this.render();i.addEventListener("change",c),this._mqCleanup=()=>i.removeEventListener("change",c);}}return o.observedAttributes=["command","skill-url","theme","size","variant","shape","popup","prompt-flag","popup-title","popup-description"],o}var T={};function W(t){return T[t]||(T[t]=q(d[t])),T[t]}function V(t,r){if(typeof customElements>"u")return;let e=r||d[t].tagName;customElements.get(e)||customElements.define(e,W(t));}function k(){g.forEach(t=>V(t));}function rt(t,r){let e=d[t].tagName,o=document.createElement(e);return o.options=r,o}k();function K(){if(typeof document>"u")return [];let t=[];return g.forEach(r=>{let e=d[r];document.querySelectorAll(e.tagName).forEach(o=>{let a=o.getAttribute("command")||"",s=o.getAttribute("skill-url")||void 0,l=o.getAttribute("prompt-flag")!=="false"?`${e.cliPrefix} "${a}"`:a;t.push({platform:r,command:a,fullCommand:l,...s&&{skillUrl:s}});});}),t}function Y(){let t=K();return t.length===0?{}:{"@context":"https://schema.org","@type":"WebPage",potentialAction:t.map(e=>{let o=d[e.platform],a={"@type":"EntryPoint",actionPlatform:o.urlBase};e.skillUrl?a.urlTemplate=e.skillUrl:a.urlTemplate=`${o.urlBase}?command=${encodeURIComponent(e.fullCommand||e.command)}`;let s={"@type":"Action",name:`Run on ${o.name}: ${e.command}`,description:e.command,target:a,object:{"@type":"SoftwareSourceCode",runtimePlatform:o.name,text:e.fullCommand||e.command}};return e.skillUrl&&(s.object={"@type":"SoftwareApplication",name:e.command,downloadUrl:e.skillUrl,applicationCategory:"AI Skill",operatingSystem:o.name}),s})}}function at(){if(typeof document>"u")return;let t=document.querySelector("script[data-clawbuttons-jsonld]");t&&t.remove();let r=Y();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 Ft(){k();} | ||
| 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=L;exports.ClawPopupDialog=y;exports.DEFAULT_BRAND_COLOR=tt;exports.HARNESSES=d;exports.HARNESS_IDS=g;exports.HERMES_ICON=$;exports.IRONCLAW_ICON=N;exports.NANOCLAW_ICON=O;exports.OPENCLAW_ICON=H;exports.OPENHARNESS_ICON=R;exports.ZEROCLAW_ICON=M;exports.createButton=rt;exports.createClawButtonClass=q;exports.discoverButtons=K;exports.generateStructuredData=Y;exports.getBrandColor=z;exports.getButtonClass=W;exports.getHarness=Q;exports.getIcon=m;exports.getThemes=D;exports.injectStructuredData=at;exports.register=Ft;exports.registerAllButtons=k;exports.registerHarnessButton=V;exports.resolveTheme=u;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}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 | ||
| //# sourceMappingURL=index.js.map |
+29
-46
@@ -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 A="agentpreferences";function B(){return typeof document<"u"}function Z(){if(!B())return null;let t=document.cookie.split(";").map(e=>e.trim()).find(e=>e.startsWith(`${A}=`));if(!t)return null;let r=t.slice(A.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(s=>typeof s=="string"&&s.length>0)}}catch{return null}}function J(t){if(!B())return;let r=t.order.slice(0,24),e=JSON.stringify({order:r}),o=new Date;o.setFullYear(o.getFullYear()+1),document.cookie=`${A}=${encodeURIComponent(e)}; Path=/; SameSite=Lax; Expires=${o.toUTCString()}`;}function S(t){if(!t||typeof t!="string")return;let e=Z()?.order.filter(o=>o!==t)??[];J({order:[t,...e]});}var H=`<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 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"> | ||
| <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"/> | ||
@@ -7,3 +7,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"/> | ||
| <circle cx="12" cy="12" r="2" fill="currentColor"/> | ||
| </svg>`,$=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| </svg>`,H=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <path d="M12 2L4 6v6c0 5.25 3.4 10.2 8 12 4.6-1.8 8-6.75 8-12V6l-8-4z" fill="currentColor" opacity="0.15"/> | ||
@@ -28,3 +28,3 @@ <path d="M12 2L4 6v6c0 5.25 3.4 10.2 8 12 4.6-1.8 8-6.75 8-12V6l-8-4z" stroke="currentColor" stroke-width="1.6" fill="none"/> | ||
| <path d="M11.5 9l-1 4h3l-1 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> | ||
| </svg>`,R=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| </svg>`,$=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <path d="M12 3L3 8v8l9 5 9-5V8l-9-5z" fill="currentColor" opacity="0.12"/> | ||
@@ -34,3 +34,3 @@ <path d="M12 3L3 8v8l9 5 9-5V8l-9-5z" stroke="currentColor" stroke-width="1.6" fill="none" stroke-linejoin="round"/> | ||
| <circle cx="12" cy="16" r="1.3" fill="currentColor"/> | ||
| </svg>`,L=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| </svg>`,R=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <rect x="3.5" y="1.5" width="5" height="5" rx="1.5" fill="currentColor"/> | ||
@@ -45,10 +45,10 @@ <rect x="15.5" y="1.5" width="5" height="5" rx="1.5" fill="currentColor"/> | ||
| <rect x="13.5" y="18.5" width="4" height="3.5" rx="1.5" fill="currentColor"/> | ||
| </svg>`,X={openclaw:H,hermes:$,ironclaw:N,nanoclaw:O,zeroclaw:M,openharness:R,claudeclaw:L};function m(t){return X[t]}var w=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon-sm"> | ||
| </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"> | ||
| <rect x="5" y="5" width="8" height="8" rx="1.5" stroke="currentColor" stroke-width="1.5" fill="none"/> | ||
| <path d="M3 10V3.5A1.5 1.5 0 014.5 2H10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/> | ||
| </svg>`,L=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon-sm"> | ||
| <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"> | ||
| <path d="M3 8.5l3.5 3.5L13 4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | ||
| </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 z(t){return d[t].brandColor}function D(t){let r=z(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 u(t,r){let e=D(r);return t!=="system"?e[t]:typeof window>"u"?e.light:window.matchMedia("(prefers-color-scheme: dark)").matches?e.dark:e.light}function C(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 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 ` | ||
| --cb-bg: ${t.bg}; | ||
@@ -64,3 +64,3 @@ --cb-text: ${t.text}; | ||
| --cb-code-text: ${t.codeText}; | ||
| `}var j={rounded:{sm:"0.375rem",md:"0.5rem",lg:"0.625rem"},pill:{sm:"999px",md:"999px",lg:"999px"},square:{sm:"0",md:"0",lg:"0"}},U={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 et=` | ||
| :host { | ||
@@ -319,17 +319,17 @@ position: fixed; | ||
| } | ||
| `,y=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 u(e,o);let a=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;if(e==="system")return a?u("dark",o):u("light",o);let s=a?u("dark",o):u("light",o),i=u(e,o);return {...s,primary:i.primary,primaryText:i.primaryText}}render(){if(!this.shadowRoot||!this._options)return;let{harnessId:e,title:o,description:a,command:s,fullCommand:i,skillUrl:c}=this._options,l=this.resolvePopupTokens(),n=m(e),b=d[e].name,p=i||s;this.shadowRoot.innerHTML=` | ||
| `,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> | ||
| <div style="${C(l)}"> | ||
| <div style="${v(s)}"> | ||
| <div class="cb-backdrop" data-action="close"></div> | ||
| <div class="cb-dialog" role="dialog" aria-modal="true" aria-labelledby="cb-dialog-title"> | ||
| <div class="cb-dialog-header"> | ||
| <div class="cb-dialog-header-icon">${n}</div> | ||
| <div class="cb-dialog-header-icon">${i}</div> | ||
| <div class="cb-dialog-header-text"> | ||
| <div class="cb-dialog-title" id="cb-dialog-title">${o}</div> | ||
| ${a?`<div class="cb-dialog-description">${a}</div>`:""} | ||
| ${n?`<div class="cb-dialog-description">${n}</div>`:""} | ||
| </div> | ||
| <button class="cb-dialog-close" data-action="close" aria-label="Close">${P}</button> | ||
| <button class="cb-dialog-close" data-action="close" aria-label="Close">${I}</button> | ||
| </div> | ||
| <div class="cb-dialog-body"> | ||
| ${c?this.renderSkillBody(s,c,b):this.renderCommandBody(p)} | ||
| ${this.renderCommandBody(p)} | ||
| </div> | ||
@@ -348,3 +348,3 @@ <div class="cb-dialog-footer"> | ||
| <div class="cb-code-text"><span class="cb-code-prefix">$</span>${this.escapeHtml(e)}</div> | ||
| <button class="cb-copy-btn" data-action="copy" data-command="${this.escapeAttr(e)}">${w}<span>Copy</span></button> | ||
| <button class="cb-copy-btn" data-action="copy" data-command="${this.escapeAttr(e)}">${A}<span>Copy</span></button> | ||
| </div> | ||
@@ -359,20 +359,3 @@ </div> | ||
| </div> | ||
| `}renderSkillBody(e,o,a){let s=`Install the skill from ${o} and run ${e}`;return ` | ||
| <div class="cb-step"> | ||
| <div class="cb-step-num">1</div> | ||
| <div class="cb-step-content"> | ||
| <div class="cb-step-label">Copy this prompt to your clipboard</div> | ||
| <div class="cb-code-block"> | ||
| <div class="cb-code-text">${this.escapeHtml(s)}</div> | ||
| <button class="cb-copy-btn" data-action="copy" data-command="${this.escapeAttr(s)}">${w}<span>Copy</span></button> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div class="cb-step"> | ||
| <div class="cb-step-num">2</div> | ||
| <div class="cb-step-content"> | ||
| <div class="cb-step-label">Paste into a ${a} session \u2014 the agent will fetch the skill and set it up for you</div> | ||
| </div> | ||
| </div> | ||
| `}setupListeners(){this.shadowRoot&&(this.shadowRoot.addEventListener("click",e=>{let o=e.target.closest("[data-action]");if(!o)return;let a=o.dataset.action;if(a==="close")this.close();else if(a==="copy"){let s=o.dataset.command||"";this.copyToClipboard(s,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 a=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>this.render();a.addEventListener("change",s),this._mqCleanup=()=>a.removeEventListener("change",s);}async copyToClipboard(e,o){try{await navigator.clipboard.writeText(e);let a=o;o.setAttribute("data-copied","true"),a.innerHTML=`${I}<span>Copied!</span>`,this._options.onCopy?.(e),setTimeout(()=>{o.setAttribute("data-copied","false"),a.innerHTML=`${w}<span>Copy</span>`;},2e3);}catch{let a=document.createElement("textarea");a.value=e,a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a),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",y);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 F(t){let r=document.createElement("claw-popup-dialog");return r.options=t,document.body.appendChild(r),r}function ot(t,r,e){return ` | ||
| :host { | ||
@@ -604,3 +587,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(i){this._options={...this._options,...i},this.render(),this.updateLightDOM();}get options(){return this._options}get harnessId(){return t.id}syncFromAttributes(){let i=this.getAttribute("command"),c=this.getAttribute("skill-url"),l=this.getAttribute("theme"),n=this.getAttribute("size"),b=this.getAttribute("variant"),p=this.getAttribute("shape"),h=this.getAttribute("popup"),f=this.getAttribute("prompt-flag"),x=this.getAttribute("popup-title"),v=this.getAttribute("popup-description");i!==null&&(this._options.command=i),c!==null&&(this._options.skillUrl=c),l&&(this._options.theme=l),n&&(this._options.size=n),b&&(this._options.variant=b),p&&(this._options.shape=p),h!==null&&(this._options.popup=h!=="false"),f!==null&&(this._options.promptFlag=f!=="false"),x!==null&&(this._options.popupTitle=x),v!==null&&(this._options.popupDescription=v);}updateLightDOM(){let{command:i,skillUrl:c}=this._options,l=this.getFullCommand();this.setAttribute("role","button"),this.setAttribute("tabindex","0"),this.setAttribute("aria-label",`Run on ${t.name}: ${i}`),this._options.popup!==false?this.setAttribute("aria-haspopup","dialog"):this.removeAttribute("aria-haspopup");let n=this.querySelector("a[data-cb-crawl]");n||(n=document.createElement("a"),n.setAttribute("data-cb-crawl",""),n.setAttribute("aria-hidden","true"),n.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;",this.appendChild(n)),n.textContent=`Run on ${t.name}: ${i}`,n.setAttribute("data-platform",t.id),n.setAttribute("data-command",i),n.setAttribute("data-full-command",l),c?(n.href=c,n.setAttribute("data-skill-url",c)):(n.href=`${t.urlBase}?command=${encodeURIComponent(l)}`,n.removeAttribute("data-skill-url"));}getResolvedTheme(){return this._options.theme||"branded"}getFullCommand(){let{command:i,promptFlag:c}=this._options;return c===false?i:`${t.cliPrefix} "${i}"`}render(){if(!this.shadowRoot)return;let i=this.getResolvedTheme(),c=i==="system"?typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":i,l=this._options.variant||"filled",n=u(i,t.id),b=this._options.size||"md",p=this._options.shape||"rounded",h=U[b],f=j[p][b];this.setAttribute("data-theme",c),this.setAttribute("data-variant",l);let x=l!=="filled"?"transparent":n.bg,v=l==="ghost"?"transparent":l==="outline"?n.primary:n.border,G=l!=="filled"?n.primary:n.text;this.shadowRoot.innerHTML=` | ||
| `}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=` | ||
| <style>${r}</style> | ||
@@ -611,13 +594,13 @@ <button | ||
| style=" | ||
| ${C(n)} | ||
| ${v(c)} | ||
| --cb-bg: ${x}; | ||
| --cb-border: ${v}; | ||
| --cb-border: ${Y}; | ||
| --cb-text: ${G}; | ||
| --cb-accent-color: ${n.primary}; | ||
| --cb-focus-color: ${n.primary}; | ||
| --cb-height: ${h.height}; | ||
| --cb-font-size: ${h.fontSize}; | ||
| --cb-icon-size: ${h.iconSize}; | ||
| --cb-padding: ${h.padding}; | ||
| --cb-gap: ${h.gap}; | ||
| --cb-accent-color: ${c.primary}; | ||
| --cb-focus-color: ${c.primary}; | ||
| --cb-height: ${u.height}; | ||
| --cb-font-size: ${u.fontSize}; | ||
| --cb-icon-size: ${u.iconSize}; | ||
| --cb-padding: ${u.padding}; | ||
| --cb-gap: ${u.gap}; | ||
| --cb-radius: ${f}; | ||
@@ -630,4 +613,4 @@ " | ||
| </button> | ||
| `;let _=this.shadowRoot.querySelector(".cb-btn");_.addEventListener("click",()=>this.handleClick()),_.addEventListener("keydown",E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),this.handleClick());}),this._rendered=true,this.setupSystemThemeWatch();}handleClick(){let{popup:i,command:c,skillUrl:l,popupTitle:n,popupDescription:b}=this._options,p=this.getFullCommand();if(this.dispatchEvent(new CustomEvent("cb-open",{bubbles:true,composed:true,detail:{command:c,fullCommand:p,harness:t.id}})),i===false){navigator.clipboard.writeText(p).then(()=>{this._options.onCopy?.(p),S(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:n||`Run on ${t.name}`,description:b||(l?`Install the skill and run the command in ${t.name}.`:`Execute this command in your terminal to get started with ${t.name}.`),command:c,fullCommand:p,skillUrl:l,onCopy:h=>{this._options.onCopy?.(h),S(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:true,composed:true,detail:{command:h,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 i=window.matchMedia("(prefers-color-scheme: dark)"),c=()=>this.render();i.addEventListener("change",c),this._mqCleanup=()=>i.removeEventListener("change",c);}}return o.observedAttributes=["command","skill-url","theme","size","variant","shape","popup","prompt-flag","popup-title","popup-description"],o}var T={};function W(t){return T[t]||(T[t]=q(d[t])),T[t]}function V(t,r){if(typeof customElements>"u")return;let e=r||d[t].tagName;customElements.get(e)||customElements.define(e,W(t));}function k(){g.forEach(t=>V(t));}function rt(t,r){let e=d[t].tagName,o=document.createElement(e);return o.options=r,o}k();function K(){if(typeof document>"u")return [];let t=[];return g.forEach(r=>{let e=d[r];document.querySelectorAll(e.tagName).forEach(o=>{let a=o.getAttribute("command")||"",s=o.getAttribute("skill-url")||void 0,l=o.getAttribute("prompt-flag")!=="false"?`${e.cliPrefix} "${a}"`:a;t.push({platform:r,command:a,fullCommand:l,...s&&{skillUrl:s}});});}),t}function Y(){let t=K();return t.length===0?{}:{"@context":"https://schema.org","@type":"WebPage",potentialAction:t.map(e=>{let o=d[e.platform],a={"@type":"EntryPoint",actionPlatform:o.urlBase};e.skillUrl?a.urlTemplate=e.skillUrl:a.urlTemplate=`${o.urlBase}?command=${encodeURIComponent(e.fullCommand||e.command)}`;let s={"@type":"Action",name:`Run on ${o.name}: ${e.command}`,description:e.command,target:a,object:{"@type":"SoftwareSourceCode",runtimePlatform:o.name,text:e.fullCommand||e.command}};return e.skillUrl&&(s.object={"@type":"SoftwareApplication",name:e.command,downloadUrl:e.skillUrl,applicationCategory:"AI Skill",operatingSystem:o.name}),s})}}function at(){if(typeof document>"u")return;let t=document.querySelector("script[data-clawbuttons-jsonld]");t&&t.remove();let r=Y();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 Ft(){k();} | ||
| export{L as CLAUDECLAW_ICON,y as ClawPopupDialog,tt as DEFAULT_BRAND_COLOR,d as HARNESSES,g as HARNESS_IDS,$ as HERMES_ICON,N as IRONCLAW_ICON,O as NANOCLAW_ICON,H as OPENCLAW_ICON,R as OPENHARNESS_ICON,M as ZEROCLAW_ICON,rt as createButton,q as createClawButtonClass,K as discoverButtons,Y as generateStructuredData,z as getBrandColor,W as getButtonClass,Q as getHarness,m as getIcon,D as getThemes,at as injectStructuredData,Ft as register,k as registerAllButtons,V as registerHarnessButton,u 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}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 | ||
| //# sourceMappingURL=index.mjs.map |
+0
-4
@@ -12,4 +12,2 @@ import { FC } from 'react'; | ||
| command: string; | ||
| /** URL to a downloadable skill package (.zip, SKILL.md, or plugin.json) */ | ||
| skillUrl?: string; | ||
| /** Theme variant. Default: 'branded' */ | ||
@@ -29,4 +27,2 @@ theme?: Theme; | ||
| onCopy?: (command: string) => void; | ||
| /** Callback fired when the skill package is downloaded */ | ||
| onDownload?: (url: string) => void; | ||
| /** Custom popup title */ | ||
@@ -33,0 +29,0 @@ popupTitle?: string; |
+0
-4
@@ -12,4 +12,2 @@ import { FC } from 'react'; | ||
| command: string; | ||
| /** URL to a downloadable skill package (.zip, SKILL.md, or plugin.json) */ | ||
| skillUrl?: string; | ||
| /** Theme variant. Default: 'branded' */ | ||
@@ -29,4 +27,2 @@ theme?: Theme; | ||
| onCopy?: (command: string) => void; | ||
| /** Callback fired when the skill package is downloaded */ | ||
| onDownload?: (url: string) => void; | ||
| /** Custom popup title */ | ||
@@ -33,0 +29,0 @@ popupTitle?: string; |
+29
-46
@@ -1,2 +0,2 @@ | ||
| "use strict";"use client";var P=Object.defineProperty;var ct=Object.getOwnPropertyDescriptor;var lt=Object.getOwnPropertyNames;var dt=Object.prototype.hasOwnProperty;var y=(t,r)=>()=>(t&&(r=t(t=0)),r);var V=(t,r)=>{for(var e in r)P(t,e,{get:r[e],enumerable:!0})},pt=(t,r,e,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of lt(r))!dt.call(t,n)&&n!==e&&P(t,n,{get:()=>r[n],enumerable:!(o=ct(r,n))||o.enumerable});return t};var ht=t=>pt(P({},"__esModule",{value:!0}),t);function Y(){return typeof document<"u"}function ut(){if(!Y())return null;let t=document.cookie.split(";").map(e=>e.trim()).find(e=>e.startsWith(`${O}=`));if(!t)return null;let r=t.slice(O.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(c=>typeof c=="string"&&c.length>0)}}catch{return null}}function bt(t){if(!Y())return;let r=t.order.slice(0,24),e=JSON.stringify({order:r}),o=new Date;o.setFullYear(o.getFullYear()+1),document.cookie=`${O}=${encodeURIComponent(e)}; Path=/; SameSite=Lax; Expires=${o.toUTCString()}`}function I(t){if(!t||typeof t!="string")return;let e=ut()?.order.filter(o=>o!==t)??[];bt({order:[t,...e]})}var O,K=y(()=>{"use strict";O="agentpreferences"});function H(t){return yt[t]}var mt,gt,ft,vt,xt,wt,Ct,yt,S,Z,G,N=y(()=>{"use strict";mt=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| "use strict";"use client";var M=Object.defineProperty;var it=Object.getOwnPropertyDescriptor;var st=Object.getOwnPropertyNames;var ct=Object.prototype.hasOwnProperty;var C=(t,r)=>()=>(t&&(r=t(t=0)),r);var W=(t,r)=>{for(var e in r)M(t,e,{get:r[e],enumerable:!0})},dt=(t,r,e,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of st(r))!ct.call(t,n)&&n!==e&&M(t,n,{get:()=>r[n],enumerable:!(o=it(r,n))||o.enumerable});return t};var lt=t=>dt(M({},"__esModule",{value:!0}),t);function U(){return typeof document<"u"}function pt(){if(!U())return null;let t=document.cookie.split(";").map(e=>e.trim()).find(e=>e.startsWith(`${L}=`));if(!t)return null;let r=t.slice(L.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 ht(t){if(!U())return;let r=t.order.slice(0,24),e=JSON.stringify({order:r}),o=new Date;o.setFullYear(o.getFullYear()+1),document.cookie=`${L}=${encodeURIComponent(e)}; Path=/; SameSite=Lax; Expires=${o.toUTCString()}`}function P(t){if(!t||typeof t!="string")return;let e=pt()?.order.filter(o=>o!==t)??[];ht({order:[t,...e]})}var L,V=C(()=>{"use strict";L="agentpreferences"});function H(t){return wt[t]}var ut,bt,mt,gt,ft,xt,vt,wt,O,Y,K,N=C(()=>{"use strict";ut=`<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"/> | ||
@@ -7,3 +7,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"/> | ||
| <circle cx="12" cy="12" r="2" fill="currentColor"/> | ||
| </svg>`,gt=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| </svg>`,bt=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <path d="M12 2L4 6v6c0 5.25 3.4 10.2 8 12 4.6-1.8 8-6.75 8-12V6l-8-4z" fill="currentColor" opacity="0.15"/> | ||
@@ -13,3 +13,3 @@ <path d="M12 2L4 6v6c0 5.25 3.4 10.2 8 12 4.6-1.8 8-6.75 8-12V6l-8-4z" stroke="currentColor" stroke-width="1.6" fill="none"/> | ||
| <circle cx="12" cy="7" r="1.2" fill="currentColor"/> | ||
| </svg>`,ft=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| </svg>`,mt=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <rect x="4" y="4" width="16" height="16" rx="3" fill="currentColor" opacity="0.15"/> | ||
@@ -19,3 +19,3 @@ <rect x="4" y="4" width="16" height="16" rx="3" stroke="currentColor" stroke-width="1.6" fill="none"/> | ||
| <path d="M4 13h16" stroke="currentColor" stroke-width="1.2" opacity="0.4"/> | ||
| </svg>`,vt=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| </svg>`,gt=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <circle cx="12" cy="12" r="9" fill="currentColor" opacity="0.12"/> | ||
@@ -26,7 +26,7 @@ <circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="1.6" fill="none"/> | ||
| <path d="M12 3v3M12 18v3M3 12h3M18 12h3" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/> | ||
| </svg>`,xt=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| </svg>`,ft=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <path d="M13 2L4.5 13.5h5L8 22l10.5-12h-5.5L15 2h-2z" fill="currentColor" opacity="0.2"/> | ||
| <path d="M13 2L4.5 13.5h5L8 22l10.5-12h-5.5L15 2h-2z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"/> | ||
| <path d="M11.5 9l-1 4h3l-1 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> | ||
| </svg>`,wt=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| </svg>`,xt=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <path d="M12 3L3 8v8l9 5 9-5V8l-9-5z" fill="currentColor" opacity="0.12"/> | ||
@@ -36,3 +36,3 @@ <path d="M12 3L3 8v8l9 5 9-5V8l-9-5z" stroke="currentColor" stroke-width="1.6" fill="none" stroke-linejoin="round"/> | ||
| <circle cx="12" cy="16" r="1.3" fill="currentColor"/> | ||
| </svg>`,Ct=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| </svg>`,vt=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <rect x="3.5" y="1.5" width="5" height="5" rx="1.5" fill="currentColor"/> | ||
@@ -47,10 +47,10 @@ <rect x="15.5" y="1.5" width="5" height="5" rx="1.5" fill="currentColor"/> | ||
| <rect x="13.5" y="18.5" width="4" height="3.5" rx="1.5" fill="currentColor"/> | ||
| </svg>`,yt={openclaw:mt,hermes:gt,ironclaw:ft,nanoclaw:vt,zeroclaw:xt,openharness:wt,claudeclaw:Ct};S=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon-sm"> | ||
| </svg>`,wt={openclaw:ut,hermes:bt,ironclaw:mt,nanoclaw:gt,zeroclaw:ft,openharness:xt,claudeclaw:vt};O=`<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"/> | ||
| <path d="M3 10V3.5A1.5 1.5 0 014.5 2H10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/> | ||
| </svg>`,Z=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon-sm"> | ||
| </svg>`,Y=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon-sm"> | ||
| <path d="M3 8.5l3.5 3.5L13 4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | ||
| </svg>`,G=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon-sm"> | ||
| </svg>`,K=`<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 m,J,_=y(()=>{"use strict";m={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."}},J=Object.keys(m)});function kt(t){return m[t].brandColor}function Et(t){let r=kt(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 g(t,r){let e=Et(r);return t!=="system"?e[t]:typeof window>"u"?e.light:window.matchMedia("(prefers-color-scheme: dark)").matches?e.dark:e.light}function $(t){return` | ||
| </svg>`});var g,Z,S=C(()=>{"use strict";g={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."}},Z=Object.keys(g)});function Ct(t){return g[t].brandColor}function yt(t){let r=Ct(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 f(t,r){let e=yt(r);return t!=="system"?e[t]:typeof window>"u"?e.light:window.matchMedia("(prefers-color-scheme: dark)").matches?e.dark:e.light}function _(t){return` | ||
| --cb-bg: ${t.bg}; | ||
@@ -66,3 +66,3 @@ --cb-text: ${t.text}; | ||
| --cb-code-text: ${t.codeText}; | ||
| `}var X,Q,R=y(()=>{"use strict";_();X={rounded:{sm:"0.375rem",md:"0.5rem",lg:"0.625rem"},pill:{sm:"999px",md:"999px",lg:"999px"},square:{sm:"0",md:"0",lg:"0"}},Q={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"}}});function tt(t){let r=document.createElement("claw-popup-dialog");return r.options=t,document.body.appendChild(r),r}var At,z,et=y(()=>{"use strict";N();R();_();At=` | ||
| `}var G,J,I=C(()=>{"use strict";S();G={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"}}});function X(t){let r=document.createElement("claw-popup-dialog");return r.options=t,document.body.appendChild(r),r}var kt,R,Q=C(()=>{"use strict";N();I();S();kt=` | ||
| :host { | ||
@@ -321,9 +321,9 @@ position: fixed; | ||
| } | ||
| `,z=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 g(e,o);let n=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;if(e==="system")return n?g("dark",o):g("light",o);let c=n?g("dark",o):g("light",o),i=g(e,o);return{...c,primary:i.primary,primaryText:i.primaryText}}render(){if(!this.shadowRoot||!this._options)return;let{harnessId:e,title:o,description:n,command:c,fullCommand:i,skillUrl:s}=this._options,l=this.resolvePopupTokens(),a=H(e),h=m[e].name,d=i||c;this.shadowRoot.innerHTML=` | ||
| <style>${At}</style> | ||
| <div style="${$(l)}"> | ||
| `,R=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 f(e,o);let n=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;if(e==="system")return n?f("dark",o):f("light",o);let l=n?f("dark",o):f("light",o),a=f(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=H(e),c=g[e].name,d=a||l;this.shadowRoot.innerHTML=` | ||
| <style>${kt}</style> | ||
| <div style="${_(s)}"> | ||
| <div class="cb-backdrop" data-action="close"></div> | ||
| <div class="cb-dialog" role="dialog" aria-modal="true" aria-labelledby="cb-dialog-title"> | ||
| <div class="cb-dialog-header"> | ||
| <div class="cb-dialog-header-icon">${a}</div> | ||
| <div class="cb-dialog-header-icon">${i}</div> | ||
| <div class="cb-dialog-header-text"> | ||
@@ -333,6 +333,6 @@ <div class="cb-dialog-title" id="cb-dialog-title">${o}</div> | ||
| </div> | ||
| <button class="cb-dialog-close" data-action="close" aria-label="Close">${G}</button> | ||
| <button class="cb-dialog-close" data-action="close" aria-label="Close">${K}</button> | ||
| </div> | ||
| <div class="cb-dialog-body"> | ||
| ${s?this.renderSkillBody(c,s,h):this.renderCommandBody(d)} | ||
| ${this.renderCommandBody(d)} | ||
| </div> | ||
@@ -351,3 +351,3 @@ <div class="cb-dialog-footer"> | ||
| <div class="cb-code-text"><span class="cb-code-prefix">$</span>${this.escapeHtml(e)}</div> | ||
| <button class="cb-copy-btn" data-action="copy" data-command="${this.escapeAttr(e)}">${S}<span>Copy</span></button> | ||
| <button class="cb-copy-btn" data-action="copy" data-command="${this.escapeAttr(e)}">${O}<span>Copy</span></button> | ||
| </div> | ||
@@ -362,20 +362,3 @@ </div> | ||
| </div> | ||
| `}renderSkillBody(e,o,n){let c=`Install the skill from ${o} and run ${e}`;return` | ||
| <div class="cb-step"> | ||
| <div class="cb-step-num">1</div> | ||
| <div class="cb-step-content"> | ||
| <div class="cb-step-label">Copy this prompt to your clipboard</div> | ||
| <div class="cb-code-block"> | ||
| <div class="cb-code-text">${this.escapeHtml(c)}</div> | ||
| <button class="cb-copy-btn" data-action="copy" data-command="${this.escapeAttr(c)}">${S}<span>Copy</span></button> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div class="cb-step"> | ||
| <div class="cb-step-num">2</div> | ||
| <div class="cb-step-content"> | ||
| <div class="cb-step-label">Paste into a ${n} session \u2014 the agent will fetch the skill and set it up for you</div> | ||
| </div> | ||
| </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 c=o.dataset.command||"";this.copyToClipboard(c,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)"),c=()=>this.render();n.addEventListener("change",c),this._mqCleanup=()=>n.removeEventListener("change",c)}async copyToClipboard(e,o){try{await navigator.clipboard.writeText(e);let n=o;o.setAttribute("data-copied","true"),n.innerHTML=`${Z}<span>Copied!</span>`,this._options.onCopy?.(e),setTimeout(()=>{o.setAttribute("data-copied","false"),n.innerHTML=`${S}<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",z)});var it={};V(it,{createButton:()=>Bt,createClawButtonClass:()=>ot,getButtonClass:()=>rt,registerAllButtons:()=>at,registerHarnessButton:()=>nt});function Ft(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=`${Y}<span>Copied!</span>`,this._options.onCopy?.(e),setTimeout(()=>{o.setAttribute("data-copied","false"),n.innerHTML=`${O}<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",R)});var nt={};W(nt,{createButton:()=>Ft,createClawButtonClass:()=>tt,getButtonClass:()=>et,registerAllButtons:()=>rt,registerHarnessButton:()=>ot});function Et(t,r,e){return` | ||
| :host { | ||
@@ -607,3 +590,3 @@ display: inline-block; | ||
| } | ||
| `}function ot(t){let r=Ft(t.brandColor,t.brandColorHover,t.brandColorActive),e=H(t.id);class o extends HTMLElement{constructor(){super();this._options={command:"",theme:"branded",size:"md",variant:"filled",popup:!0,promptFlag:!0};this._mqCleanup=null;this._rendered=!1;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(i){this._options={...this._options,...i},this.render(),this.updateLightDOM()}get options(){return this._options}get harnessId(){return t.id}syncFromAttributes(){let i=this.getAttribute("command"),s=this.getAttribute("skill-url"),l=this.getAttribute("theme"),a=this.getAttribute("size"),h=this.getAttribute("variant"),d=this.getAttribute("shape"),p=this.getAttribute("popup"),f=this.getAttribute("prompt-flag"),v=this.getAttribute("popup-title"),w=this.getAttribute("popup-description");i!==null&&(this._options.command=i),s!==null&&(this._options.skillUrl=s),l&&(this._options.theme=l),a&&(this._options.size=a),h&&(this._options.variant=h),d&&(this._options.shape=d),p!==null&&(this._options.popup=p!=="false"),f!==null&&(this._options.promptFlag=f!=="false"),v!==null&&(this._options.popupTitle=v),w!==null&&(this._options.popupDescription=w)}updateLightDOM(){let{command:i,skillUrl:s}=this._options,l=this.getFullCommand();this.setAttribute("role","button"),this.setAttribute("tabindex","0"),this.setAttribute("aria-label",`Run on ${t.name}: ${i}`),this._options.popup!==!1?this.setAttribute("aria-haspopup","dialog"):this.removeAttribute("aria-haspopup");let a=this.querySelector("a[data-cb-crawl]");a||(a=document.createElement("a"),a.setAttribute("data-cb-crawl",""),a.setAttribute("aria-hidden","true"),a.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;",this.appendChild(a)),a.textContent=`Run on ${t.name}: ${i}`,a.setAttribute("data-platform",t.id),a.setAttribute("data-command",i),a.setAttribute("data-full-command",l),s?(a.href=s,a.setAttribute("data-skill-url",s)):(a.href=`${t.urlBase}?command=${encodeURIComponent(l)}`,a.removeAttribute("data-skill-url"))}getResolvedTheme(){return this._options.theme||"branded"}getFullCommand(){let{command:i,promptFlag:s}=this._options;return s===!1?i:`${t.cliPrefix} "${i}"`}render(){if(!this.shadowRoot)return;let i=this.getResolvedTheme(),s=i==="system"?typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":i,l=this._options.variant||"filled",a=g(i,t.id),h=this._options.size||"md",d=this._options.shape||"rounded",p=Q[h],f=X[d][h];this.setAttribute("data-theme",s),this.setAttribute("data-variant",l);let v=l!=="filled"?"transparent":a.bg,w=l==="ghost"?"transparent":l==="outline"?a.primary:a.border,L=l!=="filled"?a.primary:a.text;this.shadowRoot.innerHTML=` | ||
| `}function tt(t){let r=Et(t.brandColor,t.brandColorHover,t.brandColorActive),e=H(t.id);class o extends HTMLElement{constructor(){super();this._options={command:"",theme:"branded",size:"md",variant:"filled",popup:!0,promptFlag:!0};this._mqCleanup=null;this._rendered=!1;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"),d=this.getAttribute("shape"),u=this.getAttribute("popup"),p=this.getAttribute("prompt-flag"),v=this.getAttribute("popup-title"),w=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),d&&(this._options.shape=d),u!==null&&(this._options.popup=u!=="false"),p!==null&&(this._options.promptFlag=p!=="false"),v!==null&&(this._options.popupTitle=v),w!==null&&(this._options.popupDescription=w)}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!==!1?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===!1?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=f(a,t.id),d=this._options.size||"md",u=this._options.shape||"rounded",p=J[d],v=G[u][d];this.setAttribute("data-theme",s),this.setAttribute("data-variant",i);let w=i!=="filled"?"transparent":c.bg,A=i==="ghost"?"transparent":i==="outline"?c.primary:c.border,B=i!=="filled"?c.primary:c.text;this.shadowRoot.innerHTML=` | ||
| <style>${r}</style> | ||
@@ -614,8 +597,8 @@ <button | ||
| style=" | ||
| ${$(a)} | ||
| --cb-bg: ${v}; | ||
| --cb-border: ${w}; | ||
| --cb-text: ${L}; | ||
| --cb-accent-color: ${a.primary}; | ||
| --cb-focus-color: ${a.primary}; | ||
| ${_(c)} | ||
| --cb-bg: ${w}; | ||
| --cb-border: ${A}; | ||
| --cb-text: ${B}; | ||
| --cb-accent-color: ${c.primary}; | ||
| --cb-focus-color: ${c.primary}; | ||
| --cb-height: ${p.height}; | ||
@@ -626,3 +609,3 @@ --cb-font-size: ${p.fontSize}; | ||
| --cb-gap: ${p.gap}; | ||
| --cb-radius: ${f}; | ||
| --cb-radius: ${v}; | ||
| " | ||
@@ -634,3 +617,3 @@ aria-label="Run on ${t.name}: ${this._options.command.replace(/"/g,""")}" | ||
| </button> | ||
| `;let k=this.shadowRoot.querySelector(".cb-btn");k.addEventListener("click",()=>this.handleClick()),k.addEventListener("keydown",C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),this.handleClick())}),this._rendered=!0,this.setupSystemThemeWatch()}handleClick(){let{popup:i,command:s,skillUrl:l,popupTitle:a,popupDescription:h}=this._options,d=this.getFullCommand();if(this.dispatchEvent(new CustomEvent("cb-open",{bubbles:!0,composed:!0,detail:{command:s,fullCommand:d,harness:t.id}})),i===!1){navigator.clipboard.writeText(d).then(()=>{this._options.onCopy?.(d),I(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:!0,composed:!0,detail:{command:d,harness:t.id}}))});return}tt({harnessId:t.id,theme:this.getResolvedTheme(),title:a||`Run on ${t.name}`,description:h||(l?`Install the skill and run the command in ${t.name}.`:`Execute this command in your terminal to get started with ${t.name}.`),command:s,fullCommand:d,skillUrl:l,onCopy:p=>{this._options.onCopy?.(p),I(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:!0,composed:!0,detail:{command:p,harness:t.id}}))},onClose:()=>{this.dispatchEvent(new CustomEvent("cb-close",{bubbles:!0,composed:!0,detail:{harness:t.id}}))}})}setupSystemThemeWatch(){if(this._mqCleanup?.(),this._mqCleanup=null,this.getResolvedTheme()!=="system"||typeof window>"u")return;let i=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>this.render();i.addEventListener("change",s),this._mqCleanup=()=>i.removeEventListener("change",s)}}return o.observedAttributes=["command","skill-url","theme","size","variant","shape","popup","prompt-flag","popup-title","popup-description"],o}function rt(t){return D[t]||(D[t]=ot(m[t])),D[t]}function nt(t,r){if(typeof customElements>"u")return;let e=r||m[t].tagName;customElements.get(e)||customElements.define(e,rt(t))}function at(){J.forEach(t=>nt(t))}function Bt(t,r){let e=m[t].tagName,o=document.createElement(e);return o.options=r,o}var D,st=y(()=>{"use strict";K();N();R();et();_();D={};at()});var Pt={};V(Pt,{ClaudeClawButton:()=>Lt,HermesAgentButton:()=>M.HermesButton,HermesAgentSkillButton:()=>M.HermesSkillButton,HermesButton:()=>Ht,IronClawButton:()=>St,NanoClawButton:()=>_t,OpenClawButton:()=>Tt,OpenHarnessButton:()=>Mt,ZeroClawButton:()=>$t});module.exports=ht(Pt);var u=require("react"),M=require("hermesbuttons/react");function x(t,r){let e=({command:o,skillUrl:n,theme:c="branded",size:i="md",variant:s="filled",shape:l="rounded",popup:a=!0,promptFlag:h=!0,onCopy:d,onDownload:p,popupTitle:f,popupDescription:v,className:w,style:L,onCbCopy:k,onCbOpen:C,onCbClose:q})=>{let E=(0,u.useRef)(null),A=(0,u.useRef)(null),j=(0,u.useRef)(k);j.current=k;let W=(0,u.useRef)(C);W.current=C;let U=(0,u.useRef)(q);return U.current=q,(0,u.useEffect)(()=>{if(E.current)return Promise.resolve().then(()=>(st(),it)).then(({getButtonClass:b})=>{if(!E.current||A.current)return;b(t);let T=`${t==="openharness"?"openharness":t}-button`,F=document.createElement(T);A.current=F,F.addEventListener("cb-copy",(B=>j.current?.(B))),F.addEventListener("cb-open",(B=>W.current?.(B))),F.addEventListener("cb-close",(B=>U.current?.(B))),E.current.appendChild(F)}),()=>{let b=A.current,T=E.current;b&&T?.contains(b)&&T.removeChild(b),A.current=null}},[]),(0,u.useEffect)(()=>{let b=A.current;!b||!("options"in b)||(b.options={command:o,skillUrl:n,theme:c,size:i,variant:s,shape:l,popup:a,promptFlag:h,onCopy:d,onDownload:p,popupTitle:f,popupDescription:v})},[o,n,c,i,s,l,a,h,d,p,f,v]),(0,u.createElement)("div",{ref:E,className:w,style:{display:"inline-block",...L},suppressHydrationWarning:!0})};return e.displayName=r,e}var Tt=x("openclaw","OpenClawButton"),Ht=x("hermes","HermesButton"),St=x("ironclaw","IronClawButton"),_t=x("nanoclaw","NanoClawButton"),$t=x("zeroclaw","ZeroClawButton"),Mt=x("openharness","OpenHarnessButton"),Lt=x("claudeclaw","ClaudeClawButton");0&&(module.exports={ClaudeClawButton,HermesAgentButton,HermesAgentSkillButton,HermesButton,IronClawButton,NanoClawButton,OpenClawButton,OpenHarnessButton,ZeroClawButton}); | ||
| `;let y=this.shadowRoot.querySelector(".cb-btn");y.addEventListener("click",()=>this.handleClick()),y.addEventListener("keydown",b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),this.handleClick())}),this._rendered=!0,this.setupSystemThemeWatch()}handleClick(){let{popup:a,command:s,popupTitle:i,popupDescription:c}=this._options,d=this.getFullCommand();if(this.dispatchEvent(new CustomEvent("cb-open",{bubbles:!0,composed:!0,detail:{command:s,fullCommand:d,harness:t.id}})),a===!1){navigator.clipboard.writeText(d).then(()=>{this._options.onCopy?.(d),P(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:!0,composed:!0,detail:{command:d,harness:t.id}}))});return}X({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:d,onCopy:u=>{this._options.onCopy?.(u),P(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:!0,composed:!0,detail:{command:u,harness:t.id}}))},onClose:()=>{this.dispatchEvent(new CustomEvent("cb-close",{bubbles:!0,composed:!0,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}function et(t){return z[t]||(z[t]=tt(g[t])),z[t]}function ot(t,r){if(typeof customElements>"u")return;let e=r||g[t].tagName;customElements.get(e)||customElements.define(e,et(t))}function rt(){Z.forEach(t=>ot(t))}function Ft(t,r){let e=g[t].tagName,o=document.createElement(e);return o.options=r,o}var z,at=C(()=>{"use strict";V();N();I();Q();S();z={};rt()});var Mt={};W(Mt,{ClaudeClawButton:()=>$t,HermesAgentButton:()=>$.HermesButton,HermesAgentSkillButton:()=>$.HermesSkillButton,HermesButton:()=>Bt,IronClawButton:()=>Tt,NanoClawButton:()=>Ht,OpenClawButton:()=>At,OpenHarnessButton:()=>_t,ZeroClawButton:()=>St});module.exports=lt(Mt);var h=require("react"),$=require("hermesbuttons/react");function x(t,r){let e=({command:o,theme:n="branded",size:l="md",variant:a="filled",shape:s="rounded",popup:i=!0,promptFlag:c=!0,onCopy:d,popupTitle:u,popupDescription:p,className:v,style:w,onCbCopy:A,onCbOpen:B,onCbClose:y})=>{let b=(0,h.useRef)(null),k=(0,h.useRef)(null),D=(0,h.useRef)(A);D.current=A;let q=(0,h.useRef)(B);q.current=B;let j=(0,h.useRef)(y);return j.current=y,(0,h.useEffect)(()=>{if(b.current)return Promise.resolve().then(()=>(at(),nt)).then(({getButtonClass:m})=>{if(!b.current||k.current)return;m(t);let T=`${t==="openharness"?"openharness":t}-button`,E=document.createElement(T);k.current=E,E.addEventListener("cb-copy",(F=>D.current?.(F))),E.addEventListener("cb-open",(F=>q.current?.(F))),E.addEventListener("cb-close",(F=>j.current?.(F))),b.current.appendChild(E)}),()=>{let m=k.current,T=b.current;m&&T?.contains(m)&&T.removeChild(m),k.current=null}},[]),(0,h.useEffect)(()=>{let m=k.current;!m||!("options"in m)||(m.options={command:o,theme:n,size:l,variant:a,shape:s,popup:i,promptFlag:c,onCopy:d,popupTitle:u,popupDescription:p})},[o,n,l,a,s,i,c,d,u,p]),(0,h.createElement)("div",{ref:b,className:v,style:{display:"inline-block",...w},suppressHydrationWarning:!0})};return e.displayName=r,e}var At=x("openclaw","OpenClawButton"),Bt=x("hermes","HermesButton"),Tt=x("ironclaw","IronClawButton"),Ht=x("nanoclaw","NanoClawButton"),St=x("zeroclaw","ZeroClawButton"),_t=x("openharness","OpenHarnessButton"),$t=x("claudeclaw","ClaudeClawButton");0&&(module.exports={ClaudeClawButton,HermesAgentButton,HermesAgentSkillButton,HermesButton,IronClawButton,NanoClawButton,OpenClawButton,OpenHarnessButton,ZeroClawButton}); | ||
| //# sourceMappingURL=react.js.map |
+1
-1
@@ -1,2 +0,2 @@ | ||
| "use client";import{useRef as a,useEffect as P,createElement as N}from"react";import{HermesButton as z,HermesSkillButton as G}from"hermesbuttons/react";function e(c,I){let l=({command:i,skillUrl:m,theme:p="branded",size:d="md",variant:C="filled",shape:B="rounded",popup:f=!0,promptFlag:v=!0,onCopy:w,onDownload:E,popupTitle:H,popupDescription:g,className:R,style:S,onCbCopy:x,onCbOpen:y,onCbClose:b})=>{let n=a(null),r=a(null),h=a(x);h.current=x;let O=a(y);O.current=y;let L=a(b);return L.current=b,P(()=>{if(n.current)return import("./claw-button-WGA6YKUX.mjs").then(({getButtonClass:t})=>{if(!n.current||r.current)return;t(c);let u=`${c==="openharness"?"openharness":c}-button`,s=document.createElement(u);r.current=s,s.addEventListener("cb-copy",(o=>h.current?.(o))),s.addEventListener("cb-open",(o=>O.current?.(o))),s.addEventListener("cb-close",(o=>L.current?.(o))),n.current.appendChild(s)}),()=>{let t=r.current,u=n.current;t&&u?.contains(t)&&u.removeChild(t),r.current=null}},[]),P(()=>{let t=r.current;!t||!("options"in t)||(t.options={command:i,skillUrl:m,theme:p,size:d,variant:C,shape:B,popup:f,promptFlag:v,onCopy:w,onDownload:E,popupTitle:H,popupDescription:g})},[i,m,p,d,C,B,f,v,w,E,H,g]),N("div",{ref:n,className:R,style:{display:"inline-block",...S},suppressHydrationWarning:!0})};return l.displayName=I,l}var A=e("openclaw","OpenClawButton"),F=e("hermes","HermesButton"),M=e("ironclaw","IronClawButton"),Z=e("nanoclaw","NanoClawButton"),T=e("zeroclaw","ZeroClawButton"),W=e("openharness","OpenHarnessButton"),$=e("claudeclaw","ClaudeClawButton");export{$ as ClaudeClawButton,z as HermesAgentButton,G as HermesAgentSkillButton,F as HermesButton,M as IronClawButton,Z as NanoClawButton,A as OpenClawButton,W as OpenHarnessButton,T as ZeroClawButton}; | ||
| "use client";import{useRef as a,useEffect as O,createElement as R}from"react";import{HermesButton as j,HermesSkillButton as q}from"hermesbuttons/react";function e(c,L){let l=({command:i,theme:m="branded",size:p="md",variant:d="filled",shape:C="rounded",popup:B=!0,promptFlag:f=!0,onCopy:w,popupTitle:v,popupDescription:E,className:P,style:I,onCbCopy:H,onCbOpen:g,onCbClose:x})=>{let n=a(null),r=a(null),y=a(H);y.current=H;let b=a(g);b.current=g;let h=a(x);return h.current=x,O(()=>{if(n.current)return import("./claw-button-TUCU7DC6.mjs").then(({getButtonClass:t})=>{if(!n.current||r.current)return;t(c);let u=`${c==="openharness"?"openharness":c}-button`,s=document.createElement(u);r.current=s,s.addEventListener("cb-copy",(o=>y.current?.(o))),s.addEventListener("cb-open",(o=>b.current?.(o))),s.addEventListener("cb-close",(o=>h.current?.(o))),n.current.appendChild(s)}),()=>{let t=r.current,u=n.current;t&&u?.contains(t)&&u.removeChild(t),r.current=null}},[]),O(()=>{let t=r.current;!t||!("options"in t)||(t.options={command:i,theme:m,size:p,variant:d,shape:C,popup:B,promptFlag:f,onCopy:w,popupTitle:v,popupDescription:E})},[i,m,p,d,C,B,f,w,v,E]),R("div",{ref:n,className:P,style:{display:"inline-block",...I},suppressHydrationWarning:!0})};return l.displayName=L,l}var k=e("openclaw","OpenClawButton"),N=e("hermes","HermesButton"),A=e("ironclaw","IronClawButton"),F=e("nanoclaw","NanoClawButton"),M=e("zeroclaw","ZeroClawButton"),Z=e("openharness","OpenHarnessButton"),T=e("claudeclaw","ClaudeClawButton");export{T as ClaudeClawButton,j as HermesAgentButton,q as HermesAgentSkillButton,N as HermesButton,A as IronClawButton,F as NanoClawButton,k as OpenClawButton,Z as OpenHarnessButton,M as ZeroClawButton}; | ||
| //# sourceMappingURL=react.mjs.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../src/react.ts"],"sourcesContent":["'use client';\n\nimport {\n useRef,\n useEffect,\n createElement,\n type FC,\n} from 'react';\nimport type { ClawButtonOptions, HarnessId } from './types';\n\nexport type { ClawButtonOptions, HarnessId };\n\nexport interface ClawButtonProps extends ClawButtonOptions {\n harnessId: HarnessId;\n className?: string;\n style?: React.CSSProperties;\n onCbCopy?: (e: CustomEvent<{ command: string; harness: string }>) => void;\n onCbOpen?: (e: CustomEvent<{ command: string; fullCommand: string; harness: string }>) => void;\n onCbClose?: (e: CustomEvent<{ harness: string }>) => void;\n}\n\nfunction createHarnessButton(harnessId: HarnessId, displayName: string): FC<Omit<ClawButtonProps, 'harnessId'>> {\n const Component: FC<Omit<ClawButtonProps, 'harnessId'>> = ({\n command,\n skillUrl,\n theme = 'branded',\n size = 'md',\n variant = 'filled',\n shape = 'rounded',\n popup = true,\n promptFlag = true,\n onCopy,\n onDownload,\n popupTitle,\n popupDescription,\n className,\n style,\n onCbCopy,\n onCbOpen,\n onCbClose,\n }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const elRef = useRef<HTMLElement | null>(null);\n\n const cbCopyRef = useRef(onCbCopy);\n cbCopyRef.current = onCbCopy;\n const cbOpenRef = useRef(onCbOpen);\n cbOpenRef.current = onCbOpen;\n const cbCloseRef = useRef(onCbClose);\n cbCloseRef.current = onCbClose;\n\n useEffect(() => {\n if (!containerRef.current) return;\n\n import('./claw-button').then(({ getButtonClass }) => {\n if (!containerRef.current || elRef.current) return;\n\n getButtonClass(harnessId);\n\n const tagName = `${harnessId === 'openharness' ? 'openharness' : harnessId}-button`;\n const el = document.createElement(tagName);\n elRef.current = el;\n\n el.addEventListener('cb-copy', ((e: Event) => cbCopyRef.current?.(e as CustomEvent)) as EventListener);\n el.addEventListener('cb-open', ((e: Event) => cbOpenRef.current?.(e as CustomEvent)) as EventListener);\n el.addEventListener('cb-close', ((e: Event) => cbCloseRef.current?.(e as CustomEvent)) as EventListener);\n\n containerRef.current.appendChild(el);\n });\n\n return () => {\n const el = elRef.current;\n const container = containerRef.current;\n if (el && container?.contains(el)) {\n container.removeChild(el);\n }\n elRef.current = null;\n };\n }, []);\n\n useEffect(() => {\n const el = elRef.current;\n if (!el || !('options' in el)) return;\n\n (el as any).options = {\n command,\n skillUrl,\n theme,\n size,\n variant,\n shape,\n popup,\n promptFlag,\n onCopy,\n onDownload,\n popupTitle,\n popupDescription,\n };\n }, [command, skillUrl, theme, size, variant, shape, popup, promptFlag, onCopy, onDownload, popupTitle, popupDescription]);\n\n return createElement('div', {\n ref: containerRef,\n className,\n style: { display: 'inline-block', ...style },\n suppressHydrationWarning: true,\n });\n };\n\n Component.displayName = displayName;\n return Component;\n}\n\nexport const OpenClawButton = createHarnessButton('openclaw', 'OpenClawButton');\nexport const HermesButton = createHarnessButton('hermes', 'HermesButton');\nexport const IronClawButton = createHarnessButton('ironclaw', 'IronClawButton');\nexport const NanoClawButton = createHarnessButton('nanoclaw', 'NanoClawButton');\nexport const ZeroClawButton = createHarnessButton('zeroclaw', 'ZeroClawButton');\nexport const OpenHarnessButton = createHarnessButton('openharness', 'OpenHarnessButton');\nexport const ClaudeClawButton = createHarnessButton('claudeclaw', 'ClaudeClawButton');\n\nexport {\n HermesButton as HermesAgentButton,\n HermesSkillButton as HermesAgentSkillButton,\n} from 'hermesbuttons/react';\n\nexport type {\n HermesButtonProps as HermesAgentButtonProps,\n HermesSkillButtonProps as HermesAgentSkillButtonProps,\n} from 'hermesbuttons/react';\n"],"mappings":"aAEA,OACE,UAAAA,EACA,aAAAC,EACA,iBAAAC,MAEK,QAiHP,OACkB,gBAAhBC,EACqB,qBAArBC,MACK,sBAtGP,SAASC,EAAoBC,EAAsBC,EAA6D,CAC9G,IAAMC,EAAoD,CAAC,CACzD,QAAAC,EACA,SAAAC,EACA,MAAAC,EAAQ,UACR,KAAAC,EAAO,KACP,QAAAC,EAAU,SACV,MAAAC,EAAQ,UACR,MAAAC,EAAQ,GACR,WAAAC,EAAa,GACb,OAAAC,EACA,WAAAC,EACA,WAAAC,EACA,iBAAAC,EACA,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,SAAAC,EACA,UAAAC,CACF,IAAM,CACJ,IAAMC,EAAe1B,EAAuB,IAAI,EAC1C2B,EAAQ3B,EAA2B,IAAI,EAEvC4B,EAAY5B,EAAOuB,CAAQ,EACjCK,EAAU,QAAUL,EACpB,IAAMM,EAAY7B,EAAOwB,CAAQ,EACjCK,EAAU,QAAUL,EACpB,IAAMM,EAAa9B,EAAOyB,CAAS,EACnC,OAAAK,EAAW,QAAUL,EAErBxB,EAAU,IAAM,CACd,GAAKyB,EAAa,QAElB,cAAO,4BAAe,EAAE,KAAK,CAAC,CAAE,eAAAK,CAAe,IAAM,CACnD,GAAI,CAACL,EAAa,SAAWC,EAAM,QAAS,OAE5CI,EAAezB,CAAS,EAExB,IAAM0B,EAAU,GAAG1B,IAAc,cAAgB,cAAgBA,CAAS,UACpE2B,EAAK,SAAS,cAAcD,CAAO,EACzCL,EAAM,QAAUM,EAEhBA,EAAG,iBAAiB,WAAaC,GAAaN,EAAU,UAAUM,CAAgB,EAAmB,EACrGD,EAAG,iBAAiB,WAAaC,GAAaL,EAAU,UAAUK,CAAgB,EAAmB,EACrGD,EAAG,iBAAiB,YAAcC,GAAaJ,EAAW,UAAUI,CAAgB,EAAmB,EAEvGR,EAAa,QAAQ,YAAYO,CAAE,CACrC,CAAC,EAEM,IAAM,CACX,IAAMA,EAAKN,EAAM,QACXQ,EAAYT,EAAa,QAC3BO,GAAME,GAAW,SAASF,CAAE,GAC9BE,EAAU,YAAYF,CAAE,EAE1BN,EAAM,QAAU,IAClB,CACF,EAAG,CAAC,CAAC,EAEL1B,EAAU,IAAM,CACd,IAAMgC,EAAKN,EAAM,QACb,CAACM,GAAM,EAAE,YAAaA,KAEzBA,EAAW,QAAU,CACpB,QAAAxB,EACA,SAAAC,EACA,MAAAC,EACA,KAAAC,EACA,QAAAC,EACA,MAAAC,EACA,MAAAC,EACA,WAAAC,EACA,OAAAC,EACA,WAAAC,EACA,WAAAC,EACA,iBAAAC,CACF,EACF,EAAG,CAACX,EAASC,EAAUC,EAAOC,EAAMC,EAASC,EAAOC,EAAOC,EAAYC,EAAQC,EAAYC,EAAYC,CAAgB,CAAC,EAEjHlB,EAAc,MAAO,CAC1B,IAAKwB,EACL,UAAAL,EACA,MAAO,CAAE,QAAS,eAAgB,GAAGC,CAAM,EAC3C,yBAA0B,EAC5B,CAAC,CACH,EAEA,OAAAd,EAAU,YAAcD,EACjBC,CACT,CAEO,IAAM4B,EAAiB/B,EAAoB,WAAY,gBAAgB,EACjEF,EAAeE,EAAoB,SAAU,cAAc,EAC3DgC,EAAiBhC,EAAoB,WAAY,gBAAgB,EACjEiC,EAAiBjC,EAAoB,WAAY,gBAAgB,EACjEkC,EAAiBlC,EAAoB,WAAY,gBAAgB,EACjEmC,EAAoBnC,EAAoB,cAAe,mBAAmB,EAC1EoC,EAAmBpC,EAAoB,aAAc,kBAAkB","names":["useRef","useEffect","createElement","HermesButton","HermesSkillButton","createHarnessButton","harnessId","displayName","Component","command","skillUrl","theme","size","variant","shape","popup","promptFlag","onCopy","onDownload","popupTitle","popupDescription","className","style","onCbCopy","onCbOpen","onCbClose","containerRef","elRef","cbCopyRef","cbOpenRef","cbCloseRef","getButtonClass","tagName","el","e","container","OpenClawButton","IronClawButton","NanoClawButton","ZeroClawButton","OpenHarnessButton","ClaudeClawButton"]} | ||
| {"version":3,"sources":["../src/react.ts"],"sourcesContent":["'use client';\n\nimport {\n useRef,\n useEffect,\n createElement,\n type FC,\n} from 'react';\nimport type { ClawButtonOptions, HarnessId } from './types';\n\nexport type { ClawButtonOptions, HarnessId };\n\nexport interface ClawButtonProps extends ClawButtonOptions {\n harnessId: HarnessId;\n className?: string;\n style?: React.CSSProperties;\n onCbCopy?: (e: CustomEvent<{ command: string; harness: string }>) => void;\n onCbOpen?: (e: CustomEvent<{ command: string; fullCommand: string; harness: string }>) => void;\n onCbClose?: (e: CustomEvent<{ harness: string }>) => void;\n}\n\nfunction createHarnessButton(harnessId: HarnessId, displayName: string): FC<Omit<ClawButtonProps, 'harnessId'>> {\n const Component: FC<Omit<ClawButtonProps, 'harnessId'>> = ({\n command,\n theme = 'branded',\n size = 'md',\n variant = 'filled',\n shape = 'rounded',\n popup = true,\n promptFlag = true,\n onCopy,\n popupTitle,\n popupDescription,\n className,\n style,\n onCbCopy,\n onCbOpen,\n onCbClose,\n }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const elRef = useRef<HTMLElement | null>(null);\n\n const cbCopyRef = useRef(onCbCopy);\n cbCopyRef.current = onCbCopy;\n const cbOpenRef = useRef(onCbOpen);\n cbOpenRef.current = onCbOpen;\n const cbCloseRef = useRef(onCbClose);\n cbCloseRef.current = onCbClose;\n\n useEffect(() => {\n if (!containerRef.current) return;\n\n import('./claw-button').then(({ getButtonClass }) => {\n if (!containerRef.current || elRef.current) return;\n\n getButtonClass(harnessId);\n\n const tagName = `${harnessId === 'openharness' ? 'openharness' : harnessId}-button`;\n const el = document.createElement(tagName);\n elRef.current = el;\n\n el.addEventListener('cb-copy', ((e: Event) => cbCopyRef.current?.(e as CustomEvent)) as EventListener);\n el.addEventListener('cb-open', ((e: Event) => cbOpenRef.current?.(e as CustomEvent)) as EventListener);\n el.addEventListener('cb-close', ((e: Event) => cbCloseRef.current?.(e as CustomEvent)) as EventListener);\n\n containerRef.current.appendChild(el);\n });\n\n return () => {\n const el = elRef.current;\n const container = containerRef.current;\n if (el && container?.contains(el)) {\n container.removeChild(el);\n }\n elRef.current = null;\n };\n }, []);\n\n useEffect(() => {\n const el = elRef.current;\n if (!el || !('options' in el)) return;\n\n (el as any).options = {\n command,\n theme,\n size,\n variant,\n shape,\n popup,\n promptFlag,\n onCopy,\n popupTitle,\n popupDescription,\n };\n }, [command, theme, size, variant, shape, popup, promptFlag, onCopy, popupTitle, popupDescription]);\n\n return createElement('div', {\n ref: containerRef,\n className,\n style: { display: 'inline-block', ...style },\n suppressHydrationWarning: true,\n });\n };\n\n Component.displayName = displayName;\n return Component;\n}\n\nexport const OpenClawButton = createHarnessButton('openclaw', 'OpenClawButton');\nexport const HermesButton = createHarnessButton('hermes', 'HermesButton');\nexport const IronClawButton = createHarnessButton('ironclaw', 'IronClawButton');\nexport const NanoClawButton = createHarnessButton('nanoclaw', 'NanoClawButton');\nexport const ZeroClawButton = createHarnessButton('zeroclaw', 'ZeroClawButton');\nexport const OpenHarnessButton = createHarnessButton('openharness', 'OpenHarnessButton');\nexport const ClaudeClawButton = createHarnessButton('claudeclaw', 'ClaudeClawButton');\n\nexport {\n HermesButton as HermesAgentButton,\n HermesSkillButton as HermesAgentSkillButton,\n} from 'hermesbuttons/react';\n\nexport type {\n HermesButtonProps as HermesAgentButtonProps,\n HermesSkillButtonProps as HermesAgentSkillButtonProps,\n} from 'hermesbuttons/react';\n"],"mappings":"aAEA,OACE,UAAAA,EACA,aAAAC,EACA,iBAAAC,MAEK,QA6GP,OACkB,gBAAhBC,EACqB,qBAArBC,MACK,sBAlGP,SAASC,EAAoBC,EAAsBC,EAA6D,CAC9G,IAAMC,EAAoD,CAAC,CACzD,QAAAC,EACA,MAAAC,EAAQ,UACR,KAAAC,EAAO,KACP,QAAAC,EAAU,SACV,MAAAC,EAAQ,UACR,MAAAC,EAAQ,GACR,WAAAC,EAAa,GACb,OAAAC,EACA,WAAAC,EACA,iBAAAC,EACA,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,SAAAC,EACA,UAAAC,CACF,IAAM,CACJ,IAAMC,EAAexB,EAAuB,IAAI,EAC1CyB,EAAQzB,EAA2B,IAAI,EAEvC0B,EAAY1B,EAAOqB,CAAQ,EACjCK,EAAU,QAAUL,EACpB,IAAMM,EAAY3B,EAAOsB,CAAQ,EACjCK,EAAU,QAAUL,EACpB,IAAMM,EAAa5B,EAAOuB,CAAS,EACnC,OAAAK,EAAW,QAAUL,EAErBtB,EAAU,IAAM,CACd,GAAKuB,EAAa,QAElB,cAAO,4BAAe,EAAE,KAAK,CAAC,CAAE,eAAAK,CAAe,IAAM,CACnD,GAAI,CAACL,EAAa,SAAWC,EAAM,QAAS,OAE5CI,EAAevB,CAAS,EAExB,IAAMwB,EAAU,GAAGxB,IAAc,cAAgB,cAAgBA,CAAS,UACpEyB,EAAK,SAAS,cAAcD,CAAO,EACzCL,EAAM,QAAUM,EAEhBA,EAAG,iBAAiB,WAAaC,GAAaN,EAAU,UAAUM,CAAgB,EAAmB,EACrGD,EAAG,iBAAiB,WAAaC,GAAaL,EAAU,UAAUK,CAAgB,EAAmB,EACrGD,EAAG,iBAAiB,YAAcC,GAAaJ,EAAW,UAAUI,CAAgB,EAAmB,EAEvGR,EAAa,QAAQ,YAAYO,CAAE,CACrC,CAAC,EAEM,IAAM,CACX,IAAMA,EAAKN,EAAM,QACXQ,EAAYT,EAAa,QAC3BO,GAAME,GAAW,SAASF,CAAE,GAC9BE,EAAU,YAAYF,CAAE,EAE1BN,EAAM,QAAU,IAClB,CACF,EAAG,CAAC,CAAC,EAELxB,EAAU,IAAM,CACd,IAAM8B,EAAKN,EAAM,QACb,CAACM,GAAM,EAAE,YAAaA,KAEzBA,EAAW,QAAU,CACpB,QAAAtB,EACA,MAAAC,EACA,KAAAC,EACA,QAAAC,EACA,MAAAC,EACA,MAAAC,EACA,WAAAC,EACA,OAAAC,EACA,WAAAC,EACA,iBAAAC,CACF,EACF,EAAG,CAACT,EAASC,EAAOC,EAAMC,EAASC,EAAOC,EAAOC,EAAYC,EAAQC,EAAYC,CAAgB,CAAC,EAE3FhB,EAAc,MAAO,CAC1B,IAAKsB,EACL,UAAAL,EACA,MAAO,CAAE,QAAS,eAAgB,GAAGC,CAAM,EAC3C,yBAA0B,EAC5B,CAAC,CACH,EAEA,OAAAZ,EAAU,YAAcD,EACjBC,CACT,CAEO,IAAM0B,EAAiB7B,EAAoB,WAAY,gBAAgB,EACjEF,EAAeE,EAAoB,SAAU,cAAc,EAC3D8B,EAAiB9B,EAAoB,WAAY,gBAAgB,EACjE+B,EAAiB/B,EAAoB,WAAY,gBAAgB,EACjEgC,EAAiBhC,EAAoB,WAAY,gBAAgB,EACjEiC,EAAoBjC,EAAoB,cAAe,mBAAmB,EAC1EkC,EAAmBlC,EAAoB,aAAc,kBAAkB","names":["useRef","useEffect","createElement","HermesButton","HermesSkillButton","createHarnessButton","harnessId","displayName","Component","command","theme","size","variant","shape","popup","promptFlag","onCopy","popupTitle","popupDescription","className","style","onCbCopy","onCbOpen","onCbClose","containerRef","elRef","cbCopyRef","cbOpenRef","cbCloseRef","getButtonClass","tagName","el","e","container","OpenClawButton","IronClawButton","NanoClawButton","ZeroClawButton","OpenHarnessButton","ClaudeClawButton"]} |
+0
-4
@@ -11,4 +11,2 @@ export { HermesButtonsPlugin } from 'hermesbuttons/vue'; | ||
| command: string; | ||
| /** URL to a downloadable skill package (.zip, SKILL.md, or plugin.json) */ | ||
| skillUrl?: string; | ||
| /** Theme variant. Default: 'branded' */ | ||
@@ -28,4 +26,2 @@ theme?: Theme; | ||
| onCopy?: (command: string) => void; | ||
| /** Callback fired when the skill package is downloaded */ | ||
| onDownload?: (url: string) => void; | ||
| /** Custom popup title */ | ||
@@ -32,0 +28,0 @@ popupTitle?: string; |
+0
-4
@@ -11,4 +11,2 @@ export { HermesButtonsPlugin } from 'hermesbuttons/vue'; | ||
| command: string; | ||
| /** URL to a downloadable skill package (.zip, SKILL.md, or plugin.json) */ | ||
| skillUrl?: string; | ||
| /** Theme variant. Default: 'branded' */ | ||
@@ -28,4 +26,2 @@ theme?: Theme; | ||
| onCopy?: (command: string) => void; | ||
| /** Callback fired when the skill package is downloaded */ | ||
| onDownload?: (url: string) => void; | ||
| /** Custom popup title */ | ||
@@ -32,0 +28,0 @@ popupTitle?: string; |
+22
-39
@@ -1,2 +0,2 @@ | ||
| "use strict";var k=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var j=(t,r)=>{for(var e in r)k(t,e,{get:r[e],enumerable:!0})},U=(t,r,e,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of D(r))!q.call(t,a)&&a!==e&&k(t,a,{get:()=>r[a],enumerable:!(o=z(r,a))||o.enumerable});return t};var W=t=>U(k({},"__esModule",{value:!0}),t);var ht={};j(ht,{ClawButtonsPlugin:()=>I,HermesButtonsPlugin:()=>O.HermesButtonsPlugin,default:()=>pt});module.exports=W(ht);var E="agentpreferences";function $(){return typeof document<"u"}function V(){if(!$())return null;let t=document.cookie.split(";").map(e=>e.trim()).find(e=>e.startsWith(`${E}=`));if(!t)return null;let r=t.slice(E.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(c=>typeof c=="string"&&c.length>0)}}catch{return null}}function Y(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=`${E}=${encodeURIComponent(e)}; Path=/; SameSite=Lax; Expires=${o.toUTCString()}`}function A(t){if(!t||typeof t!="string")return;let e=V()?.order.filter(o=>o!==t)??[];Y({order:[t,...e]})}var K=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| "use strict";var C=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var j=(t,r)=>{for(var e in r)C(t,e,{get:r[e],enumerable:!0})},W=(t,r,e,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of D(r))!q.call(t,a)&&a!==e&&C(t,a,{get:()=>r[a],enumerable:!(o=z(r,a))||o.enumerable});return t};var U=t=>W(C({},"__esModule",{value:!0}),t);var ht={};j(ht,{ClawButtonsPlugin:()=>P,HermesButtonsPlugin:()=>O.HermesButtonsPlugin,default:()=>pt});module.exports=U(ht);var y="agentpreferences";function _(){return typeof document<"u"}function V(){if(!_())return null;let t=document.cookie.split(";").map(e=>e.trim()).find(e=>e.startsWith(`${y}=`));if(!t)return null;let r=t.slice(y.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 Y(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=`${y}=${encodeURIComponent(e)}; Path=/; SameSite=Lax; Expires=${o.toUTCString()}`}function k(t){if(!t||typeof t!="string")return;let e=V()?.order.filter(o=>o!==t)??[];Y({order:[t,...e]})}var K=`<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>`,et={openclaw:K,hermes:G,ironclaw:Z,nanoclaw:J,zeroclaw:X,openharness:Q,claudeclaw:tt};function v(t){return et[t]}var x=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon-sm"> | ||
| </svg>`,et={openclaw:K,hermes:G,ironclaw:Z,nanoclaw:J,zeroclaw:X,openharness:Q,claudeclaw:tt};function f(t){return et[t]}var E=`<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"/> | ||
@@ -50,3 +50,3 @@ <path d="M3 10V3.5A1.5 1.5 0 014.5 2H10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/> | ||
| <path d="M4 4l8 8m0-8l-8 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/> | ||
| </svg>`;var h={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."}},w=Object.keys(h);function ot(t){return h[t].brandColor}function rt(t){let r=ot(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 u(t,r){let e=rt(r);return t!=="system"?e[t]:typeof window>"u"?e.light:window.matchMedia("(prefers-color-scheme: dark)").matches?e.dark:e.light}function y(t){return` | ||
| </svg>`;var p={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."}},x=Object.keys(p);function ot(t){return p[t].brandColor}function rt(t){let r=ot(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=rt(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 M={rounded:{sm:"0.375rem",md:"0.5rem",lg:"0.625rem"},pill:{sm:"999px",md:"999px",lg:"999px"},square:{sm:"0",md:"0",lg:"0"}},N={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 at=` | ||
| `}var M={rounded:{sm:"0.375rem",md:"0.5rem",lg:"0.625rem"},pill:{sm:"999px",md:"999px",lg:"999px"},square:{sm:"0",md:"0",lg:"0"}},$={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 at=` | ||
| :host { | ||
@@ -317,9 +317,9 @@ position: fixed; | ||
| } | ||
| `,F=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 u(e,o);let a=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;if(e==="system")return a?u("dark",o):u("light",o);let c=a?u("dark",o):u("light",o),i=u(e,o);return{...c,primary:i.primary,primaryText:i.primaryText}}render(){if(!this.shadowRoot||!this._options)return;let{harnessId:e,title:o,description:a,command:c,fullCommand:i,skillUrl:s}=this._options,d=this.resolvePopupTokens(),n=v(e),b=h[e].name,l=i||c;this.shadowRoot.innerHTML=` | ||
| `,A=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 a=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;if(e==="system")return a?h("dark",o):h("light",o);let l=a?h("dark",o):h("light",o),n=h(e,o);return{...l,primary:n.primary,primaryText:n.primaryText}}render(){if(!this.shadowRoot||!this._options)return;let{harnessId:e,title:o,description:a,command:l,fullCommand:n}=this._options,s=this.resolvePopupTokens(),i=f(e),c=p[e].name,d=n||l;this.shadowRoot.innerHTML=` | ||
| <style>${at}</style> | ||
| <div style="${y(d)}"> | ||
| <div style="${v(s)}"> | ||
| <div class="cb-backdrop" data-action="close"></div> | ||
| <div class="cb-dialog" role="dialog" aria-modal="true" aria-labelledby="cb-dialog-title"> | ||
| <div class="cb-dialog-header"> | ||
| <div class="cb-dialog-header-icon">${n}</div> | ||
| <div class="cb-dialog-header-icon">${i}</div> | ||
| <div class="cb-dialog-header-text"> | ||
@@ -332,3 +332,3 @@ <div class="cb-dialog-title" id="cb-dialog-title">${o}</div> | ||
| <div class="cb-dialog-body"> | ||
| ${s?this.renderSkillBody(c,s,b):this.renderCommandBody(l)} | ||
| ${this.renderCommandBody(d)} | ||
| </div> | ||
@@ -347,3 +347,3 @@ <div class="cb-dialog-footer"> | ||
| <div class="cb-code-text"><span class="cb-code-prefix">$</span>${this.escapeHtml(e)}</div> | ||
| <button class="cb-copy-btn" data-action="copy" data-command="${this.escapeAttr(e)}">${x}<span>Copy</span></button> | ||
| <button class="cb-copy-btn" data-action="copy" data-command="${this.escapeAttr(e)}">${E}<span>Copy</span></button> | ||
| </div> | ||
@@ -358,20 +358,3 @@ </div> | ||
| </div> | ||
| `}renderSkillBody(e,o,a){let c=`Install the skill from ${o} and run ${e}`;return` | ||
| <div class="cb-step"> | ||
| <div class="cb-step-num">1</div> | ||
| <div class="cb-step-content"> | ||
| <div class="cb-step-label">Copy this prompt to your clipboard</div> | ||
| <div class="cb-code-block"> | ||
| <div class="cb-code-text">${this.escapeHtml(c)}</div> | ||
| <button class="cb-copy-btn" data-action="copy" data-command="${this.escapeAttr(c)}">${x}<span>Copy</span></button> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div class="cb-step"> | ||
| <div class="cb-step-num">2</div> | ||
| <div class="cb-step-content"> | ||
| <div class="cb-step-label">Paste into a ${a} session \u2014 the agent will fetch the skill and set it up for you</div> | ||
| </div> | ||
| </div> | ||
| `}setupListeners(){this.shadowRoot&&(this.shadowRoot.addEventListener("click",e=>{let o=e.target.closest("[data-action]");if(!o)return;let a=o.dataset.action;if(a==="close")this.close();else if(a==="copy"){let c=o.dataset.command||"";this.copyToClipboard(c,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 a=window.matchMedia("(prefers-color-scheme: dark)"),c=()=>this.render();a.addEventListener("change",c),this._mqCleanup=()=>a.removeEventListener("change",c)}async copyToClipboard(e,o){try{await navigator.clipboard.writeText(e);let a=o;o.setAttribute("data-copied","true"),a.innerHTML=`${B}<span>Copied!</span>`,this._options.onCopy?.(e),setTimeout(()=>{o.setAttribute("data-copied","false"),a.innerHTML=`${x}<span>Copy</span>`},2e3)}catch{let a=document.createElement("textarea");a.value=e,a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a),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",F);function L(t){let r=document.createElement("claw-popup-dialog");return r.options=t,document.body.appendChild(r),r}function nt(t,r,e){return` | ||
| `}setupListeners(){this.shadowRoot&&(this.shadowRoot.addEventListener("click",e=>{let o=e.target.closest("[data-action]");if(!o)return;let a=o.dataset.action;if(a==="close")this.close();else if(a==="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 a=window.matchMedia("(prefers-color-scheme: dark)"),l=()=>this.render();a.addEventListener("change",l),this._mqCleanup=()=>a.removeEventListener("change",l)}async copyToClipboard(e,o){try{await navigator.clipboard.writeText(e);let a=o;o.setAttribute("data-copied","true"),a.innerHTML=`${B}<span>Copied!</span>`,this._options.onCopy?.(e),setTimeout(()=>{o.setAttribute("data-copied","false"),a.innerHTML=`${E}<span>Copy</span>`},2e3)}catch{let a=document.createElement("textarea");a.value=e,a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a),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",A);function N(t){let r=document.createElement("claw-popup-dialog");return r.options=t,document.body.appendChild(r),r}function nt(t,r,e){return` | ||
| :host { | ||
@@ -603,3 +586,3 @@ display: inline-block; | ||
| } | ||
| `}function it(t){let r=nt(t.brandColor,t.brandColorHover,t.brandColorActive),e=v(t.id);class o extends HTMLElement{constructor(){super();this._options={command:"",theme:"branded",size:"md",variant:"filled",popup:!0,promptFlag:!0};this._mqCleanup=null;this._rendered=!1;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(i){this._options={...this._options,...i},this.render(),this.updateLightDOM()}get options(){return this._options}get harnessId(){return t.id}syncFromAttributes(){let i=this.getAttribute("command"),s=this.getAttribute("skill-url"),d=this.getAttribute("theme"),n=this.getAttribute("size"),b=this.getAttribute("variant"),l=this.getAttribute("shape"),p=this.getAttribute("popup"),m=this.getAttribute("prompt-flag"),g=this.getAttribute("popup-title"),f=this.getAttribute("popup-description");i!==null&&(this._options.command=i),s!==null&&(this._options.skillUrl=s),d&&(this._options.theme=d),n&&(this._options.size=n),b&&(this._options.variant=b),l&&(this._options.shape=l),p!==null&&(this._options.popup=p!=="false"),m!==null&&(this._options.promptFlag=m!=="false"),g!==null&&(this._options.popupTitle=g),f!==null&&(this._options.popupDescription=f)}updateLightDOM(){let{command:i,skillUrl:s}=this._options,d=this.getFullCommand();this.setAttribute("role","button"),this.setAttribute("tabindex","0"),this.setAttribute("aria-label",`Run on ${t.name}: ${i}`),this._options.popup!==!1?this.setAttribute("aria-haspopup","dialog"):this.removeAttribute("aria-haspopup");let n=this.querySelector("a[data-cb-crawl]");n||(n=document.createElement("a"),n.setAttribute("data-cb-crawl",""),n.setAttribute("aria-hidden","true"),n.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;",this.appendChild(n)),n.textContent=`Run on ${t.name}: ${i}`,n.setAttribute("data-platform",t.id),n.setAttribute("data-command",i),n.setAttribute("data-full-command",d),s?(n.href=s,n.setAttribute("data-skill-url",s)):(n.href=`${t.urlBase}?command=${encodeURIComponent(d)}`,n.removeAttribute("data-skill-url"))}getResolvedTheme(){return this._options.theme||"branded"}getFullCommand(){let{command:i,promptFlag:s}=this._options;return s===!1?i:`${t.cliPrefix} "${i}"`}render(){if(!this.shadowRoot)return;let i=this.getResolvedTheme(),s=i==="system"?typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":i,d=this._options.variant||"filled",n=u(i,t.id),b=this._options.size||"md",l=this._options.shape||"rounded",p=N[b],m=M[l][b];this.setAttribute("data-theme",s),this.setAttribute("data-variant",d);let g=d!=="filled"?"transparent":n.bg,f=d==="ghost"?"transparent":d==="outline"?n.primary:n.border,R=d!=="filled"?n.primary:n.text;this.shadowRoot.innerHTML=` | ||
| `}function it(t){let r=nt(t.brandColor,t.brandColorHover,t.brandColorActive),e=f(t.id);class o extends HTMLElement{constructor(){super();this._options={command:"",theme:"branded",size:"md",variant:"filled",popup:!0,promptFlag:!0};this._mqCleanup=null;this._rendered=!1;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(n){this._options={...this._options,...n},this.render(),this.updateLightDOM()}get options(){return this._options}get harnessId(){return t.id}syncFromAttributes(){let n=this.getAttribute("command"),s=this.getAttribute("theme"),i=this.getAttribute("size"),c=this.getAttribute("variant"),d=this.getAttribute("shape"),u=this.getAttribute("popup"),b=this.getAttribute("prompt-flag"),m=this.getAttribute("popup-title"),g=this.getAttribute("popup-description");n!==null&&(this._options.command=n),s&&(this._options.theme=s),i&&(this._options.size=i),c&&(this._options.variant=c),d&&(this._options.shape=d),u!==null&&(this._options.popup=u!=="false"),b!==null&&(this._options.promptFlag=b!=="false"),m!==null&&(this._options.popupTitle=m),g!==null&&(this._options.popupDescription=g)}updateLightDOM(){let{command:n}=this._options,s=this.getFullCommand();this.setAttribute("role","button"),this.setAttribute("tabindex","0"),this.setAttribute("aria-label",`Run on ${t.name}: ${n}`),this._options.popup!==!1?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}: ${n}`,i.setAttribute("data-platform",t.id),i.setAttribute("data-command",n),i.setAttribute("data-full-command",s),i.href=`${t.urlBase}?command=${encodeURIComponent(s)}`}getResolvedTheme(){return this._options.theme||"branded"}getFullCommand(){let{command:n,promptFlag:s}=this._options;return s===!1?n:`${t.cliPrefix} "${n}"`}render(){if(!this.shadowRoot)return;let n=this.getResolvedTheme(),s=n==="system"?typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":n,i=this._options.variant||"filled",c=h(n,t.id),d=this._options.size||"md",u=this._options.shape||"rounded",b=$[d],m=M[u][d];this.setAttribute("data-theme",s),this.setAttribute("data-variant",i);let g=i!=="filled"?"transparent":c.bg,R=i==="ghost"?"transparent":i==="outline"?c.primary:c.border,I=i!=="filled"?c.primary:c.text;this.shadowRoot.innerHTML=` | ||
| <style>${r}</style> | ||
@@ -610,13 +593,13 @@ <button | ||
| style=" | ||
| ${y(n)} | ||
| ${v(c)} | ||
| --cb-bg: ${g}; | ||
| --cb-border: ${f}; | ||
| --cb-text: ${R}; | ||
| --cb-accent-color: ${n.primary}; | ||
| --cb-focus-color: ${n.primary}; | ||
| --cb-height: ${p.height}; | ||
| --cb-font-size: ${p.fontSize}; | ||
| --cb-icon-size: ${p.iconSize}; | ||
| --cb-padding: ${p.padding}; | ||
| --cb-gap: ${p.gap}; | ||
| --cb-border: ${R}; | ||
| --cb-text: ${I}; | ||
| --cb-accent-color: ${c.primary}; | ||
| --cb-focus-color: ${c.primary}; | ||
| --cb-height: ${b.height}; | ||
| --cb-font-size: ${b.fontSize}; | ||
| --cb-icon-size: ${b.iconSize}; | ||
| --cb-padding: ${b.padding}; | ||
| --cb-gap: ${b.gap}; | ||
| --cb-radius: ${m}; | ||
@@ -629,3 +612,3 @@ " | ||
| </button> | ||
| `;let _=this.shadowRoot.querySelector(".cb-btn");_.addEventListener("click",()=>this.handleClick()),_.addEventListener("keydown",C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),this.handleClick())}),this._rendered=!0,this.setupSystemThemeWatch()}handleClick(){let{popup:i,command:s,skillUrl:d,popupTitle:n,popupDescription:b}=this._options,l=this.getFullCommand();if(this.dispatchEvent(new CustomEvent("cb-open",{bubbles:!0,composed:!0,detail:{command:s,fullCommand:l,harness:t.id}})),i===!1){navigator.clipboard.writeText(l).then(()=>{this._options.onCopy?.(l),A(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:!0,composed:!0,detail:{command:l,harness:t.id}}))});return}L({harnessId:t.id,theme:this.getResolvedTheme(),title:n||`Run on ${t.name}`,description:b||(d?`Install the skill and run the command in ${t.name}.`:`Execute this command in your terminal to get started with ${t.name}.`),command:s,fullCommand:l,skillUrl:d,onCopy:p=>{this._options.onCopy?.(p),A(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:!0,composed:!0,detail:{command:p,harness:t.id}}))},onClose:()=>{this.dispatchEvent(new CustomEvent("cb-close",{bubbles:!0,composed:!0,detail:{harness:t.id}}))}})}setupSystemThemeWatch(){if(this._mqCleanup?.(),this._mqCleanup=null,this.getResolvedTheme()!=="system"||typeof window>"u")return;let i=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>this.render();i.addEventListener("change",s),this._mqCleanup=()=>i.removeEventListener("change",s)}}return o.observedAttributes=["command","skill-url","theme","size","variant","shape","popup","prompt-flag","popup-title","popup-description"],o}var T={};function st(t){return T[t]||(T[t]=it(h[t])),T[t]}function ct(t,r){if(typeof customElements>"u")return;let e=r||h[t].tagName;customElements.get(e)||customElements.define(e,st(t))}function S(){w.forEach(t=>ct(t))}S();var P=require("hermesbuttons"),O=require("hermesbuttons/vue"),dt=w.map(t=>h[t].tagName),lt=["hermes-button","hermes-skill-button","hermes-popup-dialog"],I={install(t){if(S(),(0,P.register)(),t.config?.compilerOptions){let r=t.config.compilerOptions.isCustomElement;t.config.compilerOptions.isCustomElement=e=>dt.includes(e)||e==="claw-popup-dialog"||lt.includes(e)?!0:r?.(e)??!1}}},pt=I;0&&(module.exports={ClawButtonsPlugin,HermesButtonsPlugin}); | ||
| `;let S=this.shadowRoot.querySelector(".cb-btn");S.addEventListener("click",()=>this.handleClick()),S.addEventListener("keydown",w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),this.handleClick())}),this._rendered=!0,this.setupSystemThemeWatch()}handleClick(){let{popup:n,command:s,popupTitle:i,popupDescription:c}=this._options,d=this.getFullCommand();if(this.dispatchEvent(new CustomEvent("cb-open",{bubbles:!0,composed:!0,detail:{command:s,fullCommand:d,harness:t.id}})),n===!1){navigator.clipboard.writeText(d).then(()=>{this._options.onCopy?.(d),k(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:!0,composed:!0,detail:{command:d,harness:t.id}}))});return}N({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:d,onCopy:u=>{this._options.onCopy?.(u),k(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:!0,composed:!0,detail:{command:u,harness:t.id}}))},onClose:()=>{this.dispatchEvent(new CustomEvent("cb-close",{bubbles:!0,composed:!0,detail:{harness:t.id}}))}})}setupSystemThemeWatch(){if(this._mqCleanup?.(),this._mqCleanup=null,this.getResolvedTheme()!=="system"||typeof window>"u")return;let n=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>this.render();n.addEventListener("change",s),this._mqCleanup=()=>n.removeEventListener("change",s)}}return o.observedAttributes=["command","theme","size","variant","shape","popup","prompt-flag","popup-title","popup-description"],o}var F={};function st(t){return F[t]||(F[t]=it(p[t])),F[t]}function ct(t,r){if(typeof customElements>"u")return;let e=r||p[t].tagName;customElements.get(e)||customElements.define(e,st(t))}function T(){x.forEach(t=>ct(t))}T();var L=require("hermesbuttons"),O=require("hermesbuttons/vue"),dt=x.map(t=>p[t].tagName),lt=["hermes-button","hermes-skill-button","hermes-popup-dialog"],P={install(t){if(T(),(0,L.register)(),t.config?.compilerOptions){let r=t.config.compilerOptions.isCustomElement;t.config.compilerOptions.isCustomElement=e=>dt.includes(e)||e==="claw-popup-dialog"||lt.includes(e)?!0:r?.(e)??!1}}},pt=P;0&&(module.exports={ClawButtonsPlugin,HermesButtonsPlugin}); | ||
| //# sourceMappingURL=vue.js.map |
+26
-43
@@ -1,2 +0,2 @@ | ||
| var k="agentpreferences";function _(){return typeof document<"u"}function P(){if(!_())return null;let t=document.cookie.split(";").map(e=>e.trim()).find(e=>e.startsWith(`${k}=`));if(!t)return null;let a=t.slice(k.length+1);if(!a)return null;try{let e=decodeURIComponent(a),o=JSON.parse(e);return!o||typeof o!="object"||!Array.isArray(o.order)?null:{order:o.order.filter(c=>typeof c=="string"&&c.length>0)}}catch{return null}}function I(t){if(!_())return;let a=t.order.slice(0,24),e=JSON.stringify({order:a}),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=P()?.order.filter(o=>o!==t)??[];I({order:[t,...e]})}var O=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| var C="agentpreferences";function S(){return typeof document<"u"}function P(){if(!S())return null;let t=document.cookie.split(";").map(e=>e.trim()).find(e=>e.startsWith(`${C}=`));if(!t)return null;let r=t.slice(C.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 O(t){if(!S())return;let r=t.order.slice(0,24),e=JSON.stringify({order:r}),o=new Date;o.setFullYear(o.getFullYear()+1),document.cookie=`${C}=${encodeURIComponent(e)}; Path=/; SameSite=Lax; Expires=${o.toUTCString()}`}function y(t){if(!t||typeof t!="string")return;let e=P()?.order.filter(o=>o!==t)??[];O({order:[t,...e]})}var R=`<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"/> | ||
@@ -7,3 +7,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"/> | ||
| <circle cx="12" cy="12" r="2" fill="currentColor"/> | ||
| </svg>`,R=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| </svg>`,I=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <path d="M12 2L4 6v6c0 5.25 3.4 10.2 8 12 4.6-1.8 8-6.75 8-12V6l-8-4z" fill="currentColor" opacity="0.15"/> | ||
@@ -33,3 +33,3 @@ <path d="M12 2L4 6v6c0 5.25 3.4 10.2 8 12 4.6-1.8 8-6.75 8-12V6l-8-4z" stroke="currentColor" stroke-width="1.6" fill="none"/> | ||
| <circle cx="12" cy="16" r="1.3" fill="currentColor"/> | ||
| </svg>`,U=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| </svg>`,W=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <rect x="3.5" y="1.5" width="5" height="5" rx="1.5" fill="currentColor"/> | ||
@@ -44,10 +44,10 @@ <rect x="15.5" y="1.5" width="5" height="5" rx="1.5" fill="currentColor"/> | ||
| <rect x="13.5" y="18.5" width="4" height="3.5" rx="1.5" fill="currentColor"/> | ||
| </svg>`,W={openclaw:O,hermes:R,ironclaw:z,nanoclaw:D,zeroclaw:q,openharness:j,claudeclaw:U};function v(t){return W[t]}var x=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon-sm"> | ||
| </svg>`,U={openclaw:R,hermes:I,ironclaw:z,nanoclaw:D,zeroclaw:q,openharness:j,claudeclaw:W};function f(t){return U[t]}var k=`<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"/> | ||
| <path d="M3 10V3.5A1.5 1.5 0 014.5 2H10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/> | ||
| </svg>`,$=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon-sm"> | ||
| </svg>`,_=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon-sm"> | ||
| <path d="M3 8.5l3.5 3.5L13 4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | ||
| </svg>`,B=`<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 h={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."}},w=Object.keys(h);function V(t){return h[t].brandColor}function Y(t){let a=V(t);return{branded:{bg:a,text:"#FFFFFF",border:"transparent",surface:"#FFFFFF",surfaceText:"#1C1917",muted:"#78716C",primary:a,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:a,primaryText:"#FFFFFF",codeBg:"#0C0A09",codeText:"#F5F0EB"},light:{bg:"#FFFFFF",text:"#1C1917",border:"#E7E5E4",surface:"#FAFAF9",surfaceText:"#1C1917",muted:"#78716C",primary:a,primaryText:"#FFFFFF",codeBg:"#1C1917",codeText:"#F5F0EB"}}}function u(t,a){let e=Y(a);return t!=="system"?e[t]:typeof window>"u"?e.light:window.matchMedia("(prefers-color-scheme: dark)").matches?e.dark:e.light}function y(t){return` | ||
| </svg>`;var p={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."}},x=Object.keys(p);function V(t){return p[t].brandColor}function Y(t){let r=V(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=Y(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}; | ||
@@ -317,12 +317,12 @@ --cb-text: ${t.text}; | ||
| } | ||
| `,A=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 u(e,o);let n=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;if(e==="system")return n?u("dark",o):u("light",o);let c=n?u("dark",o):u("light",o),i=u(e,o);return{...c,primary:i.primary,primaryText:i.primaryText}}render(){if(!this.shadowRoot||!this._options)return;let{harnessId:e,title:o,description:n,command:c,fullCommand:i,skillUrl:s}=this._options,d=this.resolvePopupTokens(),r=v(e),b=h[e].name,l=i||c;this.shadowRoot.innerHTML=` | ||
| `,E=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 i=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;if(e==="system")return i?h("dark",o):h("light",o);let l=i?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:i,command:l,fullCommand:a}=this._options,s=this.resolvePopupTokens(),n=f(e),c=p[e].name,d=a||l;this.shadowRoot.innerHTML=` | ||
| <style>${K}</style> | ||
| <div style="${y(d)}"> | ||
| <div style="${v(s)}"> | ||
| <div class="cb-backdrop" data-action="close"></div> | ||
| <div class="cb-dialog" role="dialog" aria-modal="true" aria-labelledby="cb-dialog-title"> | ||
| <div class="cb-dialog-header"> | ||
| <div class="cb-dialog-header-icon">${r}</div> | ||
| <div class="cb-dialog-header-icon">${n}</div> | ||
| <div class="cb-dialog-header-text"> | ||
| <div class="cb-dialog-title" id="cb-dialog-title">${o}</div> | ||
| ${n?`<div class="cb-dialog-description">${n}</div>`:""} | ||
| ${i?`<div class="cb-dialog-description">${i}</div>`:""} | ||
| </div> | ||
@@ -332,3 +332,3 @@ <button class="cb-dialog-close" data-action="close" aria-label="Close">${B}</button> | ||
| <div class="cb-dialog-body"> | ||
| ${s?this.renderSkillBody(c,s,b):this.renderCommandBody(l)} | ||
| ${this.renderCommandBody(d)} | ||
| </div> | ||
@@ -347,3 +347,3 @@ <div class="cb-dialog-footer"> | ||
| <div class="cb-code-text"><span class="cb-code-prefix">$</span>${this.escapeHtml(e)}</div> | ||
| <button class="cb-copy-btn" data-action="copy" data-command="${this.escapeAttr(e)}">${x}<span>Copy</span></button> | ||
| <button class="cb-copy-btn" data-action="copy" data-command="${this.escapeAttr(e)}">${k}<span>Copy</span></button> | ||
| </div> | ||
@@ -358,20 +358,3 @@ </div> | ||
| </div> | ||
| `}renderSkillBody(e,o,n){let c=`Install the skill from ${o} and run ${e}`;return` | ||
| <div class="cb-step"> | ||
| <div class="cb-step-num">1</div> | ||
| <div class="cb-step-content"> | ||
| <div class="cb-step-label">Copy this prompt to your clipboard</div> | ||
| <div class="cb-code-block"> | ||
| <div class="cb-code-text">${this.escapeHtml(c)}</div> | ||
| <button class="cb-copy-btn" data-action="copy" data-command="${this.escapeAttr(c)}">${x}<span>Copy</span></button> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div class="cb-step"> | ||
| <div class="cb-step-num">2</div> | ||
| <div class="cb-step-content"> | ||
| <div class="cb-step-label">Paste into a ${n} session \u2014 the agent will fetch the skill and set it up for you</div> | ||
| </div> | ||
| </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 c=o.dataset.command||"";this.copyToClipboard(c,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)"),c=()=>this.render();n.addEventListener("change",c),this._mqCleanup=()=>n.removeEventListener("change",c)}async copyToClipboard(e,o){try{await navigator.clipboard.writeText(e);let n=o;o.setAttribute("data-copied","true"),n.innerHTML=`${$}<span>Copied!</span>`,this._options.onCopy?.(e),setTimeout(()=>{o.setAttribute("data-copied","false"),n.innerHTML=`${x}<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",A);function N(t){let a=document.createElement("claw-popup-dialog");return a.options=t,document.body.appendChild(a),a}function G(t,a,e){return` | ||
| `}setupListeners(){this.shadowRoot&&(this.shadowRoot.addEventListener("click",e=>{let o=e.target.closest("[data-action]");if(!o)return;let i=o.dataset.action;if(i==="close")this.close();else if(i==="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 i=window.matchMedia("(prefers-color-scheme: dark)"),l=()=>this.render();i.addEventListener("change",l),this._mqCleanup=()=>i.removeEventListener("change",l)}async copyToClipboard(e,o){try{await navigator.clipboard.writeText(e);let i=o;o.setAttribute("data-copied","true"),i.innerHTML=`${_}<span>Copied!</span>`,this._options.onCopy?.(e),setTimeout(()=>{o.setAttribute("data-copied","false"),i.innerHTML=`${k}<span>Copy</span>`},2e3)}catch{let i=document.createElement("textarea");i.value=e,i.style.position="fixed",i.style.opacity="0",document.body.appendChild(i),i.select(),document.execCommand("copy"),document.body.removeChild(i),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",E);function $(t){let r=document.createElement("claw-popup-dialog");return r.options=t,document.body.appendChild(r),r}function G(t,r,e){return` | ||
| :host { | ||
@@ -419,3 +402,3 @@ display: inline-block; | ||
| :host([data-variant="filled"][data-theme="branded"]) .cb-btn:hover { | ||
| background: ${a}; | ||
| background: ${r}; | ||
| box-shadow: 0 2px 8px ${t}59; | ||
@@ -604,4 +587,4 @@ } | ||
| } | ||
| `}function Z(t){let a=G(t.brandColor,t.brandColorHover,t.brandColorActive),e=v(t.id);class o extends HTMLElement{constructor(){super();this._options={command:"",theme:"branded",size:"md",variant:"filled",popup:!0,promptFlag:!0};this._mqCleanup=null;this._rendered=!1;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(i){this._options={...this._options,...i},this.render(),this.updateLightDOM()}get options(){return this._options}get harnessId(){return t.id}syncFromAttributes(){let i=this.getAttribute("command"),s=this.getAttribute("skill-url"),d=this.getAttribute("theme"),r=this.getAttribute("size"),b=this.getAttribute("variant"),l=this.getAttribute("shape"),p=this.getAttribute("popup"),m=this.getAttribute("prompt-flag"),g=this.getAttribute("popup-title"),f=this.getAttribute("popup-description");i!==null&&(this._options.command=i),s!==null&&(this._options.skillUrl=s),d&&(this._options.theme=d),r&&(this._options.size=r),b&&(this._options.variant=b),l&&(this._options.shape=l),p!==null&&(this._options.popup=p!=="false"),m!==null&&(this._options.promptFlag=m!=="false"),g!==null&&(this._options.popupTitle=g),f!==null&&(this._options.popupDescription=f)}updateLightDOM(){let{command:i,skillUrl:s}=this._options,d=this.getFullCommand();this.setAttribute("role","button"),this.setAttribute("tabindex","0"),this.setAttribute("aria-label",`Run on ${t.name}: ${i}`),this._options.popup!==!1?this.setAttribute("aria-haspopup","dialog"):this.removeAttribute("aria-haspopup");let r=this.querySelector("a[data-cb-crawl]");r||(r=document.createElement("a"),r.setAttribute("data-cb-crawl",""),r.setAttribute("aria-hidden","true"),r.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;",this.appendChild(r)),r.textContent=`Run on ${t.name}: ${i}`,r.setAttribute("data-platform",t.id),r.setAttribute("data-command",i),r.setAttribute("data-full-command",d),s?(r.href=s,r.setAttribute("data-skill-url",s)):(r.href=`${t.urlBase}?command=${encodeURIComponent(d)}`,r.removeAttribute("data-skill-url"))}getResolvedTheme(){return this._options.theme||"branded"}getFullCommand(){let{command:i,promptFlag:s}=this._options;return s===!1?i:`${t.cliPrefix} "${i}"`}render(){if(!this.shadowRoot)return;let i=this.getResolvedTheme(),s=i==="system"?typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":i,d=this._options.variant||"filled",r=u(i,t.id),b=this._options.size||"md",l=this._options.shape||"rounded",p=M[b],m=H[l][b];this.setAttribute("data-theme",s),this.setAttribute("data-variant",d);let g=d!=="filled"?"transparent":r.bg,f=d==="ghost"?"transparent":d==="outline"?r.primary:r.border,L=d!=="filled"?r.primary:r.text;this.shadowRoot.innerHTML=` | ||
| <style>${a}</style> | ||
| `}function Z(t){let r=G(t.brandColor,t.brandColorHover,t.brandColorActive),e=f(t.id);class o extends HTMLElement{constructor(){super();this._options={command:"",theme:"branded",size:"md",variant:"filled",popup:!0,promptFlag:!0};this._mqCleanup=null;this._rendered=!1;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"),n=this.getAttribute("size"),c=this.getAttribute("variant"),d=this.getAttribute("shape"),u=this.getAttribute("popup"),b=this.getAttribute("prompt-flag"),m=this.getAttribute("popup-title"),g=this.getAttribute("popup-description");a!==null&&(this._options.command=a),s&&(this._options.theme=s),n&&(this._options.size=n),c&&(this._options.variant=c),d&&(this._options.shape=d),u!==null&&(this._options.popup=u!=="false"),b!==null&&(this._options.promptFlag=b!=="false"),m!==null&&(this._options.popupTitle=m),g!==null&&(this._options.popupDescription=g)}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!==!1?this.setAttribute("aria-haspopup","dialog"):this.removeAttribute("aria-haspopup");let n=this.querySelector("a[data-cb-crawl]");n||(n=document.createElement("a"),n.setAttribute("data-cb-crawl",""),n.setAttribute("aria-hidden","true"),n.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;",this.appendChild(n)),n.textContent=`Run on ${t.name}: ${a}`,n.setAttribute("data-platform",t.id),n.setAttribute("data-command",a),n.setAttribute("data-full-command",s),n.href=`${t.urlBase}?command=${encodeURIComponent(s)}`}getResolvedTheme(){return this._options.theme||"branded"}getFullCommand(){let{command:a,promptFlag:s}=this._options;return s===!1?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,n=this._options.variant||"filled",c=h(a,t.id),d=this._options.size||"md",u=this._options.shape||"rounded",b=M[d],m=H[u][d];this.setAttribute("data-theme",s),this.setAttribute("data-variant",n);let g=n!=="filled"?"transparent":c.bg,N=n==="ghost"?"transparent":n==="outline"?c.primary:c.border,L=n!=="filled"?c.primary:c.text;this.shadowRoot.innerHTML=` | ||
| <style>${r}</style> | ||
| <button | ||
@@ -611,13 +594,13 @@ class="cb-btn" | ||
| style=" | ||
| ${y(r)} | ||
| ${v(c)} | ||
| --cb-bg: ${g}; | ||
| --cb-border: ${f}; | ||
| --cb-border: ${N}; | ||
| --cb-text: ${L}; | ||
| --cb-accent-color: ${r.primary}; | ||
| --cb-focus-color: ${r.primary}; | ||
| --cb-height: ${p.height}; | ||
| --cb-font-size: ${p.fontSize}; | ||
| --cb-icon-size: ${p.iconSize}; | ||
| --cb-padding: ${p.padding}; | ||
| --cb-gap: ${p.gap}; | ||
| --cb-accent-color: ${c.primary}; | ||
| --cb-focus-color: ${c.primary}; | ||
| --cb-height: ${b.height}; | ||
| --cb-font-size: ${b.fontSize}; | ||
| --cb-icon-size: ${b.iconSize}; | ||
| --cb-padding: ${b.padding}; | ||
| --cb-gap: ${b.gap}; | ||
| --cb-radius: ${m}; | ||
@@ -630,3 +613,3 @@ " | ||
| </button> | ||
| `;let S=this.shadowRoot.querySelector(".cb-btn");S.addEventListener("click",()=>this.handleClick()),S.addEventListener("keydown",C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),this.handleClick())}),this._rendered=!0,this.setupSystemThemeWatch()}handleClick(){let{popup:i,command:s,skillUrl:d,popupTitle:r,popupDescription:b}=this._options,l=this.getFullCommand();if(this.dispatchEvent(new CustomEvent("cb-open",{bubbles:!0,composed:!0,detail:{command:s,fullCommand:l,harness:t.id}})),i===!1){navigator.clipboard.writeText(l).then(()=>{this._options.onCopy?.(l),E(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:!0,composed:!0,detail:{command:l,harness:t.id}}))});return}N({harnessId:t.id,theme:this.getResolvedTheme(),title:r||`Run on ${t.name}`,description:b||(d?`Install the skill and run the command in ${t.name}.`:`Execute this command in your terminal to get started with ${t.name}.`),command:s,fullCommand:l,skillUrl:d,onCopy:p=>{this._options.onCopy?.(p),E(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:!0,composed:!0,detail:{command:p,harness:t.id}}))},onClose:()=>{this.dispatchEvent(new CustomEvent("cb-close",{bubbles:!0,composed:!0,detail:{harness:t.id}}))}})}setupSystemThemeWatch(){if(this._mqCleanup?.(),this._mqCleanup=null,this.getResolvedTheme()!=="system"||typeof window>"u")return;let i=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>this.render();i.addEventListener("change",s),this._mqCleanup=()=>i.removeEventListener("change",s)}}return o.observedAttributes=["command","skill-url","theme","size","variant","shape","popup","prompt-flag","popup-title","popup-description"],o}var F={};function J(t){return F[t]||(F[t]=Z(h[t])),F[t]}function X(t,a){if(typeof customElements>"u")return;let e=a||h[t].tagName;customElements.get(e)||customElements.define(e,J(t))}function T(){w.forEach(t=>X(t))}T();import{register as Q}from"hermesbuttons";import{HermesButtonsPlugin as _t}from"hermesbuttons/vue";var tt=w.map(t=>h[t].tagName),et=["hermes-button","hermes-skill-button","hermes-popup-dialog"],ot={install(t){if(T(),Q(),t.config?.compilerOptions){let a=t.config.compilerOptions.isCustomElement;t.config.compilerOptions.isCustomElement=e=>tt.includes(e)||e==="claw-popup-dialog"||et.includes(e)?!0:a?.(e)??!1}}},Ft=ot;export{ot as ClawButtonsPlugin,_t as HermesButtonsPlugin,Ft as default}; | ||
| `;let T=this.shadowRoot.querySelector(".cb-btn");T.addEventListener("click",()=>this.handleClick()),T.addEventListener("keydown",w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),this.handleClick())}),this._rendered=!0,this.setupSystemThemeWatch()}handleClick(){let{popup:a,command:s,popupTitle:n,popupDescription:c}=this._options,d=this.getFullCommand();if(this.dispatchEvent(new CustomEvent("cb-open",{bubbles:!0,composed:!0,detail:{command:s,fullCommand:d,harness:t.id}})),a===!1){navigator.clipboard.writeText(d).then(()=>{this._options.onCopy?.(d),y(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:!0,composed:!0,detail:{command:d,harness:t.id}}))});return}$({harnessId:t.id,theme:this.getResolvedTheme(),title:n||`Run on ${t.name}`,description:c||`Execute this command in your terminal to get started with ${t.name}.`,command:s,fullCommand:d,onCopy:u=>{this._options.onCopy?.(u),y(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:!0,composed:!0,detail:{command:u,harness:t.id}}))},onClose:()=>{this.dispatchEvent(new CustomEvent("cb-close",{bubbles:!0,composed:!0,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 A={};function J(t){return A[t]||(A[t]=Z(p[t])),A[t]}function X(t,r){if(typeof customElements>"u")return;let e=r||p[t].tagName;customElements.get(e)||customElements.define(e,J(t))}function F(){x.forEach(t=>X(t))}F();import{register as Q}from"hermesbuttons";import{HermesButtonsPlugin as _t}from"hermesbuttons/vue";var tt=x.map(t=>p[t].tagName),et=["hermes-button","hermes-skill-button","hermes-popup-dialog"],ot={install(t){if(F(),Q(),t.config?.compilerOptions){let r=t.config.compilerOptions.isCustomElement;t.config.compilerOptions.isCustomElement=e=>tt.includes(e)||e==="claw-popup-dialog"||et.includes(e)?!0:r?.(e)??!1}}},Ft=ot;export{ot as ClawButtonsPlugin,_t as HermesButtonsPlugin,Ft as default}; | ||
| //# sourceMappingURL=vue.mjs.map |
+1
-1
| { | ||
| "name": "clawbuttons", | ||
| "version": "1.0.4", | ||
| "version": "1.0.5", | ||
| "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", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
| var C="agentpreferences";function T(){return typeof document<"u"}function P(){if(!T())return null;let t=document.cookie.split(";").map(e=>e.trim()).find(e=>e.startsWith(`${C}=`));if(!t)return null;let a=t.slice(C.length+1);if(!a)return null;try{let e=decodeURIComponent(a),o=JSON.parse(e);return!o||typeof o!="object"||!Array.isArray(o.order)?null:{order:o.order.filter(c=>typeof c=="string"&&c.length>0)}}catch{return null}}function N(t){if(!T())return;let a=t.order.slice(0,24),e=JSON.stringify({order:a}),o=new Date;o.setFullYear(o.getFullYear()+1),document.cookie=`${C}=${encodeURIComponent(e)}; Path=/; SameSite=Lax; Expires=${o.toUTCString()}`}function k(t){if(!t||typeof t!="string")return;let e=P()?.order.filter(o=>o!==t)??[];N({order:[t,...e]})}var I=`<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"/> | ||
| <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"/> | ||
| <path d="M12 2v4M9.5 7.5L12 6l2.5 1.5" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/> | ||
| <circle cx="12" cy="12" r="4" fill="currentColor" opacity="0.2"/> | ||
| <circle cx="12" cy="12" r="2" fill="currentColor"/> | ||
| </svg>`,z=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <path d="M12 2L4 6v6c0 5.25 3.4 10.2 8 12 4.6-1.8 8-6.75 8-12V6l-8-4z" fill="currentColor" opacity="0.15"/> | ||
| <path d="M12 2L4 6v6c0 5.25 3.4 10.2 8 12 4.6-1.8 8-6.75 8-12V6l-8-4z" stroke="currentColor" stroke-width="1.6" fill="none"/> | ||
| <path d="M8 11h8M12 8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round"/> | ||
| <circle cx="12" cy="7" r="1.2" fill="currentColor"/> | ||
| </svg>`,O=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <rect x="4" y="4" width="16" height="16" rx="3" fill="currentColor" opacity="0.15"/> | ||
| <rect x="4" y="4" width="16" height="16" rx="3" stroke="currentColor" stroke-width="1.6" fill="none"/> | ||
| <path d="M8 9v6M12 8v8M16 10v4" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"/> | ||
| <path d="M4 13h16" stroke="currentColor" stroke-width="1.2" opacity="0.4"/> | ||
| </svg>`,R=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <circle cx="12" cy="12" r="9" fill="currentColor" opacity="0.12"/> | ||
| <circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="1.6" fill="none"/> | ||
| <circle cx="12" cy="12" r="3.5" fill="currentColor" opacity="0.3"/> | ||
| <circle cx="12" cy="12" r="1.5" fill="currentColor"/> | ||
| <path d="M12 3v3M12 18v3M3 12h3M18 12h3" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/> | ||
| </svg>`,D=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <path d="M13 2L4.5 13.5h5L8 22l10.5-12h-5.5L15 2h-2z" fill="currentColor" opacity="0.2"/> | ||
| <path d="M13 2L4.5 13.5h5L8 22l10.5-12h-5.5L15 2h-2z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"/> | ||
| <path d="M11.5 9l-1 4h3l-1 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> | ||
| </svg>`,q=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <path d="M12 3L3 8v8l9 5 9-5V8l-9-5z" fill="currentColor" opacity="0.12"/> | ||
| <path d="M12 3L3 8v8l9 5 9-5V8l-9-5z" stroke="currentColor" stroke-width="1.6" fill="none" stroke-linejoin="round"/> | ||
| <path d="M12 13V8M9 10.5l3 2.5 3-2.5" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/> | ||
| <circle cx="12" cy="16" r="1.3" fill="currentColor"/> | ||
| </svg>`,j=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon"> | ||
| <rect x="3.5" y="1.5" width="5" height="5" rx="1.5" fill="currentColor"/> | ||
| <rect x="15.5" y="1.5" width="5" height="5" rx="1.5" fill="currentColor"/> | ||
| <rect x="2.5" y="5.5" width="19" height="13" rx="3" fill="currentColor"/> | ||
| <ellipse cx="9" cy="11.5" rx="2" ry="2.5" fill="white" opacity="0.95"/> | ||
| <ellipse cx="15" cy="11.5" rx="2" ry="2.5" fill="white" opacity="0.95"/> | ||
| <ellipse cx="9.6" cy="12" rx="1" ry="1.2" fill="#1C1917"/> | ||
| <ellipse cx="15.6" cy="12" rx="1" ry="1.2" fill="#1C1917"/> | ||
| <rect x="6.5" y="18.5" width="4" height="3.5" rx="1.5" fill="currentColor"/> | ||
| <rect x="13.5" y="18.5" width="4" height="3.5" rx="1.5" fill="currentColor"/> | ||
| </svg>`,U={openclaw:I,hermes:z,ironclaw:O,nanoclaw:R,zeroclaw:D,openharness:q,claudeclaw:j};function v(t){return U[t]}var x=`<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"/> | ||
| <path d="M3 10V3.5A1.5 1.5 0 014.5 2H10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/> | ||
| </svg>`,_=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="cb-icon-sm"> | ||
| <path d="M3 8.5l3.5 3.5L13 4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | ||
| </svg>`,$=`<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 b={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."}},S=Object.keys(b);function W(t){return b[t].brandColor}function V(t){let a=W(t);return{branded:{bg:a,text:"#FFFFFF",border:"transparent",surface:"#FFFFFF",surfaceText:"#1C1917",muted:"#78716C",primary:a,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:a,primaryText:"#FFFFFF",codeBg:"#0C0A09",codeText:"#F5F0EB"},light:{bg:"#FFFFFF",text:"#1C1917",border:"#E7E5E4",surface:"#FAFAF9",surfaceText:"#1C1917",muted:"#78716C",primary:a,primaryText:"#FFFFFF",codeBg:"#1C1917",codeText:"#F5F0EB"}}}function u(t,a){let e=V(a);return t!=="system"?e[t]:typeof window>"u"?e.light:window.matchMedia("(prefers-color-scheme: dark)").matches?e.dark:e.light}function w(t){return` | ||
| --cb-bg: ${t.bg}; | ||
| --cb-text: ${t.text}; | ||
| --cb-border: ${t.border}; | ||
| --cb-surface: ${t.surface}; | ||
| --cb-surface-text: ${t.surfaceText}; | ||
| --cb-muted: ${t.muted}; | ||
| --cb-primary: ${t.primary}; | ||
| --cb-primary-text: ${t.primaryText}; | ||
| --cb-code-bg: ${t.codeBg}; | ||
| --cb-code-text: ${t.codeText}; | ||
| `}var B={rounded:{sm:"0.375rem",md:"0.5rem",lg:"0.625rem"},pill:{sm:"999px",md:"999px",lg:"999px"},square:{sm:"0",md:"0",lg:"0"}},M={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 Y=` | ||
| :host { | ||
| position: fixed; | ||
| inset: 0; | ||
| z-index: 999999; | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; | ||
| } | ||
| * { box-sizing: border-box; margin: 0; padding: 0; } | ||
| .cb-backdrop { | ||
| position: absolute; | ||
| inset: 0; | ||
| background: rgba(0, 0, 0, 0.5); | ||
| backdrop-filter: blur(4px); | ||
| -webkit-backdrop-filter: blur(4px); | ||
| animation: cb-fade-in 0.15s ease-out; | ||
| } | ||
| .cb-dialog { | ||
| position: relative; | ||
| width: 90%; | ||
| max-width: 460px; | ||
| background: var(--cb-surface); | ||
| color: var(--cb-surface-text); | ||
| border-radius: 16px; | ||
| box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px var(--cb-border); | ||
| overflow: hidden; | ||
| animation: cb-scale-in 0.2s ease-out; | ||
| } | ||
| .cb-dialog-header { | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 12px; | ||
| padding: 20px 24px 16px; | ||
| border-bottom: 1px solid var(--cb-border); | ||
| } | ||
| .cb-dialog-header-icon { | ||
| width: 36px; | ||
| height: 36px; | ||
| color: var(--cb-primary); | ||
| flex-shrink: 0; | ||
| } | ||
| .cb-dialog-header-text { | ||
| flex: 1; | ||
| min-width: 0; | ||
| } | ||
| .cb-dialog-title { | ||
| font-size: 16px; | ||
| font-weight: 600; | ||
| line-height: 1.3; | ||
| color: var(--cb-surface-text); | ||
| } | ||
| .cb-dialog-description { | ||
| font-size: 13px; | ||
| color: var(--cb-muted); | ||
| margin-top: 2px; | ||
| line-height: 1.4; | ||
| } | ||
| .cb-dialog-close { | ||
| width: 32px; | ||
| height: 32px; | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| border: none; | ||
| background: transparent; | ||
| color: var(--cb-muted); | ||
| cursor: pointer; | ||
| border-radius: 8px; | ||
| flex-shrink: 0; | ||
| transition: background 0.15s, color 0.15s; | ||
| } | ||
| .cb-dialog-close:hover { | ||
| background: var(--cb-border); | ||
| color: var(--cb-surface-text); | ||
| } | ||
| .cb-dialog-close svg { width: 14px; height: 14px; } | ||
| .cb-dialog-body { padding: 20px 24px; } | ||
| .cb-step { | ||
| display: flex; | ||
| gap: 12px; | ||
| margin-bottom: 16px; | ||
| } | ||
| .cb-step:last-child { margin-bottom: 0; } | ||
| .cb-step-num { | ||
| width: 24px; | ||
| height: 24px; | ||
| border-radius: 50%; | ||
| background: var(--cb-primary); | ||
| color: var(--cb-primary-text); | ||
| font-size: 12px; | ||
| font-weight: 600; | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| flex-shrink: 0; | ||
| margin-top: 1px; | ||
| } | ||
| .cb-step-content { | ||
| flex: 1; | ||
| min-width: 0; | ||
| } | ||
| .cb-step-label { | ||
| font-size: 13px; | ||
| font-weight: 500; | ||
| color: var(--cb-surface-text); | ||
| margin-bottom: 8px; | ||
| line-height: 1.4; | ||
| } | ||
| .cb-code-block { | ||
| display: flex; | ||
| align-items: center; | ||
| background: var(--cb-code-bg); | ||
| color: var(--cb-code-text); | ||
| border-radius: 10px; | ||
| padding: 2px 2px 2px 14px; | ||
| font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, 'Liberation Mono', Menlo, monospace; | ||
| font-size: 13px; | ||
| line-height: 1.5; | ||
| gap: 8px; | ||
| overflow: hidden; | ||
| } | ||
| .cb-code-text { | ||
| flex: 1; | ||
| overflow-x: auto; | ||
| white-space: nowrap; | ||
| padding: 10px 0; | ||
| scrollbar-width: none; | ||
| } | ||
| .cb-code-text::-webkit-scrollbar { display: none; } | ||
| .cb-code-prefix { | ||
| color: var(--cb-muted); | ||
| user-select: none; | ||
| margin-right: 6px; | ||
| } | ||
| .cb-copy-btn { | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| gap: 6px; | ||
| height: 36px; | ||
| min-width: 36px; | ||
| padding: 0 12px; | ||
| border: none; | ||
| background: var(--cb-primary); | ||
| color: var(--cb-primary-text); | ||
| cursor: pointer; | ||
| border-radius: 8px; | ||
| font-family: inherit; | ||
| font-size: 12px; | ||
| font-weight: 500; | ||
| flex-shrink: 0; | ||
| transition: background 0.15s, transform 0.1s; | ||
| white-space: nowrap; | ||
| } | ||
| .cb-copy-btn:hover { filter: brightness(0.9); } | ||
| .cb-copy-btn:active { transform: scale(0.96); } | ||
| .cb-copy-btn svg { width: 14px; height: 14px; } | ||
| .cb-copy-btn[data-copied="true"] { | ||
| background: #16a34a; | ||
| } | ||
| .cb-dialog-footer { | ||
| padding: 16px 24px 20px; | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 10px; | ||
| } | ||
| .cb-hint { | ||
| font-size: 12px; | ||
| color: var(--cb-muted); | ||
| text-align: center; | ||
| line-height: 1.4; | ||
| } | ||
| .cb-hint kbd { | ||
| display: inline-block; | ||
| padding: 1px 5px; | ||
| font-family: inherit; | ||
| font-size: 11px; | ||
| background: var(--cb-border); | ||
| border-radius: 4px; | ||
| border: 1px solid var(--cb-border); | ||
| } | ||
| @keyframes cb-fade-in { | ||
| from { opacity: 0; } | ||
| to { opacity: 1; } | ||
| } | ||
| @keyframes cb-scale-in { | ||
| from { opacity: 0; transform: scale(0.95) translateY(8px); } | ||
| to { opacity: 1; transform: scale(1) translateY(0); } | ||
| } | ||
| @media (max-width: 480px) { | ||
| .cb-dialog { | ||
| width: 96%; | ||
| max-width: none; | ||
| border-radius: 14px; | ||
| max-height: 90dvh; | ||
| overflow-y: auto; | ||
| overscroll-behavior: contain; | ||
| } | ||
| .cb-dialog-header { padding: 16px 16px 12px; gap: 10px; } | ||
| .cb-dialog-header-icon { width: 28px; height: 28px; } | ||
| .cb-dialog-body { padding: 16px; } | ||
| .cb-dialog-footer { padding: 12px 16px 16px; } | ||
| .cb-step { gap: 10px; margin-bottom: 14px; } | ||
| .cb-step-num { width: 22px; height: 22px; font-size: 11px; } | ||
| .cb-step-label { font-size: 12px; margin-bottom: 6px; } | ||
| .cb-code-block { font-size: 12px; padding: 2px 2px 2px 10px; border-radius: 8px; } | ||
| .cb-copy-btn { height: 32px; padding: 0 10px; font-size: 11px; border-radius: 6px; } | ||
| .cb-hint { font-size: 11px; } | ||
| } | ||
| @media (max-width: 360px) { | ||
| .cb-dialog { width: 100%; border-radius: 12px 12px 0 0; align-self: flex-end; } | ||
| .cb-copy-btn span { display: none; } | ||
| .cb-copy-btn { min-width: 32px; padding: 0 8px; } | ||
| } | ||
| @supports (padding: env(safe-area-inset-bottom)) { | ||
| .cb-dialog-footer { padding-bottom: calc(20px + env(safe-area-inset-bottom)); } | ||
| } | ||
| `,E=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 u(e,o);let n=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;if(e==="system")return n?u("dark",o):u("light",o);let c=n?u("dark",o):u("light",o),i=u(e,o);return{...c,primary:i.primary,primaryText:i.primaryText}}render(){if(!this.shadowRoot||!this._options)return;let{harnessId:e,title:o,description:n,command:c,fullCommand:i,skillUrl:s}=this._options,d=this.resolvePopupTokens(),r=v(e),h=b[e].name,l=i||c;this.shadowRoot.innerHTML=` | ||
| <style>${Y}</style> | ||
| <div style="${w(d)}"> | ||
| <div class="cb-backdrop" data-action="close"></div> | ||
| <div class="cb-dialog" role="dialog" aria-modal="true" aria-labelledby="cb-dialog-title"> | ||
| <div class="cb-dialog-header"> | ||
| <div class="cb-dialog-header-icon">${r}</div> | ||
| <div class="cb-dialog-header-text"> | ||
| <div class="cb-dialog-title" id="cb-dialog-title">${o}</div> | ||
| ${n?`<div class="cb-dialog-description">${n}</div>`:""} | ||
| </div> | ||
| <button class="cb-dialog-close" data-action="close" aria-label="Close">${$}</button> | ||
| </div> | ||
| <div class="cb-dialog-body"> | ||
| ${s?this.renderSkillBody(c,s,h):this.renderCommandBody(l)} | ||
| </div> | ||
| <div class="cb-dialog-footer"> | ||
| <div class="cb-hint">Press <kbd>\u2318</kbd>+<kbd>V</kbd> or <kbd>Ctrl</kbd>+<kbd>V</kbd> in your terminal to run</div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| `,this.setupListeners(),this.setupSystemThemeWatch()}renderCommandBody(e){return` | ||
| <div class="cb-step"> | ||
| <div class="cb-step-num">1</div> | ||
| <div class="cb-step-content"> | ||
| <div class="cb-step-label">Copy this command to your clipboard</div> | ||
| <div class="cb-code-block"> | ||
| <div class="cb-code-text"><span class="cb-code-prefix">$</span>${this.escapeHtml(e)}</div> | ||
| <button class="cb-copy-btn" data-action="copy" data-command="${this.escapeAttr(e)}">${x}<span>Copy</span></button> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div class="cb-step"> | ||
| <div class="cb-step-num">2</div> | ||
| <div class="cb-step-content"> | ||
| <div class="cb-step-label">Paste and run in your terminal</div> | ||
| </div> | ||
| </div> | ||
| `}renderSkillBody(e,o,n){let c=`Install the skill from ${o} and run ${e}`;return` | ||
| <div class="cb-step"> | ||
| <div class="cb-step-num">1</div> | ||
| <div class="cb-step-content"> | ||
| <div class="cb-step-label">Copy this prompt to your clipboard</div> | ||
| <div class="cb-code-block"> | ||
| <div class="cb-code-text">${this.escapeHtml(c)}</div> | ||
| <button class="cb-copy-btn" data-action="copy" data-command="${this.escapeAttr(c)}">${x}<span>Copy</span></button> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div class="cb-step"> | ||
| <div class="cb-step-num">2</div> | ||
| <div class="cb-step-content"> | ||
| <div class="cb-step-label">Paste into a ${n} session \u2014 the agent will fetch the skill and set it up for you</div> | ||
| </div> | ||
| </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 c=o.dataset.command||"";this.copyToClipboard(c,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)"),c=()=>this.render();n.addEventListener("change",c),this._mqCleanup=()=>n.removeEventListener("change",c)}async copyToClipboard(e,o){try{await navigator.clipboard.writeText(e);let n=o;o.setAttribute("data-copied","true"),n.innerHTML=`${_}<span>Copied!</span>`,this._options.onCopy?.(e),setTimeout(()=>{o.setAttribute("data-copied","false"),n.innerHTML=`${x}<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",E);function H(t){let a=document.createElement("claw-popup-dialog");return a.options=t,document.body.appendChild(a),a}function K(t,a,e){return` | ||
| :host { | ||
| display: inline-block; | ||
| vertical-align: middle; | ||
| font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; | ||
| -webkit-tap-highlight-color: transparent; | ||
| } | ||
| * { box-sizing: border-box; margin: 0; padding: 0; } | ||
| .cb-btn { | ||
| display: inline-flex; | ||
| align-items: center; | ||
| gap: var(--cb-gap); | ||
| height: var(--cb-height); | ||
| min-height: 44px; | ||
| padding: var(--cb-padding); | ||
| border: 1.5px solid var(--cb-border); | ||
| background: var(--cb-bg); | ||
| color: var(--cb-text); | ||
| font-family: inherit; | ||
| font-size: var(--cb-font-size); | ||
| font-weight: 600; | ||
| line-height: 1; | ||
| border-radius: var(--cb-radius); | ||
| cursor: pointer; | ||
| user-select: none; | ||
| white-space: nowrap; | ||
| touch-action: manipulation; | ||
| transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease, color 0.15s ease; | ||
| text-decoration: none; | ||
| -webkit-font-smoothing: antialiased; | ||
| } | ||
| @media (pointer: fine) { | ||
| .cb-btn { min-height: unset; } | ||
| } | ||
| :host([data-variant="filled"][data-theme="branded"]) .cb-btn, | ||
| :host([data-variant="filled"][data-theme="branded-alt"]) .cb-btn { | ||
| box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); | ||
| } | ||
| :host([data-variant="filled"][data-theme="branded"]) .cb-btn:hover { | ||
| background: ${a}; | ||
| box-shadow: 0 2px 8px ${t}59; | ||
| } | ||
| :host([data-variant="filled"][data-theme="branded"]) .cb-btn:active { | ||
| background: ${e}; | ||
| transform: scale(0.98); | ||
| } | ||
| :host([data-variant="filled"][data-theme="branded-alt"]) .cb-btn:hover { | ||
| background: #5A4BD6; | ||
| box-shadow: 0 2px 8px rgba(107, 92, 231, 0.35); | ||
| } | ||
| :host([data-variant="filled"][data-theme="branded-alt"]) .cb-btn:active { | ||
| background: #4F41C8; | ||
| transform: scale(0.98); | ||
| } | ||
| :host([data-variant="filled"][data-theme="dark"]) .cb-btn { | ||
| box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); | ||
| } | ||
| :host([data-variant="filled"][data-theme="dark"]) .cb-btn:hover { | ||
| background: #292524; | ||
| border-color: #57534E; | ||
| box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); | ||
| } | ||
| :host([data-variant="filled"][data-theme="dark"]) .cb-btn:active { | ||
| background: #1C1917; | ||
| transform: scale(0.98); | ||
| } | ||
| :host([data-variant="filled"][data-theme="light"]) .cb-btn { | ||
| box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04); | ||
| } | ||
| :host([data-variant="filled"][data-theme="light"]) .cb-btn:hover { | ||
| border-color: #D6D3D1; | ||
| box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); | ||
| } | ||
| :host([data-variant="filled"][data-theme="light"]) .cb-btn:active { | ||
| background: #FAFAF9; | ||
| transform: scale(0.98); | ||
| } | ||
| :host([data-variant="outline"][data-theme="branded"]) .cb-btn { | ||
| background: transparent; | ||
| border-color: ${t}; | ||
| color: ${t}; | ||
| } | ||
| :host([data-variant="outline"][data-theme="branded"]) .cb-btn:hover { | ||
| background: ${t}14; | ||
| box-shadow: 0 2px 8px ${t}26; | ||
| } | ||
| :host([data-variant="outline"][data-theme="branded"]) .cb-btn:active { | ||
| background: ${t}24; | ||
| transform: scale(0.98); | ||
| } | ||
| :host([data-variant="outline"][data-theme="branded-alt"]) .cb-btn { | ||
| background: transparent; | ||
| border-color: #6B5CE7; | ||
| color: #6B5CE7; | ||
| } | ||
| :host([data-variant="outline"][data-theme="branded-alt"]) .cb-btn:hover { | ||
| background: rgba(107, 92, 231, 0.08); | ||
| box-shadow: 0 2px 8px rgba(107, 92, 231, 0.15); | ||
| } | ||
| :host([data-variant="outline"][data-theme="branded-alt"]) .cb-btn:active { | ||
| background: rgba(107, 92, 231, 0.14); | ||
| transform: scale(0.98); | ||
| } | ||
| :host([data-variant="outline"][data-theme="dark"]) .cb-btn { | ||
| background: transparent; | ||
| border-color: #57534E; | ||
| color: #F5F0EB; | ||
| } | ||
| :host([data-variant="outline"][data-theme="dark"]) .cb-btn:hover { | ||
| border-color: ${t}; | ||
| background: ${t}14; | ||
| } | ||
| :host([data-variant="outline"][data-theme="dark"]) .cb-btn:active { | ||
| background: ${t}24; | ||
| transform: scale(0.98); | ||
| } | ||
| :host([data-variant="outline"][data-theme="light"]) .cb-btn { | ||
| background: transparent; | ||
| border-color: #D6D3D1; | ||
| color: #1C1917; | ||
| } | ||
| :host([data-variant="outline"][data-theme="light"]) .cb-btn:hover { | ||
| border-color: ${t}; | ||
| background: ${t}0D; | ||
| } | ||
| :host([data-variant="outline"][data-theme="light"]) .cb-btn:active { | ||
| background: ${t}1A; | ||
| transform: scale(0.98); | ||
| } | ||
| :host([data-variant="ghost"]) .cb-btn { | ||
| background: transparent; | ||
| border-color: transparent; | ||
| } | ||
| :host([data-variant="ghost"][data-theme="branded"]) .cb-btn { | ||
| color: ${t}; | ||
| } | ||
| :host([data-variant="ghost"][data-theme="branded"]) .cb-btn:hover { | ||
| background: ${t}1A; | ||
| } | ||
| :host([data-variant="ghost"][data-theme="branded"]) .cb-btn:active { | ||
| background: ${t}29; | ||
| transform: scale(0.98); | ||
| } | ||
| :host([data-variant="ghost"][data-theme="branded-alt"]) .cb-btn { | ||
| color: #6B5CE7; | ||
| } | ||
| :host([data-variant="ghost"][data-theme="branded-alt"]) .cb-btn:hover { | ||
| background: rgba(107, 92, 231, 0.1); | ||
| } | ||
| :host([data-variant="ghost"][data-theme="branded-alt"]) .cb-btn:active { | ||
| background: rgba(107, 92, 231, 0.16); | ||
| transform: scale(0.98); | ||
| } | ||
| :host([data-variant="ghost"][data-theme="dark"]) .cb-btn { | ||
| color: #F5F0EB; | ||
| } | ||
| :host([data-variant="ghost"][data-theme="dark"]) .cb-btn:hover { | ||
| background: rgba(255, 255, 255, 0.06); | ||
| } | ||
| :host([data-variant="ghost"][data-theme="dark"]) .cb-btn:active { | ||
| background: rgba(255, 255, 255, 0.1); | ||
| transform: scale(0.98); | ||
| } | ||
| :host([data-variant="ghost"][data-theme="light"]) .cb-btn { | ||
| color: #1C1917; | ||
| } | ||
| :host([data-variant="ghost"][data-theme="light"]) .cb-btn:hover { | ||
| background: rgba(0, 0, 0, 0.04); | ||
| } | ||
| :host([data-variant="ghost"][data-theme="light"]) .cb-btn:active { | ||
| background: rgba(0, 0, 0, 0.08); | ||
| transform: scale(0.98); | ||
| } | ||
| .cb-btn:focus-visible { | ||
| outline: 2px solid var(--cb-focus-color, ${t}); | ||
| outline-offset: 2px; | ||
| } | ||
| .cb-btn-icon { | ||
| width: var(--cb-icon-size); | ||
| height: var(--cb-icon-size); | ||
| flex-shrink: 0; | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| } | ||
| .cb-btn-icon svg { width: 100%; height: 100%; } | ||
| :host([data-variant="filled"][data-theme="branded"]) .cb-btn-icon, | ||
| :host([data-variant="filled"][data-theme="branded-alt"]) .cb-btn-icon { | ||
| color: #FFFFFF; | ||
| --cb-icon-accent: rgba(255,255,255,0.2); | ||
| } | ||
| :host([data-variant="filled"][data-theme="dark"]) .cb-btn-icon { | ||
| color: var(--cb-accent-color, ${t}); | ||
| --cb-icon-accent: #1C1917; | ||
| } | ||
| :host([data-variant="filled"][data-theme="light"]) .cb-btn-icon { | ||
| color: var(--cb-accent-color, ${t}); | ||
| --cb-icon-accent: #FFFFFF; | ||
| } | ||
| :host([data-variant="outline"]) .cb-btn-icon, | ||
| :host([data-variant="ghost"]) .cb-btn-icon { | ||
| color: var(--cb-accent-color, ${t}); | ||
| } | ||
| .cb-btn-label { | ||
| letter-spacing: -0.01em; | ||
| } | ||
| `}function Z(t){let a=K(t.brandColor,t.brandColorHover,t.brandColorActive),e=v(t.id);class o extends HTMLElement{constructor(){super();this._options={command:"",theme:"branded",size:"md",variant:"filled",popup:!0,promptFlag:!0};this._mqCleanup=null;this._rendered=!1;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(i){this._options={...this._options,...i},this.render(),this.updateLightDOM()}get options(){return this._options}get harnessId(){return t.id}syncFromAttributes(){let i=this.getAttribute("command"),s=this.getAttribute("skill-url"),d=this.getAttribute("theme"),r=this.getAttribute("size"),h=this.getAttribute("variant"),l=this.getAttribute("shape"),p=this.getAttribute("popup"),m=this.getAttribute("prompt-flag"),g=this.getAttribute("popup-title"),f=this.getAttribute("popup-description");i!==null&&(this._options.command=i),s!==null&&(this._options.skillUrl=s),d&&(this._options.theme=d),r&&(this._options.size=r),h&&(this._options.variant=h),l&&(this._options.shape=l),p!==null&&(this._options.popup=p!=="false"),m!==null&&(this._options.promptFlag=m!=="false"),g!==null&&(this._options.popupTitle=g),f!==null&&(this._options.popupDescription=f)}updateLightDOM(){let{command:i,skillUrl:s}=this._options,d=this.getFullCommand();this.setAttribute("role","button"),this.setAttribute("tabindex","0"),this.setAttribute("aria-label",`Run on ${t.name}: ${i}`),this._options.popup!==!1?this.setAttribute("aria-haspopup","dialog"):this.removeAttribute("aria-haspopup");let r=this.querySelector("a[data-cb-crawl]");r||(r=document.createElement("a"),r.setAttribute("data-cb-crawl",""),r.setAttribute("aria-hidden","true"),r.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;",this.appendChild(r)),r.textContent=`Run on ${t.name}: ${i}`,r.setAttribute("data-platform",t.id),r.setAttribute("data-command",i),r.setAttribute("data-full-command",d),s?(r.href=s,r.setAttribute("data-skill-url",s)):(r.href=`${t.urlBase}?command=${encodeURIComponent(d)}`,r.removeAttribute("data-skill-url"))}getResolvedTheme(){return this._options.theme||"branded"}getFullCommand(){let{command:i,promptFlag:s}=this._options;return s===!1?i:`${t.cliPrefix} "${i}"`}render(){if(!this.shadowRoot)return;let i=this.getResolvedTheme(),s=i==="system"?typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":i,d=this._options.variant||"filled",r=u(i,t.id),h=this._options.size||"md",l=this._options.shape||"rounded",p=M[h],m=B[l][h];this.setAttribute("data-theme",s),this.setAttribute("data-variant",d);let g=d!=="filled"?"transparent":r.bg,f=d==="ghost"?"transparent":d==="outline"?r.primary:r.border,L=d!=="filled"?r.primary:r.text;this.shadowRoot.innerHTML=` | ||
| <style>${a}</style> | ||
| <button | ||
| class="cb-btn" | ||
| type="button" | ||
| style=" | ||
| ${w(r)} | ||
| --cb-bg: ${g}; | ||
| --cb-border: ${f}; | ||
| --cb-text: ${L}; | ||
| --cb-accent-color: ${r.primary}; | ||
| --cb-focus-color: ${r.primary}; | ||
| --cb-height: ${p.height}; | ||
| --cb-font-size: ${p.fontSize}; | ||
| --cb-icon-size: ${p.iconSize}; | ||
| --cb-padding: ${p.padding}; | ||
| --cb-gap: ${p.gap}; | ||
| --cb-radius: ${m}; | ||
| " | ||
| aria-label="Run on ${t.name}: ${this._options.command.replace(/"/g,""")}" | ||
| > | ||
| <span class="cb-btn-icon" aria-hidden="true">${e}</span> | ||
| <span class="cb-btn-label">Run on ${t.name}</span> | ||
| </button> | ||
| `;let F=this.shadowRoot.querySelector(".cb-btn");F.addEventListener("click",()=>this.handleClick()),F.addEventListener("keydown",y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),this.handleClick())}),this._rendered=!0,this.setupSystemThemeWatch()}handleClick(){let{popup:i,command:s,skillUrl:d,popupTitle:r,popupDescription:h}=this._options,l=this.getFullCommand();if(this.dispatchEvent(new CustomEvent("cb-open",{bubbles:!0,composed:!0,detail:{command:s,fullCommand:l,harness:t.id}})),i===!1){navigator.clipboard.writeText(l).then(()=>{this._options.onCopy?.(l),k(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:!0,composed:!0,detail:{command:l,harness:t.id}}))});return}H({harnessId:t.id,theme:this.getResolvedTheme(),title:r||`Run on ${t.name}`,description:h||(d?`Install the skill and run the command in ${t.name}.`:`Execute this command in your terminal to get started with ${t.name}.`),command:s,fullCommand:l,skillUrl:d,onCopy:p=>{this._options.onCopy?.(p),k(t.id),this.dispatchEvent(new CustomEvent("cb-copy",{bubbles:!0,composed:!0,detail:{command:p,harness:t.id}}))},onClose:()=>{this.dispatchEvent(new CustomEvent("cb-close",{bubbles:!0,composed:!0,detail:{harness:t.id}}))}})}setupSystemThemeWatch(){if(this._mqCleanup?.(),this._mqCleanup=null,this.getResolvedTheme()!=="system"||typeof window>"u")return;let i=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>this.render();i.addEventListener("change",s),this._mqCleanup=()=>i.removeEventListener("change",s)}}return o.observedAttributes=["command","skill-url","theme","size","variant","shape","popup","prompt-flag","popup-title","popup-description"],o}var A={};function G(t){return A[t]||(A[t]=Z(b[t])),A[t]}function J(t,a){if(typeof customElements>"u")return;let e=a||b[t].tagName;customElements.get(e)||customElements.define(e,G(t))}function X(){S.forEach(t=>J(t))}function ft(t,a){let e=b[t].tagName,o=document.createElement(e);return o.options=a,o}X();export{ft as createButton,Z as createClawButtonClass,G as getButtonClass,X as registerAllButtons,J as registerHarnessButton}; | ||
| //# sourceMappingURL=claw-button-WGA6YKUX.mjs.map |
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
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
934567
-2.98%5728
-2.5%