zdashboard 2.5.0 → 2.6.1
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 +5 -3
- package/dist/cli.js.map +1 -1
- package/dist/web/assets/FileIcon-B0-2gV6a.js +10 -0
- package/dist/web/assets/FilterPills-B6u1IBeC.js +1 -0
- package/dist/web/assets/{MdViewer-BVog1Mmf.js → MdViewer-Cvh3TNQI.js} +2 -2
- package/dist/web/assets/ProgressBar-CbyvyLzw.js +1 -0
- package/dist/web/assets/Workspace-DQmfVJh6.js +1 -0
- package/dist/web/assets/badge-DTb6qo3S.js +1 -0
- package/dist/web/assets/index-BfA6l4to.js +7816 -0
- package/dist/web/assets/{index-CxJJYhye.js → index-BvuOeKbq.js} +1 -1
- package/dist/web/assets/index-DQkehbup.css +1 -0
- package/dist/web/assets/web-5newSm97.js +1 -0
- package/dist/web/assets/web-BOg9UnpC.js +1 -0
- package/dist/web/assets/web-BXCBKn6i.js +5 -0
- package/dist/web/assets/web-BcTJQUKr.js +1 -0
- package/dist/web/assets/web-C8I10oqh.js +2 -0
- package/dist/web/assets/web-CLCAgjmg.js +1 -0
- package/dist/web/assets/web-CXE89yN1.js +2 -0
- package/dist/web/index.html +2 -2
- package/package.json +2 -1
- package/dist/web/assets/FileIcon-CeMvyYN_.js +0 -110
- package/dist/web/assets/FilterPills-CkgNlhxd.js +0 -1
- package/dist/web/assets/ProgressBar-Cmd6BS-8.js +0 -1
- package/dist/web/assets/Workspace-DfmiOTyP.js +0 -16
- package/dist/web/assets/badge-LEpB1yPS.js +0 -1
- package/dist/web/assets/book-open-C6mI7nw7.js +0 -6
- package/dist/web/assets/file-text-BN7zorT8.js +0 -6
- package/dist/web/assets/index-D0Ytqw4l.js +0 -161
- package/dist/web/assets/index-Dr1HVqud.css +0 -1
- package/dist/web/assets/vt323-latin-400-normal-Dqn9ZSPj.woff +0 -0
- package/dist/web/assets/web-BUcxZ3zM.js +0 -2
- package/dist/web/assets/web-BtGB7yoQ.js +0 -16
- package/dist/web/assets/web-D50pz6K1.js +0 -16
- package/dist/web/assets/web-DVlfapY3.js +0 -21
- package/dist/web/assets/web-DezLgOmZ.js +0 -25
- package/dist/web/assets/web-DwE0xwTq.js +0 -26
- package/dist/web/assets/web-sOdesjte.js +0 -7
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,a as l}from"./index-D0Ytqw4l.js";function x({items:n,value:t,onChange:i,ariaLabel:c,renderExtra:o,renderLabel:s,className:p,...d}){return e.jsx("div",{role:"group","aria-label":c,className:l("inline-flex items-center gap-1.5 flex-wrap",p),...d,children:n.map(r=>{const a=r.key===t;return e.jsxs("button",{type:"button","aria-pressed":a,onClick:()=>i(r.key),className:l("inline-flex items-center gap-1.5 h-7 px-2.5 rounded-full border text-xs transition-colors",a?"bg-primary text-primary-foreground border-primary":"border-border text-muted-foreground hover:text-foreground hover:border-muted-foreground/40",r.className),children:[s?s(r):e.jsx("span",{children:r.label}),r.badge&&e.jsx("span",{className:"opacity-80",children:r.badge}),o==null?void 0:o(r)]},r.key)})})}export{x as F};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r,a as s}from"./index-D0Ytqw4l.js";function t({value:e,className:l}){const a=Math.max(0,Math.min(100,e));return r.jsx("div",{className:s("rounded-full bg-muted overflow-hidden",l),role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuetext":`${a}%`,children:r.jsx("div",{className:"h-full rounded-full bg-primary transition-all",style:{width:`${a}%`}})})}export{t as P};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{c as l,r as a,j as t,f as u}from"./index-D0Ytqw4l.js";import{P as x}from"./ProgressBar-Cmd6BS-8.js";import{F as h}from"./file-text-BN7zorT8.js";import{B as p}from"./book-open-C6mI7nw7.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 f=l("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
|
|
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 b=l("FolderTree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);/**
|
|
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 v=l("GitPullRequest",[["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"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]]);function w(g){const[s,n]=a.useState(null),[r,c]=a.useState(null);if(a.useEffect(()=>{fetch("/__stats/data",{cache:"no-store"}).then(e=>e.json()).then(n).catch(e=>c(e.message))},[]),r)return t.jsx("div",{className:"flex h-full items-center justify-center text-destructive",children:t.jsxs("p",{children:["加载失败: ",r]})});if(!s)return t.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:t.jsx("p",{children:"加载中…"})});const d=Math.max(...s.byExt.map(e=>e.count),1),i=[{label:"文件",value:s.files,icon:h,mode:null,filter:null},{label:"目录",value:s.dirs,icon:b,mode:null,filter:null},{label:"总大小",value:u(s.totalSize),mode:null,filter:null},{label:"Markdown",value:s.markdown,icon:p,mode:"view",filter:".md"},{label:"变更 进行/归档",value:`${s.openspec.active}/${s.openspec.archived}`,icon:v,mode:"apply",filter:null}],m=(e,o)=>{e&&window.dispatchEvent(new CustomEvent("zd-dashboard-nav",{detail:{mode:e,...o?{filter:o}:{}}}))};return t.jsxs("div",{className:"mx-auto h-full max-w-6xl overflow-auto rounded-lg border bg-background p-6 shadow-sm",children:[t.jsxs("h1",{className:"text-lg font-semibold mb-1 flex items-center gap-2",children:[t.jsx(f,{className:"h-5 w-5 text-primary"}),"项目统计"]}),t.jsx("p",{className:"text-xs text-muted-foreground mb-5",children:"后端 fs 扫描 + 前端渲染 · 改文件即时刷新 · 点击卡片跳转"}),t.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-3 mb-6",children:i.map(e=>t.jsxs("button",{type:"button",onClick:()=>m(e.mode,e.filter),disabled:!e.mode,title:e.mode?`点击跳转至 ${e.label}`:void 0,className:`rounded-lg border bg-background p-4 text-left transition-colors ${e.mode?"hover:bg-muted/70 cursor-pointer":"cursor-default opacity-80"}`,children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("div",{className:"text-xl font-bold",children:e.value}),e.icon&&t.jsx(e.icon,{className:"h-4 w-4 text-muted-foreground/50"})]}),t.jsx("div",{className:"text-[11px] text-muted-foreground mt-1",children:e.label})]},e.label))}),t.jsx("h2",{className:"text-xs font-medium text-muted-foreground mb-3",children:"文件类型 Top 10"}),t.jsx("div",{className:"space-y-2",children:s.byExt.map(e=>t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsx("span",{className:"w-16 font-mono text-foreground truncate",children:e.ext}),t.jsx(x,{value:parseFloat((e.count/d*100).toFixed(1)),className:"flex-1 h-2"}),t.jsx("span",{className:"w-8 text-right font-mono text-muted-foreground",children:e.count})]},e.ext))}),t.jsxs("div",{className:"mt-5 flex items-center gap-2 text-xs",children:[t.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded border ${s.hasJust?"text-success border-success/30 bg-success/10":"text-muted-foreground border-border"}`,children:["justfile ",s.hasJust?"✓":"✗"]}),t.jsxs("span",{className:"text-muted-foreground",children:["root: ",s.root]})]})]})}export{w as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,j as n,a as o,b as i}from"./index-D0Ytqw4l.js";const d=i("inline-flex items-center rounded border px-1.5 py-0.5 text-[10px] font-mono font-medium transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",success:"border-success/30 bg-success/15 text-success",warning:"border-warning/30 bg-warning/15 text-warning",info:"border-info/30 bg-info/15 text-info",neutral:"border-border bg-muted text-muted-foreground",destructive:"border-destructive/30 bg-destructive/15 text-destructive"}},defaultVariants:{variant:"default"}}),c=s.forwardRef(({className:r,variant:e,...t},a)=>n.jsx("div",{ref:a,className:o(d({variant:e}),r),...t}));c.displayName="Badge";export{c as B};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{c as a}from"./index-D0Ytqw4l.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 e=a("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"}]]);export{e as B};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{c as e}from"./index-D0Ytqw4l.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 t=e("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);export{t as F};
|