ompchamber 0.4.0 → 0.5.0

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.
@@ -1,2 +0,0 @@
1
- /*! LICENSE: art.62139ed479.js.LICENSE.txt */
2
- "use strict";(self.rspackChunkompchamber=self.rspackChunkompchamber||[]).push([["art"],{wA(e,t,n){var a=n("j"),r=n("H"),i=n("rm"),l=n("Go"),s=n("t3"),o=n("Ir"),c=n("z"),d=n("oj");function p(e){let{rootPath:t,activeRepo:n,onSelectRepo:p}=e,[h,x]=(0,r.J0)(!1),[m,f]=(0,r.J0)(["."]),[u,b]=(0,r.J0)(!1),[k,y]=(0,r.J0)(""),g=(0,r.li)(null),v=function(e){if(!e)return"workspace root";let t=e.replace(/\\/g,"/").split("/").filter(Boolean);return t.length>0?t[t.length-1]:"workspace root"}(t),N=e=>"."===e?v:e,w=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=new URLSearchParams({reposOnly:"1"});t&&n.set("root",t),e&&n.set("rescan","1"),n.set("t",String(Date.now()));let a=await fetch(`/api/fs/git?${n.toString()}`).then(e=>e.json()).catch(()=>null);a&&Array.isArray(a.repos)&&(f(a.repos),a.reposPending?b(!0):b(!1))};(0,r.vJ)(()=>{h&&w()},[h,t]),(0,r.vJ)(()=>{if(!u)return;let e=new URLSearchParams({reposOnly:"1"});t&&e.set("root",t);let n=setInterval(async()=>{let t=await fetch(`/api/fs/git?${e.toString()}`).then(e=>e.json()).catch(()=>null);t&&!t.reposPending&&Array.isArray(t.repos)&&(f(t.repos),b(!1))},1500);return()=>clearInterval(n)},[u,t]),(0,d.W)(g,()=>x(!1));let Y=m.filter(e=>!k.trim()||N(e).toLowerCase().includes(k.toLowerCase()));return(0,a.FD)("div",{className:"relative",ref:g,children:[(0,a.FD)("button",{type:"button",onClick:()=>x(!h),title:"Switch git project",className:"flex items-center space-x-1.5 hover:bg-ink/5 px-2 py-1 rounded transition-colors text-xs text-ink/80 font-medium",children:[(0,a.Y)(i.A,{size:12,className:"text-ink/60"}),(0,a.Y)("span",{className:"truncate max-w-[110px]",children:"."===n?v:n.split("/").pop()}),(0,a.Y)(l.A,{size:12,className:"text-ink/40"})]}),h&&(0,a.FD)("div",{className:"absolute top-full left-0 mt-1 w-52 bg-paper border border-ink/20 rounded-md shadow-lg z-50 flex flex-col overflow-hidden text-xs",children:[(0,a.FD)("div",{className:"px-2 py-1.5 border-b border-ink/10 flex items-center space-x-1.5",children:[(0,a.Y)(s.A,{size:11,className:"text-ink/40 flex-shrink-0"}),(0,a.Y)("input",{type:"text",value:k,onChange:e=>y(e.currentTarget.value),placeholder:"Search repos...",title:"Search repositories",className:"w-full bg-transparent outline-none text-xs text-ink placeholder-ink/40",autoFocus:!0}),k&&(0,a.Y)("button",{type:"button",onClick:()=>y(""),title:"Clear search",className:"text-ink/40 hover:text-ink flex-shrink-0",children:"×"}),(0,a.Y)("button",{type:"button",onClick:()=>void w(!0),title:"Refresh nested repos",disabled:u,className:"text-ink/40 hover:text-ink flex-shrink-0 transition-colors disabled:opacity-40 disabled:hover:text-ink/40",children:(0,a.Y)(o.A,{size:11,className:u?"animate-spin":""})})]}),(0,a.Y)("div",{className:"max-h-48 scrollbar-overlay-container scrollbar-overlay-static py-1",children:0===Y.length?(0,a.Y)("div",{className:"px-3 py-2 text-ink/40 italic",children:"No repos found"}):Y.map(e=>(0,a.FD)("button",{type:"button",onClick:()=>{p(e),x(!1),y("")},title:N(e),className:"w-full text-left px-3 py-2 hover:bg-ink/5 flex items-center justify-between transition-colors",children:[(0,a.Y)("span",{className:"truncate",children:N(e)}),n===e&&(0,a.Y)(c.A,{size:12,className:"text-ink"})]},e))})]})]})}n.d(t,{I:()=>p})},Ek(e,t,n){n.d(t,{FileExplorer:()=>j});var a=n("j"),r=n("H"),i=n("n"),l=n("t3"),s=n("wA"),o=n("Go"),c=n("Nf"),d=n("X"),p=n("ob"),h=n("G"),x=n("bH"),m=n("YOg"),f=n("q"),u=n("b0"),b=n("hw");let k=(0,n("y").A)({name:"pen",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],aliases:["edit-2"]});var y=n("mO"),g=n("S");function v(e){let{x:t,y:n,isFolder:r,hasGitStatus:i,onAction:l,menuRef:s}=e,o=r?220:i?285:255,c="u">typeof window?Math.max(10,Math.min(t,window.innerWidth-190-12)):t,d="u">typeof window?Math.max(10,Math.min(n,window.innerHeight-o-12)):n;return(0,h.d5)((0,a.Y)("div",{className:"fixed inset-0 z-50 bg-ink/20",onClick:()=>l("close"),onContextMenu:e=>{e.preventDefault(),l("close")},children:(0,a.FD)("div",{ref:s,className:"fixed z-50 bg-paper border border-ink/15 shadow-2xl rounded-lg py-1 min-w-[185px] text-xs text-ink font-sans",style:{top:d,left:c},onClick:e=>e.stopPropagation(),children:[!r&&(0,a.FD)(a.FK,{children:[(0,a.FD)("button",{onClick:()=>l("view"),className:"w-full text-left px-3 py-1.5 hover:bg-ink/5 flex items-center space-x-2 transition-colors",children:[(0,a.Y)(x.A,{size:13,className:"text-ink/60"}),(0,a.Y)("span",{children:"View"})]}),i&&(0,a.FD)("button",{onClick:()=>l("diff"),className:"w-full text-left px-3 py-1.5 hover:bg-ink/5 flex items-center space-x-2 transition-colors text-ink",children:[(0,a.Y)(m.A,{size:13,className:"text-warning"}),(0,a.Y)("span",{className:"font-medium",children:"Open in Diff Panel"})]})]}),(0,a.FD)("button",{onClick:()=>l("explorer"),className:"w-full text-left px-3 py-1.5 hover:bg-ink/5 flex items-center space-x-2 transition-colors",children:[(0,a.Y)(f.A,{size:13,className:"text-ink/60"}),(0,a.Y)("span",{children:"Go to Explorer"})]}),(0,a.Y)("div",{className:"my-1 border-t border-ink/10"}),(0,a.FD)("button",{onClick:()=>l("copy_path"),className:"w-full text-left px-3 py-1.5 hover:bg-ink/5 flex items-center space-x-2 transition-colors",children:[(0,a.Y)(u.A,{size:13,className:"text-ink/60"}),(0,a.Y)("span",{children:"Copy Path"})]}),(0,a.FD)("button",{onClick:()=>l("copy_relative"),className:"w-full text-left px-3 py-1.5 hover:bg-ink/5 flex items-center space-x-2 transition-colors",children:[(0,a.Y)(u.A,{size:13,className:"text-ink/60"}),(0,a.Y)("span",{children:"Copy Relative Path"})]}),(0,a.Y)("div",{className:"my-1 border-t border-ink/10"}),(0,a.FD)("button",{onClick:()=>l("history"),className:"w-full text-left px-3 py-1.5 hover:bg-ink/5 flex items-center space-x-2 transition-colors",children:[(0,a.Y)(b.A,{size:13,className:"text-ink/60"}),(0,a.Y)("span",{children:"Show Git History"})]}),(0,a.Y)("div",{className:"my-1 border-t border-ink/10"}),(0,a.FD)("button",{onClick:()=>l("rename"),className:"w-full text-left px-3 py-1.5 hover:bg-ink/5 flex items-center space-x-2 transition-colors",children:[(0,a.Y)(k,{size:13,className:"text-ink/60"}),(0,a.Y)("span",{children:"Rename"})]}),(0,a.FD)("button",{onClick:()=>l("delete"),className:"w-full text-left px-3 py-1.5 hover:bg-error/10 text-error flex items-center space-x-2 transition-colors",children:[(0,a.Y)(y.A,{size:13,className:"text-error"}),(0,a.Y)("span",{children:"Delete"})]})]})}),document.body)}function N(e){let{fileName:t,isFolder:n,isLoading:r,onCancel:i,onConfirm:l}=e;return(0,h.d5)((0,a.Y)("div",{className:"fixed inset-0 bg-ink/20 z-[100] flex items-center justify-center p-4 backdrop-blur-sm",children:(0,a.FD)("div",{className:"bg-paper rounded shadow-xl p-4 w-full max-w-sm border border-ink/10 font-sans",children:[(0,a.FD)("h3",{className:"font-semibold text-ink mb-2 text-sm",children:["Delete ",n?"Folder":"File"]}),(0,a.FD)("p",{className:"text-xs text-ink/70 mb-4",children:["Are you sure you want to delete ",(0,a.Y)("span",{className:"font-mono bg-canvas px-1 rounded",children:t}),"? This action cannot be undone."]}),(0,a.FD)("div",{className:"flex justify-end space-x-2",children:[(0,a.Y)("button",{onClick:i,className:"px-3 py-1.5 text-xs text-ink hover:bg-ink/5 rounded transition-colors",disabled:r,children:"Cancel"}),(0,a.Y)("button",{onClick:l,className:"px-3 py-1.5 text-xs bg-error text-white rounded hover:bg-error/90 transition-colors flex items-center",disabled:r,children:r?"Deleting...":"Delete"})]})]})}),document.body)}function w(e){let{isFolder:t,renameValue:n,originalPath:r,isLoading:i,onChange:l,onCancel:s,onSubmit:o}=e;return(0,h.d5)((0,a.Y)("div",{className:"fixed inset-0 bg-ink/20 z-[100] flex items-center justify-center p-4 backdrop-blur-sm",children:(0,a.FD)("form",{onSubmit:o,className:"bg-paper rounded shadow-xl p-4 w-full max-w-sm border border-ink/10 font-sans",children:[(0,a.FD)("h3",{className:"font-semibold text-ink mb-3 text-sm",children:["Rename ",t?"Folder":"File"]}),(0,a.Y)("input",{autoFocus:!0,type:"text",value:n,onChange:e=>l(e.currentTarget.value),className:"w-full bg-paper border border-ink/20 rounded px-2 py-1.5 text-xs font-mono focus:outline-none focus:border-ink mb-4"}),(0,a.FD)("div",{className:"flex justify-end space-x-2",children:[(0,a.Y)("button",{type:"button",onClick:s,className:"px-3 py-1.5 text-xs text-ink hover:bg-ink/5 rounded transition-colors",disabled:i,children:"Cancel"}),(0,a.Y)("button",{type:"submit",className:"px-3 py-1.5 text-xs bg-ink text-canvas rounded hover:bg-ink/90 transition-colors flex items-center",disabled:i||!n.trim()||n===r,children:i?"Renaming...":"Rename"})]})]})}),document.body)}function Y(e){let{filePath:t,fetcherState:n,fetcherData:r,onClose:l}=e;return(0,h.d5)((0,a.Y)("div",{className:"fixed inset-0 bg-ink/20 z-[100] flex items-center justify-center p-4 backdrop-blur-sm",children:(0,a.FD)("div",{className:"bg-paper rounded-lg shadow-xl w-full max-w-4xl border border-ink/10 flex flex-col max-h-[85vh]",children:[(0,a.FD)("div",{className:"flex items-center justify-between p-4 border-b border-ink/10",children:[(0,a.FD)("h3",{className:"text-sm font-semibold text-ink flex items-center space-x-2",children:[(0,a.Y)(b.A,{size:16,className:"text-ink/60"}),(0,a.FD)("span",{children:["Git History: ",(0,a.Y)("span",{className:"font-mono font-normal opacity-80",children:t})]})]}),(0,a.Y)("button",{onClick:l,className:"p-1 hover:bg-ink/5 rounded text-ink/60 transition-colors",children:(0,a.Y)(g.A,{size:14})})]}),(0,a.Y)("div",{className:"flex-1 scrollbar-overlay-container scrollbar-overlay-static bg-paper p-2",children:"idle"===n?r?.type==="history"?r.data.length>0?(0,a.FD)("table",{className:"w-full text-left border-collapse text-[11px]",children:[(0,a.Y)("thead",{className:"bg-canvas sticky top-0 z-10 border-b border-ink/10",children:(0,a.FD)("tr",{children:[(0,a.Y)("th",{className:"px-3 py-2 font-semibold text-ink/70 rounded-tl",children:"Description"}),(0,a.Y)("th",{className:"px-3 py-2 font-semibold text-ink/70 w-32",children:"Date"}),(0,a.Y)("th",{className:"px-3 py-2 font-semibold text-ink/70 w-32",children:"Author"}),(0,a.Y)("th",{className:"px-3 py-2 font-semibold text-ink/70 w-24 text-right rounded-tr",children:"Commit"})]})}),(0,a.Y)("tbody",{className:"divide-y divide-ink/5",children:r.data.map((e,t)=>(0,a.FD)("tr",{className:"hover:bg-ink/[0.03] transition-colors group bg-paper",children:[(0,a.Y)("td",{className:"px-3 py-2 text-ink",children:e.message?(0,a.Y)("span",{className:"font-medium text-ink/90 group-hover:text-ink",children:e.message}):null}),(0,a.Y)("td",{className:"px-3 py-2 text-ink/60 whitespace-nowrap font-mono text-[10.5px]",children:e.time}),(0,a.Y)("td",{className:"px-3 py-2 text-ink/70 whitespace-nowrap truncate max-w-[120px]",children:e.author}),(0,a.Y)("td",{className:"px-3 py-2 text-right",children:e.hash?(0,a.Y)("span",{className:"font-mono text-ink/50 group-hover:text-ink font-semibold transition-colors bg-canvas px-1.5 py-0.5 rounded border border-ink/10",children:e.hash}):null})]},t))})]}):(0,a.Y)("div",{className:"p-8 text-center text-ink/40 font-mono text-xs",children:"No commit history found for this file."}):r?.error?(0,a.Y)("div",{className:"p-8 text-center text-error font-mono text-xs",children:r.error}):(0,a.Y)("div",{className:"p-8 text-center text-ink/40 font-mono text-xs",children:"Loading history..."}):(0,a.FD)("div",{className:"p-8 text-center text-ink/40 font-mono text-xs flex items-center justify-center space-x-2",children:[(0,a.Y)(i.A,{size:14,className:"animate-spin"}),(0,a.Y)("span",{children:"Loading history..."})]})})]})}),document.body)}var F=n("LQ"),D=n("oj");function C(e){let{file:t,rootPath:n,repo:i,onLoadChildren:l,onOpenFile:s,onActionComplete:h,expandedPaths:x,onToggleFolder:m,gitFileMap:f,gitFolderMap:u}=e,b="folder"===t.type,[k,y]=(0,r.J0)(!1),[g,A]=(0,r.J0)(!1),z=(0,d.L)(),[S,J]=(0,r.J0)(!1),[j,L]=(0,r.J0)(null),P=(0,r.li)(null),[M,R]=(0,r.J0)(!1),[$,T]=(0,r.J0)(!1),[E,H]=(0,r.J0)(!1),[O,G]=(0,r.J0)(t.path),_=Array.isArray(t.children)?t.children:[],I=(t.path||"").replace(/^\/+/,""),V=b?void 0:f?.get(I)||f?.get(t.path),B=V?(0,F.R)(V.status,V.staged):null,U=b?u?.get(I)||u?.get(t.path):null,W=!!B,K=!0===t.ignored,Q=x?x.has(t.path):k,X=void 0!==t.forceExpanded?t.forceExpanded:Q;(0,r.vJ)(()=>{J(!0)},[]),(0,r.vJ)(()=>{b&&x&&y(x.has(t.path))},[x,t.path,b]),(0,r.vJ)(()=>{b&&X&&(!t.children||0===t.children.length)&&l&&!g&&(A(!0),Promise.resolve(l(t.path)).finally(()=>A(!1)))},[b,X,t.children,t.path,l]),(0,D.W)(P,()=>L(null)),(0,r.vJ)(()=>{"idle"===z.state&&z.data&&z.data.success&&!z.data.type&&(R(!1),T(!1),h())},[z.state,z.data]);let q=e=>{i&&"."!==i&&e.append("repo",i),n&&e.append("root",n),z.submit(e,{method:"post",action:"/api/fs/action"})};return(0,a.FD)("div",{children:[(0,a.FD)("div",{className:"flex items-center space-x-1.5 py-1 px-2 hover:bg-ink/5 cursor-pointer rounded group",onClick:e=>{if(e.stopPropagation(),b){let e=!X;y(e),void 0!==t.forceExpanded&&(t.forceExpanded=void 0),m?.(t.path,e),e&&l&&(!t.children||0===t.children.length)&&(A(!0),Promise.resolve(l(t.path)).finally(()=>A(!1)))}else s&&s({...t,root:n,repo:i||"."})},onContextMenu:e=>{e.preventDefault(),e.stopPropagation(),L({x:e.clientX,y:e.clientY})},children:[b?X?(0,a.Y)(o.A,{size:12,className:"flex-shrink-0 text-ink/40"}):(0,a.Y)(c.A,{size:12,className:"flex-shrink-0 text-ink/40"}):(0,a.Y)("span",{className:"w-3 flex-shrink-0"}),(0,a.Y)(p.o,{name:t.name,isFolder:b,isOpen:X,size:12,className:`flex-shrink-0${K?" opacity-40":""}`}),(0,a.Y)("span",{className:`truncate min-w-0 flex-1 ${B?B.colorClass:U?U.colorClass:K?"text-ink/40":""}`,title:K?`${t.path} — git-ignored`:void 0,children:t.name}),B&&(0,a.Y)("span",{className:`font-mono text-[9px] font-bold px-1 rounded flex-shrink-0 ${B.colorClass}`,title:`Git: ${B.label}`,children:B.charStatus}),U&&(0,a.Y)("span",{className:`w-1.5 h-1.5 rounded-full flex-shrink-0 ${U.hasDeleted?"bg-error":U.hasModified||U.hasStaged?"bg-info":"bg-success"}`,title:`${U.count} changed file${U.count>1?"s":""}`})]}),X&&g&&(0,a.Y)("div",{className:"ml-3 border-l border-ink/10 pl-3 py-0.5 text-[10px] text-ink/30",children:"Loading…"}),X&&!g&&_.length>0&&(0,a.Y)("div",{className:"ml-3 border-l border-ink/10 pl-1",children:_.map(e=>(0,a.Y)(C,{file:e,rootPath:n,repo:i,onLoadChildren:l,onOpenFile:s,onActionComplete:h,expandedPaths:x,onToggleFolder:m,gitFileMap:f,gitFolderMap:u},e.id))}),S&&j&&(0,a.Y)(v,{x:j.x,y:j.y,isFolder:b,hasGitStatus:W,onAction:e=>{if(L(null),"view"===e)s&&s({...t,root:n,repo:i||"."});else if("diff"===e)window.dispatchEvent(new CustomEvent("omp:open-diff",{detail:{file:t.path,staged:V?.staged||V?.status&&" "!==V.status[0]&&"?"!==V.status[0],status:B?.charStatus||"M",repo:i||".",root:n}}));else if("explorer"===e){let e=new FormData;e.append("actionType","open_explorer"),e.append("path",t.path),q(e)}else if("copy_path"===e)navigator.clipboard.writeText("/app/applet/examples/"+t.path);else if("copy_relative"===e)navigator.clipboard.writeText(t.path);else if("history"===e){H(!0);let e=new FormData;e.append("actionType","git_history"),e.append("path",t.path),q(e)}else"rename"===e?(G(t.path),R(!0)):"delete"===e&&T(!0)}}),S&&$&&(0,a.Y)(N,{fileName:t.name,isFolder:b,isLoading:"idle"!==z.state,onCancel:()=>T(!1),onConfirm:()=>{let e=new FormData;e.append("actionType","delete"),e.append("path",t.path),q(e)}}),S&&M&&(0,a.Y)(w,{isFolder:b,renameValue:O,originalPath:t.path,isLoading:"idle"!==z.state,onChange:G,onCancel:()=>R(!1),onSubmit:e=>{e.preventDefault();let n=new FormData;n.append("actionType","rename"),n.append("path",t.path),n.append("newPath",O),q(n)}}),S&&E&&(0,a.Y)(Y,{filePath:t.path,fetcherState:z.state,fetcherData:z.data,onClose:()=>H(!1)})]})}var A=n("jo"),z=n("FL"),S=n("so"),J=n("Af");function j(e){let{className:t="",enabled:n=!0,rootPath:o,onOpenFile:c,refreshKey:d=0,onRefresh:p}=e,[h,x]=(0,r.J0)([]),[m,f]=(0,z.bL)("files.searchQuery",""),[u,b]=(0,r.J0)(!1),[k,y,g]=(0,z.bL)("files.expandedPaths",[]),[v,N]=(0,r.J0)(()=>new Set(k)),w=(0,r.li)({}),[Y,F]=(0,z.bL)("files.activeRepo","."),{isScrolling:D,handleScroll:j}=(0,A.K)(),{fileMap:L,folderMap:P,refreshGitStatus:M}=(0,S.e)(o,Y,d,n);(0,r.vJ)(()=>{g&&N(e=>{let t=new Set(k);return e.size===t.size&&Array.from(t).every(t=>e.has(t))?e:t})},[g,k]);let R=e=>{let t=new URLSearchParams;return o&&t.set("root",o),Y&&"."!==Y&&t.set("repo",Y),e&&t.set("path",e),t.set("t",String(Date.now())),`/api/fs/dir?${t.toString()}`},$=e=>{n&&(e?.silent||b(!0),fetch(R()).then(e=>e.json()).then(e=>{Array.isArray(e.files)&&x(function e(t,n,a){return t.map(t=>{if("folder"!==t.type)return t;let r=n[t.path],i=a.has(t.path);return r?{...t,children:e(r,n,a),is_expanded:+!!i}:t})}(e.files,w.current,v))}).catch(()=>{}).finally(()=>{e?.silent||b(!1)}))};(0,r.vJ)(()=>{g&&$()},[d,o,n,Y,g]),(0,J.n)(()=>$({silent:!0}),n&&g),(0,J.w)(()=>$({silent:!0}),n&&g);let T=e=>fetch(R(e)).then(e=>e.json()).then(t=>{Array.isArray(t.files)&&(w.current[e]=t.files,x(n=>(function e(t,n,a){return t.map(t=>{if(t.path===n)return{...t,children:a,is_expanded:1};if(Array.isArray(t.children)){let r=e(t.children,n,a);if(r!==t.children)return{...t,children:r}}return t})})(n,e,t.files)))}).catch(()=>{}),E=(e,t)=>{let n=new Set(v);t?n.add(e):n.delete(e),N(n),y(Array.from(n))};if(!n)return(0,a.Y)("div",{className:`flex flex-col h-full bg-paper items-center justify-center text-ink/40 ${t}`,children:(0,a.Y)("span",{className:"text-xs font-mono",children:"No session selected"})});let H=(()=>{if(!m.trim())return h;let e=m.toLowerCase(),t=n=>{let a=n.name.toLowerCase().includes(e);if("folder"===n.type){let e=(n.children||[]).map(t).filter(Boolean);return a||e.length>0?{...n,children:a&&0===e.length?n.children:e,forceExpanded:!0}:null}return a?n:null};return h.map(t).filter(Boolean)})(),O=()=>{M(),p?p():$()};return(0,a.FD)("div",{className:`flex flex-col h-full bg-paper ${t}`,children:[(0,a.FD)("div",{className:"p-3 border-b border-ink/10 flex flex-col space-y-2",children:[(0,a.FD)("div",{className:"flex items-center justify-between",children:[(0,a.Y)(s.I,{rootPath:o,activeRepo:Y,onSelectRepo:e=>{e!==Y&&(w.current={},N(new Set),y([]),F(e))}}),(0,a.Y)("button",{onClick:O,className:"p-1.5 text-ink/40 hover:text-ink hover:bg-ink/5 rounded transition-colors",title:"Refresh",children:(0,a.Y)(i.A,{size:14,className:u?"animate-spin":""})})]}),(0,a.FD)("div",{className:"relative",children:[(0,a.Y)(l.A,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-ink/40"}),(0,a.Y)("input",{type:"text",placeholder:"Search files...",value:m,onChange:e=>f(e.currentTarget.value),className:"w-full bg-canvas border border-ink/20 rounded pl-8 pr-3 py-1.5 text-xs focus:outline-none focus:border-ink transition-colors text-ink placeholder-ink/40"})]})]}),(0,a.Y)("div",{className:`flex-1 scrollbar-overlay-container p-2 font-mono text-[11px] text-ink/80 ${(0,A.p)(D)}`,onContextMenu:e=>e.preventDefault(),onScroll:j,children:u&&0===H.length?(0,a.Y)("div",{className:"p-4 text-center text-ink/40",children:"Loading files..."}):0===H.length?(0,a.Y)("div",{className:"p-4 text-center text-ink/40",children:"No files found"}):H.map(e=>(0,a.Y)(C,{file:e,rootPath:o,repo:Y,onLoadChildren:T,onOpenFile:c,onActionComplete:O,expandedPaths:v,onToggleFolder:E,gitFileMap:L,gitFolderMap:P},e.id))})]})}},rm(e,t,n){let a=(0,n("y").A)({name:"folder-git-2",size:24,node:[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]});n.d(t,{},{A:a})},YOg(e,t,n){let a=(0,n("y").A)({name:"git-compare",size:24,node:[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]]});n.d(t,{},{A:a})}}]);