vskill 1.2.10 → 1.2.12

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.
Files changed (93) hide show
  1. package/agents.json +1 -1
  2. package/dist/commands/submit.d.ts +2 -0
  3. package/dist/commands/submit.js +4 -0
  4. package/dist/commands/submit.js.map +1 -1
  5. package/dist/eval-server/install-engine-routes.d.ts +12 -7
  6. package/dist/eval-server/install-engine-routes.js +2 -39
  7. package/dist/eval-server/install-engine-routes.js.map +1 -1
  8. package/dist/eval-server/install-jobs.js +31 -19
  9. package/dist/eval-server/install-jobs.js.map +1 -1
  10. package/dist/eval-server/install-skill-routes.js +7 -6
  11. package/dist/eval-server/install-skill-routes.js.map +1 -1
  12. package/dist/eval-server/install-state-routes.d.ts +2 -2
  13. package/dist/eval-server/install-state-routes.js +22 -9
  14. package/dist/eval-server/install-state-routes.js.map +1 -1
  15. package/dist/eval-server/remove-skill-routes.js +226 -156
  16. package/dist/eval-server/remove-skill-routes.js.map +1 -1
  17. package/dist/eval-server/skill-authoring-engine.d.ts +10 -0
  18. package/dist/eval-server/skill-authoring-engine.js +58 -0
  19. package/dist/eval-server/skill-authoring-engine.js.map +1 -0
  20. package/dist/eval-server/skill-authoring-path.d.ts +15 -0
  21. package/dist/eval-server/skill-authoring-path.js +38 -0
  22. package/dist/eval-server/skill-authoring-path.js.map +1 -0
  23. package/dist/eval-server/skill-authoring-route.d.ts +3 -0
  24. package/dist/eval-server/skill-authoring-route.js +37 -0
  25. package/dist/eval-server/skill-authoring-route.js.map +1 -0
  26. package/dist/eval-server/skill-create-routes.d.ts +74 -2
  27. package/dist/eval-server/skill-create-routes.js +59 -160
  28. package/dist/eval-server/skill-create-routes.js.map +1 -1
  29. package/dist/eval-server/skill-generate-route.d.ts +2 -0
  30. package/dist/eval-server/skill-generate-route.js +130 -0
  31. package/dist/eval-server/skill-generate-route.js.map +1 -0
  32. package/dist/eval-server/skill-install-paths.d.ts +39 -0
  33. package/dist/eval-server/skill-install-paths.js +167 -0
  34. package/dist/eval-server/skill-install-paths.js.map +1 -0
  35. package/dist/eval-server/skill-md-emitter.js +4 -2
  36. package/dist/eval-server/skill-md-emitter.js.map +1 -1
  37. package/dist/eval-server/supported-agents-routes.d.ts +8 -2
  38. package/dist/eval-server/supported-agents-routes.js +10 -2
  39. package/dist/eval-server/supported-agents-routes.js.map +1 -1
  40. package/dist/eval-ui/assets/{AdvancedTab-6VlfqCuD.js → AdvancedTab-DX3v5Q7O.js} +1 -1
  41. package/dist/eval-ui/assets/CreateSkillPage-CwreCn22.js +151 -0
  42. package/dist/eval-ui/assets/{FindSkillsPalette-M6Ot4Qeq.js → FindSkillsPalette-B5-3ZLEo.js} +2 -2
  43. package/dist/eval-ui/assets/{GeneralTab-BpFlJ2ue.js → GeneralTab-BfFbcbuP.js} +1 -1
  44. package/dist/eval-ui/assets/{PrivacyTab-UfO7QLy_.js → PrivacyTab-Bq2N7Iam.js} +1 -1
  45. package/dist/eval-ui/assets/{SearchPaletteCore-CufFV6OR.js → SearchPaletteCore-Bgld3QTz.js} +1 -1
  46. package/dist/eval-ui/assets/SkillDetailPanel-B5LYvcry.js +1 -0
  47. package/dist/eval-ui/assets/{UpdateDropdown-CVM2xW6V.js → UpdateDropdown-VRCYPtXG.js} +1 -1
  48. package/dist/eval-ui/assets/{UpdatesTab-C38-n7V3.js → UpdatesTab-w6h18GPp.js} +1 -1
  49. package/dist/eval-ui/assets/core-DgHXlyD_.js +1 -0
  50. package/dist/eval-ui/assets/{event-QtOCMXAv.js → event-CABB5pUM.js} +1 -1
  51. package/dist/eval-ui/assets/{fonts-i7Lkz2zN.css → fonts-BZeyWEAn.css} +1 -1
  52. package/dist/eval-ui/assets/{index-DlQYQHDO.js → index-Bje294df.js} +1 -1
  53. package/dist/eval-ui/assets/{index-DDNzcrhv.js → index-D0lWXViJ.js} +1 -1
  54. package/dist/eval-ui/assets/{index-CUEYzTVL.js → index-DCV9_0X4.js} +1 -1
  55. package/dist/eval-ui/assets/main-DIkxEshL.js +86 -0
  56. package/dist/eval-ui/assets/{preferences-BN-jNWS0.js → preferences-VTBvoXmM.js} +2 -2
  57. package/dist/eval-ui/assets/source-serif-4-cyrillic-ext-wght-normal-DHTKMUil.woff2 +0 -0
  58. package/dist/eval-ui/assets/source-serif-4-cyrillic-wght-normal-B1g8a0vD.woff2 +0 -0
  59. package/dist/eval-ui/assets/source-serif-4-greek-wght-normal-BpXpdlRW.woff2 +0 -0
  60. package/dist/eval-ui/assets/source-serif-4-latin-ext-wght-normal-BVZ5su8S.woff2 +0 -0
  61. package/dist/eval-ui/assets/source-serif-4-latin-wght-normal-DMe4EKeb.woff2 +0 -0
  62. package/dist/eval-ui/assets/source-serif-4-vietnamese-wght-normal-BsaNuasd.woff2 +0 -0
  63. package/dist/eval-ui/assets/{useDesktopBridge-Cm4zPght.js → useDesktopBridge-C8dT34x9.js} +2 -2
  64. package/dist/eval-ui/index.html +3 -3
  65. package/dist/eval-ui/lifecycle.html +2 -2
  66. package/dist/eval-ui/preferences.html +3 -3
  67. package/dist/index.js +8 -4
  68. package/dist/index.js.map +1 -1
  69. package/dist/shared/authoring-engine-commands.d.ts +14 -0
  70. package/dist/shared/authoring-engine-commands.js +10 -0
  71. package/dist/shared/authoring-engine-commands.js.map +1 -0
  72. package/dist/shared/skill-authoring-document.d.ts +28 -0
  73. package/dist/shared/skill-authoring-document.js +187 -0
  74. package/dist/shared/skill-authoring-document.js.map +1 -0
  75. package/dist/studio/routes/index.js +1 -1
  76. package/dist/studio/routes/index.js.map +1 -1
  77. package/dist/utils/semver.d.ts +1 -0
  78. package/dist/utils/semver.js +18 -0
  79. package/dist/utils/semver.js.map +1 -1
  80. package/dist/utils/skill-builder-detection.js +4 -9
  81. package/dist/utils/skill-builder-detection.js.map +1 -1
  82. package/package.json +5 -4
  83. package/dist/eval-ui/assets/CreateSkillPage-e3YH0sBH.js +0 -13
  84. package/dist/eval-ui/assets/SkillDetailPanel-B7f3UPBT.js +0 -1
  85. package/dist/eval-ui/assets/core-DZjBCfjp.js +0 -1
  86. package/dist/eval-ui/assets/main-C30fpcFP.js +0 -86
  87. package/dist/eval-ui/assets/source-serif-4-cyrillic-ext-wght-normal-cHuGMAiY.woff2 +0 -0
  88. package/dist/eval-ui/assets/source-serif-4-cyrillic-wght-normal-DwHjdM4S.woff2 +0 -0
  89. package/dist/eval-ui/assets/source-serif-4-greek-wght-normal-ece1310W.woff2 +0 -0
  90. package/dist/eval-ui/assets/source-serif-4-latin-ext-wght-normal-CxNHBx-q.woff2 +0 -0
  91. package/dist/eval-ui/assets/source-serif-4-latin-wght-normal-D9elroTD.woff2 +0 -0
  92. package/dist/eval-ui/assets/source-serif-4-vietnamese-wght-normal-D-yuW59g.woff2 +0 -0
  93. /package/dist/eval-ui/assets/{lifecycle-n00yue6r.js → lifecycle-DC0khFSd.js} +0 -0
@@ -1 +1 @@
1
- import{r as o,j as l}from"./globals-DmzftdEG.js";import{u as S,C as P,S as k,F as y,a as C,T as A}from"./preferences-BN-jNWS0.js";/* empty css */import"./useDesktopBridge-Cm4zPght.js";const L={title:"This is your home directory",body:"Skill Studio shows personal skills here. Pick a specific project subfolder instead."},R={title:"This is a personal-scope folder",body:"Skills under this directory are personal-scope (shared across all your projects). If you meant to open a specific project, pick a project subfolder instead."};function _({kind:a,path:t,onPickAgain:i,onProceed:c,onClose:e}){const d=o.useRef(null),u=o.useRef(null);o.useEffect(()=>{var r;(r=u.current)==null||r.focus()},[]),o.useEffect(()=>{const r=s=>{s.key==="Escape"&&(s.preventDefault(),e())};return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[e]);const g=a==="home_root"?L:R,f="folder-picker-warning-title",p="folder-picker-warning-body";return l.jsx("div",{"data-testid":"folder-picker-warning-overlay",role:"presentation",onClick:r=>{r.target===r.currentTarget&&e()},style:E,children:l.jsxs("div",{ref:d,role:"dialog","aria-modal":"true","aria-labelledby":f,"aria-describedby":p,"data-testid":"folder-picker-warning-dialog","data-kind":a,style:F,children:[l.jsx("h2",{id:f,style:O,children:g.title}),l.jsx("p",{id:p,style:T,children:g.body}),l.jsx("code",{"data-testid":"folder-picker-warning-path",style:z,children:t}),l.jsxs("div",{style:I,children:[l.jsx("button",{ref:u,type:"button","data-testid":"folder-picker-warning-pick-again",onClick:i,style:B,children:"Pick again"}),l.jsx("button",{type:"button","data-testid":"folder-picker-warning-use-anyway",onClick:c,style:N,children:"Use this anyway"})]})]})})}const E={position:"fixed",inset:0,background:"rgba(0,0,0,0.4)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},F={background:"var(--color-surface, #ffffff)",color:"var(--color-text, #1a1a1a)",padding:"24px 28px",borderRadius:8,width:"min(480px, 90vw)",boxShadow:"0 20px 50px rgba(0,0,0,0.25)",fontFamily:"var(--font-system, -apple-system, system-ui)"},O={margin:"0 0 12px",fontSize:18,fontWeight:600},T={margin:"0 0 12px",fontSize:14,lineHeight:1.5,color:"var(--color-text-soft, #555)"},z={display:"block",padding:"8px 10px",background:"var(--color-pill-bg, rgba(0,0,0,0.05))",borderRadius:4,fontSize:12,marginBottom:18,wordBreak:"break-all"},I={display:"flex",gap:10,justifyContent:"flex-end"},B={background:"var(--color-accent, #2563eb)",color:"#fff",border:"none",borderRadius:4,padding:"8px 16px",fontSize:14,fontWeight:500,cursor:"pointer"},N={background:"transparent",color:"var(--color-text, #333)",border:"1px solid var(--color-border, #ccc)",borderRadius:4,padding:"8px 16px",fontSize:14,cursor:"pointer"};function U({bridge:a,snapshot:t,onSnapshotChanged:i,pushToast:c}){const{t:e}=S("preferences"),d=!a.available,[u,g]=o.useState((t==null?void 0:t.general.theme)??"system");o.useEffect(()=>{t!=null&&t.general.theme&&g(t.general.theme)},[t==null?void 0:t.general.theme]);const f=o.useCallback(async n=>{g(n);try{await a.setSetting("general.theme",n),await i()}catch{c({message:"Couldn't update theme.",variant:"error"})}},[a,i,c]),p=o.useCallback(async n=>{try{await a.setAutostart(n),await a.setSetting("general.launchAtLogin",n),await i()}catch{c({message:e("general.launchAtLogin.errorAdmin"),variant:"error",actions:[{label:e("general.launchAtLogin.openSettings"),onClick:()=>{}}]}),await i()}},[a,i,c,e]),[r,s]=o.useState(null),m=o.useCallback(async n=>{await a.setSetting("general.defaultProjectFolder",n),await i()},[a,i]),h=o.useCallback(async()=>{try{const n=await a.pickProjectFolder();if(!n)return;const{path:b,classification:x}=n;if(x.kind==="home_root"){s({kind:"home_root",path:b});return}if(x.kind==="personal_scope"){s({kind:"personal_scope",path:b});return}await m(b)}catch{c({message:"Couldn't open folder picker.",variant:"error"})}},[a,m,c]),j=u,w=(t==null?void 0:t.general.launchAtLogin)??!1,v=(t==null?void 0:t.general.defaultProjectFolder)??null;return l.jsxs(l.Fragment,{children:[l.jsxs("header",{className:"preferences-content__heading",children:[l.jsx("h1",{children:e("general.heading")}),l.jsx("p",{children:e("general.subheading")})]}),d?l.jsxs(P,{variant:"info",children:[l.jsx("strong",{children:e("common.browserMode")}),l.jsx("span",{children:e("app.browserCallout")}),l.jsx("a",{href:e("app.downloadUrl"),target:"_blank",rel:"noopener noreferrer",children:e("app.downloadLink")})]}):null,l.jsx(k,{title:e("general.theme.label"),children:l.jsx(y,{label:e("general.theme.label"),help:e("general.theme.help"),control:l.jsx(C,{ariaLabel:e("general.theme.label"),value:j,onChange:f,options:[{value:"system",label:e("general.theme.system")},{value:"light",label:e("general.theme.light")},{value:"dark",label:e("general.theme.dark")}]})})}),l.jsxs(k,{title:e("tabs.general"),children:[l.jsx(y,{label:e("general.launchAtLogin.label"),help:e(d?"general.launchAtLogin.browserDisabled":"general.launchAtLogin.help"),control:l.jsx(A,{ariaLabel:e("general.launchAtLogin.label"),checked:w,onChange:p,disabled:d})}),l.jsx(y,{stacked:!0,label:e("general.defaultProject.label"),help:e("general.defaultProject.help"),control:l.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center",marginTop:6},children:[l.jsx("code",{className:"pref-path-display",style:{flex:1},children:v??e("general.defaultProject.notSet")}),l.jsx("button",{type:"button",className:"pref-button",disabled:d,"aria-disabled":d||void 0,onClick:h,children:e("general.defaultProject.choose")})]})}),l.jsx(y,{label:e("general.language.label"),help:e("general.language.help"),control:l.jsx("select",{className:"pref-select",defaultValue:"en","aria-label":e("general.language.label"),children:l.jsx("option",{value:"en",children:e("general.language.english")})})})]}),r?l.jsx(_,{kind:r.kind,path:r.path,onPickAgain:()=>{s(null),h()},onProceed:()=>{const n=r.path;s(null),m(n)},onClose:()=>s(null)}):null]})}export{U as GeneralTab};
1
+ import{r as o,j as l}from"./globals-DmzftdEG.js";import{u as S,C as P,S as k,F as y,a as C,T as A}from"./preferences-VTBvoXmM.js";/* empty css */import"./useDesktopBridge-C8dT34x9.js";const L={title:"This is your home directory",body:"Skill Studio shows personal skills here. Pick a specific project subfolder instead."},R={title:"This is a personal-scope folder",body:"Skills under this directory are personal-scope (shared across all your projects). If you meant to open a specific project, pick a project subfolder instead."};function _({kind:a,path:t,onPickAgain:i,onProceed:c,onClose:e}){const d=o.useRef(null),u=o.useRef(null);o.useEffect(()=>{var r;(r=u.current)==null||r.focus()},[]),o.useEffect(()=>{const r=s=>{s.key==="Escape"&&(s.preventDefault(),e())};return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[e]);const g=a==="home_root"?L:R,f="folder-picker-warning-title",p="folder-picker-warning-body";return l.jsx("div",{"data-testid":"folder-picker-warning-overlay",role:"presentation",onClick:r=>{r.target===r.currentTarget&&e()},style:E,children:l.jsxs("div",{ref:d,role:"dialog","aria-modal":"true","aria-labelledby":f,"aria-describedby":p,"data-testid":"folder-picker-warning-dialog","data-kind":a,style:F,children:[l.jsx("h2",{id:f,style:O,children:g.title}),l.jsx("p",{id:p,style:T,children:g.body}),l.jsx("code",{"data-testid":"folder-picker-warning-path",style:z,children:t}),l.jsxs("div",{style:I,children:[l.jsx("button",{ref:u,type:"button","data-testid":"folder-picker-warning-pick-again",onClick:i,style:B,children:"Pick again"}),l.jsx("button",{type:"button","data-testid":"folder-picker-warning-use-anyway",onClick:c,style:N,children:"Use this anyway"})]})]})})}const E={position:"fixed",inset:0,background:"rgba(0,0,0,0.4)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},F={background:"var(--color-surface, #ffffff)",color:"var(--color-text, #1a1a1a)",padding:"24px 28px",borderRadius:8,width:"min(480px, 90vw)",boxShadow:"0 20px 50px rgba(0,0,0,0.25)",fontFamily:"var(--font-system, -apple-system, system-ui)"},O={margin:"0 0 12px",fontSize:18,fontWeight:600},T={margin:"0 0 12px",fontSize:14,lineHeight:1.5,color:"var(--color-text-soft, #555)"},z={display:"block",padding:"8px 10px",background:"var(--color-pill-bg, rgba(0,0,0,0.05))",borderRadius:4,fontSize:12,marginBottom:18,wordBreak:"break-all"},I={display:"flex",gap:10,justifyContent:"flex-end"},B={background:"var(--color-accent, #2563eb)",color:"#fff",border:"none",borderRadius:4,padding:"8px 16px",fontSize:14,fontWeight:500,cursor:"pointer"},N={background:"transparent",color:"var(--color-text, #333)",border:"1px solid var(--color-border, #ccc)",borderRadius:4,padding:"8px 16px",fontSize:14,cursor:"pointer"};function U({bridge:a,snapshot:t,onSnapshotChanged:i,pushToast:c}){const{t:e}=S("preferences"),d=!a.available,[u,g]=o.useState((t==null?void 0:t.general.theme)??"system");o.useEffect(()=>{t!=null&&t.general.theme&&g(t.general.theme)},[t==null?void 0:t.general.theme]);const f=o.useCallback(async n=>{g(n);try{await a.setSetting("general.theme",n),await i()}catch{c({message:"Couldn't update theme.",variant:"error"})}},[a,i,c]),p=o.useCallback(async n=>{try{await a.setAutostart(n),await a.setSetting("general.launchAtLogin",n),await i()}catch{c({message:e("general.launchAtLogin.errorAdmin"),variant:"error",actions:[{label:e("general.launchAtLogin.openSettings"),onClick:()=>{}}]}),await i()}},[a,i,c,e]),[r,s]=o.useState(null),m=o.useCallback(async n=>{await a.setSetting("general.defaultProjectFolder",n),await i()},[a,i]),h=o.useCallback(async()=>{try{const n=await a.pickProjectFolder();if(!n)return;const{path:b,classification:x}=n;if(x.kind==="home_root"){s({kind:"home_root",path:b});return}if(x.kind==="personal_scope"){s({kind:"personal_scope",path:b});return}await m(b)}catch{c({message:"Couldn't open folder picker.",variant:"error"})}},[a,m,c]),j=u,w=(t==null?void 0:t.general.launchAtLogin)??!1,v=(t==null?void 0:t.general.defaultProjectFolder)??null;return l.jsxs(l.Fragment,{children:[l.jsxs("header",{className:"preferences-content__heading",children:[l.jsx("h1",{children:e("general.heading")}),l.jsx("p",{children:e("general.subheading")})]}),d?l.jsxs(P,{variant:"info",children:[l.jsx("strong",{children:e("common.browserMode")}),l.jsx("span",{children:e("app.browserCallout")}),l.jsx("a",{href:e("app.downloadUrl"),target:"_blank",rel:"noopener noreferrer",children:e("app.downloadLink")})]}):null,l.jsx(k,{title:e("general.theme.label"),children:l.jsx(y,{label:e("general.theme.label"),help:e("general.theme.help"),control:l.jsx(C,{ariaLabel:e("general.theme.label"),value:j,onChange:f,options:[{value:"system",label:e("general.theme.system")},{value:"light",label:e("general.theme.light")},{value:"dark",label:e("general.theme.dark")}]})})}),l.jsxs(k,{title:e("tabs.general"),children:[l.jsx(y,{label:e("general.launchAtLogin.label"),help:e(d?"general.launchAtLogin.browserDisabled":"general.launchAtLogin.help"),control:l.jsx(A,{ariaLabel:e("general.launchAtLogin.label"),checked:w,onChange:p,disabled:d})}),l.jsx(y,{stacked:!0,label:e("general.defaultProject.label"),help:e("general.defaultProject.help"),control:l.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center",marginTop:6},children:[l.jsx("code",{className:"pref-path-display",style:{flex:1},children:v??e("general.defaultProject.notSet")}),l.jsx("button",{type:"button",className:"pref-button",disabled:d,"aria-disabled":d||void 0,onClick:h,children:e("general.defaultProject.choose")})]})}),l.jsx(y,{label:e("general.language.label"),help:e("general.language.help"),control:l.jsx("select",{className:"pref-select",defaultValue:"en","aria-label":e("general.language.label"),children:l.jsx("option",{value:"en",children:e("general.language.english")})})})]}),r?l.jsx(_,{kind:r.kind,path:r.path,onPickAgain:()=>{s(null),h()},onProceed:()=>{const n=r.path;s(null),m(n)},onClose:()=>s(null)}):null]})}export{U as GeneralTab};
@@ -1 +1 @@
1
- import{r as s,j as a}from"./globals-DmzftdEG.js";import{u as h,C as x,S as j,F as n,T as p}from"./preferences-BN-jNWS0.js";/* empty css */import"./useDesktopBridge-Cm4zPght.js";function E({bridge:l,snapshot:r,onSnapshotChanged:i,pushToast:t}){const{t:e}=h("preferences"),y=!l.available,v=(r==null?void 0:r.privacy.telemetryEnabled)??!1,m=(r==null?void 0:r.privacy.crashReportingEnabled)??!1,o=s.useCallback(async(c,d,g)=>{try{await l.setSetting(c,d),await i()}catch{t({message:`Couldn't update ${g}.`,variant:"error"})}},[l,i,t]),b=s.useCallback(async()=>{try{await l.openLogsFolder()}catch{t({message:"Couldn't open logs folder.",variant:"error"})}},[l,t]);return a.jsxs(a.Fragment,{children:[a.jsxs("header",{className:"preferences-content__heading",children:[a.jsx("h1",{children:e("privacy.heading")}),a.jsx("p",{children:e("privacy.subheading")})]}),a.jsx(x,{variant:"info",children:e("privacy.disclosure")}),a.jsxs(j,{title:e("privacy.heading"),children:[a.jsx(n,{label:e("privacy.telemetry.label"),help:e("privacy.telemetry.help"),control:a.jsx(p,{ariaLabel:e("privacy.telemetry.label"),checked:v,onChange:c=>o("privacy.telemetryEnabled",c,"telemetry")})}),a.jsx(n,{label:e("privacy.crash.label"),help:e("privacy.crash.help"),control:a.jsx(p,{ariaLabel:e("privacy.crash.label"),checked:m,onChange:c=>o("privacy.crashReportingEnabled",c,"crash reporting")})}),y?null:a.jsx(n,{label:e("privacy.openLogs.label"),help:e("privacy.openLogs.help"),control:a.jsx("button",{type:"button",className:"pref-button",onClick:b,children:e("privacy.openLogs.label")})})]})]})}export{E as PrivacyTab};
1
+ import{r as s,j as a}from"./globals-DmzftdEG.js";import{u as h,C as x,S as j,F as n,T as p}from"./preferences-VTBvoXmM.js";/* empty css */import"./useDesktopBridge-C8dT34x9.js";function E({bridge:l,snapshot:r,onSnapshotChanged:i,pushToast:t}){const{t:e}=h("preferences"),y=!l.available,v=(r==null?void 0:r.privacy.telemetryEnabled)??!1,m=(r==null?void 0:r.privacy.crashReportingEnabled)??!1,o=s.useCallback(async(c,d,g)=>{try{await l.setSetting(c,d),await i()}catch{t({message:`Couldn't update ${g}.`,variant:"error"})}},[l,i,t]),b=s.useCallback(async()=>{try{await l.openLogsFolder()}catch{t({message:"Couldn't open logs folder.",variant:"error"})}},[l,t]);return a.jsxs(a.Fragment,{children:[a.jsxs("header",{className:"preferences-content__heading",children:[a.jsx("h1",{children:e("privacy.heading")}),a.jsx("p",{children:e("privacy.subheading")})]}),a.jsx(x,{variant:"info",children:e("privacy.disclosure")}),a.jsxs(j,{title:e("privacy.heading"),children:[a.jsx(n,{label:e("privacy.telemetry.label"),help:e("privacy.telemetry.help"),control:a.jsx(p,{ariaLabel:e("privacy.telemetry.label"),checked:v,onChange:c=>o("privacy.telemetryEnabled",c,"telemetry")})}),a.jsx(n,{label:e("privacy.crash.label"),help:e("privacy.crash.help"),control:a.jsx(p,{ariaLabel:e("privacy.crash.label"),checked:m,onChange:c=>o("privacy.crashReportingEnabled",c,"crash reporting")})}),y?null:a.jsx(n,{label:e("privacy.openLogs.label"),help:e("privacy.openLogs.help"),control:a.jsx("button",{type:"button",className:"pref-button",onClick:b,children:e("privacy.openLogs.label")})})]})]})}export{E as PrivacyTab};
@@ -1,4 +1,4 @@
1
- import{r as i,j as t}from"./globals-DmzftdEG.js";import{s as xe,h as ye}from"./main-C30fpcFP.js";import{a as me}from"./skill-url-C4ekwoGs.js";import"./useDesktopBridge-Cm4zPght.js";/* empty css */function be(a){return a?a.replace(/<(?!\/?b>)[^>]+>/gi,""):""}function ve(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function $e(a,p){if(!a)return"";const d=ve(a);if(!p)return d;const u=p.trim().split(/\s+/).filter(Boolean);if(u.length===0)return d;const T=u.map(O=>O.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),b=new RegExp(`(${T})`,"gi");return d.replace(b,"<b>$1</b>")}function ke(a){return a?a<1e3?String(a):`${(a/1e3).toFixed(1)}k`:""}const Se=[{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"}],Ee=[{label:"Submit a skill",href:"/submit"},{label:"Browse all skills",href:"/skills"}],Y="var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif)",c="var(--font-mono, 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace)";function Fe({tier:a,isTainted:p,isBlocked:d}){const u={display:"inline-flex",alignItems:"center",padding:"1px 6px",height:16,borderRadius:3,fontFamily:c,fontSize:9.5,fontWeight:600,letterSpacing:"0.04em",whiteSpace:"nowrap",lineHeight:1,textTransform:"uppercase"};if(d)return t.jsx("span",{"data-testid":"mini-tier-badge","data-tier":"BLOCKED",style:{...u,color:"#7A1F1F",background:"#FBE8E5",border:"1px solid #E8B7B0"},children:"BLOCKED"});if(p)return t.jsx("span",{"data-testid":"mini-tier-badge","data-tier":"TAINTED",style:{...u,color:"#7A4A00",background:"#FBEFD3",border:"1px solid #E8C885"},children:"Tainted"});const b={CERTIFIED:{color:"var(--color-installed, #2F6A4A)",bg:"rgba(47,106,74,0.08)",border:"rgba(47,106,74,0.25)"},VERIFIED:{color:"var(--color-focus, #3B6EA8)",bg:"rgba(59,110,168,0.08)",border:"rgba(59,110,168,0.25)"},REJECTED:{color:"#7A1F1F",bg:"#FBE8E5",border:"#E8B7B0"},BLOCKED:{color:"#7A1F1F",bg:"#FBE8E5",border:"#E8B7B0"}}[a];return b?t.jsx("span",{"data-testid":"mini-tier-badge","data-tier":a,style:{...u,color:b.color,background:b.bg,border:`1px solid ${b.border}`},children:ye(a)}):null}function W(){return t.jsxs("div",{"data-testid":"skeleton-row",style:{padding:"10px 18px",display:"flex",alignItems:"center",gap:10},children:[t.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:6},children:[t.jsx("div",{style:{height:12,width:"32%",borderRadius:3,background:"var(--color-rule, #E8E1D6)",animation:"fsp-pulse 1.4s ease-in-out infinite"}}),t.jsx("div",{style:{height:9,width:"55%",borderRadius:3,background:"var(--color-rule, #E8E1D6)",animation:"fsp-pulse 1.4s ease-in-out infinite",animationDelay:"0.18s"}})]}),t.jsx("div",{style:{height:14,width:52,borderRadius:3,background:"var(--color-rule, #E8E1D6)",animation:"fsp-pulse 1.4s ease-in-out infinite",animationDelay:"0.36s"}})]})}function we(a){var d,u;const p=(d=a.target)==null?void 0:d.tagName;return!!(p==="INPUT"||p==="TEXTAREA"||p==="SELECT"||(u=a.target)!=null&&u.isContentEditable)}const je="/api/v1/studio/search",Ae="/api/v1/stats",Re="/api/v1/studio/telemetry/search-select",Ce=10,Q=20,De=150;function Ne({onSelect:a,onNavigate:p,searchUrl:d=je,trendingUrl:u=Ae,telemetrySelectUrl:T=Re,maxPages:b=Ce,initialOpen:O=!1}={}){const[L,E]=i.useState(O),[o,F]=i.useState(""),[I,h]=i.useState([]),[U,v]=i.useState(0),[w,B]=i.useState(!1),[_,j]=i.useState(1),[H,x]=i.useState(!1),[M,X]=i.useState(!1),[$,k]=i.useState(null),[A,R]=i.useState(!1),V=i.useRef(null),N=i.useRef(null),z=i.useRef(!1),Z=i.useRef(null),ee=i.useRef(null),K=i.useRef(new Map),S=i.useRef(null),[,ue]=i.useState(!1),te=i.useMemo(()=>typeof navigator<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.platform||""),[]),re=i.useRef(o);i.useEffect(()=>{re.current=o},[o]),i.useEffect(()=>{S.current||fetch(u).then(e=>e.json()).then(e=>{S.current=e.trendingSkills??[],ue(!0)}).catch(()=>{})},[u]),i.useEffect(()=>{const e=r=>{if(r.key==="Escape"){E(!1);return}if(L&&(r.metaKey||r.ctrlKey)&&/^[1-9]$/.test(r.key)){r.preventDefault();const s=Number(r.key)-1;v(s),window.dispatchEvent(new CustomEvent("findSkillsActivateAt",{detail:{index:s}}));return}!r.metaKey&&!r.ctrlKey&&!r.altKey&&r.key.length===1&&!we(r)&&(z.current=!0,F(r.key),E(!0))},n=r=>{var y;const l=(y=r.detail)==null?void 0:y.query;l&&(z.current=!0,F(l)),E(!0)};return window.addEventListener("keydown",e),window.addEventListener("openFindSkills",n),()=>{window.removeEventListener("keydown",e),window.removeEventListener("openFindSkills",n)}},[L]),i.useLayoutEffect(()=>{var n;if(!L){(n=N.current)==null||n.abort();return}if(z.current)z.current=!1,h([]),v(0),j(1),x(!1),B(!1),k(null),R(!1);else{const r=(()=>{var s;try{return((s=window.sessionStorage)==null?void 0:s.getItem("find-skills:last-query"))??""}catch{return""}})();F(r),h([]),v(0),j(1),x(!1),B(!1),k(null),R(!1)}const e=V.current;if(e){e.focus({preventScroll:!0});const r=e.value.length;e.setSelectionRange(r,r)}},[L]),i.useEffect(()=>{if(!o.trim()||o.trim().length<2){h([]),x(!1),j(1),k(null);return}const e=6e4,n=o.trim().toLowerCase(),r=K.current.get(n);if(r&&Date.now()-r.timestamp<e){h(r.results),x(r.hasMore),j(1),B(!1),k(null),fetch(`${d}?q=${encodeURIComponent(o)}&limit=${Q}&page=1`).then(m=>m.ok?m.json():null).then(m=>{var g;m&&K.current.set(n,{results:m.results||[],hasMore:((g=m.pagination)==null?void 0:g.hasMore)??!1,timestamp:Date.now()})}).catch(()=>{});return}B(!0),k(null);const l=new AbortController,y=setTimeout(async()=>{var m;try{const g=await fetch(`${d}?q=${encodeURIComponent(o)}&limit=${Q}&page=1`,{signal:l.signal});if(g.status>=500){R(!0),h([]),x(!1),k(null);return}if(!g.ok){h([]),x(!1),k(`search failed (${g.status})`);return}const ce=await g.json(),de=ce.results||[],pe=((m=ce.pagination)==null?void 0:m.hasMore)??!1;h(de),x(pe),j(1),R(!1),K.current.set(n,{results:de,hasMore:pe,timestamp:Date.now()})}catch(g){if(g instanceof DOMException&&g.name==="AbortError")return;R(!0),h([]),x(!1),k(null)}finally{l.signal.aborted||B(!1)}},De);return()=>{clearTimeout(y),l.abort()}},[o,d]);const C=_>=b,ne=i.useCallback(async()=>{var n,r;if(M||C)return;const e=_+1;X(!0),N.current=new AbortController;try{const s=await fetch(`${d}?q=${encodeURIComponent(o)}&limit=${Q}&page=${e}`,{signal:N.current.signal});if(!s.ok)return;const l=await s.json();h(y=>[...y,...l.results||[]]),x(((n=l.pagination)==null?void 0:n.hasMore)??!1),j(e)}catch(s){if(s instanceof DOMException&&s.name==="AbortError")return}finally{(r=N.current)!=null&&r.signal.aborted||X(!1)}},[_,o,M,C,d]);i.useEffect(()=>{const e=Z.current,n=ee.current;if(!e||!n||typeof IntersectionObserver>"u")return;const r=new IntersectionObserver(s=>{s[0].isIntersecting&&H&&!w&&!M&&!C&&ne()},{root:n,rootMargin:"100px"});return r.observe(e),()=>r.disconnect()},[H,w,M,C,ne]);const q=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}),P=(()=>{const e=o.trim();if(A&&e.length>=1&&S.current){const n=e.toLowerCase();return S.current.filter(r=>r.name.toLowerCase().includes(n)||(r.displayName??"").toLowerCase().includes(n)).slice(0,30).map(q)}if(e.length>=2)return I;if(e.length===1&&S.current){const n=e.toLowerCase();return S.current.filter(r=>r.name.toLowerCase().startsWith(n)||r.displayName.toLowerCase().startsWith(n)).slice(0,10).map(q)}return e.length===0&&S.current?S.current.slice(0,10).map(q):[]})(),f=[...P.map(e=>{const n=e.skillSlug||e.name.split("/").pop()||e.name,r=e.ownerSlug&&e.repoSlug?`${e.ownerSlug}/${e.repoSlug}`:e.author;return{type:"skill",label:n,publisher:r,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:me(e.name),sourceResult:e}}),...!o&&P.length===0?Se.map(e=>({type:"category",label:e.label,publisher:"",name:"",meta:"",certTier:"",repoUrl:"",href:e.href})):[],...!o&&P.length===0?Ee.map(e=>({type:"action",label:e.label,publisher:"",name:"",meta:"",certTier:"",repoUrl:"",href:e.href})):[]],ie=i.useCallback(e=>{xe(T,{skillName:e,ts:Date.now()})},[T]),D=i.useCallback((e,n)=>{if(n&&(ie(n.name),a))try{a(n,re.current.trim())}catch{}if(E(!1),p)try{p(e)}catch{}},[a,p,ie]);i.useEffect(()=>{function e(n){var l;const r=((l=n.detail)==null?void 0:l.index)??-1,s=f[r];s&&D(s.href,s.type==="skill"?s.sourceResult:void 0)}return window.addEventListener("findSkillsActivateAt",e),()=>window.removeEventListener("findSkillsActivateAt",e)},[f,D]);const fe=e=>{if(e.key==="ArrowDown")e.preventDefault(),v(n=>Math.min(n+1,f.length-1));else if(e.key==="ArrowUp")e.preventDefault(),v(n=>Math.max(n-1,0));else if(e.key==="Enter"&&f[U]){const n=f[U];D(n.href,n.type==="skill"?n.sourceResult:void 0)}};if(!L)return null;let ae="";const se=!w&&!$&&!A&&o.trim().length>=2&&I.length===0,G=w&&I.length===0&&o.trim().length>=2&&!A,oe=o.trim(),le=()=>{R(!1);const e=o;F(""),setTimeout(()=>F(e),0)},ge={position:"fixed",inset:0,background:"color-mix(in srgb, var(--color-ink, #191919) 35%, transparent)",backdropFilter:"blur(6px) saturate(1.1)",WebkitBackdropFilter:"blur(6px) saturate(1.1)"},he={position:"relative",width:"100%",maxWidth:640,margin:"0 16px",background:"var(--bg-surface, #FFFFFF)",color:"var(--text-primary, #191919)",borderRadius:12,border:"1px solid var(--color-rule, #E8E1D6)",boxShadow:"0 1px 0 rgba(255,255,255,0.6) inset,0 24px 60px -12px rgba(25,20,15,0.28),0 12px 24px -8px rgba(25,20,15,0.18)",overflow:"hidden",fontFamily:Y};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(18vh, 144px)"},onClick:()=>E(!1),children:[t.jsx("div",{style:ge}),t.jsx("style",{children:`
1
+ import{r as i,j as t}from"./globals-DmzftdEG.js";import{s as xe,h as ye}from"./main-DIkxEshL.js";import{a as me}from"./skill-url-C4ekwoGs.js";import"./useDesktopBridge-C8dT34x9.js";/* empty css */function be(a){return a?a.replace(/<(?!\/?b>)[^>]+>/gi,""):""}function ve(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function $e(a,p){if(!a)return"";const d=ve(a);if(!p)return d;const u=p.trim().split(/\s+/).filter(Boolean);if(u.length===0)return d;const T=u.map(O=>O.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),b=new RegExp(`(${T})`,"gi");return d.replace(b,"<b>$1</b>")}function ke(a){return a?a<1e3?String(a):`${(a/1e3).toFixed(1)}k`:""}const Se=[{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"}],Ee=[{label:"Submit a skill",href:"/submit"},{label:"Browse all skills",href:"/skills"}],Y="var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif)",c="var(--font-mono, 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace)";function Fe({tier:a,isTainted:p,isBlocked:d}){const u={display:"inline-flex",alignItems:"center",padding:"1px 6px",height:16,borderRadius:3,fontFamily:c,fontSize:9.5,fontWeight:600,letterSpacing:"0.04em",whiteSpace:"nowrap",lineHeight:1,textTransform:"uppercase"};if(d)return t.jsx("span",{"data-testid":"mini-tier-badge","data-tier":"BLOCKED",style:{...u,color:"#7A1F1F",background:"#FBE8E5",border:"1px solid #E8B7B0"},children:"BLOCKED"});if(p)return t.jsx("span",{"data-testid":"mini-tier-badge","data-tier":"TAINTED",style:{...u,color:"#7A4A00",background:"#FBEFD3",border:"1px solid #E8C885"},children:"Tainted"});const b={CERTIFIED:{color:"var(--color-installed, #2F6A4A)",bg:"rgba(47,106,74,0.08)",border:"rgba(47,106,74,0.25)"},VERIFIED:{color:"var(--color-focus, #3B6EA8)",bg:"rgba(59,110,168,0.08)",border:"rgba(59,110,168,0.25)"},REJECTED:{color:"#7A1F1F",bg:"#FBE8E5",border:"#E8B7B0"},BLOCKED:{color:"#7A1F1F",bg:"#FBE8E5",border:"#E8B7B0"}}[a];return b?t.jsx("span",{"data-testid":"mini-tier-badge","data-tier":a,style:{...u,color:b.color,background:b.bg,border:`1px solid ${b.border}`},children:ye(a)}):null}function W(){return t.jsxs("div",{"data-testid":"skeleton-row",style:{padding:"10px 18px",display:"flex",alignItems:"center",gap:10},children:[t.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:6},children:[t.jsx("div",{style:{height:12,width:"32%",borderRadius:3,background:"var(--color-rule, #E8E1D6)",animation:"fsp-pulse 1.4s ease-in-out infinite"}}),t.jsx("div",{style:{height:9,width:"55%",borderRadius:3,background:"var(--color-rule, #E8E1D6)",animation:"fsp-pulse 1.4s ease-in-out infinite",animationDelay:"0.18s"}})]}),t.jsx("div",{style:{height:14,width:52,borderRadius:3,background:"var(--color-rule, #E8E1D6)",animation:"fsp-pulse 1.4s ease-in-out infinite",animationDelay:"0.36s"}})]})}function we(a){var d,u;const p=(d=a.target)==null?void 0:d.tagName;return!!(p==="INPUT"||p==="TEXTAREA"||p==="SELECT"||(u=a.target)!=null&&u.isContentEditable)}const je="/api/v1/studio/search",Ae="/api/v1/stats",Re="/api/v1/studio/telemetry/search-select",Ce=10,Q=20,De=150;function Ne({onSelect:a,onNavigate:p,searchUrl:d=je,trendingUrl:u=Ae,telemetrySelectUrl:T=Re,maxPages:b=Ce,initialOpen:O=!1}={}){const[L,E]=i.useState(O),[o,F]=i.useState(""),[I,h]=i.useState([]),[U,v]=i.useState(0),[w,B]=i.useState(!1),[_,j]=i.useState(1),[H,x]=i.useState(!1),[M,X]=i.useState(!1),[$,k]=i.useState(null),[A,R]=i.useState(!1),V=i.useRef(null),N=i.useRef(null),z=i.useRef(!1),Z=i.useRef(null),ee=i.useRef(null),K=i.useRef(new Map),S=i.useRef(null),[,ue]=i.useState(!1),te=i.useMemo(()=>typeof navigator<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.platform||""),[]),re=i.useRef(o);i.useEffect(()=>{re.current=o},[o]),i.useEffect(()=>{S.current||fetch(u).then(e=>e.json()).then(e=>{S.current=e.trendingSkills??[],ue(!0)}).catch(()=>{})},[u]),i.useEffect(()=>{const e=r=>{if(r.key==="Escape"){E(!1);return}if(L&&(r.metaKey||r.ctrlKey)&&/^[1-9]$/.test(r.key)){r.preventDefault();const s=Number(r.key)-1;v(s),window.dispatchEvent(new CustomEvent("findSkillsActivateAt",{detail:{index:s}}));return}!r.metaKey&&!r.ctrlKey&&!r.altKey&&r.key.length===1&&!we(r)&&(z.current=!0,F(r.key),E(!0))},n=r=>{var y;const l=(y=r.detail)==null?void 0:y.query;l&&(z.current=!0,F(l)),E(!0)};return window.addEventListener("keydown",e),window.addEventListener("openFindSkills",n),()=>{window.removeEventListener("keydown",e),window.removeEventListener("openFindSkills",n)}},[L]),i.useLayoutEffect(()=>{var n;if(!L){(n=N.current)==null||n.abort();return}if(z.current)z.current=!1,h([]),v(0),j(1),x(!1),B(!1),k(null),R(!1);else{const r=(()=>{var s;try{return((s=window.sessionStorage)==null?void 0:s.getItem("find-skills:last-query"))??""}catch{return""}})();F(r),h([]),v(0),j(1),x(!1),B(!1),k(null),R(!1)}const e=V.current;if(e){e.focus({preventScroll:!0});const r=e.value.length;e.setSelectionRange(r,r)}},[L]),i.useEffect(()=>{if(!o.trim()||o.trim().length<2){h([]),x(!1),j(1),k(null);return}const e=6e4,n=o.trim().toLowerCase(),r=K.current.get(n);if(r&&Date.now()-r.timestamp<e){h(r.results),x(r.hasMore),j(1),B(!1),k(null),fetch(`${d}?q=${encodeURIComponent(o)}&limit=${Q}&page=1`).then(m=>m.ok?m.json():null).then(m=>{var g;m&&K.current.set(n,{results:m.results||[],hasMore:((g=m.pagination)==null?void 0:g.hasMore)??!1,timestamp:Date.now()})}).catch(()=>{});return}B(!0),k(null);const l=new AbortController,y=setTimeout(async()=>{var m;try{const g=await fetch(`${d}?q=${encodeURIComponent(o)}&limit=${Q}&page=1`,{signal:l.signal});if(g.status>=500){R(!0),h([]),x(!1),k(null);return}if(!g.ok){h([]),x(!1),k(`search failed (${g.status})`);return}const ce=await g.json(),de=ce.results||[],pe=((m=ce.pagination)==null?void 0:m.hasMore)??!1;h(de),x(pe),j(1),R(!1),K.current.set(n,{results:de,hasMore:pe,timestamp:Date.now()})}catch(g){if(g instanceof DOMException&&g.name==="AbortError")return;R(!0),h([]),x(!1),k(null)}finally{l.signal.aborted||B(!1)}},De);return()=>{clearTimeout(y),l.abort()}},[o,d]);const C=_>=b,ne=i.useCallback(async()=>{var n,r;if(M||C)return;const e=_+1;X(!0),N.current=new AbortController;try{const s=await fetch(`${d}?q=${encodeURIComponent(o)}&limit=${Q}&page=${e}`,{signal:N.current.signal});if(!s.ok)return;const l=await s.json();h(y=>[...y,...l.results||[]]),x(((n=l.pagination)==null?void 0:n.hasMore)??!1),j(e)}catch(s){if(s instanceof DOMException&&s.name==="AbortError")return}finally{(r=N.current)!=null&&r.signal.aborted||X(!1)}},[_,o,M,C,d]);i.useEffect(()=>{const e=Z.current,n=ee.current;if(!e||!n||typeof IntersectionObserver>"u")return;const r=new IntersectionObserver(s=>{s[0].isIntersecting&&H&&!w&&!M&&!C&&ne()},{root:n,rootMargin:"100px"});return r.observe(e),()=>r.disconnect()},[H,w,M,C,ne]);const q=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}),P=(()=>{const e=o.trim();if(A&&e.length>=1&&S.current){const n=e.toLowerCase();return S.current.filter(r=>r.name.toLowerCase().includes(n)||(r.displayName??"").toLowerCase().includes(n)).slice(0,30).map(q)}if(e.length>=2)return I;if(e.length===1&&S.current){const n=e.toLowerCase();return S.current.filter(r=>r.name.toLowerCase().startsWith(n)||r.displayName.toLowerCase().startsWith(n)).slice(0,10).map(q)}return e.length===0&&S.current?S.current.slice(0,10).map(q):[]})(),f=[...P.map(e=>{const n=e.skillSlug||e.name.split("/").pop()||e.name,r=e.ownerSlug&&e.repoSlug?`${e.ownerSlug}/${e.repoSlug}`:e.author;return{type:"skill",label:n,publisher:r,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:me(e.name),sourceResult:e}}),...!o&&P.length===0?Se.map(e=>({type:"category",label:e.label,publisher:"",name:"",meta:"",certTier:"",repoUrl:"",href:e.href})):[],...!o&&P.length===0?Ee.map(e=>({type:"action",label:e.label,publisher:"",name:"",meta:"",certTier:"",repoUrl:"",href:e.href})):[]],ie=i.useCallback(e=>{xe(T,{skillName:e,ts:Date.now()})},[T]),D=i.useCallback((e,n)=>{if(n&&(ie(n.name),a))try{a(n,re.current.trim())}catch{}if(E(!1),p)try{p(e)}catch{}},[a,p,ie]);i.useEffect(()=>{function e(n){var l;const r=((l=n.detail)==null?void 0:l.index)??-1,s=f[r];s&&D(s.href,s.type==="skill"?s.sourceResult:void 0)}return window.addEventListener("findSkillsActivateAt",e),()=>window.removeEventListener("findSkillsActivateAt",e)},[f,D]);const fe=e=>{if(e.key==="ArrowDown")e.preventDefault(),v(n=>Math.min(n+1,f.length-1));else if(e.key==="ArrowUp")e.preventDefault(),v(n=>Math.max(n-1,0));else if(e.key==="Enter"&&f[U]){const n=f[U];D(n.href,n.type==="skill"?n.sourceResult:void 0)}};if(!L)return null;let ae="";const se=!w&&!$&&!A&&o.trim().length>=2&&I.length===0,G=w&&I.length===0&&o.trim().length>=2&&!A,oe=o.trim(),le=()=>{R(!1);const e=o;F(""),setTimeout(()=>F(e),0)},ge={position:"fixed",inset:0,background:"color-mix(in srgb, var(--color-ink, #191919) 35%, transparent)",backdropFilter:"blur(6px) saturate(1.1)",WebkitBackdropFilter:"blur(6px) saturate(1.1)"},he={position:"relative",width:"100%",maxWidth:640,margin:"0 16px",background:"var(--bg-surface, #FFFFFF)",color:"var(--text-primary, #191919)",borderRadius:12,border:"1px solid var(--color-rule, #E8E1D6)",boxShadow:"0 1px 0 rgba(255,255,255,0.6) inset,0 24px 60px -12px rgba(25,20,15,0.28),0 12px 24px -8px rgba(25,20,15,0.18)",overflow:"hidden",fontFamily:Y};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(18vh, 144px)"},onClick:()=>E(!1),children:[t.jsx("div",{style:ge}),t.jsx("style",{children:`
2
2
  @keyframes fsp-pulse {
3
3
  0%, 100% { opacity: 1; }
4
4
  50% { opacity: 0.45; }
@@ -0,0 +1 @@
1
+ import{j as t,r as c}from"./globals-DmzftdEG.js";import{g as pe,a as G,T as ge,I as ye,s as he}from"./main-DIkxEshL.js";import{s as V}from"./skill-url-C4ekwoGs.js";import"./useDesktopBridge-C8dT34x9.js";/* empty css */const X={T0:{label:"BLOCKED",cssVar:"var(--trust-t0)"},T1:{label:"UNSCANNED",cssVar:"var(--trust-t1)"},T2:{label:"BASIC",cssVar:"var(--trust-t2)"},T3:{label:"VERIFIED",cssVar:"var(--trust-t3)"},T4:{label:"CERTIFIED",cssVar:"var(--trust-t4)"}};function xe({tier:r}){const l=X[r]??X.T1;return t.jsxs("span",{"data-testid":"trust-badge","data-tier":r,style:{display:"inline-flex",alignItems:"center",gap:"0.3rem",padding:"0.15rem 0.5rem",borderRadius:"4px",fontFamily:"var(--font-geist-mono)",fontSize:"0.6875rem",fontWeight:600,letterSpacing:"0.03em",textTransform:"uppercase",whiteSpace:"nowrap",color:l.cssVar,backgroundColor:`color-mix(in srgb, ${l.cssVar} 10%, transparent)`,border:`1px solid color-mix(in srgb, ${l.cssVar} 25%, transparent)`,lineHeight:1,height:"22px"},children:[r," ",l.label]})}const ve=/^https?:\/\/github\.com\/([a-zA-Z0-9_.-]+)\/([a-zA-Z0-9_.-]+?)(\.git)?(\/.*)?$/;function be(r){var s,b;const a=r.trim().match(ve);if(!a)return null;const p=(s=a[1])==null?void 0:s.toLowerCase();let u=(b=a[2])==null?void 0:b.toLowerCase();if(!p||!u)return null;u=u.replace(/\.git$/,"");const f=`https://github.com/${p}/${u}`;return{owner:p,name:u,url:f}}function ke(r){return r?r.trim().split("/").map(a=>a.trim()).filter(Boolean).at(-1)??null:null}function Ee(r,l,a){const p=ke(a);return p?`https://verified-skill.com/skills/${[r,l,p].map(encodeURIComponent).join("/")}`:null}function je({repoUrl:r,skillName:l,mono:a="var(--font-geist-mono)",fontSize:p="0.75rem",showPlaceholder:u=!0}){if(!r)return u?t.jsx("span",{style:{color:"var(--text-faint)",fontSize:p},children:"--"}):null;const f=be(r);return f?t.jsxs("a",{"data-testid":"repo-link",href:Ee(f.owner,f.name,l)??f.url,target:"_blank",rel:"noopener noreferrer",onClick:s=>s.stopPropagation(),style:{color:"#0D9488",textDecoration:"none",fontSize:p,fontFamily:a},children:[f.owner,"/",f.name]}):t.jsx("span",{style:{color:"var(--text-faint)",fontSize:p,fontFamily:a},children:r})}const we="var(--font-geist-mono)",$e={ONLINE:"var(--status-success-text)",OFFLINE:"var(--status-danger-text)",STALE:"var(--status-neutral-text)"},Se={ONLINE:"var(--status-success-bg)",OFFLINE:"var(--status-danger-bg)",STALE:"var(--status-neutral-bg)"};function Fe({skillName:r,repoUrl:l}){const[a,p]=c.useState(null),[u,f]=c.useState(!1);if(c.useEffect(()=>{l&&(f(!0),fetch(V(r,"repo-health")).then(k=>{if(!k.ok)throw new Error("fetch failed");return k.json()}).then(k=>{p(k.status),f(!1)}).catch(()=>{p(null),f(!1)}))},[r,l]),!l)return null;if(u)return t.jsx("span",{"data-testid":"repo-health-loading",style:{display:"inline-block",width:56,height:20,borderRadius:"4px",backgroundColor:"color-mix(in srgb, var(--text-faint) 20%, transparent)",animation:"pulse 1.5s ease-in-out infinite"}});if(!a||a==="UNKNOWN")return null;const s=$e[a]??"var(--status-neutral-text)",b=Se[a]??"var(--status-neutral-bg)";return t.jsx("span",{"data-testid":"repo-health-badge",style:{fontFamily:we,fontSize:"0.75rem",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.03em",padding:"0.2rem 0.6rem",borderRadius:"999px",backgroundColor:b,color:s,whiteSpace:"nowrap"},children:a})}function Ie({children:r,compact:l}){return t.jsx("pre",{"data-testid":"terminal-block",style:{background:"var(--bg-code, #161B22)",color:"#E6EDF3",fontFamily:"var(--font-geist-mono)",fontSize:l?"0.8rem":"0.875rem",lineHeight:1.6,padding:l?"1rem 1.25rem":"1.5rem 2rem",borderRadius:"6px",overflowX:"auto",margin:0},children:r})}const Te="/api/v1/studio/telemetry/install-copy",Ae=/^[a-zA-Z0-9._@/-]+$/,Re=/^[a-zA-Z0-9._-]+$/,Ce="https://verified-skill.com";function De(r){return`${r.owner}/${r.repo}/${r.slug}`}function Le(r,l){return r!=null&&r.ownerSlug&&(r!=null&&r.repoSlug)?`${r.ownerSlug}/${r.repoSlug}`:r!=null&&r.publisher?r.publisher:`${l.owner}/${l.repo}`}function Be(r){return r==="user"?" --global":` --scope ${r}`}function ze(r){return r==="user"?"User":"Project"}function Ve(r,l,a,p){const u=a?`${r}/${l}@${a}`:`${r}/${l}`;if(!Ae.test(`${r}/${l}`))return{ok:!1,reason:"Invalid skill identifier"};if(a&&!Re.test(a))return{ok:!1,reason:"Invalid version identifier"};const f=Be(p),s=`npx vskill@latest install ${u}${f}`,b=[{label:"npm",comment:"# npm",command:s},{label:"bun",comment:"# bun",command:`bunx vskill@latest install ${u}${f}`},{label:"pnpm",comment:"# pnpm",command:`pnpx vskill@latest install ${u}${f}`},{label:"yarn",comment:"# yarn",command:`yarn dlx vskill@latest install ${u}${f}`},{label:"alternative",comment:"# alternative (publisher + --skill flag)",command:a?`npx vskill@latest install ${r}@${a} --skill ${l}${f}`:`npx vskill@latest install ${r} --skill ${l}${f}`}];return{ok:!0,command:s,variants:b}}function I(r,l,a){typeof window>"u"||window.dispatchEvent(new CustomEvent("studio:toast",{detail:{message:r,kind:l,durationMs:a,severity:l==="error"?"error":"info"}}))}async function Y(r){var l;if(typeof navigator<"u"&&((l=navigator.clipboard)!=null&&l.writeText))try{return await navigator.clipboard.writeText(r),!0}catch{}if(typeof document>"u")return!1;try{const a=document.createElement("textarea");a.value=r,a.setAttribute("readonly",""),a.style.position="fixed",a.style.left="-9999px",document.body.appendChild(a),a.select();const p=document.execCommand("copy");return document.body.removeChild(a),p}catch{return!1}}function Z(r,l){he(r,l)}function We({selectedSkill:r,onClose:l,activeAgentId:a,telemetryInstallCopyUrl:p=Te,onToast:u,onSkillsChanged:f}){const[s,b]=c.useState(null),[k,Q]=c.useState([]),[J,ee]=c.useState(!1),[te,re]=c.useState(null),[T,A]=c.useState(!0),[R,N]=c.useState(null),[x,O]=c.useState(null),[E,ne]=c.useState("project"),[v,C]=c.useState(null),[U,se]=c.useState(0),[D,_]=c.useState(!1),M=c.useRef(null),W=c.useRef(null),P=c.useRef(null),K=c.useRef(!1),y=De(r),oe=a===void 0?pe("activeAgent",null):a;c.useEffect(()=>{K.current=D},[D]),c.useEffect(()=>(P.current=document.activeElement??null,()=>{const e=P.current;if(e&&typeof e.focus=="function")try{e.focus()}catch{}}),[]),c.useEffect(()=>{const e=setTimeout(()=>{var n;return(n=W.current)==null?void 0:n.focus()},50);return()=>clearTimeout(e)},[]),c.useEffect(()=>{let e=!1;A(!0),N(null);const n=V(y),d=V(y,"versions");return Promise.all([fetch(n).then(async o=>{if(!o.ok)throw new Error(`metadata ${o.status}`);return o.json()}),fetch(d).then(async o=>{if(!o.ok)throw new Error(`versions ${o.status}`);const i=await o.json(),m=Array.isArray(i)?i:(i==null?void 0:i.versions)??[],h=!Array.isArray(i)&&(i==null?void 0:i.unversioned)===!0,w=!Array.isArray(i)&&typeof(i==null?void 0:i.currentVersion)=="string"?i.currentVersion:null;return{list:m,unversioned:h,currentVersion:w}})]).then(([o,i])=>{if(e)return;b(o),Q(i.list),ee(i.unversioned),re(i.currentVersion);const m=i.list.find(h=>h.isLatest)??i.list[0]??null;O(m?m.version:null),A(!1)}).catch(o=>{e||(N(o instanceof Error?o.message:String(o)),A(!1))}),()=>{e=!0}},[y,U]),c.useEffect(()=>{let e=!1;return G.getSkillInstallState(y).then(n=>{e||C(n)},()=>{if(!e){try{const n="vskill:installState:warned";typeof sessionStorage<"u"&&!sessionStorage.getItem(n)&&(sessionStorage.setItem(n,"1"),console.warn("[SkillDetailPanel] install-state fetch failed; falling back to optimistic not-installed UX"))}catch{}C(null)}}),()=>{e=!0}},[y,U]),c.useEffect(()=>{if(typeof window>"u")return;let e=null;const n=d=>{const o=d.detail;!(o!=null&&o.skill)||o.skill!==y||(e&&clearTimeout(e),e=setTimeout(()=>{G.getSkillInstallState(y).then(i=>C(i),()=>{})},50))};return window.addEventListener("studio:skill-installed",n),()=>{e&&clearTimeout(e),window.removeEventListener("studio:skill-installed",n)}},[y]),c.useEffect(()=>{function e(n){if(!(K.current||typeof document<"u"&&document.querySelector("[data-testid='settings-modal'], [data-testid='install-targets-modal'], [data-testid='clipboard-export-dialog']"))){if(n.key==="Escape")n.stopPropagation(),L();else if(n.key==="Tab"){const o=M.current;if(!o)return;const i=o.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])');if(i.length===0)return;const m=i[0],h=i[i.length-1],w=document.activeElement;n.shiftKey&&w===m?(n.preventDefault(),h.focus()):!n.shiftKey&&w===h&&(n.preventDefault(),m.focus())}}}return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[]);const L=c.useCallback(()=>{l();let e="";try{typeof window<"u"&&window.sessionStorage&&(e=window.sessionStorage.getItem("find-skills:last-query")??"")}catch{}typeof window<"u"&&window.dispatchEvent(new CustomEvent("openFindSkills",{detail:{query:e}}))},[l]),$=Le(s,r),j=(s==null?void 0:s.skillSlug)??r.slug,S=(s==null?void 0:s.displayName)??r.displayName??j,le=(s==null?void 0:s.isBlocked)===!0,F=c.useMemo(()=>k.length===0?[]:[...k].sort((n,d)=>{const o=n.publishedAt?Date.parse(n.publishedAt):0;return(d.publishedAt?Date.parse(d.publishedAt):0)-o}).slice(0,5),[k]),B=c.useMemo(()=>!x||F.length===0?!0:F[0].version===x,[x,F]),g=c.useMemo(()=>x?Ve($,j,B?null:x,E):null,[$,j,x,B,E]);c.useCallback(async()=>{if(!g||!g.ok)return;const e=await Y(g.command);Z(p,{skillName:y,version:x??"",q:"",ts:Date.now()});const n=e?`Run ${g.command} in your terminal`:"Copy failed — please copy the command manually.";if(u)try{u(n,e?"success":"error")}catch{}else I(n,e?"success":"error",3500)},[g,p,y,x,$,j,B,u]);const ie=c.useCallback(()=>{!g||!g.ok||_(!0)},[g]),ae=c.useCallback(e=>{const n=e.filter(m=>m.status==="error");if(e.some(m=>m.status==="installed")&&(f==null||f()),n.length>0){const m=n[0],h=`Install finished with ${n.length} error${n.length===1?"":"s"}: ${m.detail??m.agentId}`;if(u)try{u(h,"error")}catch{}else I(h,"error",0);return}const d=e.filter(m=>m.status==="installed").length,o=e.filter(m=>m.status==="exported").length;if(d===0&&o===0){const m="Install finished without writing any selected target. Check the selected tool and try again.";if(u)try{u(m,"error")}catch{}else I(m,"error",0);return}if(typeof window<"u")try{window.dispatchEvent(new CustomEvent("studio:skill-installed",{detail:{skill:`${$}/${j}`,scope:E}}))}catch{}const i=o>0?`Installed ${S}; ${o} target${o===1?"":"s"} need paste.`:`Installed ${S} to ${d} target${d===1?"":"s"}.`;if(u)try{u(i,"success")}catch{}else I(i,"success",5e3)},[$,j,E,S,u,f]),de=(s==null?void 0:s.trustTier)??"T1",ce=(s==null?void 0:s.certTier)==="CERTIFIED"||(s==null?void 0:s.certTier)==="VERIFIED"?s.certTier:"VERIFIED";return t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:M,"data-testid":"skill-detail-panel",role:"dialog","aria-modal":"true","aria-label":`Skill detail — ${S}`,style:{position:"fixed",inset:0,zIndex:9998,display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"min(10vh, 80px)"},onClick:e=>{e.target===e.currentTarget&&L()},children:[t.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.4)",backdropFilter:"blur(4px)"}}),t.jsxs("div",{onClick:e=>e.stopPropagation(),style:{position:"relative",width:"100%",maxWidth:720,margin:"0 1rem",background:"var(--bg-surface, #FFFFFF)",color:"var(--text-primary, #191919)",borderRadius:"8px",border:"1px solid var(--color-rule, #E8E1D6)",boxShadow:"0 20px 60px rgba(0,0,0,0.15)",overflow:"hidden",maxHeight:"80vh",display:"flex",flexDirection:"column"},children:[t.jsxs("div",{style:{padding:"0.75rem 1rem",borderBottom:"1px solid var(--color-rule, #E8E1D6)",display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0},children:[t.jsx("button",{ref:W,type:"button",onClick:L,"data-testid":"skill-detail-back",style:{background:"transparent",border:"none",padding:"4px 8px",borderRadius:4,cursor:"pointer",fontFamily:"var(--font-mono, monospace)",fontSize:12,color:"var(--text-secondary, #5A5651)"},children:"← Back to results"}),t.jsx("kbd",{style:{fontFamily:"var(--font-mono, monospace)",fontSize:11,color:"var(--text-secondary, #5A5651)",border:"1px solid var(--color-rule, #E8E1D6)",borderRadius:4,padding:"1px 5px"},children:"Esc"})]}),t.jsxs("div",{style:{overflowY:"auto",padding:"1rem",flex:1},children:[T&&t.jsx("div",{"data-testid":"skill-detail-loading",style:{padding:"2rem",textAlign:"center",color:"var(--text-secondary, #5A5651)"},children:"Loading…"}),R&&!T&&t.jsxs("div",{"data-testid":"skill-detail-error",style:{padding:"1.5rem",textAlign:"center",fontFamily:"var(--font-mono, monospace)",fontSize:"0.875rem",color:"var(--red, #b54444)"},children:[t.jsxs("div",{style:{marginBottom:"0.75rem"},children:["Failed to load skill: ",R]}),t.jsx("button",{"data-testid":"skill-detail-retry",onClick:()=>se(e=>e+1),style:{fontFamily:"var(--font-mono, monospace)",fontSize:"0.8125rem",padding:"0.4rem 1rem",borderRadius:4,border:"1px solid var(--color-rule, #E8E1D6)",background:"transparent",color:"var(--text-primary, #191919)",cursor:"pointer"},children:"Retry"})]}),!T&&!R&&t.jsxs(t.Fragment,{children:[t.jsxs("section",{"data-testid":"skill-detail-hero",style:{marginBottom:"1.25rem"},children:[t.jsx("h2",{style:{margin:"0 0 0.5rem",fontSize:"1.25rem",fontWeight:600},children:S}),(s==null?void 0:s.description)&&t.jsx("p",{style:{margin:"0 0 0.75rem",color:"var(--text-secondary, #5A5651)",fontSize:"0.875rem",lineHeight:1.5},children:s.description}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"0.5rem",alignItems:"center"},children:[t.jsx(xe,{tier:de}),t.jsx(ge,{tier:ce,isTainted:s==null?void 0:s.isTainted}),t.jsx(je,{repoUrl:(s==null?void 0:s.repoUrl)??null,skillName:j}),t.jsx(Fe,{skillName:y,repoUrl:s==null?void 0:s.repoUrl})]})]}),t.jsxs("section",{"data-testid":"skill-detail-versions",style:{marginBottom:"1.25rem"},children:[t.jsx("h3",{style:{margin:"0 0 0.5rem",fontSize:"0.8125rem",textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--text-secondary, #5A5651)"},children:"Versions"}),F.length===0?J?t.jsxs("div",{"data-testid":"skill-detail-unversioned",style:{color:"var(--text-secondary, #5A5651)",fontSize:"0.8125rem"},children:["Discovered — no published version yet (currentVersion: ",te??"unknown",")."]}):t.jsx("div",{"data-testid":"skill-detail-no-versions",style:{color:"var(--text-secondary, #5A5651)",fontSize:"0.8125rem"},children:"No versions found."}):t.jsx("ul",{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:4},children:F.map(e=>{const n=e.version===x,d=e.publishedAt?e.publishedAt.slice(0,10):"",o=e.authorEmail??e.author??"";return t.jsx("li",{children:t.jsxs("button",{type:"button","data-testid":"skill-detail-version-row","data-version":e.version,"data-selected":n?"true":"false","aria-pressed":n,onClick:()=>O(e.version),style:{width:"100%",textAlign:"left",padding:"0.5rem 0.75rem",borderRadius:4,border:n?"1px solid var(--color-action, #2F5B8E)":"1px solid var(--color-rule, #E8E1D6)",background:n?"color-mix(in srgb, var(--color-action, #2F5B8E) 8%, transparent)":"transparent",cursor:"pointer",fontFamily:"var(--font-mono, monospace)",fontSize:"0.8125rem",color:"var(--text-primary, #191919)",display:"flex",alignItems:"center",gap:"0.5rem"},children:[t.jsx("span",{"aria-hidden":"true",style:{width:14,display:"inline-flex",justifyContent:"center"},children:n?"●":"○"}),t.jsxs("span",{style:{fontWeight:600},children:["v",e.version]}),d&&t.jsxs("span",{style:{color:"var(--text-secondary, #5A5651)"},children:["· ",d]}),o&&t.jsxs("span",{style:{color:"var(--text-secondary, #5A5651)"},children:["· ",o]}),n&&t.jsx("span",{"data-testid":"skill-detail-version-selected-tag",style:{marginLeft:"auto",fontSize:"0.6875rem",color:"var(--color-action, #2F5B8E)"},children:"Selected"})]})},e.version)})}),t.jsx("div",{style:{marginTop:"0.5rem",textAlign:"right"},children:t.jsx("a",{"data-testid":"skill-detail-see-all-versions",href:`${Ce}/skills/${r.owner}/${r.repo}/${r.slug}/versions`,target:"_blank",rel:"noopener noreferrer",style:{fontFamily:"var(--font-mono, monospace)",fontSize:"0.75rem",color:"var(--color-action, #2F5B8E)",textDecoration:"none"},children:"see all versions →"})})]}),le?t.jsxs("section",{"data-testid":"skill-detail-blocked",style:{marginBottom:"0.5rem"},children:[t.jsx("h3",{style:{margin:"0 0 0.5rem",fontSize:"0.8125rem",textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--red, #b54444)"},children:"This skill is blocked"}),t.jsx("div",{style:{padding:"1rem",borderRadius:6,border:"1px solid var(--red, #b54444)",background:"var(--red-muted, color-mix(in srgb, #b54444 18%, transparent))",color:"var(--red, #b54444)",fontSize:"0.875rem"},children:(s==null?void 0:s.blockReason)??"This skill has been blocked by platform moderators and cannot be installed."})]}):g&&!g.ok?t.jsxs("section",{"data-testid":"skill-detail-install-error",style:{marginBottom:"0.5rem"},children:[t.jsx("h3",{style:{margin:"0 0 0.5rem",fontSize:"0.8125rem",textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--red, #b54444)"},children:"Install command unavailable"}),t.jsxs("div",{style:{padding:"1rem",borderRadius:6,border:"1px solid var(--red, #b54444)",background:"var(--red-muted, color-mix(in srgb, #b54444 18%, transparent))",color:"var(--red, #b54444)",fontSize:"0.875rem"},children:[g.reason," — refusing to render the install panel for safety."]})]}):g&&g.ok?t.jsxs("section",{"data-testid":"skill-detail-install",style:{marginBottom:"0.5rem"},children:[t.jsx("h3",{style:{margin:"0 0 0.5rem",fontSize:"0.8125rem",textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--text-secondary, #5A5651)"},children:"Install"}),t.jsxs("div",{role:"radiogroup","aria-label":"Install scope","data-testid":"skill-detail-install-scope",style:{display:"flex",gap:"0.5rem",alignItems:"center",marginBottom:"0.75rem",fontFamily:"var(--font-mono, monospace)",fontSize:"0.75rem",color:"var(--text-secondary, #5A5651)"},children:[t.jsx("span",{children:"Scope:"}),["project","user"].map(e=>{var H;const n=E===e,d=(H=v==null?void 0:v.scopes)==null?void 0:H[e],o=(d==null?void 0:d.installed)===!0,i=(v==null?void 0:v.detectedAgentTools)??[],m=i.map(z=>`./${z.localDir}`).join(", "),h=i.map(z=>z.globalDir).join(", "),w=(d==null?void 0:d.installedAgentTools)??[],ue=d!=null&&d.version?`Installed v${d.version} · ${w.join(", ")}`:`Installed · ${w.join(", ")}`,fe=e==="project"?m?`Will install to: ${m}`:"Install with --scope project":h?`Will install to: ${h}`:"Install with --global",me=o?ue:fe,q=ze(e);return t.jsx("button",{type:"button",role:"radio","aria-checked":n,"aria-disabled":o,disabled:o,"data-testid":`skill-detail-install-scope-${e}`,"data-installed":o?"true":"false",title:me,onClick:()=>{o||ne(e)},style:{padding:"0.25rem 0.6rem",borderRadius:4,border:`1px solid ${n?"var(--text-primary, #191919)":"var(--color-rule, #E8E1D6)"}`,background:n?"var(--text-primary, #191919)":"transparent",color:n?"var(--bg-surface, #FFFFFF)":"var(--text-secondary, #5A5651)",cursor:o?"not-allowed":"pointer",opacity:o?.55:1,fontFamily:"var(--font-mono, monospace)",fontSize:"0.75rem",fontWeight:n?600:400},children:o?`Installed ✓ ${q}`:q},e)})]}),(()=>{var i;const e=(i=v==null?void 0:v.scopes)==null?void 0:i[E],n=(e==null?void 0:e.installed)===!0,d=e!=null&&e.version?` (v${e.version})`:"",o=`Already installed at ${E} — re-run via CLI to force`;return t.jsx("button",{type:"button",onClick:ie,disabled:n,"aria-disabled":n,"data-testid":"skill-detail-install-primary","data-installed":n?"true":"false","aria-label":n?"Already installed at the selected scope":"Install skill",title:n?o:void 0,style:{display:"inline-flex",alignItems:"center",marginBottom:"0.75rem",padding:"0.5rem 1rem",borderRadius:6,border:"1px solid var(--text-primary, #191919)",background:n?"var(--bg-surface, #FFFFFF)":"var(--text-primary, #191919)",color:n?"var(--text-secondary, #5A5651)":"var(--bg-surface, #FFFFFF)",cursor:n?"not-allowed":"pointer",opacity:n?.7:1,fontFamily:"var(--font-mono, monospace)",fontSize:"0.875rem",fontWeight:600},children:n?`✓ Installed${d}`:"Install"})})(),t.jsx("div",{"data-testid":"skill-detail-install-command",style:{display:"block"},children:t.jsx(Ie,{compact:!0,children:g.variants.map((e,n)=>t.jsxs("div",{"data-testid":`skill-detail-install-variant-${e.label}`,style:{display:"flex",gap:"0.75rem",alignItems:"flex-start",marginTop:n===0?0:"0.75rem"},children:[t.jsxs("div",{style:{flex:1,minWidth:0},children:[t.jsx("div",{style:{color:"#8B949E",marginBottom:"0.125rem"},children:e.comment}),t.jsxs("div",{children:[t.jsx("span",{style:{color:"#8B949E",marginRight:"0.5rem"},children:"$"}),t.jsx("span",{"data-testid":`skill-detail-install-variant-cmd-${e.label}`,children:e.command})]})]}),t.jsx("button",{type:"button",onClick:async()=>{const d=await Y(e.command),o=d?`Run ${e.command} in your terminal`:"Copy failed — please copy the command manually.";if(u)try{u(o,d?"success":"error")}catch{}else I(o,d?"success":"error",3500);d&&Z(p,{skillName:y,version:x??"",q:"",ts:Date.now()})},"data-testid":`skill-detail-copy-${e.label}`,"aria-label":`Copy ${e.label} install command`,style:{flexShrink:0,padding:"0.25rem 0.6rem",borderRadius:4,border:"1px solid color-mix(in srgb, #E6EDF3 25%, transparent)",background:"color-mix(in srgb, #E6EDF3 8%, transparent)",color:"#E6EDF3",cursor:"pointer",fontFamily:"var(--font-mono, monospace)",fontSize:"0.7rem",alignSelf:"flex-end"},children:"Copy"})]},e.label))})})]}):null]})]})]})]}),D&&t.jsx(ye,{skill:`${$}/${j}`,skillDisplayName:S,scope:E,targetVersion:x,activeAgentId:oe,onClose:()=>_(!1),onSuccess:ae,onRemoved:f})]})}export{We as SkillDetailPanel,We as default};
@@ -1 +1 @@
1
- import{r as v,j as a}from"./globals-DmzftdEG.js";import{f as N,b as E,a as L}from"./main-C30fpcFP.js";import"./useDesktopBridge-Cm4zPght.js";/* empty css */function M(l,d){const[c,u]=l.split("."),[w,f]=d.split("."),r=Number(c),m=Number(u),p=Number(w),y=Number(f);return!Number.isFinite(r)||!Number.isFinite(p)?(console.warn(`[semverBump] unparseable version: installed=${l} latest=${d}`),"patch"):p>r?"major":!Number.isFinite(m)||!Number.isFinite(y)?(console.warn(`[semverBump] unparseable minor: installed=${l} latest=${d}`),"patch"):y>m?"minor":"patch"}const F={major:{bg:"var(--red-muted)",text:"var(--red)"},minor:{bg:"var(--yellow-muted)",text:"var(--yellow)"},patch:{bg:"var(--green-muted)",text:"var(--green)"}},z=["project","personal","plugin"];function D(l,d={}){if(l.length===0)return"No tracked install — click to view details";const c=l.filter(n=>!n.readonly),u=l.filter(n=>n.readonly);if(c.length===0)return"Plugin-bundled — Update via plugin to refresh";const f=z.filter(n=>c.some(x=>x.scope===n)).join(" + "),m=Array.from(new Set(c.map(n=>n.agentLabel))).sort((n,x)=>n.localeCompare(x)).join(", "),p=c.length;let i=`Updates ${p} ${p===1?"location":"locations"}: ${f} (${m})`;if(d.pinned)return i+=" — pinned (skipped)",i;if(u.length>0){const n=Array.from(new Set(u.map(x=>x.pluginSlug??"?")));n.length===1&&n[0]!=="?"?i+=` — ${u.length} from plugin ${n[0]} (handled separately)`:i+=` — ${u.length} plugin-bundled (handled separately)`}return i}function P({updates:l,isRefreshing:d,onRefresh:c,onSelectSkill:u,onViewAll:w,onClose:f,anchorRef:r,diffSummariesById:m}){const p=v.useRef(null),y=v.useRef(null);v.useEffect(()=>{var e;(e=y.current)==null||e.focus()},[]),v.useEffect(()=>{function e(s){p.current&&(p.current.contains(s.target)||r!=null&&r.current&&r.current.contains(s.target)||f())}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[f,r]),v.useEffect(()=>{function e(s){var g;s.key==="Escape"&&(s.preventDefault(),f(),(g=r==null?void 0:r.current)==null||g.focus())}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[f,r]);const i=l.filter(e=>e.updateAvailable),{toast:n}=N(),{onSkillUpdated:x}=E(),[j,k]=v.useState(()=>new Set);async function $(e){const s=e.installLocations??[],g=s.filter(t=>!t.readonly);if(s.length>0&&g.length===0){const t=s[0].pluginSlug??"the plugin";n({severity:"info",message:`This skill came from plugin ${t}. Update the plugin to refresh it.`});return}if(!j.has(e.name)){k(t=>{const o=new Set(t);return o.add(e.name),o});try{const t=e.name.split("/"),o=e.localPlugin??(t.length>=2?t[t.length-2]:t[0]),b=e.localSkill??t[t.length-1],h=await L.postSkillUpdate(o,b);if(h.ok){const S=g.length||1,U=S===1?"location":"locations";x(o,b),n({severity:"success",message:`Updated ${b} in ${S} ${U}.`,durationMs:4e3})}else n({severity:"error",message:`Couldn't update ${b} — HTTP ${h.status}`,durationMs:0})}catch(t){const o=t instanceof Error?t.message:"Network error";n({severity:"error",message:`Update failed: ${o}`,durationMs:0})}finally{k(t=>{const o=new Set(t);return o.delete(e.name),o})}}}return a.jsxs("div",{ref:p,role:"dialog","aria-modal":"false","aria-label":"Skill update summary","data-testid":"update-dropdown",style:{position:"absolute",top:"calc(100% + 6px)",right:0,width:440,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:[a.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"2px 4px 6px",borderBottom:"1px solid var(--border-default)"},children:[a.jsx("span",{style:{fontSize:12,fontWeight:600,color:"var(--text-primary)"},children:i.length===0?"No updates available":`${i.length} updates available`}),a.jsx("button",{type:"button","data-testid":"update-dropdown-refresh",onClick:c,disabled:d,style:{background:"transparent",border:"none",color:"var(--text-secondary)",fontSize:11,fontFamily:"var(--font-mono)",cursor:d?"not-allowed":"pointer",padding:"2px 6px"},children:d?"Refreshing…":"Refresh"})]}),i.length>0?a.jsx("ul",{role:"list",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:2},children:i.map((e,s)=>{const g=e.latest?M(e.installed,e.latest):"patch",t=F[g],o=m==null?void 0:m.get(e.name),b=D(e.installLocations??[],{pinned:e.pinned??!1}),h=j.has(e.name);return a.jsxs("li",{style:{margin:0,display:"flex",alignItems:"stretch",gap:4},children:[a.jsxs("button",{ref:s===0?y:void 0,type:"button","data-testid":"update-dropdown-row","data-skill-name":e.name,onClick:()=>u(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:[a.jsx("span",{"aria-hidden":"true","data-testid":"update-dropdown-bump-dot","data-bump":g,style:{width:8,height:8,borderRadius:"50%",background:t.text,flexShrink:0,marginTop:4}}),a.jsxs("span",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0,flex:1},children:[a.jsxs("span",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0},children:[a.jsx("span",{style:{minWidth:0,flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),a.jsxs("span",{style:{fontFamily:"var(--font-mono)",fontSize:10,color:"var(--text-secondary)",fontVariantNumeric:"tabular-nums"},children:[e.installed," → ",e.latest??"?"]})]}),o&&a.jsx("span",{"data-testid":"update-dropdown-diff-summary",style:{fontSize:11,color:"var(--text-secondary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o})]})]}),a.jsx("button",{type:"button","data-testid":"update-dropdown-row-update","data-skill-name":e.name,title:b,onClick:()=>{$(e)},disabled:h,style:{flexShrink:0,padding:"0 10px",background:"var(--color-ink)",color:"var(--color-paper)",border:"none",borderRadius:4,cursor:h?"not-allowed":"pointer",fontFamily:"var(--font-sans)",fontSize:11,fontWeight:500},children:h?"Updating…":"Update"})]},e.name)})}):a.jsx("div",{style:{padding:"12px 4px",fontSize:12,color:"var(--text-secondary)"},children:"All installed skills are up to date."}),a.jsx("div",{style:{display:"flex",justifyContent:"flex-end",padding:"4px 4px 0",borderTop:"1px solid var(--border-default)",marginTop:2},children:a.jsx("button",{type:"button","data-testid":"update-dropdown-view-all",onClick:w,style:{background:"transparent",border:"none",color:"var(--text-secondary)",fontSize:11,fontFamily:"var(--font-sans)",cursor:"pointer",padding:"4px 6px"},children:"View all"})})]})}export{P as default};
1
+ import{r as v,j as a}from"./globals-DmzftdEG.js";import{f as N,b as E,a as L}from"./main-DIkxEshL.js";import"./useDesktopBridge-C8dT34x9.js";/* empty css */function M(l,d){const[c,u]=l.split("."),[w,f]=d.split("."),r=Number(c),m=Number(u),p=Number(w),y=Number(f);return!Number.isFinite(r)||!Number.isFinite(p)?(console.warn(`[semverBump] unparseable version: installed=${l} latest=${d}`),"patch"):p>r?"major":!Number.isFinite(m)||!Number.isFinite(y)?(console.warn(`[semverBump] unparseable minor: installed=${l} latest=${d}`),"patch"):y>m?"minor":"patch"}const F={major:{bg:"var(--red-muted)",text:"var(--red)"},minor:{bg:"var(--yellow-muted)",text:"var(--yellow)"},patch:{bg:"var(--green-muted)",text:"var(--green)"}},z=["project","personal","plugin"];function D(l,d={}){if(l.length===0)return"No tracked install — click to view details";const c=l.filter(n=>!n.readonly),u=l.filter(n=>n.readonly);if(c.length===0)return"Plugin-bundled — Update via plugin to refresh";const f=z.filter(n=>c.some(x=>x.scope===n)).join(" + "),m=Array.from(new Set(c.map(n=>n.agentLabel))).sort((n,x)=>n.localeCompare(x)).join(", "),p=c.length;let i=`Updates ${p} ${p===1?"location":"locations"}: ${f} (${m})`;if(d.pinned)return i+=" — pinned (skipped)",i;if(u.length>0){const n=Array.from(new Set(u.map(x=>x.pluginSlug??"?")));n.length===1&&n[0]!=="?"?i+=` — ${u.length} from plugin ${n[0]} (handled separately)`:i+=` — ${u.length} plugin-bundled (handled separately)`}return i}function P({updates:l,isRefreshing:d,onRefresh:c,onSelectSkill:u,onViewAll:w,onClose:f,anchorRef:r,diffSummariesById:m}){const p=v.useRef(null),y=v.useRef(null);v.useEffect(()=>{var e;(e=y.current)==null||e.focus()},[]),v.useEffect(()=>{function e(s){p.current&&(p.current.contains(s.target)||r!=null&&r.current&&r.current.contains(s.target)||f())}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[f,r]),v.useEffect(()=>{function e(s){var g;s.key==="Escape"&&(s.preventDefault(),f(),(g=r==null?void 0:r.current)==null||g.focus())}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[f,r]);const i=l.filter(e=>e.updateAvailable),{toast:n}=N(),{onSkillUpdated:x}=E(),[j,k]=v.useState(()=>new Set);async function $(e){const s=e.installLocations??[],g=s.filter(t=>!t.readonly);if(s.length>0&&g.length===0){const t=s[0].pluginSlug??"the plugin";n({severity:"info",message:`This skill came from plugin ${t}. Update the plugin to refresh it.`});return}if(!j.has(e.name)){k(t=>{const o=new Set(t);return o.add(e.name),o});try{const t=e.name.split("/"),o=e.localPlugin??(t.length>=2?t[t.length-2]:t[0]),b=e.localSkill??t[t.length-1],h=await L.postSkillUpdate(o,b);if(h.ok){const S=g.length||1,U=S===1?"location":"locations";x(o,b),n({severity:"success",message:`Updated ${b} in ${S} ${U}.`,durationMs:4e3})}else n({severity:"error",message:`Couldn't update ${b} — HTTP ${h.status}`,durationMs:0})}catch(t){const o=t instanceof Error?t.message:"Network error";n({severity:"error",message:`Update failed: ${o}`,durationMs:0})}finally{k(t=>{const o=new Set(t);return o.delete(e.name),o})}}}return a.jsxs("div",{ref:p,role:"dialog","aria-modal":"false","aria-label":"Skill update summary","data-testid":"update-dropdown",style:{position:"absolute",top:"calc(100% + 6px)",right:0,width:440,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:[a.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"2px 4px 6px",borderBottom:"1px solid var(--border-default)"},children:[a.jsx("span",{style:{fontSize:12,fontWeight:600,color:"var(--text-primary)"},children:i.length===0?"No updates available":`${i.length} updates available`}),a.jsx("button",{type:"button","data-testid":"update-dropdown-refresh",onClick:c,disabled:d,style:{background:"transparent",border:"none",color:"var(--text-secondary)",fontSize:11,fontFamily:"var(--font-mono)",cursor:d?"not-allowed":"pointer",padding:"2px 6px"},children:d?"Refreshing…":"Refresh"})]}),i.length>0?a.jsx("ul",{role:"list",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:2},children:i.map((e,s)=>{const g=e.latest?M(e.installed,e.latest):"patch",t=F[g],o=m==null?void 0:m.get(e.name),b=D(e.installLocations??[],{pinned:e.pinned??!1}),h=j.has(e.name);return a.jsxs("li",{style:{margin:0,display:"flex",alignItems:"stretch",gap:4},children:[a.jsxs("button",{ref:s===0?y:void 0,type:"button","data-testid":"update-dropdown-row","data-skill-name":e.name,onClick:()=>u(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:[a.jsx("span",{"aria-hidden":"true","data-testid":"update-dropdown-bump-dot","data-bump":g,style:{width:8,height:8,borderRadius:"50%",background:t.text,flexShrink:0,marginTop:4}}),a.jsxs("span",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0,flex:1},children:[a.jsxs("span",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0},children:[a.jsx("span",{style:{minWidth:0,flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),a.jsxs("span",{style:{fontFamily:"var(--font-mono)",fontSize:10,color:"var(--text-secondary)",fontVariantNumeric:"tabular-nums"},children:[e.installed," → ",e.latest??"?"]})]}),o&&a.jsx("span",{"data-testid":"update-dropdown-diff-summary",style:{fontSize:11,color:"var(--text-secondary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o})]})]}),a.jsx("button",{type:"button","data-testid":"update-dropdown-row-update","data-skill-name":e.name,title:b,onClick:()=>{$(e)},disabled:h,style:{flexShrink:0,padding:"0 10px",background:"var(--color-ink)",color:"var(--color-paper)",border:"none",borderRadius:4,cursor:h?"not-allowed":"pointer",fontFamily:"var(--font-sans)",fontSize:11,fontWeight:500},children:h?"Updating…":"Update"})]},e.name)})}):a.jsx("div",{style:{padding:"12px 4px",fontSize:12,color:"var(--text-secondary)"},children:"All installed skills are up to date."}),a.jsx("div",{style:{display:"flex",justifyContent:"flex-end",padding:"4px 4px 0",borderTop:"1px solid var(--border-default)",marginTop:2},children:a.jsx("button",{type:"button","data-testid":"update-dropdown-view-all",onClick:w,style:{background:"transparent",border:"none",color:"var(--text-secondary)",fontSize:11,fontFamily:"var(--font-sans)",cursor:"pointer",padding:"4px 6px"},children:"View all"})})]})}export{P as default};
@@ -1 +1 @@
1
- import{r as o,j as e}from"./globals-DmzftdEG.js";import{u as M,C as T,S as N,F as C,a as q,T as O,D as Q}from"./preferences-BN-jNWS0.js";/* empty css */import"./useDesktopBridge-Cm4zPght.js";function G(s){if(!s)return null;const l=new Date(s).getTime();if(Number.isNaN(l))return s;const i=Date.now()-l;return i<6e4?"just now":i<36e5?`${Math.round(i/6e4)}m ago`:i<864e5?`${Math.round(i/36e5)}h ago`:new Date(s).toLocaleString()}function S(s){const l=s.toLowerCase();return l.includes("signature")||l.includes("verify")?"signature":l.includes("space")||l.includes("disk")?"disk":l.includes("network")||l.includes("fetch")||l.includes("connect")?"network":"unknown"}function X({bridge:s,snapshot:l,onSnapshotChanged:i,pushToast:u,triggerCheckNonce:j}){const{t}=M("preferences"),k=!s.available,[d,m]=o.useState("idle"),[g,B]=o.useState(null),[D,w]=o.useState(null),[x,y]=o.useState(null),[c,E]=o.useState(null),[n,p]=o.useState({open:!1,update:null,installState:"idle",progressBytes:0,totalBytes:null}),_=o.useRef(j??0);o.useEffect(()=>{let a=!1;return s.getAppMetadata().then(r=>{a||E(r)}).catch(()=>{}),()=>{a=!0}},[s]);const F=(l==null?void 0:l.updates.channel)??"stable",L=(l==null?void 0:l.updates.autoCheck)??!0,V=G(l==null?void 0:l.updates.lastCheckedAt),b=o.useCallback(async()=>{if(!(k||d==="checking")){m("checking"),w(null),y(null);try{const a=await s.checkForUpdates();B(a),a.available?(m("available"),p({open:!0,update:a,installState:"idle",progressBytes:0,totalBytes:null})):(m("up-to-date"),u({message:t("updates.upToDate"),variant:"success"})),await i()}catch(a){const r=a instanceof Error?a.message:String(a);m("error"),w(r),y(S(r))}}},[s,d,k,i,u,t]),R=o.useCallback(async a=>{try{await s.setSetting("updates.channel",a),await i(),a==="beta"&&u({message:t("updates.channel.betaUnavailable")})}catch{u({message:"Couldn't update channel.",variant:"error"})}},[s,i,u,t]),U=o.useCallback(async a=>{try{await s.setSetting("updates.autoCheck",a),await i()}catch{u({message:"Couldn't update auto-check.",variant:"error"})}},[s,i,u]),A=o.useCallback(async()=>{if(n.update){p(a=>({...a,installState:"preparing"}));try{await s.downloadAndInstallUpdate((a,r)=>{p(f=>({...f,installState:"downloading",progressBytes:a,totalBytes:r}))}),p(a=>({...a,installState:"ready-to-restart"}))}catch(a){const r=a instanceof Error?a.message:String(a),f=S(r);p(h=>({...h,open:!1,installState:"idle"})),m("error"),w(r),y(f)}}},[s,n.update]),I=o.useCallback(async()=>{var a;(a=n.update)!=null&&a.latestVersion&&(await s.setSetting("updates.skippedVersion",n.update.latestVersion),p(r=>({...r,open:!1})),await i())},[s,n.update,i]),$=o.useCallback(async()=>{const a=new Date(Date.now()+864e5).toISOString();await s.setSetting("updates.snoozedUntil",a),p(r=>({...r,open:!1})),await i()},[s,i]),z=o.useCallback(async()=>{try{await s.restartApp()}catch(a){const r=a instanceof Error?a.message:String(a);u({message:r||"Couldn't restart Skill Studio.",variant:"error"})}},[s,u]);o.useEffect(()=>{const a=j??0;a===0||a===_.current||(_.current=a,b())},[b,j]);const K=()=>{if(!n.open||!n.update)return null;const a=n.update,r=n.installState==="preparing"||n.installState==="downloading"||n.installState==="installing",f=n.installState==="ready-to-restart",h=n.totalBytes&&n.totalBytes>0?Math.min(100,Math.round(n.progressBytes/n.totalBytes*100)):null;return e.jsxs(Q,{open:n.open,onDismiss:()=>p(v=>({...v,open:!1})),ariaLabel:t("updates.dialog.title"),children:[e.jsx("h2",{className:"pref-dialog__title",children:t("updates.dialog.title")}),e.jsx("p",{className:"pref-dialog__body",children:t("updates.dialog.version",{version:a.latestVersion??"?"})}),e.jsxs("div",{children:[e.jsx("p",{className:"pref-row__label-text",style:{marginBottom:6},children:t("updates.dialog.releaseNotes")}),e.jsx("div",{className:"pref-dialog__release-notes",children:a.releaseNotes??t("updates.dialog.noReleaseNotes")})]}),r?e.jsxs("div",{className:"pref-progress",children:[e.jsx("div",{className:"pref-progress__bar",children:e.jsx("div",{className:"pref-progress__fill",style:{width:h===null?"30%":`${h}%`}})}),e.jsxs("span",{className:"pref-progress__text",children:[n.installState==="preparing"?t("updates.dialog.preparing"):t("updates.dialog.downloading"),h!==null?` (${h}%)`:null]})]}):null,e.jsx("div",{className:"pref-dialog__actions",children:f?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"pref-dialog__body",style:{marginRight:"auto"},children:t("updates.dialog.restartRequired")}),e.jsx("button",{type:"button",className:"pref-button",onClick:()=>p(v=>({...v,open:!1})),children:t("updates.dialog.onQuit")}),e.jsx("button",{type:"button",className:"pref-button pref-button--primary",onClick:z,children:t("updates.dialog.restartNow")})]}):r?e.jsx("button",{type:"button",className:"pref-button",onClick:()=>s.cancelUpdate().catch(()=>{}),children:t("updates.dialog.cancel")}):e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"pref-button",onClick:I,children:t("updates.dialog.skipVersion")}),e.jsx("button",{type:"button",className:"pref-button",onClick:$,children:t("updates.dialog.later")}),e.jsx("button",{type:"button",className:"pref-button pref-button--primary",onClick:A,children:t("updates.dialog.installNow")})]})})]})};return k?e.jsxs(e.Fragment,{children:[e.jsxs("header",{className:"preferences-content__heading",children:[e.jsx("h1",{children:t("updates.heading")}),e.jsx("p",{children:t("updates.subheading")})]}),e.jsxs(T,{variant:"info",children:[e.jsx("strong",{children:t("common.browserMode")}),e.jsx("span",{children:t("updates.browserCallout")}),e.jsx("a",{href:t("app.downloadUrl"),target:"_blank",rel:"noopener noreferrer",children:t("app.downloadLink")})]}),e.jsx(N,{title:t("updates.about.heading"),children:e.jsxs("div",{className:"pref-meta-row",children:[e.jsx("span",{className:"pref-meta-row__label",children:t("updates.currentVersion")}),e.jsx("span",{className:"pref-meta-row__value",children:"browser"})]})})]}):e.jsxs(e.Fragment,{children:[e.jsxs("header",{className:"preferences-content__heading",children:[e.jsx("h1",{children:t("updates.heading")}),e.jsx("p",{children:t("updates.subheading")})]}),e.jsxs(N,{title:t("updates.heading"),children:[e.jsxs("div",{className:"pref-meta-row",children:[e.jsx("span",{className:"pref-meta-row__label",children:t("updates.currentVersion")}),e.jsxs("span",{className:"pref-meta-row__value",children:[(c==null?void 0:c.version)??"(unknown)",c!=null&&c.build?` (${c.build})`:""]})]}),e.jsxs("div",{className:"pref-meta-row",children:[e.jsx("span",{className:"pref-meta-row__label",children:t("updates.lastChecked")}),e.jsx("span",{className:"pref-meta-row__value",children:V??t("updates.lastCheckedNever")})]}),e.jsx(C,{label:t("updates.channel.label"),help:t("updates.channel.help"),control:e.jsx(q,{ariaLabel:t("updates.channel.label"),value:F,onChange:R,options:[{value:"stable",label:t("updates.channel.stable")},{value:"beta",label:t("updates.channel.beta")}]})}),e.jsx(C,{label:t("updates.autoCheck.label"),help:t("updates.autoCheck.help"),control:e.jsx(O,{ariaLabel:t("updates.autoCheck.label"),checked:L,onChange:U})}),e.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center",marginTop:4},children:[e.jsx("button",{type:"button",className:"pref-button pref-button--primary",onClick:b,disabled:d==="checking",children:d==="checking"?e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[e.jsx("span",{className:"pref-spinner","aria-hidden":"true"}),t("updates.checking")]}):t("updates.checkNow")}),e.jsxs("div",{className:"pref-status-row","data-state":d==="up-to-date"?"success":d==="error"?"error":void 0,children:[d==="up-to-date"?t("updates.upToDate"):null,d==="available"&&(g!=null&&g.latestVersion)?e.jsx(e.Fragment,{children:t("updates.updateAvailable",{version:g.latestVersion})}):null,d==="error"&&x?e.jsx(e.Fragment,{children:x==="signature"?t("updates.errors.signature"):x==="disk"?t("updates.errors.diskSpace"):x==="network"?t("updates.errors.network"):D??"Unknown error"}):null]})]}),d==="error"?e.jsxs("div",{style:{display:"flex",gap:8,marginTop:4},children:[e.jsx("button",{type:"button",className:"pref-button",onClick:b,children:t("updates.errors.tryAgain")}),e.jsx("button",{type:"button",className:"pref-button",onClick:()=>s.openLogsFolder().catch(()=>{}),children:t("updates.errors.viewLogs")})]}):null]}),e.jsxs(N,{title:t("updates.about.heading"),children:[e.jsxs("div",{className:"pref-meta-row",children:[e.jsx("span",{className:"pref-meta-row__label",children:t("updates.about.build")}),e.jsx("span",{className:"pref-meta-row__value",children:(c==null?void 0:c.build)??"(unknown)"})]}),e.jsxs("div",{className:"pref-meta-row",children:[e.jsx("span",{className:"pref-meta-row__label",children:t("updates.about.commit")}),e.jsx("span",{className:"pref-meta-row__value",children:(c==null?void 0:c.commit)??"(unknown)"})]}),e.jsxs("ul",{className:"pref-link-list","aria-label":t("updates.about.heading"),children:[e.jsx("li",{children:e.jsx("a",{href:"https://verified-skill.com",target:"_blank",rel:"noopener noreferrer",children:t("updates.about.links.website")})}),e.jsx("li",{children:e.jsx("a",{href:"https://verified-skill.com/licenses",target:"_blank",rel:"noopener noreferrer",children:t("updates.about.links.openSource")})}),e.jsx("li",{children:e.jsx("a",{href:"https://verified-skill.com/acknowledgements",target:"_blank",rel:"noopener noreferrer",children:t("updates.about.links.acknowledgements")})})]})]}),K()]})}export{X as UpdatesTab};
1
+ import{r as o,j as e}from"./globals-DmzftdEG.js";import{u as M,C as T,S as N,F as C,a as q,T as O,D as Q}from"./preferences-VTBvoXmM.js";/* empty css */import"./useDesktopBridge-C8dT34x9.js";function G(s){if(!s)return null;const l=new Date(s).getTime();if(Number.isNaN(l))return s;const i=Date.now()-l;return i<6e4?"just now":i<36e5?`${Math.round(i/6e4)}m ago`:i<864e5?`${Math.round(i/36e5)}h ago`:new Date(s).toLocaleString()}function S(s){const l=s.toLowerCase();return l.includes("signature")||l.includes("verify")?"signature":l.includes("space")||l.includes("disk")?"disk":l.includes("network")||l.includes("fetch")||l.includes("connect")?"network":"unknown"}function X({bridge:s,snapshot:l,onSnapshotChanged:i,pushToast:u,triggerCheckNonce:j}){const{t}=M("preferences"),k=!s.available,[d,m]=o.useState("idle"),[g,B]=o.useState(null),[D,w]=o.useState(null),[x,y]=o.useState(null),[c,E]=o.useState(null),[n,p]=o.useState({open:!1,update:null,installState:"idle",progressBytes:0,totalBytes:null}),_=o.useRef(j??0);o.useEffect(()=>{let a=!1;return s.getAppMetadata().then(r=>{a||E(r)}).catch(()=>{}),()=>{a=!0}},[s]);const F=(l==null?void 0:l.updates.channel)??"stable",L=(l==null?void 0:l.updates.autoCheck)??!0,V=G(l==null?void 0:l.updates.lastCheckedAt),b=o.useCallback(async()=>{if(!(k||d==="checking")){m("checking"),w(null),y(null);try{const a=await s.checkForUpdates();B(a),a.available?(m("available"),p({open:!0,update:a,installState:"idle",progressBytes:0,totalBytes:null})):(m("up-to-date"),u({message:t("updates.upToDate"),variant:"success"})),await i()}catch(a){const r=a instanceof Error?a.message:String(a);m("error"),w(r),y(S(r))}}},[s,d,k,i,u,t]),R=o.useCallback(async a=>{try{await s.setSetting("updates.channel",a),await i(),a==="beta"&&u({message:t("updates.channel.betaUnavailable")})}catch{u({message:"Couldn't update channel.",variant:"error"})}},[s,i,u,t]),U=o.useCallback(async a=>{try{await s.setSetting("updates.autoCheck",a),await i()}catch{u({message:"Couldn't update auto-check.",variant:"error"})}},[s,i,u]),A=o.useCallback(async()=>{if(n.update){p(a=>({...a,installState:"preparing"}));try{await s.downloadAndInstallUpdate((a,r)=>{p(f=>({...f,installState:"downloading",progressBytes:a,totalBytes:r}))}),p(a=>({...a,installState:"ready-to-restart"}))}catch(a){const r=a instanceof Error?a.message:String(a),f=S(r);p(h=>({...h,open:!1,installState:"idle"})),m("error"),w(r),y(f)}}},[s,n.update]),I=o.useCallback(async()=>{var a;(a=n.update)!=null&&a.latestVersion&&(await s.setSetting("updates.skippedVersion",n.update.latestVersion),p(r=>({...r,open:!1})),await i())},[s,n.update,i]),$=o.useCallback(async()=>{const a=new Date(Date.now()+864e5).toISOString();await s.setSetting("updates.snoozedUntil",a),p(r=>({...r,open:!1})),await i()},[s,i]),z=o.useCallback(async()=>{try{await s.restartApp()}catch(a){const r=a instanceof Error?a.message:String(a);u({message:r||"Couldn't restart Skill Studio.",variant:"error"})}},[s,u]);o.useEffect(()=>{const a=j??0;a===0||a===_.current||(_.current=a,b())},[b,j]);const K=()=>{if(!n.open||!n.update)return null;const a=n.update,r=n.installState==="preparing"||n.installState==="downloading"||n.installState==="installing",f=n.installState==="ready-to-restart",h=n.totalBytes&&n.totalBytes>0?Math.min(100,Math.round(n.progressBytes/n.totalBytes*100)):null;return e.jsxs(Q,{open:n.open,onDismiss:()=>p(v=>({...v,open:!1})),ariaLabel:t("updates.dialog.title"),children:[e.jsx("h2",{className:"pref-dialog__title",children:t("updates.dialog.title")}),e.jsx("p",{className:"pref-dialog__body",children:t("updates.dialog.version",{version:a.latestVersion??"?"})}),e.jsxs("div",{children:[e.jsx("p",{className:"pref-row__label-text",style:{marginBottom:6},children:t("updates.dialog.releaseNotes")}),e.jsx("div",{className:"pref-dialog__release-notes",children:a.releaseNotes??t("updates.dialog.noReleaseNotes")})]}),r?e.jsxs("div",{className:"pref-progress",children:[e.jsx("div",{className:"pref-progress__bar",children:e.jsx("div",{className:"pref-progress__fill",style:{width:h===null?"30%":`${h}%`}})}),e.jsxs("span",{className:"pref-progress__text",children:[n.installState==="preparing"?t("updates.dialog.preparing"):t("updates.dialog.downloading"),h!==null?` (${h}%)`:null]})]}):null,e.jsx("div",{className:"pref-dialog__actions",children:f?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"pref-dialog__body",style:{marginRight:"auto"},children:t("updates.dialog.restartRequired")}),e.jsx("button",{type:"button",className:"pref-button",onClick:()=>p(v=>({...v,open:!1})),children:t("updates.dialog.onQuit")}),e.jsx("button",{type:"button",className:"pref-button pref-button--primary",onClick:z,children:t("updates.dialog.restartNow")})]}):r?e.jsx("button",{type:"button",className:"pref-button",onClick:()=>s.cancelUpdate().catch(()=>{}),children:t("updates.dialog.cancel")}):e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"pref-button",onClick:I,children:t("updates.dialog.skipVersion")}),e.jsx("button",{type:"button",className:"pref-button",onClick:$,children:t("updates.dialog.later")}),e.jsx("button",{type:"button",className:"pref-button pref-button--primary",onClick:A,children:t("updates.dialog.installNow")})]})})]})};return k?e.jsxs(e.Fragment,{children:[e.jsxs("header",{className:"preferences-content__heading",children:[e.jsx("h1",{children:t("updates.heading")}),e.jsx("p",{children:t("updates.subheading")})]}),e.jsxs(T,{variant:"info",children:[e.jsx("strong",{children:t("common.browserMode")}),e.jsx("span",{children:t("updates.browserCallout")}),e.jsx("a",{href:t("app.downloadUrl"),target:"_blank",rel:"noopener noreferrer",children:t("app.downloadLink")})]}),e.jsx(N,{title:t("updates.about.heading"),children:e.jsxs("div",{className:"pref-meta-row",children:[e.jsx("span",{className:"pref-meta-row__label",children:t("updates.currentVersion")}),e.jsx("span",{className:"pref-meta-row__value",children:"browser"})]})})]}):e.jsxs(e.Fragment,{children:[e.jsxs("header",{className:"preferences-content__heading",children:[e.jsx("h1",{children:t("updates.heading")}),e.jsx("p",{children:t("updates.subheading")})]}),e.jsxs(N,{title:t("updates.heading"),children:[e.jsxs("div",{className:"pref-meta-row",children:[e.jsx("span",{className:"pref-meta-row__label",children:t("updates.currentVersion")}),e.jsxs("span",{className:"pref-meta-row__value",children:[(c==null?void 0:c.version)??"(unknown)",c!=null&&c.build?` (${c.build})`:""]})]}),e.jsxs("div",{className:"pref-meta-row",children:[e.jsx("span",{className:"pref-meta-row__label",children:t("updates.lastChecked")}),e.jsx("span",{className:"pref-meta-row__value",children:V??t("updates.lastCheckedNever")})]}),e.jsx(C,{label:t("updates.channel.label"),help:t("updates.channel.help"),control:e.jsx(q,{ariaLabel:t("updates.channel.label"),value:F,onChange:R,options:[{value:"stable",label:t("updates.channel.stable")},{value:"beta",label:t("updates.channel.beta")}]})}),e.jsx(C,{label:t("updates.autoCheck.label"),help:t("updates.autoCheck.help"),control:e.jsx(O,{ariaLabel:t("updates.autoCheck.label"),checked:L,onChange:U})}),e.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center",marginTop:4},children:[e.jsx("button",{type:"button",className:"pref-button pref-button--primary",onClick:b,disabled:d==="checking",children:d==="checking"?e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[e.jsx("span",{className:"pref-spinner","aria-hidden":"true"}),t("updates.checking")]}):t("updates.checkNow")}),e.jsxs("div",{className:"pref-status-row","data-state":d==="up-to-date"?"success":d==="error"?"error":void 0,children:[d==="up-to-date"?t("updates.upToDate"):null,d==="available"&&(g!=null&&g.latestVersion)?e.jsx(e.Fragment,{children:t("updates.updateAvailable",{version:g.latestVersion})}):null,d==="error"&&x?e.jsx(e.Fragment,{children:x==="signature"?t("updates.errors.signature"):x==="disk"?t("updates.errors.diskSpace"):x==="network"?t("updates.errors.network"):D??"Unknown error"}):null]})]}),d==="error"?e.jsxs("div",{style:{display:"flex",gap:8,marginTop:4},children:[e.jsx("button",{type:"button",className:"pref-button",onClick:b,children:t("updates.errors.tryAgain")}),e.jsx("button",{type:"button",className:"pref-button",onClick:()=>s.openLogsFolder().catch(()=>{}),children:t("updates.errors.viewLogs")})]}):null]}),e.jsxs(N,{title:t("updates.about.heading"),children:[e.jsxs("div",{className:"pref-meta-row",children:[e.jsx("span",{className:"pref-meta-row__label",children:t("updates.about.build")}),e.jsx("span",{className:"pref-meta-row__value",children:(c==null?void 0:c.build)??"(unknown)"})]}),e.jsxs("div",{className:"pref-meta-row",children:[e.jsx("span",{className:"pref-meta-row__label",children:t("updates.about.commit")}),e.jsx("span",{className:"pref-meta-row__value",children:(c==null?void 0:c.commit)??"(unknown)"})]}),e.jsxs("ul",{className:"pref-link-list","aria-label":t("updates.about.heading"),children:[e.jsx("li",{children:e.jsx("a",{href:"https://verified-skill.com",target:"_blank",rel:"noopener noreferrer",children:t("updates.about.links.website")})}),e.jsx("li",{children:e.jsx("a",{href:"https://verified-skill.com/licenses",target:"_blank",rel:"noopener noreferrer",children:t("updates.about.links.openSource")})}),e.jsx("li",{children:e.jsx("a",{href:"https://verified-skill.com/acknowledgements",target:"_blank",rel:"noopener noreferrer",children:t("updates.about.links.acknowledgements")})})]})]}),K()]})}export{X as UpdatesTab};
@@ -0,0 +1 @@
1
+ function i(t,e,s,n){if(s==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?n:s==="a"?n.call(t):n?n.value:e.get(t)}function o(t,e,s,n,_){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,s),s}var l,a,r,h,c,d;const f="__TAURI_TO_IPC_KEY__";function C(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}class g{constructor(e){l.add(this),a.set(this,void 0),r.set(this,0),h.set(this,[]),c.set(this,void 0),o(this,a,e||(()=>{})),this.id=C(s=>{const n=s.index;if("end"in s){n==i(this,r,"f")?this.cleanupCallback():o(this,c,n);return}const _=s.message;if(n==i(this,r,"f")){for(i(this,l,"m",d).call(this,_),o(this,r,i(this,r,"f")+1);i(this,r,"f")in i(this,h,"f");){const p=i(this,h,"f")[i(this,r,"f")];i(this,l,"m",d).call(this,p),delete i(this,h,"f")[i(this,r,"f")],o(this,r,i(this,r,"f")+1)}i(this,r,"f")===i(this,c,"f")&&this.cleanupCallback()}else i(this,h,"f")[n]=_})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(e){o(this,a,e)}get onmessage(){return i(this,a,"f")}[(a=new WeakMap,r=new WeakMap,h=new WeakMap,c=new WeakMap,l=new WeakSet,d=function(s){try{i(this,a,"f").call(this,s)}catch(n){queueMicrotask(()=>{throw n})}},f)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[f]()}}class w{constructor(e,s,n){this.plugin=e,this.event=s,this.channelId=n}async unregister(){return u(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function m(t,e,s){const n=new g(s);try{return await u(`plugin:${t}|register_listener`,{event:e,handler:n}),new w(t,e,n.id)}catch{return await u(`plugin:${t}|registerListener`,{event:e,handler:n}),new w(t,e,n.id)}}async function u(t,e={},s){return window.__TAURI_INTERNALS__.invoke(t,e,s)}export{g as C,m as a,u as i,C as t};
@@ -1 +1 @@
1
- import{i,t as d}from"./core-DZjBCfjp.js";var n;(function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_SUSPENDED="tauri://suspended",e.WINDOW_RESUMED="tauri://resumed",e.WEBVIEW_CREATED="tauri://webview-created",e.DRAG_ENTER="tauri://drag-enter",e.DRAG_OVER="tauri://drag-over",e.DRAG_DROP="tauri://drag-drop",e.DRAG_LEAVE="tauri://drag-leave"})(n||(n={}));async function _(e,a){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,a),await i("plugin:event|unlisten",{event:e,eventId:a})}async function u(e,a,t){var r;const l=typeof(t==null?void 0:t.target)=="string"?{kind:"AnyLabel",label:t.target}:(r=t==null?void 0:t.target)!==null&&r!==void 0?r:{kind:"Any"};return i("plugin:event|listen",{event:e,target:l,handler:d(a)}).then(D=>async()=>_(e,D))}async function c(e,a,t){return u(e,r=>{_(e,r.id),a(r)},t)}async function s(e,a){await i("plugin:event|emit",{event:e,payload:a})}async function o(e,a,t){await i("plugin:event|emit_to",{target:typeof e=="string"?{kind:"AnyLabel",label:e}:e,event:a,payload:t})}export{n as TauriEvent,s as emit,o as emitTo,u as listen,c as once};
1
+ import{i,t as d}from"./core-DgHXlyD_.js";var n;(function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_SUSPENDED="tauri://suspended",e.WINDOW_RESUMED="tauri://resumed",e.WEBVIEW_CREATED="tauri://webview-created",e.DRAG_ENTER="tauri://drag-enter",e.DRAG_OVER="tauri://drag-over",e.DRAG_DROP="tauri://drag-drop",e.DRAG_LEAVE="tauri://drag-leave"})(n||(n={}));async function _(e,a){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,a),await i("plugin:event|unlisten",{event:e,eventId:a})}async function u(e,a,t){var r;const l=typeof(t==null?void 0:t.target)=="string"?{kind:"AnyLabel",label:t.target}:(r=t==null?void 0:t.target)!==null&&r!==void 0?r:{kind:"Any"};return i("plugin:event|listen",{event:e,target:l,handler:d(a)}).then(D=>async()=>_(e,D))}async function c(e,a,t){return u(e,r=>{_(e,r.id),a(r)},t)}async function s(e,a){await i("plugin:event|emit",{event:e,payload:a})}async function o(e,a,t){await i("plugin:event|emit_to",{target:typeof e=="string"?{kind:"AnyLabel",label:e}:e,event:a,payload:t})}export{n as TauriEvent,s as emit,o as emitTo,u as listen,c as once};
@@ -1 +1 @@
1
- @font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-cyrillic-ext-wght-normal-cHuGMAiY.woff2) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-cyrillic-wght-normal-DwHjdM4S.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-greek-wght-normal-ece1310W.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-vietnamese-wght-normal-D-yuW59g.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-latin-ext-wght-normal-CxNHBx-q.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-latin-wght-normal-D9elroTD.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter Tight Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/inter-tight-cyrillic-ext-wght-normal-okcGN4Nq.woff2) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter Tight Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/inter-tight-cyrillic-wght-normal-BS41q_Tv.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter Tight Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/inter-tight-greek-ext-wght-normal-DQgQPNk4.woff2) format("woff2-variations");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter Tight Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/inter-tight-greek-wght-normal-sS1B39LI.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter Tight Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/inter-tight-vietnamese-wght-normal-TKKdAiBA.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter Tight Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/inter-tight-latin-ext-wght-normal-B4u9PlvR.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter Tight Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/inter-tight-latin-wght-normal-DX-nOvPD.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(data:font/woff2;base64,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) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
1
+ @font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-cyrillic-ext-wght-normal-DHTKMUil.woff2) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-cyrillic-wght-normal-B1g8a0vD.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-greek-wght-normal-BpXpdlRW.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-vietnamese-wght-normal-BsaNuasd.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-latin-ext-wght-normal-BVZ5su8S.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-latin-wght-normal-DMe4EKeb.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter Tight Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/inter-tight-cyrillic-ext-wght-normal-okcGN4Nq.woff2) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter Tight Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/inter-tight-cyrillic-wght-normal-BS41q_Tv.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter Tight Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/inter-tight-greek-ext-wght-normal-DQgQPNk4.woff2) format("woff2-variations");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter Tight Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/inter-tight-greek-wght-normal-sS1B39LI.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter Tight Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/inter-tight-vietnamese-wght-normal-TKKdAiBA.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter Tight Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/inter-tight-latin-ext-wght-normal-B4u9PlvR.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter Tight Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/inter-tight-latin-wght-normal-DX-nOvPD.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(data:font/woff2;base64,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) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@@ -1 +1 @@
1
- import{i,a as f}from"./core-DZjBCfjp.js";var o;(function(n){n.Year="year",n.Month="month",n.TwoWeeks="twoWeeks",n.Week="week",n.Day="day",n.Hour="hour",n.Minute="minute",n.Second="second"})(o||(o={}));class s{static at(t,e=!1,a=!1){return{at:{date:t,repeating:e,allowWhileIdle:a},interval:void 0,every:void 0}}static interval(t,e=!1){return{at:void 0,interval:{interval:t,allowWhileIdle:e},every:void 0}}static every(t,e,a=!1){return{at:void 0,interval:void 0,every:{interval:t,count:e,allowWhileIdle:a}}}}var c;(function(n){n[n.None=0]="None",n[n.Min=1]="Min",n[n.Low=2]="Low",n[n.Default=3]="Default",n[n.High=4]="High"})(c||(c={}));var r;(function(n){n[n.Secret=-1]="Secret",n[n.Private=0]="Private",n[n.Public=1]="Public"})(r||(r={}));async function l(){return window.Notification.permission!=="default"?await Promise.resolve(window.Notification.permission==="granted"):await i("plugin:notification|is_permission_granted")}async function w(){return await window.Notification.requestPermission()}function d(n){typeof n=="string"?new window.Notification(n):new window.Notification(n.title,n)}async function g(n){await i("plugin:notification|register_action_types",{types:n})}async function v(){return await i("plugin:notification|get_pending")}async function y(n){await i("plugin:notification|cancel",{notifications:n})}async function _(){await i("plugin:notification|cancel")}async function p(){return await i("plugin:notification|get_active")}async function P(n){await i("plugin:notification|remove_active",{notifications:n})}async function m(){await i("plugin:notification|remove_active")}async function N(n){await i("plugin:notification|create_channel",{...n})}async function h(n){await i("plugin:notification|delete_channel",{id:n})}async function A(){return await i("plugin:notification|list_channels")}async function k(n){return await f("notification","notification",n)}async function M(n){return await f("notification","actionPerformed",n)}export{c as Importance,s as Schedule,o as ScheduleEvery,r as Visibility,p as active,y as cancel,_ as cancelAll,A as channels,N as createChannel,l as isPermissionGranted,M as onAction,k as onNotificationReceived,v as pending,g as registerActionTypes,P as removeActive,m as removeAllActive,h as removeChannel,w as requestPermission,d as sendNotification};
1
+ import{i,a as f}from"./core-DgHXlyD_.js";var o;(function(n){n.Year="year",n.Month="month",n.TwoWeeks="twoWeeks",n.Week="week",n.Day="day",n.Hour="hour",n.Minute="minute",n.Second="second"})(o||(o={}));class s{static at(t,e=!1,a=!1){return{at:{date:t,repeating:e,allowWhileIdle:a},interval:void 0,every:void 0}}static interval(t,e=!1){return{at:void 0,interval:{interval:t,allowWhileIdle:e},every:void 0}}static every(t,e,a=!1){return{at:void 0,interval:void 0,every:{interval:t,count:e,allowWhileIdle:a}}}}var c;(function(n){n[n.None=0]="None",n[n.Min=1]="Min",n[n.Low=2]="Low",n[n.Default=3]="Default",n[n.High=4]="High"})(c||(c={}));var r;(function(n){n[n.Secret=-1]="Secret",n[n.Private=0]="Private",n[n.Public=1]="Public"})(r||(r={}));async function l(){return window.Notification.permission!=="default"?await Promise.resolve(window.Notification.permission==="granted"):await i("plugin:notification|is_permission_granted")}async function w(){return await window.Notification.requestPermission()}function d(n){typeof n=="string"?new window.Notification(n):new window.Notification(n.title,n)}async function g(n){await i("plugin:notification|register_action_types",{types:n})}async function v(){return await i("plugin:notification|get_pending")}async function y(n){await i("plugin:notification|cancel",{notifications:n})}async function _(){await i("plugin:notification|cancel")}async function p(){return await i("plugin:notification|get_active")}async function P(n){await i("plugin:notification|remove_active",{notifications:n})}async function m(){await i("plugin:notification|remove_active")}async function N(n){await i("plugin:notification|create_channel",{...n})}async function h(n){await i("plugin:notification|delete_channel",{id:n})}async function A(){return await i("plugin:notification|list_channels")}async function k(n){return await f("notification","notification",n)}async function M(n){return await f("notification","actionPerformed",n)}export{c as Importance,s as Schedule,o as ScheduleEvery,r as Visibility,p as active,y as cancel,_ as cancelAll,A as channels,N as createChannel,l as isPermissionGranted,M as onAction,k as onNotificationReceived,v as pending,g as registerActionTypes,P as removeActive,m as removeAllActive,h as removeChannel,w as requestPermission,d as sendNotification};
@@ -1 +1 @@
1
- import{i}from"./core-DZjBCfjp.js";function f(n){if(n!==void 0){if(typeof n=="string")return n;if("ok"in n&&"cancel"in n)return{OkCancelCustom:[n.ok,n.cancel]};if("yes"in n&&"no"in n&&"cancel"in n)return{YesNoCancelCustom:[n.yes,n.no,n.cancel]};if("ok"in n)return{OkCustom:n.ok}}}async function u(n={}){return typeof n=="object"&&Object.freeze(n),await i("plugin:dialog|open",{options:n})}async function t(n={}){return typeof n=="object"&&Object.freeze(n),await i("plugin:dialog|save",{options:n})}async function r(n,a){return await i("plugin:dialog|message",{message:n,title:a==null?void 0:a.title,kind:a==null?void 0:a.kind,buttons:f(a==null?void 0:a.buttons)})}async function d(n,a){const e=typeof a=="string"?{title:a}:a;return e&&!e.buttons&&e.okLabel&&(e.buttons={ok:e.okLabel}),r(n,e)}async function y(n,a){const e=typeof a=="string"?{title:a}:a,l=(e==null?void 0:e.okLabel)||(e==null?void 0:e.cancelLabel),c=(e==null?void 0:e.okLabel)??"Yes";return await r(n,{title:e==null?void 0:e.title,kind:e==null?void 0:e.kind,buttons:l?{ok:c,cancel:e.cancelLabel??"No"}:"YesNo"})===c}async function g(n,a){const e=typeof a=="string"?{title:a}:a,l=(e==null?void 0:e.okLabel)||(e==null?void 0:e.cancelLabel),c=(e==null?void 0:e.okLabel)??"Ok";return await r(n,{title:e==null?void 0:e.title,kind:e==null?void 0:e.kind,buttons:l?{ok:c,cancel:e.cancelLabel??"Cancel"}:"OkCancel"})===c}export{y as ask,g as confirm,d as message,u as open,t as save};
1
+ import{i}from"./core-DgHXlyD_.js";function f(n){if(n!==void 0){if(typeof n=="string")return n;if("ok"in n&&"cancel"in n)return{OkCancelCustom:[n.ok,n.cancel]};if("yes"in n&&"no"in n&&"cancel"in n)return{YesNoCancelCustom:[n.yes,n.no,n.cancel]};if("ok"in n)return{OkCustom:n.ok}}}async function u(n={}){return typeof n=="object"&&Object.freeze(n),await i("plugin:dialog|open",{options:n})}async function t(n={}){return typeof n=="object"&&Object.freeze(n),await i("plugin:dialog|save",{options:n})}async function r(n,a){return await i("plugin:dialog|message",{message:n,title:a==null?void 0:a.title,kind:a==null?void 0:a.kind,buttons:f(a==null?void 0:a.buttons)})}async function d(n,a){const e=typeof a=="string"?{title:a}:a;return e&&!e.buttons&&e.okLabel&&(e.buttons={ok:e.okLabel}),r(n,e)}async function y(n,a){const e=typeof a=="string"?{title:a}:a,l=(e==null?void 0:e.okLabel)||(e==null?void 0:e.cancelLabel),c=(e==null?void 0:e.okLabel)??"Yes";return await r(n,{title:e==null?void 0:e.title,kind:e==null?void 0:e.kind,buttons:l?{ok:c,cancel:e.cancelLabel??"No"}:"YesNo"})===c}async function g(n,a){const e=typeof a=="string"?{title:a}:a,l=(e==null?void 0:e.okLabel)||(e==null?void 0:e.cancelLabel),c=(e==null?void 0:e.okLabel)??"Ok";return await r(n,{title:e==null?void 0:e.title,kind:e==null?void 0:e.kind,buttons:l?{ok:c,cancel:e.cancelLabel??"Cancel"}:"OkCancel"})===c}export{y as ask,g as confirm,d as message,u as open,t as save};
@@ -1 +1 @@
1
- import{i as n,C as c}from"./core-DZjBCfjp.js";class h{constructor(){this.eventListeners=Object.create(null)}addListener(t,e){return this.on(t,e)}removeListener(t,e){return this.off(t,e)}on(t,e){return t in this.eventListeners?this.eventListeners[t].push(e):this.eventListeners[t]=[e],this}once(t,e){const s=i=>{this.removeListener(t,s),e(i)};return this.addListener(t,s)}off(t,e){return t in this.eventListeners&&(this.eventListeners[t]=this.eventListeners[t].filter(s=>s!==e)),this}removeAllListeners(t){return t?delete this.eventListeners[t]:this.eventListeners=Object.create(null),this}emit(t,e){if(t in this.eventListeners){const s=this.eventListeners[t];for(const i of s)i(e);return!0}return!1}listenerCount(t){return t in this.eventListeners?this.eventListeners[t].length:0}prependListener(t,e){return t in this.eventListeners?this.eventListeners[t].unshift(e):this.eventListeners[t]=[e],this}prependOnceListener(t,e){const s=i=>{this.removeListener(t,s),e(i)};return this.prependListener(t,s)}}class l{constructor(t){this.pid=t}async write(t){await n("plugin:shell|stdin_write",{pid:this.pid,buffer:t})}async kill(){await n("plugin:shell|kill",{cmd:"killChild",pid:this.pid})}}class a extends h{constructor(t,e=[],s){super(),this.stdout=new h,this.stderr=new h,this.program=t,this.args=typeof e=="string"?[e]:e,this.options=s??{}}static create(t,e=[],s){return new a(t,e,s)}static sidecar(t,e=[],s){const i=new a(t,e,s);return i.options.sidecar=!0,i}async spawn(){const t=this.program,e=this.args,s=this.options;typeof e=="object"&&Object.freeze(e);const i=new c;return i.onmessage=r=>{switch(r.event){case"Error":this.emit("error",r.payload);break;case"Terminated":this.emit("close",r.payload);break;case"Stdout":this.stdout.emit("data",r.payload);break;case"Stderr":this.stderr.emit("data",r.payload);break}},await n("plugin:shell|spawn",{program:t,args:e,options:s,onEvent:i}).then(r=>new l(r))}async execute(){const t=this.program,e=this.args,s=this.options;return typeof e=="object"&&Object.freeze(e),await n("plugin:shell|execute",{program:t,args:e,options:s})}}async function u(o,t){await n("plugin:shell|open",{path:o,with:t})}export{l as Child,a as Command,h as EventEmitter,u as open};
1
+ import{i as n,C as c}from"./core-DgHXlyD_.js";class h{constructor(){this.eventListeners=Object.create(null)}addListener(t,e){return this.on(t,e)}removeListener(t,e){return this.off(t,e)}on(t,e){return t in this.eventListeners?this.eventListeners[t].push(e):this.eventListeners[t]=[e],this}once(t,e){const s=i=>{this.removeListener(t,s),e(i)};return this.addListener(t,s)}off(t,e){return t in this.eventListeners&&(this.eventListeners[t]=this.eventListeners[t].filter(s=>s!==e)),this}removeAllListeners(t){return t?delete this.eventListeners[t]:this.eventListeners=Object.create(null),this}emit(t,e){if(t in this.eventListeners){const s=this.eventListeners[t];for(const i of s)i(e);return!0}return!1}listenerCount(t){return t in this.eventListeners?this.eventListeners[t].length:0}prependListener(t,e){return t in this.eventListeners?this.eventListeners[t].unshift(e):this.eventListeners[t]=[e],this}prependOnceListener(t,e){const s=i=>{this.removeListener(t,s),e(i)};return this.prependListener(t,s)}}class l{constructor(t){this.pid=t}async write(t){await n("plugin:shell|stdin_write",{pid:this.pid,buffer:t})}async kill(){await n("plugin:shell|kill",{cmd:"killChild",pid:this.pid})}}class a extends h{constructor(t,e=[],s){super(),this.stdout=new h,this.stderr=new h,this.program=t,this.args=typeof e=="string"?[e]:e,this.options=s??{}}static create(t,e=[],s){return new a(t,e,s)}static sidecar(t,e=[],s){const i=new a(t,e,s);return i.options.sidecar=!0,i}async spawn(){const t=this.program,e=this.args,s=this.options;typeof e=="object"&&Object.freeze(e);const i=new c;return i.onmessage=r=>{switch(r.event){case"Error":this.emit("error",r.payload);break;case"Terminated":this.emit("close",r.payload);break;case"Stdout":this.stdout.emit("data",r.payload);break;case"Stderr":this.stderr.emit("data",r.payload);break}},await n("plugin:shell|spawn",{program:t,args:e,options:s,onEvent:i}).then(r=>new l(r))}async execute(){const t=this.program,e=this.args,s=this.options;return typeof e=="object"&&Object.freeze(e),await n("plugin:shell|execute",{program:t,args:e,options:s})}}async function u(o,t){await n("plugin:shell|open",{path:o,with:t})}export{l as Child,a as Command,h as EventEmitter,u as open};