zdashboard 2.2.0 → 2.3.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 +309 -211
- package/dist/cli.js.map +1 -1
- package/dist/web/assets/{web-BnZ_68eg.js → CodeViewer-D8YqzmwB.js} +8 -23
- package/dist/web/assets/FilterPills-A_fz1nby.js +1 -0
- package/dist/web/assets/{katex.min-D_D1u30F.js → MdViewer-P4wmRzy_.js} +24 -24
- package/dist/web/assets/ProgressBar-B4U41etC.js +1 -0
- package/dist/web/assets/Workspace-nm0YyxF7.js +1 -0
- package/dist/web/assets/badge-C92Y2FRG.js +1 -0
- package/dist/web/assets/file-text-BHzQwEJK.js +6 -0
- package/dist/web/assets/index-ByI0Pghw.css +1 -0
- package/dist/web/assets/index-CNPKNdvp.js +111 -0
- package/dist/web/assets/{index-6FGn10zY.js → index-C_wTjWH0.js} +1 -1
- package/dist/web/assets/web-5tq6UJuk.js +2 -0
- package/dist/web/assets/web-DgYHvMu9.js +16 -0
- package/dist/web/assets/web-DhyfyLB-.js +11 -0
- package/dist/web/assets/web-JxMZZReP.js +2 -0
- package/dist/web/assets/web-ZQ0eDR1y.js +31 -0
- package/dist/web/assets/web-vTYFh6Bo.js +25 -0
- package/dist/web/assets/web-vbs6AnjC.js +26 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/MdViewer-qvXbO8IA.js +0 -1
- package/dist/web/assets/Workspace-D96dCoOA.js +0 -1
- package/dist/web/assets/git-branch-DJLd5kDE.js +0 -11
- package/dist/web/assets/index-15cLfCw4.js +0 -90
- package/dist/web/assets/index-CYqm3unP.css +0 -1
- package/dist/web/assets/web-BUNysAkV.js +0 -7
- package/dist/web/assets/web-BeuJXCg2.js +0 -26
- package/dist/web/assets/web-C-O8qmKu.js +0 -31
- package/dist/web/assets/web-CJq1r_vk.js +0 -11
- package/dist/web/assets/web-DP_CBpB2.js +0 -2
- package/dist/web/assets/web-Xpqif6fn.js +0 -32
- /package/dist/web/assets/{katex-BTcE7LSd.css → MdViewer-BTcE7LSd.css} +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import{c as p,r as o,j as e,_ as v}from"./index-CNPKNdvp.js";import{M as S}from"./MdViewer-P4wmRzy_.js";import{C as _,I as V}from"./CodeViewer-D8YqzmwB.js";import{F as I}from"./FilterPills-A_fz1nby.js";import"./index-C_wTjWH0.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=p("ImageOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]);/**
|
|
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 C=p("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
|
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 E=p("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
|
|
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 z=p("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
|
|
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 F=p("Tablet",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["line",{x1:"12",x2:"12.01",y1:"18",y2:"18",key:"1dp563"}]]);let k=null;const y=new Set,u={get:()=>k,set:t=>{k=t,y.forEach(i=>i(t))},subscribe:t=>(y.add(t),()=>{y.delete(t)})};function M({path:t}){return e.jsx("iframe",{src:"/"+encodeURI(t),title:"预览",className:"w-full h-full border-0 bg-white"})}function P({path:t}){const[i,l]=o.useState(null),[d,r]=o.useState(!0);return o.useEffect(()=>{let s=!1;return r(!0),l(null),fetch("/"+encodeURI(t),{cache:"no-store"}).then(a=>a.text()).then(a=>{if(s)return;const c=a.match(/--[A-Za-z0-9_-]+\s*:\s*[^;}\n]+/g)??[];if(!c.length){l([]),r(!1);return}const n=m=>/^(#([0-9a-fA-F]{3,8})\b|rgb|rgba|hsl|hsla|oklch|oklab|color\()/i.test(m.trim()),x=c.filter(m=>n(m)),h=c.filter(m=>/font|family|type/.test(m.toLowerCase())&&!n(m)),b=c.filter(m=>!x.includes(m)&&!h.includes(m)),g=m=>{const j=m.indexOf(":"),N=m.slice(0,j).trim(),w=m.slice(j+1).trim();return{name:N,value:w}},f=[];x.length&&f.push({label:`配色 · ${x.length}`,items:x.map(g)}),h.length&&f.push({label:`字体 · ${h.length}`,items:h.map(g)}),b.length&&f.push({label:`其他 · ${b.length}`,items:b.map(g)}),l(f),r(!1)}).catch(()=>{s||(l([]),r(!1))}),()=>{s=!0}},[t]),d?e.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"解析中…"}):i.length?e.jsx("div",{className:"p-8 flex flex-col gap-7",children:i.map(s=>{const a=s.items.some(n=>/^(#|rgb|rgba|hsl|hsla|oklch|oklab|color\()/i.test(n.value)),c=s.items.some(n=>/font|family|type/i.test(n.name));return e.jsxs("section",{children:[e.jsx("div",{className:"mb-3 text-[11px] font-semibold uppercase text-muted-foreground",children:s.label}),a?e.jsx("div",{className:"grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(150px, 1fr))"},children:s.items.filter(n=>/^(#|rgb|rgba|hsl|hsla|oklch|oklab|color\()/i.test(n.value)).map(({name:n,value:x})=>e.jsxs("div",{className:"overflow-hidden rounded-lg border bg-background",children:[e.jsx("div",{className:"h-[72px] border-b",style:{background:x}}),e.jsx("div",{className:"px-2.5 pt-2 font-mono text-[11px] break-all",children:n}),e.jsx("div",{className:"px-2.5 pb-2 text-xs text-muted-foreground",children:x})]},n))}):c?e.jsx("div",{className:"grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(150px, 1fr))"},children:s.items.map(({name:n,value:x})=>e.jsxs("div",{className:"overflow-hidden rounded-lg border bg-background",children:[e.jsx("div",{className:"grid h-[72px] place-items-center text-2xl",style:{fontFamily:x},children:"Aa"}),e.jsx("div",{className:"px-2.5 font-mono text-[11px]",children:n})]},n))}):e.jsx("div",{className:"flex flex-col gap-1",children:s.items.map(({name:n,value:x})=>e.jsxs("div",{className:"flex justify-between gap-3 px-2.5 py-1.5 rounded border bg-background text-xs",children:[e.jsx("span",{className:"font-mono",children:n}),e.jsx("span",{className:"text-muted-foreground",children:x})]},n))})]},s.label)})}):e.jsx("p",{className:"p-3 text-xs",children:"未发现 CSS 变量"})}function U({path:t}){return e.jsx("div",{className:"grid place-items-center p-8",children:e.jsx("video",{src:"/"+encodeURI(t),controls:!0,className:"max-w-full max-h-[80vh] rounded border"})})}function L({path:t}){return e.jsx("div",{className:"grid place-items-center p-8",children:e.jsx("audio",{src:"/"+encodeURI(t),controls:!0,className:"w-full max-w-2xl"})})}function O({path:t}){return e.jsx("div",{className:"grid place-items-center p-8 h-full",children:e.jsx("iframe",{src:"/"+encodeURI(t),title:"PDF",className:"w-full h-full max-h-[80vh] rounded border bg-white"})})}function T({path:t}){const[i,l]=o.useState("");return o.useEffect(()=>{let d=!1,r="",s=null;return fetch("/"+encodeURI(t)).then(a=>a.blob()).then(async a=>{var c;if(!d){if(r=URL.createObjectURL(a),s=new FontFace("zd-font-preview",`url(${r})`),await s.load(),d){(c=s.dispose)==null||c.call(s);return}document.fonts.add(s),l(t.split("/").pop()??t)}}).catch(()=>{d||l(t.split("/").pop()??t)}),()=>{var a;if(d=!0,s)try{document.fonts.delete(s),(a=s.dispose)==null||a.call(s)}catch{}r&&URL.revokeObjectURL(r)}},[t]),e.jsxs("div",{className:"h-full overflow-auto p-8 grid gap-6 place-content-center text-center",children:[e.jsx("div",{className:"text-xs text-muted-foreground font-mono break-all",children:t}),e.jsx("div",{className:"text-5xl",style:{fontFamily:i?"'zd-font-preview', serif":"serif"},children:"Aa 字体预览 0123"})]})}function $({path:t}){return e.jsx("div",{className:"grid place-items-center h-full text-center text-muted-foreground",children:e.jsxs("div",{children:[e.jsx(R,{className:"h-10 w-10 mx-auto mb-3 opacity-50"}),e.jsx("p",{children:"该格式无法预览"}),e.jsx("p",{className:"mt-1 font-mono text-xs break-all",children:t})]})})}const A={page:M,icon:V,token:P,md:S,video:U,audio:L,pdf:O,component:_,font:T};function W(t){return A[t]??$}function D({mode:t,onMode:i,w:l,h:d,onW:r,onH:s}){const a=[{v:0,icon:e.jsx(C,{className:"h-3.5 w-3.5"}),label:"桌面"},{v:768,icon:e.jsx(F,{className:"h-3.5 w-3.5"}),label:"768"},{v:375,icon:e.jsx(z,{className:"h-3.5 w-3.5"}),label:"375"},{v:"custom",icon:e.jsx(E,{className:"h-3.5 w-3.5"}),label:"自定义"}],c="w-[50px] h-7 px-1 text-center text-xs rounded border border-border bg-background text-foreground [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none focus:outline-none focus:border-primary";return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex items-center gap-1 rounded-md border border-border p-0.5 bg-muted",children:e.jsx(I,{items:a.map(n=>({key:String(n.v),label:n.label,renderLabel:()=>e.jsxs(e.Fragment,{children:[n.icon,e.jsx("span",{className:"hidden sm:inline",children:n.label})]})})),value:String(t),onChange:n=>i(n==="0"?0:n==="custom"?"custom":Number(n)),ariaLabel:"视口模式"})}),e.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx("input",{type:"number",value:l,min:280,max:3e3,step:8,onChange:n=>r(Number(n.target.value)),"aria-label":"自定义宽度",className:c}),e.jsx("span",{className:"text-muted-foreground/70",children:"×"}),e.jsx("input",{type:"number",value:d,min:400,max:3e3,step:8,onChange:n=>s(Number(n.target.value)),"aria-label":"自定义高度",className:c}),e.jsx("span",{className:"text-[11px] text-muted-foreground/70",children:"px"})]})]})}function H(){const[t,i]=o.useState(()=>u.get()),[l,d]=o.useState(0),[r,s]=o.useState(1024),[a,c]=o.useState(768);o.useEffect(()=>u.subscribe(i),[]);const n=t?W(t.type):null,x=l===0?"桌面":l==="custom"?`${r} × ${a}`:`${l}px`;return e.jsx("div",{className:"mx-auto h-full flex flex-col bg-background border rounded-lg shadow-sm overflow-hidden",children:t&&n?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"h-[38px] flex-none flex items-center justify-between px-3.5 border-b bg-background text-xs",children:[e.jsx("span",{className:"font-mono truncate",children:t.path}),e.jsx("span",{className:"text-muted-foreground ml-3 flex-none",children:x}),e.jsx(D,{mode:l,onMode:d,w:r,h:a,onW:s,onH:c})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-auto",children:t.type==="page"?e.jsx("div",{className:"mx-auto bg-background overflow-hidden",style:{maxWidth:l===0?void 0:l==="custom"?r:l,height:l==="custom"?a:"100%"},children:e.jsx(n,{path:t.path})}):e.jsx("div",{className:"mx-auto max-w-5xl h-full overflow-auto",children:e.jsx(n,{path:t.path})})})]}):e.jsx("div",{className:"flex-1 grid place-items-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",children:"z"}),e.jsx("p",{children:"从左侧选择一个资产预览"}),e.jsx("p",{className:"mt-1 text-xs",children:"点左侧折叠钮展开资产树 · 改文件即时刷新"})]})})})}const q=Object.freeze(Object.defineProperty({__proto__:null,default:H},Symbol.toStringTag,{value:"Module"})),G=[{key:"page",label:"页面"},{key:"component",label:"组件"},{key:"icon",label:"图标"},{key:"token",label:"Tokens"},{key:"md",label:"文档"},{key:"video",label:"视频"},{key:"audio",label:"音频"},{key:"pdf",label:"PDF"},{key:"font",label:"字体"},{key:"other",label:"其他"}];function Z(){const t=o.useSyncExternalStore(u.subscribe,u.get),[i,l]=o.useState(null);o.useEffect(()=>{fetch("/__design/assets",{cache:"no-store"}).then(r=>r.json()).then(l)},[]);const d=o.useMemo(()=>i?G.map(r=>({...r,items:i[r.key]??[]})).filter(r=>r.items.length>0):[],[i]);return i?e.jsxs("div",{children:[e.jsxs("div",{className:"p-3 text-xs text-muted-foreground",children:[d.reduce((r,s)=>r+s.items.length,0)," 个资产"]}),d.map(r=>e.jsxs("div",{className:"mb-1",children:[e.jsxs("div",{className:"px-3.5 pt-2 pb-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:[r.label," ",e.jsx("span",{className:"font-normal",children:r.items.length})]}),r.items.map(s=>e.jsxs("button",{onClick:()=>u.set({path:s.path,type:s.type}),className:`w-full text-left flex items-center gap-2 px-3.5 py-1.5 text-xs border-l-2 border-transparent hover:bg-muted ${(t==null?void 0:t.path)===s.path?"bg-muted font-medium border-primary":"text-muted-foreground"}`,children:[e.jsx("span",{className:"break-all",children:s.name}),e.jsx("span",{className:"font-mono text-[10px] text-muted-foreground",children:s.ext})]},s.path))]},r.key))]}):e.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"加载中…"})}const B=Object.freeze(Object.defineProperty({__proto__:null,default:Z},Symbol.toStringTag,{value:"Module"})),ee={mode:"design",label:"设计资产",icon:"🎨",description:"设计资产分类浏览 · zdesign",Sidebar:o.lazy(()=>v(()=>Promise.resolve().then(()=>B),void 0)),Workspace:o.lazy(()=>v(()=>Promise.resolve().then(()=>q),void 0))};export{Z as DesignSidebar,H as DesignWorkspace,ee as default};
|
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-CNPKNdvp.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-ByI0Pghw.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as c,j as r}from"./index-15cLfCw4.js";import{r as d,a as u,b as m,c as x,d as h,e as g,f}from"./katex.min-D_D1u30F.js";import{M as b,r as y}from"./index-6FGn10zY.js";function j({children:n}){const t=c.useRef(null),[i,s]=c.useState(!1),a=async()=>{var e;const p=((e=t.current)==null?void 0:e.innerText)??"";try{await navigator.clipboard.writeText(p),s(!0),setTimeout(()=>s(!1),1500)}catch(o){console.error("[zdashboard] clipboard copy failed:",o)}};return r.jsxs("div",{className:"not-prose relative my-4 group",children:[r.jsx("button",{onClick:a,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?"已复制":"复制"}),r.jsx("pre",{ref:t,className:"overflow-auto rounded-md border bg-[#0d1117] p-3 text-xs leading-relaxed",children:n})]})}function N({path:n}){const[t,i]=c.useState(null);if(c.useEffect(()=>{let e=!0;return fetch("/"+encodeURI(n),{cache:"no-store"}).then(o=>o.text()).then(o=>{e&&i(o)}).catch(()=>{e&&i("")}),()=>{e=!1}},[n]),t===null)return r.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"加载中…"});const s=t.match(/^---\n([\s\S]*?)\n---\n?/),a=(s==null?void 0:s[1])??null,p=a?t.slice(s[0].length):t;return r.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:[a&&r.jsxs("details",{className:"not-prose mb-4 rounded border p-3 text-sm",children:[r.jsx("summary",{className:"cursor-pointer font-medium",children:"YAML frontmatter"}),r.jsx("pre",{className:"mt-2 whitespace-pre-wrap text-xs",children:a})]}),r.jsx(b,{remarkPlugins:[y,g,f],rehypePlugins:[d,u,[m,{behavior:"wrap",properties:{className:["no-underline"]}}],[x,{detect:!0,ignoreMissing:!0}],[h,{strict:!1}]],components:{pre:({children:e})=>r.jsx(j,{children:e}),a:({href:e,children:o})=>{const l=e==null?void 0:e.startsWith("http");return r.jsx("a",{href:e,target:l?"_blank":void 0,rel:l?"noreferrer noopener":void 0,children:o})}},children:p})]})}export{N as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as l,j as t}from"./index-15cLfCw4.js";function f(m){const[s,o]=l.useState(null),[r,d]=l.useState(null);if(l.useEffect(()=>{fetch("/__stats/data",{cache:"no-store"}).then(e=>e.json()).then(o).catch(e=>d(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 n=(s.totalSize/1024/1024).toFixed(2),i=Math.max(...s.byExt.map(e=>e.count),1),c=[{label:"文件",value:s.files,mode:null,filter:null},{label:"目录",value:s.dirs,mode:null,filter:null},{label:"总大小",value:`${n} MB`,mode:null,filter:null},{label:"Markdown",value:s.markdown,mode:"view",filter:".md"},{label:"变更 进行/归档",value:`${s.openspec.active}/${s.openspec.archived}`,mode:"apply",filter:null}],u=(e,a)=>{e&&window.dispatchEvent(new CustomEvent("zd-dashboard-nav",{detail:{mode:e,...a?{filter:a}:{}}}))};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.jsx("h1",{className:"text-lg font-semibold mb-1",children:"📊 项目统计"}),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:c.map(e=>t.jsxs("button",{type:"button",onClick:()=>u(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.jsx("div",{className:"text-xl font-bold",children:e.value}),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("div",{className:"flex-1 h-2 bg-muted rounded-full overflow-hidden",children:t.jsx("div",{className:"h-full bg-primary rounded-full",style:{width:`${(e.count/i*100).toFixed(1)}%`}})}),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-emerald-600 border-emerald-500/30 bg-emerald-500/10":"text-muted-foreground border-border"}`,children:["justfile ",s.hasJust?"✓":"✗"]}),t.jsxs("span",{className:"text-muted-foreground",children:["root: ",s.root]})]})]})}export{f as default};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{c as e}from"./index-15cLfCw4.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=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"}]]);/**
|
|
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 t=e("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);export{c as F,t as G};
|