UNPKG

@runeya/runeya

Version:

Monitor processes as a stack

2 lines (1 loc) 4.46 kB
import{S as r}from"./router-CdfdQZKk.js";import{r as l,j as d,c as v}from"./index-CXxIspfv.js";const g="/assets/vscode-icon-DGpXKq7_.svg",u="data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eIntelliJ%20IDEA%3c/title%3e%3cpath%20d='M0%200v24h24V0zm3.723%203.111h5v1.834h-1.39v6.277h1.39v1.834h-5v-1.834h1.444V4.945H3.723zm11.055%200H17v6.5c0%20.612-.055%201.111-.222%201.556-.167.444-.39.777-.723%201.11-.277.279-.666.557-1.11.668a3.933%203.933%200%200%201-1.445.278c-.778%200-1.444-.167-1.944-.445a4.81%204.81%200%200%201-1.279-1.056l1.39-1.555c.277.334.555.555.833.722.277.167.611.278.945.278.389%200%20.721-.111%201-.389.221-.278.333-.667.333-1.278zM2.222%2019.5h9V21h-9z'/%3e%3c/svg%3e",m="data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eWindsurf%3c/title%3e%3cpath%20d='M23.55%205.067c-1.2038-.002-2.1806.973-2.1806%202.1765v4.8676c0%20.972-.8035%201.7594-1.7597%201.7594-.568%200-1.1352-.286-1.4718-.7659l-4.9713-7.1003c-.4125-.5896-1.0837-.941-1.8103-.941-1.1334%200-2.1533.9635-2.1533%202.153v4.8957c0%20.972-.7969%201.7594-1.7596%201.7594-.57%200-1.1363-.286-1.4728-.7658L.4076%205.1598C.2822%204.9798%200%205.0688%200%205.2882v4.2452c0%20.2147.0656.4228.1884.599l5.4748%207.8183c.3234.462.8006.8052%201.3509.9298%201.3771.313%202.6446-.747%202.6446-2.0977v-4.893c0-.972.7875-1.7593%201.7596-1.7593h.003a1.798%201.798%200%200%201%201.4718.7658l4.9723%207.0994c.4135.5905%201.05.941%201.8093.941%201.1587%200%202.1515-.9645%202.1515-2.153v-4.8948c0-.972.7875-1.7594%201.7596-1.7594h.194a.22.22%200%200%200%20.2204-.2202v-4.622a.22.22%200%200%200-.2203-.2203Z'/%3e%3c/svg%3e",w="data:image/svg+xml,%3c?xml%20version='1.0'%20?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23000000'%20width='800px'%20height='800px'%20viewBox='0%200%2032%2032'%20id='Camada_1'%20version='1.1'%20xml:space='preserve'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cstyle%20type='text/css'%3e%20.st0{fill-rule:evenodd;clip-rule:evenodd;}%20%3c/style%3e%3cpath%20class='st0'%20d='M13.8,4h4.5v2.2h1.2c0.6,0,1,0.4,1,1v4.6l-0.6,0.8l6.2,10.8l0.9,3.9c0.1,0.5-0.5,0.9-0.9,0.5l-2.9-2.7l-2-3.5%20C19.6,22.5,17.9,23,16,23s-3.6-0.5-5.1-1.4l-2,3.5L6,27.8c-0.4,0.4-1.1,0-0.9-0.5l0.9-3.9l2.3-4.1c-1.5-1.7-2.3-4-2.3-6.4%20c0-0.4,0-0.8,0.1-1.1h3c-0.1,0.4-0.1,0.7-0.1,1.1c0,1.3,0.4,2.5,1,3.6l2.3-3.9l-0.6-0.8V7.2c0-0.6,0.4-1,1-1h1.2V4z%20M14.4,15.4%20L12.4,19c1.1,0.6,2.3,1,3.6,1s2.6-0.4,3.6-1l-2.1-3.6l-0.8,1c-0.4,0.5-1.2,0.5-1.6,0L14.4,15.4z%20M14.1,11.8L14.1,11.8%20c0.4,0.7,1.1,1.1,1.9,1.1c0.8,0,1.6-0.4,1.9-1.1c0.2-0.3,0.3-0.7,0.3-1.1c0-1.2-1-2.2-2.2-2.2s-2.2,1-2.2,2.2%20C13.8,11.1,13.9,11.5,14.1,11.8z'/%3e%3c/svg%3e",p="/assets/cursor-CgsCZvc6.svg",h="data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eSublime%20Text%3c/title%3e%3cpath%20d='M20.953.004a.397.397%200%200%200-.18.017L3.225%205.585c-.175.055-.323.214-.402.398a.42.42%200%200%200-.06.22v5.726a.42.42%200%200%200%20.06.22c.079.183.227.341.402.397l7.454%202.364-7.454%202.363c-.255.08-.463.374-.463.655v5.688c0%20.282.208.444.463.363l17.55-5.565c.237-.075.426-.336.452-.6.003-.022.013-.04.013-.065V12.06c0-.281-.208-.575-.463-.656L13.4%209.065l7.375-2.339c.255-.08.462-.375.462-.656V.384c0-.211-.117-.355-.283-.38z'/%3e%3c/svg%3e";function I(t){const o=l([]),a=l(0),c=l(!1),i=l({code:{icon:g,title:"Open in Visual Studio Code"},intellij:{icon:u,title:"Open in Intellij"},windsurf:{icon:m,title:"Open in Windsurf"},androidstudio:{icon:w,title:"Open in Android Studio"},cursor:{icon:p,title:"Open in Cursor"},sublime:{icon:h,title:"Open in Sublime text"}});d(async()=>{try{c.value=!0,o.value=await r.getAvailableEditors()}finally{c.value=!1}});const s=v(()=>{a.value;let e=t?localStorage.getItem("default-editor-"+(t==null?void 0:t.label))||localStorage.getItem("default-editor")||"":localStorage.getItem("default-editor")||"";return o.value.includes(e)||(e=""),{key:e,...i.value[e]}});function n(e){t?localStorage.setItem("default-editor-"+t.label,e):localStorage.setItem("default-editor",e),localStorage.getItem("default-editor")||localStorage.setItem("default-editor",e),a.value++,location.reload()}return{availableEditors:o,loading:c,allEditors:i,currentEditor:s,setDefaultEditor:n}}export{I as u};