vskill 0.5.126 → 0.5.127
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/agents.json +1 -1
- package/dist/eval-server/api-routes.js +97 -12
- package/dist/eval-server/api-routes.js.map +1 -1
- package/dist/eval-server/install-engine-routes.js +1 -1
- package/dist/eval-server/install-engine-routes.js.map +1 -1
- package/dist/eval-server/utils/scan-install-locations.d.ts +18 -0
- package/dist/eval-server/utils/scan-install-locations.js +136 -0
- package/dist/eval-server/utils/scan-install-locations.js.map +1 -0
- package/dist/eval-ui/assets/{CommandPalette-CBrGufxz.js → CommandPalette-LtejhB76.js} +1 -1
- package/dist/eval-ui/assets/{CreateSkillPage-DXrpM1On.js → CreateSkillPage-3RuqLQnm.js} +3 -3
- package/dist/eval-ui/assets/{FindSkillsPalette-D99SoJx3.js → FindSkillsPalette-Dbl2_IC4.js} +2 -2
- package/dist/eval-ui/assets/SearchPaletteCore-CLZmxDat.js +14 -0
- package/dist/eval-ui/assets/{SkillDetailPanel-DzmlOsAc.js → SkillDetailPanel-RQc5u4nm.js} +1 -1
- package/dist/eval-ui/assets/UpdateDropdown-O8YGQyMH.js +1 -0
- package/dist/eval-ui/assets/{index-BAN03ugM.css → index-C8DXCPPg.css} +1 -1
- package/dist/eval-ui/assets/{index-BGQolxHD.js → index-DlZduKAT.js} +32 -32
- package/dist/eval-ui/assets/{skill-url-lxDpBkBU.js → skill-url-BpZjDR8A.js} +1 -1
- package/dist/eval-ui/index.html +2 -2
- package/package.json +1 -1
- package/dist/eval-ui/assets/SearchPaletteCore-CnRYmTuv.js +0 -6
- package/dist/eval-ui/assets/UpdateDropdown-BsAm4uMW.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./index-
|
|
1
|
+
import{j as e}from"./index-DlZduKAT.js";const d={sm:{icon:12,fontSize:"0.625rem",gap:"0.25rem",px:"0.375rem",py:"0.125rem",height:"18px",radius:"3px"},md:{icon:14,fontSize:"0.6875rem",gap:"0.3rem",px:"0.5rem",py:"0.15rem",height:"22px",radius:"4px"},lg:{icon:16,fontSize:"0.75rem",gap:"0.375rem",px:"0.625rem",py:"0.2rem",height:"26px",radius:"4px"}};function a({size:r}){return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[e.jsx("path",{d:"M10 1L3 4.5V9.5C3 13.64 5.99 17.52 10 18.5C14.01 17.52 17 13.64 17 9.5V4.5L10 1Z",fill:"currentColor",fillOpacity:"0.15",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),e.jsx("path",{d:"M7.5 10.5L9.5 12.5L13 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})}function c({size:r}){return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[e.jsx("path",{d:"M10 1L11.9 4.1L15.5 3.5L14.2 7L17 9.5L14.2 12L15.5 15.5L11.9 14.9L10 18L8.1 14.9L4.5 15.5L5.8 12L3 9.5L5.8 7L4.5 3.5L8.1 4.1L10 1Z",fill:"currentColor",fillOpacity:"0.15",stroke:"currentColor",strokeWidth:"1.1",strokeLinejoin:"round"}),e.jsx("path",{d:"M10 6.5L10.9 8.6L13.1 8.8L11.4 10.3L11.9 12.5L10 11.3L8.1 12.5L8.6 10.3L6.9 8.8L9.1 8.6L10 6.5Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.4",strokeLinejoin:"round"})]})}const l={VERIFIED:{color:"var(--tier-verified)",bg:"var(--tier-verified-bg)",border:"var(--tier-verified-border)"},CERTIFIED:{color:"var(--tier-certified)",bg:"var(--tier-certified-bg)",border:"var(--tier-certified-border)"},TAINTED:{color:"var(--tier-tainted)",bg:"var(--tier-tainted-bg)",border:"var(--tier-tainted-border)"}},p={VERIFIED:"Security-Scanned",CERTIFIED:"Trusted Publisher",TAINTED:"Tainted"};function u(r){return p[r]??r}function h({size:r}){return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[e.jsx("path",{d:"M10 2L1.5 17.5H18.5L10 2Z",fill:"currentColor",fillOpacity:"0.15",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),e.jsx("path",{d:"M10 8V12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),e.jsx("circle",{cx:"10",cy:"14.5",r:"1",fill:"currentColor"})]})}function L({tier:r,size:t}){return r==="TAINTED"?e.jsx(h,{size:t}):r==="CERTIFIED"?e.jsx(c,{size:t}):e.jsx(a,{size:t})}function g({tier:r,size:t="md",isTainted:o}){const i=d[t],n=o?"TAINTED":r,s=l[n]??l.VERIFIED;return e.jsxs("span",{"data-testid":"tier-badge","data-tier":n,style:{display:"inline-flex",alignItems:"center",gap:i.gap,padding:`${i.py} ${i.px}`,height:i.height,borderRadius:i.radius,fontFamily:"var(--font-geist-mono)",fontSize:i.fontSize,fontWeight:600,letterSpacing:"0.03em",whiteSpace:"nowrap",color:s.color,backgroundColor:s.bg,border:`1px solid ${s.border}`,lineHeight:1},children:[e.jsx(L,{tier:n,size:i.icon}),u(n)]})}function x(r){const t=r.split("/");return t.length===3?`/skills/${t.map(encodeURIComponent).join("/")}`:`/skills/${encodeURIComponent(r)}`}function m(r,...t){const o=r.split("/"),i=o.length===3?`/api/v1/skills/${o.map(encodeURIComponent).join("/")}`:`/api/v1/skills/${encodeURIComponent(r)}`;return t.length===0?i:`${i}/${t.map(encodeURIComponent).join("/")}`}export{g as T,x as a,u as f,m as s};
|
package/dist/eval-ui/index.html
CHANGED
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
}
|
|
47
47
|
})();
|
|
48
48
|
</script>
|
|
49
|
-
<script type="module" crossorigin src="/assets/index-
|
|
50
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
49
|
+
<script type="module" crossorigin src="/assets/index-DlZduKAT.js"></script>
|
|
50
|
+
<link rel="stylesheet" crossorigin href="/assets/index-C8DXCPPg.css">
|
|
51
51
|
<link rel="stylesheet" crossorigin href="/assets/fonts-i7Lkz2zN.css">
|
|
52
52
|
</head>
|
|
53
53
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{r as i,j as t}from"./index-BGQolxHD.js";import{a as de,f as ce}from"./skill-url-lxDpBkBU.js";/* empty css */function ue(a){return a?a.replace(/<(?!\/?b>)[^>]+>/gi,""):""}function ie(a){return a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function ge(a,d){if(!a)return"";const o=ie(a);if(!d)return o;const u=d.trim().split(/\s+/).filter(Boolean);if(u.length===0)return o;const g=u.map(O=>O.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),N=new RegExp(`(${g})`,"gi");return o.replace(N,"<b>$1</b>")}function fe(a){return a?a<1e3?String(a):`${(a/1e3).toFixed(1)}k`:""}const pe=[{label:"Security",href:"/skills?category=security"},{label:"Coding",href:"/skills?category=development"},{label:"DevOps",href:"/skills?category=devops"},{label:"Testing",href:"/skills?category=testing"},{label:"Data",href:"/skills?category=data"},{label:"Design",href:"/skills?category=design"}],he=[{label:"Submit a skill",href:"/submit"},{label:"Browse all skills",href:"/skills"}],l="var(--font-geist-mono)";function me({tier:a,isTainted:d,isBlocked:o}){if(o)return t.jsx("span",{"data-testid":"mini-tier-badge","data-tier":"BLOCKED",style:{display:"inline-flex",alignItems:"center",gap:"0.2rem",padding:"0.1rem 0.35rem",height:"16px",borderRadius:"3px",fontFamily:l,fontSize:"0.5625rem",fontWeight:600,letterSpacing:"0.03em",whiteSpace:"nowrap",color:"var(--status-danger-text)",backgroundColor:"var(--status-danger-bg)",border:"1px solid var(--status-danger-border)",lineHeight:1},children:"BLOCKED"});if(d)return t.jsx("span",{"data-testid":"mini-tier-badge","data-tier":"TAINTED",style:{display:"inline-flex",alignItems:"center",gap:"0.2rem",padding:"0.1rem 0.35rem",height:"16px",borderRadius:"3px",fontFamily:l,fontSize:"0.5625rem",fontWeight:600,letterSpacing:"0.03em",whiteSpace:"nowrap",color:"var(--tier-tainted)",backgroundColor:"var(--tier-tainted-bg)",border:"1px solid var(--tier-tainted-border)",lineHeight:1},children:"Tainted"});const g={CERTIFIED:{color:"var(--tier-certified)",bg:"var(--tier-certified-bg)",border:"var(--tier-certified-border)"},VERIFIED:{color:"var(--tier-verified)",bg:"var(--tier-verified-bg)",border:"var(--tier-verified-border)"},REJECTED:{color:"var(--status-danger-text)",bg:"var(--status-danger-bg)",border:"var(--status-danger-border)"},BLOCKED:{color:"var(--status-danger-text)",bg:"var(--status-danger-bg)",border:"var(--status-danger-border)"}}[a];return g?t.jsx("span",{"data-testid":"mini-tier-badge","data-tier":a,style:{display:"inline-flex",alignItems:"center",gap:"0.2rem",padding:"0.1rem 0.35rem",height:"16px",borderRadius:"3px",fontFamily:l,fontSize:"0.5625rem",fontWeight:600,letterSpacing:"0.03em",whiteSpace:"nowrap",color:g.color,backgroundColor:g.bg,border:`1px solid ${g.border}`,lineHeight:1},children:ce(a)}):null}function z(){return t.jsxs("div",{"data-testid":"skeleton-row",style:{padding:"0.625rem 1rem",display:"flex",alignItems:"center",gap:"0.75rem"},children:[t.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:"0.25rem"},children:[t.jsx("div",{style:{height:14,width:"35%",borderRadius:4,background:"var(--border, #e5e7eb)",animation:"pulse 1.5s ease-in-out infinite"}}),t.jsx("div",{style:{height:10,width:"55%",borderRadius:4,background:"var(--border, #e5e7eb)",animation:"pulse 1.5s ease-in-out infinite",animationDelay:"0.2s"}})]}),t.jsx("div",{style:{height:16,width:60,borderRadius:3,background:"var(--border, #e5e7eb)",animation:"pulse 1.5s ease-in-out infinite",animationDelay:"0.4s"}})]})}function ye(a){var o,u;const d=(o=a.target)==null?void 0:o.tagName;return!!(d==="INPUT"||d==="TEXTAREA"||d==="SELECT"||(u=a.target)!=null&&u.isContentEditable)}const be="/api/v1/studio/search",xe="/api/v1/stats",ve="/api/v1/studio/telemetry/search-select",Se=10,P=20,ke=150;function Re({onSelect:a,onNavigate:d,searchUrl:o=be,trendingUrl:u=xe,telemetrySelectUrl:g=ve,maxPages:N=Se,initialOpen:O=!1}={}){const[B,v]=i.useState(O),[s,S]=i.useState(""),[T,h]=i.useState([]),[k,y]=i.useState(0),[C,I]=i.useState(!1),[_,w]=i.useState(1),[U,m]=i.useState(!1),[L,G]=i.useState(!1),[H,b]=i.useState(null),D=i.useRef(null),M=i.useRef(null),A=i.useRef(!1),Q=i.useRef(null),J=i.useRef(null),W=i.useRef(new Map),E=i.useRef(null),[,ae]=i.useState(!1),K=i.useRef(s);i.useEffect(()=>{K.current=s},[s]),i.useEffect(()=>{E.current||fetch(u).then(e=>e.json()).then(e=>{E.current=e.trendingSkills??[],ae(!0)}).catch(()=>{})},[u]),i.useEffect(()=>{const e=n=>{if(n.key==="Escape"){v(!1);return}!n.metaKey&&!n.ctrlKey&&!n.altKey&&n.key.length===1&&!ye(n)&&(A.current=!0,S(n.key),v(!0))},r=n=>{var R;const f=(R=n.detail)==null?void 0:R.query;f&&(A.current=!0,S(f)),v(!0)};return window.addEventListener("keydown",e),window.addEventListener("openFindSkills",r),()=>{window.removeEventListener("keydown",e),window.removeEventListener("openFindSkills",r)}},[]),i.useEffect(()=>{var e;B?(A.current?(A.current=!1,h([]),y(0),w(1),m(!1),I(!1),b(null)):(S(""),h([]),y(0),w(1),m(!1),I(!1),b(null)),setTimeout(()=>{var r;if((r=D.current)==null||r.focus(),D.current){const n=D.current.value.length;D.current.setSelectionRange(n,n)}},50)):(e=M.current)==null||e.abort()},[B]),i.useEffect(()=>{if(!s.trim()||s.trim().length<2){h([]),m(!1),w(1),b(null);return}const e=6e4,r=s.trim().toLowerCase(),n=W.current.get(r);if(n&&Date.now()-n.timestamp<e){h(n.results),m(n.hasMore),w(1),I(!1),b(null),fetch(`${o}?q=${encodeURIComponent(s)}&limit=${P}&page=1`).then(x=>x.json()).then(x=>{var p;W.current.set(r,{results:x.results||[],hasMore:((p=x.pagination)==null?void 0:p.hasMore)??!1,timestamp:Date.now()})}).catch(()=>{});return}I(!0),b(null);const f=new AbortController,R=setTimeout(async()=>{var x;try{const p=await fetch(`${o}?q=${encodeURIComponent(s)}&limit=${P}&page=1`,{signal:f.signal});if(!p.ok){h([]),m(!1),b(`search failed (${p.status})`);return}const te=await p.json(),re=te.results||[],ne=((x=te.pagination)==null?void 0:x.hasMore)??!1;h(re),m(ne),w(1),W.current.set(r,{results:re,hasMore:ne,timestamp:Date.now()})}catch(p){if(p instanceof DOMException&&p.name==="AbortError")return;h([]),m(!1),b("search failed")}finally{f.signal.aborted||I(!1)}},ke);return()=>{clearTimeout(R),f.abort()}},[s,o]);const j=_>=N,X=i.useCallback(async()=>{var r,n;if(L||j)return;const e=_+1;G(!0),M.current=new AbortController;try{const c=await fetch(`${o}?q=${encodeURIComponent(s)}&limit=${P}&page=${e}`,{signal:M.current.signal});if(!c.ok)return;const f=await c.json();h(R=>[...R,...f.results||[]]),m(((r=f.pagination)==null?void 0:r.hasMore)??!1),w(e)}catch(c){if(c instanceof DOMException&&c.name==="AbortError")return}finally{(n=M.current)!=null&&n.signal.aborted||G(!1)}},[_,s,L,j,o]);i.useEffect(()=>{const e=Q.current,r=J.current;if(!e||!r||typeof IntersectionObserver>"u")return;const n=new IntersectionObserver(c=>{c[0].isIntersecting&&U&&!C&&!L&&!j&&X()},{root:r,rootMargin:"100px"});return n.observe(e),()=>n.disconnect()},[U,C,L,j,X]);const Y=e=>({name:e.name,displayName:e.displayName,author:e.author,repoUrl:e.repoUrl,certTier:e.certTier,githubStars:0,highlight:"",category:"",ownerSlug:e.ownerSlug,repoSlug:e.repoSlug,skillSlug:e.skillSlug}),q=(()=>{const e=s.trim();if(e.length>=2)return T;if(e.length===1&&E.current){const r=e.toLowerCase();return E.current.filter(n=>n.name.toLowerCase().startsWith(r)||n.displayName.toLowerCase().startsWith(r)).slice(0,10).map(Y)}return e.length===0&&E.current?E.current.slice(0,10).map(Y):[]})(),F=[...q.map(e=>{const r=e.skillSlug||e.name.split("/").pop()||e.name,n=e.ownerSlug&&e.repoSlug?`${e.ownerSlug}/${e.repoSlug}`:e.author;return{type:"skill",label:r,publisher:n,name:e.name,command:e.command?e.pluginName?`${e.pluginName}:${e.command}`:e.command:void 0,pluginName:e.pluginName||void 0,meta:e.category||"",certTier:e.certTier,isTainted:e.isTainted,isBlocked:e.isBlocked,repoUrl:e.repoUrl,highlight:e.highlight,githubStars:e.githubStars,category:e.category,href:de(e.name),sourceResult:e}}),...!s&&q.length===0?pe.map(e=>({type:"category",label:e.label,publisher:"",name:"",command:void 0,pluginName:void 0,meta:"",certTier:"",isTainted:void 0,isBlocked:void 0,repoUrl:"",highlight:void 0,githubStars:void 0,category:void 0,href:e.href,sourceResult:void 0})):[],...!s&&q.length===0?he.map(e=>({type:"action",label:e.label,publisher:"",name:"",command:void 0,pluginName:void 0,meta:"",certTier:"",isTainted:void 0,isBlocked:void 0,repoUrl:"",highlight:void 0,githubStars:void 0,category:void 0,href:e.href,sourceResult:void 0})):[]],V=i.useCallback(e=>{try{fetch(g,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({skillName:e,q:K.current.trim(),ts:Date.now()}),keepalive:!0}).catch(()=>{})}catch{}},[g]),$=i.useCallback((e,r)=>{if(r&&(V(r.name),a))try{a(r,K.current.trim())}catch{}if(v(!1),d)try{d(e)}catch{}},[a,d,V]),se=e=>{if(e.key==="ArrowDown")e.preventDefault(),y(r=>Math.min(r+1,F.length-1));else if(e.key==="ArrowUp")e.preventDefault(),y(r=>Math.max(r-1,0));else if(e.key==="Enter"&&F[k]){const r=F[k];$(r.href,r.type==="skill"?r.sourceResult:void 0)}};if(!B)return null;let Z="";const oe=!C&&!H&&s.trim().length>=2&&T.length===0,ee=C&&T.length===0&&s.trim().length>=2,le=()=>{const e=s;S(""),setTimeout(()=>S(e),0)};return t.jsxs("div",{"data-testid":"find-skills-palette",role:"dialog","aria-modal":"true","aria-label":"Find verified skills",style:{position:"fixed",inset:0,zIndex:9999,display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"min(20vh, 160px)"},onClick:()=>v(!1),children:[t.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.4)",backdropFilter:"blur(4px)"}}),t.jsx("style",{children:`
|
|
2
|
-
@keyframes pulse {
|
|
3
|
-
0%, 100% { opacity: 1; }
|
|
4
|
-
50% { opacity: 0.4; }
|
|
5
|
-
}
|
|
6
|
-
`}),t.jsxs("div",{style:{position:"relative",width:"100%",maxWidth:600,margin:"0 1rem",background:"var(--bg)",borderRadius:"8px",border:"1px solid var(--border)",boxShadow:"0 20px 60px rgba(0,0,0,0.15)",overflow:"hidden"},onClick:e=>e.stopPropagation(),children:[t.jsxs("div",{style:{borderBottom:"1px solid var(--border)",display:"flex",alignItems:"center",padding:"0 1rem"},children:[t.jsx("span",{style:{color:"var(--text-faint)",fontFamily:l,fontSize:"0.875rem",marginRight:"0.5rem"},children:"/"}),t.jsx("input",{ref:D,value:s,onChange:e=>{S(e.target.value),y(0)},onKeyDown:se,placeholder:"Search skills, categories...",role:"combobox","aria-expanded":"true","aria-controls":"find-skills-listbox","aria-autocomplete":"list",style:{flex:1,border:"none",outline:"none",padding:"1rem 0",fontFamily:l,fontSize:"0.9375rem",background:"transparent",color:"var(--text)"}}),t.jsx("kbd",{style:{fontFamily:l,fontSize:"0.75rem",color:"var(--text-faint)",border:"1px solid var(--border)",borderRadius:"4px",padding:"2px 6px"},children:"Esc"})]}),t.jsxs("div",{ref:J,role:"listbox",id:"find-skills-listbox",style:{maxHeight:480,overflowY:"auto",padding:"0.375rem 0"},children:[ee&&t.jsxs(t.Fragment,{children:[t.jsx(z,{}),t.jsx(z,{}),t.jsx(z,{}),t.jsx(z,{})]}),H&&t.jsxs("div",{"data-testid":"search-error",style:{padding:"1.5rem 1rem",textAlign:"center",fontFamily:l,fontSize:"0.8125rem",color:"var(--status-danger-text)"},children:[t.jsx("div",{style:{marginBottom:"0.5rem"},children:H}),t.jsx("button",{"data-testid":"search-retry",onClick:le,style:{fontFamily:l,fontSize:"0.75rem",padding:"0.25rem 0.75rem",borderRadius:"4px",border:"1px solid var(--border)",background:"transparent",color:"var(--text)",cursor:"pointer"},children:"Retry"})]}),oe&&t.jsxs("div",{style:{padding:"2rem 1rem",textAlign:"center",fontFamily:l,fontSize:"0.8125rem"},children:[t.jsx("div",{style:{color:"var(--text-faint)",marginBottom:"0.5rem"},children:"No results found"}),t.jsx("a",{href:"/skills",style:{color:"var(--link-accent)",textDecoration:"none",fontSize:"0.8125rem"},onClick:e=>{e.preventDefault(),$("/skills")},children:"Browse by category"})]}),!ee&&F.map((e,r)=>{const n=e.type==="skill"?"SKILLS":e.type==="category"?"CATEGORIES":"ACTIONS",c=n!==Z;return c&&(Z=n),t.jsxs("div",{children:[c&&t.jsx("div",{style:{padding:"0.5rem 1rem 0.25rem",fontFamily:l,fontSize:"0.625rem",fontWeight:600,color:"var(--text-faint)",letterSpacing:"0.06em",textTransform:"uppercase"},children:n}),e.type==="skill"?t.jsxs("div",{role:"option","aria-selected":r===k,onClick:()=>$(e.href,e.sourceResult),onMouseEnter:()=>y(r),style:{padding:"0.5rem 1rem",cursor:"pointer",display:"grid",gridTemplateColumns:"1fr auto",gap:"0.375rem 1rem",alignItems:"start",background:r===k?"var(--bg-hover, rgba(128,128,128,0.1))":"transparent",fontFamily:l},children:[t.jsxs("div",{style:{minWidth:0,display:"flex",flexDirection:"column",gap:"0.125rem"},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.375rem"},children:[t.jsx("span",{style:{fontSize:"0.8125rem",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.jsx("span",{style:{color:"var(--text)"},children:e.label})}),e.pluginName&&t.jsx("span",{style:{fontSize:"0.5625rem",background:"rgba(13, 148, 136, 0.1)",padding:"0.05rem 0.3rem",borderRadius:"3px",color:"var(--link-accent)",border:"1px solid rgba(13, 148, 136, 0.25)",whiteSpace:"nowrap",flexShrink:0},children:e.pluginName})]}),(e.highlight||e.name)&&t.jsx("div",{"data-testid":"search-highlight",style:{fontSize:"0.6875rem",color:"var(--text-faint)",lineHeight:1.4,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},dangerouslySetInnerHTML:{__html:e.highlight?ue(e.highlight):s?ge(e.name||e.label,s):ie(e.name||"")}})]}),t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",flexShrink:0},children:[e.githubStars!=null&&e.githubStars>0&&t.jsxs("span",{"data-testid":"star-count",style:{display:"inline-flex",alignItems:"center",gap:"0.15rem",fontSize:"0.625rem",color:"var(--text-faint)",whiteSpace:"nowrap"},children:[t.jsx("svg",{width:10,height:10,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:t.jsx("path",{d:"M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25z"})}),fe(e.githubStars)]}),t.jsx(me,{tier:e.certTier,isTainted:e.isTainted,isBlocked:e.isBlocked}),t.jsx("span",{style:{color:"var(--text-faint)",fontSize:"0.625rem",whiteSpace:"nowrap",maxWidth:80,overflow:"hidden",textOverflow:"ellipsis"},children:e.meta})]})]}):t.jsx("div",{role:"option","aria-selected":r===k,onClick:()=>$(e.href),onMouseEnter:()=>y(r),style:{padding:"0.5rem 1rem",cursor:"pointer",background:r===k?"var(--bg-hover, rgba(128,128,128,0.1))":"transparent",fontFamily:l,fontSize:"0.8125rem",color:"var(--text)"},children:e.label})]},`${e.type}-${e.name||e.label}`)}),U&&!C&&T.length>0&&!j&&t.jsx("div",{ref:Q,"data-testid":"scroll-sentinel",style:{padding:"0.5rem 1rem",textAlign:"center"},children:L&&t.jsx("span",{style:{fontFamily:l,fontSize:"0.75rem",color:"var(--text-faint)"},children:"Loading..."})}),j&&T.length>0&&t.jsx("div",{"data-testid":"hard-cap-link",style:{padding:"1rem",textAlign:"center",fontFamily:l,fontSize:"0.75rem"},children:t.jsx("a",{href:`https://verified-skill.com/skills?q=${encodeURIComponent(s.trim())}`,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--link-accent)",textDecoration:"none"},children:"See all results on verified-skill.com →"})})]})]})]})}export{Re as default,fe as formatStarCount,ge as highlightMatches};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as u,j as t}from"./index-BGQolxHD.js";/* empty css */function v(s,r){const[x,m]=s.split("."),[f,o]=r.split("."),n=Number(x),i=Number(m),l=Number(f),d=Number(o);return!Number.isFinite(n)||!Number.isFinite(l)?(console.warn(`[semverBump] unparseable version: installed=${s} latest=${r}`),"patch"):l>n?"major":!Number.isFinite(i)||!Number.isFinite(d)?(console.warn(`[semverBump] unparseable minor: installed=${s} latest=${r}`),"patch"):d>i?"minor":"patch"}const g={major:{bg:"var(--red-muted)",text:"var(--red)"},minor:{bg:"var(--yellow-muted)",text:"var(--yellow)"},patch:{bg:"var(--green-muted)",text:"var(--green)"}};function j({updates:s,isRefreshing:r,onRefresh:x,onSelectSkill:m,onViewAll:f,onClose:o,anchorRef:n,diffSummariesById:i}){const l=u.useRef(null),d=u.useRef(null);u.useEffect(()=>{var e;(e=d.current)==null||e.focus()},[]),u.useEffect(()=>{function e(a){l.current&&(l.current.contains(a.target)||n!=null&&n.current&&n.current.contains(a.target)||o())}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[o,n]),u.useEffect(()=>{function e(a){var p;a.key==="Escape"&&(a.preventDefault(),o(),(p=n==null?void 0:n.current)==null||p.focus())}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[o,n]);const c=s.filter(e=>e.updateAvailable);return t.jsxs("div",{ref:l,role:"dialog","aria-modal":"false","aria-label":"Skill update summary","data-testid":"update-dropdown",style:{position:"absolute",top:"calc(100% + 6px)",right:0,width:320,maxHeight:400,overflow:"auto",background:"var(--bg-surface)",border:"1px solid var(--border-default)",borderRadius:8,padding:10,zIndex:1e3,fontFamily:"var(--font-sans)",display:"flex",flexDirection:"column",gap:6},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"2px 4px 6px",borderBottom:"1px solid var(--border-default)"},children:[t.jsx("span",{style:{fontSize:12,fontWeight:600,color:"var(--text-primary)"},children:c.length===0?"No updates available":`${c.length} updates available`}),t.jsx("button",{type:"button","data-testid":"update-dropdown-refresh",onClick:x,disabled:r,style:{background:"transparent",border:"none",color:"var(--text-secondary)",fontSize:11,fontFamily:"var(--font-mono)",cursor:r?"not-allowed":"pointer",padding:"2px 6px"},children:r?"Refreshing…":"Refresh"})]}),c.length>0?t.jsx("ul",{role:"list",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:2},children:c.map((e,a)=>{const p=e.latest?v(e.installed,e.latest):"patch",y=g[p],b=i==null?void 0:i.get(e.name);return t.jsx("li",{style:{margin:0},children:t.jsxs("button",{ref:a===0?d:void 0,type:"button","data-testid":"update-dropdown-row","data-skill-name":e.name,onClick:()=>m(e),style:{display:"flex",alignItems:"flex-start",gap:8,width:"100%",padding:"6px 8px",background:"transparent",border:"none",borderRadius:4,cursor:"pointer",color:"var(--text-primary)",fontFamily:"inherit",fontSize:12,textAlign:"left"},children:[t.jsx("span",{"aria-hidden":"true","data-testid":"update-dropdown-bump-dot","data-bump":p,style:{width:8,height:8,borderRadius:"50%",background:y.text,flexShrink:0,marginTop:4}}),t.jsxs("span",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0,flex:1},children:[t.jsxs("span",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0},children:[t.jsx("span",{style:{minWidth:0,flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),t.jsxs("span",{style:{fontFamily:"var(--font-mono)",fontSize:10,color:"var(--text-secondary)",fontVariantNumeric:"tabular-nums"},children:[e.installed," → ",e.latest??"?"]})]}),b&&t.jsx("span",{"data-testid":"update-dropdown-diff-summary",style:{fontSize:11,color:"var(--text-secondary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:b})]})]})},e.name)})}):t.jsx("div",{style:{padding:"12px 4px",fontSize:12,color:"var(--text-secondary)"},children:"All installed skills are up to date."}),t.jsx("div",{style:{display:"flex",justifyContent:"flex-end",padding:"4px 4px 0",borderTop:"1px solid var(--border-default)",marginTop:2},children:t.jsx("button",{type:"button","data-testid":"update-dropdown-view-all",onClick:f,style:{background:"transparent",border:"none",color:"var(--text-secondary)",fontSize:11,fontFamily:"var(--font-sans)",cursor:"pointer",padding:"4px 6px"},children:"View all"})})]})}export{j as default};
|