zdashboard 1.3.2 → 1.4.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.
@@ -0,0 +1,11 @@
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-C041WeTi.js";import{F as A}from"./folder-open-m5HYQ2Fs.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};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Viewer-QBsqLDK_.js","assets/index-C041WeTi.js","assets/index-0GvyDl5M.css","assets/folder-open-m5HYQ2Fs.js"])))=>i.map(i=>d[i]);
2
+ import{_ as e}from"./index-C041WeTi.js";const a={mode:"apply",label:"执行进度",icon:"⚙️",viewer:async()=>({default:(await e(()=>import("./Viewer-QBsqLDK_.js"),__vite__mapDeps([0,1,2,3]))).default})};export{a as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Viewer-Co9GLZ-m.js","assets/index-C041WeTi.js","assets/index-0GvyDl5M.css"])))=>i.map(i=>d[i]);
2
+ import{_ as e}from"./index-C041WeTi.js";const a={mode:"bugs",label:"禅道 Bugs",icon:"🎯",viewer:async()=>({default:(await e(()=>import("./Viewer-Co9GLZ-m.js"),__vite__mapDeps([0,1,2]))).default})};export{a as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ReviewViewer-DQQx6ub2.js","assets/index-C041WeTi.js","assets/index-0GvyDl5M.css"])))=>i.map(i=>d[i]);
2
+ import{_ as e}from"./index-C041WeTi.js";const a={mode:"review",label:"文档评审",icon:"✅",viewer:async()=>({default:(await e(()=>import("./ReviewViewer-DQQx6ub2.js"),__vite__mapDeps([0,1,2]))).default})};export{a as default};
@@ -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-C4h4936F.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-C041WeTi.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-0GvyDl5M.css">
10
10
  </head>
11
11
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zdashboard",
3
- "version": "1.3.2",
3
+ "version": "1.4.0",
4
4
  "description": "ZCode skill dashboard platform — pluggable viewers for zdesign/zview/zreview/zgoal",
5
5
  "type": "module",
6
6
  "bin": {