vibelet 1.2.233 → 1.2.235

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 (141) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/inventory-scan-worker.cjs +1 -1
  3. package/dist/runtime-version.cjs +1 -1
  4. package/dist/web/assets/App-CIWR_iGV.css +1 -0
  5. package/dist/web/assets/App-DenA3QIb.js +2 -0
  6. package/dist/web/assets/BrowserControlPanel-mCDy7Hcz.js +1 -0
  7. package/dist/web/assets/{ChipGroup-Ct9ZVlb4.js → ChipGroup-BKnbqJkF.js} +1 -1
  8. package/dist/web/assets/FilesControlPanel-BAguf3b6.js +1 -0
  9. package/dist/web/assets/FilesControlPanel-DQpsZVYc.css +1 -0
  10. package/dist/web/assets/{GlobalPendingDialog-YFbtF-Qi.js → GlobalPendingDialog-D7F43nEr.js} +1 -1
  11. package/dist/web/assets/ImageViewer-YYuZb1G2.js +1 -0
  12. package/dist/web/assets/{LanguageSettingsPanel-BJipWB1x.js → LanguageSettingsPanel-CG6ptWAj.js} +1 -1
  13. package/dist/web/assets/MarkdownModePanel-D73Xg4At.css +1 -0
  14. package/dist/web/assets/MarkdownModePanel-rXmtsjPb.js +1 -0
  15. package/dist/web/assets/NewSessionDialog-B_YNEU3D.css +1 -0
  16. package/dist/web/assets/NewSessionDialog-Pc6Vz8cD.js +1 -0
  17. package/dist/web/assets/{NotificationSettingsPanel-DomEHL_z.js → NotificationSettingsPanel-BW2YheO8.js} +1 -1
  18. package/dist/web/assets/RemoteLifeOSBlock-I33jMQfs.js +2 -0
  19. package/dist/web/assets/TerminalControlPanel-CdYTgewy.js +1 -0
  20. package/dist/web/assets/ThemeSettingsPanel-CzNm33Ug.js +1 -0
  21. package/dist/web/assets/{abnfDiagram-VRR7QNED-OQczAdh4.js → abnfDiagram-VRR7QNED-DUxyOnUm.js} +1 -1
  22. package/dist/web/assets/{arc-B_7S8PBe.js → arc-zRAAWsg9.js} +1 -1
  23. package/dist/web/assets/{architectureDiagram-ZJ3FMSHR-0RWvjsWb.js → architectureDiagram-ZJ3FMSHR-CANEZiNN.js} +1 -1
  24. package/dist/web/assets/{arrow-right-DNQLufK9.js → arrow-right-CF_MlpxP.js} +1 -1
  25. package/dist/web/assets/{blockDiagram-677ZJIJ3-BBUl1A67.js → blockDiagram-677ZJIJ3-CQvH949j.js} +1 -1
  26. package/dist/web/assets/{c4Diagram-LMCZKHZV-q98KSF-X.js → c4Diagram-LMCZKHZV-CO4XjrCG.js} +1 -1
  27. package/dist/web/assets/channel-dQPqMnFx.js +1 -0
  28. package/dist/web/assets/{chunk-2Q5K7J3B-CsJ1LsZP.js → chunk-2Q5K7J3B-DTXIfjoM.js} +1 -1
  29. package/dist/web/assets/{chunk-32BRIVSS-CcFgBN8P.js → chunk-32BRIVSS-BbmByeWb.js} +1 -1
  30. package/dist/web/assets/{chunk-5VM5RSS4-BCeKWpkp.js → chunk-5VM5RSS4-55dZW-IZ.js} +1 -1
  31. package/dist/web/assets/{chunk-EX3LRPZG-CkONpXQe.js → chunk-EX3LRPZG-D-vCHfiB.js} +1 -1
  32. package/dist/web/assets/{chunk-JWPE2WC7-COD3NKSV.js → chunk-JWPE2WC7-eBvTfuuu.js} +1 -1
  33. package/dist/web/assets/{chunk-MOJQB5TN-Dq7aeQmI.js → chunk-MOJQB5TN-DYFPVu-x.js} +1 -1
  34. package/dist/web/assets/{chunk-RYQCIY6F-CmUgPJr0.js → chunk-RYQCIY6F-2xansKrF.js} +1 -1
  35. package/dist/web/assets/{chunk-V7JOEXUC-QkD3g50d.js → chunk-V7JOEXUC-TVnrO-Wr.js} +1 -1
  36. package/dist/web/assets/{chunk-VR4S4FIN-bqXmDTmi.js → chunk-VR4S4FIN-BVdWp9C5.js} +1 -1
  37. package/dist/web/assets/{chunk-XXDRQBXY-CylbQ77X.js → chunk-XXDRQBXY-CVwDg0PW.js} +1 -1
  38. package/dist/web/assets/classDiagram-OUVF2IWQ-BjI_mxx3.js +1 -0
  39. package/dist/web/assets/classDiagram-v2-EOCWNBFH-BjI_mxx3.js +1 -0
  40. package/dist/web/assets/clsx-DaxbA7nq.js +1 -0
  41. package/dist/web/assets/{collectMessageImages-DhGvB-2f.js → collectMessageImages-Bd_KUcjR.js} +1 -1
  42. package/dist/web/assets/{cose-bilkent-JH36ORCC-C9Znh1sN.js → cose-bilkent-JH36ORCC-q0D5dKoq.js} +1 -1
  43. package/dist/web/assets/{cynefin-VYW2F7L2-Bp7Qx0jq.js → cynefin-VYW2F7L2-C0iRs1H7.js} +1 -1
  44. package/dist/web/assets/{cynefinDiagram-TSTJHNR4-BuCr2MsM.js → cynefinDiagram-TSTJHNR4-BDoOhj6i.js} +1 -1
  45. package/dist/web/assets/{dagre-VKFMJZFB-Db--wSJy.js → dagre-VKFMJZFB-BhAVeafA.js} +1 -1
  46. package/dist/web/assets/{diagram-FQU43EPY-CcDlMM65.js → diagram-FQU43EPY-19K6IibX.js} +1 -1
  47. package/dist/web/assets/{diagram-G47NLZAW-DET75anv.js → diagram-G47NLZAW-BKaIX5yb.js} +1 -1
  48. package/dist/web/assets/{diagram-NH7WQ7WH-CuSmdJWE.js → diagram-NH7WQ7WH-C0ly0NEX.js} +1 -1
  49. package/dist/web/assets/{diagram-OA4YK3LP-C4AHJasK.js → diagram-OA4YK3LP-CUkW2x74.js} +1 -1
  50. package/dist/web/assets/{diagram-WEI45ONY-v2xIwF8y.js → diagram-WEI45ONY-DwdeWCAC.js} +1 -1
  51. package/dist/web/assets/{ebnfDiagram-CCIWWBDH-wy_kEa8S.js → ebnfDiagram-CCIWWBDH-BsOwHiWw.js} +1 -1
  52. package/dist/web/assets/{erDiagram-Q63AITRT-B2ZADv-r.js → erDiagram-Q63AITRT-qDA1uJgc.js} +1 -1
  53. package/dist/web/assets/file-editor-FileCodeEditor-e_cHRyn4.js +2 -0
  54. package/dist/web/assets/{file-editor-ObsidianCodeEditor-C4QKDNQs.js → file-editor-ObsidianCodeEditor-DI7f8suj.js} +1 -1
  55. package/dist/web/assets/file-editor-ObsidianFileEditor-ByRz9GFK.js +2 -0
  56. package/dist/web/assets/{file-editor-index-BEEbdBdH.js → file-editor-index-BOi4gj-u.js} +1 -1
  57. package/dist/web/assets/{file-editor-index-Blz54FUZ.js → file-editor-index-BWvEAcHp.js} +1 -1
  58. package/dist/web/assets/{file-editor-index-BJr7v7bw.js → file-editor-index-Bg9-IMrE.js} +1 -1
  59. package/dist/web/assets/file-editor-index-BocbUhDf.js +1 -0
  60. package/dist/web/assets/{file-editor-index-B3d2HyrJ.js → file-editor-index-ByGYwqNf.js} +1 -1
  61. package/dist/web/assets/{file-editor-index-kJrjg6tD.js → file-editor-index-C-F4L_uP.js} +1 -1
  62. package/dist/web/assets/{file-editor-index-Cy0cJb2y.js → file-editor-index-C6CU7Fik.js} +1 -1
  63. package/dist/web/assets/{file-editor-index-BFdT3Mv9.js → file-editor-index-C7QHkk3U.js} +1 -1
  64. package/dist/web/assets/{file-editor-index-BoV5K7VS.js → file-editor-index-CBJfyhrV.js} +1 -1
  65. package/dist/web/assets/{file-editor-index-BEOxpefN.js → file-editor-index-CMzVhAnN.js} +1 -1
  66. package/dist/web/assets/{file-editor-index-Dj7iSTai.js → file-editor-index-CVa9xeL0.js} +1 -1
  67. package/dist/web/assets/{file-editor-index-C-aRVKEr.js → file-editor-index-Ca7mWpkj.js} +1 -1
  68. package/dist/web/assets/{file-editor-index-CSaCz3EW.js → file-editor-index-CylY6jN7.js} +1 -1
  69. package/dist/web/assets/{file-editor-index-C5f7s3Eh.js → file-editor-index-D5fLCdey.js} +1 -1
  70. package/dist/web/assets/{file-editor-index-DGnKtkr2.js → file-editor-index-DBUZobR-.js} +1 -1
  71. package/dist/web/assets/{file-editor-index-mYPTZLoA.js → file-editor-index-DH8OZ6dS.js} +1 -1
  72. package/dist/web/assets/{file-editor-index-DfMO4TI8.js → file-editor-index-DIH2DQ5-.js} +1 -1
  73. package/dist/web/assets/{file-editor-index-CQsZBAf1.js → file-editor-index-DPwrStxR.js} +1 -1
  74. package/dist/web/assets/{file-editor-index-Cyo3bdPe.js → file-editor-index-DSJHLC6d.js} +1 -1
  75. package/dist/web/assets/{file-editor-index-B2I28X4j.js → file-editor-index-Dijmg1Xu.js} +1 -1
  76. package/dist/web/assets/{file-editor-index-rihVD8wm.js → file-editor-index-EvPD_eNu.js} +1 -1
  77. package/dist/web/assets/{file-editor-index-WHi3JlW8.js → file-editor-index-WprjWcs8.js} +1 -1
  78. package/dist/web/assets/{file-editor-index-CKwNSFLk.js → file-editor-index-vyjM9L0w.js} +1 -1
  79. package/dist/web/assets/{file-editor-index-c2dKCHO8.js → file-editor-index-wav2nO7A.js} +1 -1
  80. package/dist/web/assets/{flowDiagram-23GEKE2U-CX2RaC4p.js → flowDiagram-23GEKE2U-CWT82Psi.js} +1 -1
  81. package/dist/web/assets/{folder-plus-Cl6NWbNw.js → folder-plus-BuIbO5rO.js} +1 -1
  82. package/dist/web/assets/{ganttDiagram-NO4QXBWP-C1fJ323v.js → ganttDiagram-NO4QXBWP-BwkNz011.js} +1 -1
  83. package/dist/web/assets/{gitGraphDiagram-IHSO6WYX-BLFS-Drr.js → gitGraphDiagram-IHSO6WYX-Dnd5wgTd.js} +1 -1
  84. package/dist/web/assets/highlighted-body-TPN3WLV5-B-MOqwqs.js +1 -0
  85. package/dist/web/assets/index-BBUiU9K_.css +1 -0
  86. package/dist/web/assets/{index-8_Am9ShR.js → index-CMunTdjK.js} +1 -1
  87. package/dist/web/assets/index-CdwajBhR.js +2 -0
  88. package/dist/web/assets/{infoDiagram-FWYZ7A6U-BNpxEHPJ.js → infoDiagram-FWYZ7A6U-CsLiRudn.js} +1 -1
  89. package/dist/web/assets/{ishikawaDiagram-FXEZZL3T-CZA4KSjU.js → ishikawaDiagram-FXEZZL3T-CQ2VItcU.js} +1 -1
  90. package/dist/web/assets/{journeyDiagram-5HDEW3XC-HFqAA_cn.js → journeyDiagram-5HDEW3XC-20HUCiMA.js} +1 -1
  91. package/dist/web/assets/{kanban-definition-HUTT4EX6-DD_a9PCM.js → kanban-definition-HUTT4EX6-BlFKyFGS.js} +1 -1
  92. package/dist/web/assets/{linear-D8Y_m16-.js → linear-DcEW9U4V.js} +1 -1
  93. package/dist/web/assets/logo-CVsV06Wq.webp +0 -0
  94. package/dist/web/assets/mermaid-O7DHMXV3-CKUeIBKi.js +2 -0
  95. package/dist/web/assets/{mermaid-O7DHMXV3-CHSBDxzn.css → mermaid-O7DHMXV3-DQjp4PWc.css} +1 -1
  96. package/dist/web/assets/{mermaid.core-BOFC-9Zd.js → mermaid.core-CKL91szq.js} +2 -2
  97. package/dist/web/assets/{mindmap-definition-LN4V7U3C-D5IUgZ6b.js → mindmap-definition-LN4V7U3C-D0VoTzwD.js} +1 -1
  98. package/dist/web/assets/{pegDiagram-2B236MQR-CefM8hXa.js → pegDiagram-2B236MQR-CefWKSzd.js} +1 -1
  99. package/dist/web/assets/{pieDiagram-ENE6RG2P-BDEGSmj6.js → pieDiagram-ENE6RG2P-DOqFxLRf.js} +1 -1
  100. package/dist/web/assets/{quadrantDiagram-ABIIQ3AL-CgbzHIM1.js → quadrantDiagram-ABIIQ3AL-9deKwbNB.js} +1 -1
  101. package/dist/web/assets/{railroadDiagram-RFXS5EU6-DipKpgnM.js → railroadDiagram-RFXS5EU6-DChzO2BS.js} +1 -1
  102. package/dist/web/assets/{requirementDiagram-TGXJPOKE-CJWkBC2T.js → requirementDiagram-TGXJPOKE-BxFcGapQ.js} +1 -1
  103. package/dist/web/assets/{sankeyDiagram-HTMAVEWB-CJgh1qMP.js → sankeyDiagram-HTMAVEWB-DbF_hrnW.js} +1 -1
  104. package/dist/web/assets/{sequenceDiagram-DBY2YBRQ-oIXo1saQ.js → sequenceDiagram-DBY2YBRQ-CnZJ1pvx.js} +1 -1
  105. package/dist/web/assets/{sizeCapture-X5ZJPWSS-CrToD-n4.js → sizeCapture-X5ZJPWSS-eGmJC2ld.js} +1 -1
  106. package/dist/web/assets/{stateDiagram-2N3HPSRC-PQ_QNKS9.js → stateDiagram-2N3HPSRC-C7xdkcAK.js} +1 -1
  107. package/dist/web/assets/stateDiagram-v2-6OUMAXLB-Cyth9z2I.js +1 -0
  108. package/dist/web/assets/{swimlanes-5IMT3BWC-B6jyX_3e.js → swimlanes-5IMT3BWC-Bs93ZHOO.js} +2 -2
  109. package/dist/web/assets/swimlanesDiagram-G3AALYLV-B5jki7rr.js +1 -0
  110. package/dist/web/assets/{timeline-definition-FHXFAJF6-CZV40Uiu.js → timeline-definition-FHXFAJF6-BJoNIKQC.js} +1 -1
  111. package/dist/web/assets/{vennDiagram-L72KCM5P-DfURoA_U.js → vennDiagram-L72KCM5P-DKRz7LAp.js} +1 -1
  112. package/dist/web/assets/{wardleyDiagram-EHGQE667-BJTuXTfz.js → wardleyDiagram-EHGQE667-CzSi7t19.js} +1 -1
  113. package/dist/web/assets/{xychartDiagram-FW5EYKEG-BruFcrd-.js → xychartDiagram-FW5EYKEG-CKOX-yaI.js} +1 -1
  114. package/dist/web/index.html +2 -2
  115. package/dist/web/obsidian-editor-assets.json +1 -1
  116. package/package.json +1 -1
  117. package/dist/web/assets/App-Bw9Q-kI5.css +0 -1
  118. package/dist/web/assets/App-DFMRw4Fj.js +0 -2
  119. package/dist/web/assets/BrowserControlPanel-K-f_KMTt.js +0 -1
  120. package/dist/web/assets/FilesControlPanel-DlSUh03w.js +0 -1
  121. package/dist/web/assets/FilesControlPanel-PdhHw9AQ.css +0 -1
  122. package/dist/web/assets/ImageViewer-BGEOxuV3.js +0 -1
  123. package/dist/web/assets/NewSessionDialog-C4RkGYOJ.css +0 -1
  124. package/dist/web/assets/NewSessionDialog-CM5UMy33.js +0 -1
  125. package/dist/web/assets/RemoteLifeOSBlock-INrlOM1O.js +0 -2
  126. package/dist/web/assets/TerminalControlPanel-CcDilPZY.js +0 -1
  127. package/dist/web/assets/ThemeSettingsPanel-DyQIWRlL.js +0 -1
  128. package/dist/web/assets/channel-CL_-wxGg.js +0 -1
  129. package/dist/web/assets/classDiagram-OUVF2IWQ-C0QG8J89.js +0 -1
  130. package/dist/web/assets/classDiagram-v2-EOCWNBFH-C0QG8J89.js +0 -1
  131. package/dist/web/assets/clsx-BNl54vr7.js +0 -1
  132. package/dist/web/assets/file-editor-FileCodeEditor-DsxCu0Se.js +0 -2
  133. package/dist/web/assets/file-editor-ObsidianFileEditor-CHQ4_ygH.js +0 -2
  134. package/dist/web/assets/file-editor-index-Cubo6rhP.js +0 -1
  135. package/dist/web/assets/highlighted-body-TPN3WLV5-DeaJXkFu.js +0 -1
  136. package/dist/web/assets/index-BmushmS_.js +0 -2
  137. package/dist/web/assets/index-Y4eH8Xel.css +0 -1
  138. package/dist/web/assets/logo-SQcOtj-8.png +0 -0
  139. package/dist/web/assets/mermaid-O7DHMXV3-DqNZp9oe.js +0 -2
  140. package/dist/web/assets/stateDiagram-v2-6OUMAXLB-CTC96jcC.js +0 -1
  141. package/dist/web/assets/swimlanesDiagram-G3AALYLV-XXos6SqD.js +0 -1
@@ -0,0 +1 @@
1
+ import{c as e,r,h as t,j as s,E as a}from"./index-CdwajBhR.js";import{X as o,G as l,g as n,C as i,e as c,s as d}from"./App-DenA3QIb.js";import{a as u,A as b}from"./arrow-right-CF_MlpxP.js";const p=e("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]),w=(e,r)=>{const t=document.createElement("iframe");t.className="browser-page",t.title=e.getAttribute("aria-label")||"Browser",t.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox allow-downloads"),t.referrerPolicy="no-referrer",e.append(t);const s=[];let a=-1,o=!1;const l=()=>r({url:s[a]||"",title:"",loading:o,canGoBack:a>0,canGoForward:a<s.length-1}),n=()=>{o=!0,t.src=s[a],l()};return t.addEventListener("load",()=>{o=!1,l()}),{navigate:e=>{s.splice(a+1),s.push(e),a++,n()},back:()=>{a>0&&(a--,n())},forward:()=>{a<s.length-1&&(a++,n())},reload:()=>{a>=0&&n()},stop:()=>{o=!1;try{t.contentWindow?.stop()}catch{}l()},destroy:()=>t.remove()}},f={url:"",title:"",loading:!1,canGoBack:!1,canGoForward:!1};function h({t:e,onTitleChange:h,dockActions:m,onClose:x,initialUrl:g,onUrlChange:j,visible:v=!0}){const k=r.useRef(null),y=r.useRef(null),E=r.useRef(null),[C,N]=r.useState(""),[A,R]=r.useState(f),[U,$]=r.useState(!1),[B,F]=r.useState(!1),[G,L]=r.useState("idle");r.useEffect(()=>{v&&B&&E.current?.focus()},[v,B]),r.useEffect(()=>{L("idle")},[A.url]),r.useEffect(()=>{if("idle"===G)return;const e=setTimeout(()=>L("idle"),2e3);return()=>clearTimeout(e)},[G]),r.useEffect(()=>{j?.(A.url)},[A.url,j]),r.useEffect(()=>{A.url&&h?.(A.title||new URL(A.url).hostname)},[A.title,A.url,e.browser]);const S=!!t().mountBrowser;r.useEffect(()=>{if(!k.current)return;const e=(t().mountBrowser||w)(k.current,e=>{R(e),document.activeElement!==E.current&&N(e.url)});return y.current=e,()=>{y.current=null,e.destroy()}},[]),r.useEffect(()=>{g&&y.current?.navigate(g)},[g]);const D=(e,r,t,a=!1)=>s.jsx("button",{type:"button",title:e,"aria-label":e,onClick:t,disabled:a,children:s.jsx(r,{"aria-hidden":"true"})});return s.jsxs("section",{className:"embedded-browser-panel","aria-label":e.browser,children:[s.jsxs("div",{className:"browser-navigation",children:[m,D(e.browserBack,u,()=>y.current?.back(),!A.canGoBack),D(e.browserForward,b,()=>y.current?.forward(),!A.canGoForward),D(S&&A.loading?e.browserStop:e.browserReload,S&&A.loading?o:p,()=>S&&A.loading?y.current?.stop():y.current?.reload(),!A.url),B?s.jsxs("form",{className:"browser-address",onSubmit:e=>{e.preventDefault();const r=function(e){const r=e.trim();if(!r)return null;let t=r;if(/^[a-z][a-z\d+.-]*:/i.test(r)&&!/^[^:/\s]+:\d+(?:[/?#]|$)/.test(r)){if(!/^https?:\/\//i.test(r))return null}else t=/^(localhost|127\.0\.0\.1|\[::1\])(?::\d+)?(?:[/?#]|$)/i.test(r)?`http://${r}`:!/\s/.test(r)&&/^[^/]+\.[^/]+/.test(r)?`https://${r}`:`https://www.google.com/search?q=${encodeURIComponent(r)}`;try{const e=new URL(t);return!/^https?:$/.test(e.protocol)||e.username||e.password?null:e.href}catch{return null}}(C);r&&new URL(r).origin!==window.location.origin?($(!1),N(r),y.current?.navigate(r),E.current?.blur(),F(!1)):$(!0)},children:[s.jsx(l,{"aria-hidden":"true"}),s.jsx("input",{ref:E,value:C,onChange:e=>{N(e.target.value),$(!1)},"aria-label":e.browserAddress,placeholder:e.browserAddress,autoComplete:"off",spellCheck:!1,"aria-invalid":U,onFocus:e=>e.target.select(),onKeyDown:e=>{"Escape"===e.key&&(F(!1),$(!1),N(A.url))}})]}):s.jsx("button",{type:"button",className:"browser-page-title",title:A.url||e.browserAddress,"aria-label":e.browserAddress,"aria-expanded":B,onClick:()=>{N(A.url),$(!1),F(!0)},children:A.title||e.browser}),D("copied"===G?e.browserUrlCopied:e.browserCopyUrl,"copied"===G?i:c,()=>{n(A.url).then(()=>L("copied"),()=>L("failed"))},!A.url),s.jsx("a",{href:A.url||void 0,target:"_blank",rel:"noopener noreferrer","aria-label":e.browserExternal,title:e.browserExternal,"aria-disabled":!A.url,onClick:e=>{A.url?t().openExternal&&(e.preventDefault(),t().openExternal(A.url)):e.preventDefault()},children:s.jsx(a,{"aria-hidden":"true"})}),x&&s.jsx("button",{type:"button","aria-label":`${e.close} ${A.title||e.browser}`,title:d(e.close,"closeTab"),onClick:x,children:s.jsx(o,{"aria-hidden":"true"})})]}),"failed"===G&&s.jsx("p",{className:"browser-status",role:"alert",children:e.browserCopyFailed}),U&&s.jsx("p",{className:"browser-status",role:"alert",children:e.browserInvalidAddress}),A.error&&s.jsxs("div",{className:"browser-load-error",role:"alert",children:[s.jsx("p",{children:e.browserLoadFailed}),s.jsx("small",{children:A.error}),s.jsx("button",{type:"button",onClick:()=>y.current?.reload(),children:e.retry})]}),A.loading&&s.jsx("div",{className:"browser-loading",role:"status","aria-label":e.browserLoading}),s.jsx("div",{ref:k,role:"region",className:"browser-surface","aria-label":e.browser,hidden:!A.url||!!A.error}),!A.url&&s.jsxs("div",{className:"browser-empty",children:[s.jsx(l,{"aria-hidden":"true"}),s.jsx("p",{children:e.browserWelcome})]}),!S&&A.url&&s.jsx("p",{className:"browser-status",children:e.browserEmbedHint})]})}export{h as default};
@@ -1 +1 @@
1
- import{j as e}from"./index-BmushmS_.js";function a({ariaLabel:a,options:l,value:i,disabled:o,onChange:r}){return e.jsx("div",{className:"chip-group",role:"radiogroup","aria-label":a,children:l.map(a=>e.jsx("button",{"aria-checked":i===a.value,className:i===a.value?"selected":"",disabled:o,onClick:()=>r(a.value),role:"radio",title:a.title??a.label,type:"button",children:a.label},a.value))})}export{a as C};
1
+ import{j as e}from"./index-CdwajBhR.js";function a({ariaLabel:a,options:l,value:i,disabled:o,onChange:r}){return e.jsx("div",{className:"chip-group",role:"radiogroup","aria-label":a,children:l.map(a=>e.jsx("button",{"aria-checked":i===a.value,className:i===a.value?"selected":"",disabled:o,onClick:()=>r(a.value),role:"radio",title:a.title??a.label,type:"button",children:a.label},a.value))})}export{a as C};
@@ -0,0 +1 @@
1
+ import{c as e,j as t,f as r,r as n,E as a,u as o,b as s,d as i}from"./index-CdwajBhR.js";import{X as l,e as c,P as d,T as u,D as p,E as h,H as m,g as y,J as f,c as g,t as x,M as b,N as v,L as j,R as w,A as k,O as D,Q as E,k as C,U as N,V as _}from"./App-DenA3QIb.js";import{F as S}from"./folder-plus-BuIbO5rO.js";const M=e("clipboard-paste",[["path",{d:"M11 14h10",key:"1w8e9d"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v1.344",key:"1e62lh"}],["path",{d:"m17 18 4-4-4-4",key:"z2g111"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113",key:"bjbb7m"}],["rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",key:"ublpy"}]]),F=e("file-code-corner",[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]]),L=e("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),T=e("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]),P=e("scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]);function A({ops:e,onOpen:r,root:o}){const s=n.useRef(null),i=e.menu;n.useLayoutEffect(()=>{const t=s.current,r=document.activeElement,n=t.getBoundingClientRect();t.style.left=`${Math.max(8,Math.min(i.x,innerWidth-n.width-8))}px`,t.style.top=`${Math.max(8,Math.min(i.y,innerHeight-n.height-8))}px`,t.querySelector("button:not(:disabled)")?.focus();const a=r=>{t.contains(r.target)||e.setMenu(null)},o=()=>e.setMenu(null);return document.addEventListener("pointerdown",a),document.addEventListener("scroll",o,!0),window.addEventListener("resize",o),()=>{document.removeEventListener("pointerdown",a),document.removeEventListener("scroll",o,!0),window.removeEventListener("resize",o),t.contains(document.activeElement)&&r?.focus()}},[]);const l=t=>{e.setMenu(null),t()};return t.jsxs("div",{ref:s,role:"menu","aria-label":e.strings.open,className:"session-context-menu file-tree-menu",style:{left:i.x,top:i.y},onKeyDown:t=>{t.stopPropagation();const r=Array.from(s.current.querySelectorAll("button:not(:disabled)")),n=r.indexOf(document.activeElement);["ArrowUp","ArrowDown","Home","End","Escape","Tab"].includes(t.key)&&t.preventDefault(),"Escape"!==t.key&&"Tab"!==t.key||e.setMenu(null),"ArrowDown"===t.key&&r[(n+1)%r.length]?.focus(),"ArrowUp"===t.key&&r[(n-1+r.length)%r.length]?.focus(),"Home"===t.key&&r[0]?.focus(),"End"===t.key&&r.at(-1)?.focus()},onContextMenu:e=>e.preventDefault(),children:[!i.directory&&t.jsxs("button",{type:"button",role:"menuitem",onClick:()=>l(r),children:[t.jsx(a,{}),e.strings.open]}),i.path!==o&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{type:"button",role:"menuitem",onClick:()=>e.copy(i,!1),children:[t.jsx(c,{}),e.strings.copy,t.jsx("kbd",{children:"⌘C"})]}),t.jsxs("button",{type:"button",role:"menuitem",onClick:()=>e.copy(i,!0),children:[t.jsx(P,{}),e.strings.cut,t.jsx("kbd",{children:"⌘X"})]})]}),t.jsxs("button",{type:"button",role:"menuitem",disabled:!e.canPaste,onClick:()=>l(()=>{e.paste(i)}),children:[t.jsx(M,{}),e.strings.paste,t.jsx("kbd",{children:"⌘V"})]}),t.jsxs("button",{type:"button",role:"menuitem",onClick:()=>l(()=>{e.copyPath(i)}),children:[t.jsx(T,{}),e.strings.copyPath]}),i.path!==o&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"context-menu-separator"}),t.jsxs("button",{type:"button",role:"menuitem",onClick:()=>e.startRename(i),children:[t.jsx(d,{}),e.strings.rename,t.jsx("kbd",{children:"F2"})]}),t.jsxs("button",{type:"button",role:"menuitem",className:"danger",onClick:()=>l(()=>e.setDeleting(i)),children:[t.jsx(u,{}),e.strings.delete]})]})]})}function O({ops:e}){const r=o(()=>{e.busy||e.setDeleting(null)});return t.jsx("div",{className:"app-confirmation-layer",children:t.jsxs("div",{ref:r,className:"app-confirmation file-tree-delete-dialog",role:"dialog","aria-modal":"true","aria-label":e.strings.confirmDelete,tabIndex:-1,children:[t.jsx("h2",{children:e.strings.confirmDelete}),t.jsx("p",{children:e.deleting?.path}),t.jsx("p",{children:e.strings.deleteHint}),e.error&&t.jsx("p",{role:"alert",children:e.error}),t.jsxs("footer",{children:[t.jsx("button",{type:"button",disabled:e.busy,onClick:()=>e.setDeleting(null),children:e.strings.cancel}),t.jsx("button",{type:"button",className:"destructive",disabled:e.busy,onClick:()=>{e.deleteItem()},children:e.strings.delete})]})]})})}function R({ops:e,root:n,onOpen:a}){return t.jsxs(t.Fragment,{children:[e.menu&&r.createPortal(t.jsx(A,{ops:e,root:n,onOpen:a}),document.body),e.deleting&&r.createPortal(t.jsx(O,{ops:e}),document.body),e.error&&!e.deleting&&t.jsxs("div",{className:"file-tree-notice",role:"alert",children:[t.jsx("span",{children:e.error}),t.jsx("button",{type:"button",title:e.strings.dismiss,"aria-label":e.strings.dismiss,onClick:()=>e.setError(""),children:t.jsx(l,{})})]}),e.undo&&t.jsxs("div",{className:"file-tree-notice",role:"status",children:[t.jsx("span",{children:e.strings.deleted}),t.jsx("button",{type:"button",disabled:e.busy,onClick:()=>{e.restore()},children:e.strings.undo}),t.jsx("button",{type:"button",title:e.strings.dismiss,"aria-label":e.strings.dismiss,onClick:()=>e.setUndo(null),children:t.jsx(l,{})})]})]})}function I(e){return[...e].sort((e,t)=>Number(t.isDirectory)-Number(e.isDirectory)||e.name.localeCompare(t.name,void 0,{numeric:!0,sensitivity:"base"}))}const K={copy:"Copy",cut:"Cut",paste:"Paste",copyPath:"Copy path",editPath:"Edit directory path",rename:"Rename",delete:"Delete",cancel:"Cancel",confirmDelete:"Delete this item?",deleteHint:"You can undo this deletion after it finishes.",deleted:"Deleted",undo:"Undo",dismiss:"Dismiss",name:"Name",open:"Open",errors:{destination_exists:"An item with this name already exists.",recursive_destination:"Choose a different folder.",outside_root:"Choose a destination inside this folder.",protected_path:"This location is protected.",invalid_operation:"Enter a valid file name.",unsaved_changes:"Save the open file changes first.",daemon_update_required:"Update Vibelet on the connected computer to enable file operations.",ENOENT:"The file or folder no longer exists. Refresh the tree.",EACCES:"Permission denied.",EXDEV:"Moving between disks is unavailable. Copy the item first.",operation_failed:"File operation failed.",source_cleanup_failed:"A recovery copy was saved, but the original could not be fully removed. Check file permissions before retrying.",refresh_failed:"The operation succeeded, but the file tree could not refresh. Refresh it to see the changes."}},H={copy:"复制",cut:"剪切",paste:"粘贴",copyPath:"复制路径",editPath:"修改目录路径",rename:"重命名",delete:"删除",cancel:"取消",confirmDelete:"删除这个项目?",deleteHint:"删除完成后可以撤销。",deleted:"已删除",undo:"撤销",dismiss:"关闭",name:"名称",open:"打开",errors:{destination_exists:"已有同名文件或文件夹,请换一个名称。",recursive_destination:"不能移动或复制到自身目录中。",outside_root:"请选择当前文件夹内的目标目录。",protected_path:"不能操作这个受保护的位置。",invalid_operation:"请输入有效的文件名。",unsaved_changes:"请先保存已打开文件的修改。",daemon_update_required:"请更新被连接电脑上的 Vibelet,以启用文件操作。",ENOENT:"文件或文件夹已不存在,请刷新文件树。",EACCES:"没有操作权限。",EXDEV:"暂不支持跨磁盘移动,请先复制。",operation_failed:"文件操作失败。",source_cleanup_failed:"已保存恢复副本,但原文件未能完整移除。请检查文件权限后再重试。",refresh_failed:"操作已成功,但文件树刷新失败,请刷新查看结果。"}},q={copy:"複製",cut:"剪下",paste:"貼上",copyPath:"複製路徑",editPath:"修改目錄路徑",rename:"重新命名",delete:"刪除",cancel:"取消",confirmDelete:"刪除這個項目?",deleteHint:"刪除完成後可以復原。",deleted:"已刪除",undo:"復原",dismiss:"關閉",name:"名稱",open:"開啟",errors:{destination_exists:"已有同名檔案或資料夾,請換一個名稱。",recursive_destination:"不能移動或複製到自身目錄中。",outside_root:"請選擇目前資料夾內的目標目錄。",protected_path:"不能操作這個受保護的位置。",invalid_operation:"請輸入有效的檔案名稱。",unsaved_changes:"請先儲存已開啟檔案的修改。",daemon_update_required:"請更新被連接電腦上的 Vibelet,以啟用檔案操作。",ENOENT:"檔案或資料夾已不存在,請重新整理檔案樹。",EACCES:"沒有操作權限。",EXDEV:"暫不支援跨磁碟移動,請先複製。",operation_failed:"檔案操作失敗。",source_cleanup_failed:"已儲存復原副本,但原檔案未能完整移除。請檢查檔案權限後再重試。",refresh_failed:"操作已成功,但檔案樹重新整理失敗,請重新整理查看結果。"}};let U=null,V=null;const z="application/x-vibelet-file",X="vibelet:file-clipboard";function B({cwd:e,entries:r,error:a,loaded:o,loading:l,path:c,selectedPath:u,t:M,onListDirectory:T,onLoadChildren:P,onNewFolder:A,onOpenRemoteFile:O}){const B=p(),$=JSON.stringify([B?.scopeKey??"default",c]),Y=function(e,t,r){const a=p(),o=JSON.stringify([a?.scopeKey??"default",e]),[s,i]=h(o,()=>new Set),[l,c]=h(o,()=>({})),[d,u]=h(o,()=>new Set),[m,y]=h(o,()=>({})),f=n.useRef(0),g=n.useRef(new Set);n.useEffect(()=>{f.current++,g.current.clear(),u(new Set);for(const e of s)l[e]||x(e);return()=>{f.current++}},[e,o]);const x=async e=>{if(i(t=>new Set(t).add(e)),l[e]||g.current.has(e))return;const t=f.current;g.current.add(e),u(t=>new Set(t).add(e)),y(t=>{const r={...t};return delete r[e],r});try{const n=await r(e);f.current===t&&c(t=>({...t,[e]:I(n)}))}catch{f.current===t&&y(t=>({...t,[e]:"unavailable"}))}finally{f.current===t&&(g.current.delete(e),u(t=>{const r=new Set(t);return r.delete(e),r}))}};return{refresh:async()=>{const e=++f.current;g.current.clear(),u(new Set(s)),y({});const t=await Promise.all([...s].map(async e=>{try{return[e,I(await r(e))]}catch{return null}}));e===f.current&&(c(Object.fromEntries(t.filter(e=>null!==e))),i(new Set(t.flatMap(e=>e?[e[0]]:[]))),u(new Set))},expanded:s,children:l,loading:d,errors:m,collapse:e=>i(t=>{const r=new Set(t);return r.delete(e),r}),expand:x}}(c,0,P),J=function(e,t){const r=function(){const e=s(i().language);return"en"===e?K:"zh-TW"===e?q:H}(),[a,o]=n.useState(null),[l,d]=n.useState(null),[u,p]=n.useState(""),[h,j]=n.useState(null),[w,k]=n.useState(null),[D,E]=n.useState(""),C=e=>{e&&E(""),j(e)},[N,_]=n.useState(!1),S=n.useRef(!1),[M,F]=n.useState(null),[,L]=n.useState(0),P=m(),A=P?.daemonId;n.useEffect(()=>{const e=()=>L(e=>e+1);return window.addEventListener(X,e),()=>window.removeEventListener(X,e)},[]),n.useEffect(()=>{o(null),d(null),C(null),k(null),E(""),F(null)},[e,t,A]);const O=e=>{const t=e instanceof Error?e.message:"operation_failed";E(r.errors[t]??r.errors.operation_failed)},R=async n=>{if(!P||S.current)return!1;S.current=!0,_(!0),E("");try{const a=await v({...n,root:e,cwd:t},P);if(m()?.daemonId===A){"delete"===a.action&&k(a);try{await(async()=>{T(c),await Y.refresh()})()}catch{E(r.errors.refresh_failed)}}return!0}catch(a){return O(a),!1}finally{S.current=!1,_(!1)}},I=(r,n)=>{A&&(U={target:r,cut:n,daemonId:A,root:e,cwd:t},window.dispatchEvent(new Event(X)),o(null),E(""))},B=t=>t.directory?t.path:b(t.path)??e,$=Boolean(U&&U.daemonId===A),J=async e=>{const r=U;$&&r&&await R({action:r.cut?"move":"copy",path:r.target.path,sourceRoot:r.root,sourceCwd:r.cwd,target:x(B(e),g(r.target.path)),autoRename:!r.cut&&f(B(e),t)===f(b(r.target.path)??r.root,r.cwd)})&&r.cut&&U===r&&(U=null,window.dispatchEvent(new Event(X)))},W=(e,t,r)=>{S.current||o({...e,x:t,y:r})},Q=e=>{d(e),p(g(e.path)),o(null),E("")},G=r=>{if(!V||V.daemonId!==A||V.root!==e||V.cwd!==t||S.current)return!1;const n=f(V.target.path,t),a=f(r,t);return a!==n&&!a.startsWith(`${n}/`)&&f(b(V.target.path)??e,t)!==a};return{strings:r,menu:a,setMenu:o,rename:l,setRename:d,name:u,setName:p,deleting:h,setDeleting:C,error:D,setError:E,busy:N,undo:w,setUndo:k,canPaste:$,copy:I,paste:J,key:(e,t)=>{if(e.target!==e.currentTarget)return!1;if((e.metaKey||e.ctrlKey)&&["c","x","v"].includes(e.key.toLowerCase()))return e.preventDefault(),"v"===e.key.toLowerCase()?J(t):I(t,"x"===e.key.toLowerCase()),!0;if("F2"===e.key)return e.preventDefault(),Q(t),!0;if("Delete"===e.key||e.metaKey&&"Backspace"===e.key)return e.preventDefault(),C(t),!0;if("ContextMenu"===e.key||e.shiftKey&&"F10"===e.key){e.preventDefault();const r=e.currentTarget.getBoundingClientRect();return W(t,r.left+20,r.top+24),!0}return!1},startRename:Q,commitRename:async()=>{if(!l)return;const t=u.trim();t&&!/[/\\\x00]/.test(t)&&"."!==t&&".."!==t?t!==g(l.path)?await R({action:"move",path:l.path,target:x(b(l.path)??e,t)})&&d(null):d(null):O(new Error("invalid_operation"))},openMenu:W,copyPath:async e=>{try{await y(f(e.path,t))}catch(r){O(r)}},deleteItem:async()=>{h&&await R({action:"delete",path:h.path})&&C(null)},restore:async()=>{w&&await R({action:"restore",path:w.path,recoveryId:w.recoveryId})&&k(null)},isCut:e=>Boolean(U?.cut&&U.daemonId===A&&U.target.path===e),dropTarget:M,dragStart:(r,n)=>{A&&!S.current?(V={target:n,cut:!0,daemonId:A,root:e,cwd:t},r.dataTransfer.setData(z,n.path),r.dataTransfer.effectAllowed="copyMove",o(null)):r.preventDefault()},dragEnd:()=>{V=null,F(null)},dragOver:(e,t)=>{e.dataTransfer.types.includes(z)&&G(t)&&(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=e.altKey?"copy":"move",F(t))},dragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||F(null)},drop:(e,t)=>{e.preventDefault(),e.stopPropagation(),F(null),e.dataTransfer.types.includes(z)&&G(t)&&V&&R({action:e.altKey?"copy":"move",path:V.target.path,target:x(t,g(V.target.path))})}}}(c,e),W=n.useRef(null),[Q,G]=h($,!0),[Z,ee]=n.useState(!1),[te,re]=n.useState(c),[ne,ae]=n.useState(u),[oe,se]=n.useState();n.useEffect(()=>{re(c),ee(!1)},[c,$]),n.useEffect(()=>se(void 0),[c,r]),n.useEffect(()=>{ae(u)},[u]);const ie=(t,r)=>{t.isDirectory?Y.expanded.has(r)?Y.collapse(r):Y.expand(r):(ae(r),O(r,e))},le=e=>e?.focus(),ce=I(r),de=(e,r,n)=>e.map((a,o)=>{const s=x(r,a.name),i=Y.expanded.has(s),l=a.isDirectory?i?C:N:function(e){return/\.(png|jpe?g|gif|webp|svg|ico)$/i.test(e)?L:/\.(tsx?|jsx?|json|css|html|py|rs|go|swift|ya?ml|sh)$/i.test(e)?F:_}(a.name);return t.jsxs("div",{role:"treeitem","aria-label":a.name,"aria-level":n+1,"aria-posinset":o+1,"aria-setsize":e.length,"aria-expanded":a.isDirectory?i:void 0,"aria-selected":ne===s,"aria-busy":Y.loading.has(s)||void 0,"data-path":s,className:"explorer-tree-item",tabIndex:oe===s||!oe&&0===n&&0===o?0:-1,onFocus:e=>{e.target===e.currentTarget&&se(s)},onKeyDown:e=>((e,t,r)=>{if(e.stopPropagation(),J.key(e,{path:r,directory:t.isDirectory}))return;if(e.target instanceof HTMLInputElement)return;const n=Array.from(W.current?.querySelectorAll('[role="treeitem"]')??[]),a=n.indexOf(e.currentTarget);["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","Enter"," "].includes(e.key)&&e.preventDefault(),"ArrowUp"===e.key&&le(n[Math.max(0,a-1)]),"ArrowDown"===e.key&&le(n[Math.min(n.length-1,a+1)]),"Home"===e.key&&le(n[0]),"End"===e.key&&le(n.at(-1)),"ArrowRight"===e.key&&t.isDirectory&&(!Y.expanded.has(r)||Y.errors[r]?Y.expand(r):le(e.currentTarget.querySelector('[role="treeitem"]'))),"ArrowLeft"===e.key&&(t.isDirectory&&Y.expanded.has(r)?Y.collapse(r):le(e.currentTarget.parentElement?.closest('[role="treeitem"]'))),"Enter"!==e.key&&" "!==e.key||ie(t,r)})(e,a,s),children:[t.jsxs("div",{className:"explorer-tree-row",draggable:!J.busy&&J.rename?.path!==s,"data-cut":J.isCut(s)||void 0,"data-drop":J.dropTarget===s||void 0,onContextMenu:e=>{e.preventDefault(),e.stopPropagation(),le(e.currentTarget.parentElement),J.openMenu({path:s,directory:a.isDirectory},e.clientX,e.clientY)},onDragStart:e=>J.dragStart(e,{path:s,directory:a.isDirectory}),onDragEnd:J.dragEnd,onDragOver:e=>a.isDirectory&&J.dragOver(e,s),onDragLeave:J.dragLeave,onDrop:e=>a.isDirectory&&J.drop(e,s),style:{paddingLeft:8+14*n},title:s,onClick:e=>{le(e.currentTarget.parentElement),ie(a,s)},children:[t.jsx("span",{className:"explorer-chevron","aria-hidden":"true",children:a.isDirectory&&(Y.loading.has(s)?t.jsx(j,{className:"explorer-spinner"}):i?t.jsx(D,{}):t.jsx(E,{}))}),t.jsx(l,{className:a.isDirectory?"explorer-folder-icon":"explorer-file-icon","aria-hidden":"true"}),t.jsx("span",{className:"explorer-entry-name",children:J.rename?.path===s?t.jsx("input",{className:"explorer-rename","aria-label":J.strings.name,autoFocus:!0,value:J.name,disabled:J.busy,onFocus:e=>e.target.select(),onClick:e=>e.stopPropagation(),onChange:e=>J.setName(e.target.value),onKeyDown:e=>{e.stopPropagation(),"Enter"===e.key&&(e.preventDefault(),J.commitRename()),"Escape"===e.key&&(e.preventDefault(),J.setRename(null))}}):a.name})]}),a.isDirectory&&i&&t.jsxs("div",{role:"group",className:"explorer-tree-group",style:{"--tree-guide-left":14+14*n+"px"},children:[Y.children[s]?de(Y.children[s],s,n+1):null,Y.errors[s]&&t.jsx("button",{className:"explorer-retry",type:"button",onClick:()=>{Y.expand(s)},children:M.retry}),0===Y.children[s]?.length&&t.jsx("p",{className:"explorer-empty",style:{paddingLeft:36+14*n},children:M.noFilesInDirectory})]})]},s)});return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"explorer-heading",children:[t.jsx("h2",{children:M.fileTree}),t.jsxs("div",{className:"explorer-actions",children:[t.jsx("button",{className:"icon-button",title:J.strings.editPath,"aria-label":J.strings.editPath,"aria-expanded":Z,onClick:()=>{re("."===c?e:c),ee(e=>!e)},type:"button",children:t.jsx(d,{"aria-hidden":"true"})}),t.jsx("button",{className:"icon-button",title:M.newFolder,"aria-label":M.newFolder,onClick:A,type:"button",children:t.jsx(S,{"aria-hidden":"true"})}),t.jsx("button",{className:"icon-button",title:M.refreshFiles,"aria-label":M.refreshFiles,disabled:l,onClick:()=>{T(c),Y.refresh()},type:"button",children:l?t.jsx(j,{className:"explorer-spinner","aria-hidden":"true"}):t.jsx(w,{"aria-hidden":"true"})}),t.jsx("button",{className:"icon-button",title:M.parentFolder,"aria-label":M.parentFolder,disabled:!b(c),onClick:()=>T(b(c)??c),type:"button",children:t.jsx(k,{"aria-hidden":"true"})})]})]}),t.jsxs("button",{type:"button",className:"explorer-root-path",onContextMenu:e=>{e.preventDefault(),J.openMenu({path:c,directory:!0},e.clientX,e.clientY)},onDragOver:e=>J.dragOver(e,c),onDragLeave:J.dragLeave,onDrop:e=>J.drop(e,c),"data-drop":J.dropTarget===c||void 0,title:"."===c?e:c,"aria-expanded":Q,onClick:()=>{G(e=>!e),ee(!1)},children:[Q?t.jsx(D,{"aria-hidden":"true"}):t.jsx(E,{"aria-hidden":"true"}),Q?t.jsx(C,{"aria-hidden":"true"}):t.jsx(N,{"aria-hidden":"true"}),t.jsx("span",{children:g("."===c?e:c)||c})]}),Z&&t.jsx("form",{className:"explorer-path-form",onSubmit:e=>{e.preventDefault(),te.trim()&&(T(te.trim()),ee(!1))},children:t.jsx("input",{autoFocus:!0,"aria-label":M.path,value:te,onChange:e=>re(e.target.value),onKeyDown:e=>{"Escape"===e.key&&ee(!1)}})}),a&&t.jsx("p",{className:"empty-copy",role:"alert",children:a}),l&&t.jsx("p",{className:"explorer-empty",role:"status",children:M.loadingFiles}),Q&&t.jsx("div",{ref:W,role:"tree","aria-label":M.fileTree,className:"explorer-tree","aria-busy":l||J.busy,"data-drop":J.dropTarget===c||void 0,onContextMenu:e=>{e.preventDefault(),J.openMenu({path:c,directory:!0},e.clientX,e.clientY)},onDragOver:e=>J.dragOver(e,c),onDragLeave:J.dragLeave,onDrop:e=>J.drop(e,c),children:de(ce,c,0)}),t.jsx(R,{ops:J,root:c,onOpen:()=>J.menu&&O(J.menu.path,e)}),Q&&o&&!l&&!a&&0===r.length&&t.jsx("p",{className:"explorer-empty",children:M.noFilesInDirectory})]})}function $({busy:e,onLoadChildren:r,cwd:n,directory:a,newDirName:o,remoteFile:s,t:i,onCreateDirectory:l,onListDirectory:c,onNewDirNameChange:d,onOpenRemoteFile:u}){const m=p(),[y,f]=h(m?.scopeKey??"default",!1);return t.jsx(t.Fragment,{children:t.jsxs("section",{className:"control-section files-explorer",children:[t.jsx(B,{cwd:n,selectedPath:s?.path,onLoadChildren:r,onNewFolder:()=>f(e=>!e),entries:a.entries,error:a.error,loaded:a.loaded,loading:a.loading,path:a.path,t:i,onListDirectory:c,onOpenRemoteFile:u}),y&&t.jsxs("div",{className:"field-row file-tree-create",children:[t.jsx("input",{value:o,onChange:e=>d(e.target.value),placeholder:i.newFolder,"aria-label":i.newFolder,autoFocus:!0,onKeyDown:t=>{"Escape"===t.key&&(f(!1),d("")),"Enter"===t.key&&o.trim()&&!e&&l()}}),t.jsxs("button",{className:"icon-text-button",onClick:l,type:"button",disabled:e||!o.trim(),children:[t.jsx(N,{"aria-hidden":"true"}),i.create]})]})]})})}export{$ as FilesControlPanel};
@@ -0,0 +1 @@
1
+ .file-tree-menu{z-index:1100;border-radius:8px;width:204px;min-width:190px;padding:6px}.file-tree-menu button{gap:9px;min-height:29px;padding:5px 8px;font-size:12px}.file-tree-menu button svg{flex-shrink:0;width:14px;height:14px}.file-tree-menu kbd{font:inherit;opacity:.55;margin-left:auto}.explorer-tree-row[data-cut=true]{opacity:.45}.explorer-tree-row[data-drop=true],.explorer-tree[data-drop=true]{outline:1px solid var(--accent);outline-offset:-1px;background:color-mix(in srgb, var(--accent) 8%, transparent)}.explorer-entry-name{min-width:0}.explorer-rename{width:100%;height:21px;min-height:0;font:inherit;border-radius:3px;outline:none;padding:0 3px}.file-tree-notice{align-items:center;gap:7px;padding:7px 8px;font-size:12px;display:flex}.file-tree-notice span{flex:1}.file-tree-notice button{background:0 0;border:0;padding:3px 5px;font-size:12px}.file-tree-notice svg{width:13px;height:13px}.file-tree-delete-dialog p+p{margin-top:8px}.explorer-tree{min-height:48px}.explorer-root-path[data-drop=true]{outline:1px solid var(--accent);outline-offset:-1px}.app-confirmation-layer{z-index:2000;background:#00000038;place-items:center;padding:24px;display:grid;position:fixed;inset:0}.app-confirmation{border:1px solid var(--border);background:var(--bg);width:min(420px,100%);color:var(--text);border-radius:16px;padding:24px;animation:.14s ease-out app-confirmation-enter;box-shadow:0 20px 64px #0000002e}.app-confirmation h2{margin:0 0 12px;font-size:16px;font-weight:600}.app-confirmation p{white-space:pre-wrap;overflow-wrap:anywhere;color:var(--text-secondary);max-height:50vh;margin:0;font-size:13px;line-height:1.65;overflow:auto}.app-confirmation footer{justify-content:flex-end;gap:8px;margin-top:24px;display:flex}.app-confirmation button{background:var(--panel);width:auto;min-width:68px;color:var(--text);border:0;border-radius:8px;padding:7px 14px;font-size:13px}.app-confirmation button:hover{background:var(--sidebar-selection)}.app-confirmation button.primary{background:var(--accent);color:#fff}.app-confirmation button.destructive{color:#fff;background:#c93333}.app-confirmation button.primary:hover,.app-confirmation button.destructive:hover{filter:brightness(.92)}.app-confirmation button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}@keyframes app-confirmation-enter{0%{opacity:0;transform:translateY(5px)scale(.99)}to{opacity:1;transform:none}}@media (prefers-reduced-motion:reduce){.app-confirmation{animation:none}}
@@ -1 +1 @@
1
- import{j as e,r as s,u as n,a as i,t}from"./index-BmushmS_.js";import{S as l,d as a,X as d,C as o,K as c}from"./App-DFMRw4Fj.js";function r({activeApproval:s,activeQuestion:n,busy:i,questionAnswers:t,t:r,onCancelQuestion:u,onQuestionChoice:p,onRespondApproval:h,onRespondQuestion:x}){const j=Boolean(s||n);return e.jsxs(e.Fragment,{children:[j?null:e.jsxs("section",{className:"control-section",children:[e.jsx("h2",{children:r.pendingActions}),e.jsx("p",{className:"empty-copy",children:r.noPendingActions})]}),s?e.jsxs("section",{className:"attention-panel",children:[e.jsxs("div",{className:"attention-head",children:[e.jsx(l,{"aria-hidden":"true"}),e.jsxs("div",{children:[e.jsx("h2",{children:r.approvalRequired}),e.jsx("p",{children:s.toolName})]})]}),e.jsx("p",{children:s.description}),"string"==typeof s.input?.command&&e.jsx("pre",{children:s.input.command}),e.jsxs("details",{className:"interaction-details",children:[e.jsx("summary",{children:r.interactionDetails}),e.jsx("pre",{children:a(s.input)})]},s.requestId),e.jsxs("div",{className:"attention-actions approval-actions",children:[e.jsxs("button",{type:"button",className:"danger-button",onClick:()=>h(!1),disabled:i,children:[e.jsx(d,{"aria-hidden":"true"}),r.deny]}),e.jsxs("button",{type:"button",className:"approve-button",onClick:()=>h(!0),disabled:i,children:[e.jsx(o,{"aria-hidden":"true"}),r.approve]})]})]}):null,n?e.jsxs("section",{className:"attention-panel",children:[e.jsxs("div",{className:"attention-head",children:[e.jsx(c,{"aria-hidden":"true"}),e.jsxs("div",{children:[e.jsx("h2",{children:r.inputNeeded}),e.jsx("p",{children:r.notificationQuestionCount(n.questions.length)})]})]}),n.questions.map(s=>e.jsxs("div",{className:"question-block",children:[e.jsx("strong",{children:s.question}),e.jsx("div",{className:"choice-list",children:s.options.map(n=>{const i=(t[s.id]??[]).includes(n.label);return e.jsxs("button",{className:i?"selected":"","aria-pressed":i,onClick:()=>p(s.id,n.label,s.multiSelect),type:"button",children:[e.jsx("span",{children:n.label}),n.description?e.jsx("small",{children:n.description}):null]},n.label)})})]},s.id)),e.jsxs("div",{className:"attention-actions",children:[e.jsxs("button",{type:"button",className:"danger-button",onClick:u,disabled:i,children:[e.jsx(d,{"aria-hidden":"true"}),r.cancel]}),e.jsxs("button",{type:"button",className:"approve-button",onClick:x,disabled:i||n.questions.some(e=>!t[e.id]?.length),children:[e.jsx(o,{"aria-hidden":"true"}),r.submit]})]})]}):null]})}function u(l){const{activeApproval:a,activeQuestion:o,pendingCount:c,requestKey:u,sessions:p,t:h,errorText:x}=l,[j,b]=s.useState(null),[m,g]=s.useState(!1),v=m||c>0&&j!==u,N=()=>{b(u),g(!1)};s.useEffect(()=>{c>0&&g(!1);const e=()=>{b(null),g(0===c)};return window.addEventListener("vibelet.pending.open",e),()=>window.removeEventListener("vibelet.pending.open",e)},[c]);const y=n(N,void 0,v),q=s=>{const n=p.find(e=>e.sessionId===s);return e.jsxs("dl",{className:"global-pending-session-context",children:[e.jsxs("div",{children:[e.jsx("dt",{children:h.session}),e.jsx("dd",{className:"global-pending-session",children:n?t(n):s})]}),e.jsxs("div",{children:[e.jsx("dt",{children:h.workingDirectory}),e.jsx("dd",{className:"global-pending-directory",children:n?.cwd||h.unknown})]})]})};return v?i.createPortal(e.jsxs("div",{className:"global-pending-layer",children:[e.jsx("div",{className:"global-pending-backdrop","aria-hidden":"true",onClick:N}),e.jsxs("div",{className:"global-pending-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"global-pending-title",tabIndex:-1,ref:y,children:[e.jsxs("header",{className:"global-pending-header",children:[e.jsxs("div",{children:[e.jsx("h2",{id:"global-pending-title",children:h.pendingActions}),e.jsx("p",{"aria-live":"polite",children:h.pendingActionCount(c)})]}),e.jsxs("div",{className:"global-pending-header-actions",children:[e.jsx("button",{className:"global-pending-clear",type:"button",disabled:0===c,onClick:l.onClearRequests,children:h.clearPendingRequests}),e.jsx("button",{className:"icon-button",type:"button","aria-label":h.close,title:h.close,onClick:N,children:e.jsx(d,{"aria-hidden":"true"})})]})]}),e.jsxs("div",{className:"global-pending-content",children:[0===c&&e.jsx("p",{className:"empty-copy",children:h.noPendingActions}),a&&e.jsxs("section",{"data-pending-session":a.sessionId,children:[e.jsxs("div",{className:"global-pending-session-row",children:[q(a.sessionId),e.jsx("button",{type:"button","aria-label":h.dismissPendingRequest,title:h.dismissPendingRequest,onClick:()=>l.onDismissRequest("approval",a.sessionId,a.requestId),children:e.jsx(d,{"aria-hidden":"true"})})]}),e.jsx(r,{...l,activeQuestion:null})]}),o&&e.jsxs("section",{"data-pending-session":o.sessionId,children:[e.jsxs("div",{className:"global-pending-session-row",children:[q(o.sessionId),e.jsx("button",{type:"button","aria-label":h.dismissPendingRequest,title:h.dismissPendingRequest,onClick:()=>l.onDismissRequest("question",o.sessionId,o.requestId),children:e.jsx(d,{"aria-hidden":"true"})})]}),e.jsx(r,{...l,activeApproval:null})]}),x&&e.jsx("p",{role:"alert",className:"global-pending-error",children:x})]})]})]}),document.body):null}export{u as default};
1
+ import{j as e,r as s,u as n,f as i,t}from"./index-CdwajBhR.js";import{S as l,d as a,X as d,C as o,K as c}from"./App-DenA3QIb.js";function r({activeApproval:s,activeQuestion:n,busy:i,questionAnswers:t,t:r,onCancelQuestion:u,onQuestionChoice:p,onRespondApproval:h,onRespondQuestion:x}){const j=Boolean(s||n);return e.jsxs(e.Fragment,{children:[j?null:e.jsxs("section",{className:"control-section",children:[e.jsx("h2",{children:r.pendingActions}),e.jsx("p",{className:"empty-copy",children:r.noPendingActions})]}),s?e.jsxs("section",{className:"attention-panel",children:[e.jsxs("div",{className:"attention-head",children:[e.jsx(l,{"aria-hidden":"true"}),e.jsxs("div",{children:[e.jsx("h2",{children:r.approvalRequired}),e.jsx("p",{children:s.toolName})]})]}),e.jsx("p",{children:s.description}),"string"==typeof s.input?.command&&e.jsx("pre",{children:s.input.command}),e.jsxs("details",{className:"interaction-details",children:[e.jsx("summary",{children:r.interactionDetails}),e.jsx("pre",{children:a(s.input)})]},s.requestId),e.jsxs("div",{className:"attention-actions approval-actions",children:[e.jsxs("button",{type:"button",className:"danger-button",onClick:()=>h(!1),disabled:i,children:[e.jsx(d,{"aria-hidden":"true"}),r.deny]}),e.jsxs("button",{type:"button",className:"approve-button",onClick:()=>h(!0),disabled:i,children:[e.jsx(o,{"aria-hidden":"true"}),r.approve]})]})]}):null,n?e.jsxs("section",{className:"attention-panel",children:[e.jsxs("div",{className:"attention-head",children:[e.jsx(c,{"aria-hidden":"true"}),e.jsxs("div",{children:[e.jsx("h2",{children:r.inputNeeded}),e.jsx("p",{children:r.notificationQuestionCount(n.questions.length)})]})]}),n.questions.map(s=>e.jsxs("div",{className:"question-block",children:[e.jsx("strong",{children:s.question}),e.jsx("div",{className:"choice-list",children:s.options.map(n=>{const i=(t[s.id]??[]).includes(n.label);return e.jsxs("button",{className:i?"selected":"","aria-pressed":i,onClick:()=>p(s.id,n.label,s.multiSelect),type:"button",children:[e.jsx("span",{children:n.label}),n.description?e.jsx("small",{children:n.description}):null]},n.label)})})]},s.id)),e.jsxs("div",{className:"attention-actions",children:[e.jsxs("button",{type:"button",className:"danger-button",onClick:u,disabled:i,children:[e.jsx(d,{"aria-hidden":"true"}),r.cancel]}),e.jsxs("button",{type:"button",className:"approve-button",onClick:x,disabled:i||n.questions.some(e=>!t[e.id]?.length),children:[e.jsx(o,{"aria-hidden":"true"}),r.submit]})]})]}):null]})}function u(l){const{activeApproval:a,activeQuestion:o,pendingCount:c,requestKey:u,sessions:p,t:h,errorText:x}=l,[j,b]=s.useState(null),[m,g]=s.useState(!1),v=m||c>0&&j!==u,N=()=>{b(u),g(!1)};s.useEffect(()=>{c>0&&g(!1);const e=()=>{b(null),g(0===c)};return window.addEventListener("vibelet.pending.open",e),()=>window.removeEventListener("vibelet.pending.open",e)},[c]);const y=n(N,void 0,v),q=s=>{const n=p.find(e=>e.sessionId===s);return e.jsxs("dl",{className:"global-pending-session-context",children:[e.jsxs("div",{children:[e.jsx("dt",{children:h.session}),e.jsx("dd",{className:"global-pending-session",children:n?t(n):s})]}),e.jsxs("div",{children:[e.jsx("dt",{children:h.workingDirectory}),e.jsx("dd",{className:"global-pending-directory",children:n?.cwd||h.unknown})]})]})};return v?i.createPortal(e.jsxs("div",{className:"global-pending-layer",children:[e.jsx("div",{className:"global-pending-backdrop","aria-hidden":"true",onClick:N}),e.jsxs("div",{className:"global-pending-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"global-pending-title",tabIndex:-1,ref:y,children:[e.jsxs("header",{className:"global-pending-header",children:[e.jsxs("div",{children:[e.jsx("h2",{id:"global-pending-title",children:h.pendingActions}),e.jsx("p",{"aria-live":"polite",children:h.pendingActionCount(c)})]}),e.jsxs("div",{className:"global-pending-header-actions",children:[e.jsx("button",{className:"global-pending-clear",type:"button",disabled:0===c,onClick:l.onClearRequests,children:h.clearPendingRequests}),e.jsx("button",{className:"icon-button",type:"button","aria-label":h.close,title:h.close,onClick:N,children:e.jsx(d,{"aria-hidden":"true"})})]})]}),e.jsxs("div",{className:"global-pending-content",children:[0===c&&e.jsx("p",{className:"empty-copy",children:h.noPendingActions}),a&&e.jsxs("section",{"data-pending-session":a.sessionId,children:[e.jsxs("div",{className:"global-pending-session-row",children:[q(a.sessionId),e.jsx("button",{type:"button","aria-label":h.dismissPendingRequest,title:h.dismissPendingRequest,onClick:()=>l.onDismissRequest("approval",a.sessionId,a.requestId),children:e.jsx(d,{"aria-hidden":"true"})})]}),e.jsx(r,{...l,activeQuestion:null})]}),o&&e.jsxs("section",{"data-pending-session":o.sessionId,children:[e.jsxs("div",{className:"global-pending-session-row",children:[q(o.sessionId),e.jsx("button",{type:"button","aria-label":h.dismissPendingRequest,title:h.dismissPendingRequest,onClick:()=>l.onDismissRequest("question",o.sessionId,o.requestId),children:e.jsx(d,{"aria-hidden":"true"})})]}),e.jsx(r,{...l,activeApproval:null})]}),x&&e.jsx("p",{role:"alert",className:"global-pending-error",children:x})]})]})]}),document.body):null}export{u as default};
@@ -0,0 +1 @@
1
+ import{c as e,r as a,b as s,d as i,u as t,f as r,j as l}from"./index-CdwajBhR.js";import{u as n,b as c,c as o,i as d,I as m,L as g,e as u,X as p,w as h}from"./App-DenA3QIb.js";import{A as x,a as j}from"./arrow-right-CF_MlpxP.js";const f=e("file-image",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]]);function v({request:e,onClose:v}){const[w,y]=a.useState(e.index),[b,k]=a.useState("idle"),N=e.images[w],{url:A,error:E,fail:L}=n(N.src,N.cwd,null),M=c(N.src),C=N.alt||o(M??N.src),I=s(i().language),z=d(I),B=t(v);a.useEffect(()=>{const e=document.getElementById("vibelet-workspace"),a=e?.inert;return e&&(e.inert=!0),()=>{e&&(e.inert=Boolean(a))}},[]),a.useEffect(()=>k("idle"),[w]);const D=a=>y(s=>Math.max(0,Math.min(e.images.length-1,s+a))),P=(e,a,s,i=!1)=>l.jsx("button",{type:"button",className:"icon-button",title:e,"aria-label":e,onClick:s,disabled:i,children:a});return r.createPortal(l.jsx("div",{className:"image-viewer-backdrop",onClick:e=>{e.target===e.currentTarget&&v()},children:l.jsxs("div",{ref:B,className:"image-viewer",role:"dialog","aria-modal":"true","aria-label":z.title,tabIndex:-1,onKeyDown:e=>{"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||(e.preventDefault(),e.stopPropagation(),D("ArrowLeft"===e.key?-1:1))},children:[l.jsxs("header",{className:"image-viewer-toolbar",children:[l.jsx("span",{className:"image-viewer-caption",title:C,children:C}),l.jsxs("span",{className:"image-viewer-count","aria-live":"polite",children:[w+1," / ",e.images.length]}),P(z.copy,l.jsx(u,{}),()=>{(async()=>{if(A)try{await h(A),k("copied")}catch{k("failed")}})()},!A||E),P(z.open,l.jsx(f,{}),()=>{v(),e.onOpen(M??N.src,N.cwd)}),P(z.close,l.jsx(p,{}),v)]}),l.jsxs("div",{className:"image-viewer-stage",children:[P(z.previous,l.jsx(j,{}),()=>D(-1),0===w),l.jsx("div",{className:"image-viewer-content",children:E?l.jsxs("p",{role:"status",children:[l.jsx(m,{}),z.unavailable]}):A?l.jsx("img",{src:A,alt:C,onError:L},N.src):l.jsx(g,{className:"session-running-icon","aria-label":z.title})}),P(z.next,l.jsx(x,{}),()=>D(1),w===e.images.length-1)]}),l.jsx("div",{className:"image-viewer-status",role:"status",children:"copied"===b?z.copied:"failed"===b?z.failed:""})]})}),document.body)}export{v as default};
@@ -1 +1 @@
1
- import{j as e}from"./index-BmushmS_.js";import{C as a}from"./ChipGroup-Ct9ZVlb4.js";import{F as l}from"./App-DFMRw4Fj.js";function s({language:s,t:n,onLanguageChange:i,showFeedback:o=!0}){return e.jsxs(e.Fragment,{children:[e.jsxs("section",{className:"control-section compact-section",children:[e.jsx("h2",{children:n.language}),e.jsxs("label",{className:"field",children:[e.jsx("span",{children:n.displayLanguage}),e.jsx(a,{ariaLabel:n.displayLanguage,options:[{value:"system",label:n.followSystem},{value:"en",label:n.english},{value:"zh",label:n.chinese},{value:"zh-TW",label:n.traditionalChinese}],value:s,onChange:e=>i(e)})]})]}),o&&e.jsx(l,{language:s})]})}export{s as LanguageSettingsPanel};
1
+ import{j as e}from"./index-CdwajBhR.js";import{C as a}from"./ChipGroup-BKnbqJkF.js";import{F as l}from"./App-DenA3QIb.js";function s({language:s,t:n,onLanguageChange:i,showFeedback:o=!0}){return e.jsxs(e.Fragment,{children:[e.jsxs("section",{className:"control-section compact-section",children:[e.jsx("h2",{children:n.language}),e.jsxs("label",{className:"field",children:[e.jsx("span",{children:n.displayLanguage}),e.jsx(a,{ariaLabel:n.displayLanguage,options:[{value:"system",label:n.followSystem},{value:"en",label:n.english},{value:"zh",label:n.chinese},{value:"zh-TW",label:n.traditionalChinese}],value:s,onChange:e=>i(e)})]})]}),o&&e.jsx(l,{language:s})]})}export{s as LanguageSettingsPanel};
@@ -0,0 +1 @@
1
+ .file-editor-surface{flex:1;min-height:0;display:flex;overflow:hidden}.file-editor-surface[hidden]{display:none}.file-editor-surface>.remote-editor{flex:1;min-width:0}
@@ -0,0 +1 @@
1
+ import{r as e,j as r}from"./index-CdwajBhR.js";function s({text:s,labels:a={read:"浏览",live:"编辑",edit:"可视化编辑",source:"源码"},readOnly:d,modes:i=["read","live","edit","source"],initialMode:l="read",renderVisual:t,renderCode:o}){const[c,n]=e.useState(l),[u,m]=e.useState("source"===l||"live"===l),x="source"===c||"live"===c;return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"segmented editor-mode-tabs",role:"group","aria-label":"Markdown 模式",children:i.filter(e=>!d||"read"===e||"source"===e).map(e=>r.jsx("button",{type:"button","aria-pressed":c===e,className:c===e?"selected":"",onClick:()=>{n(e),"source"!==e&&"live"!==e||m(!0)},children:a[e]},e))}),r.jsx("div",{className:"file-editor-surface",hidden:x,children:r.jsx(e.Suspense,{fallback:r.jsx("pre",{className:"remote-editor",children:s}),children:t("read"===c||Boolean(d))})}),u&&r.jsx("div",{className:"file-editor-surface",hidden:!x,children:r.jsx(e.Suspense,{fallback:r.jsx("pre",{className:"remote-editor",children:s}),children:o("live"===c)})})]})}export{s as MarkdownModePanel};
@@ -0,0 +1 @@
1
+ .new-session-layer{z-index:1000;place-items:center;padding:24px;display:grid;position:fixed;inset:0}.new-session-backdrop{background:#00000038;position:absolute;inset:0}.new-session-dialog{background:var(--bg-elevated);width:min(580px,100%);max-height:calc(100vh - 64px);color:var(--text);border:1px solid var(--border);border-radius:16px;padding:22px;position:relative;overflow:auto;box-shadow:0 16px 70px #0003}.new-session-dialog header,.new-session-dialog footer,.new-session-path-row,.new-session-options{align-items:center;gap:8px;display:flex}.new-session-dialog header{justify-content:space-between;margin-bottom:18px}.new-session-dialog h2{margin:0;font-size:18px}.new-session-dialog h3{color:var(--text-muted);margin:12px 0 5px;font-size:12px;font-weight:500}.new-session-field{gap:7px;margin-top:16px;font-size:13px;display:grid}.new-session-dialog input,.new-session-dialog textarea{border:1px solid var(--border);min-width:0;color:inherit;font:inherit;background:0 0;border-radius:7px;padding:9px 10px}.new-session-path-row>input{flex:1}.new-session-dialog .new-session-field :is(input,textarea):focus{box-shadow:none;border-color:var(--accent);outline:none}.new-session-agents{gap:8px;display:flex}.new-session-agents button{border:1px solid var(--border);background:0 0;border-radius:9px;align-items:center;gap:8px;padding:10px 16px;display:flex}.new-session-agents button[aria-pressed=true]{border-color:var(--accent);background:var(--accent-soft)}.new-session-paths{z-index:50;background:var(--bg-elevated);border:1px solid var(--border);border-radius:8px;max-height:160px;margin-top:6px;padding:5px;position:absolute;inset:100% 0 auto;overflow:auto}.new-session-path-field{position:relative}.new-session-path-status{white-space:nowrap;text-overflow:ellipsis;height:22px;color:var(--text-muted);margin-top:4px;font-size:11px;display:block;overflow:hidden}.new-session-options .composer-option-popover{max-height:240px;overflow-y:auto}.new-session-paths button{text-align:left;background:0 0;border:0;border-radius:5px;align-items:center;gap:8px;width:100%;padding:7px 8px;font-size:12px;display:flex}.new-session-paths button[aria-selected=true],.new-session-paths button:hover{background:var(--accent-soft)}.new-session-options{flex-wrap:nowrap;margin:0}.new-session-dialog footer{justify-content:flex-end;margin-top:16px}.new-session-create-hint{color:var(--text-muted);margin:0 auto 0 0;font-size:11px}.new-session-dialog footer>button{border-radius:7px;width:auto;padding:8px 14px}.new-session-dialog button{font:inherit;color:inherit;cursor:pointer}.new-session-dialog button:disabled{opacity:.45;cursor:default}.new-session-dialog footer>button{border:1px solid var(--border);background:0 0}.new-session-dialog footer>button.primary{background:var(--accent);border-color:var(--accent);color:#fff}.new-session-dialog textarea{resize:vertical}.new-session-field-heading{justify-content:space-between;align-items:center;gap:12px;min-height:28px;font-size:13px;display:flex}.new-session-message{margin-top:8px}.new-session-message-box{border:1px solid var(--border);border-radius:10px;margin-top:7px;padding:10px}.new-session-message-box:focus-within{border-color:var(--accent)}.new-session-dialog .new-session-message-box textarea{width:100%;min-height:100px;box-shadow:none;border:0;border-radius:0;outline:none;padding:0;font-size:13px;line-height:1.6;display:block}.new-session-dialog .new-session-message-box textarea:focus-visible{box-shadow:none;outline:none!important}.new-session-message-box>.icon-button{margin-top:6px}.new-session-git{min-width:0;height:22px;color:var(--text-muted);align-items:center;gap:8px;font-size:12px;display:flex}.new-session-git>svg{flex-shrink:0}.new-session-git-branch{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.new-session-message .attachment-list>span{overflow-wrap:anywhere;max-width:100%}.new-session-git .diff-add{color:var(--success);flex-shrink:0}.new-session-git .diff-del{color:var(--danger);flex-shrink:0}.new-session-history{flex-shrink:0}.new-session-history .composer-option-button{height:28px;color:var(--text-muted);background:0 0;border:0;padding:0 6px}.new-session-history .composer-option-popover{z-index:60;width:min(360px,65vw);max-height:240px;top:calc(100% + 6px);bottom:auto;overflow-y:auto}.new-session-history .composer-menu-copy strong{white-space:pre-wrap;overflow-wrap:anywhere;-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.new-session-paths .new-session-folder-action{border-top:1px solid var(--border);color:var(--text-muted);border-radius:0;margin-top:4px;padding-top:10px}.new-session-folder-form{margin:8px 0}.new-session-message-box .composer-toolbar{margin-top:10px}.new-session-message-box .composer-scroll-controls{gap:4px;overflow:visible}.new-session-message-box .composer-control-strip{flex:auto;gap:4px}.new-session-message-box .composer-menu{flex-shrink:1}.new-session-message-box .composer-option-button{max-width:140px;padding-inline:5px}.new-session-message-box .composer-toolbar>.submit-button-group{margin-left:auto}
@@ -0,0 +1 @@
1
+ import{c as e,i as t,h as s,r as n,j as a,u as o,f as i}from"./index-CdwajBhR.js";import{h as r,j as l,k as c,l as d,m as u,n as p,o as h,p as f,q as m,t as w,X as v,v as b,x as y,A as g,S as x,y as j,z as S,Z as k}from"./App-DenA3QIb.js";import{F as D}from"./folder-plus-BuIbO5rO.js";const N=e("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]),C=e("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]),M=e("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]),E="vibelet.web.recentCreations";function A(e){try{const s=JSON.parse(t().getItem(E)||"{}")[e];return Array.isArray(s)?s.filter(e=>"string"==typeof e.cwd&&["claude","codex"].includes(e.agent)&&Number.isFinite(e.createdAt)).slice(0,8):[]}catch{return[]}}const T="vibelet.web.initialMessageHistory";function R(){try{const e=JSON.parse(t().getItem(T)||"[]");return Array.isArray(e)?[...new Set(e.filter(e=>"string"==typeof e).map(e=>e.trim()).filter(Boolean))].slice(0,20):[]}catch{return[]}}const L="vibelet.web.newSessionCreateShortcut";function I({cwd:e,connected:t,load:s,t:o}){const[i,r]=n.useState();n.useEffect(()=>{if(!e||!t)return;let n=!1,a=!1;const o=()=>{a||"hidden"===document.visibilityState||(a=!0,s(e).then(t=>{n||r({cwd:e,data:t})}).catch(t=>{n||r({cwd:e,error:t instanceof Error?t.message:String(t)})}).finally(()=>{a=!1}))},i=window.setTimeout(o,250),l=window.setInterval(o,5e3);return window.addEventListener("focus",o),()=>{n=!0,window.clearTimeout(i),window.clearInterval(l),window.removeEventListener("focus",o)}},[e,t,s]);const l=t&&i?.cwd===e?i.data:void 0,c=l?.branches[e],d=l?.diffStats[e];return a.jsx("div",{className:"new-session-git",role:"status",title:i?.cwd===e?i.error:void 0,children:c||d?a.jsxs(a.Fragment,{children:[a.jsx(C,{size:14,"aria-hidden":"true"}),a.jsx("span",{className:"new-session-git-branch",title:c||"HEAD",children:c||"HEAD"}),a.jsxs("span",{className:"diff-add",children:["+",d?.additions??0]}),a.jsxs("span",{className:"diff-del",children:["−",d?.deletions??0]})]}):t&&e&&i?.cwd!==e?o.loading:" "})}function F({recent:e,chinese:t,onSelectRecent:s}){return a.jsxs("div",{className:"new-session-history",children:[" ",a.jsx(l,{icon:c,label:t?"最近创建":"Recent creations",menuLabel:t?"最近创建":"Recent creations",align:"right",value:"",options:e.length?e.map((e,t)=>({value:String(t),label:e.cwd,description:"claude"===e.agent?"Claude":"Codex"})):[{value:"",label:t?"暂无创建记录":"No recent creations",disabled:!0}],onSelect:t=>{const n=e[Number(t)];n&&s(n)}})]})}function O({chinese:e,onSelectMessage:t}){const[s]=n.useState(R);return a.jsxs("div",{className:"new-session-history",children:[" ",a.jsx(l,{icon:M,label:e?"消息历史":"Message history",menuLabel:e?"消息历史":"Message history",align:"right",value:"",options:s.length?s.map((e,t)=>({value:String(t),label:e})):[{value:"",label:e?"暂无消息历史":"No message history",disabled:!0}],onSelect:e=>{const n=s[Number(e)];n&&t(n)}})]})}function B({controls:e,submit:t,draft:s,textareaRef:o,onOpen:i,onChange:r,onKeyDown:l,connected:c,chinese:f,files:m,t:w}){const v=n.useRef(null),b=n.useRef(null);return a.jsxs("div",{className:"new-session-message","aria-busy":m.uploadBusy,onDragOver:e=>{e.dataTransfer.types.includes("Files")&&e.preventDefault()},onDrop:e=>{e.dataTransfer.files.length&&(e.preventDefault(),c&&m.upload(e.dataTransfer.files))},children:[a.jsxs("div",{className:"new-session-field-heading",children:[a.jsx("label",{htmlFor:"new-session-initial-message",children:f?"初始消息(可选)":"Initial message (optional)"}),a.jsx(O,{chinese:f,onSelectMessage:r})]}),a.jsxs("div",{className:"new-session-message-box",children:[a.jsx(d,{id:"new-session-initial-message",textareaRef:o??b,value:s,onValueChange:r,onKeyDown:l,rows:3,onPaste:e=>{c&&e.clipboardData.files.length&&m.upload(e.clipboardData.files)}}),a.jsx("input",{ref:v,type:"file",hidden:!0,multiple:!0,onChange:e=>{m.upload(e.currentTarget.files),e.currentTarget.value=""}}),a.jsx(u,{onOpen:i,attachments:m.attachments,uploadBusy:m.uploadBusy,onRemove:m.remove,t:w}),a.jsx(p,{leading:a.jsx(h,{label:w.uploadFiles,disabled:!c||m.uploadBusy,onClick:()=>v.current?.click()}),controls:e,submit:t})]}),m.uploadBusy&&a.jsx("small",{role:"status",children:w.uploading}),m.error&&a.jsx("p",{role:"alert",children:m.error})]})}function K(e){const{t:d,device:u,onClose:p,onListDirectories:h}=e,C="New session"!==d.newSession,[M,O]=n.useState(e.cwd),[K,z]=n.useState(e.agent),[P,q]=n.useState(e.approvalMode),[J,H]=n.useState(e.model),[U,V]=n.useState(e.fastMode),[W,$]=n.useState(""),G=function(e,t){const[s,a]=n.useState([]),[o,i]=n.useState(!1),[r,l]=n.useState(""),c=n.useRef(new Set);return n.useEffect(()=>()=>{for(const e of c.current)e.abort();c.current.clear()},[]),{attachments:s,uploadBusy:o,error:r,upload:async s=>{if(!s?.length||!e)return;const n=new AbortController;c.current.add(n),i(!0),l("");try{for(const o of Array.from(s)){const s=await f(o,e.pairToken,n.signal,t);if(n.signal.aborted)return;a(e=>[...e,s])}}catch(o){n.signal.aborted||l(o instanceof Error?o.message:String(o))}finally{c.current.delete(n)&&i(c.current.size>0)}},remove:e=>a(t=>t.filter(t=>t.path!==e))}}(e.pairing,d),[Z,Q]=n.useState([]),X=m(e.client,K,M.trim(),void 0,J,Z,d),[Y,_]=n.useState(""),ee=[{value:"normal",label:d.approvalNormal},{value:"plan",label:d.approvalPlan},{value:"acceptEdits",label:d.approvalEdits},{value:"autoApprove",label:d.approvalAuto}];n.useEffect(()=>{let t=!1;return Q([]),_(""),e.onListModels(K).then(e=>{t||Q(e)}).catch(()=>{t||_(C?"模型加载失败,请重新选择代理重试。":"Models unavailable. Select the agent again to retry.")}),()=>{t=!0}},[K,e.onListModels,C]);const[te,se]=n.useState([]),[ne,ae]=n.useState(-1),[oe,ie]=n.useState(!1),[re,le]=n.useState(""),[ce,de]=n.useState(!1),[ue,pe]=n.useState(!1),[he,fe]=n.useState(null),me=n.useRef(null),we=n.useRef(null),ve=o(p,we),[be]=n.useState(()=>A(u));n.useEffect(()=>{if(se([]),ae(-1),le(""),!oe||!e.connected)return;let t=!1;const s=/^(?:[a-z]:[\\/]|\\\\)/i.test(M)?M.replaceAll("\\","/"):M,n=s.lastIndexOf("/"),a=n<0?".":s.slice(0,n+1)||"/",o=s.slice(n+1).toLowerCase(),i=window.setTimeout(()=>{de(!0),h(a).then(e=>{t||se(e.filter(e=>e.isDirectory&&e.name.toLowerCase().startsWith(o)).map(e=>w(a,e.name)).slice(0,12))}).catch(e=>{t||le(String(e instanceof Error?e.message:e))}).finally(()=>{t||de(!1)})},180);return()=>{t=!0,window.clearTimeout(i),de(!1)}},[M,oe,e.connected,h]);const ye=e=>{O(e+(e.endsWith("/")?"":"/")),me.current?.focus()},ge=async()=>{if(he?.trim()&&!/[/\\]/.test(he)&&![".",".."].includes(he.trim())&&!ue&&e.connected){pe(!0),le("");try{const t=w(M,he.trim());await e.onCreateDirectory(t),O(t),fe(null),we.current?.focus()}catch(t){le(String(t))}finally{pe(!1)}}},xe=()=>{M.trim()&&e.connected&&!ue&&!G.uploadBusy&&(e.onCreate(M.trim(),K,{draft:W,approvalMode:P,model:J,fastMode:U,attachments:G.attachments}),function(e){const s=e.trim();if(s)try{t().setItem(T,JSON.stringify([s,...R().filter(e=>e!==s)].slice(0,20)))}catch{}}(W),function(e,s){try{const n=JSON.parse(t().getItem(E)||"{}");n[e]=[s,...A(e).filter(e=>e.cwd!==s.cwd||e.agent!==s.agent)].slice(0,8),t().setItem(E,JSON.stringify(n))}catch{}}(u,{cwd:M.trim(),agent:K,createdAt:Date.now()}),p())},je=function(e){const a="desktop"===s().kind,[o,i]=n.useState(()=>{try{const e=t().getItem(L);return"modEnter"===e||"shiftEnter"===e?e:"enter"}catch{return"enter"}});return{enabled:a,shortcut:o,update:e=>{i(e);try{t().setItem(L,e)}catch{}},onKeyDown:t=>{a&&!t.defaultPrevented&&"Enter"===t.key&&(t.nativeEvent.isComposing||229===t.keyCode?t.preventDefault():r(o,t)?(t.preventDefault(),t.repeat||e()):"INPUT"===t.currentTarget.tagName&&t.preventDefault())}}}(xe);return i.createPortal(a.jsxs("div",{className:"new-session-layer",children:[a.jsx("div",{className:"new-session-backdrop",onClick:p}),a.jsxs("div",{className:"new-session-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"new-session-title",ref:ve,tabIndex:-1,children:[a.jsxs("header",{children:[a.jsx("h2",{id:"new-session-title",children:d.newSession}),a.jsx("button",{type:"button",className:"icon-button","aria-label":d.close,title:d.close,onClick:p,children:a.jsx(v,{})})]}),a.jsxs("form",{onSubmit:e=>{e.preventDefault(),xe()},children:[a.jsx("div",{className:"new-session-agents",children:["claude","codex"].map(e=>a.jsxs("button",{type:"button","aria-pressed":K===e,onClick:()=>{z(e),H("")},children:[a.jsx(N,{size:18}),"claude"===e?"Claude":"Codex"]},e))}),a.jsxs("div",{className:"new-session-path-field",onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||ie(!1)},children:[a.jsxs("div",{className:"new-session-field",children:[a.jsxs("div",{className:"new-session-field-heading",children:[a.jsx("label",{htmlFor:"new-session-cwd",children:d.workingDirectory}),a.jsx(F,{recent:be,chinese:C,onSelectRecent:e=>{O(e.cwd),z(e.agent),H("")}})]}),a.jsxs("div",{className:"new-session-path-row",children:[a.jsx("input",{id:"new-session-cwd",ref:me,value:M,"aria-label":d.workingDirectory,role:"combobox","aria-autocomplete":"list",spellCheck:!1,"aria-expanded":oe&&e.connected,"aria-controls":"new-session-paths","aria-activedescendant":ne>=0?`new-session-path-${ne}`:void 0,onFocus:()=>ie(!0),onChange:e=>O(e.target.value),onKeyDown:e=>{e.nativeEvent.isComposing||229===e.keyCode||(!te.length||"ArrowDown"!==e.key&&"ArrowUp"!==e.key?("Enter"===e.key||"Tab"===e.key)&&ne>=0&&te[ne]&&!e.metaKey&&!e.ctrlKey&&(e.preventDefault(),ye(te[ne])):(e.preventDefault(),ae(t=>t<0?"ArrowDown"===e.key?0:te.length-1:(t+("ArrowDown"===e.key?1:-1)+te.length)%te.length))),je.onKeyDown(e)}}),a.jsx("button",{type:"button",className:"icon-button","aria-label":d.browseDirectories,title:d.browseDirectories,onMouseDown:e=>e.preventDefault(),onClick:()=>(ye(M||e.cwd||"/"),void ie(!0)),children:a.jsx(c,{})})]})]}),oe&&e.connected&&a.jsxs("div",{className:"new-session-paths",children:[a.jsx("div",{id:"new-session-paths",role:"listbox","aria-label":d.browseDirectories,children:te.map((e,t)=>a.jsxs("button",{type:"button",id:`new-session-path-${t}`,role:"option","aria-selected":ne===t,onMouseDown:e=>e.preventDefault(),onClick:()=>ye(e),title:e,children:[a.jsx(c,{size:14}),e]},e))}),a.jsxs("button",{type:"button",className:"new-session-folder-action",disabled:!M.trim()||ue,onMouseDown:e=>e.preventDefault(),onClick:()=>{ie(!1),fe("")},children:[a.jsx(D,{size:14}),C?"新建文件夹":"New folder"]})]}),a.jsx("div",{className:"new-session-path-status",children:ce||re||Y?a.jsx("small",{role:re||Y?"alert":"status",children:re||Y||d.loadingDirectories}):a.jsx(I,{cwd:M.trim(),connected:e.connected,load:e.onLoadGitMetadata,t:d})}),null!==he&&a.jsxs("div",{className:"new-session-path-row new-session-folder-form",children:[a.jsx("input",{autoFocus:!0,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),e.stopPropagation(),e.nativeEvent.isComposing||ge()),"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),fe(null),me.current?.focus())},"aria-label":C?"文件夹名称":"Folder name",value:he,onChange:e=>fe(e.target.value)}),a.jsx("button",{type:"button",disabled:ue||!he.trim()||/[/\\]/.test(he),onClick:()=>{ge()},children:C?"创建文件夹":"Create folder"}),a.jsx("button",{type:"button",onClick:()=>fe(null),children:d.close})]})]}),a.jsx(B,{controls:a.jsxs("div",{className:"new-session-options composer-control-strip",children:[a.jsx(l,{icon:x,label:ee.find(e=>e.value===P)?.label??d.approvalMode,menuLabel:d.approvalMode,value:P,onSelect:q,options:ee}),a.jsx(l,{icon:j,label:X.find(e=>e.value===J)?.label??(J||(C?"默认模型":"Default model")),menuLabel:C?"模型":"Model",value:J,onSelect:H,options:[...X.some(e=>""===e.value)?[]:[{value:"",label:C?"默认模型":"Default model"}],...X.map(e=>({value:e.value,label:e.label,description:e.desc}))]}),a.jsx(l,{icon:k,label:U?d.fast:d.normal,menuLabel:d.fastMode,value:U?"on":"off",onSelect:e=>V("on"===e),selected:U,options:[{value:"off",label:d.normal,description:d.standardExecution,icon:S},{value:"on",label:d.fast,description:d.preferFasterResponses,icon:k}]})]}),submit:a.jsxs("div",{className:"submit-button-group",children:[" ",je.enabled&&a.jsx(b,{shortcut:je.shortcut,onChange:je.update,action:"create",t:d}),a.jsx(y,{type:"submit","aria-label":d.newSession,title:d.newSession,disabled:!e.connected||!M.trim()||ue||G.uploadBusy,children:a.jsx(g,{"aria-hidden":"true"})})]}),textareaRef:we,onOpen:t=>e.onOpenRemoteFile(t,M),draft:W,onChange:$,onKeyDown:je.onKeyDown,connected:e.connected,chinese:C,files:G,t:d}),!e.connected&&a.jsx("p",{role:"status",children:C?"请先连接设备,再创建会话。":"Connect a device before creating a session."}),a.jsxs("footer",{children:[a.jsx("p",{className:"new-session-create-hint",children:C?"创建后自动发送初始消息":"The initial message is sent after creation"}),"desktop"!==s().kind&&a.jsx("button",{type:"button",onClick:p,children:C?"取消":"Cancel"})]})]})]})]}),document.body)}export{K as default};
@@ -1 +1 @@
1
- import{j as e}from"./index-BmushmS_.js";import{B as s}from"./App-DFMRw4Fj.js";function i({notificationsBlocked:i,permission:n,settings:t,t:c,onToggleEnabled:o}){return e.jsxs("section",{className:"control-section compact-section",children:[e.jsx("h2",{children:c.notifications}),e.jsxs("label",{className:"toggle-field notification-toggle "+(i?"disabled":""),children:[e.jsxs("span",{children:[e.jsx(s,{"aria-hidden":"true"}),c.browserAlerts]}),e.jsx("input",{type:"checkbox",role:"switch","aria-checked":t.enabled&&!i&&"granted"===n,className:"settings-switch",checked:t.enabled&&!i&&"granted"===n,disabled:i,onChange:e=>o(e.target.checked)})]}),i?e.jsx("p",{className:"empty-copy",children:c.notificationsBlocked}):null]})}export{i as NotificationSettingsPanel};
1
+ import{j as e}from"./index-CdwajBhR.js";import{B as s}from"./App-DenA3QIb.js";function i({notificationsBlocked:i,permission:n,settings:t,t:c,onToggleEnabled:o}){return e.jsxs("section",{className:"control-section compact-section",children:[e.jsx("h2",{children:c.notifications}),e.jsxs("label",{className:"toggle-field notification-toggle "+(i?"disabled":""),children:[e.jsxs("span",{children:[e.jsx(s,{"aria-hidden":"true"}),c.browserAlerts]}),e.jsx("input",{type:"checkbox",role:"switch","aria-checked":t.enabled&&!i&&"granted"===n,className:"settings-switch",checked:t.enabled&&!i&&"granted"===n,disabled:i,onChange:e=>o(e.target.checked)})]}),i?e.jsx("p",{className:"empty-copy",children:c.notificationsBlocked}):null]})}export{i as NotificationSettingsPanel};