zdashboard 1.5.0 → 1.6.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.
- package/dist/cli.js +3 -3
- package/dist/cli.js.map +1 -1
- package/dist/web/assets/{DesignViewer-BZaM7mSJ.js → DesignViewer-DRMA9PEJ.js} +1 -1
- package/dist/web/assets/ReviewViewer-B2Urt024.js +31 -0
- package/dist/web/assets/{Viewer-CE6pkzc1.js → Viewer--MU0j_IT.js} +1 -1
- package/dist/web/assets/{Viewer-5FWPbvt_.js → Viewer-B3ypjRso.js} +1 -1
- package/dist/web/assets/{folder-open-CAhbmv2D.js → folder-open-_LpqKwdL.js} +1 -1
- package/dist/web/assets/index-BN93hVas.js +2 -0
- package/dist/web/assets/{index-B0t9alXb.js → index-BSQL1IMD.js} +2 -2
- package/dist/web/assets/{index-Cm5yF8xu.js → index-BbK2dzwU.js} +2 -2
- package/dist/web/assets/{index-DTzqGD1f.js → index-CiqXgPE1.js} +2 -2
- package/dist/web/assets/index-Cj5xRlyO.js +11 -0
- package/dist/web/assets/{index-Dq-wet5V.js → index-TW6FrWYP.js} +2 -2
- package/dist/web/index.html +1 -1
- package/package.json +1 -1
- package/dist/web/assets/ReviewViewer-BHoJH-os.js +0 -16
- package/dist/web/assets/index-Cofp1qtj.js +0 -2
- package/dist/web/assets/index-RYjVKQdH.js +0 -11
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{c as w,r as l,j as e,F as M,I as S,M as R,a as D}from"./index-CiqXgPE1.js";import{F}from"./folder-open-_LpqKwdL.js";/**
|
|
2
|
+
* @license lucide-react v0.460.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const y=w("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
|
7
|
+
* @license lucide-react v0.460.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const I=w("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);function z(){const[s,x]=l.useState({files:0,dirs:0,images:0,docs:0}),[i,k]=l.useState(null),[N,b]=l.useState(!0),[m,E]=l.useState(null);return l.useEffect(()=>{let t=!1;return(async()=>{try{let r=function(a){var c,g;for(const o of a)if(o.kind==="file"){u++;const v=(g=(c=o.name)==null?void 0:c.split(".").pop())==null?void 0:g.toLowerCase();["svg","png","jpg","jpeg","gif","webp","ico"].includes(v||"")&&p++,["md","markdown"].includes(v||"")&&j++}else o.kind==="dir"&&(h++,r(o.children||[]))};const f=await(await fetch("/__files",{cache:"no-store"})).json();if(t)return;let u=0,h=0,p=0,j=0;r(f.tree||[]),x({files:u,dirs:h,images:p,docs:j});const n=(f.tree||[]).find(a=>a.kind==="file"&&a.name==="README.md");if(n!=null&&n.path){const a=await fetch("/"+encodeURI(n.path),{cache:"no-store"}).then(c=>c.text());t||k(a)}}catch(r){t||E(r instanceof Error?r.message:"加载失败")}finally{t||b(!1)}})(),()=>{t=!0}},[]),N?e.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"mx-auto mb-3.5 grid h-14 w-14 place-items-center rounded-[14px] bg-primary text-primary-foreground text-2xl font-bold animate-pulse",children:"z"}),e.jsx("p",{children:"加载项目信息…"})]})}):m?e.jsx("div",{className:"flex h-full items-center justify-center text-destructive",children:e.jsx("p",{children:m})}):e.jsxs("div",{className:"mx-auto max-w-5xl h-full flex flex-col bg-background border rounded-lg shadow-sm overflow-hidden",children:[e.jsxs("div",{className:"flex-none px-4 py-3 border-b flex items-center gap-2",children:[e.jsx(I,{className:"h-4 w-4"}),e.jsx("span",{className:"text-sm font-medium",children:"项目概览"})]}),e.jsxs("div",{className:"flex-1 min-h-0 overflow-auto p-6 space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:[e.jsx(d,{icon:e.jsx(M,{className:"h-5 w-5"}),label:"文件",value:s.files}),e.jsx(d,{icon:e.jsx(F,{className:"h-5 w-5"}),label:"目录",value:s.dirs}),e.jsx(d,{icon:e.jsx(S,{className:"h-5 w-5"}),label:"图片",value:s.images}),e.jsx(d,{icon:e.jsx(y,{className:"h-5 w-5"}),label:"文档",value:s.docs})]}),i&&e.jsxs("section",{children:[e.jsxs("h3",{className:"text-sm font-medium mb-3 text-muted-foreground flex items-center gap-2",children:[e.jsx(y,{className:"h-3.5 w-3.5"})," README"]}),e.jsx("div",{className:"prose dark:prose-invert max-w-none",children:e.jsx(R,{remarkPlugins:[D],children:i})})]})]})]})}function d({icon:s,label:x,value:i}){return e.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground mb-1 text-xs",children:[s,e.jsx("span",{children:x})]}),e.jsx("div",{className:"text-2xl font-mono font-medium",children:i})]})}const O={mode:"view",label:"项目浏览",icon:"👁️",viewer:async()=>({default:z})};export{O as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ReviewViewer-
|
|
2
|
-
import{_ as e}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ReviewViewer-B2Urt024.js","assets/index-CiqXgPE1.js","assets/index-a0IR4S1c.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as e}from"./index-CiqXgPE1.js";const a={mode:"review",label:"文档评审",icon:"✅",viewer:async()=>({default:(await e(()=>import("./ReviewViewer-B2Urt024.js"),__vite__mapDeps([0,1,2]))).default})};export{a as default};
|
package/dist/web/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
6
|
<link rel="icon" href="/__app/favicon.svg" type="image/svg+xml" />
|
|
7
7
|
<title>zdashboard · 项目洞察</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-CiqXgPE1.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-a0IR4S1c.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/package.json
CHANGED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{c as m,r as o,u as k,j as e,M as v,b as N,d as S,e as T,f as C,g as _,a as E,h as A,i as M}from"./index-DTzqGD1f.js";/**
|
|
2
|
-
* @license lucide-react v0.460.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const R=m("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
7
|
-
* @license lucide-react v0.460.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const z=m("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
12
|
-
* @license lucide-react v0.460.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const I=m("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),L={draft:"bg-zinc-500 text-white",reviewing:"bg-amber-500 text-white",passed:"bg-emerald-600 text-white",rejected:"bg-red-500 text-white"},O={draft:"草案",reviewing:"评审中",passed:"已通过",rejected:"未通过"},X=[{key:"all",label:"全部"},{key:"open",label:"待处理"},{key:"answered",label:"已答复"},{key:"accepted",label:"已采纳"},{key:"dismissed",label:"已驳回"}],$={high:"bg-red-500",medium:"bg-amber-500",low:"bg-sky-500"},D={high:"高",medium:"中",low:"低"},P={open:"border-l-red-500",answered:"border-l-sky-500",accepted:"border-l-emerald-500",dismissed:"border-l-zinc-400"},U={open:"待处理",answered:"已答复",accepted:"已采纳",dismissed:"已驳回"};function V({children:s}){const d=o.useRef(null),[i,a]=o.useState(!1),n=async()=>{var r;const c=((r=d.current)==null?void 0:r.innerText)??"";try{await navigator.clipboard.writeText(c),a(!0),setTimeout(()=>a(!1),1500)}catch(l){console.error("[zdashboard] clipboard copy failed:",l)}};return e.jsxs("div",{className:"not-prose relative my-4 group",children:[e.jsx("button",{onClick:n,className:"absolute right-2 top-2 z-10 px-2 py-0.5 rounded border border-border bg-background/80 text-[11px] opacity-0 group-hover:opacity-100 transition-opacity",children:i?"已复制":"复制"}),e.jsx("pre",{ref:d,className:"overflow-auto rounded-md border bg-[#0d1117] p-3 text-xs leading-relaxed",children:s})]})}function F({path:s}){const[d,i]=o.useState(null);if(o.useEffect(()=>{let r=!0;return fetch("/"+encodeURI(s),{cache:"no-store"}).then(l=>l.text()).then(l=>{r&&i(l)}).catch(()=>{r&&i("")}),()=>{r=!1}},[s]),d===null)return e.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"加载中…"});const a=d.match(/^---\n([\s\S]*?)\n---\n?/),n=(a==null?void 0:a[1])??null,c=n?d.slice(a[0].length):d;return e.jsxs("div",{className:"prose dark:prose-invert mx-auto max-w-3xl p-8 prose-headings:scroll-mt-4 prose-pre:bg-transparent prose-pre:p-0 prose-pre:m-0",children:[n&&e.jsxs("details",{className:"not-prose mb-4 rounded border p-3 text-sm",children:[e.jsx("summary",{className:"cursor-pointer font-medium",children:"YAML frontmatter"}),e.jsx("pre",{className:"mt-2 whitespace-pre-wrap text-xs",children:n})]}),e.jsx(v,{remarkPlugins:[E,A,M],rehypePlugins:[N,S,[T,{behavior:"wrap",properties:{className:["no-underline"]}}],[C,{detect:!0,ignoreMissing:!0}],[_,{strict:!1}]],components:{pre:({children:r})=>e.jsx(V,{children:r}),a:({href:r,children:l})=>{const x=r==null?void 0:r.startsWith("http");return e.jsx("a",{href:r,target:x?"_blank":void 0,rel:x?"noreferrer noopener":void 0,children:l})}},children:c})]})}function B({item:s,token:d,onUpdated:i}){const[a,n]=o.useState(s.answer??"");o.useEffect(()=>n(s.answer??""),[s.id,s.answer]);const c=async r=>{const l=await fetch("/__review/item",{method:"POST",headers:{"x-stop-token":d,"Content-Type":"application/json"},body:JSON.stringify({id:s.id,...r})});l.ok&&i(await l.json())};return e.jsxs("div",{className:`border rounded-lg bg-background shadow-sm border-l-4 ${P[s.state]??""}`,children:[e.jsxs("div",{className:"flex items-center gap-2 px-3 pt-2.5 text-[11px] text-muted-foreground",children:[s.severity&&e.jsx("span",{className:`h-2 w-2 rounded-full ${$[s.severity]??"bg-muted-foreground"}`}),e.jsx("span",{className:"font-medium",children:s.category??"通用"}),s.severity&&e.jsx("span",{className:"uppercase",children:D[s.severity]??s.severity}),e.jsx("span",{className:"ml-auto",children:U[s.state]??s.state})]}),e.jsx("p",{className:"px-3 py-2 text-sm leading-relaxed",children:s.question}),e.jsxs("div",{className:"px-3 pb-3 flex flex-col gap-2",children:[e.jsx("textarea",{value:a,onChange:r=>n(r.target.value),placeholder:"答复 / 补充说明…",rows:2,className:"w-full rounded border border-border bg-background px-2 py-1.5 text-xs focus:outline-none focus:border-primary resize-y"}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsxs("button",{onClick:()=>c({answer:a,state:"answered"}),className:"inline-flex items-center gap-1 h-7 px-2.5 rounded bg-muted hover:bg-muted/70 text-xs",children:[e.jsx(z,{className:"h-3 w-3"}),"答复"]}),e.jsxs("button",{onClick:()=>c({answer:a,state:"accepted"}),className:"inline-flex items-center gap-1 h-7 px-2.5 rounded bg-emerald-600 hover:bg-emerald-500 text-white text-xs",children:[e.jsx(R,{className:"h-3 w-3"}),"采纳"]}),e.jsxs("button",{onClick:()=>c({answer:a,state:"dismissed"}),className:"inline-flex items-center gap-1 h-7 px-2.5 rounded bg-muted hover:bg-muted/70 text-xs",children:[e.jsx(I,{className:"h-3 w-3"}),"驳回"]})]})]})]})}function H(){const[s,d]=o.useState(null),[i,a]=o.useState([]),[n,c]=o.useState(null),[r,l]=o.useState(""),[x,y]=o.useState("all"),[h,b]=o.useState(""),j=o.useRef(!1),f=()=>{fetch("/__review",{cache:"no-store"}).then(t=>t.json()).then(d),fetch("/__docs",{cache:"no-store"}).then(t=>t.json()).then(t=>{a(t),c(p=>p&&t.includes(p)?p:t[0]??null)})};o.useEffect(()=>{f(),fetch("/__config").then(t=>t.json()).then(t=>l(t.stopToken??""))},[]),k(()=>{},f,j);const u={all:0,open:0,answered:0,accepted:0,dismissed:0};for(const t of(s==null?void 0:s.items)??[])u.all++,u[t.state]++;const w=async()=>{b("");const t=await fetch("/__review/status",{method:"POST",headers:{"x-stop-token":r,"Content-Type":"application/json"},body:'{"status":"passed"}'});t.ok?d(await t.json()):b((await t.json()).error??"failed")},g=((s==null?void 0:s.items)??[]).filter(t=>n?(t.doc??"")===n||!t.doc:!0).filter(t=>x==="all"||t.state===x).sort((t,p)=>({high:0,medium:1,low:2})[t.severity??"medium"]-{high:0,medium:1,low:2}[p.severity??"medium"]);return e.jsxs("div",{className:"flex h-full",children:[e.jsxs("aside",{className:"w-[240px] flex-none border-r bg-background overflow-auto",children:[e.jsx("div",{className:"px-3 pt-3 pb-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:"文档"}),i.map(t=>e.jsx("button",{onClick:()=>c(t),className:`w-full text-left px-3 py-1.5 text-xs border-l-2 border-transparent hover:bg-muted ${n===t?"bg-muted font-medium border-primary":"text-muted-foreground"}`,children:t},t)),e.jsx("div",{className:"px-3 pt-4 pb-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:"评审项"}),X.map(t=>e.jsxs("button",{onClick:()=>y(t.key),className:`w-full text-left px-3 py-1.5 text-xs border-l-2 border-transparent hover:bg-muted flex justify-between ${x===t.key?"bg-muted font-medium border-primary text-foreground":"text-muted-foreground"}`,children:[e.jsx("span",{children:t.label}),e.jsx("span",{className:"font-mono text-[10px]",children:u[t.key]})]},t.key))]}),e.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[e.jsxs("div",{className:"flex-none flex items-center gap-2 px-3.5 border-b bg-background",children:[s&&e.jsx("span",{className:`px-2 py-0.5 rounded text-[11px] font-medium ${L[s.status]??""}`,children:O[s.status]??s.status}),e.jsx("button",{onClick:w,disabled:!s||s.status==="passed"||u.open>0,className:"ml-auto h-7 px-3 rounded bg-emerald-600 hover:bg-emerald-500 disabled:opacity-50 disabled:cursor-not-allowed text-white text-xs",children:"通过"})]}),h&&e.jsx("div",{className:"bg-red-500/10 text-red-600 dark:text-red-400 text-xs px-3.5 py-1.5 border-b border-red-500/20",children:h}),e.jsxs("div",{className:"flex-1 min-h-0 flex",children:[e.jsx("div",{className:"flex-1 min-h-0 overflow-auto border-r bg-background",children:n?e.jsx(F,{path:n}):e.jsx("p",{className:"p-6 text-sm text-muted-foreground",children:"左侧选择文档查看"})}),e.jsxs("div",{className:"w-[380px] flex-none overflow-auto p-3 flex flex-col gap-3",style:{backgroundImage:"radial-gradient(circle at 1px 1px, hsl(var(--border)) 1px, transparent 0)",backgroundSize:"20px 20px"},children:[g.length===0&&e.jsx("p",{className:"text-xs text-muted-foreground text-center pt-6",children:"无评审项(换文档 / 状态筛选试试)"}),g.map(t=>e.jsx(B,{item:t,token:r,onUpdated:d},t.id))]})]})]})]})}export{H as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Viewer-CE6pkzc1.js","assets/index-DTzqGD1f.js","assets/index-a0IR4S1c.css","assets/folder-open-CAhbmv2D.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as e}from"./index-DTzqGD1f.js";const a={mode:"apply",label:"执行进度",icon:"⚙️",viewer:async()=>({default:(await e(()=>import("./Viewer-CE6pkzc1.js"),__vite__mapDeps([0,1,2,3]))).default})};export{a as default};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{c as w,r as l,j as e,F as M,I as R,M as S,a as D}from"./index-DTzqGD1f.js";import{F as A}from"./folder-open-CAhbmv2D.js";/**
|
|
2
|
-
* @license lucide-react v0.460.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const y=w("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
|
7
|
-
* @license lucide-react v0.460.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const F=w("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);function I(){const[s,x]=l.useState({files:0,dirs:0,images:0,docs:0}),[n,N]=l.useState(null),[k,b]=l.useState(!0),[m,E]=l.useState(null);return l.useEffect(()=>{let a=!1;return(async()=>{try{let r=function(t){var c,g;for(const d of t)if(d.kind==="file"){u++;const v=(g=(c=d.name)==null?void 0:c.split(".").pop())==null?void 0:g.toLowerCase();["svg","png","jpg","jpeg","gif","webp","ico"].includes(v||"")&&p++,["md","markdown"].includes(v||"")&&j++}else d.kind==="dir"&&(h++,r(d.children||[]))};const f=await(await fetch("/__files",{cache:"no-store"})).json();if(a)return;let u=0,h=0,p=0,j=0;r(f.tree||[]),x({files:u,dirs:h,images:p,docs:j});const i=(f.tree||[]).find(t=>t.kind==="file"&&t.name==="README.md");if(i!=null&&i.path){const t=await fetch("/"+encodeURI(i.path),{cache:"no-store"}).then(c=>c.text());a||N(t)}}catch(r){a||E(r instanceof Error?r.message:"加载失败")}finally{a||b(!1)}})(),()=>{a=!0}},[]),k?e.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"mx-auto mb-3.5 grid h-14 w-14 place-items-center rounded-[14px] bg-primary text-primary-foreground text-2xl font-bold animate-pulse",children:"z"}),e.jsx("p",{children:"加载项目信息…"})]})}):m?e.jsx("div",{className:"flex h-full items-center justify-center text-destructive",children:e.jsx("p",{children:m})}):e.jsxs("div",{className:"mx-auto max-w-5xl h-full flex flex-col bg-background border rounded-lg shadow-sm overflow-hidden",children:[e.jsxs("div",{className:"flex-none px-4 py-3 border-b flex items-center gap-2",children:[e.jsx(F,{className:"h-4 w-4"}),e.jsx("span",{className:"text-sm font-medium",children:"项目概览"})]}),e.jsxs("div",{className:"flex-1 min-h-0 overflow-auto p-6 space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:[e.jsx(o,{icon:e.jsx(M,{className:"h-5 w-5"}),label:"文件",value:s.files}),e.jsx(o,{icon:e.jsx(A,{className:"h-5 w-5"}),label:"目录",value:s.dirs}),e.jsx(o,{icon:e.jsx(R,{className:"h-5 w-5"}),label:"图片",value:s.images}),e.jsx(o,{icon:e.jsx(y,{className:"h-5 w-5"}),label:"文档",value:s.docs})]}),n?e.jsxs("section",{children:[e.jsxs("h3",{className:"text-sm font-medium mb-3 text-muted-foreground flex items-center gap-2",children:[e.jsx(y,{className:"h-3.5 w-3.5"})," README"]}),e.jsx("div",{className:"prose dark:prose-invert max-w-none",children:e.jsx(S,{remarkPlugins:[D],children:n})})]}):e.jsxs("div",{className:"text-center text-muted-foreground py-8",children:[e.jsx("p",{className:"text-sm",children:"未找到 README.md"}),e.jsx("p",{className:"text-xs mt-1",children:"使用左侧文件树浏览项目文件"})]})]})]})}function o({icon:s,label:x,value:n}){return e.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground mb-1 text-xs",children:[s,e.jsx("span",{children:x})]}),e.jsx("div",{className:"text-2xl font-mono font-medium",children:n})]})}const O={mode:"view",label:"项目浏览",icon:"👁️",viewer:async()=>({default:I})};export{O as default};
|