hermesbuttons 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- 'use strict';var y=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="hb-icon">
1
+ 'use strict';var P="agentpreferences";function N(){return typeof document<"u"}function V(){if(!N())return null;let r=document.cookie.split(";").map(t=>t.trim()).find(t=>t.startsWith(`${P}=`));if(!r)return null;let n=r.slice(P.length+1);if(!n)return null;try{let t=decodeURIComponent(n),e=JSON.parse(t);return !e||typeof e!="object"||!Array.isArray(e.order)?null:{order:e.order.filter(a=>typeof a=="string"&&a.length>0)}}catch{return null}}function j(r){if(!N())return;let n=r.order.slice(0,24),t=JSON.stringify({order:n}),e=new Date;e.setFullYear(e.getFullYear()+1),document.cookie=`${P}=${encodeURIComponent(t)}; Path=/; SameSite=Lax; Expires=${e.toUTCString()}`;}function f(r){if(!r||typeof r!="string")return;let t=V()?.order.filter(e=>e!==r)??[];j({order:[r,...t]});}var w=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="hb-icon">
2
2
  <!-- Wing helmet -->
3
3
  <path d="M12 2C8.5 2 6 4.5 6 7c0 1.5.5 2.8 1.5 3.8L6 14h12l-1.5-3.2C17.5 9.8 18 8.5 18 7c0-2.5-2.5-5-6-5z" fill="currentColor" opacity="0.2"/>
4
4
  <path d="M12 2C8.5 2 6 4.5 6 7c0 1.5.5 2.8 1.5 3.8L6 14h12l-1.5-3.2C17.5 9.8 18 8.5 18 7c0-2.5-2.5-5-6-5z" stroke="currentColor" stroke-width="1.5" fill="none" stroke-linejoin="round"/>
@@ -12,7 +12,7 @@
12
12
  <path d="M9.5 19c1.5 1 3.5 1 5 0" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" fill="none"/>
13
13
  <!-- Eye -->
14
14
  <circle cx="12" cy="7.5" r="1.5" fill="currentColor"/>
15
- </svg>`,w=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="hb-icon">
15
+ </svg>`,C=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="hb-icon">
16
16
  <!-- Brain/memory symbol -->
17
17
  <path d="M12 3C8 3 5 6 5 9c0 2 1 3.5 2 4.5V16a2 2 0 002 2h6a2 2 0 002-2v-2.5c1-1 2-2.5 2-4.5 0-3-3-6-7-6z" fill="currentColor" opacity="0.15"/>
18
18
  <path d="M12 3C8 3 5 6 5 9c0 2 1 3.5 2 4.5V16a2 2 0 002 2h6a2 2 0 002-2v-2.5c1-1 2-2.5 2-4.5 0-3-3-6-7-6z" stroke="currentColor" stroke-width="1.5" fill="none" stroke-linejoin="round"/>
@@ -23,14 +23,14 @@
23
23
  <!-- Sparkle -->
24
24
  <circle cx="8" cy="6" r="0.8" fill="currentColor"/>
25
25
  <circle cx="16" cy="6" r="0.8" fill="currentColor"/>
26
- </svg>`,C=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="hb-icon-sm">
26
+ </svg>`,A=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="hb-icon-sm">
27
27
  <rect x="5" y="5" width="8" height="8" rx="1.5" stroke="currentColor" stroke-width="1.5" fill="none"/>
28
28
  <path d="M3 10V3.5A1.5 1.5 0 014.5 2H10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
29
- </svg>`,z=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="hb-icon-sm">
29
+ </svg>`,D=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="hb-icon-sm">
30
30
  <path d="M3 8.5l3.5 3.5L13 4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
31
- </svg>`;var D=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="hb-icon-sm">
31
+ </svg>`;var I=`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="hb-icon-sm">
32
32
  <path d="M4 4l8 8m0-8l-8 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
33
- </svg>`;var n="#2B8CFF",v="#1E7AEB",T="#186BD4",s="43, 140, 255",u="#8FA3E8",E="#7B91DC",S="#6B82CC",p="143, 163, 232",_={branded:{bg:n,text:"#FFFFFF",border:"transparent",surface:"#FFFFFF",surfaceText:"#0F172A",muted:"#64748B",primary:n,primaryText:"#FFFFFF",codeBg:"#0F172A",codeText:"#F1F5F9"},"branded-alt":{bg:u,text:"#FFFFFF",border:"transparent",surface:"#FFFFFF",surfaceText:"#0F172A",muted:"#64748B",primary:u,primaryText:"#FFFFFF",codeBg:"#0F172A",codeText:"#F1F5F9"},dark:{bg:"#141C2E",text:"#F1F5F9",border:"#2A3F5C",surface:"#1A2740",surfaceText:"#F1F5F9",muted:"#94A3B8",primary:n,primaryText:"#FFFFFF",codeBg:"#0A0E18",codeText:"#F1F5F9"},light:{bg:"#FFFFFF",text:"#0F172A",border:"#CBD5E1",surface:"#F8FAFC",surfaceText:"#0F172A",muted:"#64748B",primary:n,primaryText:"#FFFFFF",codeBg:"#0F172A",codeText:"#F1F5F9"}};function b(r){return r!=="system"?_[r]:typeof window>"u"?_.light:window.matchMedia("(prefers-color-scheme: dark)").matches?_.dark:_.light}function f(r){return `
33
+ </svg>`;var i="#2B8CFF",v="#1E7AEB",T="#186BD4",s="43, 140, 255",u="#8FA3E8",R="#7B91DC",S="#6B82CC",c="143, 163, 232",_={branded:{bg:i,text:"#FFFFFF",border:"transparent",surface:"#FFFFFF",surfaceText:"#0F172A",muted:"#64748B",primary:i,primaryText:"#FFFFFF",codeBg:"#0F172A",codeText:"#F1F5F9"},"branded-alt":{bg:u,text:"#FFFFFF",border:"transparent",surface:"#FFFFFF",surfaceText:"#0F172A",muted:"#64748B",primary:u,primaryText:"#FFFFFF",codeBg:"#0F172A",codeText:"#F1F5F9"},dark:{bg:"#141C2E",text:"#F1F5F9",border:"#2A3F5C",surface:"#1A2740",surfaceText:"#F1F5F9",muted:"#94A3B8",primary:i,primaryText:"#FFFFFF",codeBg:"#0A0E18",codeText:"#F1F5F9"},light:{bg:"#FFFFFF",text:"#0F172A",border:"#CBD5E1",surface:"#F8FAFC",surfaceText:"#0F172A",muted:"#64748B",primary:i,primaryText:"#FFFFFF",codeBg:"#0F172A",codeText:"#F1F5F9"}};function b(r){return r!=="system"?_[r]:typeof window>"u"?_.light:window.matchMedia("(prefers-color-scheme: dark)").matches?_.dark:_.light}function x(r){return `
34
34
  --hb-bg: ${r.bg};
35
35
  --hb-text: ${r.text};
36
36
  --hb-border: ${r.border};
@@ -41,7 +41,7 @@
41
41
  --hb-primary-text: ${r.primaryText};
42
42
  --hb-code-bg: ${r.codeBg};
43
43
  --hb-code-text: ${r.codeText};
44
- `}var R={rounded:{sm:"0.375rem",md:"0.5rem",lg:"0.625rem"},pill:{sm:"999px",md:"999px",lg:"999px"},square:{sm:"0",md:"0",lg:"0"}},O={sm:{height:"2rem",fontSize:"0.75rem",iconSize:"0.875rem",padding:"0 0.75rem",ccPadding:"0 0.5rem",gap:"0.375rem",radius:"0.375rem"},md:{height:"2.5rem",fontSize:"0.875rem",iconSize:"1.125rem",padding:"0 1rem",ccPadding:"0 0.75rem",gap:"0.5rem",radius:"0.5rem"},lg:{height:"3rem",fontSize:"1rem",iconSize:"1.375rem",padding:"0 1.25rem",ccPadding:"0 1rem",gap:"0.625rem",radius:"0.625rem"}};var I=`
44
+ `}var O={rounded:{sm:"0.375rem",md:"0.5rem",lg:"0.625rem"},pill:{sm:"999px",md:"999px",lg:"999px"},square:{sm:"0",md:"0",lg:"0"}},L={sm:{height:"2rem",fontSize:"0.75rem",iconSize:"0.875rem",padding:"0 0.75rem",ccPadding:"0 0.5rem",gap:"0.375rem",radius:"0.375rem"},md:{height:"2.5rem",fontSize:"0.875rem",iconSize:"1.125rem",padding:"0 1rem",ccPadding:"0 0.75rem",gap:"0.5rem",radius:"0.5rem"},lg:{height:"3rem",fontSize:"1rem",iconSize:"1.375rem",padding:"0 1.25rem",ccPadding:"0 1rem",gap:"0.625rem",radius:"0.625rem"}};var W=`
45
45
  :host {
46
46
  position: fixed;
47
47
  inset: 0;
@@ -318,24 +318,24 @@
318
318
  @supports (padding: env(safe-area-inset-bottom)) {
319
319
  .hb-dialog-footer { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
320
320
  }
321
- `,L=class extends HTMLElement{constructor(){super();this._mqCleanup=null;this.attachShadow({mode:"open"});}set options(t){this._options=t,this.render();}get options(){return this._options}disconnectedCallback(){this._mqCleanup?.(),this._mqCleanup=null;}resolvePopupTokens(){let{theme:t}=this._options;if(t==="dark"||t==="light")return b(t);let a=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;if(t==="system")return a?b("dark"):b("light");let e=a?b("dark"):b("light"),o=b(t);return {...e,primary:o.primary,primaryText:o.primaryText}}render(){if(!this.shadowRoot||!this._options)return;let{variant:t,title:a,description:e,command:o,fullCommand:d,skillUrl:l}=this._options,h=this.resolvePopupTokens(),m=t==="hermes"?y:w,c=t==="hermes",x=d||o;this.shadowRoot.innerHTML=`
322
- <style>${I}</style>
323
- <div style="${f(h)}">
321
+ `,B=class extends HTMLElement{constructor(){super();this._mqCleanup=null;this.attachShadow({mode:"open"});}set options(t){this._options=t,this.render();}get options(){return this._options}disconnectedCallback(){this._mqCleanup?.(),this._mqCleanup=null;}resolvePopupTokens(){let{theme:t}=this._options;if(t==="dark"||t==="light")return b(t);let e=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;if(t==="system")return e?b("dark"):b("light");let o=e?b("dark"):b("light"),a=b(t);return {...o,primary:a.primary,primaryText:a.primaryText}}render(){if(!this.shadowRoot||!this._options)return;let{variant:t,title:e,description:o,command:a,fullCommand:d,skillUrl:l}=this._options,h=this.resolvePopupTokens(),m=t==="hermes"?w:C,p=t==="hermes",k=d||a;this.shadowRoot.innerHTML=`
322
+ <style>${W}</style>
323
+ <div style="${x(h)}">
324
324
  <div class="hb-backdrop" data-action="close"></div>
325
325
  <div class="hb-dialog" role="dialog" aria-modal="true" aria-labelledby="hb-dialog-title">
326
326
  <div class="hb-dialog-header">
327
327
  <div class="hb-dialog-header-icon">${m}</div>
328
328
  <div class="hb-dialog-header-text">
329
- <div class="hb-dialog-title" id="hb-dialog-title">${a}</div>
330
- ${e?`<div class="hb-dialog-description">${e}</div>`:""}
329
+ <div class="hb-dialog-title" id="hb-dialog-title">${e}</div>
330
+ ${o?`<div class="hb-dialog-description">${o}</div>`:""}
331
331
  </div>
332
- <button class="hb-dialog-close" data-action="close" aria-label="Close">${D}</button>
332
+ <button class="hb-dialog-close" data-action="close" aria-label="Close">${I}</button>
333
333
  </div>
334
334
  <div class="hb-dialog-body">
335
- ${c?this.renderHermesTerminalBody(x):this.renderHermesSkillBody(o,l)}
335
+ ${p?this.renderHermesTerminalBody(k):this.renderHermesSkillBody(a,l)}
336
336
  </div>
337
337
  <div class="hb-dialog-footer">
338
- ${c?`
338
+ ${p?`
339
339
  <div class="hb-hint">Press <kbd>\u2318</kbd>+<kbd>V</kbd> or <kbd>Ctrl</kbd>+<kbd>V</kbd> in your terminal to run</div>
340
340
  `:`
341
341
  <div class="hb-hint">Press <kbd>\u2318</kbd>+<kbd>V</kbd> or <kbd>Ctrl</kbd>+<kbd>V</kbd> in your Hermes session to run</div>
@@ -350,7 +350,7 @@
350
350
  <div class="hb-step-label">Copy this command to your clipboard</div>
351
351
  <div class="hb-code-block">
352
352
  <div class="hb-code-text"><span class="hb-code-prefix">$</span>${this.escapeHtml(t)}</div>
353
- <button class="hb-copy-btn" data-action="copy" data-command="${this.escapeAttr(t)}">${C}<span>Copy</span></button>
353
+ <button class="hb-copy-btn" data-action="copy" data-command="${this.escapeAttr(t)}">${A}<span>Copy</span></button>
354
354
  </div>
355
355
  </div>
356
356
  </div>
@@ -360,14 +360,14 @@
360
360
  <div class="hb-step-label">Paste and run in your terminal</div>
361
361
  </div>
362
362
  </div>
363
- `}renderHermesSkillBody(t,a){let e="";if(a){let o=`Install the skill from ${a} and run ${t}`;e+=`
363
+ `}renderHermesSkillBody(t,e){let o="";if(e){let a=`Install the skill from ${e} and run ${t}`;o+=`
364
364
  <div class="hb-step">
365
365
  <div class="hb-step-num">1</div>
366
366
  <div class="hb-step-content">
367
367
  <div class="hb-step-label">Copy this prompt to your clipboard</div>
368
368
  <div class="hb-code-block">
369
- <div class="hb-code-text">${this.escapeHtml(o)}</div>
370
- <button class="hb-copy-btn" data-action="copy" data-command="${this.escapeAttr(o)}">${C}<span>Copy</span></button>
369
+ <div class="hb-code-text">${this.escapeHtml(a)}</div>
370
+ <button class="hb-copy-btn" data-action="copy" data-command="${this.escapeAttr(a)}">${A}<span>Copy</span></button>
371
371
  </div>
372
372
  </div>
373
373
  </div>
@@ -377,14 +377,14 @@
377
377
  <div class="hb-step-label">Paste into a Hermes session \u2014 the agent will fetch the skill and set it up for you</div>
378
378
  </div>
379
379
  </div>
380
- `;}else e+=`
380
+ `;}else o+=`
381
381
  <div class="hb-step">
382
382
  <div class="hb-step-num">1</div>
383
383
  <div class="hb-step-content">
384
384
  <div class="hb-step-label">Copy this command to your clipboard</div>
385
385
  <div class="hb-code-block">
386
386
  <div class="hb-code-text">${this.escapeHtml(t)}</div>
387
- <button class="hb-copy-btn" data-action="copy" data-command="${this.escapeAttr(t)}">${C}<span>Copy</span></button>
387
+ <button class="hb-copy-btn" data-action="copy" data-command="${this.escapeAttr(t)}">${A}<span>Copy</span></button>
388
388
  </div>
389
389
  </div>
390
390
  </div>
@@ -394,7 +394,7 @@
394
394
  <div class="hb-step-label">Paste and send in your Hermes session</div>
395
395
  </div>
396
396
  </div>
397
- `;return e}setupListeners(){this.shadowRoot&&(this.shadowRoot.addEventListener("click",t=>{let a=t.target.closest("[data-action]");if(!a)return;let e=a.dataset.action;if(e==="close")this.close();else if(e==="copy"){let o=a.dataset.command||"";this.copyToClipboard(o,a);}}),this.shadowRoot.addEventListener("keydown",t=>{t.key==="Escape"&&this.close();}));}setupSystemThemeWatch(){this._mqCleanup?.(),this._mqCleanup=null;let t=this._options.theme;if(!(t==="system"||t==="branded"||t==="branded-alt")||typeof window>"u")return;let e=window.matchMedia("(prefers-color-scheme: dark)"),o=()=>this.render();e.addEventListener("change",o),this._mqCleanup=()=>e.removeEventListener("change",o);}async copyToClipboard(t,a){try{await navigator.clipboard.writeText(t);let e=a.querySelector("span"),o=a;a.setAttribute("data-copied","true"),e&&(e.textContent="Copied!"),o.innerHTML=`${z}<span>Copied!</span>`,this._options.onCopy?.(t),setTimeout(()=>{a.setAttribute("data-copied","false"),o.innerHTML=`${C}<span>Copy</span>`;},2e3);}catch{let e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e),this._options.onCopy?.(t);}}close(){let t=this.shadowRoot?.querySelector(".hb-dialog"),a=this.shadowRoot?.querySelector(".hb-backdrop");t&&(t.style.animation="hb-scale-in 0.15s ease-in reverse"),a&&(a.style.animation="hb-fade-in 0.15s ease-in reverse"),setTimeout(()=>{this._options.onClose?.(),this.remove();},140);}escapeHtml(t){let a=document.createElement("div");return a.textContent=t,a.innerHTML}escapeAttr(t){return t.replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}};typeof customElements<"u"&&!customElements.get("hermes-popup-dialog")&&customElements.define("hermes-popup-dialog",L);function A(r){let i=document.createElement("hermes-popup-dialog");return i.options=r,document.body.appendChild(i),i}var q=`
397
+ `;return o}setupListeners(){this.shadowRoot&&(this.shadowRoot.addEventListener("click",t=>{let e=t.target.closest("[data-action]");if(!e)return;let o=e.dataset.action;if(o==="close")this.close();else if(o==="copy"){let a=e.dataset.command||"";this.copyToClipboard(a,e);}}),this.shadowRoot.addEventListener("keydown",t=>{t.key==="Escape"&&this.close();}));}setupSystemThemeWatch(){this._mqCleanup?.(),this._mqCleanup=null;let t=this._options.theme;if(!(t==="system"||t==="branded"||t==="branded-alt")||typeof window>"u")return;let o=window.matchMedia("(prefers-color-scheme: dark)"),a=()=>this.render();o.addEventListener("change",a),this._mqCleanup=()=>o.removeEventListener("change",a);}async copyToClipboard(t,e){try{await navigator.clipboard.writeText(t);let o=e.querySelector("span"),a=e;e.setAttribute("data-copied","true"),o&&(o.textContent="Copied!"),a.innerHTML=`${D}<span>Copied!</span>`,this._options.onCopy?.(t),setTimeout(()=>{e.setAttribute("data-copied","false"),a.innerHTML=`${A}<span>Copy</span>`;},2e3);}catch{let o=document.createElement("textarea");o.value=t,o.style.position="fixed",o.style.opacity="0",document.body.appendChild(o),o.select(),document.execCommand("copy"),document.body.removeChild(o),this._options.onCopy?.(t);}}close(){let t=this.shadowRoot?.querySelector(".hb-dialog"),e=this.shadowRoot?.querySelector(".hb-backdrop");t&&(t.style.animation="hb-scale-in 0.15s ease-in reverse"),e&&(e.style.animation="hb-fade-in 0.15s ease-in reverse"),setTimeout(()=>{this._options.onClose?.(),this.remove();},140);}escapeHtml(t){let e=document.createElement("div");return e.textContent=t,e.innerHTML}escapeAttr(t){return t.replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}};typeof customElements<"u"&&!customElements.get("hermes-popup-dialog")&&customElements.define("hermes-popup-dialog",B);function E(r){let n=document.createElement("hermes-popup-dialog");return n.options=r,document.body.appendChild(n),n}var G=`
398
398
  :host {
399
399
  display: inline-block;
400
400
  vertical-align: middle;
@@ -447,8 +447,8 @@
447
447
  transform: scale(0.98);
448
448
  }
449
449
  :host([data-variant="filled"][data-theme="branded-alt"]) .hb-btn:hover {
450
- background: ${E};
451
- box-shadow: 0 2px 8px rgba(${p}, 0.35);
450
+ background: ${R};
451
+ box-shadow: 0 2px 8px rgba(${c}, 0.35);
452
452
  }
453
453
  :host([data-variant="filled"][data-theme="branded-alt"]) .hb-btn:active {
454
454
  background: ${S};
@@ -484,8 +484,8 @@
484
484
 
485
485
  :host([data-variant="outline"][data-theme="branded"]) .hb-btn {
486
486
  background: transparent;
487
- border-color: ${n};
488
- color: ${n};
487
+ border-color: ${i};
488
+ color: ${i};
489
489
  }
490
490
  :host([data-variant="outline"][data-theme="branded"]) .hb-btn:hover {
491
491
  background: rgba(${s}, 0.08);
@@ -502,11 +502,11 @@
502
502
  color: ${u};
503
503
  }
504
504
  :host([data-variant="outline"][data-theme="branded-alt"]) .hb-btn:hover {
505
- background: rgba(${p}, 0.08);
506
- box-shadow: 0 2px 8px rgba(${p}, 0.15);
505
+ background: rgba(${c}, 0.08);
506
+ box-shadow: 0 2px 8px rgba(${c}, 0.15);
507
507
  }
508
508
  :host([data-variant="outline"][data-theme="branded-alt"]) .hb-btn:active {
509
- background: rgba(${p}, 0.14);
509
+ background: rgba(${c}, 0.14);
510
510
  transform: scale(0.98);
511
511
  }
512
512
 
@@ -516,7 +516,7 @@
516
516
  color: #F1F5F9;
517
517
  }
518
518
  :host([data-variant="outline"][data-theme="dark"]) .hb-btn:hover {
519
- border-color: ${n};
519
+ border-color: ${i};
520
520
  background: rgba(${s}, 0.08);
521
521
  }
522
522
  :host([data-variant="outline"][data-theme="dark"]) .hb-btn:active {
@@ -530,7 +530,7 @@
530
530
  color: #0F172A;
531
531
  }
532
532
  :host([data-variant="outline"][data-theme="light"]) .hb-btn:hover {
533
- border-color: ${n};
533
+ border-color: ${i};
534
534
  background: rgba(${s}, 0.05);
535
535
  }
536
536
  :host([data-variant="outline"][data-theme="light"]) .hb-btn:active {
@@ -546,7 +546,7 @@
546
546
  }
547
547
 
548
548
  :host([data-variant="ghost"][data-theme="branded"]) .hb-btn {
549
- color: ${n};
549
+ color: ${i};
550
550
  }
551
551
  :host([data-variant="ghost"][data-theme="branded"]) .hb-btn:hover {
552
552
  background: rgba(${s}, 0.1);
@@ -560,10 +560,10 @@
560
560
  color: ${u};
561
561
  }
562
562
  :host([data-variant="ghost"][data-theme="branded-alt"]) .hb-btn:hover {
563
- background: rgba(${p}, 0.1);
563
+ background: rgba(${c}, 0.1);
564
564
  }
565
565
  :host([data-variant="ghost"][data-theme="branded-alt"]) .hb-btn:active {
566
- background: rgba(${p}, 0.16);
566
+ background: rgba(${c}, 0.16);
567
567
  transform: scale(0.98);
568
568
  }
569
569
 
@@ -592,7 +592,7 @@
592
592
  /* \u2500\u2500\u2500 FOCUS \u2500\u2500\u2500 */
593
593
 
594
594
  .hb-btn:focus-visible {
595
- outline: 2px solid var(--hb-focus-color, ${n});
595
+ outline: 2px solid var(--hb-focus-color, ${i});
596
596
  outline-offset: 2px;
597
597
  }
598
598
 
@@ -615,15 +615,15 @@
615
615
  --hb-icon-accent: rgba(255,255,255,0.2);
616
616
  }
617
617
  :host([data-variant="filled"][data-theme="dark"]) .hb-btn-icon {
618
- color: var(--hb-accent-color, ${n});
618
+ color: var(--hb-accent-color, ${i});
619
619
  }
620
620
  :host([data-variant="filled"][data-theme="light"]) .hb-btn-icon {
621
- color: var(--hb-accent-color, ${n});
621
+ color: var(--hb-accent-color, ${i});
622
622
  }
623
623
 
624
624
  :host([data-variant="outline"]) .hb-btn-icon,
625
625
  :host([data-variant="ghost"]) .hb-btn-icon {
626
- color: var(--hb-accent-color, ${n});
626
+ color: var(--hb-accent-color, ${i});
627
627
  }
628
628
 
629
629
  /* \u2500\u2500\u2500 LABEL \u2500\u2500\u2500 */
@@ -631,18 +631,18 @@
631
631
  .hb-btn-label {
632
632
  letter-spacing: -0.01em;
633
633
  }
634
- `,F=class 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(t){this._options={...this._options,...t},this.render(),this.updateLightDOM();}get options(){return this._options}syncFromAttributes(){let t=this.getAttribute("command"),a=this.getAttribute("theme"),e=this.getAttribute("size"),o=this.getAttribute("variant"),d=this.getAttribute("shape"),l=this.getAttribute("popup"),h=this.getAttribute("prompt-flag"),m=this.getAttribute("popup-title"),c=this.getAttribute("popup-description");t!==null&&(this._options.command=t),a&&(this._options.theme=a),e&&(this._options.size=e),o&&(this._options.variant=o),d&&(this._options.shape=d),l!==null&&(this._options.popup=l!=="false"),h!==null&&(this._options.promptFlag=h!=="false"),m!==null&&(this._options.popupTitle=m),c!==null&&(this._options.popupDescription=c);}updateLightDOM(){let{command:t}=this._options,a=this.getFullCommand();this.setAttribute("role","button"),this.setAttribute("tabindex","0"),this.setAttribute("aria-label",`Run on Hermes: ${t}`),this._options.popup!==false?this.setAttribute("aria-haspopup","dialog"):this.removeAttribute("aria-haspopup");let e=this.querySelector("a[data-hb-crawl]");e||(e=document.createElement("a"),e.setAttribute("data-hb-crawl",""),e.setAttribute("aria-hidden","true"),e.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;",this.appendChild(e)),e.href=`https://hermes.ai/run?command=${encodeURIComponent(a)}`,e.textContent=`Run on Hermes: ${t}`,e.setAttribute("data-platform","hermes"),e.setAttribute("data-command",t),e.setAttribute("data-full-command",a);}getResolvedTheme(){return this._options.theme||"branded"}getFullCommand(){let{command:t,promptFlag:a}=this._options;return a===false?t:`hermes -p "${t}"`}render(){if(!this.shadowRoot)return;let t=this.getResolvedTheme(),a=t==="system"?typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t,e=this._options.variant||"filled",o=b(t),d=this._options.size||"md",l=this._options.shape||"rounded",h=O[d],m=R[l][d];this.setAttribute("data-theme",a),this.setAttribute("data-variant",e);let c=e!=="filled"?"transparent":o.bg,x=e==="ghost"?"transparent":e==="outline"?o.primary:o.border,M=e!=="filled"?o.primary:o.text;this.shadowRoot.innerHTML=`
635
- <style>${q}</style>
634
+ `,F=class 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(t){this._options={...this._options,...t},this.render(),this.updateLightDOM();}get options(){return this._options}syncFromAttributes(){let t=this.getAttribute("command"),e=this.getAttribute("theme"),o=this.getAttribute("size"),a=this.getAttribute("variant"),d=this.getAttribute("shape"),l=this.getAttribute("popup"),h=this.getAttribute("prompt-flag"),m=this.getAttribute("popup-title"),p=this.getAttribute("popup-description");t!==null&&(this._options.command=t),e&&(this._options.theme=e),o&&(this._options.size=o),a&&(this._options.variant=a),d&&(this._options.shape=d),l!==null&&(this._options.popup=l!=="false"),h!==null&&(this._options.promptFlag=h!=="false"),m!==null&&(this._options.popupTitle=m),p!==null&&(this._options.popupDescription=p);}updateLightDOM(){let{command:t}=this._options,e=this.getFullCommand();this.setAttribute("role","button"),this.setAttribute("tabindex","0"),this.setAttribute("aria-label",`Run on Hermes: ${t}`),this._options.popup!==false?this.setAttribute("aria-haspopup","dialog"):this.removeAttribute("aria-haspopup");let o=this.querySelector("a[data-hb-crawl]");o||(o=document.createElement("a"),o.setAttribute("data-hb-crawl",""),o.setAttribute("aria-hidden","true"),o.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;",this.appendChild(o)),o.href=`https://hermes.ai/run?command=${encodeURIComponent(e)}`,o.textContent=`Run on Hermes: ${t}`,o.setAttribute("data-platform","hermes"),o.setAttribute("data-command",t),o.setAttribute("data-full-command",e);}getResolvedTheme(){return this._options.theme||"branded"}getFullCommand(){let{command:t,promptFlag:e}=this._options;return e===false?t:`hermes -p "${t}"`}render(){if(!this.shadowRoot)return;let t=this.getResolvedTheme(),e=t==="system"?typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t,o=this._options.variant||"filled",a=b(t),d=this._options.size||"md",l=this._options.shape||"rounded",h=L[d],m=O[l][d];this.setAttribute("data-theme",e),this.setAttribute("data-variant",o);let p=o!=="filled"?"transparent":a.bg,k=o==="ghost"?"transparent":o==="outline"?a.primary:a.border,z=o!=="filled"?a.primary:a.text;this.shadowRoot.innerHTML=`
635
+ <style>${G}</style>
636
636
  <button
637
637
  class="hb-btn"
638
638
  type="button"
639
639
  style="
640
- ${f(o)}
641
- --hb-bg: ${c};
642
- --hb-border: ${x};
643
- --hb-text: ${M};
644
- --hb-accent-color: ${o.primary};
645
- --hb-focus-color: ${o.primary};
640
+ ${x(a)}
641
+ --hb-bg: ${p};
642
+ --hb-border: ${k};
643
+ --hb-text: ${z};
644
+ --hb-accent-color: ${a.primary};
645
+ --hb-focus-color: ${a.primary};
646
646
  --hb-height: ${h.height};
647
647
  --hb-font-size: ${h.fontSize};
648
648
  --hb-icon-size: ${h.iconSize};
@@ -652,10 +652,10 @@
652
652
  "
653
653
  aria-label="Run on Hermes: ${this._options.command.replace(/"/g,"&quot;")}"
654
654
  >
655
- <span class="hb-btn-icon" aria-hidden="true">${y}</span>
655
+ <span class="hb-btn-icon" aria-hidden="true">${w}</span>
656
656
  <span class="hb-btn-label">Run on Hermes</span>
657
657
  </button>
658
- `;let k=this.shadowRoot.querySelector(".hb-btn");k.addEventListener("click",()=>this.handleClick()),k.addEventListener("keydown",g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),this.handleClick());}),this._rendered=true,this.setupSystemThemeWatch();}handleClick(){let{popup:t,command:a,popupTitle:e,popupDescription:o}=this._options,d=this.getFullCommand();if(this.dispatchEvent(new CustomEvent("hb-open",{bubbles:true,composed:true,detail:{command:a,fullCommand:d}})),t===false){navigator.clipboard.writeText(d).then(()=>{this._options.onCopy?.(d),this.dispatchEvent(new CustomEvent("hb-copy",{bubbles:true,composed:true,detail:{command:d}}));});return}A({variant:"hermes",theme:this.getResolvedTheme(),title:e||"Run on Hermes",description:o||"Execute this command in your terminal to get started with Hermes Agent.",command:a,fullCommand:d,onCopy:l=>{this._options.onCopy?.(l),this.dispatchEvent(new CustomEvent("hb-copy",{bubbles:true,composed:true,detail:{command:l}}));},onClose:()=>{this.dispatchEvent(new CustomEvent("hb-close",{bubbles:true,composed:true}));}});}setupSystemThemeWatch(){if(this._mqCleanup?.(),this._mqCleanup=null,this.getResolvedTheme()!=="system"||typeof window>"u")return;let t=window.matchMedia("(prefers-color-scheme: dark)"),a=()=>this.render();t.addEventListener("change",a),this._mqCleanup=()=>t.removeEventListener("change",a);}};F.observedAttributes=["command","theme","size","variant","shape","popup","prompt-flag","popup-title","popup-description"];function B(r="hermes-button"){typeof customElements>"u"||customElements.get(r)||customElements.define(r,F);}B();function V(r){let i=document.createElement("hermes-button");return i.options=r,i}var U=`
658
+ `;let y=this.shadowRoot.querySelector(".hb-btn");y.addEventListener("click",()=>this.handleClick()),y.addEventListener("keydown",g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),this.handleClick());}),this._rendered=true,this.setupSystemThemeWatch();}handleClick(){let{popup:t,command:e,popupTitle:o,popupDescription:a}=this._options,d=this.getFullCommand();if(this.dispatchEvent(new CustomEvent("hb-open",{bubbles:true,composed:true,detail:{command:e,fullCommand:d}})),t===false){navigator.clipboard.writeText(d).then(()=>{this._options.onCopy?.(d),f("hermes"),this.dispatchEvent(new CustomEvent("hb-copy",{bubbles:true,composed:true,detail:{command:d}}));});return}E({variant:"hermes",theme:this.getResolvedTheme(),title:o||"Run on Hermes",description:a||"Execute this command in your terminal to get started with Hermes Agent.",command:e,fullCommand:d,onCopy:l=>{this._options.onCopy?.(l),f("hermes"),this.dispatchEvent(new CustomEvent("hb-copy",{bubbles:true,composed:true,detail:{command:l}}));},onClose:()=>{this.dispatchEvent(new CustomEvent("hb-close",{bubbles:true,composed:true}));}});}setupSystemThemeWatch(){if(this._mqCleanup?.(),this._mqCleanup=null,this.getResolvedTheme()!=="system"||typeof window>"u")return;let t=window.matchMedia("(prefers-color-scheme: dark)"),e=()=>this.render();t.addEventListener("change",e),this._mqCleanup=()=>t.removeEventListener("change",e);}};F.observedAttributes=["command","theme","size","variant","shape","popup","prompt-flag","popup-title","popup-description"];function H(r="hermes-button"){typeof customElements>"u"||customElements.get(r)||customElements.define(r,F);}H();function K(r){let n=document.createElement("hermes-button");return n.options=r,n}var Y=`
659
659
  :host {
660
660
  display: inline-block;
661
661
  vertical-align: middle;
@@ -708,8 +708,8 @@
708
708
  transform: scale(0.98);
709
709
  }
710
710
  :host([data-variant="filled"][data-theme="branded-alt"]) .hb-btn:hover {
711
- background: ${E};
712
- box-shadow: 0 2px 8px rgba(${p}, 0.35);
711
+ background: ${R};
712
+ box-shadow: 0 2px 8px rgba(${c}, 0.35);
713
713
  }
714
714
  :host([data-variant="filled"][data-theme="branded-alt"]) .hb-btn:active {
715
715
  background: ${S};
@@ -745,8 +745,8 @@
745
745
 
746
746
  :host([data-variant="outline"][data-theme="branded"]) .hb-btn {
747
747
  background: transparent;
748
- border-color: ${n};
749
- color: ${n};
748
+ border-color: ${i};
749
+ color: ${i};
750
750
  }
751
751
  :host([data-variant="outline"][data-theme="branded"]) .hb-btn:hover {
752
752
  background: rgba(${s}, 0.08);
@@ -763,11 +763,11 @@
763
763
  color: ${u};
764
764
  }
765
765
  :host([data-variant="outline"][data-theme="branded-alt"]) .hb-btn:hover {
766
- background: rgba(${p}, 0.08);
767
- box-shadow: 0 2px 8px rgba(${p}, 0.15);
766
+ background: rgba(${c}, 0.08);
767
+ box-shadow: 0 2px 8px rgba(${c}, 0.15);
768
768
  }
769
769
  :host([data-variant="outline"][data-theme="branded-alt"]) .hb-btn:active {
770
- background: rgba(${p}, 0.14);
770
+ background: rgba(${c}, 0.14);
771
771
  transform: scale(0.98);
772
772
  }
773
773
 
@@ -777,7 +777,7 @@
777
777
  color: #F1F5F9;
778
778
  }
779
779
  :host([data-variant="outline"][data-theme="dark"]) .hb-btn:hover {
780
- border-color: ${n};
780
+ border-color: ${i};
781
781
  background: rgba(${s}, 0.08);
782
782
  }
783
783
  :host([data-variant="outline"][data-theme="dark"]) .hb-btn:active {
@@ -791,7 +791,7 @@
791
791
  color: #0F172A;
792
792
  }
793
793
  :host([data-variant="outline"][data-theme="light"]) .hb-btn:hover {
794
- border-color: ${n};
794
+ border-color: ${i};
795
795
  background: rgba(${s}, 0.05);
796
796
  }
797
797
  :host([data-variant="outline"][data-theme="light"]) .hb-btn:active {
@@ -807,7 +807,7 @@
807
807
  }
808
808
 
809
809
  :host([data-variant="ghost"][data-theme="branded"]) .hb-btn {
810
- color: ${n};
810
+ color: ${i};
811
811
  }
812
812
  :host([data-variant="ghost"][data-theme="branded"]) .hb-btn:hover {
813
813
  background: rgba(${s}, 0.1);
@@ -821,10 +821,10 @@
821
821
  color: ${u};
822
822
  }
823
823
  :host([data-variant="ghost"][data-theme="branded-alt"]) .hb-btn:hover {
824
- background: rgba(${p}, 0.1);
824
+ background: rgba(${c}, 0.1);
825
825
  }
826
826
  :host([data-variant="ghost"][data-theme="branded-alt"]) .hb-btn:active {
827
- background: rgba(${p}, 0.16);
827
+ background: rgba(${c}, 0.16);
828
828
  transform: scale(0.98);
829
829
  }
830
830
 
@@ -853,7 +853,7 @@
853
853
  /* \u2500\u2500\u2500 FOCUS \u2500\u2500\u2500 */
854
854
 
855
855
  .hb-btn:focus-visible {
856
- outline: 2px solid var(--hb-focus-color, ${n});
856
+ outline: 2px solid var(--hb-focus-color, ${i});
857
857
  outline-offset: 2px;
858
858
  }
859
859
 
@@ -876,15 +876,15 @@
876
876
  --hb-icon-accent: rgba(255,255,255,0.2);
877
877
  }
878
878
  :host([data-variant="filled"][data-theme="dark"]) .hb-btn-icon {
879
- color: var(--hb-accent-color, ${n});
879
+ color: var(--hb-accent-color, ${i});
880
880
  }
881
881
  :host([data-variant="filled"][data-theme="light"]) .hb-btn-icon {
882
- color: var(--hb-accent-color, ${n});
882
+ color: var(--hb-accent-color, ${i});
883
883
  }
884
884
 
885
885
  :host([data-variant="outline"]) .hb-btn-icon,
886
886
  :host([data-variant="ghost"]) .hb-btn-icon {
887
- color: var(--hb-accent-color, ${n});
887
+ color: var(--hb-accent-color, ${i});
888
888
  }
889
889
 
890
890
  /* \u2500\u2500\u2500 LABEL \u2500\u2500\u2500 */
@@ -892,18 +892,18 @@
892
892
  .hb-btn-label {
893
893
  letter-spacing: -0.01em;
894
894
  }
895
- `,$=class extends HTMLElement{constructor(){super();this._options={command:"",theme:"branded",size:"md",variant:"filled",popup: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(t){this._options={...this._options,...t},this.render(),this.updateLightDOM();}get options(){return this._options}syncFromAttributes(){let t=this.getAttribute("command"),a=this.getAttribute("skill-url"),e=this.getAttribute("theme"),o=this.getAttribute("size"),d=this.getAttribute("variant"),l=this.getAttribute("shape"),h=this.getAttribute("popup"),m=this.getAttribute("popup-title"),c=this.getAttribute("popup-description");t!==null&&(this._options.command=t),a!==null&&(this._options.skillUrl=a),e&&(this._options.theme=e),o&&(this._options.size=o),d&&(this._options.variant=d),l&&(this._options.shape=l),h!==null&&(this._options.popup=h!=="false"),m!==null&&(this._options.popupTitle=m),c!==null&&(this._options.popupDescription=c);}updateLightDOM(){let{command:t,skillUrl:a}=this._options;this.setAttribute("role","button"),this.setAttribute("tabindex","0"),this.setAttribute("aria-label",`Run on Hermes Skills: ${t}`),this._options.popup!==false?this.setAttribute("aria-haspopup","dialog"):this.removeAttribute("aria-haspopup");let e=this.querySelector("a[data-hb-crawl]");e||(e=document.createElement("a"),e.setAttribute("data-hb-crawl",""),e.setAttribute("aria-hidden","true"),e.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;",this.appendChild(e)),e.textContent=`Run on Hermes Skills: ${t}`,e.setAttribute("data-platform","hermes-skill"),e.setAttribute("data-command",t),a?(e.href=a,e.setAttribute("data-skill-url",a)):(e.href=`https://hermes.ai/skills?command=${encodeURIComponent(t)}`,e.removeAttribute("data-skill-url"));}getResolvedTheme(){return this._options.theme||"branded"}render(){if(!this.shadowRoot)return;let t=this.getResolvedTheme(),a=t==="system"?typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t,e=this._options.variant||"filled",o=b(t),d=this._options.size||"md",l=this._options.shape||"rounded",h=O[d],m=R[l][d];this.setAttribute("data-theme",a),this.setAttribute("data-variant",e);let c=e!=="filled"?"transparent":o.bg,x=e==="ghost"?"transparent":e==="outline"?o.primary:o.border,M=e!=="filled"?o.primary:o.text;this.shadowRoot.innerHTML=`
896
- <style>${U}</style>
895
+ `,$=class extends HTMLElement{constructor(){super();this._options={command:"",theme:"branded",size:"md",variant:"filled",popup: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(t){this._options={...this._options,...t},this.render(),this.updateLightDOM();}get options(){return this._options}syncFromAttributes(){let t=this.getAttribute("command"),e=this.getAttribute("skill-url"),o=this.getAttribute("theme"),a=this.getAttribute("size"),d=this.getAttribute("variant"),l=this.getAttribute("shape"),h=this.getAttribute("popup"),m=this.getAttribute("popup-title"),p=this.getAttribute("popup-description");t!==null&&(this._options.command=t),e!==null&&(this._options.skillUrl=e),o&&(this._options.theme=o),a&&(this._options.size=a),d&&(this._options.variant=d),l&&(this._options.shape=l),h!==null&&(this._options.popup=h!=="false"),m!==null&&(this._options.popupTitle=m),p!==null&&(this._options.popupDescription=p);}updateLightDOM(){let{command:t,skillUrl:e}=this._options;this.setAttribute("role","button"),this.setAttribute("tabindex","0"),this.setAttribute("aria-label",`Run on Hermes Skills: ${t}`),this._options.popup!==false?this.setAttribute("aria-haspopup","dialog"):this.removeAttribute("aria-haspopup");let o=this.querySelector("a[data-hb-crawl]");o||(o=document.createElement("a"),o.setAttribute("data-hb-crawl",""),o.setAttribute("aria-hidden","true"),o.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;",this.appendChild(o)),o.textContent=`Run on Hermes Skills: ${t}`,o.setAttribute("data-platform","hermes-skill"),o.setAttribute("data-command",t),e?(o.href=e,o.setAttribute("data-skill-url",e)):(o.href=`https://hermes.ai/skills?command=${encodeURIComponent(t)}`,o.removeAttribute("data-skill-url"));}getResolvedTheme(){return this._options.theme||"branded"}render(){if(!this.shadowRoot)return;let t=this.getResolvedTheme(),e=t==="system"?typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t,o=this._options.variant||"filled",a=b(t),d=this._options.size||"md",l=this._options.shape||"rounded",h=L[d],m=O[l][d];this.setAttribute("data-theme",e),this.setAttribute("data-variant",o);let p=o!=="filled"?"transparent":a.bg,k=o==="ghost"?"transparent":o==="outline"?a.primary:a.border,z=o!=="filled"?a.primary:a.text;this.shadowRoot.innerHTML=`
896
+ <style>${Y}</style>
897
897
  <button
898
898
  class="hb-btn"
899
899
  type="button"
900
900
  style="
901
- ${f(o)}
902
- --hb-bg: ${c};
903
- --hb-border: ${x};
904
- --hb-text: ${M};
905
- --hb-accent-color: ${o.primary};
906
- --hb-focus-color: ${o.primary};
901
+ ${x(a)}
902
+ --hb-bg: ${p};
903
+ --hb-border: ${k};
904
+ --hb-text: ${z};
905
+ --hb-accent-color: ${a.primary};
906
+ --hb-focus-color: ${a.primary};
907
907
  --hb-height: ${h.height};
908
908
  --hb-font-size: ${h.fontSize};
909
909
  --hb-icon-size: ${h.iconSize};
@@ -913,9 +913,9 @@
913
913
  "
914
914
  aria-label="Run on Hermes Skills: ${this._options.command.replace(/"/g,"&quot;")}"
915
915
  >
916
- <span class="hb-btn-icon" aria-hidden="true">${w}</span>
916
+ <span class="hb-btn-icon" aria-hidden="true">${C}</span>
917
917
  <span class="hb-btn-label">Run on Hermes Skills</span>
918
918
  </button>
919
- `;let k=this.shadowRoot.querySelector(".hb-btn");k.addEventListener("click",()=>this.handleClick()),k.addEventListener("keydown",g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),this.handleClick());}),this._rendered=true,this.setupSystemThemeWatch();}handleClick(){let{popup:t,command:a,skillUrl:e,popupTitle:o,popupDescription:d}=this._options;if(this.dispatchEvent(new CustomEvent("hb-open",{bubbles:true,composed:true,detail:{command:a}})),t===false){navigator.clipboard.writeText(a).then(()=>{this._options.onCopy?.(a),this.dispatchEvent(new CustomEvent("hb-copy",{bubbles:true,composed:true,detail:{command:a}}));});return}A({variant:"hermes-skill",theme:this.getResolvedTheme(),title:o||"Run on Hermes Skills",description:d||"Copy and paste into a Hermes session to get started.",command:a,skillUrl:e,onCopy:l=>{this._options.onCopy?.(l),this.dispatchEvent(new CustomEvent("hb-copy",{bubbles:true,composed:true,detail:{command:l}}));},onClose:()=>{this.dispatchEvent(new CustomEvent("hb-close",{bubbles:true,composed:true}));}});}setupSystemThemeWatch(){if(this._mqCleanup?.(),this._mqCleanup=null,this.getResolvedTheme()!=="system"||typeof window>"u")return;let t=window.matchMedia("(prefers-color-scheme: dark)"),a=()=>this.render();t.addEventListener("change",a),this._mqCleanup=()=>t.removeEventListener("change",a);}};$.observedAttributes=["command","skill-url","theme","size","variant","shape","popup","popup-title","popup-description"];function H(r="hermes-skill-button"){typeof customElements>"u"||customElements.get(r)||customElements.define(r,$);}H();function j(r){let i=document.createElement("hermes-skill-button");return i.options=r,i}function N(){if(typeof document>"u")return [];let r=[];return document.querySelectorAll("hermes-button").forEach(i=>{let t=i.getAttribute("command")||"",o=i.getAttribute("prompt-flag")!=="false"?`hermes -p "${t}"`:t;r.push({platform:"hermes",command:t,fullCommand:o});}),document.querySelectorAll("hermes-skill-button").forEach(i=>{let t=i.getAttribute("command")||"",a=i.getAttribute("skill-url")||void 0;r.push({platform:"hermes-skill",command:t,...a&&{skillUrl:a}});}),r}function P(){let r=N();return r.length===0?{}:{"@context":"https://schema.org","@type":"WebPage",potentialAction:r.map(t=>{if(t.platform==="hermes")return {"@type":"Action",name:`Run on Hermes: ${t.command}`,description:t.command,target:{"@type":"EntryPoint",urlTemplate:`https://hermes.ai/run?command=${encodeURIComponent(t.fullCommand||t.command)}`,actionPlatform:"https://hermes.ai/run"},object:{"@type":"SoftwareSourceCode",runtimePlatform:"Hermes Agent",text:t.fullCommand||t.command}};let a={"@type":"EntryPoint",actionPlatform:"https://hermes.ai/skills"};t.skillUrl?a.urlTemplate=t.skillUrl:a.urlTemplate=`https://hermes.ai/skills?command=${encodeURIComponent(t.command)}`;let e={"@type":"Action",name:`Run on Hermes Skills: ${t.command}`,description:t.command,target:a};return t.skillUrl&&(e.object={"@type":"SoftwareApplication",name:t.command,downloadUrl:t.skillUrl,applicationCategory:"AI Skill",operatingSystem:"Hermes Agent"}),e})}}function W(){if(typeof document>"u")return;let r=document.querySelector("script[data-hermesbuttons-jsonld]");r&&r.remove();let i=P();if(!i||!("potentialAction"in i))return;let t=document.createElement("script");t.type="application/ld+json",t.setAttribute("data-hermesbuttons-jsonld",""),t.textContent=JSON.stringify(i,null,2),document.head.appendChild(t);}function ht(){B(),H();}
920
- exports.ALT_BRAND_COLOR=u;exports.BRAND_COLOR=n;exports.HERMES_ICON=y;exports.HERMES_SKILL_ICON=w;exports.HermesButton=F;exports.HermesPopupDialog=L;exports.HermesSkillButton=$;exports.createHermesButton=V;exports.createHermesSkillButton=j;exports.discoverButtons=N;exports.generateStructuredData=P;exports.injectStructuredData=W;exports.register=ht;exports.registerHermesButton=B;exports.registerHermesSkillButton=H;exports.resolveTheme=b;exports.showPopup=A;exports.themes=_;//# sourceMappingURL=index.js.map
919
+ `;let y=this.shadowRoot.querySelector(".hb-btn");y.addEventListener("click",()=>this.handleClick()),y.addEventListener("keydown",g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),this.handleClick());}),this._rendered=true,this.setupSystemThemeWatch();}handleClick(){let{popup:t,command:e,skillUrl:o,popupTitle:a,popupDescription:d}=this._options;if(this.dispatchEvent(new CustomEvent("hb-open",{bubbles:true,composed:true,detail:{command:e}})),t===false){navigator.clipboard.writeText(e).then(()=>{this._options.onCopy?.(e),f("hermes-skill"),this.dispatchEvent(new CustomEvent("hb-copy",{bubbles:true,composed:true,detail:{command:e}}));});return}E({variant:"hermes-skill",theme:this.getResolvedTheme(),title:a||"Run on Hermes Skills",description:d||"Copy and paste into a Hermes session to get started.",command:e,skillUrl:o,onCopy:l=>{this._options.onCopy?.(l),f("hermes-skill"),this.dispatchEvent(new CustomEvent("hb-copy",{bubbles:true,composed:true,detail:{command:l}}));},onClose:()=>{this.dispatchEvent(new CustomEvent("hb-close",{bubbles:true,composed:true}));}});}setupSystemThemeWatch(){if(this._mqCleanup?.(),this._mqCleanup=null,this.getResolvedTheme()!=="system"||typeof window>"u")return;let t=window.matchMedia("(prefers-color-scheme: dark)"),e=()=>this.render();t.addEventListener("change",e),this._mqCleanup=()=>t.removeEventListener("change",e);}};$.observedAttributes=["command","skill-url","theme","size","variant","shape","popup","popup-title","popup-description"];function M(r="hermes-skill-button"){typeof customElements>"u"||customElements.get(r)||customElements.define(r,$);}M();function J(r){let n=document.createElement("hermes-skill-button");return n.options=r,n}function q(){if(typeof document>"u")return [];let r=[];return document.querySelectorAll("hermes-button").forEach(n=>{let t=n.getAttribute("command")||"",a=n.getAttribute("prompt-flag")!=="false"?`hermes -p "${t}"`:t;r.push({platform:"hermes",command:t,fullCommand:a});}),document.querySelectorAll("hermes-skill-button").forEach(n=>{let t=n.getAttribute("command")||"",e=n.getAttribute("skill-url")||void 0;r.push({platform:"hermes-skill",command:t,...e&&{skillUrl:e}});}),r}function U(){let r=q();return r.length===0?{}:{"@context":"https://schema.org","@type":"WebPage",potentialAction:r.map(t=>{if(t.platform==="hermes")return {"@type":"Action",name:`Run on Hermes: ${t.command}`,description:t.command,target:{"@type":"EntryPoint",urlTemplate:`https://hermes.ai/run?command=${encodeURIComponent(t.fullCommand||t.command)}`,actionPlatform:"https://hermes.ai/run"},object:{"@type":"SoftwareSourceCode",runtimePlatform:"Hermes Agent",text:t.fullCommand||t.command}};let e={"@type":"EntryPoint",actionPlatform:"https://hermes.ai/skills"};t.skillUrl?e.urlTemplate=t.skillUrl:e.urlTemplate=`https://hermes.ai/skills?command=${encodeURIComponent(t.command)}`;let o={"@type":"Action",name:`Run on Hermes Skills: ${t.command}`,description:t.command,target:e};return t.skillUrl&&(o.object={"@type":"SoftwareApplication",name:t.command,downloadUrl:t.skillUrl,applicationCategory:"AI Skill",operatingSystem:"Hermes Agent"}),o})}}function Z(){if(typeof document>"u")return;let r=document.querySelector("script[data-hermesbuttons-jsonld]");r&&r.remove();let n=U();if(!n||!("potentialAction"in n))return;let t=document.createElement("script");t.type="application/ld+json",t.setAttribute("data-hermesbuttons-jsonld",""),t.textContent=JSON.stringify(n,null,2),document.head.appendChild(t);}function vt(){H(),M();}
920
+ exports.ALT_BRAND_COLOR=u;exports.BRAND_COLOR=i;exports.HERMES_ICON=w;exports.HERMES_SKILL_ICON=C;exports.HermesButton=F;exports.HermesPopupDialog=B;exports.HermesSkillButton=$;exports.createHermesButton=K;exports.createHermesSkillButton=J;exports.discoverButtons=q;exports.generateStructuredData=U;exports.injectStructuredData=Z;exports.register=vt;exports.registerHermesButton=H;exports.registerHermesSkillButton=M;exports.resolveTheme=b;exports.showPopup=E;exports.themes=_;//# sourceMappingURL=index.js.map
921
921
  //# sourceMappingURL=index.js.map