zdashboard 1.6.2 → 2.0.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/README.md +206 -41
- package/dist/cli.js +1189 -832
- package/dist/cli.js.map +1 -1
- package/dist/web/assets/MdViewer-DHLa9u9L.js +1 -0
- package/dist/web/assets/file-text-D4672ckY.js +6 -0
- package/dist/web/assets/index-BRLQFQ6k.js +29 -0
- package/dist/web/assets/index-Deg587va.js +87 -0
- package/dist/web/assets/index-Dqj3ddhK.css +1 -0
- package/dist/web/assets/katex-BTcE7LSd.css +10 -0
- package/dist/web/assets/katex.min-D64GJ8fh.js +270 -0
- package/dist/web/assets/web-2je-DAWY.js +30 -0
- package/dist/web/assets/{Viewer-DgUxcwns.js → web-4tpIem4N.js} +3 -3
- package/dist/web/assets/web-Bgs6ipDo.js +31 -0
- package/dist/web/assets/{Viewer-CvXxR4rr.js → web-C0d3eOAl.js} +7 -2
- package/dist/web/assets/{DesignViewer-DIFMIK04.js → web-DIAM7Pif.js} +6 -6
- package/dist/web/assets/web-DqBNmBY8.js +25 -0
- package/dist/web/index.html +2 -2
- package/package.json +4 -1
- package/dist/web/assets/ReviewViewer-CzphymDs.js +0 -31
- package/dist/web/assets/ViewViewer-2gv2jIkV.js +0 -11
- package/dist/web/assets/folder-open-YuFnfZTO.js +0 -6
- package/dist/web/assets/index-BJ8mveF-.js +0 -446
- package/dist/web/assets/index-BwdPhy39.css +0 -10
- package/dist/web/assets/index-CgsmLt7m.js +0 -2
- package/dist/web/assets/index-D5XUdKxi.js +0 -2
- package/dist/web/assets/index-LAcTTLE0.js +0 -2
- package/dist/web/assets/index-Nmrw-5B2.js +0 -2
- package/dist/web/assets/index-f9TDtJW5.js +0 -2
package/dist/web/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
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-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-Deg587va.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-Dqj3ddhK.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zdashboard",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "ZCode skill dashboard platform — pluggable viewers for zdesign/zview/zreview/zgoal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
"ansi-to-react": "^6.1.6",
|
|
30
30
|
"class-variance-authority": "^0.7.0",
|
|
31
31
|
"clsx": "^2.1.1",
|
|
32
|
+
"cordis": "4.0.0-rc.8",
|
|
33
|
+
"cosmokit": "^1.8.1",
|
|
32
34
|
"date-fns": "^3.6.0",
|
|
33
35
|
"filesize": "^11.0.0",
|
|
34
36
|
"highlight.js": "^11.11.1",
|
|
@@ -50,6 +52,7 @@
|
|
|
50
52
|
"remark-math": "^6.0.0",
|
|
51
53
|
"sonner": "^1.5.0",
|
|
52
54
|
"tailwind-merge": "^2.5.4",
|
|
55
|
+
"tsx": "^4.7.0",
|
|
53
56
|
"use-debounce": "^10.0.0",
|
|
54
57
|
"yaml": "^2.9.0"
|
|
55
58
|
},
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import{c as g,r as a,u as $,j as e,M as U,b as L,d as X,e as q,f as F,g as P,a as V,h as B,i as G}from"./index-BJ8mveF-.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 C=g("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 H=g("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
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 J=g("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
17
|
-
* @license lucide-react v0.460.0 - ISC
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the ISC license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const K=g("RotateCcw",[["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"}]]);/**
|
|
22
|
-
* @license lucide-react v0.460.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const W=g("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"}]]);/**
|
|
27
|
-
* @license lucide-react v0.460.0 - ISC
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the ISC license.
|
|
30
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const T=g("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Y={draft:"bg-zinc-500 text-white",reviewing:"bg-amber-500 text-white",passed:"bg-emerald-600 text-white",rejected:"bg-red-500 text-white"},Q={draft:"草案",reviewing:"评审中",passed:"已通过",rejected:"未通过"},Z=[{key:"all",label:"全部"},{key:"open",label:"待处理"},{key:"answered",label:"已答复"},{key:"accepted",label:"已采纳"},{key:"dismissed",label:"已驳回"}],E={high:"bg-red-500",medium:"bg-amber-500",low:"bg-sky-500"},ee={high:"高",medium:"中",low:"低"},_={open:"bg-red-500/15 text-red-600 dark:text-red-400 border-red-500/30",answered:"bg-sky-500/15 text-sky-600 dark:text-sky-400 border-sky-500/30",accepted:"bg-emerald-500/15 text-emerald-600 dark:text-emerald-400 border-emerald-500/30",dismissed:"bg-muted text-muted-foreground border-border"},M={open:"待处理",answered:"已答复",accepted:"已采纳",dismissed:"已驳回"};function te({children:t}){const d=a.useRef(null),[u,o]=a.useState(!1),c=async()=>{var r;const i=((r=d.current)==null?void 0:r.innerText)??"";try{await navigator.clipboard.writeText(i),o(!0),setTimeout(()=>o(!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:c,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:u?"已复制":"复制"}),e.jsx("pre",{ref:d,className:"overflow-auto rounded-md border bg-[#0d1117] p-3 text-xs leading-relaxed",children:t})]})}function se({path:t}){const[d,u]=a.useState(null);if(a.useEffect(()=>{let r=!0;return fetch("/"+encodeURI(t),{cache:"no-store"}).then(l=>l.text()).then(l=>{r&&u(l)}).catch(()=>{r&&u("")}),()=>{r=!1}},[t]),d===null)return e.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"加载中…"});const o=d.match(/^---\n([\s\S]*?)\n---\n?/),c=(o==null?void 0:o[1])??null,i=c?d.slice(o[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:[c&&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:c})]}),e.jsx(U,{remarkPlugins:[V,B,G],rehypePlugins:[L,X,[q,{behavior:"wrap",properties:{className:["no-underline"]}}],[F,{detect:!0,ignoreMissing:!0}],[P,{strict:!1}]],components:{pre:({children:r})=>e.jsx(te,{children:r}),a:({href:r,children:l})=>{const m=r==null?void 0:r.startsWith("http");return e.jsx("a",{href:r,target:m?"_blank":void 0,rel:m?"noreferrer noopener":void 0,children:l})}},children:i})]})}function re({item:t,token:d,onUpdated:u}){const[o,c]=a.useState(t.answer??"");a.useEffect(()=>c(t.answer??""),[t.id,t.answer]);const i=async x=>{const h=await fetch("/__review/item",{method:"POST",headers:{"x-stop-token":d,"Content-Type":"application/json"},body:JSON.stringify({id:t.id,...x})});h.ok&&u(await h.json())},r=x=>x==="open"?{state:x,answer:o}:x==="answered"?{state:x,answer:o}:{state:x,answer:o||t.answer},l=t.state==="accepted"||t.state==="dismissed",m=l?t.state==="accepted"?"已采纳 — 可撤销后重新处理":"已驳回 — 可撤销后重新处理":t.state==="open"?"答复后可采纳或驳回,或直接采纳/驳回":"确认答复后采纳,或驳回 / 撤销";return e.jsxs("div",{className:"rounded-lg border bg-background shadow-sm overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-2 px-3 pt-2.5 text-[11px] text-muted-foreground",children:[t.severity&&e.jsx("span",{className:`h-2 w-2 rounded-full ${E[t.severity]??"bg-muted-foreground"}`}),e.jsx("span",{className:"font-medium",children:t.category??"通用"}),t.severity&&e.jsx("span",{children:ee[t.severity]??t.severity}),e.jsx("span",{className:`ml-auto px-1.5 py-0.5 rounded border text-[10px] font-medium ${_[t.state]??""}`,children:M[t.state]})]}),e.jsx("p",{className:"px-3 py-2 text-sm leading-relaxed",children:t.question}),e.jsxs("div",{className:"px-3 pb-3 flex flex-col gap-2",children:[e.jsx("textarea",{value:o,onChange:x=>c(x.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:[t.state==="accepted"?e.jsxs("span",{className:"inline-flex items-center gap-1 h-7 px-2.5 rounded bg-emerald-500/15 text-emerald-600 dark:text-emerald-400 text-xs font-medium",children:[e.jsx(C,{className:"h-3 w-3"}),"已采纳"]}):t.state==="dismissed"?e.jsxs("span",{className:"inline-flex items-center gap-1 h-7 px-2.5 rounded bg-muted text-muted-foreground text-xs font-medium",children:[e.jsx(T,{className:"h-3 w-3"}),"已驳回"]}):e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>i(r("answered")),className:"inline-flex items-center gap-1 h-7 px-2.5 rounded bg-sky-600 hover:bg-sky-500 text-white text-xs",children:[e.jsx(W,{className:"h-3 w-3"}),t.state==="answered"?"更新答复":"答复"]}),e.jsxs("button",{onClick:()=>i(r("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(C,{className:"h-3 w-3"}),"采纳"]}),e.jsxs("button",{onClick:()=>i(r("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(T,{className:"h-3 w-3"}),"驳回"]})]}),l&&e.jsxs("button",{onClick:()=>i(r("open")),className:"inline-flex items-center gap-1 h-7 px-2.5 rounded bg-muted hover:bg-muted/70 text-xs",children:[e.jsx(K,{className:"h-3 w-3"}),"撤销"]}),e.jsx("span",{className:"ml-auto text-[10px] text-muted-foreground",children:m})]})]})]})}function ne(){const[t,d]=a.useState(null),[u,o]=a.useState([]),[c,i]=a.useState(null),[r,l]=a.useState(null),[m,x]=a.useState(""),[h,R]=a.useState("all"),[j,w]=a.useState(!0),[k,v]=a.useState(""),A=a.useRef(!1),N=()=>{fetch("/__review",{cache:"no-store"}).then(s=>s.json()).then(d),fetch("/__docs",{cache:"no-store"}).then(s=>s.json()).then(s=>{o(s),i(n=>n&&s.includes(n)?n:s[0]??null)})};a.useEffect(()=>{N(),fetch("/__config").then(s=>s.json()).then(s=>x(s.stopToken??""))},[]),$(()=>{},N,A);const f={all:0,open:0,answered:0,accepted:0,dismissed:0};for(const s of(t==null?void 0:t.items)??[])f.all++,f[s.state]++;const S=a.useMemo(()=>{const s=new Map;for(const p of(t==null?void 0:t.items)??[]){if(h!=="all"&&p.state!==h)continue;const b=p.doc??null;s.has(b)||s.set(b,[]),s.get(b).push(p)}const n=p=>p??"(未关联文档)";return[...s.entries()].sort((p,b)=>n(p[0]).localeCompare(n(b[0]))).map(([p,b])=>({doc:p,label:n(p),items:b.sort((I,O)=>({high:0,medium:1,low:2})[I.severity??"medium"]-{high:0,medium:1,low:2}[O.severity??"medium"])}))},[t,h]),y=((t==null?void 0:t.items)??[]).find(s=>s.id===r)??null,z=s=>{l(s.id),i(s.doc??null)},D=async()=>{v("");const s=await fetch("/__review/status",{method:"POST",headers:{"x-stop-token":m,"Content-Type":"application/json"},body:'{"status":"passed"}'});s.ok?d(await s.json()):v((await s.json()).error??"failed")};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.5 flex flex-wrap gap-1",children:Z.map(s=>e.jsxs("button",{onClick:()=>R(s.key),className:`px-1.5 py-0.5 rounded text-[11px] border ${h===s.key?"bg-primary text-primary-foreground border-primary":"border-border hover:bg-muted text-muted-foreground"}`,children:[s.label," ",f[s.key]]},s.key))}),e.jsx("div",{className:"px-3 pb-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:"文档 · 评审项"}),S.length===0&&e.jsx("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:"无评审项"}),S.map(s=>e.jsxs("div",{children:[e.jsxs("div",{className:"px-3 py-1 text-[11px] font-medium text-muted-foreground flex items-center gap-1.5",children:[e.jsx("span",{className:"truncate",children:s.label}),e.jsx("span",{className:"ml-auto font-mono text-[10px]",children:s.items.length})]}),s.items.map(n=>e.jsxs("button",{onClick:()=>z(n),className:`w-full text-left px-3 py-1.5 text-xs border-l-2 flex items-center gap-1.5 hover:bg-muted ${r===n.id?"bg-muted font-medium border-primary":"border-transparent text-muted-foreground"}`,children:[n.severity&&e.jsx("span",{className:`h-1.5 w-1.5 rounded-full shrink-0 ${E[n.severity]??""}`}),e.jsx("span",{className:"truncate",children:n.question}),e.jsx("span",{className:`ml-auto shrink-0 text-[9px] px-1 rounded ${_[n.state]??""}`,children:M[n.state]})]},n.id))]},s.doc??"(none)"))]}),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:[t&&e.jsx("span",{className:`px-2 py-0.5 rounded text-[11px] font-medium ${Y[t.status]??""}`,children:Q[t.status]??t.status}),f.open>0&&e.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["还有 ",f.open," 项待处理"]}),e.jsx("button",{onClick:D,disabled:!t||t.status==="passed"||f.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:"通过"})]}),k&&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:k}),e.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[j&&e.jsxs("div",{className:"flex-1 min-h-0 overflow-auto border-b bg-background relative",children:[e.jsx("button",{onClick:()=>w(!1),title:"收起文档",className:"absolute right-2 top-2 z-10 h-6 px-2 rounded border border-border bg-background/80 text-xs hover:bg-muted",children:e.jsx(H,{className:"h-3.5 w-3.5"})}),c?e.jsx(se,{path:c}):e.jsx("p",{className:"p-6 text-sm text-muted-foreground",children:"在左侧选择评审项"})]}),e.jsxs("div",{className:j?"flex-none h-[42%] border-b overflow-auto p-3 flex flex-col gap-3":"flex-1 min-h-0 overflow-auto p-3 flex flex-col gap-3",style:j?void 0:{backgroundImage:"radial-gradient(circle at 1px 1px, hsl(var(--border)) 1px, transparent 0)",backgroundSize:"20px 20px"},children:[!j&&e.jsxs("button",{onClick:()=>w(!0),title:"展开文档",className:"self-start inline-flex items-center gap-1 h-6 px-2 rounded border border-border bg-background text-xs hover:bg-muted",children:[e.jsx(J,{className:"h-3.5 w-3.5"}),"展开文档"]}),y?e.jsx(re,{item:y,token:m,onUpdated:d},y.id):e.jsx("p",{className:"text-xs text-muted-foreground text-center pt-6",children:"在左侧选择一个评审项"})]})]})]})]})}export{ne as default};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{c as w,r as i,j as e,F as M,I as S,M as R,a as D}from"./index-BJ8mveF-.js";import{F}from"./folder-open-YuFnfZTO.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 L(){const[s,x]=i.useState({files:0,dirs:0,images:0,docs:0}),[l,k]=i.useState(null),[N,b]=i.useState(!0),[m,E]=i.useState(null);return i.useEffect(()=>{let a=!1;return(async()=>{try{let r=function(t){var c,g;for(const o of t)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(a)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(t=>t.kind==="file"&&t.name==="README.md");if(n!=null&&n.path){const t=await fetch("/"+encodeURI(n.path),{cache:"no-store"}).then(c=>c.text());a||k(t)}}catch(r){a||E(r instanceof Error?r.message:"加载失败")}finally{a||b(!1)}})(),()=>{a=!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})]}),l&&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:l})})]})]})]})}function d({icon:s,label:x,value:l}){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:l})]})}export{L as ViewViewer};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{c as a}from"./index-BJ8mveF-.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 o=a("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 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.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);export{o as F};
|